2020-10-23 23:05:34 +02:00
<?xml version="1.0" encoding="utf-8"?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml:lang = "en" >
< head >
2020-11-04 20:38:59 +01:00
<!-- 2020 - 11 - 04 mer. 20:38 -->
2020-10-23 23:05:34 +02:00
< meta http-equiv = "Content-Type" content = "text/html;charset=utf-8" / >
< title > Encoder - Test Bench< / title >
< meta name = "generator" content = "Org mode" / >
< meta name = "author" content = "Dehaeze Thomas" / >
< link rel = "stylesheet" type = "text/css" href = "./css/htmlize.css" / >
< link rel = "stylesheet" type = "text/css" href = "./css/readtheorg.css" / >
< link rel = "stylesheet" type = "text/css" href = "./css/zenburn.css" / >
< script type = "text/javascript" src = "./js/jquery.min.js" > < / script >
< script type = "text/javascript" src = "./js/bootstrap.min.js" > < / script >
< script type = "text/javascript" src = "./js/jquery.stickytableheaders.min.js" > < / script >
< script type = "text/javascript" src = "./js/readtheorg.js" > < / script >
< script > M a t h J a x = {
tex: {
tags: 'ams',
macros: {bm: ["\\boldsymbol{#1}",1],}
}
};
< / script >
< script type = "text/javascript" src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" > < / script >
< / head >
< body >
2020-10-29 10:08:22 +01:00
< div id = "org-div-home-and-up" >
< a accesskey = "h" href = "../index.html" > UP < / a >
|
< a accesskey = "H" href = "../index.html" > HOME < / a >
< / div > < div id = "content" >
2020-10-23 23:05:34 +02:00
< h1 class = "title" > Encoder - Test Bench< / h1 >
< div id = "table-of-contents" >
< h2 > Table of Contents< / h2 >
< div id = "text-table-of-contents" >
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org2b2f049" > 1. Experimental Setup< / a > < / li >
< li > < a href = "#org9ae614e" > 2. Huddle Test< / a >
2020-10-23 23:05:34 +02:00
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#orgc034802" > 2.1. Load Data< / a > < / li >
< li > < a href = "#orgd8ae4ae" > 2.2. Time Domain Results< / a > < / li >
< li > < a href = "#org864c60c" > 2.3. Frequency Domain Noise< / a > < / li >
2020-10-23 23:05:34 +02:00
< / ul >
< / li >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org96539c5" > 3. Comparison Interferometer / Encoder< / a >
2020-10-23 23:05:34 +02:00
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#orgc6453b2" > 3.1. Load Data< / a > < / li >
< li > < a href = "#orgc362641" > 3.2. Time Domain Results< / a > < / li >
< li > < a href = "#orgb50503c" > 3.3. Difference between Encoder and Interferometer as a function of time< / a > < / li >
< li > < a href = "#org5ec03aa" > 3.4. Difference between Encoder and Interferometer as a function of position< / a > < / li >
2020-10-23 23:05:34 +02:00
< / ul >
< / li >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org6b73303" > 4. Identification< / a >
2020-10-23 23:05:34 +02:00
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#orga15e9e2" > 4.1. Load Data< / a > < / li >
< li > < a href = "#org6974653" > 4.2. Identification< / a > < / li >
2020-10-29 09:59:29 +01:00
< / ul >
< / li >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org5be1a0f" > 5. Change of Stiffness due to Sensors stack being open/closed circuit< / a >
2020-10-29 09:59:29 +01:00
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org00fc76c" > 5.1. Load Data< / a > < / li >
< li > < a href = "#org757917f" > 5.2. Transfer Functions< / a > < / li >
2020-10-29 09:59:29 +01:00
< / ul >
< / li >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org8dab16f" > 6. Generated Number of Charge / Voltage< / a >
2020-10-29 09:59:29 +01:00
< ul >
2020-11-04 20:38:59 +01:00
< li > < a href = "#org28149b5" > 6.1. Steps< / a > < / li >
< li > < a href = "#org900387e" > 6.2. Add Parallel Resistor< / a > < / li >
< li > < a href = "#org7cfe5a8" > 6.3. Sinus< / a > < / li >
2020-10-23 23:05:34 +02:00
< / ul >
< / li >
< / ul >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org2b2f049" class = "outline-2" >
< h2 id = "org2b2f049" > < span class = "section-number-2" > 1< / span > Experimental Setup< / h2 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-2" id = "text-1" >
< p >
2020-11-04 20:38:59 +01:00
The experimental Setup is schematically represented in Figure < a href = "#orgff06236" > 1< / a > .
2020-10-25 09:06:14 +01:00
< / p >
< p >
The mass can be vertically moved using the amplified piezoelectric actuator.
The displacement of the mass (relative to the mechanical frame) is measured both by the interferometer and by the encoder.
2020-10-23 23:05:34 +02:00
< / p >
2020-11-04 20:38:59 +01:00
< div id = "orgff06236" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/exp_setup_schematic.png" alt = "exp_setup_schematic.png" / >
< / p >
< p > < span class = "figure-number" > Figure 1: < / span > Schematic of the Experiment< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgc6b5ad5" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/IMG_20201023_153905.jpg" alt = "IMG_20201023_153905.jpg" / >
< / p >
< p > < span class = "figure-number" > Figure 2: < / span > Side View of the encoder< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgcf538be" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/IMG_20201023_153914.jpg" alt = "IMG_20201023_153914.jpg" / >
< / p >
< p > < span class = "figure-number" > Figure 3: < / span > Front View of the encoder< / p >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org9ae614e" class = "outline-2" >
< h2 id = "org9ae614e" > < span class = "section-number-2" > 2< / span > Huddle Test< / h2 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-2" id = "text-2" >
< p >
The goal in this section is the estimate the noise of both the encoder and the intereferometer.
< / p >
2020-10-25 09:06:14 +01:00
< p >
Nothing is then to the actuator such that the relative motion between the mass and the frame is as small as possible.
Ideally, a mechanical part would clamp the two together, we here suppose that the APA is still enough to clamp the two together.
< / p >
2020-10-23 23:05:34 +02:00
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orgc034802" class = "outline-3" >
< h3 id = "orgc034802" > < span class = "section-number-3" > 2.1< / span > Load Data< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-2-1" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > 'mat/int_enc_huddle_test.mat'< / span > , < span class = "org-string" > 'interferometer'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 't'< / span > );
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > interferometer = detrend(interferometer, 0);
encoder = detrend(encoder, 0);
< / pre >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orgd8ae4ae" class = "outline-3" >
< h3 id = "orgd8ae4ae" > < span class = "section-number-3" > 2.2< / span > Time Domain Results< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-2-2" >
2020-11-04 20:38:59 +01:00
< div id = "orgff47510" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/huddle_test_time_domain.png" alt = "huddle_test_time_domain.png" / >
< / p >
< p > < span class = "figure-number" > Figure 4: < / span > Huddle test - Time domain signals< / p >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > G_lpf = 1< span class = "org-type" > /< / span > (1 < span class = "org-type" > +< / span > s< span class = "org-type" > /< / span > 2< span class = "org-type" > /< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > /< / span > 10);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org21436f3" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/huddle_test_time_domain_filtered.png" alt = "huddle_test_time_domain_filtered.png" / >
< / p >
< p > < span class = "figure-number" > Figure 5: < / span > Huddle test - Time domain signals filtered with a LPF at 10Hz< / p >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org864c60c" class = "outline-3" >
< h3 id = "org864c60c" > < span class = "section-number-3" > 2.3< / span > Frequency Domain Noise< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-2-3" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Ts = 1e< span class = "org-type" > -< / span > 4;
win = hann(ceil(10< span class = "org-type" > /< / span > Ts));
[p_i, f] = pwelch(interferometer, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[p_e, < span class = "org-type" > ~< / span > ] = pwelch(encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org63bcf43" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/huddle_test_asd.png" alt = "huddle_test_asd.png" / >
< / p >
< p > < span class = "figure-number" > Figure 6: < / span > Amplitude Spectral Density of the signals during the Huddle test< / p >
< / div >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org96539c5" class = "outline-2" >
< h2 id = "org96539c5" > < span class = "section-number-2" > 3< / span > Comparison Interferometer / Encoder< / h2 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-2" id = "text-3" >
< p >
The goal here is to make sure that the interferometer and encoder measurements are coherent.
We may see non-linearity in the interferometric measurement.
< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orgc6453b2" class = "outline-3" >
< h3 id = "orgc6453b2" > < span class = "section-number-3" > 3.1< / span > Load Data< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-3-1" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > 'mat/int_enc_comp.mat'< / span > , < span class = "org-string" > 'interferometer'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > , < span class = "org-string" > 't'< / span > );
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > interferometer = detrend(interferometer, 0);
encoder = detrend(encoder, 0);
u = detrend(u, 0);
< / pre >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orgc362641" class = "outline-3" >
< h3 id = "orgc362641" > < span class = "section-number-3" > 3.2< / span > Time Domain Results< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-3-2" >
2020-11-04 20:38:59 +01:00
< div id = "orgfd33423" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/int_enc_one_cycle.png" alt = "int_enc_one_cycle.png" / >
< / p >
< p > < span class = "figure-number" > Figure 7: < / span > One cycle measurement< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgf82fd3e" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/int_enc_one_cycle_error.png" alt = "int_enc_one_cycle_error.png" / >
< / p >
< p > < span class = "figure-number" > Figure 8: < / span > Difference between the Encoder and the interferometer during one cycle< / p >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orgb50503c" class = "outline-3" >
< h3 id = "orgb50503c" > < span class = "section-number-3" > 3.3< / span > Difference between Encoder and Interferometer as a function of time< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-3-3" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Ts = 1e< span class = "org-type" > -< / span > 4;
d_i_mean = reshape(interferometer, [2< span class = "org-type" > /< / span > Ts floor(Ts< span class = "org-type" > /< / span > 2< span class = "org-type" > *< / span > length(interferometer))]);
d_e_mean = reshape(encoder, [2< span class = "org-type" > /< / span > Ts floor(Ts< span class = "org-type" > /< / span > 2< span class = "org-type" > *< / span > length(encoder))]);
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > w0 = 2< span class = "org-type" > *< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > *< / span > 5; < span class = "org-comment" > % [rad/s]< / span >
xi = 0.7;
G_lpf = 1< span class = "org-type" > /< / span > (1 < span class = "org-type" > +< / span > 2< span class = "org-type" > *< / span > xi< span class = "org-type" > /< / span > w0< span class = "org-type" > *< / span > s < span class = "org-type" > +< / span > s< span class = "org-type" > ^< / span > 2< span class = "org-type" > /< / span > w0< span class = "org-type" > ^< / span > 2);
d_err_mean = reshape(lsim(G_lpf, encoder < span class = "org-type" > -< / span > interferometer, t), [2< span class = "org-type" > /< / span > Ts floor(Ts< span class = "org-type" > /< / span > 2< span class = "org-type" > *< / span > length(encoder))]);
d_err_mean = d_err_mean < span class = "org-type" > -< / span > mean(d_err_mean);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org6eb78a0" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/int_enc_error_mean_time.png" alt = "int_enc_error_mean_time.png" / >
< / p >
< p > < span class = "figure-number" > Figure 9: < / span > Difference between the two measurement in the time domain, averaged for all the cycles< / p >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org5ec03aa" class = "outline-3" >
< h3 id = "org5ec03aa" > < span class = "section-number-3" > 3.4< / span > Difference between Encoder and Interferometer as a function of position< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-3-4" >
< p >
Compute the mean of the interferometer measurement corresponding to each of the encoder measurement.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > [e_sorted, < span class = "org-type" > ~< / span > , e_ind] = unique(encoder);
i_mean = zeros(length(e_sorted), 1);
< span class = "org-keyword" > for< / span > < span class = "org-variable-name" > < span class = "org-constant" > i< / span > < / span > = < span class = "org-constant" > 1:length(e_sorted)< / span >
i_mean(< span class = "org-constant" > i< / span > ) = mean(interferometer(e_ind < span class = "org-type" > ==< / span > < span class = "org-constant" > i< / span > ));
< span class = "org-keyword" > end< / span >
i_mean_error = (i_mean < span class = "org-type" > -< / span > e_sorted);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org2aecb58" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/int_enc_error_mean_position.png" alt = "int_enc_error_mean_position.png" / >
< / p >
< p > < span class = "figure-number" > Figure 10: < / span > Difference between the two measurement as a function of the measured position by the encoder, averaged for all the cycles< / p >
< / div >
< p >
The period of the non-linearity seems to be \(1.53 \mu m\) which corresponds to the wavelength of the Laser.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > win_length = 1530; < span class = "org-comment" > % length of the windows (corresponds to 1.53 um)< / span >
num_avg = floor(length(e_sorted)< span class = "org-type" > /< / span > win_length); < span class = "org-comment" > % number of averaging< / span >
i_init = ceil((length(e_sorted) < span class = "org-type" > -< / span > win_length< span class = "org-type" > *< / span > num_avg)< span class = "org-type" > /< / span > 2); < span class = "org-comment" > % does not start at the extremity< / span >
e_sorted_mean_over_period = mean(reshape(i_mean_error(i_init< span class = "org-type" > :< / span > i_init< span class = "org-type" > +< / span > win_length< span class = "org-type" > *< / span > num_avg< span class = "org-type" > -< / span > 1), [win_length num_avg]), 2);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgd0cea4e" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/int_non_linearity_period_wavelength.png" alt = "int_non_linearity_period_wavelength.png" / >
< / p >
< p > < span class = "figure-number" > Figure 11: < / span > Non-Linearity of the Interferometer over the period of the wavelength< / p >
< / div >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org6b73303" class = "outline-2" >
< h2 id = "org6b73303" > < span class = "section-number-2" > 4< / span > Identification< / h2 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-2" id = "text-4" >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-orga15e9e2" class = "outline-3" >
< h3 id = "orga15e9e2" > < span class = "section-number-3" > 4.1< / span > Load Data< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-4-1" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > 'mat/int_enc_id_noise_bis.mat'< / span > , < span class = "org-string" > 'interferometer'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > , < span class = "org-string" > 't'< / span > );
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > interferometer = detrend(interferometer, 0);
encoder = detrend(encoder, 0);
u = detrend(u, 0);
< / pre >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org6974653" class = "outline-3" >
< h3 id = "org6974653" > < span class = "section-number-3" > 4.2< / span > Identification< / h3 >
2020-10-23 23:05:34 +02:00
< div class = "outline-text-3" id = "text-4-2" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Ts = 1e< span class = "org-type" > -< / span > 4; < span class = "org-comment" > % Sampling Time [s]< / span >
win = hann(ceil(10< span class = "org-type" > /< / span > Ts));
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > [tf_i_est, f] = tfestimate(u, interferometer, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[co_i_est, < span class = "org-type" > ~< / span > ] = mscohere(u, interferometer, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[tf_e_est, < span class = "org-type" > ~< / span > ] = tfestimate(u, encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[co_e_est, < span class = "org-type" > ~< / span > ] = mscohere(u, encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org37fcd05" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/identification_dynamics_coherence.png" alt = "identification_dynamics_coherence.png" / >
< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orge65c21c" class = "figure" >
2020-10-23 23:05:34 +02:00
< p > < img src = "figs/identification_dynamics_bode.png" alt = "identification_dynamics_bode.png" / >
< / p >
< / div >
< / div >
< / div >
< / div >
2020-10-29 09:59:29 +01:00
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org5be1a0f" class = "outline-2" >
< h2 id = "org5be1a0f" > < span class = "section-number-2" > 5< / span > Change of Stiffness due to Sensors stack being open/closed circuit< / h2 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-2" id = "text-5" >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org00fc76c" class = "outline-3" >
< h3 id = "org00fc76c" > < span class = "section-number-3" > 5.1< / span > Load Data< / h3 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-3" id = "text-5-1" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > oc = load(< span class = "org-string" > './mat/identification_open_circuit.mat'< / span > , < span class = "org-string" > 't'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > );
sc = load(< span class = "org-string" > './mat/identification_short_circuit.mat'< / span > , < span class = "org-string" > 't'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > );
< / pre >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org757917f" class = "outline-3" >
< h3 id = "org757917f" > < span class = "section-number-3" > 5.2< / span > Transfer Functions< / h3 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-3" id = "text-5-2" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Ts = 1e< span class = "org-type" > -< / span > 4; < span class = "org-comment" > % Sampling Time [s]< / span >
win = hann(ceil(10< span class = "org-type" > /< / span > Ts));
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > [tf_oc_est, f] = tfestimate(oc.u, oc.encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[co_oc_est, < span class = "org-type" > ~< / span > ] = mscohere( oc.u, oc.encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[tf_sc_est, < span class = "org-type" > ~< / span > ] = tfestimate(sc.u, sc.encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
[co_sc_est, < span class = "org-type" > ~< / span > ] = mscohere( sc.u, sc.encoder, win, [], [], 1< span class = "org-type" > /< / span > Ts);
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgcba7c3a" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/stiffness_force_sensor_coherence.png" alt = "stiffness_force_sensor_coherence.png" / >
< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orgfdef3b4" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/stiffness_force_sensor_bode.png" alt = "stiffness_force_sensor_bode.png" / >
< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org655038d" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/stiffness_force_sensor_bode_zoom.png" alt = "stiffness_force_sensor_bode_zoom.png" / >
< / p >
< p > < span class = "figure-number" > Figure 16: < / span > Zoom on the change of resonance< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div class = "important" id = "orga5e301b" >
2020-10-29 09:59:29 +01:00
< p >
The change of resonance frequency / stiffness is very small and is not important here.
< / p >
< / div >
< / div >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org8dab16f" class = "outline-2" >
< h2 id = "org8dab16f" > < span class = "section-number-2" > 6< / span > Generated Number of Charge / Voltage< / h2 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-2" id = "text-6" >
< p >
Two stacks are used as actuator (in parallel) and one stack is used as sensor.
< / p >
< p >
The amplifier gain is 20V/V (Cedrat LA75B).
< / p >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org28149b5" class = "outline-3" >
< h3 id = "org28149b5" > < span class = "section-number-3" > 6.1< / span > Steps< / h3 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-3" id = "text-6-1" >
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > './mat/force_sensor_steps.mat'< / span > , < span class = "org-string" > 't'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > , < span class = "org-string" > 'v'< / span > );
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > < span class = "org-type" > figure< / span > ;
tiledlayout(2, 1, < span class = "org-string" > 'TileSpacing'< / span > , < span class = "org-string" > 'None'< / span > , < span class = "org-string" > 'Padding'< / span > , < span class = "org-string" > 'None'< / span > );
nexttile;
plot(t, v);
xlabel(< span class = "org-string" > 'Time [s]'< / span > ); ylabel(< span class = "org-string" > 'Measured voltage [V]'< / span > );
nexttile;
plot(t, u);
xlabel(< span class = "org-string" > 'Time [s]'< / span > ); ylabel(< span class = "org-string" > 'Actuator Voltage [V]'< / span > );
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "org0c7c950" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sen_steps_time_domain.png" alt = "force_sen_steps_time_domain.png" / >
< / p >
< p > < span class = "figure-number" > Figure 17: < / span > Time domain signal during the 3 actuator voltage steps< / p >
< / div >
< p >
Three steps are performed at the following time intervals:
< / p >
2020-11-04 20:38:59 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > t_s = [ 2.5, 23;
23.8, 35;
35.8, 50];
< / pre >
< / div >
2020-10-29 09:59:29 +01:00
< p >
Fit function:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > f = @(b,x) b(1)< span class = "org-type" > .*< / span > exp(b(2)< span class = "org-type" > .*< / span > x) < span class = "org-type" > +< / span > b(3);
< / pre >
< / div >
< p >
We are interested by the < code > b(2)< / code > term, which is the time constant of the exponential.
< / p >
< div class = "org-src-container" >
2020-11-04 20:38:59 +01:00
< pre class = "src src-matlab" > tau = zeros(size(t_s, 1),1);
V0 = zeros(size(t_s, 1),1);
2020-10-29 09:59:29 +01:00
< / pre >
< / div >
< div class = "org-src-container" >
2020-11-04 20:38:59 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > for< / span > < span class = "org-variable-name" > t_i< / span > = < span class = "org-constant" > 1:size(t_s, 1)< / span >
t_cur = t(t_s(t_i, 1) < span class = "org-type" > < < / span > t < span class = "org-type" > & < / span > t < span class = "org-type" > < < / span > t_s(t_i, 2));
t_cur = t_cur < span class = "org-type" > -< / span > t_cur(1);
y_cur = v(t_s(t_i, 1) < span class = "org-type" > < < / span > t < span class = "org-type" > & < / span > t < span class = "org-type" > < < / span > t_s(t_i, 2));
2020-10-29 09:59:29 +01:00
2020-11-04 20:38:59 +01:00
nrmrsd = @(b) norm(y_cur < span class = "org-type" > -< / span > f(b,t_cur)); < span class = "org-comment" > % Residual Norm Cost Function< / span >
B0 = [0.5, < span class = "org-type" > -< / span > 0.15, 2.2]; < span class = "org-comment" > % Choose Appropriate Initial Estimates< / span >
[B,rnrm] = fminsearch(nrmrsd, B0); < span class = "org-comment" > % Estimate Parameters ‘ B’ < / span >
2020-10-29 09:59:29 +01:00
2020-11-04 20:38:59 +01:00
tau(t_i) = 1< span class = "org-type" > /< / span > B(2);
V0(t_i) = B(3);
< span class = "org-keyword" > end< / span >
2020-10-29 09:59:29 +01:00
< / pre >
< / div >
< table border = "2" cellspacing = "0" cellpadding = "6" rules = "groups" frame = "hsides" >
< colgroup >
< col class = "org-right" / >
< col class = "org-right" / >
< / colgroup >
< thead >
< tr >
< th scope = "col" class = "org-right" > \(tau\) [s]< / th >
< th scope = "col" class = "org-right" > \(V_0\) [V]< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "org-right" > 6.47< / td >
< td class = "org-right" > 2.26< / td >
< / tr >
< tr >
< td class = "org-right" > 6.76< / td >
< td class = "org-right" > 2.26< / td >
< / tr >
< tr >
< td class = "org-right" > 6.49< / td >
< td class = "org-right" > 2.25< / td >
< / tr >
< / tbody >
< / table >
< p >
With the capacitance being \(C = 4.4 \mu F\), the internal impedance of the Speedgoat ADC can be computed as follows:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Cp = 4.4e< span class = "org-type" > -< / span > 6; < span class = "org-comment" > % [F]< / span >
Rin = abs(mean(tau))< span class = "org-type" > /< / span > Cp;
< / pre >
< / div >
< pre class = "example" >
1494100.0
< / pre >
< p >
The input impedance of the Speedgoat’ s ADC should then be close to \(1.5\,M\Omega\) (specified at \(1\,M\Omega\)).
< / p >
2020-11-04 20:38:59 +01:00
< div class = "important" id = "org60ccf75" >
2020-10-29 09:59:29 +01:00
< p >
How can we explain the voltage offset?
< / p >
< / div >
< p >
2020-11-04 20:38:59 +01:00
As shown in Figure < a href = "#org39e1694" > 18< / a > (taken from (< a href = "#citeproc_bib_item_1" > Reza and Andrew 2006< / a > )), an input voltage offset is due to the input bias current \(i_n\).
2020-10-29 09:59:29 +01:00
< / p >
2020-11-04 20:38:59 +01:00
< div id = "org39e1694" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/piezo_sensor_model_instrumentation.png" alt = "piezo_sensor_model_instrumentation.png" / >
< / p >
< p > < span class = "figure-number" > Figure 18: < / span > Model of a piezoelectric transducer (left) and instrumentation amplifier (right)< / p >
< / div >
< p >
The estimated input bias current is then:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > in = mean(V0)< span class = "org-type" > /< / span > Rin;
< / pre >
< / div >
< pre class = "example" >
1.5119e-06
< / pre >
< p >
An additional resistor in parallel with \(R_{in}\) would have two effects:
< / p >
< ul class = "org-ul" >
< li > reduce the input voltage offset
\[ V_{off} = \frac{R_a R_{in}}{R_a + R_{in}} i_n \]< / li >
< li > increase the high pass corner frequency \(f_c\)
\[ C_p \frac{R_{in}R_a}{R_{in} + R_a} = \tau_c = \frac{1}{f_c} \]
\[ R_a = \frac{R_i}{f_c C_p R_i - 1} \]< / li >
< / ul >
< p >
If we allow the high pass corner frequency to be equals to 3Hz:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > fc = 3;
2020-11-04 20:38:59 +01:00
Ra = Rin< span class = "org-type" > /< / span > (fc< span class = "org-type" > *< / span > Cp< span class = "org-type" > *< / span > Rin < span class = "org-type" > -< / span > 1);
2020-10-29 09:59:29 +01:00
< / pre >
< / div >
< pre class = "example" >
79804
< / pre >
< p >
With this parallel resistance value, the voltage offset would be:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > V_offset = Ra< span class = "org-type" > *< / span > Rin< span class = "org-type" > /< / span > (Ra < span class = "org-type" > +< / span > Rin) < span class = "org-type" > *< / span > in;
< / pre >
< / div >
< pre class = "example" >
0.11454
< / pre >
< p >
Which is much more acceptable.
< / p >
< / div >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "outline-container-org900387e" class = "outline-3" >
< h3 id = "org900387e" > < span class = "section-number-3" > 6.2< / span > Add Parallel Resistor< / h3 >
2020-10-29 09:59:29 +01:00
< div class = "outline-text-3" id = "text-6-2" >
2020-11-04 20:38:59 +01:00
< p >
A resistor of \(\approx 100\,k\Omega\) is added in parallel with the force sensor and the same kin.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > './mat/force_sensor_steps_R_82k7.mat'< / span > , < span class = "org-string" > 't'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > , < span class = "org-string" > 'v'< / span > );
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > < span class = "org-type" > figure< / span > ;
tiledlayout(2, 1, < span class = "org-string" > 'TileSpacing'< / span > , < span class = "org-string" > 'None'< / span > , < span class = "org-string" > 'Padding'< / span > , < span class = "org-string" > 'None'< / span > );
nexttile;
plot(t, v);
xlabel(< span class = "org-string" > 'Time [s]'< / span > ); ylabel(< span class = "org-string" > 'Measured voltage [V]'< / span > );
nexttile;
plot(t, u);
xlabel(< span class = "org-string" > 'Time [s]'< / span > ); ylabel(< span class = "org-string" > 'Actuator Voltage [V]'< / span > );
< / pre >
< / div >
< div id = "orgaee44e2" class = "figure" >
< p > < img src = "figs/force_sen_steps_time_domain_par_R.png" alt = "force_sen_steps_time_domain_par_R.png" / >
< / p >
< p > < span class = "figure-number" > Figure 19: < / span > Time domain signal during the actuator voltage steps< / p >
< / div >
< p >
Three steps are performed at the following time intervals:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > t_s = [1.9, 6;
8.5, 13;
15.5, 21;
22.6, 26;
30.0, 36;
37.5, 41;
46.2, 49.5]
< / pre >
< / div >
< p >
Fit function:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > f = @(b,x) b(1)< span class = "org-type" > .*< / span > exp(b(2)< span class = "org-type" > .*< / span > x) < span class = "org-type" > +< / span > b(3);
< / pre >
< / div >
< p >
We are interested by the < code > b(2)< / code > term, which is the time constant of the exponential.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > tau = zeros(size(t_s, 1),1);
V0 = zeros(size(t_s, 1),1);
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > < span class = "org-keyword" > for< / span > < span class = "org-variable-name" > t_i< / span > = < span class = "org-constant" > 1:size(t_s, 1)< / span >
t_cur = t(t_s(t_i, 1) < span class = "org-type" > < < / span > t < span class = "org-type" > & < / span > t < span class = "org-type" > < < / span > t_s(t_i, 2));
t_cur = t_cur < span class = "org-type" > -< / span > t_cur(1);
y_cur = v(t_s(t_i, 1) < span class = "org-type" > < < / span > t < span class = "org-type" > & < / span > t < span class = "org-type" > < < / span > t_s(t_i, 2));
nrmrsd = @(b) norm(y_cur < span class = "org-type" > -< / span > f(b,t_cur)); < span class = "org-comment" > % Residual Norm Cost Function< / span >
B0 = [0.5, < span class = "org-type" > -< / span > 0.2, 0.2]; < span class = "org-comment" > % Choose Appropriate Initial Estimates< / span >
[B,rnrm] = fminsearch(nrmrsd, B0); < span class = "org-comment" > % Estimate Parameters ‘ B’ < / span >
tau(t_i) = 1< span class = "org-type" > /< / span > B(2);
V0(t_i) = B(3);
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< p >
And indeed, we obtain a much smaller offset voltage and a much faster time constant.
< / p >
< table border = "2" cellspacing = "0" cellpadding = "6" rules = "groups" frame = "hsides" >
< colgroup >
< col class = "org-right" / >
< col class = "org-right" / >
< / colgroup >
< thead >
< tr >
< th scope = "col" class = "org-right" > \(tau\) [s]< / th >
< th scope = "col" class = "org-right" > \(V_0\) [V]< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "org-right" > 0.43< / td >
< td class = "org-right" > 0.15< / td >
< / tr >
< tr >
< td class = "org-right" > 0.45< / td >
< td class = "org-right" > 0.16< / td >
< / tr >
< tr >
< td class = "org-right" > 0.43< / td >
< td class = "org-right" > 0.15< / td >
< / tr >
< tr >
< td class = "org-right" > 0.43< / td >
< td class = "org-right" > 0.15< / td >
< / tr >
< tr >
< td class = "org-right" > 0.45< / td >
< td class = "org-right" > 0.15< / td >
< / tr >
< tr >
< td class = "org-right" > 0.46< / td >
< td class = "org-right" > 0.16< / td >
< / tr >
< tr >
< td class = "org-right" > 0.48< / td >
< td class = "org-right" > 0.16< / td >
< / tr >
< / tbody >
< / table >
< p >
Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of \(\approx 1\,M\Omega\)):
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Cp = 4.4e< span class = "org-type" > -< / span > 6; < span class = "org-comment" > % [F]< / span >
Rin = abs(mean(tau))< span class = "org-type" > /< / span > Cp;
< / pre >
< / div >
< pre class = "example" >
101200.0
< / pre >
< p >
And we can verify that the bias current estimation stays the same:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > in = mean(V0)< span class = "org-type" > /< / span > Rin;
< / pre >
< / div >
< pre class = "example" >
1.5305e-06
< / pre >
< p >
This validates the model of the ADC and the effectiveness of the added resistor.
< / p >
< / div >
< / div >
< div id = "outline-container-org7cfe5a8" class = "outline-3" >
< h3 id = "org7cfe5a8" > < span class = "section-number-3" > 6.3< / span > Sinus< / h3 >
< div class = "outline-text-3" id = "text-6-3" >
2020-10-29 09:59:29 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > load(< span class = "org-string" > './mat/force_sensor_sin.mat'< / span > , < span class = "org-string" > 't'< / span > , < span class = "org-string" > 'encoder'< / span > , < span class = "org-string" > 'u'< / span > , < span class = "org-string" > 'v'< / span > );
u = u(t< span class = "org-type" > > < / span > 25);
v = v(t< span class = "org-type" > > < / span > 25);
encoder = encoder(t< span class = "org-type" > > < / span > 25) < span class = "org-type" > -< / span > mean(encoder(t< span class = "org-type" > > < / span > 25));
t = t(t< span class = "org-type" > > < / span > 25);
< / pre >
< / div >
< p >
2020-11-04 20:38:59 +01:00
The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure < a href = "#orga42b4f8" > 20< / a > ).
2020-10-29 09:59:29 +01:00
< / p >
2020-11-04 20:38:59 +01:00
< div id = "orga42b4f8" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sensor_sin_u.png" alt = "force_sensor_sin_u.png" / >
< / p >
2020-11-04 20:38:59 +01:00
< p > < span class = "figure-number" > Figure 20: < / span > Driving Voltage< / p >
2020-10-29 09:59:29 +01:00
< / div >
< p >
The full stroke as measured by the encoder is:
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > max(encoder)< span class = "org-type" > -< / span > min(encoder)
< / pre >
< / div >
< pre class = "example" >
5.005e-05
< / pre >
< p >
2020-11-04 20:38:59 +01:00
Its signal is shown in Figure < a href = "#orgcda82ea" > 21< / a > .
2020-10-29 09:59:29 +01:00
< / p >
2020-11-04 20:38:59 +01:00
< div id = "orgcda82ea" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sensor_sin_encoder.png" alt = "force_sensor_sin_encoder.png" / >
< / p >
2020-11-04 20:38:59 +01:00
< p > < span class = "figure-number" > Figure 21: < / span > Encoder measurement< / p >
2020-10-29 09:59:29 +01:00
< / div >
< p >
The generated voltage by the stack is shown in Figure
< / p >
2020-11-04 20:38:59 +01:00
< div id = "orgdd5fd9b" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sensor_sin_stack.png" alt = "force_sensor_sin_stack.png" / >
< / p >
2020-11-04 20:38:59 +01:00
< p > < span class = "figure-number" > Figure 22: < / span > Voltage measured on the stack used as a sensor< / p >
2020-10-29 09:59:29 +01:00
< / div >
< p >
The capacitance of the stack is
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > Cp = 4.4e< span class = "org-type" > -< / span > 6; < span class = "org-comment" > % [F]< / span >
< / pre >
< / div >
< p >
2020-11-04 20:38:59 +01:00
The corresponding generated charge is then shown in Figure < a href = "#org15cf433" > 23< / a > .
2020-10-29 09:59:29 +01:00
< / p >
2020-11-04 20:38:59 +01:00
< div id = "org15cf433" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sensor_sin_charge.png" alt = "force_sensor_sin_charge.png" / >
< / p >
2020-11-04 20:38:59 +01:00
< p > < span class = "figure-number" > Figure 23: < / span > Generated Charge< / p >
2020-10-29 09:59:29 +01:00
< / div >
< p >
2020-11-04 20:38:59 +01:00
The relation between the generated voltage and the measured displacement is almost linear as shown in Figure < a href = "#orge276186" > 24< / a > .
2020-10-29 09:59:29 +01:00
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > b1 = encoder< span class = "org-type" > \< / span > (v< span class = "org-type" > -< / span > mean(v));
< / pre >
< / div >
2020-11-04 20:38:59 +01:00
< div id = "orge276186" class = "figure" >
2020-10-29 09:59:29 +01:00
< p > < img src = "figs/force_sensor_linear_relation.png" alt = "force_sensor_linear_relation.png" / >
< / p >
2020-11-04 20:38:59 +01:00
< p > < span class = "figure-number" > Figure 24: < / span > Almost linear relation between the relative displacement and the generated voltage< / p >
2020-10-29 09:59:29 +01:00
< / div >
< p >
With a 16bits ADC, the resolution will then be equals to (in [nm]):
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > abs((20< span class = "org-type" > /< / span > 2< span class = "org-type" > ^< / span > 16)< span class = "org-type" > /< / span > (b1< span class = "org-type" > /< / span > 1e9))
< / pre >
< / div >
< pre class = "example" >
3.9838
< / pre >
< style > . csl-entry { text-indent : -1.5 em ; margin-left : 1.5 em ; } < / style > < h2 class = 'citeproc-org-bib-h2' > Bibliography< / h2 >
< div class = "csl-bib-body" >
< div class = "csl-entry" > < a name = "citeproc_bib_item_1" > < / a > Reza, Moheimani, and Fleming Andrew. 2006. < i > Piezoelectric Transducers for Vibration Control and Damping< / i > . London: Springer.< / div >
< / div >
< / div >
< / div >
< / div >
2020-10-23 23:05:34 +02:00
< / div >
< div id = "postamble" class = "status" >
< p class = "author" > Author: Dehaeze Thomas< / p >
2020-11-04 20:38:59 +01:00
< p class = "date" > Created: 2020-11-04 mer. 20:38< / p >
2020-10-23 23:05:34 +02:00
< / div >
< / body >
< / html >