Removed section about identification with DAC
This commit is contained in:
parent
7b5a3c521f
commit
f32ff33474
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 118 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 115 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 37 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 111 KiB |
197
index.org
197
index.org
@ -55,6 +55,7 @@
|
||||
:header-args:matlab+: :tangle matlab/huddle_test.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
:END:
|
||||
<<sec:huddle_test>>
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
@ -127,202 +128,6 @@
|
||||
#+RESULTS:
|
||||
[[file:figs/huddle_test_pdf.png]]
|
||||
|
||||
* 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
|
||||
:END:
|
||||
|
||||
** Introduction :ignore:
|
||||
#+begin_important
|
||||
Results presented in this sections are wrong as the ADC cannot deliver enought current to the piezoelectric actuator.
|
||||
#+end_important
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
<<matlab-dir>>
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none :results silent :noweb yes
|
||||
<<matlab-init>>
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no
|
||||
addpath('./matlab/mat/');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :eval no
|
||||
addpath('./mat/');
|
||||
#+end_src
|
||||
|
||||
** Load Data :noexport:
|
||||
#+begin_src matlab
|
||||
ht = load('huddle_test.mat', 't', 'u', 'y');
|
||||
load('apa95ml_5kg_10V.mat', 't', 'u', 'y');
|
||||
#+end_src
|
||||
|
||||
** Time Domain Data
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
subplot(1,2,1);
|
||||
plot(t, u)
|
||||
ylabel('Input Voltage [V]'); xlabel('Time [s]');
|
||||
|
||||
|
||||
subplot(1,2,2);
|
||||
plot(t, y)
|
||||
ylabel('Output Displacement [m]'); xlabel('Time [s]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/apa95ml_5kg_10V_time_domain.pdf', 'width', 'full', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:apa95ml_5kg_10V_time_domain
|
||||
#+caption: Time domain signals during the test
|
||||
#+RESULTS:
|
||||
[[file:figs/apa95ml_5kg_10V_time_domain.png]]
|
||||
|
||||
** Comparison of the PSD with Huddle Test
|
||||
#+begin_src matlab
|
||||
Ts = t(end)/(length(t)-1);
|
||||
Fs = 1/Ts;
|
||||
|
||||
win = hanning(ceil(1*Fs));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
[pxx, f] = pwelch(y, win, [], [], Fs);
|
||||
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxx), 'DisplayName', '5kg');
|
||||
plot(f, sqrt(pht), 'DisplayName', 'Huddle Test');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
||||
legend('location', 'northeast');
|
||||
xlim([1, Fs/2]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/apa95ml_5kg_10V_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:apa95ml_5kg_10V_pdf_comp_huddle
|
||||
#+caption: Comparison of the ASD for the identification test and the huddle test
|
||||
#+RESULTS:
|
||||
[[file:figs/apa95ml_5kg_10V_pdf_comp_huddle.png]]
|
||||
|
||||
** Compute TF estimate and Coherence
|
||||
#+begin_src matlab
|
||||
Ts = t(end)/(length(t)-1);
|
||||
Fs = 1/Ts;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
win = hann(ceil(1/Ts));
|
||||
|
||||
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
||||
[co_est, ~] = mscohere( u, -y, win, [], [], 1/Ts);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
hold on;
|
||||
plot(f, co_est, 'k-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
xlim([10, 5e3]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/apa95ml_5kg_10V_coh.pdf', 'width', 'wide', 'height', 'normal');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:apa95ml_5kg_10V_coh
|
||||
#+caption: Coherence
|
||||
#+RESULTS:
|
||||
[[file:figs/apa95ml_5kg_10V_coh.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
plot(f, abs(tf_est), 'k-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
plot(f, 180/pi*angle(tf_est), 'k-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2], 'x');
|
||||
xlim([10, 5e3]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/apa95ml_5kg_10V_tf.pdf', 'width', 'full', 'height', 'full');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:apa95ml_5kg_10V_tf
|
||||
#+caption: Estimation of the transfer function from input voltage to displacement
|
||||
#+RESULTS:
|
||||
[[file:figs/apa95ml_5kg_10V_tf.png]]
|
||||
|
||||
** Comparison with the FEM model
|
||||
#+begin_src matlab
|
||||
load('fem_model_5kg.mat', 'Ghm');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
plot(f, abs(tf_est), 'DisplayName', 'Identification')
|
||||
plot(f, abs(squeeze(freqresp(Ghm, f, 'Hz'))), 'DisplayName', 'FEM')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
||||
legend('location', 'northeast')
|
||||
hold off;
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
plot(f, 180/pi*angle(tf_est))
|
||||
plot(f, 180/pi*angle(squeeze(freqresp(Ghm, f, 'Hz'))))
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2], 'x');
|
||||
xlim([10, 5e3]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/apa95ml_5kg_comp_fem.pdf', 'width', 'full', 'height', 'full');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:apa95ml_5kg_comp_fem
|
||||
#+caption: Comparison of the identified transfer function and the one estimated from the FE model
|
||||
#+RESULTS:
|
||||
[[file:figs/apa95ml_5kg_comp_fem.png]]
|
||||
|
||||
** Conclusion :ignore:
|
||||
#+begin_important
|
||||
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.
|
||||
#+end_important
|
||||
|
||||
* Transfer Function Estimation using the PI Amplifier
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
|
Loading…
Reference in New Issue
Block a user