18 KiB
Nano-Hexapod - Test Bench
This report is also available as a pdf.
Introduction ignore
Encoders fixed to the Struts
Introduction
In this section, the encoders are fixed to the struts.
Load Data
meas_data_lf = {};
for i = 1:6
meas_data_lf(i) = {load(sprintf('mat/frf_data_exc_strut_%i_noise_lf.mat', i), 't', 'Va', 'Vs', 'de')};
meas_data_hf(i) = {load(sprintf('mat/frf_data_exc_strut_%i_noise_hf.mat', i), 't', 'Va', 'Vs', 'de')};
end
Spectral Analysis - Setup
% Sampling Time [s]
Ts = (meas_data_lf{1}.t(end) - (meas_data_lf{1}.t(1)))/(length(meas_data_lf{1}.t)-1);
% Sampling Frequency [Hz]
Fs = 1/Ts;
% Hannning Windows
win = hanning(ceil(1*Fs));
And we get the frequency vector.
[~, f] = tfestimate(meas_data_lf{1}.Va, meas_data_lf{1}.de, win, [], [], 1/Ts);
i_lf = f < 250; % Points for low frequency excitation
i_hf = f > 250; % Points for high frequency excitation
DVF Plant
First, let's compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure fig:enc_struts_dvf_coh).
%% Coherence
coh_dvf_lf = zeros(length(f), 6, 6);
coh_dvf_hf = zeros(length(f), 6, 6);
for i = 1:6
coh_dvf_lf(:, :, i) = mscohere(meas_data_lf{i}.Va, meas_data_lf{i}.de, win, [], [], 1/Ts);
coh_dvf_hf(:, :, i) = mscohere(meas_data_hf{i}.Va, meas_data_hf{i}.de, win, [], [], 1/Ts);
end
Then the 6x6 transfer function matrix is estimated (Figure fig:enc_struts_dvf_frf).
%% DVF Plant
G_dvf_lf = zeros(length(f), 6, 6);
G_dvf_hf = zeros(length(f), 6, 6);
for i = 1:6
G_dvf_lf(:, :, i) = tfestimate(meas_data_lf{i}.Va, meas_data_lf{i}.de, win, [], [], 1/Ts);
G_dvf_hf(:, :, i) = tfestimate(meas_data_hf{i}.Va, meas_data_hf{i}.de, win, [], [], 1/Ts);
end
IFF Plant
First, let's compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure fig:enc_struts_iff_coh).
%% Coherence
coh_iff_lf = zeros(length(f), 6, 6);
coh_iff_hf = zeros(length(f), 6, 6);
for i = 1:6
coh_iff_lf(:, :, i) = mscohere(meas_data_lf{i}.Va, meas_data_lf{i}.Vs, win, [], [], 1/Ts);
coh_iff_hf(:, :, i) = mscohere(meas_data_hf{i}.Va, meas_data_hf{i}.Vs, win, [], [], 1/Ts);
end
Then the 6x6 transfer function matrix is estimated (Figure fig:enc_struts_iff_frf).
%% IFF Plant
G_iff_lf = zeros(length(f), 6, 6);
G_iff_hf = zeros(length(f), 6, 6);
for i = 1:6
G_iff_lf(:, :, i) = tfestimate(meas_data_lf{i}.Va, meas_data_lf{i}.Vs, win, [], [], 1/Ts);
G_iff_hf(:, :, i) = tfestimate(meas_data_hf{i}.Va, meas_data_hf{i}.Vs, win, [], [], 1/Ts);
end
Jacobian
Introduction ignore
The Jacobian is used to transform the excitation force in the cartesian frame as well as the displacements.
Consider the plant shown in Figure fig:nano_hexapod_decentralized_schematic with:
- $\tau$ the 6 input voltages (going to the PD200 amplifier and then to the APA)
- $d\mathcal{L}$ the relative motion sensor outputs (encoders)
- $\bm{\tau}_m$ the generated voltage of the force sensor stacks
- $J_a$ and $J_s$ the Jacobians for the actuators and sensors
\begin{tikzpicture}
% Blocs
\node[block={2.0cm}{2.0cm}] (P) {Plant};
\coordinate[] (inputF) at (P.west);
\coordinate[] (outputL) at ($(P.south east)!0.8!(P.north east)$);
\coordinate[] (outputF) at ($(P.south east)!0.2!(P.north east)$);
\node[block, left= of inputF] (Ja) {$\bm{J}^{-T}_a$};
\node[block, right= of outputL] (Js) {$\bm{J}^{-1}_s$};
\node[block, right= of outputF] (Jf) {$\bm{J}^{-1}_s$};
% Connections and labels
\draw[->] ($(Ja.west)+(-1,0)$) -- (Ja.west) node[above left]{$\bm{\mathcal{F}}$};
\draw[->] (Ja.east) -- (inputF) node[above left]{$\bm{\tau}$};
\draw[->] (outputL) -- (Js.west) node[above left]{$d\bm{\mathcal{L}}$};
\draw[->] (Js.east) -- ++(1, 0) node[above left]{$d\bm{\mathcal{X}}$};
\draw[->] (outputF) -- (Jf.west) node[above left]{$\bm{\tau}_m$};
\draw[->] (Jf.east) -- ++(1, 0) node[above left]{$\bm{\mathcal{F}}_m$};
\end{tikzpicture}
First, we load the Jacobian matrix (same for the actuators and sensors).
load('jacobian.mat', 'J');
DVF Plant
The transfer function from $\bm{\mathcal{F}}$ to $d\bm{\mathcal{X}}$ is computed and shown in Figure fig:enc_struts_dvf_cart_frf.
G_dvf_J_lf = permute(pagemtimes(inv(J), pagemtimes(permute(G_dvf_lf, [2 3 1]), inv(J'))), [3 1 2]);
G_dvf_J_hf = permute(pagemtimes(inv(J), pagemtimes(permute(G_dvf_hf, [2 3 1]), inv(J'))), [3 1 2]);
IFF Plant
The transfer function from $\bm{\mathcal{F}}$ to $\bm{\mathcal{F}}_m$ is computed and shown in Figure fig:enc_struts_iff_cart_frf.
G_iff_J_lf = permute(pagemtimes(inv(J), pagemtimes(permute(G_iff_lf, [2 3 1]), inv(J'))), [3 1 2]);
G_iff_J_hf = permute(pagemtimes(inv(J), pagemtimes(permute(G_iff_hf, [2 3 1]), inv(J'))), [3 1 2]);