diff --git a/disturbance-sr-rz/figs/slip_ring_spindle_marble_time.png b/disturbance-sr-rz/figs/slip_ring_spindle_marble_time.png index a6296e0..d65fdb4 100644 Binary files a/disturbance-sr-rz/figs/slip_ring_spindle_marble_time.png and b/disturbance-sr-rz/figs/slip_ring_spindle_marble_time.png differ diff --git a/disturbance-sr-rz/figs/slip_ring_spindle_sample_time.png b/disturbance-sr-rz/figs/slip_ring_spindle_sample_time.png index c921f98..feb3c49 100644 Binary files a/disturbance-sr-rz/figs/slip_ring_spindle_sample_time.png and b/disturbance-sr-rz/figs/slip_ring_spindle_sample_time.png differ diff --git a/disturbance-sr-rz/figs/sr_sp_psd_marble_compare.png b/disturbance-sr-rz/figs/sr_sp_psd_marble_compare.png index 9a41c3d..70b422e 100644 Binary files a/disturbance-sr-rz/figs/sr_sp_psd_marble_compare.png and b/disturbance-sr-rz/figs/sr_sp_psd_marble_compare.png differ diff --git a/disturbance-sr-rz/figs/sr_sp_psd_sample_compare.png b/disturbance-sr-rz/figs/sr_sp_psd_sample_compare.png index 164beff..e0fda58 100644 Binary files a/disturbance-sr-rz/figs/sr_sp_psd_sample_compare.png and b/disturbance-sr-rz/figs/sr_sp_psd_sample_compare.png differ diff --git a/disturbance-sr-rz/index.org b/disturbance-sr-rz/index.org index 8360cff..c1137a5 100644 --- a/disturbance-sr-rz/index.org +++ b/disturbance-sr-rz/index.org @@ -97,11 +97,12 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) -<> + <> + addpath('../src'); #+end_src #+begin_src matlab :exports none :results silent :noweb yes -<> + <> #+end_src ** Load data @@ -111,6 +112,19 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. sp = load('mat/data_026.mat', 'data'); sp = sp.data; #+end_src +** Voltage to Velocity +We convert the measured voltage to velocity using the function =voltageToVelocityL22= (accessible [[file:~/MEGA/These/meas/src/index.org][here]]). + +#+begin_src matlab + of(:, 1) = voltageToVelocityL22(of(:, 1), of(:, 3), 60); + sr(:, 1) = voltageToVelocityL22(sr(:, 1), sr(:, 3), 60); + sp(:, 1) = voltageToVelocityL22(sp(:, 1), sp(:, 3), 60); + + of(:, 2) = voltageToVelocityL22(of(:, 2), of(:, 3), 60); + sr(:, 2) = voltageToVelocityL22(sr(:, 2), sr(:, 3), 60); + sp(:, 2) = voltageToVelocityL22(sp(:, 2), sp(:, 3), 60); +#+end_src + ** Time domain plots #+begin_src matlab figure; @@ -119,8 +133,8 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. plot(sr(:, 3), sr(:, 1), 'DisplayName', 'Slip-Ring - 6rpm'); plot(of(:, 3), of(:, 1), 'DisplayName', 'OFF'); hold off; - xlabel('Time [s]'); ylabel('Voltage [V]'); - xlim([0, 100]); ylim([-10 10]); + xlabel('Time [s]'); ylabel('Velocity [m/s]'); + xlim([0, 100]); legend('Location', 'northeast'); #+end_src @@ -131,7 +145,7 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. #+end_src #+NAME: fig:slip_ring_spindle_marble_time -#+CAPTION: Measurement of the geophone located on the marble - Time domain +#+CAPTION: Velocity as measured by the geophone located on the marble - Time domain #+RESULTS: fig:slip_ring_spindle_marble_time [[file:figs/slip_ring_spindle_marble_time.png]] @@ -142,8 +156,8 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. plot(sr(:, 3), sr(:, 2), 'DisplayName', 'Only Slip-Ring'); plot(of(:, 3), of(:, 2), 'DisplayName', 'OFF'); hold off; - xlabel('Time [s]'); ylabel('Voltage [V]'); - xlim([0, 100]); ylim([-10 10]); + xlabel('Time [s]'); ylabel('Velocity [m/s]'); + xlim([0, 100]); legend('Location', 'northeast'); #+end_src @@ -154,7 +168,7 @@ A movie showing the experiment is shown on figure [[fig:exp_sl_sp_gif]]. #+end_src #+NAME: fig:slip_ring_spindle_sample_time -#+CAPTION: Measurement of the geophone at the sample location - Time domain +#+CAPTION: Velocity as measured by the geophone at the sample location - Time domain #+RESULTS: fig:slip_ring_spindle_sample_time [[file:figs/slip_ring_spindle_sample_time.png]] @@ -184,7 +198,7 @@ And for the geophone located at the sample position. [pxsp_s, ~] = pwelch(sp(:, 2), win, [], [], Fs); #+end_src -And we plot the ASD of the measured signals: +And we plot the ASD of the measured velocities: - figure [[fig:sr_sp_psd_marble_compare]] for the geophone located on the marble - figure [[fig:sr_sp_psd_sample_compare]] for the geophone at the sample position @@ -197,9 +211,9 @@ And we plot the ASD of the measured signals: hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); - xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$') + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') legend('Location', 'southwest'); - xlim([0.1, 500]); + xlim([2, 500]); #+end_src #+NAME: fig:sr_sp_psd_marble_compare @@ -209,7 +223,7 @@ And we plot the ASD of the measured signals: #+end_src #+NAME: fig:sr_sp_psd_marble_compare -#+CAPTION: Comparison of the ASD of the measured voltage from the Geophone on the marble +#+CAPTION: Comparison of the ASD of the measured velocities from the Geophone on the marble #+RESULTS: fig:sr_sp_psd_marble_compare [[file:figs/sr_sp_psd_marble_compare.png]] @@ -222,9 +236,9 @@ And we plot the ASD of the measured signals: hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); - xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$') + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') legend('Location', 'southwest'); - xlim([0.1, 500]); + xlim([2, 500]); #+end_src #+NAME: fig:sr_sp_psd_sample_compare @@ -234,14 +248,15 @@ And we plot the ASD of the measured signals: #+end_src #+NAME: fig:sr_sp_psd_sample_compare -#+CAPTION: Comparison of the ASD of the measured voltage from the Geophone at the sample location +#+CAPTION: Comparison of the ASD of the measured velocities from the Geophone at the sample location #+RESULTS: fig:sr_sp_psd_sample_compare [[file:figs/sr_sp_psd_sample_compare.png]] ** Conclusion #+begin_important - The slip-ring rotation induces almost no vibrations on the marble, and only a little vibrations on the sample above 100Hz. + - The slip-ring rotation induces almost no vibrations on the marble, and only a little vibrations on the sample above 100Hz. - The spindle rotation induces a lot of vibrations of the sample as well as on the granite. - There is a huge peak at 24Hz on the sample vibration but not on the granite vibration. + - The spindle rotation induces a lot of vibrations of the sample as well as on the granite. + - There is a huge peak at 24Hz on the sample vibration but not on the granite vibration. The peak is really sharp, could this be due to magnetic effect? + - Should redo the measurement with piezo accelerometers #+end_important diff --git a/disturbance-ty-sr/figs/current_time.png b/disturbance-ty-sr/figs/current_time.png new file mode 100644 index 0000000..6bc06c9 Binary files /dev/null and b/disturbance-ty-sr/figs/current_time.png differ diff --git a/disturbance-ty-sr/figs/psd_marble_compare.png b/disturbance-ty-sr/figs/psd_marble_compare.png new file mode 100644 index 0000000..8e40aa6 Binary files /dev/null and b/disturbance-ty-sr/figs/psd_marble_compare.png differ diff --git a/disturbance-ty-sr/figs/psd_relative_compare.png b/disturbance-ty-sr/figs/psd_relative_compare.png new file mode 100644 index 0000000..034a6a4 Binary files /dev/null and b/disturbance-ty-sr/figs/psd_relative_compare.png differ diff --git a/disturbance-ty-sr/figs/psd_sample_compare.png b/disturbance-ty-sr/figs/psd_sample_compare.png new file mode 100644 index 0000000..3ab5b73 Binary files /dev/null and b/disturbance-ty-sr/figs/psd_sample_compare.png differ diff --git a/disturbance-ty-sr/figs/ty_current_time.png b/disturbance-ty-sr/figs/ty_current_time.png new file mode 100644 index 0000000..f9e63a2 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_current_time.png differ diff --git a/disturbance-ty-sr/figs/ty_marble_time.png b/disturbance-ty-sr/figs/ty_marble_time.png new file mode 100644 index 0000000..0e58439 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_marble_time.png differ diff --git a/disturbance-ty-sr/figs/ty_marble_time_zoom.png b/disturbance-ty-sr/figs/ty_marble_time_zoom.png new file mode 100644 index 0000000..444bb44 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_marble_time_zoom.png differ diff --git a/disturbance-ty-sr/figs/ty_position_time.png b/disturbance-ty-sr/figs/ty_position_time.png new file mode 100644 index 0000000..9692fa9 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_position_time.png differ diff --git a/disturbance-ty-sr/figs/ty_relative_disp_time.png b/disturbance-ty-sr/figs/ty_relative_disp_time.png new file mode 100644 index 0000000..646abb0 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_relative_disp_time.png differ diff --git a/disturbance-ty-sr/figs/ty_relative_time.png b/disturbance-ty-sr/figs/ty_relative_time.png new file mode 100644 index 0000000..3e56a57 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_relative_time.png differ diff --git a/disturbance-ty-sr/figs/ty_relative_time_zoom.png b/disturbance-ty-sr/figs/ty_relative_time_zoom.png new file mode 100644 index 0000000..0b18b7c Binary files /dev/null and b/disturbance-ty-sr/figs/ty_relative_time_zoom.png differ diff --git a/disturbance-ty-sr/figs/ty_sample_time.png b/disturbance-ty-sr/figs/ty_sample_time.png new file mode 100644 index 0000000..c0c2c1b Binary files /dev/null and b/disturbance-ty-sr/figs/ty_sample_time.png differ diff --git a/disturbance-ty-sr/figs/ty_sample_time_zoom.png b/disturbance-ty-sr/figs/ty_sample_time_zoom.png new file mode 100644 index 0000000..cb96e20 Binary files /dev/null and b/disturbance-ty-sr/figs/ty_sample_time_zoom.png differ diff --git a/disturbance-ty-sr/index.html b/disturbance-ty-sr/index.html index 5267a16..6967647 100644 --- a/disturbance-ty-sr/index.html +++ b/disturbance-ty-sr/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Vibrations induced by simultaneous scans of the translation stage and of the slip-ring @@ -258,19 +258,28 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Measurement description

