diff --git a/figs/apa95ml_5kg_PI_coh.pdf b/figs/apa95ml_5kg_PI_coh.pdf index 53e8ff1..4610359 100644 Binary files a/figs/apa95ml_5kg_PI_coh.pdf and b/figs/apa95ml_5kg_PI_coh.pdf differ diff --git a/figs/apa95ml_5kg_PI_coh.png b/figs/apa95ml_5kg_PI_coh.png index 49f0b05..78401d7 100644 Binary files a/figs/apa95ml_5kg_PI_coh.png and b/figs/apa95ml_5kg_PI_coh.png differ diff --git a/figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf b/figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf index 9188194..13d8f3d 100644 Binary files a/figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf and b/figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf differ diff --git a/figs/apa95ml_5kg_PI_pdf_comp_huddle.png b/figs/apa95ml_5kg_PI_pdf_comp_huddle.png index 52993eb..7a3e494 100644 Binary files a/figs/apa95ml_5kg_PI_pdf_comp_huddle.png and b/figs/apa95ml_5kg_PI_pdf_comp_huddle.png differ diff --git a/figs/apa95ml_5kg_pi_comp_fem.pdf b/figs/apa95ml_5kg_pi_comp_fem.pdf index 8d5e752..adc911a 100644 Binary files a/figs/apa95ml_5kg_pi_comp_fem.pdf and b/figs/apa95ml_5kg_pi_comp_fem.pdf differ diff --git a/figs/apa95ml_5kg_pi_comp_fem.png b/figs/apa95ml_5kg_pi_comp_fem.png index 6d6ede1..3822d06 100644 Binary files a/figs/apa95ml_5kg_pi_comp_fem.png and b/figs/apa95ml_5kg_pi_comp_fem.png differ diff --git a/figs/bode_plot_force_sensor_voltage_comp_fem.pdf b/figs/bode_plot_force_sensor_voltage_comp_fem.pdf index a341b1e..cfee0dc 100644 Binary files a/figs/bode_plot_force_sensor_voltage_comp_fem.pdf and b/figs/bode_plot_force_sensor_voltage_comp_fem.pdf differ diff --git a/figs/bode_plot_force_sensor_voltage_comp_fem.png b/figs/bode_plot_force_sensor_voltage_comp_fem.png index a6dea3c..06729ea 100644 Binary files a/figs/bode_plot_force_sensor_voltage_comp_fem.png and b/figs/bode_plot_force_sensor_voltage_comp_fem.png differ diff --git a/figs/dynamics_act_disp_comp_mass.pdf b/figs/dynamics_act_disp_comp_mass.pdf new file mode 100644 index 0000000..f0222c3 Binary files /dev/null and b/figs/dynamics_act_disp_comp_mass.pdf differ diff --git a/figs/dynamics_act_disp_comp_mass.png b/figs/dynamics_act_disp_comp_mass.png new file mode 100644 index 0000000..6639efa Binary files /dev/null and b/figs/dynamics_act_disp_comp_mass.png differ diff --git a/figs/dynamics_force_force_sensor_comp_mass.pdf b/figs/dynamics_force_force_sensor_comp_mass.pdf new file mode 100644 index 0000000..f0b9014 Binary files /dev/null and b/figs/dynamics_force_force_sensor_comp_mass.pdf differ diff --git a/figs/dynamics_force_force_sensor_comp_mass.png b/figs/dynamics_force_force_sensor_comp_mass.png new file mode 100644 index 0000000..9a60c15 Binary files /dev/null and b/figs/dynamics_force_force_sensor_comp_mass.png differ diff --git a/figs/iff_first_test_bode_plot.pdf b/figs/iff_first_test_bode_plot.pdf index 109770a..55a1dc0 100644 Binary files a/figs/iff_first_test_bode_plot.pdf and b/figs/iff_first_test_bode_plot.pdf differ diff --git a/figs/iff_first_test_bode_plot.png b/figs/iff_first_test_bode_plot.png index 07e6a89..e32dc01 100644 Binary files a/figs/iff_first_test_bode_plot.png and b/figs/iff_first_test_bode_plot.png differ diff --git a/figs/iff_plant_identification_apa95ml.pdf b/figs/iff_plant_identification_apa95ml.pdf index 6618381..b945999 100644 Binary files a/figs/iff_plant_identification_apa95ml.pdf and b/figs/iff_plant_identification_apa95ml.pdf differ diff --git a/figs/iff_plant_identification_apa95ml.png b/figs/iff_plant_identification_apa95ml.png index 769fc74..8d004f2 100644 Binary files a/figs/iff_plant_identification_apa95ml.png and b/figs/iff_plant_identification_apa95ml.png differ diff --git a/figs/iff_results_bode_plots.pdf b/figs/iff_results_bode_plots.pdf index 0ccf0f5..2e24c72 100644 Binary files a/figs/iff_results_bode_plots.pdf and b/figs/iff_results_bode_plots.pdf differ diff --git a/figs/iff_results_bode_plots.png b/figs/iff_results_bode_plots.png index 9ea9aaa..a61330b 100644 Binary files a/figs/iff_results_bode_plots.png and b/figs/iff_results_bode_plots.png differ diff --git a/figs/iff_results_bode_plots_identification.pdf b/figs/iff_results_bode_plots_identification.pdf index 5b3597c..4154123 100644 Binary files a/figs/iff_results_bode_plots_identification.pdf and b/figs/iff_results_bode_plots_identification.pdf differ diff --git a/figs/iff_results_bode_plots_identification.png b/figs/iff_results_bode_plots_identification.png index 99f8655..dcb0aff 100644 Binary files a/figs/iff_results_bode_plots_identification.png and b/figs/iff_results_bode_plots_identification.png differ diff --git a/figs/test_bench_apa_schematic.pdf b/figs/test_bench_apa_schematic.pdf new file mode 100644 index 0000000..4ea5f7d Binary files /dev/null and b/figs/test_bench_apa_schematic.pdf differ diff --git a/figs/test_bench_apa_schematic.png b/figs/test_bench_apa_schematic.png new file mode 100644 index 0000000..d2740fd Binary files /dev/null and b/figs/test_bench_apa_schematic.png differ diff --git a/figs/test_bench_apa_schematic.svg b/figs/test_bench_apa_schematic.svg new file mode 100644 index 0000000..e9f2942 --- /dev/null +++ b/figs/test_bench_apa_schematic.svg @@ -0,0 +1,4055 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figs/test_bench_apa_schematic_iff.pdf b/figs/test_bench_apa_schematic_iff.pdf new file mode 100644 index 0000000..441913e Binary files /dev/null and b/figs/test_bench_apa_schematic_iff.pdf differ diff --git a/figs/test_bench_apa_schematic_iff.png b/figs/test_bench_apa_schematic_iff.png new file mode 100644 index 0000000..542941b Binary files /dev/null and b/figs/test_bench_apa_schematic_iff.png differ diff --git a/figs/test_bench_apa_schematic_iff.svg b/figs/test_bench_apa_schematic_iff.svg new file mode 100644 index 0000000..f6cdfe9 --- /dev/null +++ b/figs/test_bench_apa_schematic_iff.svg @@ -0,0 +1,4299 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html index a28cdfd..62d027b 100644 --- a/index.html +++ b/index.html @@ -3,13 +3,21 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + -Test Bench APA95ML +Test Bench - Amplified Piezoelectric Actuator + +
@@ -17,77 +25,1072 @@ | HOME
-

Test Bench APA95ML

+

Test Bench - Amplified Piezoelectric Actuator

Table of Contents

+ -
-

setup_picture.png -

-

Figure 1: Picture of the Setup

-
- - -
-

setup_zoom.png -

-

Figure 2: Zoom on the APA

-
- -
-

1 Huddle Test

+
+

1 Experimental Setup

- + +

+ +

+A schematic of the test-bench is shown in Figure 1. +

+ +

+A mass can be vertically moved using the amplified piezoelectric actuator (APA95ML). +The displacement of the mass (relative to the mechanical frame) is measured by the interferometer. +

+ +

+The APA95ML has three stacks that can be used as actuator or as sensors. +

+ +

+Pictures of the test bench are shown in Figure 2 and 3. +

+ + +
+

test_bench_apa_schematic.png +

+

Figure 1: Schematic of the Setup

+
+ + +
+

setup_picture.png +

+

Figure 2: Picture of the Setup

+
+ + +
+

setup_zoom.png +

+

Figure 3: Zoom on the APA

+
+ +
+

+Here are the equipment used in the test bench: +

