diff --git a/figs/vionic_noise_asd.pdf b/figs/vionic_noise_asd.pdf index a5b8ffd..caf5719 100644 Binary files a/figs/vionic_noise_asd.pdf and b/figs/vionic_noise_asd.pdf differ diff --git a/figs/vionic_noise_asd.png b/figs/vionic_noise_asd.png index 94f46a2..b0ecd31 100644 Binary files a/figs/vionic_noise_asd.png and b/figs/vionic_noise_asd.png differ diff --git a/figs/vionic_noise_asd_model.pdf b/figs/vionic_noise_asd_model.pdf index 4421e20..4b0ed94 100644 Binary files a/figs/vionic_noise_asd_model.pdf and b/figs/vionic_noise_asd_model.pdf differ diff --git a/figs/vionic_noise_asd_model.png b/figs/vionic_noise_asd_model.png index 3dab90b..0753e59 100644 Binary files a/figs/vionic_noise_asd_model.png and b/figs/vionic_noise_asd_model.png differ diff --git a/figs/vionic_noise_raw_lpf.pdf b/figs/vionic_noise_raw_lpf.pdf index 7015bc9..8327df7 100644 Binary files a/figs/vionic_noise_raw_lpf.pdf and b/figs/vionic_noise_raw_lpf.pdf differ diff --git a/figs/vionic_noise_time.pdf b/figs/vionic_noise_time.pdf index c25aa09..17cb30e 100644 Binary files a/figs/vionic_noise_time.pdf and b/figs/vionic_noise_time.pdf differ diff --git a/figs/vionic_noise_time.png b/figs/vionic_noise_time.png index dc4efd3..a038b9f 100644 Binary files a/figs/vionic_noise_time.png and b/figs/vionic_noise_time.png differ diff --git a/test-bench-vionic.html b/test-bench-vionic.html index 11f4ecf..5596bad 100644 --- a/test-bench-vionic.html +++ b/test-bench-vionic.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Encoder Renishaw Vionic - Test Bench @@ -39,23 +39,23 @@

Table of Contents

@@ -65,7 +65,7 @@

This report is also available as a pdf.


-
+

You can find below the document of:

@@ -90,7 +90,7 @@ In particular, we would like to measure: -
+

encoder_vionic.png

Figure 1: Picture of the Vionic Encoder