+
+

1 Measurement description

Setup: @@ -375,11 +384,11 @@ Each of the measurement mat file contains one data arr

-
-

2 Data Analysis

+
+

2 Data Analysis

- +

@@ -389,63 +398,377 @@ All the files (data and Matlab scripts) are accessible -

2.1 Load data

+
+

2.1 Load data

-
ty_off = load('mat/data_050.mat', 'data'); ty_off = ty_off.data;
-ty_on  = load('mat/data_051.mat', 'data'); ty_on  = ty_on.data;
-ty_1hz = load('mat/data_052.mat', 'data'); ty_1hz = ty_1hz.data;
+
ty_of = load('mat/data_050.mat', 'data'); ty_of = ty_of.data;
+ty_on = load('mat/data_051.mat', 'data'); ty_on = ty_on.data;
+ty_1h = load('mat/data_052.mat', 'data'); ty_1h = ty_1h.data;
 
-
-

2.2 Time domain plots

+
+

2.2 Voltage to Velocity

+

+We convert the measured voltage to velocity using the function voltageToVelocityL22 (accessible here). +

+ +
+
gain = 40; % [dB]
+
+ty_of(:, 1) = voltageToVelocityL22(ty_of(:, 1), ty_of(:, 3), gain);
+ty_on(:, 1) = voltageToVelocityL22(ty_on(:, 1), ty_on(:, 3), gain);
+ty_1h(:, 1) = voltageToVelocityL22(ty_1h(:, 1), ty_1h(:, 3), gain);
+
+ty_of(:, 2) = voltageToVelocityL22(ty_of(:, 2), ty_of(:, 3), gain);
+ty_on(:, 2) = voltageToVelocityL22(ty_on(:, 2), ty_on(:, 3), gain);
+ty_1h(:, 2) = voltageToVelocityL22(ty_1h(:, 2), ty_1h(:, 3), gain);
+
+
+
+
+ +
+

2.3 Time domain plots

+
+

+We plot the measured velocity of the marble (figure 1), sample (figure 2) and the relative velocity of the sample with respect to the marble (figure 3). +

+ +

+We also integrate the relative velocity to obtain the relative displacement (figure 4). +

+
figure;
 hold on;
-plot(ty_1hz(:, 3), ty_1hz(:, 1), 'DisplayName', 'Marble - Z');
-plot(ty_on(:, 3),  ty_on(:, 1),  'DisplayName', 'Marble - Z');
-plot(ty_off(:, 3), ty_off(:, 1), 'DisplayName', 'Marble - Z');
+plot(ty_1h(:, 3), ty_1h(:, 1), 'DisplayName', 'Marble - Ty 1Hz');
+plot(ty_on(:, 3), ty_on(:, 1), 'DisplayName', 'Marble - Ty ON');
+plot(ty_of(:, 3), ty_of(:, 1), 'DisplayName', 'Marble - Ty OFF');
 hold off;
-xlabel('Time [s]'); ylabel('Voltage [V]');
-xlim([0, 100]); ylim([-5, 5]);
-legend('Location', 'northeast');
+xlabel('Time [s]'); ylabel('Velocity [m/s]');
+xlim([0, 2]);
+legend('Location', 'southwest');
 
-
-
xlim([0, 1]);
-
+ +
+

ty_marble_time.png +

+

Figure 1: Velocity of the marble in the vertical direction

figure;
 hold on;
-plot(ty_1hz(:, 3), ty_1hz(:, 2), 'DisplayName', 'Marble - Z');
-plot(ty_on(:, 3),  ty_on(:, 2),  'DisplayName', 'Marble - Z');
-plot(ty_off(:, 3), ty_off(:, 2), 'DisplayName', 'Marble - Z');
+plot(ty_1h(:, 3), ty_1h(:, 2), 'DisplayName', 'Sample - Ty - 1Hz');
+plot(ty_on(:, 3), ty_on(:, 2), 'DisplayName', 'Sample - Ty - ON');
+plot(ty_of(:, 3), ty_of(:, 2), 'DisplayName', 'Sample - Ty - OFF');
 hold off;
