test-bench-piezo-amplifiers/index.org

530 lines
17 KiB
Org Mode

#+TITLE: Measurement of Piezoelectric Amplifiers
:DRAWER:
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/zenburn.css"/>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
#+PROPERTY: header-args:latex+ :results raw replace :buffer no
#+PROPERTY: header-args:latex+ :eval no-export
#+PROPERTY: header-args:latex+ :exports both
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :tangle filters.m
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :noweb yes
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:matlab+ :output-dir figs
:END:
* Introduction :ignore:
Two voltage amplifiers are tested:
- PI E-505.00 ([[https://www.pi-usa.us/en/products/controllers-drivers-motion-control-software/piezo-drivers-controllers-power-supplies-high-voltage-amplifiers/e-505-piezo-amplifier-module-602300/][link]])
- Cedrat Technology LA75B ([[https://www.cedrat-technologies.com/en/products/piezo-controllers/electronic-amplifier-boards.html][link]])
The piezoelectric actuator under test is an APA95ML from Cedrat technology.
It contains three stacks with a capacitance of $5 \mu F$ each that can be connected independently to the amplifier.
* Effect of a change of capacitance
** 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
** Cedrat Technology
Load Data
#+begin_src matlab
piezo1 = load('mat/cedrat_la75b_med_1_stack.mat', 't', 'V_in', 'V_out');
piezo2 = load('mat/cedrat_la75b_med_2_stack.mat', 't', 'V_in', 'V_out');
piezo3 = load('mat/cedrat_la75b_med_3_stack.mat', 't', 'V_in', 'V_out');
#+end_src
Compute Coherence and Transfer functions
#+begin_src matlab
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_1, f] = tfestimate(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[co_1, ~] = mscohere(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[tf_2, ~] = tfestimate(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[co_2, ~] = mscohere(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[tf_3, ~] = tfestimate(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
[co_3, ~] = mscohere(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
#+end_src
We remove the phase delay due to the time delay of the ADC/DAC:
#+begin_src matlab
angle_delay = 180/pi*angle(squeeze(freqresp(exp(-s*Ts), f, 'Hz')));
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(tf_1), 'DisplayName', '1 stack')
plot(f, abs(tf_2), 'DisplayName', '2 stacks')
plot(f, abs(tf_3), 'DisplayName', '3 stacks')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude'); xlabel('Frequency [Hz]');
hold off;
legend('location', 'southwest');
ylim([1, 40]);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_1))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_2))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_3))-angle_delay)
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
ylabel('Phase'); xlabel('Frequency [Hz]');
hold off;
ylim([-270, 90]);
yticks(-360:90:90)
linkaxes([ax1,ax2], 'x');
xlim([10, 5000]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/change_capa_cedrat.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:change_capa_cedrat
#+caption: Effect of a change of the piezo capacitance on the Amplifier transfer function
#+RESULTS:
[[file:figs/change_capa_cedrat.png]]
** PI
#+begin_src matlab
piezo1 = load('mat/pi_505_high.mat', 't', 'V_in', 'V_out');
piezo2 = load('mat/pi_505_high_2_stacks.mat', 't', 'V_in', 'V_out');
piezo3 = load('mat/pi_505_high_3_stacks.mat', 't', 'V_in', 'V_out');
#+end_src
#+begin_src matlab
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_1, f] = tfestimate(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[co_1, ~] = mscohere(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[tf_2, ~] = tfestimate(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[co_2, ~] = mscohere(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[tf_3, ~] = tfestimate(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
[co_3, ~] = mscohere(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
#+end_src
We remove the phase delay due to the time delay of the ADC/DAC:
#+begin_src matlab
angle_delay = 180/pi*angle(squeeze(freqresp(exp(-s*Ts), f, 'Hz')));
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(tf_1), 'DisplayName', '1 stack')
plot(f, abs(tf_2), 'DisplayName', '2 stacks')
plot(f, abs(tf_3), 'DisplayName', '3 stacks')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude'); xlabel('Frequency [Hz]');
hold off;
legend('location', 'southwest');
ylim([0.05, 11]);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_1))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_2))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_3))-angle_delay)
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
ylabel('Phase'); xlabel('Frequency [Hz]');
hold off;
ylim([-360, 0]);
yticks(-360:90:90)
linkaxes([ax1,ax2], 'x');
xlim([10, 5000]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/change_capa_pi.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:change_capa_pi
#+caption: Effect of a change of the piezo capacitance on the Amplifier transfer function
#+RESULTS:
[[file:figs/change_capa_pi.png]]
* Effect of a change in Voltage level
** 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
** Cedrat Technology
#+begin_src matlab
hi = load('mat/cedrat_la75b_high_1_stack.mat', 't', 'V_in', 'V_out');
me = load('mat/cedrat_la75b_med_1_stack.mat', 't', 'V_in', 'V_out');
lo = load('mat/cedrat_la75b_low_1_stack.mat', 't', 'V_in', 'V_out');
#+end_src
#+begin_src matlab
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_hi, f] = tfestimate(hi.V_in, hi.V_out, win, [], [], 1/Ts);
[co_hi, ~] = mscohere(hi.V_in, hi.V_out, win, [], [], 1/Ts);
[tf_me, ~] = tfestimate(me.V_in, me.V_out, win, [], [], 1/Ts);
[co_me, ~] = mscohere(me.V_in, me.V_out, win, [], [], 1/Ts);
[tf_lo, ~] = tfestimate(lo.V_in, lo.V_out, win, [], [], 1/Ts);
[co_lo, ~] = mscohere(lo.V_in, lo.V_out, win, [], [], 1/Ts);
#+end_src
We remove the phase delay due to the time delay of the ADC/DAC:
#+begin_src matlab
angle_delay = 180/pi*angle(squeeze(freqresp(exp(-s*Ts), f, 'Hz')));
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(tf_lo), 'DisplayName', 'low')
plot(f, abs(tf_me), 'DisplayName', 'med')
plot(f, abs(tf_hi), 'DisplayName', 'high')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude'); xlabel('Frequency [Hz]');
hold off;
legend('location', 'southwest');
ylim([1, 50]);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_lo))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_me))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_hi))-angle_delay)
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
ylabel('Phase'); xlabel('Frequency [Hz]');
hold off;
ylim([-360, 0]);
yticks(-360:90:90)
linkaxes([ax1,ax2], 'x');
xlim([10, 5000]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/change_level_cedrat.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:change_level_cedrat
#+caption: Effect of a change of voltage level on the Amplifier transfer function
#+RESULTS:
[[file:figs/change_level_cedrat.png]]
** PI
#+begin_src matlab
hi = load('mat/pi_505_high.mat', 't', 'V_in', 'V_out');
lo = load('mat/pi_505_low.mat', 't', 'V_in', 'V_out');
#+end_src
#+begin_src matlab
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_hi, f] = tfestimate(hi.V_in, hi.V_out, win, [], [], 1/Ts);
[co_hi, ~] = mscohere(hi.V_in, hi.V_out, win, [], [], 1/Ts);
[tf_lo, ~] = tfestimate(lo.V_in, lo.V_out, win, [], [], 1/Ts);
[co_lo, ~] = mscohere(lo.V_in, lo.V_out, win, [], [], 1/Ts);
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(tf_hi), 'DisplayName', 'high')
plot(f, abs(tf_lo), 'DisplayName', 'low')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude'); xlabel('Frequency [Hz]');
hold off;
legend('location', 'southwest');
ylim([0.1, 20]);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_hi))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_lo))-angle_delay)
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
ylabel('Phase'); xlabel('Frequency [Hz]');
hold off;
ylim([-360, 0]);
yticks(-360:90:90)
linkaxes([ax1,ax2], 'x');
xlim([10, 5000]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/change_level_pi.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:change_level_pi
#+caption: Effect of a change of voltage level on the Amplifier transfer function
#+RESULTS:
[[file:figs/change_level_pi.png]]
* Comparison PI / Cedrat
** 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
** Results
#+begin_src matlab
ce_results = load('mat/cedrat_la75b_high_1_stack.mat', 't', 'V_in', 'V_out');
pi_results = load('mat/pi_505_high.mat', 't', 'V_in', 'V_out');
#+end_src
#+begin_src matlab
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_ce, f] = tfestimate(ce_results.V_in, ce_results.V_out, win, [], [], 1/Ts);
[tf_pi, ~] = tfestimate(pi_results.V_in, pi_results.V_out, win, [], [], 1/Ts);
#+end_src
We remove the phase delay due to the time delay of the ADC/DAC:
#+begin_src matlab
angle_delay = 180/pi*angle(squeeze(freqresp(exp(-s*Ts), f, 'Hz')));
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(tf_pi), 'DisplayName', 'PI')
plot(f, abs(tf_ce), 'DisplayName', 'Cedrat')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude'); xlabel('Frequency [Hz]');
hold off;
legend('location', 'southwest');
ylim([0.1, 50]);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_pi))-angle_delay)
plot(f, 180/pi*unwrap(angle(tf_ce))-angle_delay)
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
ylabel('Phase'); xlabel('Frequency [Hz]');
hold off;
ylim([-270, 90]);
yticks(-360:90:90)
linkaxes([ax1,ax2], 'x');
xlim([10, 5000]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/tf_amplifiers_comp.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:tf_amplifiers_comp
#+caption: Comparison of the two Amplifier transfer functions
#+RESULTS:
[[file:figs/tf_amplifiers_comp.png]]
* Impedance Measurement
** Introduction :ignore:
The goal is to experimentally measure the output impedance of the voltage amplifiers.
To do so, the output voltage is first measure without any load ($V$).
It is then measure when a 10Ohm load is used ($V^\prime$).
The load ($R = 10\Omega$) and the internal resistor ($R_i$) form a voltage divider, and thus:
\[ V^\prime = \frac{R}{R + R_i} V \]
From the two values of voltage, the internal resistor value can be computed:
\[ R_i = R \frac{V - V^\prime}{V^\prime} \]
** 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
** Cedrat Technology
*** Compute Impedance
#+begin_src matlab
R = 10; % Resistive Load used [Ohm]
V = 0.998; % Output Voltage without any load [V]
Vp = 0.912; % Output Voltage with resistice load [V]
#+end_src
#+begin_src matlab :results replace value
R * (V - Vp)/Vp;
#+end_src
#+RESULTS:
: 0.94298
#+begin_src matlab
R = 47; % Resistive Load used [Ohm]
V = 4.960; % Output Voltage without any load [V]
Vp = 4.874; % Output Voltage with resistice load [V]
#+end_src
#+begin_src matlab :results replace value
R * (V - Vp)/Vp;
#+end_src
#+RESULTS:
: 0.8293
*** Effect of Impedance on the phase drop
#+begin_src matlab
C_1 = 5e-6; % Capacitance in [F]
C_2 = 10e-6; % Capacitance in [F]
C_3 = 15e-6; % Capacitance in [F]
Ri = R * (V - Vp)/Vp; % Internal resistance [Ohm]
G0 = 20;
G_1 = G0/(1+Ri*C_1*s);
G_2 = G0/(1+Ri*C_2*s);
G_3 = G0/(1+Ri*C_3*s);
#+end_src
#+begin_src matlab :exports none
piezo1 = load('mat/cedrat_la75b_med_1_stack.mat', 't', 'V_in', 'V_out');
piezo2 = load('mat/cedrat_la75b_med_2_stack.mat', 't', 'V_in', 'V_out');
piezo3 = load('mat/cedrat_la75b_med_3_stack.mat', 't', 'V_in', 'V_out');
Ts = 1e-4;
win = hann(ceil(0.1/Ts));
[tf_1, f] = tfestimate(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[co_1, ~] = mscohere(piezo1.V_in, piezo1.V_out, win, [], [], 1/Ts);
[tf_2, ~] = tfestimate(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[co_2, ~] = mscohere(piezo2.V_in, piezo2.V_out, win, [], [], 1/Ts);
[tf_3, ~] = tfestimate(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
[co_3, ~] = mscohere(piezo3.V_in, piezo3.V_out, win, [], [], 1/Ts);
angle_delay = 180/pi*angle(squeeze(freqresp(exp(-s*Ts), f, 'Hz')));
#+end_src
#+begin_src matlab :exports none
freqs = logspace(1, 4, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G_1, freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_2, freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(G_3, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',1);
plot(f, abs(tf_1), '--')
plot(f, abs(tf_2), '--')
plot(f, abs(tf_3), '--')
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G_1, freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(G_2, freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(G_3, freqs, 'Hz'))));
set(gca,'ColorOrderIndex',1);
plot(f, 180/pi*unwrap(angle(tf_1))-angle_delay, '--')
plot(f, 180/pi*unwrap(angle(tf_2))-angle_delay, '--')
plot(f, 180/pi*unwrap(angle(tf_3))-angle_delay, '--')
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-90, 45]);
yticks([-90:15:45]);
linkaxes([ax1,ax2],'x');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/change_capa_cedrat.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:change_capa_cedrat
#+caption: Effect of a change of the piezo capacitance on the Amplifier transfer function
#+RESULTS:
[[file:figs/change_capa_cedrat.png]]
** PI
#+begin_src matlab
R = 10; % Resistive Load used [Ohm]
V = 1.059; % Output Voltage without any load [V]
Vp = 0.828; % Output Voltage with resistice load [V]
#+end_src
#+begin_src matlab :results replace value
R * (V - Vp)/Vp
#+end_src
#+RESULTS:
: 2.7899
#+begin_src matlab
R = 10; % Resistive Load used [Ohm]
V = 2.092; % Output Voltage without any load [V]
Vp = 1.637; % Output Voltage with resistice load [V]
#+end_src
#+begin_src matlab :results replace value
R * (V - Vp)/Vp
#+end_src
#+RESULTS:
: 2.7795