+
    +
  • Attocube interferometer (doc)
  • +
  • Cedrat Amplified Piezoelectric Actuator APA95ML (doc)
  • +
  • Voltage Amplifier LA75B (doc)
  • +
  • Speedgoat IO131 with 16bits ADC and DAC (doc)
  • +
  • Low Noise Voltage Preamplifier from Ametek (doc)
  • +
+ +
+
+
+ +
+

2 Simscape model of the test-bench

+
+

+ +

+

+The idea here is to model the test-bench using Simscape. +

+ +

+Whereas the suspended mass and metrology frame can be considered as rigid bodies in the frequency range of interest, the Amplified Piezoelectric Actuator (APA) is flexible. +

+ +

+To model the APA, a Finite Element Model (FEM) is used and imported into Simscape.

-
-

1.1 Time Domain Data

-
+
+

2.1 Import Mass Matrix, Stiffness Matrix, and Interface Nodes Coordinates

+
+

+We first extract the stiffness and mass matrices. +

+
+
K = extractMatrix('APA95ML_K.txt');
+M = extractMatrix('APA95ML_M.txt');
+
+
-
+ + + +++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1: First 10x10 elements of the Stiffness matrix
300000000.0-30000.08000.0-200.0-30.0-60000.020000000.0-4000.0500.08
-30000.0100000000.0400.030.0200.0-14000.0-8000000.0800.07
8000.0400.050000000.0-800000.0-300.0-40.0300.0100.05000000.040000.0
-200.030.0-800000.020000.051-10.0-2-40000.0-300.0
-30.0200.0-300.0540000.00.3-4-10.040.00.4
-60000.0-1-40.010.33000.07000.00.8-10.0003
20000000.04000.0300.0-10.0-47000.0300000000.020000.03000.080.0
-4000.0-8000000.0100.0-2-10.00.820000.0100000000.0-4000.0-100.0
500.0800.05000000.0-40000.040.0-13000.0-4000.050000000.0800000.0
8740000.0-300.00.40.000380.0-100.0800000.020000.0
+ + + + + +++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2: First 10x10 elements of the Mass matrix
0.032e-06-2e-071e-082e-080.0002-0.0012e-07-8e-08-9e-10
2e-060.02-5e-077e-093e-082e-08-3e-070.0003-1e-081e-10
-2e-07-5e-070.02-9e-054e-09-1e-082e-07-2e-08-0.0006-5e-06
1e-087e-09-9e-051e-066e-114e-10-1e-093e-115e-063e-08
2e-083e-084e-096e-111e-062e-10-2e-092e-10-7e-09-4e-11
0.00022e-08-1e-084e-102e-102e-06-2e-06-1e-09-7e-10-9e-12
-0.001-3e-072e-07-1e-09-2e-09-2e-060.03-2e-06-1e-07-5e-09
2e-070.0003-2e-083e-112e-10-1e-09-2e-060.02-8e-07-1e-08
-8e-08-1e-08-0.00065e-06-7e-09-7e-10-1e-07-8e-070.029e-05
-9e-101e-10-5e-063e-08-4e-11-9e-12-5e-09-1e-089e-051e-06
+ + +

+Then, we extract the coordinates of the interface nodes. +

+
+
[int_xyz, int_i, n_xyz, n_i, nodes] = extractNodes('APA95ML_out_nodes_3D.txt');
+
+
+ + + + +++ ++ + + + + + + + + + + + + + + + + + + + + + +
Total number of Nodes168959
Number of interface Nodes13
Number of Modes30
Size of M and K matrices108
+ + + + +++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3: Coordinates of the interface nodes
Node iNode Numberx [m]y [m]z [m]
1.0168947.00.00.030.0
2.0168949.00.0-0.030.0
3.0168950.0-0.0350.00.0
4.0168951.0-0.0280.00.0
5.0168952.0-0.0210.00.0
6.0168953.0-0.0140.00.0
7.0168954.0-0.0070.00.0
8.0168955.00.00.00.0
9.0168956.00.0070.00.0
10.0168957.00.0140.00.0
11.0168958.00.0210.00.0
12.0168959.00.0350.00.0
13.0168960.00.0280.00.0
+ +

+Using K, M and int_xyz, we can use the Reduced Order Flexible Solid simscape block. +

+
+
+ +
+

2.2 Piezoelectric parameters

+
+

+In order to make the conversion from applied voltage to generated force or from the strain to the generated voltage, we need to defined some parameters corresponding to the piezoelectric material: +

+
+
d33 = 300e-12; % Strain constant [m/V]
+n   = 80;      % Number of layers per stack
+eT  = 1.6e-8;  % Permittivity under constant stress [F/m]
+sD  = 1e-11;   % Compliance under constant electric displacement [m2/N]
+ka  = 235e6;   % Stack stiffness [N/m]
+C   = 5e-6;    % Stack capactiance [F]
+
+
+ +

+The ratio of the developed force to applied voltage is: +

+\begin{equation} +\label{org1eea105} + F_a = g_a V_a, \quad g_a = d_{33} n k_a +\end{equation} +

+where: +

+
    +
  • \(F_a\): developed force in [N]
  • +
  • \(n\): number of layers of the actuator stack
  • +
  • \(d_{33}\): strain constant in [m/V]
  • +
  • \(k_a\): actuator stack stiffness in [N/m]
  • +
  • \(V_a\): applied voltage in [V]
  • +
+ +

+If we take the numerical values, we obtain: +

+
+
d33*n*ka % [N/V]
+
+
+ +
+5.64
+
+ + +

+From (Fleming and Leang 2014) (page 123), the relation between relative displacement of the sensor stack and generated voltage is: +

+\begin{equation} +\label{org7e93246} + V_s = \frac{d_{33}}{\epsilon^T s^D n} \Delta h +\end{equation} +

+where: +

+
    +
  • \(V_s\): measured voltage in [V]
  • +
  • \(d_{33}\): strain constant in [m/V]
  • +
  • \(\epsilon^T\): permittivity under constant stress in [F/m]
  • +
  • \(s^D\): elastic compliance under constant electric displacement in [m^2/N]
  • +
  • \(n\): number of layers of the sensor stack
  • +
  • \(\Delta h\): relative displacement in [m]
  • +
+ +

+If we take the numerical values, we obtain: +

+
+
1e-6*d33/(eT*sD*n) % [V/um]
+
+
+ +
+23.438
+
+
+
+ +
+

2.3 Simscape Model

+
+

+The flexible element is imported using the Reduced Order Flexible Solid Simscape block. +

+ +

+To model the actuator, an Internal Force block is added between the nodes 3 and 12. +A Relative Motion Sensor block is added between the nodes 1 and 2 to measure the displacement and the amplified piezo. +

+ +
    +
  • [ ] Add schematic of the model with interface nodes
  • +
+ +

+One mass is fixed at one end of the piezo-electric stack actuator, the other end is fixed to the world frame. +

+
+
m = 5;
+
+
+
+
+ +
+

2.4 Dynamics from Actuator Voltage to Vertical Mass Displacement

+
+

+The identified dynamics is shown in Figure 4. +

+ +
+
%% Name of the Simulink File
+mdl = 'piezo_amplified_3d';
+
+%% Input/Output definition
+clear io; io_i = 1;
+io(io_i) = linio([mdl, '/Va'], 1, 'openinput');  io_i = io_i + 1; % Actuator Voltage [V]
+io(io_i) = linio([mdl, '/y'],  1, 'openoutput'); io_i = io_i + 1; % Vertical Displacement [m]
+
+Ghm = -linearize(mdl, io);
+
+
+ + +
+

dynamics_act_disp_comp_mass.png +

+

Figure 4: Dynamics from \(F\) to \(d\) without a payload and with a 5kg payload

+
+
+
+ +
+

2.5 Dynamics from Actuator Voltage to Force Sensor Voltage

+
+

+The obtained dynamics is shown in Figure 5. +

+ +
+
%% Name of the Simulink File
+mdl = 'piezo_amplified_3d';
+
+%% Input/Output definition
+clear io; io_i = 1;
+io(io_i) = linio([mdl, '/Va'], 1, 'openinput');  io_i = io_i + 1; % Voltage Actuator [V]
+io(io_i) = linio([mdl, '/Vs'], 1, 'openoutput'); io_i = io_i + 1; % Sensor Voltage [V]
+
+Gfm = linearize(mdl, io);
+
+
+ + +
+

dynamics_force_force_sensor_comp_mass.png +

+

Figure 5: Dynamics from \(F\) to \(F_m\) for \(m=0\) and \(m = 10kg\)

+
+
+
+ +
+

2.6 Save Data for further use

+
+
+
save('matlab/mat/fem_simscape_models.mat', 'Ghm', 'Gfm')
+
+
+ +
+
save('mat/fem_simscape_models.mat', 'Ghm', 'Gfm')
+
+
+
+
+
+ +
+