-xlabel('Time [s]'); ylabel('Voltage [V]');
-xlim([0, 100]); ylim([-5, 5]);
-legend('Location', 'northeast');
+xlabel('Time [s]'); ylabel('Velocity [m/s]');
+xlim([0, 2]);
+legend('Location', 'southwest');
 
+ +
+

ty_sample_time.png +

+

Figure 2: Velocity of the sample in the vertical direction

+
+
-
xlim([0, 1]);
+
figure;
+hold on;
+plot(ty_1h(:, 3), ty_1h(:, 2)-ty_1h(:, 1), 'DisplayName', 'Relative Velocity - Ty - 1Hz');
+plot(ty_on(:, 3), ty_on(:, 2)-ty_on(:, 1), 'DisplayName', 'Relative Velocity - Ty - ON');
+plot(ty_of(:, 3), ty_of(:, 2)-ty_of(:, 1), 'DisplayName', 'Relative Velocity - Ty - OFF');
+hold off;
+xlabel('Time [s]'); ylabel('Velocity [m/s]');
+xlim([0, 2]);
+legend('Location', 'southwest');
 
+ + +
+

ty_relative_time.png +

+

Figure 3: Relative velocity of the sample with respect to the marble

+
+ +
+
figure;
+hold on;
+plot(ty_1h(:, 3), lsim(1/s, ty_1h(:, 2)-ty_1h(:, 1), ty_1h(:, 3)), 'DisplayName', 'Relative Displacement- Ty - 1Hz');
+plot(ty_on(:, 3), lsim(1/s, ty_on(:, 2)-ty_on(:, 1), ty_on(:, 3)), 'DisplayName', 'Relative Displacement- Ty - ON');
+plot(ty_of(:, 3), lsim(1/s, ty_of(:, 2)-ty_of(:, 1), ty_of(:, 3)), 'DisplayName', 'Relative Displacement- Ty - OFF');
+hold off;
+xlabel('Time [s]'); ylabel('Displacement [m]');
+xlim([0, 2]);
+legend('Location', 'southwest');
+
+
+ + +
+

ty_relative_disp_time.png +

+

Figure 4: Relative Displacement of the sample with respect to the marble

+
+
+
+ +
+

2.4 Frequency Domain

+
+

+We first compute some parameters that will be used for the PSD computation. +

+
+
dt = ty_of(2, 3)-ty_of(1, 3);
+
+Fs = 1/dt; % [Hz]
+
+win = hanning(ceil(10*Fs));
+
+
+ +

+Then we compute the Power Spectral Density using pwelch function. +

+ +

+First for the geophone located on the marble +

+
+
[pxof_m, f] = pwelch(ty_of(:, 1), win, [], [], Fs);
+[pxon_m, ~] = pwelch(ty_on(:, 1), win, [], [], Fs);
+[px1h_m, ~] = pwelch(ty_1h(:, 1), win, [], [], Fs);
+
+
+ +

+And for the geophone located at the sample position. +

+
+
[pxof_s, f] = pwelch(ty_of(:, 2), win, [], [], Fs);
+[pxon_s, ~] = pwelch(ty_on(:, 2), win, [], [], Fs);
+[px1h_s, ~] = pwelch(ty_1h(:, 2), win, [], [], Fs);
+
+
+ +

+Finally, for the relative velocity. +

+
+
[pxof_r, f] = pwelch(ty_of(:, 2)-ty_of(:, 1), win, [], [], Fs);
+[pxon_r, ~] = pwelch(ty_on(:, 2)-ty_on(:, 1), win, [], [], Fs);
+[px1h_r, ~] = pwelch(ty_1h(:, 2)-ty_1h(:, 1), win, [], [], Fs);
+
+
+ +

+And we plot the ASD of the measured velocities: +

+
    +
  • figure 5 for the geophone located on the marble
  • +
  • figure 6 for the geophone at the sample position
  • +
  • figure 7 for the relative velocity
  • +
+ +
+
figure;
+hold on;
+plot(f, sqrt(px1h_m), 'DisplayName', 'Marble - Ty 1Hz');
+plot(f, sqrt(pxon_m), 'DisplayName', 'Marble - Ty ON');
+plot(f, sqrt(pxof_m), 'DisplayName', 'Marble - Ty OFF');
+hold off;
+set(gca, 'xscale', 'log');
+set(gca, 'yscale', 'log');
+xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
+legend('Location', 'southwest');
+xlim([1, 500]);
+
+
+ + +
+

psd_marble_compare.png +

+

Figure 5: Comparison of the ASD of the measured velocities from the Geophone on the marble

+
+ +
+
figure;
+hold on;
+plot(f, sqrt(px1h_s), 'DisplayName', 'Sample - Ty 1Hz');
+plot(f, sqrt(pxon_s), 'DisplayName', 'Sample - Ty ON');
+plot(f, sqrt(pxof_s), 'DisplayName', 'Sample - Ty OFF');
+hold off;
+set(gca, 'xscale', 'log');
+set(gca, 'yscale', 'log');
+xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
+legend('Location', 'southwest');
+xlim([1, 500]);
+
+
+ + +
+

psd_sample_compare.png +

+

Figure 6: Comparison of the ASD of the measured velocities from the Geophone at the sample location

+
+ +
+
figure;
+hold on;
+plot(f, sqrt(px1h_r), 'DisplayName', 'Relative - Ty 1Hz');
+plot(f, sqrt(pxon_r), 'DisplayName', 'Relative - Ty ON');
+plot(f, sqrt(pxof_r), 'DisplayName', 'Relative - Ty OFF');
+hold off;
+set(gca, 'xscale', 'log');
+set(gca, 'yscale', 'log');
+xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
+legend('Location', 'southwest');
+xlim([1, 500]);
+
+
+ + +
+

psd_relative_compare.png +

+

Figure 7: Comparison of the ASD of the relative velocity

+
+
+
+ +
+

2.5 Ty motion and current

+
+

+The position of the translation stage and current flowing in its actuator are measured using the elmo software and saved as an csv file. +

+
+ +
+

2.5.1 Data pre-processing

+
+

+Let's look at at the start of the csv file. +

+ +
+
sed -n 1,30p mat/Ty-when-Rz-1Hz-and-Ty-1Hz.csv | nl -ba -
+
+
+ +

+The real data starts at line 29. +We then load this cvs file starting at line 29. +

+ +
+
tye_on = csvread("mat/Ty-when-Rz-1Hz.csv", 29, 0);
+tye_1h = csvread("mat/Ty-when-Rz-1Hz-and-Ty-1Hz.csv", 29, 0);
+
+
+
+
+ +
+

2.5.2 Time domain data

+
+

+We plot the position of the translation stage measured by the encoders. +

+ +

+There is 200000 encoder count for each mm, we then divide by 200000 to obtain mm. +

+ +

+The result is shown on figure 8. +

