diff --git a/disturbance-control-system/figs/time_domain_relative_disp.png b/disturbance-control-system/figs/time_domain_relative_disp.png new file mode 100644 index 0000000..87a90f9 Binary files /dev/null and b/disturbance-control-system/figs/time_domain_relative_disp.png differ diff --git a/disturbance-control-system/index.html b/disturbance-control-system/index.html index 5d978e0..bb97287 100644 --- a/disturbance-control-system/index.html +++ b/disturbance-control-system/index.html @@ -3,10 +3,10 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + -Measurements +Effect on the control system of each stages on the vibration of the station + + + + + + + + + + + + +
+ UP + | + HOME +
+

Transfer function from velocity of one stage to the velocity of another stage using geophones

+
+

Table of Contents

+ +
+ +
+

1 Experimental Setup

+
+

+For all the measurements in this section: +

+
    +
  • all the control stages are OFF.
  • +
  • the measurements are on the \(z\) direction
  • +
+
+ +
+

1.1 From Marble to Ty - mat/meas_010.mat

+
+

+One geophone is on the marble, one is on the Ty stage (see figures 1, 2 and 3). +

+ +

+The data array contains the following columns: +

+ + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + +
ColumnDescription
1Ground
2Ty
3Time
+ + +
+

IMG_20190430_155330.jpg +

+

Figure 1: Setup with one geophone on the marble and one on top of the translation stage

+
+ + +
+

IMG_20190430_155335.jpg +

+

Figure 2: Setup with one geophone on the marble and one on top of the translation stage - Close up view

+
+ + +
+

IMG_20190430_155342.jpg +

+

Figure 3: Setup with one geophone on the marble and one on top of the translation stage - Top view

+
+
+
+ +
+

1.2 From Marble to Ry - mat/meas_011.mat

+
+

+One geophone is on the marble, one is on the Ry stage (see figure 4) +

+ +

+The data array contains the following columns: +

+ + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + +
ColumnDescription
1Ground
2Ry
3Time
+ + +
+

IMG_20190430_163919.jpg +

+

Figure 4: Setup with one geophone on the marble and one on top of the Tilt Stage

+
+
+
+ +
+

1.3 From Ty to Ry - mat/meas_012.mat

+
+

+One geophone is on the Ty stage, one is on the Ry stage (see figures 5, 6 and 7) +One geophone on the Ty stage, one geophone on the Ry stage. +

+ +

+The data array contains the following columns: +

+ + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + +
ColumnDescription
1Ty
2Ry
3Time
+ + +
+

IMG_20190430_170405.jpg +

+

Figure 5: Setup with one geophone on the translation stage and one on top of the Tilt Stage

+
+ + +
+

IMG_20190430_170418.jpg +

+

Figure 6: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Top view

+
+ + +
+

IMG_20190430_170425.jpg +

+

Figure 7: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Close up view

+
+
+
+
+ +
+

2 Measurement Analysis

+
+

+ +

+
+

+All the files (data and Matlab scripts) are accessible here. +

+ +
+
+ +
+

2.1 Load data

+
+

+We load the data of the z axis of two geophones. +

+
+
m_ty  = load('mat/data_010.mat', 'data'); m_ty  = m_ty.data;
+m_ry  = load('mat/data_011.mat', 'data'); m_ry  = m_ry.data;
+ty_ry = load('mat/data_012.mat', 'data'); ty_ry = ty_ry.data;
+
+
+
+
+ +
+

2.2 Analysis - Time Domain

+
+

+First, we can look at the time domain data. +

+ +
+
figure;
+hold on;
+plot(m_ty(:, 3), m_ty(:, 1), 'DisplayName', 'Marble');
+plot(m_ty(:, 3), m_ty(:, 2), 'DisplayName', 'Ty');
+hold off;
+xlabel('Time [s]'); ylabel('Voltage [V]');
+legend('Location', 'northeast');
+xlim([0, 500]);
+
+
+ + +
+

time_domain_m_ty.png +

+

Figure 8: Time domain - Marble and translation stage

+
+ + +
+
figure;
+hold on;
+plot(m_ry(:, 3), m_ry(:, 1), 'DisplayName', 'Marble');
+plot(m_ry(:, 3), m_ry(:, 2), 'DisplayName', 'Ty');
+hold off;
+xlabel('Time [s]'); ylabel('Voltage [V]');
+legend('Location', 'northeast');
+xlim([0, 500]);
+
+
+ + +
+

time_domain_m_ry.png +

+

Figure 9: Time domain - Marble and tilt stage

+
+ +
+
figure;
+hold on;
+plot(ty_ry(:, 3), ty_ry(:, 1), 'DisplayName', 'Ty');
+plot(ty_ry(:, 3), ty_ry(:, 2), 'DisplayName', 'Ry');
+hold off;
+xlabel('Time [s]'); ylabel('Voltage [V]');
+legend('Location', 'northeast');
+xlim([0, 500]);
+
+
+ + +
+