3 Estimation of piezoelectric parameters

+
+
+
+

3.1 From actuator voltage to vertical displacement

+
+

+The data from the “noise test” and the identification test are loaded. +

+
+
load('apa95ml_5kg_Amp_E505.mat', 't', 'um', 'y');
+
+
+ +

+Any offset value is removed: +

+
+
um = detrend(um, 0); % Amplifier Input Voltage [V]
+y  = detrend(y , 0); % Mass displacement [m]
+
+
+ +

+Now we add a factor 10 to take into account the gain of the voltage amplifier. +

+
+
um = 10*um; % Stack Actuator Input Voltage [V]
+
+
+ +
+
Ts = t(end)/(length(t)-1);
+Fs = 1/Ts;
+
+win = hanning(ceil(1*Fs));
+
+
+ +
+
[tf_est, f] = tfestimate(um, y, win, [], [], 1/Ts);
+
+
+ +

+The gain from input voltage of the stack to the vertical displacement is determined: +

+
+
gD = 4e-7; % [m/V]
+
+
+ +
+
K = extractMatrix('APA95ML_K.txt');
+M = extractMatrix('APA95ML_M.txt');
+[int_xyz, int_i, n_xyz, n_i, nodes] = extractNodes('APA95ML_out_nodes_3D.txt');
+
+
+ +

+Define parameters just for the simulation. Should not change any results +

+
+
d33 = 1; % Strain constant [m/V]
+n   = 1; % Number of layers per stack
+eT  = 1; % Permittivity under constant stress [F/m]
+sD  = 1; % Compliance under constant electric displacement [m2/N]
+ka  = 1; % Stack stiffness [N/m]
+C   = 1; % Stack capactiance [F]
+
+
+ +
+
m = 5;
+
+%% Name of the Simulink File
+mdl = 'piezo_amplified_3d';
+
+%% Input/Output definition
+clear io; io_i = 1;
+io(io_i) = linio([mdl, '/Fa'], 1, 'openinput');  io_i = io_i + 1; % Actuator Force [N]
+io(io_i) = linio([mdl, '/y'],  1, 'openoutput'); io_i = io_i + 1; % Vertical Displacement [m]
+
+Gd = linearize(mdl, io);
+
+
+ +
+
gF = abs(dcgain(Gd)); % [m/N]
+ans = gF
+
+
+ +
+6.1695e-09
+
+ + +

+\[ g_a = g_D/g_F \] +in [N/V] +

+
+
ga = gD/gF
+ans = ga
+
+
+ +
+64.835
+
+ + +
+
na = 2; ns = 1; d33 = 300e-12; n = 80; ka = 235e6; gL = 1.7;
+na/(na+ns)*gL*d33*n*ka
+
+
+ +
+6.392
+
+ + +
    +
  • [ ] Why is there a factor 10 with the “theoretical estimation?”
  • +
+
+
+ +
+

3.2 From actuator voltage to sensor Voltage

+
+
+
load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'v');
+
+
+ +
+
u = detrend(u, 0); % Input Voltage of the Amplifier [V]
+v = detrend(v, 0); % Voltage accross the stack sensor [V]
+
+
+ +
+
u = 20*u; % Input Voltage of the Amplifier [V]
+
+
+ +
+
Ts = t(end)/(length(t)-1);
+Fs = 1/Ts;
+
+win = hann(ceil(10/Ts));
+
+[tf_est, f] = tfestimate(u, v, win, [], [], 1/Ts);
+
+
+ +
+
gV = 0.022; % [V/V]
+
+
+ +
+
m = 5;
+
+%% Name of the Simulink File
+mdl = 'piezo_amplified_3d';
+
+%% Input/Output definition
+clear io; io_i = 1;
+io(io_i) = linio([mdl, '/Fa'], 1, 'openinput');  io_i = io_i + 1; % Actuator Force [N]
+io(io_i) = linio([mdl, '/dL'], 1, 'openoutput'); io_i = io_i + 1; % Sensor Stack displacement [m]
+
+Gf = linearize(mdl, io);
+
+
+ +

+\(g_F\) in [m/N] +

+
+
gF = abs(dcgain(Gf));
+ans = gF
+
+
+ +
+2.1546e-10
+
+ + +

+Finally, we compute the gain from strain of the sensor stack to its generated voltage: +\[ g_S = \frac{g_V}{g_F g_a} \] +Gs in [V/m] +

+
+
gS = gV/gF/ga;
+ans = gS
+
+
+ +
+15749000.0
+
+ + +
+
d33 = 300e-12; eT = 5.3e-9; sD = 2e-11; n = 80;
+d33/(eT*sD*n)
+
+
+ +
+35377000.0
+
+
+
+
+ +
+

4 Huddle Test

+
+

+ +

+
+
+

4.1 Time Domain Data

+
+ +

huddle_test_time_domain.png

-

Figure 3: Measurement of the Mass displacement during Huddle Test

+

Figure 6: Measurement of the Mass displacement during Huddle Test

-
-

1.2 PSD of Measurement Noise

-
+
+

4.2 PSD of Measurement Noise

+
Ts = t(end)/(length(t)-1);
 Fs = 1/Ts;
@@ -102,46 +1105,69 @@ win = hanning(ceil(1*Fs));
 
-
+

huddle_test_pdf.png

-

Figure 4: Amplitude Spectral Density of the Displacement during Huddle Test

+

Figure 7: Amplitude Spectral Density of the Displacement during Huddle Test

-
-

2 Identification of the dynamics from actuator to displacement

-
+
+

5 Identification of the dynamics from actuator to displacement

+

- + +

+
    +
  • [ ] List of equipment
  • +
  • [ ] Schematic
  • +
  • [ ] Problem of matching between the models? (there is a factor 10)
  • +
+ +

+E505 with gain of 10.

-
-

2.1 Load Data

-
+
+

5.1 Load Data

+
+

+The data from the “noise test” and the identification test are loaded. +

ht = load('huddle_test.mat', 't', 'u', 'y');
-load('apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y');
+load('apa95ml_5kg_Amp_E505.mat', 't', 'um', 'y');
 
+

+Any offset value is removed: +

-
u  = 10*(u  - mean(u)); % Input Voltage of Piezo [V]
-um = 10*(um - mean(um)); % Monitor [V]
-y  = y  - mean(y); % Mass displacement [m]
+
um = detrend(um, 0); % Input Voltage [V]
+y  = detrend(y , 0); % Mass displacement [m]
 
-ht.u  = 10*(ht.u  - mean(ht.u));
-ht.y  = ht.y  - mean(ht.y);
+ht.u  = detrend(ht.u, 0);
+ht.y  = detrend(ht.y, 0);
+
+
+ +

+Now we add a factor 10 to take into account the gain of the voltage amplifier. +

+
+
um   = 10*um;
+ht.u = 10*ht.u;
 
-
-

2.2 Comparison of the PSD with Huddle Test

-
+
+

5.2 Comparison of the PSD with Huddle Test

+
Ts = t(end)/(length(t)-1);
 Fs = 1/Ts;
@@ -157,71 +1183,53 @@ win = hanning(ceil(1*Fs));
 
-
+

apa95ml_5kg_PI_pdf_comp_huddle.png

-

Figure 5: Comparison of the ASD for the identification test and the huddle test

+

Figure 8: Comparison of the ASD for the identification test and the huddle test

-
-

2.3 Compute TF estimate and Coherence

-
+
+

5.3 Compute TF estimate and Coherence

+
-
Ts = t(end)/(length(t)-1);
-Fs = 1/Ts;
-
-
- -
-
win = hann(ceil(1/Ts));
-
-[tf_est, f] = tfestimate(u,  -y, win, [], [], 1/Ts);
-[tf_um , ~] = tfestimate(um, -y, win, [], [], 1/Ts);
+
[tf_est, f] = tfestimate(um, -y, win, [], [], 1/Ts);
 [co_est, ~] = mscohere(  um, -y, win, [], [], 1/Ts);
 
-
+

apa95ml_5kg_PI_coh.png

-

Figure 6: Coherence

+

Figure 9: Coherence

- -
-

apa95ml_5kg_PI_tf.png +

+Comparison with the FEM model

-

Figure 7: Estimation of the transfer function from input voltage to displacement

-
-
-
- -
-

2.4 Comparison with the FEM model

-
-
load('fem_model_5kg.mat', 'G');
+
load('mat/fem_simscape_models.mat', 'Ghm');
 
-
+

apa95ml_5kg_pi_comp_fem.png

-

Figure 8: Comparison of the identified transfer function and the one estimated from the FE model

+

Figure 10: Comparison of the identified transfer function and the one estimated from the FE model

-
-