+ +
+
figure;
+subplot(1, 2, 1);
+plot(tye_on(:, 1), (tye_on(:, 2)-mean(tye_on(:, 2)))/200000);
+xlim([0, 5]);
+xlabel('Time [s]'); ylabel('Position [mm]');
+legend({'Ty - ON'}, 'Location', 'northeast');
+
+subplot(1, 2, 2);
+plot(tye_1h(:, 1), (tye_1h(:, 2)-mean(tye_1h(:, 2)))/200000);
+xlim([0, 5]);
+xlabel('Time [s]'); ylabel('Position [mm]');
+legend({'Ty - 1Hz'}, 'Location', 'northeast');
+
+
+ + +
+

ty_position_time.png +

+

Figure 8: Y position of the translation stage measured by the encoders

+
+ + +

+We also plot the current as function of the time on figure 9. +

+ +
+
figure;
+subplot(1, 2, 1);
+plot(tye_on(:, 1), tye_on(:, 3)-mean(tye_on(:, 3)));
+xlim([0, 5]);
+xlabel('Time [s]'); ylabel('Current [A]');
+legend({'Ty - ON'}, 'Location', 'northeast');
+
+subplot(1, 2, 2);
+plot(tye_1h(:, 1), tye_1h(:, 3)-mean(tye_1h(:, 3)));
+xlim([0, 5]);
+xlabel('Time [s]'); ylabel('Current [A]');
+legend({'Ty - 1Hz'}, 'Location', 'northeast');
+
+
+ + +
+

ty_current_time.png +

+

Figure 9: Current going through the actuator of the translation stage

+
+
+
+
+ +
+

2.6 Conclusion

+
+
+
    +
  • +
+ +

Author: Dehaeze Thomas

-

Created: 2019-05-15 mer. 08:38

+

Created: 2019-05-15 mer. 15:49

Validate

