diff --git a/figs/force_sen_steps_time_domain_par_R.pdf b/figs/force_sen_steps_time_domain_par_R.pdf new file mode 100644 index 0000000..02242e0 Binary files /dev/null and b/figs/force_sen_steps_time_domain_par_R.pdf differ diff --git a/figs/force_sen_steps_time_domain_par_R.png b/figs/force_sen_steps_time_domain_par_R.png new file mode 100644 index 0000000..8f2c926 Binary files /dev/null and b/figs/force_sen_steps_time_domain_par_R.png differ diff --git a/index.html b/index.html index 5b1c3c8..fc9bdca 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-The experimental Setup is schematically represented in Figure 1. +The experimental Setup is schematically represented in Figure 1.
@@ -86,21 +87,21 @@ The displacement of the mass (relative to the mechanical frame) is measured both
-
Figure 1: Schematic of the Experiment
Figure 2: Side View of the encoder
Figure 3: Front View of the encoder
@@ -108,8 +109,8 @@ The displacement of the mass (relative to the mechanical frame) is measured bothThe goal in this section is the estimate the noise of both the encoder and the intereferometer. @@ -121,8 +122,8 @@ Ideally, a mechanical part would clamp the two together, we here suppose that th
load('mat/int_enc_huddle_test.mat', 'interferometer', 'encoder', 't'); @@ -137,11 +138,11 @@ encoder = detrend(encoder, 0);
Figure 4: Huddle test - Time domain signals
@@ -153,7 +154,7 @@ encoder = detrend(encoder, 0);
Figure 5: Huddle test - Time domain signals filtered with a LPF at 10Hz
@@ -161,8 +162,8 @@ encoder = detrend(encoder, 0);Ts = 1e-4; @@ -174,7 +175,7 @@ win = hann(ceil(10/Ts));
Figure 6: Amplitude Spectral Density of the signals during the Huddle test
@@ -183,8 +184,8 @@ win = hann(ceil(10/Ts));The goal here is to make sure that the interferometer and encoder measurements are coherent. @@ -192,8 +193,8 @@ We may see non-linearity in the interferometric measurement.
load('mat/int_enc_comp.mat', 'interferometer', 'encoder', 'u', 't'); @@ -209,18 +210,18 @@ u = detrend(u, 0);
Figure 7: One cycle measurement
Figure 8: Difference between the Encoder and the interferometer during one cycle
@@ -228,8 +229,8 @@ u = detrend(u, 0);Ts = 1e-4; @@ -250,7 +251,7 @@ d_err_mean = d_err_mean - mean(d_err_mean);
Figure 9: Difference between the two measurement in the time domain, averaged for all the cycles
@@ -258,8 +259,8 @@ d_err_mean = d_err_mean - mean(d_err_mean);Compute the mean of the interferometer measurement corresponding to each of the encoder measurement. @@ -278,7 +279,7 @@ i_mean_error = (i_mean - e_sorted);
Figure 10: Difference between the two measurement as a function of the measured position by the encoder, averaged for all the cycles
@@ -299,7 +300,7 @@ e_sorted_mean_over_period = mean(reshape(i_mean_error(i_init +
Figure 11: Non-Linearity of the Interferometer over the period of the wavelength
@@ -308,12 +309,12 @@ e_sorted_mean_over_period = mean(reshape(i_mean_error(i_init -load('mat/int_enc_id_noise_bis.mat', 'interferometer', 'encoder', 'u', 't'); @@ -329,8 +330,8 @@ u = detrend(u, 0);
Ts = 1e-4; % Sampling Time [s] @@ -348,14 +349,14 @@ win = hann(ceil(10/Ts));
oc = load('./mat/identification_open_circuit.mat', 't', 'encoder', 'u'); @@ -378,8 +379,8 @@ sc = load('./mat/identification_short_circuit.mat'
Ts = 1e-4; % Sampling Time [s] @@ -397,26 +398,26 @@ win = hann(ceil(10/Ts));
Figure 16: Zoom on the change of resonance
The change of resonance frequency / stiffness is very small and is not important here.
@@ -426,8 +427,8 @@ The change of resonance frequency / stiffness is very small and is not importantTwo stacks are used as actuator (in parallel) and one stack is used as sensor. @@ -438,8 +439,8 @@ The amplifier gain is 20V/V (Cedrat LA75B).
load('./mat/force_sensor_steps.mat', 't', 'encoder', 'u', 'v'); @@ -459,7 +460,7 @@ xlabel('Time [s]'); ylabel( +
Figure 17: Time domain signal during the 3 actuator voltage steps
@@ -468,11 +469,12 @@ xlabel('Time [s]'); ylabel( -2.5, 23 -23.8, 35 -35.8, 50 - ++t_s = [ 2.5, 23; + 23.8, 35; + 35.8, 50]; ++Fit function: @@ -485,52 +487,25 @@ Fit function:
We are interested by the
-b(2)
term, which is the time constant of the exponential.-tau = zeros(3,1); -V0 = zeros(3,1); +tau = zeros(size(t_s, 1),1); +V0 = zeros(size(t_s, 1),1);-- -t_cur = t(2.5 < t & t < 23); -t_cur = t_cur - t_cur(1); -y_cur = v(2.5 < t & t < 23); +for t_i = 1:size(t_s, 1) + t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + t_cur = t_cur - t_cur(1); + y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); -nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function -B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates -[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ + nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function + B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates + [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ -tau(1) = 1/B(2); -V0(1) = B(3); ---- -t_cur = t(23.8 < t & t < 35); -t_cur = t_cur - t_cur(1); -y_cur = v(23.8 < t & t < 35); - -nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function -B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates -[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ - -tau(2) = 1/B(2); -V0(2) = B(3); ---@@ -584,7 +559,7 @@ Rin = abs(mean(tau))/Cp; The input impedance of the Speedgoat’s ADC should then be close to \(1.5\,M\Omega\) (specified at \(1\,M\Omega\)). -t_cur = t(35.8 < t); -t_cur = t_cur - t_cur(1); -y_cur = v(35.8 < t); - -nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function -B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates -[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ - -tau(3) = 1/B(2); -V0(3) = B(3); + tau(t_i) = 1/B(2); + V0(t_i) = B(3); +end+How can we explain the voltage offset?
@@ -592,11 +567,11 @@ How can we explain the voltage offset?-As shown in Figure 18 (taken from (Reza and Andrew 2006)), an input voltage offset is due to the input bias current \(i_n\). +As shown in Figure 18 (taken from (Reza and Andrew 2006)), an input voltage offset is due to the input bias current \(i_n\).
-+-
Figure 18: Model of a piezoelectric transducer (left) and instrumentation amplifier (right)
@@ -632,7 +607,7 @@ If we allow the high pass corner frequency to be equals to 3Hz:@@ -660,9 +635,178 @@ Which is much more acceptable.fc = 3; -Ra = Rin/(fc*C*Rin - 1); +Ra = Rin/(fc*Cp*Rin - 1);-6.2 Sinus
+++ +6.2 Add Parallel Resistor
+++A resistor of \(\approx 100\,k\Omega\) is added in parallel with the force sensor and the same kin. +
+ +++ +load('./mat/force_sensor_steps_R_82k7.mat', 't', 'encoder', 'u', 'v'); ++++ + +figure; +tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None'); +nexttile; +plot(t, v); +xlabel('Time [s]'); ylabel('Measured voltage [V]'); +nexttile; +plot(t, u); +xlabel('Time [s]'); ylabel('Actuator Voltage [V]'); ++++ ++
+Figure 19: Time domain signal during the actuator voltage steps
++Three steps are performed at the following time intervals: +
+++ +t_s = [1.9, 6; + 8.5, 13; + 15.5, 21; + 22.6, 26; + 30.0, 36; + 37.5, 41; + 46.2, 49.5] +++Fit function: +
+++ +f = @(b,x) b(1).*exp(b(2).*x) + b(3); +++We are interested by the
+ +b(2)
term, which is the time constant of the exponential. +++ +tau = zeros(size(t_s, 1),1); +V0 = zeros(size(t_s, 1),1); ++++ +for t_i = 1:size(t_s, 1) + t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + t_cur = t_cur - t_cur(1); + y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + + nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function + B0 = [0.5, -0.2, 0.2]; % Choose Appropriate Initial Estimates + [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ + + tau(t_i) = 1/B(2); + V0(t_i) = B(3); +end +++And indeed, we obtain a much smaller offset voltage and a much faster time constant. +
+ ++ + +
+ ++ + ++ + + + + + +\(tau\) [s] +\(V_0\) [V] ++ + +0.43 +0.15 ++ + +0.45 +0.16 ++ + +0.43 +0.15 ++ + +0.43 +0.15 ++ + +0.45 +0.15 ++ + +0.46 +0.16 ++ + +0.48 +0.16 ++Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of \(\approx 1\,M\Omega\)): +
+ +++ +Cp = 4.4e-6; % [F] +Rin = abs(mean(tau))/Cp; +++101200.0 ++ + ++And we can verify that the bias current estimation stays the same: +
+++ +in = mean(V0)/Rin; +
++1.5305e-06 ++ + ++This validates the model of the ADC and the effectiveness of the added resistor. +
++6.3 Sinus
+load('./mat/force_sensor_sin.mat', 't', 'encoder', 'u', 'v'); @@ -674,14 +818,14 @@ t = t(t>25);-The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure 19). +The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure 20).
-+-
Figure 19: Driving Voltage
+Figure 20: Driving Voltage
@@ -698,14 +842,14 @@ The full stroke as measured by the encoder is:
-Its signal is shown in Figure 20. +Its signal is shown in Figure 21.
-+-
Figure 20: Encoder measurement
+Figure 21: Encoder measurement
@@ -713,10 +857,10 @@ The generated voltage by the stack is shown in Figure
-+-
Figure 21: Voltage measured on the stack used as a sensor
+Figure 22: Voltage measured on the stack used as a sensor
@@ -728,18 +872,18 @@ The capacitance of the stack is
-The corresponding generated charge is then shown in Figure 22. +The corresponding generated charge is then shown in Figure 23.
-+-
Figure 22: Generated Charge
+Figure 23: Generated Charge
-The relation between the generated voltage and the measured displacement is almost linear as shown in Figure 23. +The relation between the generated voltage and the measured displacement is almost linear as shown in Figure 24.
@@ -748,10 +892,10 @@ The relation between the generated voltage and the measured displacement is almo-+-
Figure 23: Almost linear relation between the relative displacement and the generated voltage
+Figure 24: Almost linear relation between the relative displacement and the generated voltage
@@ -777,7 +921,7 @@ With a 16bits ADC, the resolution will then be equals to (in [nm]):
diff --git a/index.org b/index.org index a3426e7..d3349ba 100644 --- a/index.org +++ b/index.org @@ -551,9 +551,11 @@ The amplifier gain is 20V/V (Cedrat LA75B). [[file:figs/force_sen_steps_time_domain.png]] Three steps are performed at the following time intervals: -- 2.5, 23 -- 23.8, 35 -- 35.8, 50 +#+begin_src matlab + t_s = [ 2.5, 23; + 23.8, 35; + 35.8, 50]; +#+end_src Fit function: #+begin_src matlab @@ -561,49 +563,24 @@ Fit function: #+end_src We are interested by the =b(2)= term, which is the time constant of the exponential. - #+begin_src matlab - tau = zeros(3,1); - V0 = zeros(3,1); + tau = zeros(size(t_s, 1),1); + V0 = zeros(size(t_s, 1),1); #+end_src #+begin_src matlab - t_cur = t(2.5 < t & t < 23); - t_cur = t_cur - t_cur(1); - y_cur = v(2.5 < t & t < 23); + for t_i = 1:size(t_s, 1) + t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + t_cur = t_cur - t_cur(1); + y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); - nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function - B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates - [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ + nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function + B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates + [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ - tau(1) = 1/B(2); - V0(1) = B(3); -#+end_src - -#+begin_src matlab - t_cur = t(23.8 < t & t < 35); - t_cur = t_cur - t_cur(1); - y_cur = v(23.8 < t & t < 35); - - nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function - B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates - [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ - - tau(2) = 1/B(2); - V0(2) = B(3); -#+end_src - -#+begin_src matlab - t_cur = t(35.8 < t); - t_cur = t_cur - t_cur(1); - y_cur = v(35.8 < t); - - nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function - B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates - [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ - - tau(3) = 1/B(2); - V0(3) = B(3); + tau(t_i) = 1/B(2); + V0(t_i) = B(3); + end #+end_src #+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) @@ -665,7 +642,7 @@ An additional resistor in parallel with $R_{in}$ would have two effects: If we allow the high pass corner frequency to be equals to 3Hz: #+begin_src matlab fc = 3; - Ra = Rin/(fc*C*Rin - 1); + Ra = Rin/(fc*Cp*Rin - 1); #+end_src #+begin_src matlab :results value replace :exports results @@ -689,6 +666,116 @@ With this parallel resistance value, the voltage offset would be: Which is much more acceptable. +** Add Parallel Resistor +A resistor of $\approx 100\,k\Omega$ is added in parallel with the force sensor and the same kin. + +#+begin_src matlab + load('./mat/force_sensor_steps_R_82k7.mat', 't', 'encoder', 'u', 'v'); +#+end_src + +#+begin_src matlab + figure; + tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None'); + nexttile; + plot(t, v); + xlabel('Time [s]'); ylabel('Measured voltage [V]'); + nexttile; + plot(t, u); + xlabel('Time [s]'); ylabel('Actuator Voltage [V]'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace + exportFig('figs/force_sen_steps_time_domain_par_R.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:force_sen_steps_time_domain_par_R +#+caption: Time domain signal during the actuator voltage steps +#+RESULTS: +[[file:figs/force_sen_steps_time_domain_par_R.png]] + +Three steps are performed at the following time intervals: +#+begin_src matlab + t_s = [1.9, 6; + 8.5, 13; + 15.5, 21; + 22.6, 26; + 30.0, 36; + 37.5, 41; + 46.2, 49.5] +#+end_src + +Fit function: +#+begin_src matlab + f = @(b,x) b(1).*exp(b(2).*x) + b(3); +#+end_src + +We are interested by the =b(2)= term, which is the time constant of the exponential. + +#+begin_src matlab + tau = zeros(size(t_s, 1),1); + V0 = zeros(size(t_s, 1),1); +#+end_src + +#+begin_src matlab + for t_i = 1:size(t_s, 1) + t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + t_cur = t_cur - t_cur(1); + y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); + + nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function + B0 = [0.5, -0.2, 0.2]; % Choose Appropriate Initial Estimates + [B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’ + + tau(t_i) = 1/B(2); + V0(t_i) = B(3); + end +#+end_src + +And indeed, we obtain a much smaller offset voltage and a much faster time constant. + +#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) + data2orgtable([abs(tau), V0], {}, {'$tau$ [s]', '$V_0$ [V]'}, ' %.2f '); +#+end_src + +#+RESULTS: +| $tau$ [s] | $V_0$ [V] | +|-----------+-----------| +| 0.43 | 0.15 | +| 0.45 | 0.16 | +| 0.43 | 0.15 | +| 0.43 | 0.15 | +| 0.45 | 0.15 | +| 0.46 | 0.16 | +| 0.48 | 0.16 | + +Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of $\approx 1\,M\Omega$): + +#+begin_src matlab + Cp = 4.4e-6; % [F] + Rin = abs(mean(tau))/Cp; +#+end_src + +#+begin_src matlab :results value replace :exports results + ans = Rin +#+end_src + +#+RESULTS: +: 101200.0 + +And we can verify that the bias current estimation stays the same: +#+begin_src matlab + in = mean(V0)/Rin; +#+end_src + +#+begin_src matlab :results value replace :exports results + ans = in +#+end_src + +#+RESULTS: +: 1.5305e-06 + +This validates the model of the ADC and the effectiveness of the added resistor. + ** Sinus #+begin_src matlab load('./mat/force_sensor_sin.mat', 't', 'encoder', 'u', 'v'); -Created: 2020-10-29 jeu. 10:08
+Created: 2020-11-04 mer. 20:38