@@ -106,8 +106,8 @@ In particular, we would like to measure:
  • 7: 2YJ313
  • -
    -

    1 Encoder Model

    +
    +

    1 Encoder Model

    The Encoder is characterized by its dynamics \(G_m(s)\) from the “true” displacement \(y\) to measured displacement \(y_m\). @@ -119,27 +119,27 @@ It is also characterized by its measurement noise \(n\) that can be described by

    -The model of the encoder is shown in Figure 2. +The model of the encoder is shown in Figure 2.

    -
    +

    encoder-model-schematic.png

    Figure 2: Model of the Encoder

    -We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) with unity ASD as shown in Figure 4. +We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) with unity ASD as shown in Figure 4.

    -
    +

    encoder-model-schematic-with-asd.png

    - +
    @@ -184,7 +184,7 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
    Table 1: Characteristics of the Vionic Encoder
    -
    +

    vionic_expected_noise.png

    Figure 4: Expected interpolation errors for the Vionic Encoder

    @@ -193,15 +193,15 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
    -
    -

    2 Noise Measurement

    +
    +

    2 Noise Measurement

    - +

    -
    -

    2.1 Test Bench

    +
    +

    2.1 Test Bench

    To measure the noise \(n\) of the encoder, one can rigidly fix the head and the ruler together such that no motion should be measured. @@ -210,48 +210,35 @@ Then, the measured signal \(y_m\) corresponds to the noise \(n\).

    -
    -

    2.2 Results

    +
    +

    2.2 Results

    First we load the data. -

    -
    -
    %% Load Data
    -enc1 = load('noise_meas_100s_20kHz_1.mat', 't', 'x');
    -enc2 = load('noise_meas_100s_20kHz_2.mat', 't', 'x');
    -enc3 = load('noise_meas_100s_20kHz_3.mat', 't', 'x');
    -enc4 = load('noise_meas_100s_20kHz_4.mat', 't', 'x');
    -enc6 = load('noise_meas_100s_20kHz_6.mat', 't', 'x');
    -enc7 = load('noise_meas_100s_20kHz_7.mat', 't', 'x');
    -
    -
    - -

    -The raw measured data as well as the low pass filtered data (using a first order low pass filter with a cut-off at 10Hz) are shown in Figure 5. +The raw measured data as well as the low pass filtered data (using a first order low pass filter with a cut-off at 10Hz) are shown in Figure 5.

    -
    +

    vionic_noise_raw_lpf.png

    Figure 5: Time domain measurement (raw data and low pass filtered data with first order 10Hz LPF)

    -The time domain data for all the encoders are compared in Figure 6. +The time domain data for all the encoders are compared in Figure 6.

    -
    +

    vionic_noise_time.png

    Figure 6: Comparison of the time domain measurement

    -The amplitude spectral density is computed and shown in Figure 7. +The amplitude spectral density is computed and shown in Figure 7.

    -
    +

    vionic_noise_asd.png

    Figure 7: Amplitude Spectral Density of the measured signal

    @@ -266,11 +253,11 @@ Let’s create a transfer function that approximate the measured noise of th

    -The amplitude of the transfer function and the measured ASD are shown in Figure 8. +The amplitude of the transfer function and the measured ASD are shown in Figure 8.

    -
    +

    vionic_noise_asd_model.png

    Figure 8: Measured ASD of the noise and modelled one

    @@ -279,15 +266,15 @@ The amplitude of the transfer function and the measured ASD are shown in Figure
    -
    -

    3 Linearity Measurement

    +
    +

    3 Linearity Measurement

    - +

    -
    -

    3.1 Test Bench

    +
    +

    3.1 Test Bench

    In order to measure the linearity, we have to compare the measured displacement with a reference sensor with a known linearity. @@ -296,7 +283,7 @@ An actuator should also be there so impose a displacement.

    -One idea is to use the test-bench shown in Figure 9. +One idea is to use the test-bench shown in Figure 9.

    @@ -309,7 +296,7 @@ As the interferometer has a very large bandwidth, we should be able to estimate

    -
    +

    test_bench_encoder_calibration.png

    Figure 9: Schematic of the test bench

    @@ -317,30 +304,30 @@ As the interferometer has a very large bandwidth, we should be able to estimate
    -
    -

    3.2 Results

    +
    +

    3.2 Results

    -
    -

    4 Dynamical Measurement

    +
    +

    4 Dynamical Measurement

    - +

    -
    -

    4.1 Test Bench

    +
    +

    4.1 Test Bench

    -
    -

    4.2 Results

    +
    +

    4.2 Results

    Author: Dehaeze Thomas

    -

    Created: 2021-02-03 mer. 11:20

    +

    Created: 2021-02-04 jeu. 20:23

    diff --git a/test-bench-vionic.org b/test-bench-vionic.org index bb6fed7..8c11682 100644 --- a/test-bench-vionic.org +++ b/test-bench-vionic.org @@ -173,32 +173,27 @@ addpath('./mat/'); ** Results First we load the data. -#+begin_src matlab -%% Load Data -enc1 = load('noise_meas_100s_20kHz_1.mat', 't', 'x'); -enc2 = load('noise_meas_100s_20kHz_2.mat', 't', 'x'); -enc3 = load('noise_meas_100s_20kHz_3.mat', 't', 'x'); -enc4 = load('noise_meas_100s_20kHz_4.mat', 't', 'x'); -enc6 = load('noise_meas_100s_20kHz_6.mat', 't', 'x'); -enc7 = load('noise_meas_100s_20kHz_7.mat', 't', 'x'); +#+begin_src matlab :exports none +%% Load all the measurements +enc = {}; +for i = 1:7 + enc(i) = {load(['mat/noise_meas_100s_20kHz_' num2str(i) '.mat'], 't', 'x')}; +end #+end_src #+begin_src matlab :exports none %% Remove initial offset -enc1.x = enc1.x - mean(enc1.x(1:1000)); -enc2.x = enc2.x - mean(enc2.x(1:1000)); -enc3.x = enc3.x - mean(enc3.x(1:1000)); -enc4.x = enc4.x - mean(enc4.x(1:1000)); -enc6.x = enc6.x - mean(enc6.x(1:1000)); -enc7.x = enc7.x - mean(enc7.x(1:1000)); +for i = 1:7 + enc{i}.x = enc{i}.x - mean(enc{i}.x(1:1000)); +end #+end_src The raw measured data as well as the low pass filtered data (using a first order low pass filter with a cut-off at 10Hz) are shown in Figure [[fig:vionic_noise_raw_lpf]]. #+begin_src matlab :exports none figure; hold on; -plot(enc1.t, 1e9*enc1.x, '.', 'DisplayName', 'Enc 1 - Raw'); -plot(enc1.t, 1e9*lsim(1/(1 + s/2/pi/10), enc1.x, enc1.t), '-', 'DisplayName', 'Enc 1 - LPF'); +plot(enc{1}.t, 1e9*enc{1}.x, '.', 'DisplayName', 'Enc 1 - Raw'); +plot(enc{1}.t, 1e9*lsim(1/(1 + s/2/pi/10), enc{1}.x, enc{1}.t), '-', 'DisplayName', 'Enc 1 - LPF'); hold off; xlabel('Time [s]'); ylabel('Displacement [nm]'); @@ -218,12 +213,10 @@ The time domain data for all the encoders are compared in Figure [[fig:vionic_no #+begin_src matlab :exports none figure; hold on; -plot(enc1.t, 1e9*lsim(1/(1 + s/2/pi/10), enc1.x, enc1.t), '.', 'DisplayName', 'Enc 1'); -plot(enc2.t, 1e9*lsim(1/(1 + s/2/pi/10), enc2.x, enc2.t), '.', 'DisplayName', 'Enc 2'); -plot(enc3.t, 1e9*lsim(1/(1 + s/2/pi/10), enc3.x, enc3.t), '.', 'DisplayName', 'Enc 3'); -plot(enc4.t, 1e9*lsim(1/(1 + s/2/pi/10), enc4.x, enc4.t), '.', 'DisplayName', 'Enc 4'); -plot(enc6.t, 1e9*lsim(1/(1 + s/2/pi/10), enc6.x, enc6.t), '.', 'DisplayName', 'Enc 6'); -plot(enc7.t, 1e9*lsim(1/(1 + s/2/pi/10), enc7.x, enc7.t), '.', 'DisplayName', 'Enc 7'); +for i=1:7 + plot(enc{i}.t, 1e9*lsim(1/(1 + s/2/pi/10), enc{i}.x, enc{i}.t), '.', ... + 'DisplayName', sprintf('Enc %i', i)); +end hold off; xlabel('Time [s]'); ylabel('Displacement [nm]'); @@ -248,23 +241,22 @@ Fs = 1/Ts; % Hannning Windows win = hanning(ceil(0.5/Ts)); -[p1, f] = pwelch(enc1.x, win, [], [], Fs); -[p2, ~] = pwelch(enc2.x, win, [], [], Fs); -[p3, ~] = pwelch(enc3.x, win, [], [], Fs); -[p4, ~] = pwelch(enc4.x, win, [], [], Fs); -[p6, ~] = pwelch(enc6.x, win, [], [], Fs); -[p7, ~] = pwelch(enc7.x, win, [], [], Fs); +[pxx, f] = pwelch(enc{1}.x, win, [], [], Fs); +enc{1}.pxx = pxx; + +for i=2:7 + [pxx, ~] = pwelch(enc{i}.x, win, [], [], Fs); + enc{i}.pxx = pxx; +end #+end_src #+begin_src matlab :exports none figure; hold on; -plot(f, sqrt(p1), 'DisplayName', 'Enc 1'); -plot(f, sqrt(p2), 'DisplayName', 'Enc 2'); -plot(f, sqrt(p3), 'DisplayName', 'Enc 3'); -plot(f, sqrt(p4), 'DisplayName', 'Enc 4'); -plot(f, sqrt(p6), 'DisplayName', 'Enc 6'); -plot(f, sqrt(p7), 'DisplayName', 'Enc 7'); +for i=1:7 + plot(f, sqrt(enc{i}.pxx), ... + 'DisplayName', sprintf('Enc %i', i)); +end set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]'); xlim([10, Fs/2]); @@ -292,11 +284,10 @@ The amplitude of the transfer function and the measured ASD are shown in Figure figure; hold on; plot(f, sqrt(p1), 'color', [0, 0, 0, 0.5], 'DisplayName', '$\Gamma_n(\omega)$'); -plot(f, sqrt(p2), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off'); -plot(f, sqrt(p3), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off'); -plot(f, sqrt(p4), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off'); -plot(f, sqrt(p6), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off'); -plot(f, sqrt(p7), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off'); +for i=2:7 + plot(f, sqrt(enc{i}.pxx), 'color', [0, 0, 0, 0.5], ... + 'HandleVisibility', 'off'); +end plot(f, abs(squeeze(freqresp(Gn_e, f, 'Hz'))), 'r-', 'DisplayName', '$|G_n(j\omega)|$'); hold off; set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); diff --git a/test-bench-vionic.pdf b/test-bench-vionic.pdf index 8a1c16a..cc9113d 100644 Binary files a/test-bench-vionic.pdf and b/test-bench-vionic.pdf differ