diff --git a/matlab/test_apa_1_basic_meas.m b/matlab/test_apa_1_basic_meas.m index dfdb0c3..4bb5805 100644 --- a/matlab/test_apa_1_basic_meas.m +++ b/matlab/test_apa_1_basic_meas.m @@ -11,15 +11,6 @@ addpath('./mat/'); % Path for data %% Colors for the figures colors = colororder; -% Geometrical Measurements -% <> - -% To measure the flatness of the two mechanical interfaces of the APA300ML, a small measurement bench is installed on top of a metrology granite with excellent flatness. -% As shown in Figure ref:fig:test_apa_flatness_setup, the APA is fixed to a clamp while a measuring probe[fn:3] is used to measure the height of four points on each of the APA300ML interfaces. -% From the X-Y-Z coordinates of the measured eight points, the flatness is estimated by best fitting[fn:4] a plane through all the points. -% The measured flatness values, summarized in Table ref:tab:test_apa_flatness_meas, are within the specifications. - - %% Measured height for all the APA at the 8 locations apa1 = 1e-6*[0, -0.5 , 3.5 , 3.5 , 42 , 45.5, 52.5 , 46]; apa2 = 1e-6*[0, -2.5 , -3 , 0 , -1.5 , 1 , -2 , -4]; @@ -55,31 +46,6 @@ for i = 1:7 apa_d(i) = min_d; end -% Stroke and Hysteresis Measurement -% <> - -% To compare the stroke of the APA300ML with the datasheet specifications, one side of the APA is fixed to the granite, and a displacement probe[fn:2] is located on the other side as shown in Figure ref:fig:test_apa_stroke_bench. - -% The voltage across the two actuator stacks is varied from $-20\,V$ to $150\,V$ using a DAC[fn:12] and a voltage amplifier[fn:13]. -% Note that the voltage is slowly varied as the displacement probe has a very low measurement bandwidth (see Figure ref:fig:test_apa_stroke_voltage). - -% #+name: fig:test_apa_stroke_bench -% #+caption: Bench to measure the APA stroke -% #+attr_latex: :width 0.7\linewidth -% [[file:figs/test_apa_stroke_bench.jpg]] - -% The measured APA displacement is shown as a function of the applied voltage in Figure ref:fig:test_apa_stroke_hysteresis. -% Typical hysteresis curves for piezoelectric stack actuators can be observed. -% The measured stroke is approximately $250\,\mu m$ when using only two of the three stacks. -% This is even above what is specified as the nominal stroke in the data-sheet ($304\,\mu m$, therefore $\approx 200\,\mu m$ if only two stacks are used). -% For the NASS, this stroke is sufficient because the positioning errors to be corrected using the nano-hexapod are expected to be in the order of $10\,\mu m$. - -% It is clear from Figure ref:fig:test_apa_stroke_hysteresis that "APA 3" has an issue compared with the other units. -% This confirms the abnormal electrical measurements made in Section ref:ssec:test_apa_electrical_measurements. -% This unit was sent sent back to Cedrat, and a new one was shipped back. -% From now on, only the six remaining amplified piezoelectric actuators that behave as expected will be used. - - %% Load the measured strokes load('meas_apa_stroke.mat', 'apa300ml_2s') @@ -100,59 +66,6 @@ xlabel('Voltage [V]'); ylabel('Displacement [$\mu m$]') legend('location', 'southwest', 'FontSize', 8) xlim([-20, 150]); ylim([-250, 0]); -% Flexible Mode Measurement -% <> - -% In this section, the flexible modes of the APA300ML are investigated both experimentally and using a Finite Element Model. -% To experimentally estimate these modes, the APA is fixed at one end (see Figure ref:fig:test_apa_meas_setup_modes). -% A Laser Doppler Vibrometer[fn:6] is used to measure the difference of motion between two "red" points and an instrumented hammer[fn:7] is used to excite the flexible modes. -% Using this setup, the transfer function from the injected force to the measured rotation can be computed under different conditions, and the frequency and mode shapes of the flexible modes can be estimated. - -% The flexible modes for the same condition (i.e. one mechanical interface of the APA300ML fixed) are estimated using a finite element software, and the results are shown in Figure ref:fig:test_apa_mode_shapes. - -% #+name: fig:test_apa_mode_shapes -% #+caption: First three modes of the APA300ML in a fix-free condition estimated from a Finite Element Model -% #+attr_latex: :options [htbp] -% #+begin_figure -% #+attr_latex: :caption \subcaption{\label{fig:test_apa_mode_shapes_1}Y-bending mode (268Hz)} -% #+attr_latex: :options {0.36\textwidth} -% #+begin_subfigure -% #+attr_latex: :height 4.3cm -% [[file:figs/test_apa_mode_shapes_1.png]] -% #+end_subfigure -% #+attr_latex: :caption \subcaption{\label{fig:test_apa_mode_shapes_2}X-bending mode (399Hz)} -% #+attr_latex: :options {0.28\textwidth} -% #+begin_subfigure -% #+attr_latex: :height 4.3cm -% [[file:figs/test_apa_mode_shapes_2.png]] -% #+end_subfigure -% #+attr_latex: :caption \subcaption{\label{fig:test_apa_mode_shapes_3}Z-axial mode (706Hz)} -% #+attr_latex: :options {0.36\textwidth} -% #+begin_subfigure -% #+attr_latex: :height 4.3cm -% [[file:figs/test_apa_mode_shapes_3.png]] -% #+end_subfigure -% #+end_figure - -% #+name: fig:test_apa_meas_setup_modes -% #+caption: Experimental setup to measure the flexible modes of the APA300ML. For the bending in the $X$ direction (\subref{fig:test_apa_meas_setup_X_bending}), the impact point is at the back of the top measurement point. For the bending in the $Y$ direction (\subref{fig:test_apa_meas_setup_Y_bending}), the impact point is located on the back surface of the top interface (on the back of the 2 measurements points). -% #+attr_latex: :options [htbp] -% #+begin_figure -% #+attr_latex: :caption \subcaption{\label{fig:test_apa_meas_setup_X_bending}$X$ bending} -% #+attr_latex: :options {0.49\textwidth} -% #+begin_subfigure -% #+attr_latex: :width 0.95\linewidth -% [[file:figs/test_apa_meas_setup_X_bending.jpg]] -% #+end_subfigure -% #+attr_latex: :caption \subcaption{\label{fig:test_apa_meas_setup_Y_bending}$Y$ Bending} -% #+attr_latex: :options {0.49\textwidth} -% #+begin_subfigure -% #+attr_latex: :width 0.95\linewidth -% [[file:figs/test_apa_meas_setup_Y_bending.jpg]] -% #+end_subfigure -% #+end_figure - - %% X-Bending Identification % Load Data bending_X = load('apa300ml_bending_X_top.mat'); @@ -173,16 +86,6 @@ bending_Y = load('apa300ml_bending_Y_top.mat'); % Compute the transfer function [G_bending_Y, ~] = tfestimate(bending_Y.Track1, bending_Y.Track2, win, Noverlap, Nfft, 1/Ts); - - -% The measured frequency response functions computed from the experimental setups of figures ref:fig:test_apa_meas_setup_X_bending and ref:fig:test_apa_meas_setup_Y_bending are shown in Figure ref:fig:test_apa_meas_freq_compare. -% The $y$ bending mode is observed at $280\,\text{Hz}$ and the $x$ bending mode is at $412\,\text{Hz}$. -% These modes are measured at higher frequencies than the frequencies estimated from the Finite Element Model (see frequencies in Figure ref:fig:test_apa_mode_shapes). -% This is the opposite of what is usually observed (i.e. having lower resonance frequencies in practice than the estimation from a finite element model). -% This could be explained by underestimation of the Young's modulus of the steel used for the shell (190 GPa was used for the model, but steel with Young's modulus of 210 GPa could have been used). -% Another explanation is the shape difference between the manufactured APA300ML and the 3D model, for instance thicker blades. - - figure; hold on; plot(f, abs(G_bending_X), 'DisplayName', '$X$ bending'); diff --git a/matlab/test_apa_2_dynamics.m b/matlab/test_apa_2_dynamics.m index e502c40..6f492ba 100644 --- a/matlab/test_apa_2_dynamics.m +++ b/matlab/test_apa_2_dynamics.m @@ -11,15 +11,6 @@ addpath('./mat/'); % Path for data %% Colors for the figures colors = colororder; -% Hysteresis -% <> - -% Because the payload is vertically guided without friction, the hysteresis of the APA can be estimated from the motion of the payload. -% A quasi static[fn:9] sinusoidal excitation $V_a$ with an offset of $65\,V$ (halfway between $-20\,V$ and $150\,V$) and with an amplitude varying from $4\,V$ up to $80\,V$ is generated using the DAC. -% For each excitation amplitude, the vertical displacement $d_e$ of the mass is measured and displayed as a function of the applied voltage in Figure ref:fig:test_apa_meas_hysteresis. -% This is the typical behavior expected from a PZT stack actuator, where the hysteresis increases as a function of the applied voltage amplitude [[cite:&fleming14_desig_model_contr_nanop_system chap. 1.4]]. - - %% Load measured data - hysteresis apa_hyst = load('frf_data_1_hysteresis.mat', 't', 'u', 'de'); @@ -43,17 +34,6 @@ legend('location', 'northeast', 'FontSize', 8, 'NumColumns', 1); xlim([-20, 150]); ylim([-120, 120]); -% Axial stiffness -% <> - -% To estimate the stiffness of the APA, a weight with known mass $m_a = 6.4\,\text{kg}$ is added on top of the suspended granite and the deflection $\Delta d_e$ is measured using the encoder. -% The APA stiffness can then be estimated from equation eqref:eq:test_apa_stiffness, with $g \approx 9.8\,m/s^2$ the acceleration of gravity. - -% \begin{equation} \label{eq:test_apa_stiffness} -% k_{\text{apa}} = \frac{m_a g}{\Delta d_e} -% \end{equation} - - %% Load data for stiffness measurement apa_nums = [1 2 4 5 6 8]; apa_mass = {}; @@ -65,16 +45,6 @@ end added_mass = 6.4; % Added mass [kg] - - -% The measured displacement $d_e$ as a function of time is shown in Figure ref:fig:test_apa_meas_stiffness_time. -% It can be seen that there are some drifts in the measured displacement (probably due to piezoelectric creep), and that the displacement does not return to the initial position after the mass is removed (probably due to piezoelectric hysteresis). -% These two effects induce some uncertainties in the measured stiffness. - -% The stiffnesses are computed for all APAs from the two displacements $d_1$ and $d_2$ (see Figure ref:fig:test_apa_meas_stiffness_time) leading to two stiffness estimations $k_1$ and $k_2$. -% These estimated stiffnesses are summarized in Table ref:tab:test_apa_measured_stiffnesses and are found to be close to the specified nominal stiffness of the APA300ML $k = 1.8\,N/\mu m$. - - %% Plot the deflection at a function of time figure; hold on; @@ -98,51 +68,6 @@ text(18.5, -20, sprintf('$d_2$'), 'horizontalalignment', 'left'); hold off; xlabel('Time [s]'); ylabel('Displacement $d_e$ [$\mu$m]'); - - -% #+attr_latex: :options [b]{0.57\linewidth} -% #+begin_minipage -% #+name: fig:test_apa_meas_stiffness_time -% #+caption: Measured displacement when adding (at $t \approx 3\,s$) and removing (at $t \approx 13\,s$) the mass -% #+attr_latex: :width 0.9\linewidth :float nil -% [[file:figs/test_apa_meas_stiffness_time.png]] -% #+end_minipage -% \hfill -% #+attr_latex: :options [b]{0.37\linewidth} -% #+begin_minipage -% #+name: tab:test_apa_measured_stiffnesses -% #+caption: Measured axial stiffnesses (in $N/\mu m$) -% #+attr_latex: :environment tabularx :width 0.6\linewidth :align Xcc -% #+attr_latex: :center t :booktabs t :float nil -% #+RESULTS: -% | APA | $k_1$ | $k_2$ | -% |-----+-------+-------| -% | 1 | 1.68 | 1.9 | -% | 2 | 1.69 | 1.9 | -% | 4 | 1.7 | 1.91 | -% | 5 | 1.7 | 1.93 | -% | 6 | 1.7 | 1.92 | -% | 8 | 1.73 | 1.98 | -% #+end_minipage - -% The stiffness can also be computed using equation eqref:eq:test_apa_res_freq by knowing the main vertical resonance frequency $\omega_z \approx 95\,\text{Hz}$ (estimated by the dynamical measurements shown in section ref:ssec:test_apa_meas_dynamics) and the suspended mass $m_{\text{sus}} = 5.7\,\text{kg}$. - -% \begin{equation} \label{eq:test_apa_res_freq} -% \omega_z = \sqrt{\frac{k}{m_{\text{sus}}}} -% \end{equation} - -% The obtained stiffness is $k \approx 2\,N/\mu m$ which is close to the values found in the documentation and using the "static deflection" method. - - -% It is important to note that changes to the electrical impedance connected to the piezoelectric stacks affect the mechanical compliance (or stiffness) of the piezoelectric stack [[cite:&reza06_piezoel_trans_vibrat_contr_dampin chap. 2]]. - -% To estimate this effect for the APA300ML, its stiffness is estimated using the "static deflection" method in two cases: -% - $k_{\text{os}}$: piezoelectric stacks left unconnected (or connect to the high impedance ADC) -% - $k_{\text{sc}}$: piezoelectric stacks short-circuited (or connected to the voltage amplifier with small output impedance) - -% The open-circuit stiffness is estimated at $k_{\text{oc}} \approx 2.3\,N/\mu m$ while the closed-circuit stiffness $k_{\text{sc}} \approx 1.7\,N/\mu m$. - - %% Load Data add_mass_oc = load('frf_data_1_add_mass_open_circuit.mat', 't', 'de'); add_mass_cc = load('frf_data_1_add_mass_closed_circuit.mat', 't', 'de'); @@ -155,10 +80,6 @@ add_mass_cc.de = add_mass_cc.de - mean(add_mass_cc.de(add_mass_cc.t<11)); apa_k_oc = 9.8 * added_mass / (mean(add_mass_oc.de(add_mass_oc.t > 12 & add_mass_oc.t < 12.5)) - mean(add_mass_oc.de(add_mass_oc.t > 20 & add_mass_oc.t < 20.5))); apa_k_sc = 9.8 * added_mass / (mean(add_mass_cc.de(add_mass_cc.t > 12 & add_mass_cc.t < 12.5)) - mean(add_mass_cc.de(add_mass_cc.t > 20 & add_mass_cc.t < 20.5))); -% Dynamics -% <> - - %% Identification using sweep sine (low frequency) load('frf_data_sweep.mat'); load('frf_data_noise_hf.mat'); @@ -197,34 +118,6 @@ end %% Save the identified dynamics for further analysis save('mat/meas_apa_frf.mat', 'f', 'Ts', 'enc_frf', 'iff_frf', 'apa_nums'); - - -% In this section, the dynamics from the excitation voltage $u$ to the encoder measured displacement $d_e$ and to the force sensor voltage $V_s$ is identified. - -% First, the dynamics from $u$ to $d_e$ for the six APA300ML are compared in Figure ref:fig:test_apa_frf_encoder. -% The obtained frequency response functions are similar to those of a (second order) mass-spring-damper system with: -% - A "stiffness line" indicating a static gain equal to $\approx -17\,\mu m/V$. -% The negative sign comes from the fact that an increase in voltage stretches the piezoelectric stack which reduces the height of the APA -% - A lightly damped resonance at $95\,\text{Hz}$ -% - A "mass line" up to $\approx 800\,\text{Hz}$, above which additional resonances appear. These additional resonances might be due to the limited stiffness of the encoder support or from the limited compliance of the APA support. -% The flexible modes studied in section ref:ssec:test_apa_spurious_resonances seem not to impact the measured axial motion of the actuator. - -% The dynamics from $u$ to the measured voltage across the sensor stack $V_s$ for the six APA300ML are compared in Figure ref:fig:test_apa_frf_force. - -% A lightly damped resonance (pole) is observed at $95\,\text{Hz}$ and a lightly damped anti-resonance (zero) at $41\,\text{Hz}$. -% No additional resonances are present up to at least $2\,\text{kHz}$ indicating that Integral Force Feedback can be applied without stability issues from high-frequency flexible modes. -% The zero at $41\,\text{Hz}$ seems to be non-minimum phase (the phase /decreases/ by 180 degrees whereas it should have /increased/ by 180 degrees for a minimum phase zero). -% This is investigated in Section ref:ssec:test_apa_non_minimum_phase. - -% As illustrated by the Root Locus plot, the poles of the /closed-loop/ system converges to the zeros of the /open-loop/ plant as the feedback gain increases. -% The significance of this behavior varies with the type of sensor used, as explained in [[cite:&preumont18_vibrat_contr_activ_struc_fourt_edition chap. 7.6]]. -% Considering the transfer function from $u$ to $V_s$, if a controller with a very high gain is applied such that the sensor stack voltage $V_s$ is kept at zero, the sensor (and by extension, the actuator stacks since they are in series) experiences negligible stress and strain. -% Consequently, the closed-loop system virtually corresponds to one in which the piezoelectric stacks are absent, leaving only the mechanical shell. -% From this analysis, it can be inferred that the axial stiffness of the shell is $k_{\text{shell}} = m \omega_0^2 = 5.7 \cdot (2\pi \cdot 41)^2 = 0.38\,N/\mu m$ (which is close to what is found using a finite element model). - -% All the identified dynamics of the six APA300ML (both when looking at the encoder in Figure ref:fig:test_apa_frf_encoder and at the force sensor in Figure ref:fig:test_apa_frf_force) are almost identical, indicating good manufacturing repeatability for the piezoelectric stacks and the mechanical shell. - - %% Plot the FRF from u to de figure; tiledlayout(3, 1, 'TileSpacing', 'Compact', 'Padding', 'None'); @@ -287,20 +180,6 @@ yticks(-360:90:360); ylim([-180, 180]); linkaxes([ax1,ax2],'x'); xlim([10, 2e3]); -% Non Minimum Phase Zero? -% <> - -% It was surprising to observe a non-minimum phase zero on the transfer function from $u$ to $V_s$ (Figure ref:fig:test_apa_frf_force). -% It was initially thought that this non-minimum phase behavior was an artifact arising from the measurement. -% A longer measurement was performed using different excitation signals (noise, slow sine sweep, etc.) to determine if the phase behavior of the zero changes (Figure ref:fig:test_apa_non_minimum_phase). -% The coherence (Figure ref:fig:test_apa_non_minimum_phase_coherence) is good even in the vicinity of the lightly damped zero, and the phase (Figure ref:fig:test_apa_non_minimum_phase_zoom) clearly indicates non-minimum phase behavior. - -% Such non-minimum phase zero when using load cells has also been observed on other mechanical systems [[cite:&spanos95_soft_activ_vibrat_isolat;&thayer02_six_axis_vibrat_isolat_system;&hauge04_sensor_contr_space_based_six]]. -% It could be induced to small non-linearity in the system, but the reason for this non-minimum phase for the APA300ML is not yet clear. - -% However, this is not so important here because the zero is lightly damped (i.e. very close to the imaginary axis), and the closed loop poles (see the Root Locus plot in Figure ref:fig:test_apa_iff_root_locus) should not be unstable, except for very large controller gains that will never be applied in practice. - - %% Long measurement long_noise = load('frf_struts_align_3_noise_long.mat', 't', 'u', 'Vs'); @@ -352,17 +231,6 @@ yticks(-360:90:360); ylim([-180, 0]); linkaxes([ax1,ax2],'x'); xlim([38, 45]); -% Effect of the resistor on the IFF Plant -% <> - -% A resistor $R \approx 80.6\,k\Omega$ is added in parallel with the sensor stack, which forms a high-pass filter with the capacitance of the piezoelectric stack (capacitance estimated at $\approx 5\,\mu F$). - -% As explained before, this is done to limit the voltage offset due to the input bias current of the ADC as well as to limit the low frequency gain. - -% The (low frequency) transfer function from $u$ to $V_s$ with and without this resistor were measured and compared in Figure ref:fig:test_apa_effect_resistance. -% It is confirmed that the added resistor has the effect of adding a high-pass filter with a cut-off frequency of $\approx 0.39\,\text{Hz}$. - - %% Load the data wi_k = load('frf_data_1_sweep_lf_with_R.mat', 't', 'Vs', 'u'); % With the resistor wo_k = load('frf_data_1_sweep_lf.mat', 't', 'Vs', 'u'); % Without the resistor @@ -417,10 +285,6 @@ linkaxes([ax1,ax2],'x'); xlim([0.2, 8]); xticks([0.2, 0.5, 1, 2, 5]); -% Integral Force Feedback -% <> - - %% Load identification Data data = load("2023-03-17_11-28_iff_plant.mat"); @@ -433,18 +297,6 @@ Noverlap = floor(Nfft/2); %% Compute the transfer function from applied force to measured rotation [G_iff, f] = tfestimate(data.id_plant, data.Vs, win, Noverlap, Nfft, 1/Ts); - - -% To implement the Integral Force Feedback strategy, the measured frequency response function from $u$ to $V_s$ (Figure ref:fig:test_apa_frf_force) is fitted using the transfer function shown in equation eqref:eq:test_apa_iff_manual_fit. -% The parameters were manually tuned, and the obtained values are $\omega_{\textsc{hpf}} = 0.4\, \text{Hz}$, $\omega_{z} = 42.7\, \text{Hz}$, $\xi_{z} = 0.4\,\%$, $\omega_{p} = 95.2\, \text{Hz}$, $\xi_{p} = 2\,\%$ and $g_0 = 0.64$. - -% \begin{equation} \label{eq:test_apa_iff_manual_fit} -% G_{\textsc{iff},m}(s) = g_0 \cdot \frac{1 + 2 \xi_z \frac{s}{\omega_z} + \frac{s^2}{\omega_z^2}}{1 + 2 \xi_p \frac{s}{\omega_p} + \frac{s^2}{\omega_p^2}} \cdot \frac{s}{\omega_{\textsc{hpf}} + s} -% \end{equation} - -% A comparison between the identified plant and the manually tuned transfer function is shown in Figure ref:fig:test_apa_iff_plant_comp_manual_fit. - - %% Basic manually tuned model w0z = 2*pi*42.7; % Zero frequency xiz = 0.004; % Zero damping @@ -481,36 +333,11 @@ ylim([-90, 180]) linkaxes([ax1,ax2],'x'); xlim([0.2, 1e3]); - - -% #+name: fig:test_apa_iff_plant_comp_manual_fit -% #+caption: Identified IFF plant and manually tuned model of the plant (a time delay of $200\,\mu s$ is added to the model of the plant to better match the identified phase). Note that a minimum-phase zero is identified here even though the coherence is not good around the frequency of the zero. -% #+RESULTS: -% [[file:figs/test_apa_iff_plant_comp_manual_fit.png]] - -% The implemented Integral Force Feedback Controller transfer function is shown in equation eqref:eq:test_apa_Kiff_formula. -% It contains a high-pass filter (cut-off frequency of $2\,\text{Hz}$) to limit the low-frequency gain, a low-pass filter to add integral action above $20\,\text{Hz}$, a second low-pass filter to add robustness to high-frequency resonances, and a tunable gain $g$. - -% \begin{equation} \label{eq:test_apa_Kiff_formula} -% K_{\textsc{iff}}(s) = -10 \cdot g \cdot \frac{s}{s + 2\pi \cdot 2} \cdot \frac{1}{s + 2\pi \cdot 20} \cdot \frac{1}{s + 2\pi\cdot 2000} -% \end{equation} - - %% Integral Force Feedback Controller K_iff = -10*(1/(s + 2*pi*20)) * ... % LPF: provides integral action above 20Hz (s/(s + 2*pi*2)) * ... % HPF: limit low frequency gain (1/(1 + s/2/pi/2e3)); % LPF: more robust to high frequency resonances - - -% To estimate how the dynamics of the APA changes when the Integral Force Feedback controller is implemented, the test bench shown in Figure ref:fig:test_apa_iff_schematic is used. -% The transfer function from the "damped" plant input $u\prime$ to the encoder displacement $d_e$ is identified for several IFF controller gains $g$. - -% #+name: fig:test_apa_iff_schematic -% #+caption: Implementation of Integral Force Feedback in the Speedgoat. The damped plant has a new input $u\prime$ -% [[file:figs/test_apa_iff_schematic.png]] - - %% Load Data data = load("2023-03-17_14-10_damped_plants_new.mat"); @@ -534,18 +361,6 @@ for i = 1:length(i_kept) G_dL_frf(i) = {G_dL}; end - - -% The identified dynamics were then fitted by second order transfer functions[fn:10]. -% A comparison between the identified damped dynamics and the fitted second-order transfer functions is shown in Figure ref:fig:test_apa_identified_damped_plants for different gains $g$. -% It is clear that a large amount of damping is added when the gain is increased and that the frequency of the pole is shifted to lower frequencies. - -% The evolution of the pole in the complex plane as a function of the controller gain $g$ (i.e. the "root locus") is computed in two cases. -% First using the IFF plant model eqref:eq:test_apa_iff_manual_fit and the implemented controller eqref:eq:test_apa_Kiff_formula. -% Second using the fitted transfer functions of the damped plants experimentally identified for several controller gains. -% The two obtained root loci are compared in Figure ref:fig:test_apa_iff_root_locus and are in good agreement considering that the damped plants were fitted using only a second-order transfer function. - - %% Fit the data with 2nd order transfer function using vectfit3 opts = struct(); diff --git a/matlab/test_apa_3_model_2dof.m b/matlab/test_apa_3_model_2dof.m index ead8c0e..a523de7 100644 --- a/matlab/test_apa_3_model_2dof.m +++ b/matlab/test_apa_3_model_2dof.m @@ -30,15 +30,6 @@ io(io_i) = linio([mdl, '/de'], 1, 'openoutput'); io_i = io_i + 1; % Encoder %% Frequency vector for analysis freqs = 5*logspace(0, 3, 1000); -% Tuning of the APA model :ignore: - -% 9 parameters ($m$, $k_1$, $c_1$, $k_e$, $c_e$, $k_a$, $c_a$, $g_s$ and $g_a$) have to be tuned such that the dynamics of the model (Figure ref:fig:test_apa_2dof_model_simscape) well represents the identified dynamics in Section ref:sec:test_apa_dynamics. - -% #+name: fig:test_apa_2dof_model_simscape -% #+caption: Schematic of the two degrees-of-freedom model of the APA300ML with input $V_a$ and outputs $d_e$ and $V_s$ -% [[file:figs/test_apa_2dof_model_simscape.png]] - - %% Stiffness values for the 2DoF APA model k1 = 0.38e6; % Estimated Shell Stiffness [N/m] @@ -89,14 +80,6 @@ fs = 600; % Frequency where the two FRF should match [Hz] [~, i_f] = min(abs(f - fs)); gs = -abs(iff_frf(i_f,1))./abs(evalfr(G_norm('Vs', 'u'), 1i*2*pi*fs))/ga; -% Obtained Dynamics :ignore: - -% The dynamics of the two degrees-of-freedom model of the APA300ML are extracted using optimized parameters (listed in Table ref:tab:test_apa_2dof_parameters) from the Simscape model. -% This is compared with the experimental data in Figure ref:fig:test_apa_2dof_comp_frf. -% A good match can be observed between the model and the experimental data, both for the encoder (Figure ref:fig:test_apa_2dof_comp_frf_enc) and for the force sensor (Figure ref:fig:test_apa_2dof_comp_frf_force). -% This indicates that this model represents well the axial dynamics of the APA300ML. - - %% 2DoF APA300ML with optimized parameters n_hexapod = struct(); n_hexapod.actuator = initializeAPA( ... diff --git a/matlab/test_apa_4_model_flexible.m b/matlab/test_apa_4_model_flexible.m index 357c480..15d0295 100644 --- a/matlab/test_apa_4_model_flexible.m +++ b/matlab/test_apa_4_model_flexible.m @@ -30,13 +30,6 @@ io(io_i) = linio([mdl, '/de'], 1, 'openoutput'); io_i = io_i + 1; % Encoder %% Frequency vector for analysis freqs = 5*logspace(0, 3, 1000); -% Identification of the Actuator and Sensor constants - -% Once the APA300ML /super element/ is included in the Simscape model, the transfer function from $F_a$ to $d_L$ and $d_e$ can be extracted. -% The gains $g_a$ and $g_s$ are then tuned such that the gains of the transfer functions match the identified ones. -% By doing so, $g_s = 4.9\,V/\mu m$ and $g_a = 23.2\,N/V$ are obtained. - - %% Identification of the actuator and sensor "constants" % Initialize the APA as a flexible body with unity "constants" n_hexapod.actuator = initializeAPA(... @@ -60,68 +53,6 @@ ga = -mean(abs(enc_frf(f>10 & f<20)))./dcgain(G_norm('de', 'u')); % Sensor Constant in [V/m] gs = -mean(abs(iff_frf(f>400 & f<500)))./(ga*abs(squeeze(freqresp(G_norm('Vs', 'u'), 1e3, 'Hz')))); - - -% To ensure that the sensitivities $g_a$ and $g_s$ are physically valid, it is possible to estimate them from the physical properties of the piezoelectric stack material. - -% From [[cite:&fleming14_desig_model_contr_nanop_system p. 123]], the relation between relative displacement $d_L$ of the sensor stack and generated voltage $V_s$ is given by eqref:eq:test_apa_piezo_strain_to_voltage and from [[cite:&fleming10_integ_strain_force_feedb_high]] the relation between the force $F_a$ and the applied voltage $V_a$ is given by eqref:eq:test_apa_piezo_voltage_to_force. - -% \begin{subequations} -% \begin{align} -% V_s &= \underbrace{\frac{d_{33}}{\epsilon^T s^D n}}_{g_s} d_L \label{eq:test_apa_piezo_strain_to_voltage} \\ -% F_a &= \underbrace{d_{33} n k_a}_{g_a} \cdot V_a, \quad k_a = \frac{c^{E} A}{L} \label{eq:test_apa_piezo_voltage_to_force} -% \end{align} -% \end{subequations} - -% Unfortunately, the manufacturer of the stack was not willing to share the piezoelectric material properties of the stack used in the APA300ML. -% However, based on the available properties of the APA300ML stacks in the data-sheet, the soft Lead Zirconate Titanate "THP5H" from Thorlabs seemed to match quite well the observed properties. -% The properties of this "THP5H" material used to compute $g_a$ and $g_s$ are listed in Table ref:tab:test_apa_piezo_properties. - -% From these parameters, $g_s = 5.1\,V/\mu m$ and $g_a = 26\,N/V$ were obtained, which are close to the constants identified using the experimentally identified transfer functions. - -% #+name: tab:test_apa_piezo_properties -% #+caption: Piezoelectric properties used for the estimation of the sensor and actuators sensitivities -% #+attr_latex: :environment tabularx :width 1\linewidth :align ccX -% #+attr_latex: :center t :booktabs t -% | *Parameter* | *Value* | *Description* | -% |----------------+----------------------------+--------------------------------------------------------------| -% | $d_{33}$ | $680 \cdot 10^{-12}\,m/V$ | Piezoelectric constant | -% | $\epsilon^{T}$ | $4.0 \cdot 10^{-8}\,F/m$ | Permittivity under constant stress | -% | $s^{D}$ | $21 \cdot 10^{-12}\,m^2/N$ | Elastic compliance understand constant electric displacement | -% | $c^{E}$ | $48 \cdot 10^{9}\,N/m^2$ | Young's modulus of elasticity | -% | $L$ | $20\,mm$ per stack | Length of the stack | -% | $A$ | $10^{-4}\,m^2$ | Area of the piezoelectric stack | -% | $n$ | $160$ per stack | Number of layers in the piezoelectric stack | - - -%% Estimate "Sensor Constant" - (THP5H) -d33 = 680e-12; % Strain constant [m/V] -n = 160; % Number of layers per stack -eT = 4500*8.854e-12; % Permittivity under constant stress [F/m] -sD = 21e-12; % Compliance under constant electric displacement [m2/N] - -gs_th = d33/(eT*sD*n); % Sensor Constant [V/m] - -%% Estimate "Actuator Constant" - (THP5H) -d33 = 680e-12; % Strain constant [m/V] -n = 320; % Number of layers - -cE = 1/sD; % Youngs modulus [N/m^2] -A = (10e-3)^2; % Area of the stacks [m^2] -L = 40e-3; % Length of the two stacks [m] -ka = cE*A/L; % Stiffness of the two stacks [N/m] - -ga_th = d33*n*ka; % Actuator Constant [N/V] - -% Comparison of the obtained dynamics - -% The obtained dynamics using the /super element/ with the tuned "sensor sensitivity" and "actuator sensitivity" are compared with the experimentally identified frequency response functions in Figure ref:fig:test_apa_super_element_comp_frf. -% A good match between the model and the experimental results was observed. -% It is however surprising that the model is "softer" than the measured system, as finite element models usually overestimate the stiffness (see Section ref:ssec:test_apa_spurious_resonances for possible explanations). - -% Using this simple test bench, it can be concluded that the /super element/ model of the APA300ML captures the axial dynamics of the actuator (the actuator stacks, the force sensor stack as well as the shell used as a mechanical lever). - - %% Idenfify the dynamics of the Simscape model with correct actuator and sensor "constants" % Initialize the APA n_hexapod.actuator = initializeAPA(... diff --git a/test-bench-apa.org b/test-bench-apa.org index c2b34f7..9cc2d28 100644 --- a/test-bench-apa.org +++ b/test-bench-apa.org @@ -22,7 +22,7 @@ #+BIND: org-latex-bib-compiler "biber" #+PROPERTY: header-args:matlab :session *MATLAB* -#+PROPERTY: header-args:matlab+ :comments org +#+PROPERTY: header-args:matlab+ :comments no #+PROPERTY: header-args:matlab+ :exports none #+PROPERTY: header-args:matlab+ :results none #+PROPERTY: header-args:matlab+ :eval no-export @@ -1717,58 +1717,6 @@ ga = -mean(abs(enc_frf(f>10 & f<20)))./dcgain(G_norm('de', 'u')); gs = -mean(abs(iff_frf(f>400 & f<500)))./(ga*abs(squeeze(freqresp(G_norm('Vs', 'u'), 1e3, 'Hz')))); #+end_src -To ensure that the sensitivities $g_a$ and $g_s$ are physically valid, it is possible to estimate them from the physical properties of the piezoelectric stack material. - -From [[cite:&fleming14_desig_model_contr_nanop_system p. 123]], the relation between relative displacement $d_L$ of the sensor stack and generated voltage $V_s$ is given by eqref:eq:test_apa_piezo_strain_to_voltage and from [[cite:&fleming10_integ_strain_force_feedb_high]] the relation between the force $F_a$ and the applied voltage $V_a$ is given by eqref:eq:test_apa_piezo_voltage_to_force. - -\begin{subequations} -\begin{align} - V_s &= \underbrace{\frac{d_{33}}{\epsilon^T s^D n}}_{g_s} d_L \label{eq:test_apa_piezo_strain_to_voltage} \\ - F_a &= \underbrace{d_{33} n k_a}_{g_a} \cdot V_a, \quad k_a = \frac{c^{E} A}{L} \label{eq:test_apa_piezo_voltage_to_force} -\end{align} -\end{subequations} - -Unfortunately, the manufacturer of the stack was not willing to share the piezoelectric material properties of the stack used in the APA300ML. -However, based on the available properties of the APA300ML stacks in the data-sheet, the soft Lead Zirconate Titanate "THP5H" from Thorlabs seemed to match quite well the observed properties. -The properties of this "THP5H" material used to compute $g_a$ and $g_s$ are listed in Table ref:tab:test_apa_piezo_properties. - -From these parameters, $g_s = 5.1\,V/\mu m$ and $g_a = 26\,N/V$ were obtained, which are close to the constants identified using the experimentally identified transfer functions. - -#+name: tab:test_apa_piezo_properties -#+caption: Piezoelectric properties used for the estimation of the sensor and actuators sensitivities -#+attr_latex: :environment tabularx :width 1\linewidth :align ccX -#+attr_latex: :center t :booktabs t -| *Parameter* | *Value* | *Description* | -|----------------+----------------------------+--------------------------------------------------------------| -| $d_{33}$ | $680 \cdot 10^{-12}\,m/V$ | Piezoelectric constant | -| $\epsilon^{T}$ | $4.0 \cdot 10^{-8}\,F/m$ | Permittivity under constant stress | -| $s^{D}$ | $21 \cdot 10^{-12}\,m^2/N$ | Elastic compliance understand constant electric displacement | -| $c^{E}$ | $48 \cdot 10^{9}\,N/m^2$ | Young's modulus of elasticity | -| $L$ | $20\,mm$ per stack | Length of the stack | -| $A$ | $10^{-4}\,m^2$ | Area of the piezoelectric stack | -| $n$ | $160$ per stack | Number of layers in the piezoelectric stack | - -#+begin_src matlab -%% Estimate "Sensor Constant" - (THP5H) -d33 = 680e-12; % Strain constant [m/V] -n = 160; % Number of layers per stack -eT = 4500*8.854e-12; % Permittivity under constant stress [F/m] -sD = 21e-12; % Compliance under constant electric displacement [m2/N] - -gs_th = d33/(eT*sD*n); % Sensor Constant [V/m] - -%% Estimate "Actuator Constant" - (THP5H) -d33 = 680e-12; % Strain constant [m/V] -n = 320; % Number of layers - -cE = 1/sD; % Youngs modulus [N/m^2] -A = (10e-3)^2; % Area of the stacks [m^2] -L = 40e-3; % Length of the two stacks [m] -ka = cE*A/L; % Stiffness of the two stacks [N/m] - -ga_th = d33*n*ka; % Actuator Constant [N/V] -#+end_src - **** Comparison of the obtained dynamics The obtained dynamics using the /super element/ with the tuned "sensor sensitivity" and "actuator sensitivity" are compared with the experimentally identified frequency response functions in Figure ref:fig:test_apa_super_element_comp_frf.