Update modal analysis, add .zip files (data and matlab files)
This commit is contained in:
parent
77851de118
commit
341556a6fe
BIN
modal-analysis/data/frf_processing.zip
Normal file
BIN
modal-analysis/data/frf_processing.zip
Normal file
Binary file not shown.
BIN
modal-analysis/data/modal_frf_coh.zip
Normal file
BIN
modal-analysis/data/modal_frf_coh.zip
Normal file
Binary file not shown.
Binary file not shown.
@ -25,6 +25,8 @@
|
||||
#+PROPERTY: header-args:matlab+ :exports both
|
||||
#+PROPERTY: header-args:matlab+ :eval no-export
|
||||
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||||
#+PROPERTY: header-args:matlab+ :tangle matlab/frf_processing.m
|
||||
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||
|
||||
#+PROPERTY: header-args:shell :eval no-export
|
||||
|
||||
@ -56,6 +58,22 @@ Thus, we are only interested in $6 \times 6 = 36$ degrees of freedom.
|
||||
|
||||
We here process the FRF matrix to go from the 69 measured DOFs to the wanted 36 DOFs.
|
||||
|
||||
* ZIP file containing the data and matlab files :ignore:
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/frf_processing.m -nt data/frf_processing.zip ]; then
|
||||
cp matlab/frf_processing.m frf_processing.m;
|
||||
zip data/frf_processing \
|
||||
mat/frf_coh_matrices.mat \
|
||||
mat/geometry.mat \
|
||||
frf_processing.m
|
||||
rm frf_processing.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+begin_note
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/frf_processing.zip][here]].
|
||||
#+end_note
|
||||
|
||||
* 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>>
|
||||
@ -70,7 +88,7 @@ We load the measured FRF and Coherence matrices.
|
||||
We also load the geometric parameters of the station: solid bodies considered and the position of the accelerometers.
|
||||
|
||||
#+begin_src matlab
|
||||
load('./mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
|
||||
load('mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
|
||||
load('mat/geometry.mat', 'solids', 'solid_names', 'acc_pos');
|
||||
#+end_src
|
||||
|
||||
@ -201,6 +219,24 @@ First, we initialize a new FRF matrix =FRFs_O= which is an $n \times p \times q$
|
||||
- $p$ is the number of excitation inputs: $3$
|
||||
- $q$ is the number of frequency points $\omega_i$
|
||||
|
||||
#+begin_important
|
||||
For each frequency point $\omega_i$, the FRF matrix =FRFs_O= is a $n\times p$ matrix:
|
||||
\begin{equation}
|
||||
\text{FRF}_O(\omega_i) = \begin{bmatrix}
|
||||
\frac{D_{1,T_x}}{F_x}(\omega_i) & \frac{D_{1,T_x}}{F_y}(\omega_i) & \frac{D_{1,T_x}}{F_z}(\omega_i) \\
|
||||
\frac{D_{1,T_y}}{F_x}(\omega_i) & \frac{D_{1,T_y}}{F_y}(\omega_i) & \frac{D_{1,T_y}}{F_z}(\omega_i) \\
|
||||
\frac{D_{1,T_z}}{F_x}(\omega_i) & \frac{D_{1,T_z}}{F_y}(\omega_i) & \frac{D_{1,T_z}}{F_z}(\omega_i) \\
|
||||
\frac{D_{1,R_x}}{F_x}(\omega_i) & \frac{D_{1,R_x}}{F_y}(\omega_i) & \frac{D_{1,R_x}}{F_z}(\omega_i) \\
|
||||
\frac{D_{1,R_y}}{F_x}(\omega_i) & \frac{D_{1,R_y}}{F_y}(\omega_i) & \frac{D_{1,R_y}}{F_z}(\omega_i) \\
|
||||
\frac{D_{1,R_z}}{F_x}(\omega_i) & \frac{D_{1,R_z}}{F_y}(\omega_i) & \frac{D_{1,R_z}}{F_z}(\omega_i) \\
|
||||
\frac{D_{2,T_x}}{F_x}(\omega_i) & \frac{D_{2,T_x}}{F_y}(\omega_i) & \frac{D_{2,T_x}}{F_z}(\omega_i) \\
|
||||
\vdots & \vdots & \vdots \\
|
||||
\frac{D_{6,R_z}}{F_x}(\omega_i) & \frac{D_{6,R_z}}{F_y}(\omega_i) & \frac{D_{6,R_z}}{F_z}(\omega_i)
|
||||
\end{bmatrix}
|
||||
\end{equation}
|
||||
where 1, 2, ..., 6 corresponds to the 6 solid bodies.
|
||||
#+end_important
|
||||
|
||||
#+begin_src matlab
|
||||
FRFs_O = zeros(length(solid_names)*6, 3, 801);
|
||||
#+end_src
|
||||
@ -233,7 +269,7 @@ We can also compare all the DOFs of one solid body (figure [[fig:frf_one_body_al
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'}
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
solids_i = 1:6;
|
||||
dir_i = 1;
|
||||
exc_dir = 1;
|
||||
@ -276,7 +312,7 @@ We can also compare all the DOFs of one solid body (figure [[fig:frf_one_body_al
|
||||
[[file:figs/frf_all_bodies_one_direction.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'}
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
solid_i = 3;
|
||||
dirs_i = 1:6;
|
||||
exc_dir = 1;
|
||||
@ -318,23 +354,20 @@ We can also compare all the DOFs of one solid body (figure [[fig:frf_one_body_al
|
||||
#+CAPTION: FRFs of one solid body in all its DOFs
|
||||
[[file:figs/frf_one_body_all_directions.png]]
|
||||
|
||||
* TODO How to compare the relative motion of solid bodies
|
||||
We have some of elements of the full FRF matrix:
|
||||
\[ \frac{D_{1x}}{F_x},\ \frac{D_{1y}}{F_x},\ \frac{D_{1z}}{F_x},\ \frac{D_{2x}}{F_x},\ \dots \]
|
||||
* Comparison of the relative motion of solid bodies
|
||||
Now that the motion of all the solid bodies are expressed in the same frame, we should be able to *compare them*.
|
||||
This can be used to determine what joints direction between two solid bodies is stiff enough that we can fix this DoF.
|
||||
This could help reduce the order of the model and simplify the extraction of the model parameters from the measurements.
|
||||
|
||||
\[ \frac{D_{1x}}{D_{2x}} = \frac{\frac{D_{1x}}{F_x}}{\frac{D_{2x}}{F_x}} \]
|
||||
Then, if $\left| \frac{D_{1x}}{D_{2x}} \right| \approx 1$ in all the frequency band of interest, we can block the $x$ motion between the solids 1 and 2.
|
||||
We decide to plot the "normalized relative motion" between solid bodies $i$ and $j$:
|
||||
\[ 0 < \Delta_{ij, x} = \frac{\left| D_{i,x} - D_{j,x} \right|}{|D_{i,x}| + |D_{j,x}|} < 1 \]
|
||||
|
||||
\[ \frac{D_{2x} - D_{1x}}{D_{1x} + D_{2x}} = \frac{\frac{D_{2x}}{F_x} - \frac{D_{1x}}{F_x}}{\frac{D_{1x}}{F_x} + \frac{D_{2x}}{F_x}} \]
|
||||
Then, if $\Delta_{ij,x} \ll 0$ in the frequency band of interest, we have that $D_{ix} \approx D_{jx}$ and we can neglect that DOF between the two solid bodies $i$ and $j$.
|
||||
|
||||
Then if $\left| \frac{D_{2x} - D_{1x}}{D_{1x} + D_{2x}} \right| \ll 1$ in all the frequency band of interest, we can block the $x$ motion between the solids 1 and 2.
|
||||
This normalized relative motion is shown on figure [[fig:relative_motion_comparison]] for all the directions and for all the adjacent pair of solid bodies.
|
||||
|
||||
* Relative Motion in the global coordinates
|
||||
Below we plot the normalized relative motion between each stage:
|
||||
\[ 0 < \frac{\left| D_{ix} - D_{jx} \right|}{|D_{ix}| + |D_{jx}|} < 1 \]
|
||||
|
||||
#+begin_src matlab
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'}
|
||||
#+begin_src matlab :exports none
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
dirs_i = 1:6;
|
||||
exc_dir = 1;
|
||||
@ -381,45 +414,10 @@ Below we plot the normalized relative motion between each stage:
|
||||
#+CAPTION: Relative motion between each stage
|
||||
[[file:figs/relative_motion_comparison.png]]
|
||||
|
||||
* TODO Compare original FRF measurements to transformed FRF in the global frame
|
||||
We wish here to compare the FRF in order to verify if there is any mistake.
|
||||
|
||||
#+begin_src matlab
|
||||
dir_names = {'X', 'Y', 'Z', '$\theta_X$', '$\theta_Y$', '$\theta_Z$'};
|
||||
|
||||
solid_i = 6;
|
||||
acc_dir_O = 1;
|
||||
acc_dir = 1;
|
||||
exc_dir = 1;
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
for i = solids.(solid_names{solid_i})
|
||||
plot(freqs, abs(squeeze(FRFs(acc_dir+3*(i-1), exc_dir, :))));
|
||||
end
|
||||
plot(freqs, abs(squeeze(FRFs_O((solid_i-1)*6+acc_dir_O, exc_dir, :))), '-k');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude');
|
||||
title(sprintf('%s motion measured by the Acc. vs %s motion computed in the common frame - %s', dir_names{acc_dir}, dir_names{acc_dir_O}, solid_names{solid_i}));
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
for i = solids.(solid_names{solid_i})
|
||||
plot(freqs, mod(180+180/pi*phase(squeeze(FRFs(acc_dir+3*(i-1), exc_dir, :))), 360)-180);
|
||||
end
|
||||
plot(freqs, mod(180+180/pi*phase(squeeze(FRFs_O((solid_i-1)*6+acc_dir_O, exc_dir, :))), 360)-180, '-k');
|
||||
hold off;
|
||||
ylim([-180, 180]); yticks(-180:90:180);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
set(gca, 'xscale', 'log');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([1, 200]);
|
||||
#+end_src
|
||||
#+begin_warning
|
||||
Can we really compare the motion of two solid bodies from Frequency Response Functions that clearly depends on the excitation point and direction?
|
||||
The relative motion of two solid bodies may be negligible when exciting the structure at on point and but at another point.
|
||||
#+end_warning
|
||||
|
||||
* Verify that we find the original FRF from the FRF in the global coordinates
|
||||
We have computed the Frequency Response Functions Matrix =FRFs_O= representing the response of the 6 solid bodies in their 6 DOFs.
|
||||
@ -446,7 +444,6 @@ This will help us to determine if:
|
||||
% We get the position of the accelerometer expressed in frame O
|
||||
pos = acc_pos(acc_i, :)';
|
||||
posX = [0 pos(3) -pos(2); -pos(3) 0 pos(1) ; pos(2) -pos(1) 0];
|
||||
[0 acc_pos(i, 3) -acc_pos(i, 2) ; -acc_pos(i, 3) 0 acc_pos(i, 1) ; acc_pos(i, 2) -acc_pos(i, 1) 0]
|
||||
|
||||
FRF_recovered(3*(acc_i-1)+1:3*(acc_i-1)+3, exc_dir, :) = v0 + posX*W0;
|
||||
end
|
||||
@ -464,7 +461,7 @@ The FRF are matching well until 100Hz.
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'}
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
solid_i = 6;
|
||||
exc_dir = 1;
|
||||
@ -516,7 +513,7 @@ The FRF are matching well until 100Hz.
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'}
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
solid_i = 3;
|
||||
exc_dir = 1;
|
||||
@ -574,107 +571,7 @@ The FRF are matching well until 100Hz.
|
||||
This valid the fact that a multi-body model can be used to represent the dynamics of the micro-station.
|
||||
#+end_important
|
||||
|
||||
* Importation of measured FRF curves :noexport:ignore:
|
||||
There are 24 measurements files corresponding to 24 series of impacts:
|
||||
- 3 directions, 8 sets of 3 accelerometers
|
||||
For each measurement file, the FRF and coherence between the impact and the 9 accelerations measured.
|
||||
|
||||
In reality: 4 sets of 10 things
|
||||
|
||||
* Saving of the FRF expressed in the global coordinates
|
||||
#+begin_src matlab
|
||||
a = load('mat/meas_frf_coh_1.mat');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
plot(a.FFT1_AvXSpc_2_1_RMS_X_Val, a.FFT1_AvXSpc_2_1_RMS_Y_Mod)
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude');
|
||||
title(sprintf('From %s, to %s', FFT1_AvXSpc_2_1_RfName, FFT1_AvXSpc_2_1_RpName))
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
plot(a.FFT1_AvXSpc_2_1_RMS_X_Val, a.FFT1_AvXSpc_2_1_RMS_Y_Phas)
|
||||
hold off;
|
||||
ylim([-180, 180]); yticks(-180:90:180);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
set(gca, 'xscale', 'log');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([1, 200]);
|
||||
#+end_src
|
||||
|
||||
* Analysis of some FRFs :noexport:ignore:
|
||||
#+begin_src matlab
|
||||
acc_i = 3;
|
||||
acc_dir = 1;
|
||||
exc_dir = 1;
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(FRFs(acc_dir+3*(acc_i-1), exc_dir, :))));
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude');
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
plot(freqs, mod(180+180/pi*phase(squeeze(FRFs(acc_dir+3*(acc_i-1), exc_dir, :))), 360)-180);
|
||||
hold off;
|
||||
ylim([-180, 180]); yticks(-180:90:180);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
set(gca, 'xscale', 'log');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([1, 200]);
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_src matlab
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:3*n_acc
|
||||
plot(freqs, squeeze(COHs(i, 1, :)), 'color', [0, 0, 0, 0.2]);
|
||||
end
|
||||
hold off;
|
||||
xlabel('Frequency [Hz]');
|
||||
ylabel('Coherence [\%]');
|
||||
#+end_src
|
||||
|
||||
|
||||
Composite Response Function.
|
||||
|
||||
We here sum the norm instead of the complex numbers.
|
||||
|
||||
#+begin_src matlab
|
||||
HHx = squeeze(sum(abs(FRFs(:, 1, :))));
|
||||
HHy = squeeze(sum(abs(FRFs(:, 2, :))));
|
||||
HHz = squeeze(sum(abs(FRFs(:, 3, :))));
|
||||
HH = squeeze(sum([HHx, HHy, HHz], 2));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
exc_dir = 3;
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:3*n_acc
|
||||
plot(freqs, abs(squeeze(FRFs(i, exc_dir, :))), 'color', [0, 0, 0, 0.2]);
|
||||
end
|
||||
plot(freqs, abs(HHx));
|
||||
plot(freqs, abs(HHy));
|
||||
plot(freqs, abs(HHz));
|
||||
plot(freqs, abs(HH), 'k');
|
||||
hold off;
|
||||
set(gca, 'XScale', 'lin'); set(gca, 'YScale', 'lin');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude');
|
||||
xlim([1, 200]);
|
||||
save('mat/frf_o.mat', 'FRFs_O');
|
||||
#+end_src
|
||||
|
Binary file not shown.
@ -46,5 +46,6 @@ The modes we want to identify are those in the frequency range between 0Hz and 1
|
||||
|
||||
The modal analysis of the ID31 Micro-station thus consists of several parts:
|
||||
- [[file:measurement.org][Frequency Response Measurements]]
|
||||
- [[file:frf_processing.org][Frequency Response Analysis and Processing]]
|
||||
- [[file:modal_extraction.org][Modal Parameter Extraction]]
|
||||
- [[file:mathematical_model.org][Derivation of Mathematical Model]]
|
||||
|
Binary file not shown.
BIN
modal-analysis/mat/frf_o.mat
Normal file
BIN
modal-analysis/mat/frf_o.mat
Normal file
Binary file not shown.
BIN
modal-analysis/mat/geometry.mat
Normal file
BIN
modal-analysis/mat/geometry.mat
Normal file
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
|
||||
(termite:6464): GLib-WARNING **: 10:26:13.129: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
|
325
modal-analysis/matlab/frf_processing.m
Normal file
325
modal-analysis/matlab/frf_processing.m
Normal file
@ -0,0 +1,325 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
% Importation of measured FRF curves
|
||||
% We load the measured FRF and Coherence matrices.
|
||||
% We also load the geometric parameters of the station: solid bodies considered and the position of the accelerometers.
|
||||
|
||||
|
||||
load('mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
|
||||
load('mat/geometry.mat', 'solids', 'solid_names', 'acc_pos');
|
||||
|
||||
% From accelerometer DOFs to solid body DOFs - Matlab Implementation
|
||||
% First, we initialize a new FRF matrix =FRFs_O= which is an $n \times p \times q$ with:
|
||||
% - $n$ is the number of DOFs of the considered 6 solid-bodies: $6 \times 6 = 36$
|
||||
% - $p$ is the number of excitation inputs: $3$
|
||||
% - $q$ is the number of frequency points $\omega_i$
|
||||
|
||||
% #+begin_important
|
||||
% For each frequency point $\omega_i$, the FRF matrix =FRFs_O= is a $n\times p$ matrix:
|
||||
% \begin{equation}
|
||||
% \text{FRF}_O(\omega_i) = \begin{bmatrix}
|
||||
% \frac{D_{1,T_x}}{F_x}(\omega_i) & \frac{D_{1,T_x}}{F_y}(\omega_i) & \frac{D_{1,T_x}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{1,T_y}}{F_x}(\omega_i) & \frac{D_{1,T_y}}{F_y}(\omega_i) & \frac{D_{1,T_y}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{1,T_z}}{F_x}(\omega_i) & \frac{D_{1,T_z}}{F_y}(\omega_i) & \frac{D_{1,T_z}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{1,R_x}}{F_x}(\omega_i) & \frac{D_{1,R_x}}{F_y}(\omega_i) & \frac{D_{1,R_x}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{1,R_y}}{F_x}(\omega_i) & \frac{D_{1,R_y}}{F_y}(\omega_i) & \frac{D_{1,R_y}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{1,R_z}}{F_x}(\omega_i) & \frac{D_{1,R_z}}{F_y}(\omega_i) & \frac{D_{1,R_z}}{F_z}(\omega_i) \\
|
||||
% \frac{D_{2,T_x}}{F_x}(\omega_i) & \frac{D_{2,T_x}}{F_y}(\omega_i) & \frac{D_{2,T_x}}{F_z}(\omega_i) \\
|
||||
% \vdots & \vdots & \vdots \\
|
||||
% \frac{D_{6,R_z}}{F_x}(\omega_i) & \frac{D_{6,R_z}}{F_y}(\omega_i) & \frac{D_{6,R_z}}{F_z}(\omega_i)
|
||||
% \end{bmatrix}
|
||||
% \end{equation}
|
||||
% where 1, 2, ..., 6 corresponds to the 6 solid bodies.
|
||||
% #+end_important
|
||||
|
||||
|
||||
FRFs_O = zeros(length(solid_names)*6, 3, 801);
|
||||
|
||||
|
||||
|
||||
% Then, as we know the positions of the accelerometers on each solid body, and we have the response of those accelerometers, we can use the equations derived in the previous section to determine the response of each solid body expressed in the frame $\{O\}$.
|
||||
|
||||
for solid_i = 1:length(solid_names)
|
||||
solids_i = solids.(solid_names{solid_i});
|
||||
|
||||
A = zeros(3*length(solids_i), 6);
|
||||
for i = 1:length(solids_i)
|
||||
acc_i = solids_i(i);
|
||||
|
||||
A(3*(i-1)+1:3*i, 1:3) = eye(3);
|
||||
A(3*(i-1)+1:3*i, 4:6) = [ 0 acc_pos(acc_i, 3) -acc_pos(acc_i, 2) ;
|
||||
-acc_pos(acc_i, 3) 0 acc_pos(acc_i, 1) ;
|
||||
acc_pos(acc_i, 2) -acc_pos(acc_i, 1) 0];
|
||||
end
|
||||
|
||||
for exc_dir = 1:3
|
||||
FRFs_O((solid_i-1)*6+1:solid_i*6, exc_dir, :) = A\squeeze(FRFs((solids_i(1)-1)*3+1:solids_i(end)*3, exc_dir, :));
|
||||
end
|
||||
end
|
||||
|
||||
% Analysis of some FRF in the global coordinates
|
||||
% First, we can compare the motions of the 6 solid bodies in one direction (figure [[fig:frf_all_bodies_one_direction]])
|
||||
|
||||
% We can also compare all the DOFs of one solid body (figure [[fig:frf_one_body_all_directions]]).
|
||||
|
||||
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
solids_i = 1:6;
|
||||
dir_i = 1;
|
||||
exc_dir = 1;
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subaxis(2, 1, 1);
|
||||
hold on;
|
||||
for solid_i = solids_i
|
||||
plot(freqs, abs(squeeze(FRFs_O((solid_i-1)*6+dir_i, exc_dir, :))), 'DisplayName', solid_names{solid_i});
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude');
|
||||
legend('Location', 'northwest');
|
||||
title(sprintf('FRF between %s and %s', exc_names{exc_dir}, DOFs{dir_i}));
|
||||
|
||||
ax2 = subaxis(2, 1, 2);
|
||||
hold on;
|
||||
for solid_i = solids_i
|
||||
plot(freqs, mod(180+180/pi*phase(squeeze(FRFs_O((solid_i-1)*6+dir_i, exc_dir, :))), 360)-180);
|
||||
end
|
||||
hold off;
|
||||
ylim([-180, 180]); yticks(-180:90:180);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
set(gca, 'xscale', 'log');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([1, 200]);
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:frf_all_bodies_one_direction
|
||||
% #+CAPTION: FRFs of all the 6 solid bodies in one direction
|
||||
% [[file:figs/frf_all_bodies_one_direction.png]]
|
||||
|
||||
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
solid_i = 3;
|
||||
dirs_i = 1:6;
|
||||
exc_dir = 1;
|
||||
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
for dir_i = dirs_i
|
||||
plot(freqs, abs(squeeze(FRFs_O((solid_i-1)*6+dir_i, exc_dir, :))), 'DisplayName', DOFs{dir_i});
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude');
|
||||
legend('Location', 'northwest');
|
||||
title(sprintf('Motion of %s due to %s', solid_names{solid_i}, exc_names{exc_dir}));
|
||||
|
||||
ax2 = subplot(2, 1, 2);
|
||||
hold on;
|
||||
for dir_i = dirs_i
|
||||
plot(freqs, mod(180+180/pi*phase(squeeze(FRFs_O((solid_i-1)*6+dir_i, exc_dir, :))), 360)-180);
|
||||
end
|
||||
hold off;
|
||||
ylim([-180, 180]); yticks(-180:90:180);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
set(gca, 'xscale', 'log');
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([1, 200]);
|
||||
|
||||
% Comparison of the relative motion of solid bodies
|
||||
% Now that the motion of all the solid bodies are expressed in the same frame, we should be able to *compare them*.
|
||||
% This can be used to determine what joints direction between two solid bodies is stiff enough that we can fix this DoF.
|
||||
% This could help reduce the order of the model and simplify the extraction of the model parameters from the measurements.
|
||||
|
||||
% We decide to plot the "normalized relative motion" between solid bodies $i$ and $j$:
|
||||
% \[ 0 < \Delta_{ij, x} = \frac{\left| D_{i,x} - D_{j,x} \right|}{|D_{i,x}| + |D_{j,x}|} < 1 \]
|
||||
|
||||
% Then, if $\Delta_{ij,x} \ll 0$ in the frequency band of interest, we have that $D_{ix} \approx D_{jx}$ and we can neglect that DOF between the two solid bodies $i$ and $j$.
|
||||
|
||||
% This normalized relative motion is shown on figure [[fig:relative_motion_comparison]] for all the directions and for all the adjacent pair of solid bodies.
|
||||
|
||||
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
dirs_i = 1:6;
|
||||
exc_dir = 1;
|
||||
|
||||
figure;
|
||||
|
||||
for i = 2:6
|
||||
subaxis(3, 2, i);
|
||||
hold on;
|
||||
for dir_i = dirs_i
|
||||
H = (squeeze(FRFs_O((i-1)*6+dir_i, exc_dir, :))-squeeze(FRFs_O((i-2)*6+dir_i, exc_dir, :)))./(abs(squeeze(FRFs_O((i-1)*6+dir_i, exc_dir, :)))+abs(squeeze(FRFs_O((i-2)*6+dir_i, exc_dir, :))));
|
||||
plot(freqs, abs(H));
|
||||
end
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||
xlim([1, 200]); ylim([0, 1]);
|
||||
% xlabel('Frequency [Hz]'); ylabel('Relative Motion');
|
||||
title(sprintf('Normalized motion %s - %s', solid_names{i-1}, solid_names{i}));
|
||||
if i > 4
|
||||
xlabel('Frequency [Hz]');
|
||||
else
|
||||
set(gca, 'XTickLabel',[]);
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1:length(dirs_i)
|
||||
legend_names{i} = DOFs{dirs_i(i)};
|
||||
end
|
||||
lgd = legend(legend_names);
|
||||
|
||||
hL = subplot(3, 2, 1);
|
||||
poshL = get(hL,'position');
|
||||
|
||||
set(lgd,'position', poshL);
|
||||
axis(hL, 'off');
|
||||
|
||||
% Verify that we find the original FRF from the FRF in the global coordinates
|
||||
% We have computed the Frequency Response Functions Matrix =FRFs_O= representing the response of the 6 solid bodies in their 6 DOFs.
|
||||
|
||||
% From the response of one body in its 6 DOFs, we should be able to compute the FRF of each of its accelerometer fixed to it during the measurement.
|
||||
|
||||
% We can then compare the result with the original measurements.
|
||||
% This will help us to determine if:
|
||||
% - the previous inversion used is correct
|
||||
% - the solid body assumption is correct in the frequency band of interest
|
||||
|
||||
|
||||
FRF_recovered = zeros(size(FRFs));
|
||||
|
||||
% For each excitation direction
|
||||
for exc_dir = 1:3
|
||||
% For each solid
|
||||
for solid_i = 1:length(solid_names)
|
||||
v0 = squeeze(FRFs_O((solid_i-1)*6+1:(solid_i-1)*6+3, exc_dir, :));
|
||||
W0 = squeeze(FRFs_O((solid_i-1)*6+4:(solid_i-1)*6+6, exc_dir, :));
|
||||
|
||||
% For each accelerometer attached to the current solid
|
||||
for acc_i = solids.(solid_names{solid_i})
|
||||
% We get the position of the accelerometer expressed in frame O
|
||||
pos = acc_pos(acc_i, :)';
|
||||
posX = [0 pos(3) -pos(2); -pos(3) 0 pos(1) ; pos(2) -pos(1) 0];
|
||||
|
||||
FRF_recovered(3*(acc_i-1)+1:3*(acc_i-1)+3, exc_dir, :) = v0 + posX*W0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
% We then compare the original FRF measured for each accelerometer with the recovered FRF from the global FRF matrix in the common frame.
|
||||
|
||||
% The FRF for the 4 accelerometers on the Hexapod are compared on figure [[fig:recovered_frf_comparison_hexa]].
|
||||
% All the FRF are matching very well in all the frequency range displayed.
|
||||
|
||||
% The FRF for accelerometers located on the translation stage are compared on figure [[fig:recovered_frf_comparison_ty]].
|
||||
% The FRF are matching well until 100Hz.
|
||||
|
||||
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
solid_i = 6;
|
||||
exc_dir = 1;
|
||||
|
||||
accs_i = solids.(solid_names{solid_i});
|
||||
|
||||
figure;
|
||||
|
||||
for i = 1:length(accs_i)
|
||||
acc_i = accs_i(i);
|
||||
|
||||
subaxis(2, 2, i);
|
||||
|
||||
hold on;
|
||||
for dir_i = 1:3
|
||||
plot(freqs, abs(squeeze(FRFs(3*(acc_i-1)+dir_i, exc_dir, :))), '-', 'DisplayName', DOFs{dir_i});
|
||||
end
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for dir_i = 1:3
|
||||
plot(freqs, abs(squeeze(FRF_recovered(3*(acc_i-1)+dir_i, exc_dir, :))), '--', 'HandleVisibility', 'off');
|
||||
end
|
||||
hold off;
|
||||
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
if i > 2
|
||||
xlabel('Frequency [Hz]');
|
||||
else
|
||||
set(gca, 'XTickLabel',[]);
|
||||
end
|
||||
|
||||
if rem(i, 2) == 1
|
||||
ylabel('Amplitude');
|
||||
end
|
||||
|
||||
xlim([1, 200]);
|
||||
title(sprintf('Accelerometer %i', accs_i(i)));
|
||||
legend('location', 'northwest');
|
||||
end
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:recovered_frf_comparison_hexa
|
||||
% #+CAPTION: Comparison of the original FRF with the recovered ones - Hexapod
|
||||
% [[file:figs/recovered_frf_comparison_hexa.png]]
|
||||
|
||||
|
||||
exc_names = {'$F_x$', '$F_y$', '$F_z$'};
|
||||
DOFs = {'$T_x$', '$T_y$', '$T_z$', '$\theta_x$', '$\theta_y$', '$\theta_z$'};
|
||||
|
||||
solid_i = 3;
|
||||
exc_dir = 1;
|
||||
|
||||
accs_i = solids.(solid_names{solid_i});
|
||||
|
||||
figure;
|
||||
|
||||
for i = 1:length(accs_i)
|
||||
acc_i = accs_i(i);
|
||||
|
||||
subaxis(2, 2, i);
|
||||
|
||||
hold on;
|
||||
for dir_i = 1:3
|
||||
plot(freqs, abs(squeeze(FRFs(3*(acc_i-1)+dir_i, exc_dir, :))), '-', 'DisplayName', DOFs{dir_i});
|
||||
end
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
for dir_i = 1:3
|
||||
plot(freqs, abs(squeeze(FRF_recovered(3*(acc_i-1)+dir_i, exc_dir, :))), '--', 'HandleVisibility', 'off');
|
||||
end
|
||||
hold off;
|
||||
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
if i > 2
|
||||
xlabel('Frequency [Hz]');
|
||||
else
|
||||
set(gca, 'XTickLabel',[]);
|
||||
end
|
||||
|
||||
if rem(i, 2) == 1
|
||||
ylabel('Amplitude');
|
||||
end
|
||||
|
||||
xlim([1, 200]);
|
||||
title(sprintf('Accelerometer %i', accs_i(i)));
|
||||
legend('location', 'northwest');
|
||||
end
|
||||
|
||||
% Saving of the FRF expressed in the global coordinates
|
||||
|
||||
save('mat/frf_o.mat', 'FRFs_O');
|
@ -13,12 +13,6 @@ acc_pos = table2array(acc_pos(:, 1:4));
|
||||
[~, i] = sort(acc_pos(:, 1));
|
||||
acc_pos = acc_pos(i, 2:4);
|
||||
|
||||
|
||||
|
||||
% The positions of the sensors relative to the point of interest are shown below.
|
||||
|
||||
data2orgtable([[1:23]', 1000*acc_pos], {}, {'ID', 'x [mm]', 'y [mm]', 'z [mm]'}, ' %.0f ');
|
||||
|
||||
% Windowing
|
||||
% Windowing is used on the force and response signals.
|
||||
|
||||
@ -328,6 +322,22 @@ freqs = meas.FFT1_Coh_10_1_RMS_X_Val;
|
||||
|
||||
save('./mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
|
||||
|
||||
% Plot showing the coherence of all the measurements
|
||||
% Now that we have defined a Coherence matrix, we can plot each of its elements to have an idea of the overall coherence and thus, quality of the measurement.
|
||||
% The result is shown on figure [[fig:all_coherence]].
|
||||
|
||||
|
||||
n_acc = 23;
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:3*n_acc
|
||||
plot(freqs, squeeze(COHs(i, 1, :)), 'color', [0, 0, 0, 0.2]);
|
||||
end
|
||||
hold off;
|
||||
xlabel('Frequency [Hz]');
|
||||
ylabel('Coherence [\%]');
|
||||
|
||||
% Solid Bodies considered for further analysis
|
||||
% We consider the following solid bodies for further analysis:
|
||||
% - Bottom Granite
|
||||
@ -340,8 +350,8 @@ save('./mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
|
||||
% We create a =matlab= structure =solids= that contains the accelerometers ID connected to each solid bodies (as shown on figure [[fig:nass-modal-test]]).
|
||||
|
||||
solids = {};
|
||||
solids.granite_bot = [17, 18, 19, 20];
|
||||
solids.granite_top = [13, 14, 15, 16];
|
||||
solids.gbot = [17, 18, 19, 20];
|
||||
solids.gtop = [13, 14, 15, 16];
|
||||
solids.ty = [9, 10, 11, 12];
|
||||
solids.ry = [5, 6, 7, 8];
|
||||
solids.rz = [21, 22, 23];
|
||||
@ -354,3 +364,116 @@ solid_names = fields(solids);
|
||||
% Finally, we save that into a =.mat= file.
|
||||
|
||||
save('mat/geometry.mat', 'solids', 'solid_names', 'acc_pos');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:aligned_accelerometers
|
||||
% #+caption: Aligned measurement of the motion of a solid body
|
||||
% #+RESULTS:
|
||||
% [[file:figs/aligned_accelerometers.png]]
|
||||
|
||||
% The motion of the rigid body of figure [[fig:aligned_accelerometers]] is defined by the velocity $\vec{v}$ and rotation $\vec{\Omega}$ with respect to the reference frame $\{O\}$.
|
||||
|
||||
% The motions at points $1$ and $2$ are:
|
||||
% \begin{align*}
|
||||
% v_1 &= v + \Omega \times p_1 \\
|
||||
% v_2 &= v + \Omega \times p_2
|
||||
% \end{align*}
|
||||
|
||||
% Taking only the $x$ direction:
|
||||
% \begin{align*}
|
||||
% v_{x1} &= v + \Omega_y p_{z1} - \Omega_z p_{y1} \\
|
||||
% v_{x2} &= v + \Omega_y p_{z2} - \Omega_z p_{y2}
|
||||
% \end{align*}
|
||||
|
||||
% However, we have $p_{1y} = p_{2y}$ and $p_{1z} = p_{2z}$ because of the co-linearity of the two sensors in the $x$ direction, and thus we obtain
|
||||
% \begin{equation}
|
||||
% v_{x1} = v_{x2}
|
||||
% \end{equation}
|
||||
|
||||
% #+begin_important
|
||||
% Two sensors that are measuring the motion of a rigid body in the direction of the line linking the two sensors should measure the same quantity.
|
||||
% #+end_important
|
||||
|
||||
% We can verify that the rigid body assumption is correct by comparing the measurement of the sensors.
|
||||
|
||||
% From the table [[tab:position_accelerometers]], we can guess which sensors will give the same results in the X and Y directions.
|
||||
|
||||
% Comparison of such measurements in the X direction is shown on figure [[fig:compare_acc_x_dir]] and in the Y direction on figure [[fig:compare_acc_y_dir]].
|
||||
|
||||
|
||||
meas_dir = 1;
|
||||
exc_dir = 1;
|
||||
|
||||
acc_i = [1 , 4 ;
|
||||
2 , 3 ;
|
||||
5 , 8 ;
|
||||
6 , 7 ;
|
||||
9 , 12;
|
||||
10, 11;
|
||||
14, 15;
|
||||
18, 19;
|
||||
21, 23];
|
||||
|
||||
figure;
|
||||
for i = 1:size(acc_i, 1)
|
||||
subaxis(3, 3, i);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(FRFs(meas_dir+3*(acc_i(i, 1)-1), exc_dir, :))))
|
||||
plot(freqs, abs(squeeze(FRFs(meas_dir+3*(acc_i(i, 2)-1), exc_dir, :))))
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
if i > 6
|
||||
xlabel('Frequency [Hz]');
|
||||
else
|
||||
set(gca, 'XTickLabel',[]);
|
||||
end
|
||||
|
||||
if rem(i, 3) == 1
|
||||
ylabel('Amplitude');
|
||||
end
|
||||
xlim([1, 200]);
|
||||
title(sprintf('Acc %i and %i - X', acc_i(i, 1), acc_i(i, 2)));
|
||||
end
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:compare_acc_x_dir
|
||||
% #+CAPTION: Compare accelerometers align in the X direction
|
||||
% [[file:figs/compare_acc_x_dir.png]]
|
||||
|
||||
|
||||
|
||||
meas_dir = 2;
|
||||
exc_dir = 1;
|
||||
|
||||
acc_i = [1, 2;
|
||||
5, 6;
|
||||
7, 8;
|
||||
9, 10;
|
||||
11, 12;
|
||||
13, 14;
|
||||
15, 16;
|
||||
17, 18;
|
||||
19, 20];
|
||||
|
||||
figure;
|
||||
for i = 1:size(acc_i, 1)
|
||||
subaxis(3, 3, i);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(FRFs(meas_dir+3*(acc_i(i, 1)-1), exc_dir, :))))
|
||||
plot(freqs, abs(squeeze(FRFs(meas_dir+3*(acc_i(i, 2)-1), exc_dir, :))))
|
||||
hold off;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
if i > 6
|
||||
xlabel('Frequency [Hz]');
|
||||
else
|
||||
set(gca, 'XTickLabel',[]);
|
||||
end
|
||||
|
||||
if rem(i, 3) == 1
|
||||
ylabel('Amplitude');
|
||||
end
|
||||
xlim([1, 200]);
|
||||
title(sprintf('Acc %i and %i - Y', acc_i(i, 1), acc_i(i, 2)));
|
||||
end
|
||||
|
@ -214,7 +214,7 @@ We then import that on =matlab=, and sort them.
|
||||
#+end_src
|
||||
|
||||
The positions of the sensors relative to the point of interest are shown below (table [[tab:position_accelerometers]]).
|
||||
#+begin_src matlab :exports results :results value table replace :post addhdr(*this*)
|
||||
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
|
||||
data2orgtable([[1:23]', 1000*acc_pos], {}, {'ID', 'x [mm]', 'y [mm]', 'z [mm]'}, ' %.0f ');
|
||||
#+end_src
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
#+PROPERTY: header-args:matlab+ :exports both
|
||||
#+PROPERTY: header-args:matlab+ :eval no-export
|
||||
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||||
#+PROPERTY: header-args:matlab+ :tangle matlab/modal_extraction.m
|
||||
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||
|
||||
#+PROPERTY: header-args:shell :eval no-export
|
||||
|
||||
@ -39,6 +41,23 @@
|
||||
#+PROPERTY: header-args:latex+ :output-dir figs
|
||||
:END:
|
||||
|
||||
The goal here is to extract the modal parameters describing the modes of station being studied.
|
||||
|
||||
* ZIP file containing the data and matlab files :ignore:
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/modal_extraction.m -nt data/modal_extraction.zip ]; then
|
||||
cp matlab/modal_extraction.m modal_extraction.m;
|
||||
zip data/modal_extraction \
|
||||
mat/data.mat \
|
||||
modal_extraction.m
|
||||
rm modal_extraction.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+begin_note
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/modal_extraction.zip][here]].
|
||||
#+end_note
|
||||
|
||||
* 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>>
|
||||
@ -1828,7 +1847,6 @@ We here sum the norm instead of the complex numbers.
|
||||
#+CAPTION: Composite Response Function
|
||||
[[file:figs/composite_response_function.png]]
|
||||
|
||||
|
||||
* TODO Singular Value Decomposition - Modal Indication Function
|
||||
Show the same plot as in the modal software.
|
||||
This helps to identify double modes.
|
||||
|
Loading…
Reference in New Issue
Block a user