17 KiB
17 KiB
Test Bench APA95ML
- Introduction
- Setup
- Run Experiment and Save Data
- Huddle Test
- Transfer Function Estimation using the DAC as the driver
- Transfer Function Estimation using the PI Amplifier
- Transfer function of the PI Amplifier
Introduction ignore
Setup
Parameters
Ts = 1e-4;
Filter White Noise
Glpf = 1/(1 + s/2/pi/500);
Gz = c2d(Glpf, Ts, 'tustin');
Run Experiment and Save Data
Load Data
data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
Save Data
u = data(:, 1); % Input Voltage [V]
y = data(:, 2); % Output Displacement [m]
t = data(:, 3); % Time [s]
save('./mat/huddle_test.mat', 't', 'u', 'y', 'Glpf');
Huddle Test
Time Domain Data
PSD of Measurement Noise
Ts = t(end)/(length(t)-1);
Fs = 1/Ts;
win = hanning(ceil(1*Fs));
[pxx, f] = pwelch(y(1000:end), win, [], [], Fs);
Transfer Function Estimation using the DAC as the driver
Time Domain Data
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);
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);
Comparison with the FEM model
load('mat/fem_model_5kg.mat', 'Ghm');
Conclusion ignore
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.
Transfer Function Estimation using the PI Amplifier
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);
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);
[tf_um , ~] = tfestimate(um, -y, win, [], [], 1/Ts);
[co_est, ~] = mscohere( um, -y, win, [], [], 1/Ts);
Comparison with the FEM model
load('mat/fem_model_5kg.mat', 'Ghm');
Transfer function of the PI Amplifier
Compute TF estimate and Coherence
Ts = t(end)/(length(t)-1);
Fs = 1/Ts;
The coherence and the transfer function are estimate from the voltage input of the PI amplifier to its voltage inputs.
The coherence is very good as expected (Figure fig:PI_E505_coh).
The transfer function show a low pass filter behavior with a lot of phase drop (Figure fig:PI_E505_tf).
win = hann(ceil(10/Ts));
[tf_est, f] = tfestimate(u, um, win, [], [], 1/Ts);
[co_est, ~] = mscohere( u, um, win, [], [], 1/Ts);
The delay can be estimated as follow (in ms):
finddelay(u, um)*(1000*Ts)
0.4
This most probably corresponds to a FIR filter.