time_domain_ty_ry.png +

+

Figure 10: Time domain - Translation stage and tilt stage

+
+
+
+ +
+

2.3 Analysis - Frequency Domain

+
+
+
dt = m_ty(2, 3) - m_ty(1, 3);
+
+Fs = 1/dt;
+win = hanning(ceil(1*Fs));
+
+
+ +

+First, we compute the transfer function estimate between the two geophones for the 3 experiments (figure 11). We also plot their coherence (figure 12). +

+
+
[T_m_ty,  f] = tfestimate(m_ty(:, 1),  m_ty(:, 2),  win, [], [], Fs);
+[T_m_ry,  ~] = tfestimate(m_ry(:, 1),  m_ry(:, 2),  win, [], [], Fs);
+[T_ty_ry, ~] = tfestimate(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
+
+
+ +
+
figure;
+ax1 = subplot(2, 1, 1);
+hold on;
+plot(f, abs(T_m_ty),  'DisplayName', 'Marble - Ty');
+plot(f, abs(T_m_ry),  'DisplayName', 'Marble - Ry');
+plot(f, abs(T_ty_ry), 'DisplayName', 'Ty - Ry');
+hold off;
+set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
+set(gca, 'XTickLabel',[]);
+ylabel('Magnitude');
+legend('Location', 'northwest');
+
+ax2 = subplot(2, 1, 2);
+hold on;
+plot(f, mod(180+180/pi*phase(T_m_ty),  360)-180);
+plot(f, mod(180+180/pi*phase(T_m_ry),  360)-180);
+plot(f, mod(180+180/pi*phase(T_ty_ry), 360)-180);
+hold off;
+set(gca, 'xscale', 'log');
+ylim([-180, 180]);
+yticks([-180, -90, 0, 90, 180]);
+xlabel('Frequency [Hz]'); ylabel('Phase');
+
+linkaxes([ax1,ax2],'x');
+xlim([10, 500]);
+
+
+ + +
+

compare_tf_geophones.png +

+

Figure 11: Transfer function from the first geophone to the second geophone for the three experiments

+
+ + +
+
[coh_m_ty,  f] = mscohere(m_ty(:, 1),  m_ty(:, 2),  win, [], [], Fs);
+[coh_m_ry,  ~] = mscohere(m_ry(:, 1),  m_ry(:, 2),  win, [], [], Fs);
+[coh_ty_ry, ~] = mscohere(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
+
+
+ + +
+

coherence_two_geophones.png +

+

Figure 12: Coherence between the two geophones for the three experiments

+
+
+
+ +
+

2.4 Conclusion

+
+
+

+These measurements are not relevant. +

+ +
+
+
+
+
+
+

Author: Dehaeze Thomas

+

Created: 2019-05-15 mer. 17:22

+

Validate

+
+ + diff --git a/other-measurements/tf_geophone_stages.org b/other-measurements/tf_geophone_stages.org new file mode 100644 index 0000000..bacf1ef --- /dev/null +++ b/other-measurements/tf_geophone_stages.org @@ -0,0 +1,301 @@ +#+TITLE: Transfer function from velocity of one stage to the velocity of another stage using geophones +:DRAWER: +#+STARTUP: overview + +#+LANGUAGE: en +#+EMAIL: dehaeze.thomas@gmail.com +#+AUTHOR: Dehaeze Thomas + +#+HTML_LINK_HOME: ../index.html +#+HTML_LINK_UP: ../index.html + +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: + +#+HTML_MATHJAX: align: center tagside: right font: TeX + +#+PROPERTY: header-args:matlab :session *MATLAB* +#+PROPERTY: header-args:matlab+ :comments org +#+PROPERTY: header-args:matlab+ :results none +#+PROPERTY: header-args:matlab+ :exports both +#+PROPERTY: header-args:matlab+ :eval no-export +#+PROPERTY: header-args:matlab+ :output-dir figs + +#+PROPERTY: header-args:shell :eval no-export +:END: + +* Experimental Setup +For all the measurements in this section: +- all the control stages are OFF. +- the measurements are on the $z$ direction + +** From Marble to Ty - =mat/meas_010.mat= +One geophone is on the marble, one is on the Ty stage (see figures [[fig:setup_m_ty]], [[fig:setup_m_ty_zoom]] and [[fig:setup_m_ty_top]]). + +The =data= array contains the following columns: +| Column | Description | +|--------+-------------| +| 1 | Ground | +| 2 | Ty | +| 3 | Time | + +#+name: fig:setup_m_ty +#+caption: Setup with one geophone on the marble and one on top of the translation stage +#+attr_html: :width 500px +[[file:./img/IMG_20190430_155330.jpg]] + +#+name: fig:setup_m_ty_zoom +#+caption: Setup with one geophone on the marble and one on top of the translation stage - Close up view +#+attr_html: :width 500px +[[file:./img/IMG_20190430_155335.jpg]] + +#+name: fig:setup_m_ty_top +#+caption: Setup with one geophone on the marble and one on top of the translation stage - Top view +#+attr_html: :width 500px +[[file:./img/IMG_20190430_155342.jpg]] + +** From Marble to Ry - =mat/meas_011.mat= +One geophone is on the marble, one is on the Ry stage (see figure [[fig:setup_m_ry]]) + +The =data= array contains the following columns: +| Column | Description | +|--------+-------------| +| 1 | Ground | +| 2 | Ry | +| 3 | Time | + +#+name: fig:setup_m_ry +#+caption: Setup with one geophone on the marble and one on top of the Tilt Stage +#+attr_html: :width 500px +[[file:./img/IMG_20190430_163919.jpg]] + +** From Ty to Ry - =mat/meas_012.mat= +One geophone is on the Ty stage, one is on the Ry stage (see figures [[fig:setup_ty_ry]], [[fig:setup_ty_ry_top]] and [[fig:setup_ty_ry_zoom]]) +One geophone on the Ty stage, one geophone on the Ry stage. + +The =data= array contains the following columns: +| Column | Description | +|--------+-------------| +| 1 | Ty | +| 2 | Ry | +| 3 | Time | + +#+name: fig:setup_ty_ry +#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage +#+attr_html: :width 500px +[[file:./img/IMG_20190430_170405.jpg]] + +#+name: fig:setup_ty_ry_top +#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Top view +#+attr_html: :width 500px +[[file:./img/IMG_20190430_170418.jpg]] + +#+name: fig:setup_ty_ry_zoom +#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Close up view +#+attr_html: :width 500px +[[file:./img/IMG_20190430_170425.jpg]] + +* Measurement Analysis + :PROPERTIES: + :header-args:matlab+: :tangle matlab/tf_stages_geophone.m + :header-args:matlab+: :comments org :mkdirp yes + :END: + <> + +** ZIP file containing the data and matlab files :ignore: +#+begin_src bash :exports none :results none + if [ matlab/tf_stages_geophone.m -nt data/tf_stages_geophone.zip ]; then + cp matlab/tf_stages_geophone.m tf_stages_geophone.m; + zip data/tf_stages_geophone \ + mat/data_010.mat \ + mat/data_011.mat \ + mat/data_012.mat \ + tf_stages_geophone.m + rm tf_stages_geophone.m; + fi +#+end_src + +#+begin_note + All the files (data and Matlab scripts) are accessible [[file:data/tf_stages_geophone.zip][here]]. +#+end_note + +** 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 + +** Load data +We load the data of the z axis of two geophones. +#+begin_src matlab :results none + m_ty = load('mat/data_010.mat', 'data'); m_ty = m_ty.data; + m_ry = load('mat/data_011.mat', 'data'); m_ry = m_ry.data; + ty_ry = load('mat/data_012.mat', 'data'); ty_ry = ty_ry.data; +#+end_src + +** Analysis - Time Domain +First, we can look at the time domain data. + +#+begin_src matlab :results none + figure; + hold on; + plot(m_ty(:, 3), m_ty(:, 1), 'DisplayName', 'Marble'); + plot(m_ty(:, 3), m_ty(:, 2), 'DisplayName', 'Ty'); + hold off; + xlabel('Time [s]'); ylabel('Voltage [V]'); + legend('Location', 'northeast'); + xlim([0, 500]); +#+end_src + +#+NAME: fig:time_domain_m_ty +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/time_domain_m_ty.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:time_domain_m_ty +#+CAPTION: Time domain - Marble and translation stage +#+RESULTS: fig:time_domain_m_ty +[[file:figs/time_domain_m_ty.png]] + + +#+begin_src matlab :results none + figure; + hold on; + plot(m_ry(:, 3), m_ry(:, 1), 'DisplayName', 'Marble'); + plot(m_ry(:, 3), m_ry(:, 2), 'DisplayName', 'Ty'); + hold off; + xlabel('Time [s]'); ylabel('Voltage [V]'); + legend('Location', 'northeast'); + xlim([0, 500]); +#+end_src + +#+NAME: fig:time_domain_m_ry +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/time_domain_m_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:time_domain_m_ry +#+CAPTION: Time domain - Marble and tilt stage +#+RESULTS: fig:time_domain_m_ry +[[file:figs/time_domain_m_ry.png]] + +#+begin_src matlab :results none + figure; + hold on; + plot(ty_ry(:, 3), ty_ry(:, 1), 'DisplayName', 'Ty'); + plot(ty_ry(:, 3), ty_ry(:, 2), 'DisplayName', 'Ry'); + hold off; + xlabel('Time [s]'); ylabel('Voltage [V]'); + legend('Location', 'northeast'); + xlim([0, 500]); +#+end_src + +#+NAME: fig:time_domain_ty_ry +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/time_domain_ty_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:time_domain_ty_ry +#+CAPTION: Time domain - Translation stage and tilt stage +#+RESULTS: fig:time_domain_ty_ry +[[file:figs/time_domain_ty_ry.png]] + +** Analysis - Frequency Domain +#+begin_src matlab :results none + dt = m_ty(2, 3) - m_ty(1, 3); + + Fs = 1/dt; + win = hanning(ceil(1*Fs)); +#+end_src + +First, we compute the transfer function estimate between the two geophones for the 3 experiments (figure [[fig:compare_tf_geophones]]). We also plot their coherence (figure [[fig:coherence_two_geophones]]). +#+begin_src matlab :results none + [T_m_ty, f] = tfestimate(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs); + [T_m_ry, ~] = tfestimate(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs); + [T_ty_ry, ~] = tfestimate(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs); +#+end_src + +#+begin_src matlab :results none + figure; + ax1 = subplot(2, 1, 1); + hold on; + plot(f, abs(T_m_ty), 'DisplayName', 'Marble - Ty'); + plot(f, abs(T_m_ry), 'DisplayName', 'Marble - Ry'); + plot(f, abs(T_ty_ry), 'DisplayName', 'Ty - Ry'); + hold off; + set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); + set(gca, 'XTickLabel',[]); + ylabel('Magnitude'); + legend('Location', 'northwest'); + + ax2 = subplot(2, 1, 2); + hold on; + plot(f, mod(180+180/pi*phase(T_m_ty), 360)-180); + plot(f, mod(180+180/pi*phase(T_m_ry), 360)-180); + plot(f, mod(180+180/pi*phase(T_ty_ry), 360)-180); + hold off; + set(gca, 'xscale', 'log'); + ylim([-180, 180]); + yticks([-180, -90, 0, 90, 180]); + xlabel('Frequency [Hz]'); ylabel('Phase'); + + linkaxes([ax1,ax2],'x'); + xlim([10, 500]); +#+end_src + +#+NAME: fig:compare_tf_geophones +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/compare_tf_geophones.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:compare_tf_geophones +#+CAPTION: Transfer function from the first geophone to the second geophone for the three experiments +#+RESULTS: fig:compare_tf_geophones +[[file:figs/compare_tf_geophones.png]] + + +#+begin_src matlab :results none + [coh_m_ty, f] = mscohere(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs); + [coh_m_ry, ~] = mscohere(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs); + [coh_ty_ry, ~] = mscohere(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs); +#+end_src + +#+begin_src matlab :results none :exports none + figure; + hold on; + plot(f, coh_m_ty, 'DisplayName', 'Marble - Ty'); + plot(f, coh_m_ry, 'DisplayName', 'Marble - Ry'); + plot(f, coh_ty_ry, 'DisplayName', 'Ty - Ry'); + hold off; + set(gca, 'xscale', 'log'); + xlabel('Frequency [Hz]'); ylabel('Coherence'); + ylim([0, 1]); xlim([1, 500]); +#+end_src + +#+NAME: fig:coherence_two_geophones +#+HEADER: :tangle no :exports results :results value raw replace :noweb yes +#+begin_src matlab :var filepath="figs/coherence_two_geophones.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") + <> +#+end_src + +#+NAME: fig:coherence_two_geophones +#+CAPTION: Coherence between the two geophones for the three experiments +#+RESULTS: fig:coherence_two_geophones +[[file:figs/coherence_two_geophones.png]] + +** Conclusion +#+begin_important + These measurements are not relevant. +#+end_important diff --git a/src/index.org b/src/index.org index 836d697..23dc99b 100644 --- a/src/index.org +++ b/src/index.org @@ -76,7 +76,7 @@ This Matlab function is accessible [[file:voltageToDisplacementL22.m][here]]. #+begin_src matlab velocity = voltageToVelocityL22(voltage, time, gain); - disp = lsim(1/s, velocity, time); + disp = lsim(1/(1+s/(2*pi*0.5)), velocity, time); #+end_src * getGroundVelocity :PROPERTIES: diff --git a/src/voltageToDisplacementL22.m b/src/voltageToDisplacementL22.m index d0f9fe3..4c424cb 100644 --- a/src/voltageToDisplacementL22.m +++ b/src/voltageToDisplacementL22.m @@ -15,4 +15,4 @@ s = zpk('s'); velocity = voltageToVelocityL22(voltage, time, gain); -disp = lsim(1/s, velocity, time); +disp = lsim(1/(1+s/(2*pi*0.5)), velocity, time);