diff --git a/disturbance-ty-sr/index.org b/disturbance-ty-sr/index.org index c066b2c..c131ce1 100644 --- a/disturbance-ty-sr/index.org +++ b/disturbance-ty-sr/index.org @@ -93,6 +93,7 @@ Each of the measurement =mat= file contains one =data= array with 3 columns: ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> + addpath('../src'); #+end_src #+begin_src matlab :exports none :results silent :noweb yes @@ -101,40 +102,351 @@ Each of the measurement =mat= file contains one =data= array with 3 columns: ** Load data #+begin_src matlab - ty_off = load('mat/data_050.mat', 'data'); ty_off = ty_off.data; - ty_on = load('mat/data_051.mat', 'data'); ty_on = ty_on.data; - ty_1hz = load('mat/data_052.mat', 'data'); ty_1hz = ty_1hz.data; + ty_of = load('mat/data_050.mat', 'data'); ty_of = ty_of.data; + ty_on = load('mat/data_051.mat', 'data'); ty_on = ty_on.data; + ty_1h = load('mat/data_052.mat', 'data'); ty_1h = ty_1h.data; +#+end_src + +** Voltage to Velocity +We convert the measured voltage to velocity using the function =voltageToVelocityL22= (accessible [[file:~/MEGA/These/meas/src/index.org][here]]). + +#+begin_src matlab + gain = 40; % [dB] + + ty_of(:, 1) = voltageToVelocityL22(ty_of(:, 1), ty_of(:, 3), gain); + ty_on(:, 1) = voltageToVelocityL22(ty_on(:, 1), ty_on(:, 3), gain); + ty_1h(:, 1) = voltageToVelocityL22(ty_1h(:, 1), ty_1h(:, 3), gain); + + ty_of(:, 2) = voltageToVelocityL22(ty_of(:, 2), ty_of(:, 3), gain); + ty_on(:, 2) = voltageToVelocityL22(ty_on(:, 2), ty_on(:, 3), gain); + ty_1h(:, 2) = voltageToVelocityL22(ty_1h(:, 2), ty_1h(:, 3), gain); #+end_src ** Time domain plots -#+begin_src matlab - figure; - hold on; - plot(ty_1hz(:, 3), ty_1hz(:, 1), 'DisplayName', 'Marble - Z'); - plot(ty_on(:, 3), ty_on(:, 1), 'DisplayName', 'Marble - Z'); - plot(ty_off(:, 3), ty_off(:, 1), 'DisplayName', 'Marble - Z'); - hold off; - xlabel('Time [s]'); ylabel('Voltage [V]'); - xlim([0, 100]); ylim([-5, 5]); - legend('Location', 'northeast'); -#+end_src +We plot the measured velocity of the marble (figure [[fig:ty_marble_time]]), sample (figure [[fig:ty_sample_time]]) and the relative velocity of the sample with respect to the marble (figure [[fig:ty_relative_time]]). -#+begin_src matlab - xlim([0, 1]); -#+end_src +We also integrate the relative velocity to obtain the relative displacement (figure [[fig:ty_relative_disp_time]]). #+begin_src matlab figure; hold on; - plot(ty_1hz(:, 3), ty_1hz(:, 2), 'DisplayName', 'Marble - Z'); - plot(ty_on(:, 3), ty_on(:, 2), 'DisplayName', 'Marble - Z'); - plot(ty_off(:, 3), ty_off(:, 2), 'DisplayName', 'Marble - Z'); + plot(ty_1h(:, 3), ty_1h(:, 1), 'DisplayName', 'Marble - Ty 1Hz'); + plot(ty_on(:, 3), ty_on(:, 1), 'DisplayName', 'Marble - Ty ON'); + plot(ty_of(:, 3), ty_of(:, 1), 'DisplayName', 'Marble - Ty OFF'); hold off; - xlabel('Time [s]'); ylabel('Voltage [V]'); - xlim([0, 100]); ylim([-5, 5]); - legend('Location', 'northeast'); + xlabel('Time [s]'); ylabel('Velocity [m/s]'); + xlim([0, 2]); + legend('Location', 'southwest'); #+end_src -#+begin_src matlab - xlim([0, 1]); +#+NAME: fig:ty_marble_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_marble_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> #+end_src + +#+NAME: fig:ty_marble_time +#+CAPTION: Velocity of the marble in the vertical direction +#+RESULTS: fig:ty_marble_time +[[file:figs/ty_marble_time.png]] + +#+begin_src matlab + figure; + hold on; + plot(ty_1h(:, 3), ty_1h(:, 2), 'DisplayName', 'Sample - Ty - 1Hz'); + plot(ty_on(:, 3), ty_on(:, 2), 'DisplayName', 'Sample - Ty - ON'); + plot(ty_of(:, 3), ty_of(:, 2), 'DisplayName', 'Sample - Ty - OFF'); + hold off; + xlabel('Time [s]'); ylabel('Velocity [m/s]'); + xlim([0, 2]); + legend('Location', 'southwest'); +#+end_src + +#+NAME: fig:ty_sample_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_sample_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:ty_sample_time +#+CAPTION: Velocity of the sample in the vertical direction +#+RESULTS: fig:ty_sample_time +[[file:figs/ty_sample_time.png]] + +#+begin_src matlab + figure; + hold on; + plot(ty_1h(:, 3), ty_1h(:, 2)-ty_1h(:, 1), 'DisplayName', 'Relative Velocity - Ty - 1Hz'); + plot(ty_on(:, 3), ty_on(:, 2)-ty_on(:, 1), 'DisplayName', 'Relative Velocity - Ty - ON'); + plot(ty_of(:, 3), ty_of(:, 2)-ty_of(:, 1), 'DisplayName', 'Relative Velocity - Ty - OFF'); + hold off; + xlabel('Time [s]'); ylabel('Velocity [m/s]'); + xlim([0, 2]); + legend('Location', 'southwest'); +#+end_src + +#+NAME: fig:ty_relative_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_relative_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:ty_relative_time +#+CAPTION: Relative velocity of the sample with respect to the marble +#+RESULTS: fig:ty_relative_time +[[file:figs/ty_relative_time.png]] + +#+begin_src matlab + figure; + hold on; + plot(ty_1h(:, 3), lsim(1/s, ty_1h(:, 2)-ty_1h(:, 1), ty_1h(:, 3)), 'DisplayName', 'Relative Displacement- Ty - 1Hz'); + plot(ty_on(:, 3), lsim(1/s, ty_on(:, 2)-ty_on(:, 1), ty_on(:, 3)), 'DisplayName', 'Relative Displacement- Ty - ON'); + plot(ty_of(:, 3), lsim(1/s, ty_of(:, 2)-ty_of(:, 1), ty_of(:, 3)), 'DisplayName', 'Relative Displacement- Ty - OFF'); + hold off; + xlabel('Time [s]'); ylabel('Displacement [m]'); + xlim([0, 2]); + legend('Location', 'southwest'); +#+end_src + +#+NAME: fig:ty_relative_disp_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_relative_disp_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:ty_relative_disp_time +#+CAPTION: Relative Displacement of the sample with respect to the marble +#+RESULTS: fig:ty_relative_disp_time +[[file:figs/ty_relative_disp_time.png]] + +** Frequency Domain +We first compute some parameters that will be used for the PSD computation. +#+begin_src matlab :results none + dt = ty_of(2, 3)-ty_of(1, 3); + + Fs = 1/dt; % [Hz] + + win = hanning(ceil(10*Fs)); +#+end_src + +Then we compute the Power Spectral Density using =pwelch= function. + +First for the geophone located on the marble +#+begin_src matlab + [pxof_m, f] = pwelch(ty_of(:, 1), win, [], [], Fs); + [pxon_m, ~] = pwelch(ty_on(:, 1), win, [], [], Fs); + [px1h_m, ~] = pwelch(ty_1h(:, 1), win, [], [], Fs); +#+end_src + +And for the geophone located at the sample position. +#+begin_src matlab + [pxof_s, f] = pwelch(ty_of(:, 2), win, [], [], Fs); + [pxon_s, ~] = pwelch(ty_on(:, 2), win, [], [], Fs); + [px1h_s, ~] = pwelch(ty_1h(:, 2), win, [], [], Fs); +#+end_src + +Finally, for the relative velocity. +#+begin_src matlab + [pxof_r, f] = pwelch(ty_of(:, 2)-ty_of(:, 1), win, [], [], Fs); + [pxon_r, ~] = pwelch(ty_on(:, 2)-ty_on(:, 1), win, [], [], Fs); + [px1h_r, ~] = pwelch(ty_1h(:, 2)-ty_1h(:, 1), win, [], [], Fs); +#+end_src + +And we plot the ASD of the measured velocities: +- figure [[fig:psd_marble_compare]] for the geophone located on the marble +- figure [[fig:psd_sample_compare]] for the geophone at the sample position +- figure [[fig:psd_relative_compare]] for the relative velocity + +#+begin_src matlab :results none + figure; + hold on; + plot(f, sqrt(px1h_m), 'DisplayName', 'Marble - Ty 1Hz'); + plot(f, sqrt(pxon_m), 'DisplayName', 'Marble - Ty ON'); + plot(f, sqrt(pxof_m), 'DisplayName', 'Marble - Ty OFF'); + hold off; + set(gca, 'xscale', 'log'); + set(gca, 'yscale', 'log'); + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') + legend('Location', 'southwest'); + xlim([1, 500]); +#+end_src + +#+NAME: fig:psd_marble_compare +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/psd_marble_compare.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:psd_marble_compare +#+CAPTION: Comparison of the ASD of the measured velocities from the Geophone on the marble +#+RESULTS: fig:psd_marble_compare +[[file:figs/psd_marble_compare.png]] + +#+begin_src matlab :results none + figure; + hold on; + plot(f, sqrt(px1h_s), 'DisplayName', 'Sample - Ty 1Hz'); + plot(f, sqrt(pxon_s), 'DisplayName', 'Sample - Ty ON'); + plot(f, sqrt(pxof_s), 'DisplayName', 'Sample - Ty OFF'); + hold off; + set(gca, 'xscale', 'log'); + set(gca, 'yscale', 'log'); + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') + legend('Location', 'southwest'); + xlim([1, 500]); +#+end_src + +#+NAME: fig:psd_sample_compare +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/psd_sample_compare.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:psd_sample_compare +#+CAPTION: Comparison of the ASD of the measured velocities from the Geophone at the sample location +#+RESULTS: fig:psd_sample_compare +[[file:figs/psd_sample_compare.png]] + +#+begin_src matlab :results none + figure; + hold on; + plot(f, sqrt(px1h_r), 'DisplayName', 'Relative - Ty 1Hz'); + plot(f, sqrt(pxon_r), 'DisplayName', 'Relative - Ty ON'); + plot(f, sqrt(pxof_r), 'DisplayName', 'Relative - Ty OFF'); + hold off; + set(gca, 'xscale', 'log'); + set(gca, 'yscale', 'log'); + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') + legend('Location', 'southwest'); + xlim([1, 500]); +#+end_src + +#+NAME: fig:psd_relative_compare +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/psd_relative_compare.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:psd_relative_compare +#+CAPTION: Comparison of the ASD of the relative velocity +#+RESULTS: fig:psd_relative_compare +[[file:figs/psd_relative_compare.png]] + +** Ty motion and current +The position of the translation stage and current flowing in its actuator are measured using the elmo software and saved as an csv file. + +*** Data pre-processing +Let's look at at the start of the csv file. + +#+begin_src bash :results output + sed -n 1,30p mat/Ty-when-Rz-1Hz-and-Ty-1Hz.csv | nl -ba - +#+end_src + +#+RESULTS: +#+begin_example + 1 Elmo txt chart ver 2.0 + 2 + 3 [File Properties] + 4 Creation Time,2019-05-13 05:33:43 + 5 Last Updated,2019-05-13 05:33:43 + 6 Resolution,0.001 + 7 Sampling Time,5E-05 + 8 Recording Time,5.461 + 9 + 10 [Chart Properties] + 11 No.,Name,X Linear,X No. + 12 1,Chart #1,True,0 + 13 2,Chart #2,True,0 + 14 + 15 [Chart Data] + 16 Display No.,X No.,Y No.,X Unit,Y Unit,Color,Style,Width + 17 1,1,2,sec,N/A,ff0000ff,Solid,TwoPoint + 18 2,1,3,sec,N/A,ff0000ff,Solid,TwoPoint + 19 2,1,4,sec,N/A,ff007f00,Solid,TwoPoint + 20 + 21 [Signal Names] + 22 1,Time (sec) + 23 2,Position [cnt] + 24 3,Current Command [A] + 25 4,Total Current Command [A] + 26 + 27 [Signals Data Group 1] + 28 1,2,3,4, + 29 0,-141044,-0.537239575086517,-0.537239575086517, + 30 0.001,-143127,-0.530803752974691,-0.530803752974691, +#+end_example + +The real data starts at line 29. +We then load this =cvs= file starting at line 29. + +#+begin_src matlab + tye_on = csvread("mat/Ty-when-Rz-1Hz.csv", 29, 0); + tye_1h = csvread("mat/Ty-when-Rz-1Hz-and-Ty-1Hz.csv", 29, 0); +#+end_src + +*** Time domain data +We plot the position of the translation stage measured by the encoders. + +There is 200000 encoder count for each mm, we then divide by 200000 to obtain mm. + +The result is shown on figure [[fig:ty_position_time]]. + +#+begin_src matlab + figure; + subplot(1, 2, 1); + plot(tye_on(:, 1), (tye_on(:, 2)-mean(tye_on(:, 2)))/200000); + xlim([0, 5]); + xlabel('Time [s]'); ylabel('Position [mm]'); + legend({'Ty - ON'}, 'Location', 'northeast'); + + subplot(1, 2, 2); + plot(tye_1h(:, 1), (tye_1h(:, 2)-mean(tye_1h(:, 2)))/200000); + xlim([0, 5]); + xlabel('Time [s]'); ylabel('Position [mm]'); + legend({'Ty - 1Hz'}, 'Location', 'northeast'); +#+end_src + +#+NAME: fig:ty_position_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_position_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:ty_position_time +#+CAPTION: Y position of the translation stage measured by the encoders +#+RESULTS: fig:ty_position_time +[[file:figs/ty_position_time.png]] + + +We also plot the current as function of the time on figure [[fig:ty_current_time]]. + +#+begin_src matlab + figure; + subplot(1, 2, 1); + plot(tye_on(:, 1), tye_on(:, 3)-mean(tye_on(:, 3))); + xlim([0, 5]); + xlabel('Time [s]'); ylabel('Current [A]'); + legend({'Ty - ON'}, 'Location', 'northeast'); + + subplot(1, 2, 2); + plot(tye_1h(:, 1), tye_1h(:, 3)-mean(tye_1h(:, 3))); + xlim([0, 5]); + xlabel('Time [s]'); ylabel('Current [A]'); + legend({'Ty - 1Hz'}, 'Location', 'northeast'); +#+end_src + +#+NAME: fig:ty_current_time +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/ty_current_time.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:ty_current_time +#+CAPTION: Current going through the actuator of the translation stage +#+RESULTS: fig:ty_current_time +[[file:figs/ty_current_time.png]] + +** Conclusion +#+begin_important + - +#+end_important diff --git a/disturbance-ty-sr/matlab/disturbance_ty_sr.m b/disturbance-ty-sr/matlab/disturbance_ty_sr.m new file mode 100644 index 0000000..c0dd0d0 --- /dev/null +++ b/disturbance-ty-sr/matlab/disturbance_ty_sr.m @@ -0,0 +1,250 @@ +%% Clear Workspace and Close figures +clear; close all; clc; + +%% Intialize Laplace variable +s = zpk('s'); + +% Load data + +ty_of = load('mat/data_050.mat', 'data'); ty_of = ty_of.data; +ty_on = load('mat/data_051.mat', 'data'); ty_on = ty_on.data; +ty_1h = load('mat/data_052.mat', 'data'); ty_1h = ty_1h.data; + +% Voltage to Velocity +% We convert the measured voltage to velocity using the function =voltageToVelocityL22= (accessible [[file:~/MEGA/These/meas/src/index.org][here]]). + + +gain = 40; % [dB] + +ty_of(:, 1) = voltageToVelocityL22(ty_of(:, 1), ty_of(:, 3), gain); +ty_on(:, 1) = voltageToVelocityL22(ty_on(:, 1), ty_on(:, 3), gain); +ty_1h(:, 1) = voltageToVelocityL22(ty_1h(:, 1), ty_1h(:, 3), gain); + +ty_of(:, 2) = voltageToVelocityL22(ty_of(:, 2), ty_of(:, 3), gain); +ty_on(:, 2) = voltageToVelocityL22(ty_on(:, 2), ty_on(:, 3), gain); +ty_1h(:, 2) = voltageToVelocityL22(ty_1h(:, 2), ty_1h(:, 3), gain); + +% Time domain plots + +figure; +hold on; +plot(ty_1h(:, 3), ty_1h(:, 1), 'DisplayName', 'Marble - Ty 1Hz'); +plot(ty_on(:, 3), ty_on(:, 1), 'DisplayName', 'Marble - Ty ON'); +plot(ty_of(:, 3), ty_of(:, 1), 'DisplayName', 'Marble - Ty OFF'); +hold off; +xlabel('Time [s]'); ylabel('Velocity [m/s]'); +xlim([0, 100]); +legend('Location', 'southwest'); + + + +% #+NAME: fig:ty_marble_time_zoom +% #+CAPTION: caption +% #+RESULTS: fig:ty_marble_time_zoom +% [[file:figs/ty_marble_time_zoom.png]] + + +figure; +hold on; +plot(ty_1h(:, 3), ty_1h(:, 2), 'DisplayName', 'Sample - Ty - 1Hz'); +plot(ty_on(:, 3), ty_on(:, 2), 'DisplayName', 'Sample - Ty - ON'); +plot(ty_of(:, 3), ty_of(:, 2), 'DisplayName', 'Sample - Ty - OFF'); +hold off; +xlabel('Time [s]'); ylabel('Velocity [m/s]'); +xlim([0, 100]); +legend('Location', 'southwest'); + +% Relative Velocity + +figure; +hold on; +plot(ty_1h(:, 3), ty_1h(:, 2)-ty_1h(:, 1), 'DisplayName', 'Relative Velocity - Ty - 1Hz'); +plot(ty_on(:, 3), ty_on(:, 2)-ty_on(:, 1), 'DisplayName', 'Relative Velocity - Ty - ON'); +plot(ty_of(:, 3), ty_of(:, 2)-ty_of(:, 1), 'DisplayName', 'Relative Velocity - Ty - OFF'); +hold off; +xlabel('Time [s]'); ylabel('Velocity [m/s]'); +xlim([0, 100]); +legend('Location', 'southwest'); + +% Frequency Domain +% We first compute some parameters that will be used for the PSD computation. + +dt = ty_of(2, 3)-ty_of(1, 3); + +Fs = 1/dt; % [Hz] + +win = hanning(ceil(10*Fs)); + + + +% Then we compute the Power Spectral Density using =pwelch= function. + +% First for the geophone located on the marble + +[pxof_m, f] = pwelch(ty_of(:, 1), win, [], [], Fs); +[pxon_m, ~] = pwelch(ty_on(:, 1), win, [], [], Fs); +[px1h_m, ~] = pwelch(ty_1h(:, 1), win, [], [], Fs); + + + +% And for the geophone located at the sample position. + +[pxof_s, f] = pwelch(ty_of(:, 2), win, [], [], Fs); +[pxon_s, ~] = pwelch(ty_on(:, 2), win, [], [], Fs); +[px1h_s, ~] = pwelch(ty_1h(:, 2), win, [], [], Fs); + + + +% Finally, for the relative velocity. + +[pxof_r, f] = pwelch(ty_of(:, 2)-ty_of(:, 1), win, [], [], Fs); +[pxon_r, ~] = pwelch(ty_on(:, 2)-ty_on(:, 1), win, [], [], Fs); +[px1h_r, ~] = pwelch(ty_1h(:, 2)-ty_1h(:, 1), win, [], [], Fs); + + + +% And we plot the ASD of the measured velocities: +% - figure [[fig:psd_marble_compare]] for the geophone located on the marble +% - figure [[fig:psd_sample_compare]] for the geophone at the sample position +% - figure [[fig:psd_relative_compare]] for the relative velocity + + +figure; +hold on; +plot(f, sqrt(px1h_m), 'DisplayName', 'Marble - Ty 1Hz'); +plot(f, sqrt(pxon_m), 'DisplayName', 'Marble - Ty ON'); +plot(f, sqrt(pxof_m), 'DisplayName', 'Marble - Ty OFF'); +hold off; +set(gca, 'xscale', 'log'); +set(gca, 'yscale', 'log'); +xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') +legend('Location', 'southwest'); +xlim([1, 500]); + + + +% #+NAME: fig:psd_marble_compare +% #+CAPTION: Comparison of the ASD of the measured velocities from the Geophone on the marble +% #+RESULTS: fig:psd_marble_compare +% [[file:figs/psd_marble_compare.png]] + + +figure; +hold on; +plot(f, sqrt(px1h_s), 'DisplayName', 'Sample - Ty 1Hz'); +plot(f, sqrt(pxon_s), 'DisplayName', 'Sample - Ty ON'); +plot(f, sqrt(pxof_s), 'DisplayName', 'Sample - Ty OFF'); +hold off; +set(gca, 'xscale', 'log'); +set(gca, 'yscale', 'log'); +xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') +legend('Location', 'southwest'); +xlim([2, 500]); + + + +% #+NAME: fig:psd_sample_compare +% #+CAPTION: Comparison of the ASD of the measured velocities from the Geophone at the sample location +% #+RESULTS: fig:psd_sample_compare +% [[file:figs/psd_sample_compare.png]] + + +figure; +hold on; +plot(f, sqrt(px1h_r), 'DisplayName', 'Relative - Ty 1Hz'); +plot(f, sqrt(pxon_r), 'DisplayName', 'Relative - Ty ON'); +plot(f, sqrt(pxof_r), 'DisplayName', 'Relative - Ty OFF'); +hold off; +set(gca, 'xscale', 'log'); +set(gca, 'yscale', 'log'); +xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') +legend('Location', 'southwest'); +xlim([2, 500]); + + + +% #+RESULTS: +% #+begin_example +% 1 Elmo txt chart ver 2.0 +% 2 +% 3 [File Properties] +% 4 Creation Time,2019-05-13 05:33:43 +% 5 Last Updated,2019-05-13 05:33:43 +% 6 Resolution,0.001 +% 7 Sampling Time,5E-05 +% 8 Recording Time,5.461 +% 9 +% 10 [Chart Properties] +% 11 No.,Name,X Linear,X No. +% 12 1,Chart #1,True,0 +% 13 2,Chart #2,True,0 +% 14 +% 15 [Chart Data] +% 16 Display No.,X No.,Y No.,X Unit,Y Unit,Color,Style,Width +% 17 1,1,2,sec,N/A,ff0000ff,Solid,TwoPoint +% 18 2,1,3,sec,N/A,ff0000ff,Solid,TwoPoint +% 19 2,1,4,sec,N/A,ff007f00,Solid,TwoPoint +% 20 +% 21 [Signal Names] +% 22 1,Time (sec) +% 23 2,Position [cnt] +% 24 3,Current Command [A] +% 25 4,Total Current Command [A] +% 26 +% 27 [Signals Data Group 1] +% 28 1,2,3,4, +% 29 0,-141044,-0.537239575086517,-0.537239575086517, +% 30 0.001,-143127,-0.530803752974691,-0.530803752974691, +% #+end_example + +% The real data starts at line 29. +% We then load this =cvs= file starting at line 29. + + +ty_on = csvread("mat/Ty-when-Rz-1Hz.csv", 29, 0); +ty_1h = csvread("mat/Ty-when-Rz-1Hz-and-Ty-1Hz.csv", 29, 0); + +% Time domain data +% We plot the position of the translation stage measured by the encoders. + +% There is 200000 encoder count for each mm, we then divide by 200000 to obtain mm. + +% The result is shown on figure [[fig:ty_position_time]]. + + +figure; +subplot(1, 2, 1); +plot(ty_on(:, 1), (ty_on(:, 2)-mean(ty_on(:, 2)))/200000); +xlim([0, 5]); +xlabel('Time [s]'); ylabel('Position [mm]'); +legend({'Ty - ON'}, 'Location', 'northeast'); + +subplot(1, 2, 2); +plot(ty_1h(:, 1), (ty_1h(:, 2)-mean(ty_1h(:, 2)))/200000); +xlim([0, 5]); +xlabel('Time [s]'); ylabel('Position [mm]'); +legend({'Ty - 1Hz'}, 'Location', 'northeast'); + + + +% #+NAME: fig:ty_position_time +% #+CAPTION: Y position of the translation stage measured by the encoders +% #+RESULTS: fig:ty_position_time +% [[file:figs/ty_position_time.png]] + + +% We also plot the current as function of the time on figure [[fig:ty_current_time]]. + + +figure; +subplot(1, 2, 1); +plot(ty_on(:, 1), ty_on(:, 3)-mean(ty_on(:, 3))); +xlim([0, 5]); +xlabel('Time [s]'); ylabel('Current [A]'); +legend({'Ty - ON'}, 'Location', 'northeast'); + +subplot(1, 2, 2); +plot(ty_1h(:, 1), ty_1h(:, 3)-mean(ty_1h(:, 3))); +xlim([0, 5]); +xlabel('Time [s]'); ylabel('Current [A]'); +legend({'Ty - 1Hz'}, 'Location', 'northeast'); diff --git a/disturbance-ty/figs/asd_z_direction.png b/disturbance-ty/figs/asd_z_direction.png index 9732b0f..f5c9b47 100644 Binary files a/disturbance-ty/figs/asd_z_direction.png and b/disturbance-ty/figs/asd_z_direction.png differ diff --git a/disturbance-ty/index.aux b/disturbance-ty/index.aux new file mode 100644 index 0000000..f23e546 --- /dev/null +++ b/disturbance-ty/index.aux @@ -0,0 +1 @@ +\relax diff --git a/disturbance-ty/index.html b/disturbance-ty/index.html index 283124a..40b3410 100644 --- a/disturbance-ty/index.html +++ b/disturbance-ty/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Vibrations induced by the translation stage motion @@ -258,29 +258,29 @@ for the JavaScript code in this tag.