3 Identification of the dynamics from actuator to force sensor

-
+
+

6 Identification of the dynamics from actuator to force sensor

+

- +

Two measurements are performed: @@ -238,9 +1246,18 @@ The obtained dynamics from force actuator to force sensor are compare with the F The data are loaded:

-
a_ss = load('apa95ml_5kg_1a_2s.mat', 't', 'u', 'y', 'v');
-aa_s = load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'y', 'v');
-load('G_force_sensor_5kg.mat', 'G');
+
load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'v');
+
+
+ +
+
u = detrend(u, 0);
+v = detrend(v, 0);
+
+
+ +
+
u = 20*u;
 

@@ -267,81 +1284,97 @@ From the FEM, we construct the transfer function from DAC voltage to ADC voltage Gfem_a_ss = exp(-s/1e4)*20*( d33*n*ka)*(G(3,1)+G(2,1))*d33/(eT*sD*n);

-

-The transfer function from input voltage to output voltage are computed and shown in Figure 9. -

+
-
Ts = a_ss.t(end)/(length(a_ss.t)-1);
+
Gfem_aa_s = exp(-s/1e4)*20*(2*d33*n*ka)*Gfm*d33/(eT*sD*n);
+Gfem_a_ss = exp(-s/1e4)*20*(  d33*n*ka)*Gfm*d33/(eT*sD*n);
+
+
+

+The transfer function from input voltage to output voltage are computed and shown in Figure 11. +

+ +
+
Ts = t(end)/(length(t)-1);
 Fs = 1/Ts;
 
 win = hann(ceil(10/Ts));
 
-[tf_a_ss,  f] = tfestimate(a_ss.u, a_ss.v, win, [], [], 1/Ts);
-[coh_a_ss, ~] = mscohere(  a_ss.u, a_ss.v, win, [], [], 1/Ts);
+[tf_est,  f] = tfestimate(u, v, win, [], [], 1/Ts);
+[coh,     ~] = mscohere(  u, v, win, [], [], 1/Ts);
+
+
-[tf_aa_s, f] = tfestimate(aa_s.u, aa_s.v, win, [], [], 1/Ts); -[coh_aa_s, ~] = mscohere( aa_s.u, aa_s.v, win, [], [], 1/Ts); +
+
load('mat/fem_simscape_models.mat', 'Gfm');
 
-
+

bode_plot_force_sensor_voltage_comp_fem.png

-

Figure 9: Comparison of the identified dynamics from voltage output to voltage input and the FEM

+

Figure 11: Comparison of the identified dynamics from voltage output to voltage input and the FEM

-
-

3.1 System Identification

-
+
+

6.1 System Identification

+
w_z = 2*pi*111; % Zeros frequency [rad/s]
 w_p = 2*pi*255; % Pole frequency [rad/s]
 xi_z = 0.05;
 xi_p = 0.015;
-G_inf = 2;
+G_inf = 0.1;
 
 Gi = G_inf*(s^2 - 2*xi_z*w_z*s + w_z^2)/(s^2 + 2*xi_p*w_p*s + w_p^2);
 
-
+

iff_plant_identification_apa95ml.png

-

Figure 10: Identification of the IFF plant

+

Figure 12: Identification of the IFF plant

-
-

3.2 Integral Force Feedback

-
+
+

6.2 Integral Force Feedback

+
-
+

root_locus_iff_apa95ml_identification.png

-

Figure 11: Root Locus for IFF

+

Figure 13: Root Locus for IFF

-
-

4 Integral Force Feedback

-
+
+

7 Integral Force Feedback

+

- +

+ +
+

test_bench_apa_schematic_iff.png +

+

Figure 14: Schematic of the test bench using IFF

-
-

4.1 First tests with few gains

-
+
+ +
+

7.1 First tests with few gains

+
-
iff_g10 = load('apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v');
+
iff_g10  = load('apa95ml_iff_g10_res.mat',  'u', 't', 'y', 'v');
 iff_g100 = load('apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v');
-iff_of = load('apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v');
+iff_of   = load('apa95ml_iff_off_res.mat',  'u', 't', 'y', 'v');
 
@@ -352,7 +1385,7 @@ win = hann(ceil(10/Ts)); [tf_iff_g10, f] = tfestimate(iff_g10.u, iff_g10.y, win, [], [], 1/Ts); [co_iff_g10, ~] = mscohere(iff_g10.u, iff_g10.y, win, [], [], 1/Ts); -[tf_iff_g100, f] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); +[tf_iff_g100, ~] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); [co_iff_g100, ~] = mscohere(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); [tf_iff_of, ~] = tfestimate(iff_of.u, iff_of.y, win, [], [], 1/Ts); @@ -361,25 +1394,25 @@ win = hann(ceil(10/Ts));
-
+

iff_first_test_coherence.png

-

Figure 12: Coherence

+

Figure 15: Coherence

-
+

iff_first_test_bode_plot.png

-

Figure 13: Bode plot for different values of IFF gain

+

Figure 16: Bode plot for different values of IFF gain

-
-

4.2 Second test with many Gains

-
+
+

7.2 Second test with many Gains

+
load('apa95ml_iff_test.mat', 'results');
 
@@ -407,7 +1440,7 @@ g_iff = [0, 1, 5, 10, 50, 100];
-
+

iff_results_bode_plots.png

@@ -429,23 +1462,28 @@ f_end = 500; % [Hz]
-
+

iff_results_bode_plots_identification.png

-
+

iff_results_root_locus.png

+ +

Bibliography

+
+
Fleming, Andrew J., and Kam K. Leang. 2014. Design, Modeling and Control of Nanopositioning Systems. Advances in Industrial Control. Springer International Publishing. https://doi.org/10.1007/978-3-319-06617-2.
+

Author: Dehaeze Thomas

-

Created: 2020-11-12 jeu. 09:50

+

Created: 2020-11-24 mar. 09:17

