#+TITLE: Modal Analysis - Measurement :DRAWER: #+STARTUP: overview #+LANGUAGE: en #+EMAIL: dehaeze.thomas@gmail.com #+AUTHOR: Dehaeze Thomas #+HTML_LINK_HOME: ../index.html #+HTML_LINK_UP: ./index.html #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+HTML_MATHJAX: align: center tagside: right font: TeX #+PROPERTY: header-args:matlab :session *MATLAB* #+PROPERTY: header-args:matlab+ :comments org #+PROPERTY: header-args:matlab+ :results none #+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_frf_coh.m #+PROPERTY: header-args:matlab+ :mkdirp yes #+PROPERTY: header-args:shell :eval no-export #+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/MEGA/These/LaTeX/}{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 :END: * ZIP file containing the data and matlab files :ignore: #+begin_src bash :exports none :results none if [ matlab/modal_frf_coh.m -nt data/modal_frf_coh.zip ]; then cp matlab/modal_frf_coh.m modal_frf_coh.m; zip data/modal_frf_coh \ mat/meas_raw_1.mat \ mat/meas_frf_coh_*.mat \ mat/id31_nanostation.cfg \ modal_frf_coh.m rm modal_frf_coh.m; fi #+end_src #+begin_note All the files (data and Matlab scripts) are accessible [[file:data/modal_frf_coh.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) <> #+end_src #+begin_src matlab :exports none :results silent :noweb yes <> #+end_src * Goal The goal is to measure the dynamic of the Micro-Station and to extract Frequency Response Functions. * Instrumentation Used In order to perform to *Modal Analysis* and to obtain first a *Response Model*, the following devices are used: - An *acquisition system* (OROS) with 24bits ADCs (figure [[fig:oros]]) - 3 tri-axis *Accelerometers* (figure [[fig:accelero_M393B05]]) with parameters shown on table [[tab:accelero_M393B05]] - An *Instrumented Hammer* with various Tips (figure [[fig:instrumented_hammer]]) (figure [[fig:hammer_tips]]) #+name: fig:oros #+caption: Acquisition system: OROS #+attr_html: :width 500px [[file:img/instrumentation/oros.png]] The acquisition system permits to auto-range the inputs (probably using variable gain amplifiers) the obtain the maximum dynamic range. This is done before each measurement. Anti-aliasing filters are also included in the system. #+name: fig:accelero_M393B05 #+caption: Accelerometer used: M393B05 #+attr_html: :width 500px [[file:img/instrumentation/accelero_M393B05.png]] #+name: tab:accelero_M393B05 #+caption: 393B05 Accelerometer Data Sheet | Sensitivity | 10V/g | | Measurement Range | 0.5 g pk | | Broadband Resolution | 0.000004 g rms | | Frequency Range | 0.7 to 450Hz | | Resonance Frequency | > 2.5kHz | Tests have been conducted to determine the most suitable Hammer tip. This has been found that the softer tip gives the best results. It excites more the low frequency range where the coherence is low, the overall coherence was improved. #+name: fig:instrumented_hammer #+caption: Instrumented Hammer #+attr_html: :width 500px [[file:img/instrumentation/instrumented_hammer.png]] #+name: fig:hammer_tips #+caption: Hammer tips #+attr_html: :width 500px [[file:img/instrumentation/hammer_tips.png]] The accelerometers are glued on the structure. * Structure Preparation and Test Planning ** Structure Preparation All the stages are turned ON. This is done for two reasons: - Be closer to the real dynamic of the station in used - If the control system of stages are turned OFF, this would results in very low frequency modes un-identifiable with the current setup, and this will also decouple the dynamics which would not be the case in practice This is critical for the translation stage and the spindle as their is no stiffness in the free DOF (air-bearing for the spindle for instance). The alternative would have been to mechanically block the stages with screws, but this may result in changing the modes. The stages turned ON are: - Translation Stage - Tilt Stage - Spindle and Slip-Ring - Hexapod The top part representing the NASS and the sample platform have been removed in order to reduce the complexity of the dynamics and also because this will be further added in the model inside Simscape. All the stages are moved to their zero position (Ty, Ry, Rz, Slip-Ring, Hexapod). All other elements have been remove from the granite such as another heavy positioning system. ** Test Planing The goal is to identify the full $N \times N$ FRF matrix (where $N$ is the number of degree of freedom of the system). However, the principle of reciprocity states that: \[ H_{jk} = \frac{X_j}{F_k} = H_{kj} = \frac{X_k}{F_j} \] Thus, only one column or one line of the matrix has to be identified. Either we choose to identify $\frac{X_k}{F_i}$ or $\frac{X_i}{F_k}$ for any chosen $k$ and for $i = 1,\ ...,\ N$. We here choose to identify $\frac{X_i}{F_k}$ for practical reasons: - it is easier to glue the accelerometers on some stages than to excite this particular stage with the Hammer The measurement thus consists of: - always excite the structure at the same location with the Hammer - Move the accelerometers to measure all the DOF of the structure ** Location of the Accelerometers 4 tri-axis accelerometers are used for each solid body. Only 2 could have been used as only 6DOF have to be measured, however, we have chosen to have some *redundancy*. This could also help us identify measurement problems or flexible modes is present. The position of the accelerometers are: - 4 on the first granite - 4 on the second granite (figure [[fig:accelerometers_granite2_overview]]) - 4 on top of the translation stage (figure [[fig:accelerometers_ty_overview]]) - 4 on top of the tilt stage - 3 on top of the spindle - 4 on top of the hexapod (figure [[fig:accelerometers_hexa_overview]]) In total, 23 accelerometers are used: *69 DOFs are thus measured*. The position and orientation of all the accelerometers used are shown on figure [[fig:nass-modal-test]]. The precise determination of the position of each accelerometer is done using the SolidWorks model (shown on figure [[fig:location_accelerometers]]). #+name: fig:accelerometers_granite2_overview #+caption: Accelerometers located on the top granite #+attr_html: :width 500px [[file:img/accelerometers/accelerometers_granite2_overview.jpg]] #+name: fig:accelerometers_ty_overview #+caption: Accelerometers located on top of the translation stage #+attr_html: :width 500px [[file:img/accelerometers/accelerometers_ty_overview.jpg]] #+name: fig:accelerometers_hexa_overview #+caption: Accelerometers located on the Hexapod #+attr_html: :width 500px [[file:img/accelerometers/accelerometers_hexa_overview.jpg]] #+name: fig:nass-modal-test #+caption: Position and orientation of the accelerometer used #+attr_html: :width 800px [[file:figs/nass-modal-test.png]] #+name: fig:location_accelerometers #+caption: Position of the accelerometers using SolidWorks #+attr_html: :width 800px [[file:img/location_accelerometers.png]] The precise position of all the 23 accelerometer with respect to a frame located at the point of interest (located 270mm above the top platform of the hexapod) is shown below. The values are in meter. They are contained in the =mat/id31_nanostation.cfg= file. #+begin_src bash :results none cat mat/id31_nanostation.cfg | grep NODES -A 23 | sed '/\s\+[0-9]\+/!d' | sed 's/\(.*\)\s\+0\s\+.\+/\1/' > mat/acc_pos.txt #+end_src We then import that on =matlab=, and sort them. #+begin_src matlab acc_pos = readtable('mat/acc_pos.txt', 'ReadVariableNames', false); acc_pos = table2array(acc_pos(:, 1:4)); [~, i] = sort(acc_pos(:, 1)); acc_pos = acc_pos(i, 2:4); #+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 :tangle no :post addhdr(*this*) data2orgtable([[1:23]', 1000*acc_pos], {}, {'ID', 'x [mm]', 'y [mm]', 'z [mm]'}, ' %.0f '); #+end_src #+name: tab:position_accelerometers #+caption: position of the accelerometers #+RESULTS: | ID | x [mm] | y [mm] | z [mm] | |----+--------+--------+--------| | 1 | -64 | -64 | -270 | | 2 | -64 | 64 | -270 | | 3 | 64 | 64 | -270 | | 4 | 64 | -64 | -270 | | 5 | -385 | -300 | -417 | | 6 | -420 | 280 | -417 | | 7 | 420 | 280 | -417 | | 8 | 380 | -300 | -417 | | 9 | -475 | -414 | -427 | | 10 | -465 | 407 | -427 | | 11 | 475 | 424 | -427 | | 12 | 475 | -419 | -427 | | 13 | -320 | -446 | -786 | | 14 | -480 | 534 | -786 | | 15 | 450 | 534 | -786 | | 16 | 295 | -481 | -786 | | 17 | -730 | -526 | -951 | | 18 | -735 | 814 | -951 | | 19 | 875 | 799 | -951 | | 20 | 865 | -506 | -951 | | 21 | -155 | -90 | -594 | | 22 | 0 | 180 | -594 | | 23 | 155 | -90 | -594 | ** Hammer Impacts Only 3 impact points are used. The impact points are shown on figures [[fig:hammer_x]], [[fig:hammer_y]] and [[fig:hammer_z]]. We chose this excitation point as it seems to excite all the modes in the frequency band of interest and because it provides good coherence for all the accelerometers. #+name: fig:hammer_x #+caption: Hammer Blow in the X direction #+attr_html: :width 300px [[file:img/impacts/hammer_x.gif]] #+name: fig:hammer_y #+caption: Hammer Blow in the Y direction #+attr_html: :width 300px [[file:img/impacts/hammer_y.gif]] #+name: fig:hammer_z #+caption: Hammer Blow in the Z direction #+attr_html: :width 300px [[file:img/impacts/hammer_z.gif]] * Signal Processing ** Averaging The measurements are averaged 10 times corresponding to 10 hammer impacts in order to reduce the effect of random noise. The parameters for the impact test are shown on table [[tab:meas_parameters]]. #+name: tab:meas_parameters #+caption: Impact test parameters | Start Delay | -5% | | Number of lines | 801 lines | | Trigger Threshold | 300N | | Trigger Hysteresis | 100mN | | FRF Average | 10 | ** Windowing Windowing is used on the force and response signals. A boxcar window (figure [[fig:windowing_force_signal]]) is used for the force signal as once the impact on the structure is done, the measured signal is meaningless. The parameters are: - *Start*: $3\%$ - *Stop*: $7\%$ #+begin_src matlab :exports none figure; plot(100*[0, 0.03, 0.03, 0.07, 0.07, 1], [0, 0, 1, 1, 0, 0]); xlabel('Time [%]'); ylabel('Amplitude'); xlim([0, 100]); ylim([0, 1]); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/windowing_force_signal.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:windowing_force_signal #+CAPTION: Window used for the force signal [[file:figs/windowing_force_signal.png]] An exponential window (figure [[fig:windowing_response_signal]]) is used for the response signal as we are measuring transient signals and most of the information is located at the beginning of the signal. The parameters are: - FlatTop: - *Start*: $3\%$ - *Stop*: $2.96\%$ - Decreasing point: - *X*: $60.4\%$ - *Y*: $14.7\%$ #+begin_src matlab :exports none x0 = 0.296; xd = 0.604; yd = 0.147; alpha = log(yd)/(x0 - xd); t = x0:0.01:1.01; y = exp(-alpha*(t-x0)); figure; plot(100*[0, 0.03, 0.03, x0, t], [0, 0, 1, 1, y]); xlabel('Time [%]'); ylabel('Amplitude'); xlim([0, 100]); ylim([0, 1]); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/windowing_response_signal.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:windowing_response_signal #+CAPTION: Window used for the response signals [[file:figs/windowing_response_signal.png]] * Force and Response signals Let's load some obtained data to look at the force and response signals. #+begin_src matlab meas1_raw = load('mat/meas_raw_1.mat'); #+end_src ** Raw Force Data The force input for the first measurement is shown on figure [[fig:raw_data_force]]. We can see 10 impacts, one zoom on one impact is shown on figure [[fig:raw_data_force_zoom]]. The Fourier transform of the force is shown on figure [[fig:fourier_transfor_force_impact]]. This has been obtained without any windowing. #+begin_src matlab :exports none time = linspace(0, meas1_raw.Track1_X_Resolution*length(meas1_raw.Track1), length(meas1_raw.Track1)); #+end_src #+begin_src matlab :exports none figure; plot(time, meas1_raw.Track1); xlabel('Time [s]'); ylabel('Force [N]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/raw_data_force.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:raw_data_force #+CAPTION: Raw Force Data from Hammer Blow [[file:figs/raw_data_force.png]] #+begin_src matlab :exports none figure; plot(time, meas1_raw.Track1); xlabel('Time [s]'); ylabel('Force [N]'); xlim([22.1, 22.3]); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/raw_data_force_zoom.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:raw_data_force_zoom #+CAPTION: Raw Force Data from Hammer Blow - Zoom [[file:figs/raw_data_force_zoom.png]] #+begin_src matlab :exports none Fs = 1/meas1_raw.Track1_X_Resolution; % Sampling Frequency [Hz] impacts = [5.9, 11.2, 16.6, 22.2, 27.3, 32.7, 38.1, 43.8, 50.4]; % Time just before the impact occurs [s] L = 8194; f = Fs*(0:(L/2))/L; % Frequency vector [Hz] F_fft = zeros((8193+1)/2+1, length(impacts)); for i = 1:length(impacts) t0 = impacts(i); [~, i_start] = min(abs(time-t0)); i_end = i_start + 8193; Y = fft(meas1_raw.Track1(i_start:i_end)); P2 = abs(Y/L); P1 = P2(1:L/2+1); P1(2:end-1) = 2*P1(2:end-1); F_fft(:, i) = P1; end #+end_src #+begin_src matlab :exports none figure; hold on; for i = 1:length(impacts) plot(f, F_fft(:, i), '-k'); end hold off; xlim([0, 200]); xlabel('Frequency [Hz]'); ylabel('Force [N]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/fourier_transfor_force_impact.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:fourier_transfor_force_impact #+CAPTION: Fourier Transform of the 10 force impacts for the first measurement [[file:figs/fourier_transfor_force_impact.png]] ** Raw Response Data The response signal for the first measurement is shown on figure [[fig:raw_data_acceleration]]. One zoom on one response is shown on figure [[fig:raw_data_acceleration_zoom]]. The Fourier transform of the response signals is shown on figure [[fig:fourier_transform_response_signals]]. This has been obtained without any windowing. #+begin_src matlab :exports none figure; plot(time, meas1_raw.Track2); xlabel('Time [s]'); ylabel('Acceleration [m/s2]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/raw_data_acceleration.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:raw_data_acceleration #+CAPTION: Raw Acceleration Data from Accelerometer [[file:figs/raw_data_acceleration.png]] #+begin_src matlab :exports none figure; plot(time, meas1_raw.Track2); xlabel('Time [s]'); ylabel('Acceleration [m/s2]'); xlim([22.1, 22.5]); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/raw_data_acceleration_zoom.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:raw_data_acceleration_zoom #+CAPTION: Raw Acceleration Data from Accelerometer - Zoom [[file:figs/raw_data_acceleration_zoom.png]] #+begin_src matlab :exports none X_fft = zeros((8193+1)/2+1, length(impacts)); for i = 1:length(impacts) t0 = impacts(i); [~, i_start] = min(abs(time-t0)); i_end = i_start + 8193; Y = fft(meas1_raw.Track2(i_start:i_end)); P2 = abs(Y/L); P1 = P2(1:L/2+1); P1(2:end-1) = 2*P1(2:end-1); X_fft(:, i) = P1; end #+end_src #+begin_src matlab :exports none figure; hold on; for i = 1:length(impacts) plot(f, X_fft(:, i), '-k'); end hold off; xlim([0, 200]); set(gca, 'Yscale', 'log'); xlabel('Frequency [Hz]'); ylabel('Acceleration [$m/s^2$]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/fourier_transform_response_signals.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:fourier_transform_response_signals #+CAPTION: Fourier transform of the measured response signals [[file:figs/fourier_transform_response_signals.png]] ** Computation of one Frequency Response Function Now that we have obtained the Fourier transform of both the force input and the response signal, we can compute the Frequency Response Function from the force to the acceleration. We then compare the result obtained with the FRF computed by the modal software (figure [[fig:frf_comparison_software]]). The slight difference can probably be explained by the use of windows. In the following analysis, FRF computed from the software will be used. #+begin_src matlab meas1 = load('mat/meas_frf_coh_1.mat'); #+end_src #+begin_src matlab :exports none figure; hold on; for i = 1:length(impacts) plot(f, X_fft(:, i)./F_fft(:, i), '-k'); end plot(meas1.FFT1_AvSpc_2_RMS_X_Val, meas1.FFT1_AvSpc_2_RMS_Y_Val) hold off; xlim([0, 200]); set(gca, 'Yscale', 'log'); xlabel('Frequency [Hz]'); ylabel('Acceleration/Force [$m/s^2/N$]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/frf_comparison_software.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:frf_comparison_software #+CAPTION: Comparison of the computed FRF from the Fourier transform and using the modal software [[file:figs/frf_comparison_software.png]] * Frequency Response Functions and Coherence Results Let's see one computed Frequency Response Function and one coherence in order to attest the quality of the measurement. First, we load the data. #+begin_src matlab meas1 = load('mat/meas_frf_coh_1.mat'); #+end_src And we plot on figure [[fig:frf_result_example]] the frequency response function from the force applied in the $X$ direction at the location of the accelerometer number 11 to the acceleration in the $X$ direction as measured by the first accelerometer located on the top platform of the hexapod. The coherence associated is shown on figure [[fig:frf_result_example]]. #+begin_src matlab :exports none figure; ax1 = subplot(2, 1, 1); plot(meas1.FFT1_AvSpc_2_RMS_X_Val, meas1.FFT1_AvXSpc_2_1_RMS_Y_Mod); set(gca, 'Yscale', 'log'); set(gca, 'XTickLabel',[]); ylabel('Magnitude'); ax2 = subplot(2, 1, 2); plot(meas1.FFT1_AvSpc_2_RMS_X_Val, meas1.FFT1_AvXSpc_2_1_RMS_Y_Phas); ylim([-180, 180]); yticks([-180, -90, 0, 90, 180]); xlabel('Frequency [Hz]'); ylabel('Phase [deg]'); linkaxes([ax1,ax2],'x'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/frf_result_example.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:frf_result_example #+CAPTION: Example of one measured FRF [[file:figs/frf_result_example.png]] #+begin_src matlab :exports none figure; plot(meas1.FFT1_AvSpc_2_RMS_X_Val, meas1.FFT1_Coh_2_1_RMS_Y_Val); xlabel('Frequency [Hz]'); ylabel('Coherence'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/coh_result_example.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:coh_result_example #+CAPTION: Example of one measured Coherence [[file:figs/coh_result_example.png]] * Generation of a FRF matrix and a Coherence matrix from the measurements We want here to combine all the Frequency Response Functions measured into one big array called the *Frequency Response Matrix*. The frequency response matrix is an $n \times p \times q$: - $n$ is the number of measurements: $23 \times 3$ (23 accelerometers measuring 3 directions each) - $p$ is the number of excitation inputs: $3$ - $q$ is the number of frequency points $\omega_i$ Thus, the FRF matrix is an $69 \times 3 \times 801$ matrix. #+begin_important For each frequency point $\omega_i$, we obtain a 2D matrix: \begin{equation} \text{FRF}(\omega_i) = \begin{bmatrix} \frac{D_{1_x}}{F_x}(\omega_i) & \frac{D_{1_x}}{F_y}(\omega_i) & \frac{D_{1_x}}{F_z}(\omega_i) \\ \frac{D_{1_y}}{F_x}(\omega_i) & \frac{D_{1_y}}{F_y}(\omega_i) & \frac{D_{1_y}}{F_z}(\omega_i) \\ \frac{D_{1_z}}{F_x}(\omega_i) & \frac{D_{1_z}}{F_y}(\omega_i) & \frac{D_{1_z}}{F_z}(\omega_i) \\ \frac{D_{2_x}}{F_x}(\omega_i) & \frac{D_{2_x}}{F_y}(\omega_i) & \frac{D_{2_x}}{F_z}(\omega_i) \\ \vdots & \vdots & \vdots \\ \frac{D_{23_z}}{F_x}(\omega_i) & \frac{D_{23_z}}{F_y}(\omega_i) & \frac{D_{23_z}}{F_z}(\omega_i) \\ \end{bmatrix} \end{equation} #+end_important We generate such FRF matrix from the measurements using the following script. #+begin_src matlab n_meas = 24; n_acc = 23; dirs = 'XYZ'; % Number of Accelerometer * DOF for each acccelerometer / Number of excitation / frequency points FRFs = zeros(3*n_acc, 3, 801); COHs = zeros(3*n_acc, 3, 801); % Loop through measurements for i = 1:n_meas % Load the measurement file meas = load(sprintf('mat/meas_frf_coh_%i.mat', i)); % First: determine what is the exitation (direction and sign) exc_dir = meas.FFT1_AvXSpc_2_1_RMS_RfName(end); exc_sign = meas.FFT1_AvXSpc_2_1_RMS_RfName(end-1); % Determine what is the correct excitation sign exc_factor = str2num([exc_sign, '1']); if exc_dir ~= 'Z' exc_factor = exc_factor*(-1); end % Then: loop through the nine measurements and store them at the correct location for j = 2:10 % Determine what is the accelerometer and direction [indices_acc_i] = strfind(meas.(sprintf('FFT1_H1_%i_1_RpName', j)), '.'); acc_i = str2num(meas.(sprintf('FFT1_H1_%i_1_RpName', j))(indices_acc_i(1)+1:indices_acc_i(2)-1)); meas_dir = meas.(sprintf('FFT1_H1_%i_1_RpName', j))(end); meas_sign = meas.(sprintf('FFT1_H1_%i_1_RpName', j))(end-1); % Determine what is the correct measurement sign meas_factor = str2num([meas_sign, '1']); if meas_dir ~= 'Z' meas_factor = meas_factor*(-1); end FRFs(find(dirs==meas_dir)+3*(acc_i-1), find(dirs==exc_dir), :) = exc_factor*meas_factor*meas.(sprintf('FFT1_H1_%i_1_Y_ReIm', j)); COHs(find(dirs==meas_dir)+3*(acc_i-1), find(dirs==exc_dir), :) = meas.(sprintf('FFT1_Coh_%i_1_RMS_Y_Val', j)); end end freqs = meas.FFT1_Coh_10_1_RMS_X_Val; #+end_src And we save the obtained FRF matrix and Coherence matrix in a =.mat= file. #+begin_src matlab save('./mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs'); #+end_src * 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]]. #+begin_src matlab :exports none 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 [\%]'); #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/all_coherence.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:all_coherence #+CAPTION: Plot of the coherence of all the measurements [[file:figs/all_coherence.png]] * Solid Bodies considered for further analysis We consider the following solid bodies for further analysis: - Bottom Granite - Top Granite - Translation Stage - Tilt Stage - Spindle - Hexapod We create a =matlab= structure =solids= that contains the accelerometers ID connected to each solid bodies (as shown on figure [[fig:nass-modal-test]]). #+begin_src matlab solids = {}; 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]; solids.hexa = [1, 2, 3, 4]; solid_names = fields(solids); #+end_src Finally, we save that into a =.mat= file. #+begin_src matlab save('mat/geometry.mat', 'solids', 'solid_names', 'acc_pos'); #+end_src * Note about the solid body assumption If we measure the motion of a rigid body along a direction $\vec{x}$ using 2 sensors that are co-linear with the same direction $\vec{x}$ ($\vec{p}_2 = \vec{p}_1 + \alpha \vec{x}$), they will measured the same quantity. This is illustrated on figure [[fig:aligned_accelerometers]]. #+begin_src latex :file aligned_accelerometers.pdf :post pdf2svg(file=*this*, ext="png") :exports results \newcommand\irregularcircle[2]{% radius, irregularity \pgfextra {\pgfmathsetmacro\len{(#1)+rand*(#2)}} +(0:\len pt) \foreach \a in {10,20,...,350}{ \pgfextra {\pgfmathsetmacro\len{(#1)+rand*(#2)}} -- +(\a:\len pt) } -- cycle } \begin{tikzpicture} \draw[rounded corners=1mm, fill=blue!30!white] (0, 0) \irregularcircle{3cm}{1mm}; \node[] (origin) at (4, -1) {$\bullet$}; \begin{scope}[shift={(origin)}] \def\axissize{0.8cm} \draw[->] (0, 0) -- ++(\axissize, 0) node[above left]{$x$}; \draw[->] (0, 0) -- ++(0, \axissize) node[below right]{$y$}; \draw[fill, color=black] (0, 0) circle (0.05*\axissize); \node[draw, circle, inner sep=0pt, minimum size=0.4*\axissize, label=left:$z$] (yaxis) at (0, 0){}; \node[below right] at (0, 0){$\{O\}$}; \end{scope} \coordinate[] (p1) at (-1.5, 1.5); \coordinate[] (p2) at ( 1.5, 1.5); \draw[->] (p1)node[]{$\bullet$}node[above]{$p_1$} -- ++(1, 0)node[above]{$v_{x1}$}; \draw[->] (p2)node[]{$\bullet$}node[above]{$p_2$} -- ++(1, 0)node[above]{$v_{x2}$}; \draw[dashed] ($(p1)+(-1, 0)$) -- ($(p2)+(2, 0)$); \end{tikzpicture} #+end_src #+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]]. #+begin_src matlab :exports none 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) subplot(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 #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/compare_acc_x_dir.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:compare_acc_x_dir #+CAPTION: Compare accelerometers align in the X direction [[file:figs/compare_acc_x_dir.png]] #+begin_src matlab :exports none 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) subplot(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 #+end_src #+HEADER: :tangle no :exports results :results none :noweb yes #+begin_src matlab :var filepath="figs/compare_acc_y_dir.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") <> #+end_src #+NAME: fig:compare_acc_y_dir #+CAPTION: Compare accelerometers align in the Y direction [[file:figs/compare_acc_y_dir.png]] #+begin_important From the two figures above, we are more confident about the rigid body assumption in the frequency band of interest. #+end_important