From 2a0b6be82f791dd0ff090f843e9700507d0dde16 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 12 Nov 2020 09:18:40 +0100 Subject: [PATCH] Update CSS --- css/custom.css | 49 +++++ css/readtheorg.css | 39 ++-- index.html | 315 +++++++++------------------- index.org | 5 +- js/jquery.stickytableheaders.min.js | 1 - js/readtheorg.js | 2 + 6 files changed, 177 insertions(+), 234 deletions(-) create mode 100644 css/custom.css delete mode 100644 js/jquery.stickytableheaders.min.js diff --git a/css/custom.css b/css/custom.css new file mode 100644 index 0000000..ff286c2 --- /dev/null +++ b/css/custom.css @@ -0,0 +1,49 @@ +.figure p{ + text-align: center; +} + +.figure img{ + max-width:100%; + display: block; + margin: auto; +} + +table { + margin-left: auto; + margin-right: auto; +} + +.org-src-container > pre.src:before { + display: inline; + position: absolute; + color: #808080; + background-color: white; + top: -10px; + left: 10px; + padding: 0px 4px; + border: 1px solid #d0d0d0; + font-size: 80%; +} +.org-src-container > pre { + margin-top: 1.5em; + position: relative; + overflow: visible; +} +.org-src-container > pre > code.src:before { + display: inline; + position: absolute; + color: #808080; + background-color: white; + top: -10px; + left: 10px; + padding: 0px 4px; + border: 1px solid #d0d0d0; + font-size: 80%; +} +.org-src-container > pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } +.org-src-container > pre.src-elisp:before { content: 'Emacs Lisp'; } +.org-src-container > pre.src-sh:before { content: 'shell'; } +.org-src-container > pre.src-bash:before { content: 'bash'; } +.org-src-container > pre.src-org:before { content: 'Org mode'; } +.org-src-container > pre.src-python:before { content: 'Python'; } +.org-src-container > pre.src-matlab:before { content: 'Matlab'; } diff --git a/css/readtheorg.css b/css/readtheorg.css index 1690bd0..423a707 100644 --- a/css/readtheorg.css +++ b/css/readtheorg.css @@ -513,7 +513,7 @@ legend{ padding:0; white-space:normal} -.fa:before,#content .admonition-title:before,#content h1 .headerlink:before,#content h2 .headerlink:before,#content h3 .headerlink:before,#content h4 .headerlink:before,#content h5 .headerlink:before,#content h6 .headerlink:before,#content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .hint,#content .important,#content .tip,#content .warning,#content .seealso,#content .admonitiontodo,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"],select,textarea,#table-of-contents li.on a,#table-of-contents li.current>a,.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a,.wy-nav-top a{ +.fa:before,#content .admonition-title:before,#content h1 .headerlink:before,#content h2 .headerlink:before,#content h3 .headerlink:before,#content h4 .headerlink:before,#content h5 .headerlink:before,#content h6 .headerlink:before,#content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .summary,#content .hint,#content .important,#content .tip,#content .warning,#content .question,#content .seealso,#content .admonitiontodo,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"],select,textarea,#table-of-contents li.on a,#table-of-contents li.current>a,.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a,.wy-nav-top a{ -webkit-font-smoothing:antialiased} /*! @@ -576,7 +576,7 @@ a .fa,a #content .admonition-title,#content a .admonition-title{ .nav #content .admonition-title,#content .nav .admonition-title,.nav .icon{ display:inline} -.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .hint,#content .important,#content .tip,#content .warning,#content .seealso,#content .admonitiontodo{ +.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .summary,#content .hint,#content .important,#content .tip,#content .warning,#content .question,#content .seealso,#content .admonitiontodo{ padding:12px; line-height:24px; margin-bottom:24px; @@ -596,32 +596,45 @@ a .fa,a #content .admonition-title,#content a .admonition-title{ #content .danger,#content .error{ background:#fdf3f2} -.wy-alert.wy-alert-warning,#content .wy-alert-warning.note,#content .attention,#content .caution,#content .wy-alert-warning.danger,#content .wy-alert-warning.error,#content .wy-alert-warning.hint,#content .wy-alert-warning.important,#content .wy-alert-warning.tip,#content .warning,#content .wy-alert-warning.seealso,#content .admonitiontodo{ +.wy-alert.wy-alert-warning,#content .wy-alert-warning.note,#content .attention,#content .caution,#content .wy-alert-warning.danger,#content .wy-alert-warning.error,#content .wy-alert-warning.summary,#content .wy-alert-warning.hint,#content .wy-alert-warning.important,#content .wy-alert-warning.tip,#content .warning,#content .wy-alert-warning.seealso,#content .admonitiontodo{ background:#ffedcc} -#content .admonition-title.note:before, #content .admonition-title.seealso:before, -#content .admonition-title.warning:before, #content .admonition-title.caution:before, +#content .admonition-title.warning:before, +#content .admonition-title.caution:before, #content .admonition-title.attention:before, -#content .admonition-title.tip:before, #content .admonition-title.hint:before, #content .admonition-title.important:before, -#content .admonition-title.error:before, #content .admonition-title.danger:before{ +#content .admonition-title.error:before, +#content .admonition-title.danger:before{ font-family:FontAwesome; content: "";} -#content .note,#content .seealso{ +#content .admonition-title.question:before{ + font-family:FontAwesome; + content: "";} + +#content .admonition-title.note:before, +#content .admonition-title.seealso:before, +#content .admonition-title.tip:before, +#content .admonition-title.summary:before, +#content .admonition-title.hint:before{ + font-family:FontAwesome; + content: "";} + + +#content .note,#content .question,#content .seealso{ background:#e7f2fa} -.wy-alert p:last-child,#content .note p:last-child,#content .attention p:last-child,#content .caution p:last-child,#content .danger p:last-child,#content .error p:last-child,#content .hint p:last-child,#content .important p:last-child,#content .tip p:last-child,#content .warning p:last-child,#content .seealso p:last-child,#content .admonitiontodo p:last-child{ +.wy-alert p:last-child,#content .note p:last-child,#content .attention p:last-child,#content .caution p:last-child,#content .danger p:last-child,#content .error p:last-child,#content .summary p:last-child,#content .hint p:last-child,#content .important p:last-child,#content .tip p:last-child,#content .warning p:last-child,#content .question p:last-child,#content .seealso p:last-child,#content .admonitiontodo p:last-child{ margin-bottom:0} -#content .admonition-title.tip,#content .admonition-title.important,#content .admonition-title.hint{ +#content .admonition-title.tip,#content .admonition-title.important,#content .admonition-title.summary,#content .admonition-title.hint{ line-height: 1; background:#1abc9c} -#content .important,#content .tip,#content .hint{ +#content .important,#content .tip,#content .summary,#content .hint{ background:#dbfaf4} -#content .admonition-title.note,#content .admonition-title.seealso{ +#content .admonition-title.note,#content .admonition-title.question,#content .admonition-title.seealso{ line-height: 1; background:#6ab0de} @@ -938,7 +951,7 @@ footer p{ font-style:italic; } -#content .note .last,#content .attention .last,#content .caution .last,#content .danger .last,#content .error .last,#content .hint .last,#content .important .last,#content .tip .last,#content .warning .last,#content .seealso .last,#content .admonitiontodo .last{ +#content .note .last,#content .attention .last,#content .caution .last,#content .danger .last,#content .error .last,#content .hint .summary,#content .hint .last,#content .important .last,#content .tip .last,#content .warning .last,#content .question .last,#content .seealso .last,#content .admonitiontodo .last{ margin-bottom:0} #content .admonition-title:before{ diff --git a/index.html b/index.html index 9b6af1f..5d7b96c 100644 --- a/index.html +++ b/index.html @@ -3,17 +3,16 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Test Bench APA95ML - + - @@ -27,50 +26,42 @@

Table of Contents

@@ -78,26 +69,26 @@
-
+

setup_picture.png

Figure 1: Picture of the Setup

-
+

setup_zoom.png

Figure 2: Zoom on the APA

-
-

1 Setup

+
+

1 Setup

-
-

1.1 Parameters

+
+

1.1 Parameters

Ts = 1e-4;
@@ -106,8 +97,8 @@
 
-
-

1.2 Filter White Noise

+
+

1.2 Filter White Noise

Glpf = 1/(1 + s/2/pi/500);
@@ -119,13 +110,13 @@ Gz = c2d(Glpf, Ts, 'tustin');
 
-
-

2 Run Experiment and Save Data

+
+

2 Run Experiment and Save Data

-
-

2.1 Load Data

+
+

2.1 Load Data

data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
@@ -134,8 +125,8 @@ Gz = c2d(Glpf, Ts, 'tustin');
 
-
-

2.2 Save Data

+
+

2.2 Save Data

u = data(:, 1); % Input Voltage [V]
@@ -152,16 +143,16 @@ t = data(:, 3); % Time [
 
-
-

3 Huddle Test

+
+

3 Huddle Test

-
-

3.1 Time Domain Data

+
+

3.1 Time Domain Data

-
+

huddle_test_time_domain.png

Figure 3: Measurement of the Mass displacement during Huddle Test

@@ -169,8 +160,8 @@ t = data(:, 3); % Time [
-
-

3.2 PSD of Measurement Noise

+
+

3.2 PSD of Measurement Noise

Ts = t(end)/(length(t)-1);
@@ -186,7 +177,7 @@ win = hanning(ceil(1*Fs));
 
-
+

huddle_test_pdf.png

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

@@ -195,123 +186,13 @@ win = hanning(ceil(1*Fs));
-
-

4 Transfer Function Estimation using the DAC as the driver

+
+

4 Transfer Function Estimation using the PI Amplifier

-
-

-Results presented in this sections are wrong as the ADC cannot deliver enought current to the piezoelectric actuator. -

-
-
- -
-

4.1 Time Domain Data

+
+

4.1 Load Data

- -
-

apa95ml_5kg_10V_time_domain.png -

-

Figure 5: Time domain signals during the test

-
-
-
- -
-

4.2 Comparison of the PSD with Huddle Test

-
-
-
Ts = t(end)/(length(t)-1);
-Fs = 1/Ts;
-
-win = hanning(ceil(1*Fs));
-
-
- -
-
[pxx, f] = pwelch(y, win, [], [], Fs);
-[pht, ~] = pwelch(ht.y, win, [], [], Fs);
-
-
- - -
-

apa95ml_5kg_10V_pdf_comp_huddle.png -

-

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

-
-
-
- -
-

4.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);
-[co_est, ~] = mscohere(  u, -y, win, [], [], 1/Ts);
-
-
- - -
-

apa95ml_5kg_10V_coh.png -

-

Figure 7: Coherence

-
- - -
-

apa95ml_5kg_10V_tf.png -

-

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

-
-
-
- -
-

4.4 Comparison with the FEM model

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

apa95ml_5kg_comp_fem.png -

-

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

-
-
-
- -
-
-

-The problem comes from the fact that the piezo is driven directly by the DAC that cannot deliver enought current. -In the next section, a current amplifier is used. -

- -
-
-
- -
-

5 Transfer Function Estimation using the PI Amplifier

-
-
-
-

5.1 Load Data

-
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
 load('./mat/apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y');
@@ -330,9 +211,9 @@ ht.y  = ht.y  - mean(ht.y);
 
-
-

5.2 Comparison of the PSD with Huddle Test

-
+
+

4.2 Comparison of the PSD with Huddle Test

+
Ts = t(end)/(length(t)-1);
 Fs = 1/Ts;
@@ -348,17 +229,17 @@ win = hanning(ceil(1*Fs));
 
-
+

apa95ml_5kg_PI_pdf_comp_huddle.png

-

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

+

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

-
-

5.3 Compute TF estimate and Coherence

-
+
+

4.3 Compute TF estimate and Coherence

+
Ts = t(end)/(length(t)-1);
 Fs = 1/Ts;
@@ -375,42 +256,42 @@ Fs = 1/Ts;
 
-
+

apa95ml_5kg_PI_coh.png

-

Figure 11: Coherence

+

Figure 6: Coherence

-
+

apa95ml_5kg_PI_tf.png

-

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

+

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

-
-

5.4 Comparison with the FEM model

-
+
+

4.4 Comparison with the FEM model

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

apa95ml_5kg_pi_comp_fem.png

-

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

+

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

-
-

6 Transfer function from force actuator to force sensor

-
+
+

5 Transfer function from force actuator to force sensor

+

Two measurements are performed:

@@ -456,7 +337,7 @@ Gfem_a_ss = exp(-s/1

-The transfer function from input voltage to output voltage are computed and shown in Figure 14. +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);
@@ -473,16 +354,16 @@ win = hann(ceil(10/Ts));
 
-
+

bode_plot_force_sensor_voltage_comp_fem.png

-

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

+

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

-
-

6.1 System Identification

-
+
+

5.1 System Identification

+
w_z = 2*pi*111; % Zeros frequency [rad/s]
 w_p = 2*pi*255; % Pole frequency [rad/s]
@@ -495,35 +376,35 @@ Gi = G_inf*(s^2 
 
 
-
+

iff_plant_identification_apa95ml.png

-

Figure 15: Identification of the IFF plant

+

Figure 10: Identification of the IFF plant

-
-

6.2 Integral Force Feedback

-
+
+

5.2 Integral Force Feedback

+
-
+

root_locus_iff_apa95ml_identification.png

-

Figure 16: Root Locus for IFF

+

Figure 11: Root Locus for IFF

-
-

7 IFF Tests

-
+
+

6 IFF Tests

+
-
-

7.1 First tests with few gains

-
+
+

6.1 First tests with few gains

+
iff_g10 = load('./mat/apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v');
 iff_g100 = load('./mat/apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v');
@@ -547,25 +428,25 @@ win = hann(ceil(10/Ts));
 
-
+

iff_first_test_coherence.png

-

Figure 17: Coherence

+

Figure 12: Coherence

-
+

iff_first_test_bode_plot.png

-

Figure 18: Bode plot for different values of IFF gain

+

Figure 13: Bode plot for different values of IFF gain

-
-

7.2 Second test with many Gains

-
+
+

6.2 Second test with many Gains

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

iff_results_bode_plots.png

@@ -615,13 +496,13 @@ f_end = 500; % [Hz]
-
+

iff_results_bode_plots_identification.png

-
+

iff_results_root_locus.png

@@ -631,7 +512,7 @@ f_end = 500; % [Hz]

Author: Dehaeze Thomas

-

Created: 2020-11-03 mar. 10:11

+

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

diff --git a/index.org b/index.org index b677101..9c2efb1 100644 --- a/index.org +++ b/index.org @@ -11,10 +11,9 @@ #+HTML_HEAD: #+HTML_HEAD: -#+HTML_HEAD: +#+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: -#+HTML_HEAD: #+HTML_HEAD: #+HTML_MATHJAX: align: center tagside: right font: TeX @@ -160,7 +159,7 @@ #+RESULTS: [[file:figs/huddle_test_pdf.png]] -* Transfer Function Estimation using the DAC as the driver +* Transfer Function Estimation using the DAC as the driver :noexport: :PROPERTIES: :header-args:matlab+: :tangle matlab/tf_estimation.m :header-args:matlab+: :comments org :mkdirp yes diff --git a/js/jquery.stickytableheaders.min.js b/js/jquery.stickytableheaders.min.js deleted file mode 100644 index 6c17ea4..0000000 --- a/js/jquery.stickytableheaders.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){"use strict";function c(c,g){var h=this;h.$el=a(c),h.el=c,h.id=e++,h.$window=a(b),h.$document=a(document),h.$el.bind("destroyed",a.proxy(h.teardown,h)),h.$clonedHeader=null,h.$originalHeader=null,h.isSticky=!1,h.hasBeenSticky=!1,h.leftOffset=null,h.topOffset=null,h.init=function(){h.$el.each(function(){var b=a(this);b.css("padding",0),h.$originalHeader=a("thead:first",this),h.$clonedHeader=h.$originalHeader.clone(),b.trigger("clonedHeader."+d,[h.$clonedHeader]),h.$clonedHeader.addClass("tableFloatingHeader"),h.$clonedHeader.css("display","none"),h.$originalHeader.addClass("tableFloatingHeaderOriginal"),h.$originalHeader.after(h.$clonedHeader),h.$printStyle=a(''),a("head").append(h.$printStyle)}),h.setOptions(g),h.updateWidth(),h.toggleHeaders(),h.bind()},h.destroy=function(){h.$el.unbind("destroyed",h.teardown),h.teardown()},h.teardown=function(){h.isSticky&&h.$originalHeader.css("position","static"),a.removeData(h.el,"plugin_"+d),h.unbind(),h.$clonedHeader.remove(),h.$originalHeader.removeClass("tableFloatingHeaderOriginal"),h.$originalHeader.css("visibility","visible"),h.$printStyle.remove(),h.el=null,h.$el=null},h.bind=function(){h.$scrollableArea.on("scroll."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.on("scroll."+d+h.id,h.setPositionValues),h.$window.on("resize."+d+h.id,h.toggleHeaders)),h.$scrollableArea.on("resize."+d,h.toggleHeaders),h.$scrollableArea.on("resize."+d,h.updateWidth)},h.unbind=function(){h.$scrollableArea.off("."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.off("."+d+h.id,h.setPositionValues),h.$window.off("."+d+h.id,h.toggleHeaders)),h.$scrollableArea.off("."+d,h.updateWidth)},h.toggleHeaders=function(){h.$el&&h.$el.each(function(){var b,c=a(this),d=h.isWindowScrolling?isNaN(h.options.fixedOffset)?h.options.fixedOffset.outerHeight():h.options.fixedOffset:h.$scrollableArea.offset().top+(isNaN(h.options.fixedOffset)?0:h.options.fixedOffset),e=c.offset(),f=h.$scrollableArea.scrollTop()+d,g=h.$scrollableArea.scrollLeft(),i=h.isWindowScrolling?f>e.top:d>e.top,j=(h.isWindowScrolling?f:0)a||a+h.$window.height()>h.$document.height()||0>b||b+h.$window.width()>h.$document.width()||h.$originalHeader.css({top:h.topOffset-(h.isWindowScrolling?0:a),left:h.leftOffset-(h.isWindowScrolling?0:b)})},h.updateWidth=function(){if(h.isSticky){h.$originalHeaderCells||(h.$originalHeaderCells=a("th,td",h.$originalHeader)),h.$clonedHeaderCells||(h.$clonedHeaderCells=a("th,td",h.$clonedHeader));var b=h.getWidth(h.$clonedHeaderCells);h.setWidth(b,h.$clonedHeaderCells,h.$originalHeaderCells),h.$originalHeader.css("width",h.$clonedHeader.width())}},h.getWidth=function(c){var d=[];return c.each(function(c){var e,f=a(this);if("border-box"===f.css("box-sizing"))e=f[0].getBoundingClientRect().width;else{var g=a("th",h.$originalHeader);if("collapse"===g.css("border-collapse"))if(b.getComputedStyle)e=parseFloat(b.getComputedStyle(this,null).width);else{var i=parseFloat(f.css("padding-left")),j=parseFloat(f.css("padding-right")),k=parseFloat(f.css("border-width"));e=f.outerWidth()-i-j-k}else e=f.width()}d[c]=e}),d},h.setWidth=function(a,b,c){b.each(function(b){var d=a[b];c.eq(b).css({"min-width":d,"max-width":d})})},h.resetWidth=function(b,c){b.each(function(b){var d=a(this);c.eq(b).css({"min-width":d.css("min-width"),"max-width":d.css("max-width")})})},h.setOptions=function(c){h.options=a.extend({},f,c),h.$scrollableArea=a(h.options.scrollableArea),h.isWindowScrolling=h.$scrollableArea[0]===b},h.updateOptions=function(a){h.setOptions(a),h.unbind(),h.bind(),h.updateWidth(),h.toggleHeaders()},h.init()}var d="stickyTableHeaders",e=0,f={fixedOffset:0,leftOffset:0,marginTop:0,scrollableArea:b};a.fn[d]=function(b){return this.each(function(){var e=a.data(this,"plugin_"+d);e?"string"==typeof b?e[b].apply(e):e.updateOptions(b):"destroy"!==b&&a.data(this,"plugin_"+d,new c(this,b))})}}(jQuery,window); \ No newline at end of file diff --git a/js/readtheorg.js b/js/readtheorg.js index 0f8439a..14b23d4 100644 --- a/js/readtheorg.js +++ b/js/readtheorg.js @@ -9,6 +9,8 @@ $(function() { $('.hint').before("

Hint

"); $('.error').before("

Error

"); $('.danger').before("

Danger

"); + $('.question').before("

Question

"); + $('.summary').before("

Summary

"); }); $( document ).ready(function() {