diff --git a/index.org b/index.org index 062b641..1c3670e 100644 --- a/index.org +++ b/index.org @@ -1,4 +1,4 @@ -#+TITLE: Test Bench APA95ML +#+TITLE: Test Bench - Amplified Piezoelectric Actuator :DRAWER: #+STARTUP: overview @@ -28,6 +28,28 @@ * Introduction :ignore: +- Section [[sec:experimental_setup]]: +- Section [[sec:simscape_model]]: +- Section [[]]: +- Section [[]]: +- Section [[]]: + +* Experimental Setup +<> + +A schematic of the test-bench is shown in Figure [[fig:test_bench_apa_schematic]]. + +A mass can be vertically moved using the amplified piezoelectric actuator (APA95ML). +The displacement of the mass (relative to the mechanical frame) is measured by the interferometer. + +The APA95ML has three stacks that can be used as actuator or as sensors. + +Pictures of the test bench are shown in Figure [[fig:setup_picture]] and [[fig:setup_zoom]]. + +#+name: fig:test_bench_apa_schematic +#+caption: Schematic of the Setup +[[file:figs/test_bench_apa_schematic.png]] + #+name: fig:setup_picture #+caption: Picture of the Setup [[file:figs/setup_picture.png]] @@ -36,6 +58,532 @@ #+caption: Zoom on the APA [[file:figs/setup_zoom.png]] +#+begin_note +Here are the equipment used in the test bench: +- Attocube interferometer ([[file:doc/IDS3010.pdf][doc]]) +- Cedrat Amplified Piezoelectric Actuator APA95ML ([[file:doc/APA95ML.pdf][doc]]) +- Voltage Amplifier LA75B ([[file:doc/LA75B.pdf][doc]]) +- Speedgoat IO131 with 16bits ADC and DAC ([[file:doc/IO130 IO131 OEM Datasheet.pdf][doc]]) +- Low Noise Voltage Preamplifier from Ametek ([[file:doc/model_5113.pdf][doc]]) +#+end_note + +* Simscape model of the test-bench +:PROPERTIES: +:header-args:matlab+: :tangle matlab/simscape_model.m +:header-args:matlab+: :comments org :mkdirp yes +:END: +<> +** Introduction :ignore: +The idea here is to model the test-bench using Simscape. + +Whereas the suspended mass and metrology frame can be considered as rigid bodies in the frequency range of interest, the Amplified Piezoelectric Actuator (APA) is flexible. + +To model the APA, a Finite Element Model (FEM) is used and imported into Simscape. + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) + <> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes + <> +#+end_src + +#+begin_src matlab :tangle no + addpath('./matlab/mat/'); + addpath('./matlab/'); +#+end_src + +#+begin_src matlab :eval no + addpath('./mat/'); +#+end_src + +** Import Mass Matrix, Stiffness Matrix, and Interface Nodes Coordinates +We first extract the stiffness and mass matrices. +#+begin_src matlab + K = extractMatrix('APA95ML_K.txt'); + M = extractMatrix('APA95ML_M.txt'); +#+end_src + +#+begin_src matlab :exports results :results value table replace :tangle no + data2orgtable(K(1:10, 1:10), {}, {}, ' %.1g '); +#+end_src + +#+caption: First 10x10 elements of the Stiffness matrix +#+RESULTS: +| 300000000.0 | -30000.0 | 8000.0 | -200.0 | -30.0 | -60000.0 | 20000000.0 | -4000.0 | 500.0 | 8 | +| -30000.0 | 100000000.0 | 400.0 | 30.0 | 200.0 | -1 | 4000.0 | -8000000.0 | 800.0 | 7 | +| 8000.0 | 400.0 | 50000000.0 | -800000.0 | -300.0 | -40.0 | 300.0 | 100.0 | 5000000.0 | 40000.0 | +| -200.0 | 30.0 | -800000.0 | 20000.0 | 5 | 1 | -10.0 | -2 | -40000.0 | -300.0 | +| -30.0 | 200.0 | -300.0 | 5 | 40000.0 | 0.3 | -4 | -10.0 | 40.0 | 0.4 | +| -60000.0 | -1 | -40.0 | 1 | 0.3 | 3000.0 | 7000.0 | 0.8 | -1 | 0.0003 | +| 20000000.0 | 4000.0 | 300.0 | -10.0 | -4 | 7000.0 | 300000000.0 | 20000.0 | 3000.0 | 80.0 | +| -4000.0 | -8000000.0 | 100.0 | -2 | -10.0 | 0.8 | 20000.0 | 100000000.0 | -4000.0 | -100.0 | +| 500.0 | 800.0 | 5000000.0 | -40000.0 | 40.0 | -1 | 3000.0 | -4000.0 | 50000000.0 | 800000.0 | +| 8 | 7 | 40000.0 | -300.0 | 0.4 | 0.0003 | 80.0 | -100.0 | 800000.0 | 20000.0 | + + +#+begin_src matlab :exports results :results value table replace :tangle no + data2orgtable(M(1:10, 1:10), {}, {}, ' %.1g '); +#+end_src + +#+caption: First 10x10 elements of the Mass matrix +#+RESULTS: +| 0.03 | 2e-06 | -2e-07 | 1e-08 | 2e-08 | 0.0002 | -0.001 | 2e-07 | -8e-08 | -9e-10 | +| 2e-06 | 0.02 | -5e-07 | 7e-09 | 3e-08 | 2e-08 | -3e-07 | 0.0003 | -1e-08 | 1e-10 | +| -2e-07 | -5e-07 | 0.02 | -9e-05 | 4e-09 | -1e-08 | 2e-07 | -2e-08 | -0.0006 | -5e-06 | +| 1e-08 | 7e-09 | -9e-05 | 1e-06 | 6e-11 | 4e-10 | -1e-09 | 3e-11 | 5e-06 | 3e-08 | +| 2e-08 | 3e-08 | 4e-09 | 6e-11 | 1e-06 | 2e-10 | -2e-09 | 2e-10 | -7e-09 | -4e-11 | +| 0.0002 | 2e-08 | -1e-08 | 4e-10 | 2e-10 | 2e-06 | -2e-06 | -1e-09 | -7e-10 | -9e-12 | +| -0.001 | -3e-07 | 2e-07 | -1e-09 | -2e-09 | -2e-06 | 0.03 | -2e-06 | -1e-07 | -5e-09 | +| 2e-07 | 0.0003 | -2e-08 | 3e-11 | 2e-10 | -1e-09 | -2e-06 | 0.02 | -8e-07 | -1e-08 | +| -8e-08 | -1e-08 | -0.0006 | 5e-06 | -7e-09 | -7e-10 | -1e-07 | -8e-07 | 0.02 | 9e-05 | +| -9e-10 | 1e-10 | -5e-06 | 3e-08 | -4e-11 | -9e-12 | -5e-09 | -1e-08 | 9e-05 | 1e-06 | + + +Then, we extract the coordinates of the interface nodes. +#+begin_src matlab + [int_xyz, int_i, n_xyz, n_i, nodes] = extractNodes('APA95ML_out_nodes_3D.txt'); +#+end_src + +#+begin_src matlab :exports results :results value table replace :tangle no + data2orgtable([length(n_i); length(int_i); size(M,1) - 6*length(int_i); size(M,1)], {'Total number of Nodes', 'Number of interface Nodes', 'Number of Modes', 'Size of M and K matrices'}, {}, ' %.0f '); +#+end_src + +#+RESULTS: +| Total number of Nodes | 168959 | +| Number of interface Nodes | 13 | +| Number of Modes | 30 | +| Size of M and K matrices | 108 | + +#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) + data2orgtable([[1:length(int_i)]', int_i, int_xyz], {}, {'Node i', 'Node Number', 'x [m]', 'y [m]', 'z [m]'}, ' %f '); +#+end_src + +#+caption: Coordinates of the interface nodes +#+RESULTS: +| Node i | Node Number | x [m] | y [m] | z [m] | +|--------+-------------+--------+-------+-------| +| 1.0 | 168947.0 | 0.0 | 0.03 | 0.0 | +| 2.0 | 168949.0 | 0.0 | -0.03 | 0.0 | +| 3.0 | 168950.0 | -0.035 | 0.0 | 0.0 | +| 4.0 | 168951.0 | -0.028 | 0.0 | 0.0 | +| 5.0 | 168952.0 | -0.021 | 0.0 | 0.0 | +| 6.0 | 168953.0 | -0.014 | 0.0 | 0.0 | +| 7.0 | 168954.0 | -0.007 | 0.0 | 0.0 | +| 8.0 | 168955.0 | 0.0 | 0.0 | 0.0 | +| 9.0 | 168956.0 | 0.007 | 0.0 | 0.0 | +| 10.0 | 168957.0 | 0.014 | 0.0 | 0.0 | +| 11.0 | 168958.0 | 0.021 | 0.0 | 0.0 | +| 12.0 | 168959.0 | 0.035 | 0.0 | 0.0 | +| 13.0 | 168960.0 | 0.028 | 0.0 | 0.0 | + +Using =K=, =M= and =int_xyz=, we can use the =Reduced Order Flexible Solid= simscape block. + +** Piezoelectric parameters +In order to make the conversion from applied voltage to generated force or from the strain to the generated voltage, we need to defined some parameters corresponding to the piezoelectric material: +#+begin_src matlab + d33 = 300e-12; % Strain constant [m/V] + n = 80; % Number of layers per stack + eT = 1.6e-8; % Permittivity under constant stress [F/m] + sD = 1e-11; % Compliance under constant electric displacement [m2/N] + ka = 235e6; % Stack stiffness [N/m] + C = 5e-6; % Stack capactiance [F] +#+end_src + +The ratio of the developed force to applied voltage is: +#+name: eq:piezo_voltage_to_force +\begin{equation} + F_a = g_a V_a, \quad g_a = d_{33} n k_a +\end{equation} +where: +- $F_a$: developed force in [N] +- $n$: number of layers of the actuator stack +- $d_{33}$: strain constant in [m/V] +- $k_a$: actuator stack stiffness in [N/m] +- $V_a$: applied voltage in [V] + +If we take the numerical values, we obtain: +#+begin_src matlab :results replace value + d33*n*ka % [N/V] +#+end_src + +#+RESULTS: +: 5.64 + +From cite:fleming14_desig_model_contr_nanop_system (page 123), the relation between relative displacement of the sensor stack and generated voltage is: +#+name: eq:piezo_strain_to_voltage +\begin{equation} + V_s = \frac{d_{33}}{\epsilon^T s^D n} \Delta h +\end{equation} +where: +- $V_s$: measured voltage in [V] +- $d_{33}$: strain constant in [m/V] +- $\epsilon^T$: permittivity under constant stress in [F/m] +- $s^D$: elastic compliance under constant electric displacement in [m^2/N] +- $n$: number of layers of the sensor stack +- $\Delta h$: relative displacement in [m] + +If we take the numerical values, we obtain: +#+begin_src matlab :results replace value + 1e-6*d33/(eT*sD*n) % [V/um] +#+end_src + +#+RESULTS: +: 23.438 + +** Simscape Model +The flexible element is imported using the =Reduced Order Flexible Solid= Simscape block. + +To model the actuator, an =Internal Force= block is added between the nodes 3 and 12. +A =Relative Motion Sensor= block is added between the nodes 1 and 2 to measure the displacement and the amplified piezo. + +- [ ] Add schematic of the model with interface nodes + +One mass is fixed at one end of the piezo-electric stack actuator, the other end is fixed to the world frame. +#+begin_src matlab + m = 5; +#+end_src + +** Dynamics from Actuator Voltage to Vertical Mass Displacement +The identified dynamics is shown in Figure [[fig:dynamics_act_disp_comp_mass]]. + +#+begin_src matlab + %% Name of the Simulink File + mdl = 'piezo_amplified_3d'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Va'], 1, 'openinput'); io_i = io_i + 1; % Actuator Voltage [V] + io(io_i) = linio([mdl, '/y'], 1, 'openoutput'); io_i = io_i + 1; % Vertical Displacement [m] + + Ghm = -linearize(mdl, io); +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(0, 4, 5000); + + figure; + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2,1]); + hold on; + plot(freqs, abs(squeeze(freqresp(Ghm, freqs, 'Hz')))); + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); + hold off; + + ax2 = nexttile; + hold on; + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Ghm, freqs, 'Hz'))))); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + yticks(-360:90:360); + ylim([-360 0]); + xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); + hold off; + linkaxes([ax1,ax2],'x'); + xlim([freqs(1), freqs(end)]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace + exportFig('figs/dynamics_act_disp_comp_mass.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:dynamics_act_disp_comp_mass +#+caption: Dynamics from $F$ to $d$ without a payload and with a 5kg payload +#+RESULTS: +[[file:figs/dynamics_act_disp_comp_mass.png]] + +** Dynamics from Actuator Voltage to Force Sensor Voltage +The obtained dynamics is shown in Figure [[fig:dynamics_force_force_sensor_comp_mass]]. + +#+begin_src matlab + %% Name of the Simulink File + mdl = 'piezo_amplified_3d'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Va'], 1, 'openinput'); io_i = io_i + 1; % Voltage Actuator [V] + io(io_i) = linio([mdl, '/Vs'], 1, 'openoutput'); io_i = io_i + 1; % Sensor Voltage [V] + + Gfm = linearize(mdl, io); +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(1, 5, 1000); + + figure; + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2,1]); + hold on; + plot(freqs, abs(squeeze(freqresp(Gfm, freqs, 'Hz')))); + hold off; + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); + hold off; + + ax2 = nexttile; + hold on; + plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Gfm, freqs, 'Hz'))))); + set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin'); + yticks(-360:90:360); + ylim([-390 30]); + xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); + hold off; + linkaxes([ax1,ax2],'x'); + xlim([freqs(1), freqs(end)]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace + exportFig('figs/dynamics_force_force_sensor_comp_mass.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:dynamics_force_force_sensor_comp_mass +#+caption: Dynamics from $F$ to $F_m$ for $m=0$ and $m = 10kg$ +#+RESULTS: +[[file:figs/dynamics_force_force_sensor_comp_mass.png]] + +** Save Data for further use +#+begin_src matlab :tangle no + save('matlab/mat/fem_simscape_models.mat', 'Ghm', 'Gfm') +#+end_src + +#+begin_src matlab :eval no + save('mat/fem_simscape_models.mat', 'Ghm', 'Gfm') +#+end_src + +* TODO Estimation of piezoelectric parameters +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) + <> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes + <> +#+end_src + +#+begin_src matlab :tangle no + addpath('./matlab/mat/'); + addpath('./matlab/'); +#+end_src + +#+begin_src matlab :eval no + addpath('./mat/'); +#+end_src + +** From actuator voltage to vertical displacement +The data from the "noise test" and the identification test are loaded. +#+begin_src matlab + load('apa95ml_5kg_Amp_E505.mat', 't', 'um', 'y'); +#+end_src + +Any offset value is removed: +#+begin_src matlab + um = detrend(um, 0); % Amplifier Input Voltage [V] + y = detrend(y , 0); % Mass displacement [m] +#+end_src + +Now we add a factor 10 to take into account the gain of the voltage amplifier. +#+begin_src matlab + um = 10*um; % Stack Actuator Input Voltage [V] +#+end_src + +#+begin_src matlab + Ts = t(end)/(length(t)-1); + Fs = 1/Ts; + + win = hanning(ceil(1*Fs)); +#+end_src + +#+begin_src matlab + [tf_est, f] = tfestimate(um, y, win, [], [], 1/Ts); +#+end_src + +The gain from input voltage of the stack to the vertical displacement is determined: +#+begin_src matlab + gD = 4e-7; % [m/V] +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(0, 4, 1000); + + figure; + hold on; + plot(f, abs(tf_est)) + plot([f(2) f(end)], [gD gD]) + hold off; + set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); + ylabel('Amplitude [m/V]'); set(gca, 'XTickLabel', []); + xlim([10, 5e3]); +#+end_src + +#+begin_src matlab + K = extractMatrix('APA95ML_K.txt'); + M = extractMatrix('APA95ML_M.txt'); + [int_xyz, int_i, n_xyz, n_i, nodes] = extractNodes('APA95ML_out_nodes_3D.txt'); +#+end_src + +Define parameters just for the simulation. Should not change any results +#+begin_src matlab + d33 = 1; % Strain constant [m/V] + n = 1; % Number of layers per stack + eT = 1; % Permittivity under constant stress [F/m] + sD = 1; % Compliance under constant electric displacement [m2/N] + ka = 1; % Stack stiffness [N/m] + C = 1; % Stack capactiance [F] +#+end_src + +#+begin_src matlab + m = 5; + + %% Name of the Simulink File + mdl = 'piezo_amplified_3d'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Fa'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force [N] + io(io_i) = linio([mdl, '/y'], 1, 'openoutput'); io_i = io_i + 1; % Vertical Displacement [m] + + Gd = linearize(mdl, io); +#+end_src + +#+begin_src matlab :results value replace + gF = abs(dcgain(Gd)); % [m/N] + ans = gF +#+end_src + +#+RESULTS: +: 6.1695e-09 + +\[ g_a = g_D/g_F \] +in [N/V] +#+begin_src matlab :results value replace + ga = gD/gF + ans = ga +#+end_src + +#+RESULTS: +: 64.835 + +#+begin_src matlab :results value replace + na = 2; ns = 1; d33 = 300e-12; n = 80; ka = 235e6; gL = 1.7; + na/(na+ns)*gL*d33*n*ka +#+end_src + +#+RESULTS: +: 6.392 + +- [ ] Why is there a factor 10 with the "theoretical estimation?" + +#+begin_src matlab :exports none + freqs = logspace(1, 4, 1000); + + figure; + hold on; + plot(f, abs(tf_est)) + plot(f, ga*abs(squeeze(freqresp(Gd, f, 'Hz')))) + set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); + ylabel('Amplitude'); xlabel('Frequency [Hz]'); + hold off; +#+end_src + +** From actuator voltage to sensor Voltage +#+begin_src matlab + load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'v'); +#+end_src + +#+begin_src matlab + u = detrend(u, 0); % Input Voltage of the Amplifier [V] + v = detrend(v, 0); % Voltage accross the stack sensor [V] +#+end_src + +#+begin_src matlab + u = 20*u; % Input Voltage of the Amplifier [V] +#+end_src + +#+begin_src matlab + Ts = t(end)/(length(t)-1); + Fs = 1/Ts; + + win = hann(ceil(10/Ts)); + + [tf_est, f] = tfestimate(u, v, win, [], [], 1/Ts); +#+end_src + +#+begin_src matlab + gV = 0.022; % [V/V] +#+end_src + +#+begin_src matlab :exports none + freqs = logspace(1, 4, 1000); + + figure; + hold on; + plot(f, abs(tf_est)) + plot([f(2); f(end)], [gV; gV]) + hold off; + set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); + ylabel('Amplitude'); xlabel('Frequency [Hz]'); + ylim([1e-3, 1e1]); +#+end_src + +#+begin_src matlab + m = 5; + + %% Name of the Simulink File + mdl = 'piezo_amplified_3d'; + + %% Input/Output definition + clear io; io_i = 1; + io(io_i) = linio([mdl, '/Fa'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force [N] + io(io_i) = linio([mdl, '/dL'], 1, 'openoutput'); io_i = io_i + 1; % Sensor Stack displacement [m] + + Gf = linearize(mdl, io); +#+end_src + +$g_F$ in [m/N] +#+begin_src matlab :results value replace + gF = abs(dcgain(Gf)); + ans = gF +#+end_src + +#+RESULTS: +: 2.1546e-10 + +Finally, we compute the gain from strain of the sensor stack to its generated voltage: +\[ g_S = \frac{g_V}{g_F g_a} \] +Gs in [V/m] +#+begin_src matlab :results value replace + gS = gV/gF/ga; + ans = gS +#+end_src + +#+RESULTS: +: 15749000.0 + +#+begin_src matlab :results value replace + d33 = 300e-12; eT = 5.3e-9; sD = 2e-11; n = 80; + d33/(eT*sD*n) +#+end_src + +#+RESULTS: +: 35377000.0 + +#+begin_src matlab :exports none + freqs = logspace(1, 4, 1000); + + figure; + hold on; + plot(f, abs(tf_est)) + plot(f, ga*gS*abs(squeeze(freqresp(Gf, f, 'Hz')))) + set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); + ylabel('Amplitude'); xlabel('Frequency [Hz]'); + hold off; + ylim([1e-3, 1e1]); +#+end_src + * Huddle Test :PROPERTIES: :header-args:matlab+: :tangle matlab/huddle_test.m @@ -114,13 +662,20 @@ #+RESULTS: [[file:figs/huddle_test_pdf.png]] -* Identification of the dynamics from actuator to displacement +* TODO Identification of the dynamics from actuator to displacement :PROPERTIES: :header-args:matlab+: :tangle matlab/motion_identification.m :header-args:matlab+: :comments org :mkdirp yes :END: <> ** Introduction :ignore: + +- [ ] List of equipment +- [ ] Schematic +- [ ] Problem of matching between the models? (there is a factor 10) + +E505 with gain of 10. + ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -139,18 +694,25 @@ #+end_src ** Load Data +The data from the "noise test" and the identification test are loaded. #+begin_src matlab ht = load('huddle_test.mat', 't', 'u', 'y'); - load('apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y'); + load('apa95ml_5kg_Amp_E505.mat', 't', 'um', 'y'); #+end_src +Any offset value is removed: #+begin_src matlab - u = 10*(u - mean(u)); % Input Voltage of Piezo [V] - um = 10*(um - mean(um)); % Monitor [V] - y = y - mean(y); % Mass displacement [m] + um = detrend(um, 0); % Input Voltage [V] + y = detrend(y , 0); % Mass displacement [m] - ht.u = 10*(ht.u - mean(ht.u)); - ht.y = ht.y - mean(ht.y); + ht.u = detrend(ht.u, 0); + ht.y = detrend(ht.y, 0); +#+end_src + +Now we add a factor 10 to take into account the gain of the voltage amplifier. +#+begin_src matlab + um = 10*um; + ht.u = 10*ht.u; #+end_src ** Comparison of the PSD with Huddle Test @@ -174,12 +736,12 @@ hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]'); - legend('location', 'southwest'); + legend('location', 'northeast'); xlim([1, Fs/2]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'tall'); + exportFig('figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'normal'); #+end_src #+name: fig:apa95ml_5kg_PI_pdf_comp_huddle @@ -189,15 +751,7 @@ ** Compute TF estimate and Coherence #+begin_src matlab - Ts = t(end)/(length(t)-1); - Fs = 1/Ts; -#+end_src - -#+begin_src matlab - win = hann(ceil(1/Ts)); - - [tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts); - [tf_um , ~] = tfestimate(um, -y, win, [], [], 1/Ts); + [tf_est, f] = tfestimate(um, -y, win, [], [], 1/Ts); [co_est, ~] = mscohere( um, -y, win, [], [], 1/Ts); #+end_src @@ -221,73 +775,42 @@ #+RESULTS: [[file:figs/apa95ml_5kg_PI_coh.png]] -#+begin_src matlab :exports none - figure; - ax1 = subplot(2, 1, 1); - hold on; - plot(f, abs(tf_est), 'DisplayName', 'Input Voltage') - plot(f, abs(tf_um), 'DisplayName', 'Monitor Voltage') - set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude [m/V]'); xlabel('Frequency [Hz]'); - hold off; - legend('location', 'southwest') - - ax2 = subplot(2, 1, 2); - hold on; - plot(f, 180/pi*unwrap(angle(tf_est))) - plot(f, 180/pi*unwrap(angle(tf_um))) - set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); - ylabel('Phase'); xlabel('Frequency [Hz]'); - hold off; - ylim([-540, 0]); - yticks(-540:90:0); - - linkaxes([ax1,ax2], 'x'); - xlim([10, 5e3]); -#+end_src - -#+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/apa95ml_5kg_PI_tf.pdf', 'width', 'full', 'height', 'full'); -#+end_src - -#+name: fig:apa95ml_5kg_PI_tf -#+caption: Estimation of the transfer function from input voltage to displacement -#+RESULTS: -[[file:figs/apa95ml_5kg_PI_tf.png]] - -** Comparison with the FEM model +Comparison with the FEM model #+begin_src matlab - load('fem_model_5kg.mat', 'G'); + load('mat/fem_simscape_models.mat', 'Ghm'); #+end_src #+begin_src matlab :exports none freqs = logspace(0, 4, 1000); + figure; - ax1 = subplot(2, 1, 1); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2,1]); hold on; - plot(f, abs(tf_um), 'DisplayName', 'Identification') - plot(freqs, abs(squeeze(freqresp(G, freqs, 'Hz'))), 'DisplayName', 'FEM') + plot(f, abs(tf_est), 'DisplayName', 'Identification') + plot(freqs, abs(squeeze(freqresp(Ghm, freqs, 'Hz'))), 'DisplayName', 'FEM') set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude [m/V]'); xlabel('Frequency [Hz]'); + ylabel('Amplitude [m/V]'); set(gca, 'XTickLabel', []); legend('location', 'northeast') hold off; - ax2 = subplot(2, 1, 2); + ax2 = nexttile; hold on; - plot(f, 180/pi*unwrap(angle(tf_um))) - plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(G, freqs, 'Hz'))))) + plot(f, 180/pi*angle(tf_est)) + plot(freqs, 180/pi*angle(squeeze(freqresp(Ghm, freqs, 'Hz')))) set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); hold off; - ylim([-540, 0]); - yticks(-540:90:0); + ylim([-180, 180]); + yticks(-180:90:180); linkaxes([ax1,ax2], 'x'); xlim([10, 5e3]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/apa95ml_5kg_pi_comp_fem.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/apa95ml_5kg_pi_comp_fem.pdf', 'width', 'wide', 'height', 'normal'); #+end_src #+name: fig:apa95ml_5kg_pi_comp_fem @@ -328,9 +851,16 @@ The obtained dynamics from force actuator to force sensor are compare with the F ** Load Data :ignore: The data are loaded: #+begin_src matlab - a_ss = load('apa95ml_5kg_1a_2s.mat', 't', 'u', 'y', 'v'); - aa_s = load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'y', 'v'); - load('G_force_sensor_5kg.mat', 'G'); + load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'v'); +#+end_src + +#+begin_src matlab + u = detrend(u, 0); + v = detrend(v, 0); +#+end_src + +#+begin_src matlab + u = 20*u; #+end_src ** Adjust gain :ignore: @@ -351,50 +881,49 @@ From the FEM, we construct the transfer function from DAC voltage to ADC voltage Gfem_a_ss = exp(-s/1e4)*20*( d33*n*ka)*(G(3,1)+G(2,1))*d33/(eT*sD*n); #+end_src +#+begin_src matlab + Gfem_aa_s = exp(-s/1e4)*20*(2*d33*n*ka)*Gfm*d33/(eT*sD*n); + Gfem_a_ss = exp(-s/1e4)*20*( d33*n*ka)*Gfm*d33/(eT*sD*n); +#+end_src + ** Compute TF estimate and Coherence :ignore: The transfer function from input voltage to output voltage are computed and shown in Figure [[fig:bode_plot_force_sensor_voltage_comp_fem]]. + #+begin_src matlab - Ts = a_ss.t(end)/(length(a_ss.t)-1); + Ts = t(end)/(length(t)-1); Fs = 1/Ts; win = hann(ceil(10/Ts)); - [tf_a_ss, f] = tfestimate(a_ss.u, a_ss.v, win, [], [], 1/Ts); - [coh_a_ss, ~] = mscohere( a_ss.u, a_ss.v, win, [], [], 1/Ts); + [tf_est, f] = tfestimate(u, v, win, [], [], 1/Ts); + [coh, ~] = mscohere( u, v, win, [], [], 1/Ts); +#+end_src - [tf_aa_s, f] = tfestimate(aa_s.u, aa_s.v, win, [], [], 1/Ts); - [coh_aa_s, ~] = mscohere( aa_s.u, aa_s.v, win, [], [], 1/Ts); +#+begin_src matlab + load('mat/fem_simscape_models.mat', 'Gfm'); #+end_src #+begin_src matlab :exports none freqs = logspace(1, 4, 1000); figure; - ax1 = subplot(2, 1, 1); - hold on; - set(gca,'ColorOrderIndex',1) - plot(f, abs(tf_aa_s), '-') - set(gca,'ColorOrderIndex',1) - plot(freqs, abs(squeeze(freqresp(Gfem_aa_s, freqs, 'Hz'))), '--') - set(gca,'ColorOrderIndex',2) - plot(f, abs(tf_a_ss), '-') - set(gca,'ColorOrderIndex',2) - plot(freqs, abs(squeeze(freqresp(Gfem_a_ss, freqs, 'Hz'))), '--') - set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude'); xlabel('Frequency [Hz]'); - hold off; - ylim([1e-2, 1e2]); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); - ax2 = subplot(2, 1, 2); + ax1 = nexttile([2,1]); hold on; - set(gca,'ColorOrderIndex',1) - plot(f, 180/pi*angle(tf_aa_s), '-', 'DisplayName', '2 Act - 1 Sen') - set(gca,'ColorOrderIndex',1) - plot(freqs, 180/pi*angle(squeeze(freqresp(Gfem_aa_s, freqs, 'Hz'))), '--', 'DisplayName', '2 Act - 1 Sen, - FEM') - set(gca,'ColorOrderIndex',2) - plot(f, 180/pi*angle(tf_a_ss), '-', 'DisplayName', '1 Act - 2 Sen') - set(gca,'ColorOrderIndex',2) - plot(freqs, 180/pi*angle(squeeze(freqresp(Gfem_a_ss, freqs, 'Hz'))), '--', 'DisplayName', '1 Act - 2 Sen, - FEM') + plot(f, abs(tf_est)) + plot(freqs, abs(squeeze(freqresp(Gfm, freqs, 'Hz')))) + set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); + hold off; + ylim([1e-3, 1e1]); + + ax2 = nexttile; + hold on; + plot(f, 180/pi*angle(tf_est), ... + 'DisplayName', 'Identification') + plot(freqs, 180/pi*angle(squeeze(freqresp(Gfm, freqs, 'Hz'))), ... + 'DisplayName', 'FEM') set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); hold off; @@ -407,7 +936,7 @@ The transfer function from input voltage to output voltage are computed and show #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/bode_plot_force_sensor_voltage_comp_fem.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/bode_plot_force_sensor_voltage_comp_fem.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:bode_plot_force_sensor_voltage_comp_fem @@ -421,7 +950,7 @@ The transfer function from input voltage to output voltage are computed and show w_p = 2*pi*255; % Pole frequency [rad/s] xi_z = 0.05; xi_p = 0.015; - G_inf = 2; + G_inf = 0.1; Gi = G_inf*(s^2 - 2*xi_z*w_z*s + w_z^2)/(s^2 + 2*xi_p*w_p*s + w_p^2); #+end_src @@ -430,18 +959,20 @@ The transfer function from input voltage to output voltage are computed and show freqs = logspace(1, 4, 1000); figure; - ax1 = subplot(2, 1, 1); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2,1]); hold on; - plot(f, abs(tf_aa_s), '-') + plot(f, abs(tf_est), '-') plot(freqs, abs(squeeze(freqresp(Gi, freqs, 'Hz'))), '--') set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude'); xlabel('Frequency [Hz]'); + ylabel('Amplitude'); set(gca, 'XTickLabel', []); hold off; - ylim([1e-2, 1e2]); + ylim([1e-3, 1e1]); - ax2 = subplot(2, 1, 2); + ax2 = nexttile; hold on; - plot(f, 180/pi*angle(tf_aa_s), '-', 'DisplayName', '2 Act - 1 Sen') + plot(f, 180/pi*angle(tf_est), '-', 'DisplayName', '2 Act - 1 Sen') plot(freqs, 180/pi*angle(squeeze(freqresp(Gi, freqs, 'Hz'))), '--', 'DisplayName', '2 Act - 1 Sen, - FEM') set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); @@ -455,7 +986,7 @@ The transfer function from input voltage to output voltage are computed and show #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/iff_plant_identification_apa95ml.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/iff_plant_identification_apa95ml.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:iff_plant_identification_apa95ml @@ -498,7 +1029,13 @@ The transfer function from input voltage to output voltage are computed and show :header-args:matlab+: :comments org :mkdirp yes :END: <> + ** Introduction :ignore: + +#+name: fig:test_bench_apa_schematic_iff +#+caption: Schematic of the test bench using IFF +[[file:figs/test_bench_apa_schematic_iff.png]] + ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -518,9 +1055,9 @@ The transfer function from input voltage to output voltage are computed and show ** First tests with few gains #+begin_src matlab - iff_g10 = load('apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v'); + iff_g10 = load('apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v'); iff_g100 = load('apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v'); - iff_of = load('apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v'); + iff_of = load('apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v'); #+end_src #+begin_src matlab @@ -530,7 +1067,7 @@ The transfer function from input voltage to output voltage are computed and show [tf_iff_g10, f] = tfestimate(iff_g10.u, iff_g10.y, win, [], [], 1/Ts); [co_iff_g10, ~] = mscohere(iff_g10.u, iff_g10.y, win, [], [], 1/Ts); - [tf_iff_g100, f] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); + [tf_iff_g100, ~] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); [co_iff_g100, ~] = mscohere(iff_g100.u, iff_g100.y, win, [], [], 1/Ts); [tf_iff_of, ~] = tfestimate(iff_of.u, iff_of.y, win, [], [], 1/Ts); @@ -563,17 +1100,19 @@ The transfer function from input voltage to output voltage are computed and show #+begin_src matlab :exports none figure; - ax1 = subplot(2, 1, 1); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2, 1]); hold on; plot(f, abs(tf_iff_of), '-', 'DisplayName', 'g=0') plot(f, abs(tf_iff_g10), '-', 'DisplayName', 'g=10') plot(f, abs(tf_iff_g100), '-', 'DisplayName', 'g=100') set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude'); xlabel('Frequency [Hz]'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); hold off; legend(); - ax2 = subplot(2, 1, 2); + ax2 = nexttile; hold on; plot(f, 180/pi*angle(-tf_iff_of), '-') plot(f, 180/pi*angle(-tf_iff_g10), '-') @@ -581,13 +1120,14 @@ The transfer function from input voltage to output voltage are computed and show set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); hold off; + yticks(-360:90:360); linkaxes([ax1,ax2], 'x'); xlim([60, 600]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/iff_first_test_bode_plot.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/iff_first_test_bode_plot.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:iff_first_test_bode_plot @@ -635,31 +1175,34 @@ The transfer function from input voltage to output voltage are computed and show #+begin_src matlab :exports none figure; - ax1 = subplot(2, 1, 1); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2, 1]); hold on; for i = 1:length(results) plot(f, abs(tf_iff{i}), '-', 'DisplayName', sprintf('g = %0.f', g_iff(i))) end set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude'); xlabel('Frequency [Hz]'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); hold off; legend(); - ax2 = subplot(2, 1, 2); + ax2 = nexttile; hold on; for i = 1:length(results) plot(f, 180/pi*angle(-tf_iff{i}), '-') end set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); - hold off; + yticks(-360:90:360); + axis padded 'auto x' linkaxes([ax1,ax2], 'x'); xlim([60, 600]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/iff_results_bode_plots.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/iff_results_bode_plots.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:iff_results_bode_plots @@ -684,7 +1227,9 @@ The transfer function from input voltage to output voltage are computed and show #+begin_src matlab :exports none figure; - ax1 = subplot(2, 1, 1); + tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None'); + + ax1 = nexttile([2, 1]); hold on; for i = 1:length(results) set(gca,'ColorOrderIndex',i) @@ -693,11 +1238,11 @@ The transfer function from input voltage to output voltage are computed and show plot(f, abs(squeeze(freqresp(G_id{i}, f, 'Hz'))), '--', 'HandleVisibility', 'off') end set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); - ylabel('Amplitude'); xlabel('Frequency [Hz]'); + ylabel('Amplitude'); set(gca, 'XTickLabel',[]); hold off; legend(); - ax2 = subplot(2, 1, 2); + ax2 = nexttile; hold on; for i = 1:length(results) set(gca,'ColorOrderIndex',i) @@ -708,13 +1253,15 @@ The transfer function from input voltage to output voltage are computed and show set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin'); ylabel('Phase'); xlabel('Frequency [Hz]'); hold off; + yticks(-360:90:360); + axis padded 'auto x' linkaxes([ax1,ax2], 'x'); xlim([60, 600]); #+end_src #+begin_src matlab :tangle no :exports results :results file replace - exportFig('figs/iff_results_bode_plots_identification.pdf', 'width', 'full', 'height', 'full'); + exportFig('figs/iff_results_bode_plots_identification.pdf', 'width', 'wide', 'height', 'tall'); #+end_src #+name: fig:iff_results_bode_plots_identification