Table of Contents

-
-

1 Measurement description

+
+

1 Measurement description

Setup: @@ -310,7 +310,7 @@ The scans are done with the ELMO software.

-The North of the Geophones corresponds to the +Y direction and the East of the Geophones to the +X direction (see figure 1). +The North of the Geophones corresponds to the +Y direction and the East of the Geophones to the +X direction (see figure 1).

@@ -394,7 +394,7 @@ Each of the measurement mat file contains one data arr -

+

IMG_20190513_163032.jpg

Figure 1: Picture of the experimental setup

@@ -402,11 +402,11 @@ Each of the measurement mat file contains one data arr
-
-

2 Measurement Analysis

+
+

2 Measurement Analysis

- +

@@ -416,8 +416,8 @@ All the files (data and Matlab scripts) are accessible -

2.1 Load data

+
+

2.1 Load data

z_ty = load('mat/data_040.mat', 'data'); z_ty = z_ty.data;
@@ -428,8 +428,8 @@ e_of = load(
-

2.2 Voltage to Velocity

+
-
-

2.3 Time domain plots

+
+

2.3 Time domain plots

figure;
@@ -464,14 +464,14 @@ legend(
+

ty_z_time.png

Figure 2: Z velocity of the sample and marble when scanning with the translation stage

-
+

ty_z_time_zoom.png

Figure 3: Z velocity of the sample and marble when scanning with the translation stage - Zoom

@@ -491,14 +491,14 @@ legend( +

ty_e_time.png

Figure 4: Velocity of the sample and marble in the east direction when scanning with the translation stage

-
+

ty_e_time_zoom.png

Figure 5: Velocity of the sample and marble in the east direction when scanning with the translation stage - Zoom

@@ -506,9 +506,17 @@ legend( -

2.4 Frequency Domain analysis

+
+

2.4 Frequency Domain analysis

+

+We get the typical ground velocity to compare with the velocities measured. +

+
+
[pxx_gm, f_gm] = getPSDGroundVelocity();
+
+
+

We first compute some parameters that will be used for the PSD computation.

@@ -549,9 +557,9 @@ And for the geophone located at the sample position. And we plot the ASD of the measured velocities:

    -
  • figure 6 compares the marble velocity in the east direction when scanning and when Ty is OFF
  • -
  • figure 7 compares the sample velocity in the east direction when scanning and when Ty is OFF
  • -
  • figure 8 shows the marble and sample velocities in the Z direction when scanning with the translation stage
  • +
  • figure 6 compares the marble velocity in the east direction when scanning and when Ty is OFF
  • +
  • figure 7 compares the sample velocity in the east direction when scanning and when Ty is OFF
  • +
  • figure 8 shows the marble and sample velocities in the Z direction when scanning with the translation stage
@@ -559,6 +567,7 @@ And we plot the ASD of the measured velocities: hold on; plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X'); plot(f, sqrt(pxe_of_m), 'DisplayName', 'Ty OFF - Marble - X'); +plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion'); hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); @@ -569,7 +578,7 @@ xlim( +

asd_east_marble.png

Figure 6: Amplitude spectral density of the measured velocities corresponding to the geophone in the east direction located on the marble when the translation stage is OFF and when it is scanning at 1Hz

@@ -581,17 +590,18 @@ xlim((f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X'); plot(f, sqrt(pxe_of_s), 'DisplayName', 'Ty OFF - Sample - X'); +plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion'); hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') legend('Location', 'northwest'); -xlim([0.1, 500]); ylim([1e-5, 1e1]); +xlim([0.1, 500]);
-
+

asd_east_sample.png

Figure 7: Amplitude spectral density of the measured velocities corresponding to the geophone in the east direction located at the sample location when the translation stage is OFF and when it is scanning at 1Hz

@@ -603,33 +613,34 @@ xlim((f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z'); plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z'); +plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion'); hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); -xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$') +xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') legend('Location', 'northwest'); xlim([0.1, 500]);
-
+

asd_z_direction.png

-

Figure 8: Amplitude spectral density of the measure voltage corresponding to the geophone in the vertical direction located on the granite and at the sample location when the translation stage is scanning at 1Hz

+

Figure 8: Amplitude spectral density of the measure velocity corresponding to the geophone in the vertical direction located on the granite and at the sample location when the translation stage is scanning at 1Hz

-
-

2.5 Transfer function from marble motion in the East direction to sample motion in the East direction

+
+

2.5 Transfer function from marble motion in the East direction to sample motion in the East direction

Let's compute the transfer function for the marble velocity in the east direction to the sample velocity in the east direction.

-We first plot the time domain motions when every stage is off (figure 9). +We first plot the time domain motions when every stage is off (figure 9).

@@ -645,7 +656,7 @@ legend( +

east_marble_sample.png

Figure 9: Velocity in the east direction of the marble and sample when all the stages are OFF

@@ -666,10 +677,10 @@ win = hanning(ceil -The result is shown on figure 10. +The result is shown on figure 10.

-
+

tf_east_marble_sample.png

Figure 10: Estimation of the transfer function from marble velocity in the east direction to sample velocity in the east direction

@@ -677,16 +688,16 @@ The result is shown on figure 10.
-
-

2.6 Position of the translation stage and Current

+
+

2.6 Position of the translation stage and Current

The position of the translation and current flowing in its actuator are measured using the elmo software and saved as an csv file.

-
-

2.6.1 Data pre-processing

+
+

2.6.1 Data pre-processing

Let's look at at the start of the csv file. @@ -709,13 +720,13 @@ We then load this cvs file starting at line 29.

-
-

2.6.2 Time domain data

+
+

2.6.2 Time domain data

We plot the position of the translation stage measured by the encoders. There is 200000 encoder count for each mm, we then divide by 200000 to obtain mm. -The result is shown on figure 11. +The result is shown on figure 11.

@@ -729,21 +740,21 @@ xlabel( +

ty_position_time.png

Figure 11: Y position of the translation stage measured by the encoders

-
+

ty_position_time_zoom.png

Figure 12: Y position of the translation stage measured by the encoders - Zoom

-We also plot the current as function of the time on figure 13. +We also plot the current as function of the time on figure 13.

@@ -757,14 +768,14 @@ xlabel( +

current_time.png

Figure 13: Current going through the actuator of the translation stage

-
+

current_time_zoom.png

Figure 14: Current going through the actuator of the translation stage - Zoom

@@ -773,8 +784,8 @@ xlabel( -

2.7 Conclusion

+
+

2.7 Conclusion

    @@ -789,7 +800,7 @@ xlabel(

    Author: Dehaeze Thomas

    -

    Created: 2019-05-14 mar. 17:20

    +

    Created: 2019-05-15 mer. 14:37

    Validate

diff --git a/disturbance-ty/index.org b/disturbance-ty/index.org index 3a9c62f..04e88a5 100644 --- a/disturbance-ty/index.org +++ b/disturbance-ty/index.org @@ -103,6 +103,7 @@ Each of the measurement =mat= file contains one =data= array with 3 columns: ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> + addpath('../src'); #+end_src #+begin_src matlab :exports none :results silent :noweb yes @@ -191,7 +192,7 @@ We convert the measured voltage to velocity using the function =voltageToVelocit [[file:figs/ty_e_time.png]] #+begin_src matlab :exports none - xlim([0, 1]) + xlim([0, 1]); #+end_src #+NAME: fig:ty_e_time_zoom @@ -302,7 +303,7 @@ And we plot the ASD of the measured velocities: hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); - xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$') + xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$') legend('Location', 'northwest'); xlim([0.1, 500]); #+end_src @@ -314,7 +315,7 @@ And we plot the ASD of the measured velocities: #+end_src #+NAME: fig:asd_z_direction -#+CAPTION: Amplitude spectral density of the measure voltage corresponding to the geophone in the vertical direction located on the granite and at the sample location when the translation stage is scanning at 1Hz +#+CAPTION: Amplitude spectral density of the measure velocity corresponding to the geophone in the vertical direction located on the granite and at the sample location when the translation stage is scanning at 1Hz #+RESULTS: fig:asd_z_direction [[file:figs/asd_z_direction.png]]