Add analysis of the effect of added resistor
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								figs/force_sen_steps_time_domain_par_R.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								figs/force_sen_steps_time_domain_par_R.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								figs/force_sen_steps_time_domain_par_R.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								figs/force_sen_steps_time_domain_par_R.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 37 KiB | 
							
								
								
									
										424
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										424
									
								
								index.html
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | ||||
| "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-10-29 jeu. 10:08 --> | ||||
| <!-- 2020-11-04 mer. 20:38 --> | ||||
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | ||||
| <title>Encoder - Test Bench</title> | ||||
| <meta name="generator" content="Org mode" /> | ||||
| @@ -35,49 +35,50 @@ | ||||
| <h2>Table of Contents</h2> | ||||
| <div id="text-table-of-contents"> | ||||
| <ul> | ||||
| <li><a href="#orgfe3d6c5">1. Experimental Setup</a></li> | ||||
| <li><a href="#org85c4a97">2. Huddle Test</a> | ||||
| <li><a href="#org2b2f049">1. Experimental Setup</a></li> | ||||
| <li><a href="#org9ae614e">2. Huddle Test</a> | ||||
| <ul> | ||||
| <li><a href="#org6f9e775">2.1. Load Data</a></li> | ||||
| <li><a href="#orgd27ba42">2.2. Time Domain Results</a></li> | ||||
| <li><a href="#org963a243">2.3. Frequency Domain Noise</a></li> | ||||
| <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> | ||||
| </ul> | ||||
| </li> | ||||
| <li><a href="#org0e0c48a">3. Comparison Interferometer / Encoder</a> | ||||
| <li><a href="#org96539c5">3. Comparison Interferometer / Encoder</a> | ||||
| <ul> | ||||
| <li><a href="#orgc15a506">3.1. Load Data</a></li> | ||||
| <li><a href="#orgc509698">3.2. Time Domain Results</a></li> | ||||
| <li><a href="#org1b5953a">3.3. Difference between Encoder and Interferometer as a function of time</a></li> | ||||
| <li><a href="#orgcb56769">3.4. Difference between Encoder and Interferometer as a function of position</a></li> | ||||
| <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> | ||||
| </ul> | ||||
| </li> | ||||
| <li><a href="#org8399536">4. Identification</a> | ||||
| <li><a href="#org6b73303">4. Identification</a> | ||||
| <ul> | ||||
| <li><a href="#org4b364a5">4.1. Load Data</a></li> | ||||
| <li><a href="#org0dd3820">4.2. Identification</a></li> | ||||
| <li><a href="#orga15e9e2">4.1. Load Data</a></li> | ||||
| <li><a href="#org6974653">4.2. Identification</a></li> | ||||
| </ul> | ||||
| </li> | ||||
| <li><a href="#org4a7e08f">5. Change of Stiffness due to Sensors stack being open/closed circuit</a> | ||||
| <li><a href="#org5be1a0f">5. Change of Stiffness due to Sensors stack being open/closed circuit</a> | ||||
| <ul> | ||||
| <li><a href="#orgba85fb9">5.1. Load Data</a></li> | ||||
| <li><a href="#org2876c52">5.2. Transfer Functions</a></li> | ||||
| <li><a href="#org00fc76c">5.1. Load Data</a></li> | ||||
| <li><a href="#org757917f">5.2. Transfer Functions</a></li> | ||||
| </ul> | ||||
| </li> | ||||
| <li><a href="#org1abff1f">6. Generated Number of Charge / Voltage</a> | ||||
| <li><a href="#org8dab16f">6. Generated Number of Charge / Voltage</a> | ||||
| <ul> | ||||
| <li><a href="#org65e8206">6.1. Steps</a></li> | ||||
| <li><a href="#org4df253f">6.2. Sinus</a></li> | ||||
| <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> | ||||
| </ul> | ||||
| </li> | ||||
| </ul> | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-orgfe3d6c5" class="outline-2"> | ||||
| <h2 id="orgfe3d6c5"><span class="section-number-2">1</span> Experimental Setup</h2> | ||||
| <div id="outline-container-org2b2f049" class="outline-2"> | ||||
| <h2 id="org2b2f049"><span class="section-number-2">1</span> Experimental Setup</h2> | ||||
| <div class="outline-text-2" id="text-1"> | ||||
| <p> | ||||
| The experimental Setup is schematically represented in Figure <a href="#orgb535f32">1</a>. | ||||
| The experimental Setup is schematically represented in Figure <a href="#orgff06236">1</a>. | ||||
| </p> | ||||
|  | ||||
| <p> | ||||
| @@ -86,21 +87,21 @@ The displacement of the mass (relative to the mechanical frame) is measured both | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <div id="orgb535f32" class="figure"> | ||||
| <div id="orgff06236" class="figure"> | ||||
| <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> | ||||
|  | ||||
|  | ||||
| <div id="org7c9d65a" class="figure"> | ||||
| <div id="orgc6b5ad5" class="figure"> | ||||
| <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> | ||||
|  | ||||
|  | ||||
| <div id="org6ecf3f2" class="figure"> | ||||
| <div id="orgcf538be" class="figure"> | ||||
| <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> | ||||
| @@ -108,8 +109,8 @@ The displacement of the mass (relative to the mechanical frame) is measured both | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org85c4a97" class="outline-2"> | ||||
| <h2 id="org85c4a97"><span class="section-number-2">2</span> Huddle Test</h2> | ||||
| <div id="outline-container-org9ae614e" class="outline-2"> | ||||
| <h2 id="org9ae614e"><span class="section-number-2">2</span> Huddle Test</h2> | ||||
| <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. | ||||
| @@ -121,8 +122,8 @@ Ideally, a mechanical part would clamp the two together, we here suppose that th | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org6f9e775" class="outline-3"> | ||||
| <h3 id="org6f9e775"><span class="section-number-3">2.1</span> Load Data</h3> | ||||
| <div id="outline-container-orgc034802" class="outline-3"> | ||||
| <h3 id="orgc034802"><span class="section-number-3">2.1</span> Load Data</h3> | ||||
| <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>); | ||||
| @@ -137,11 +138,11 @@ encoder = detrend(encoder, 0); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-orgd27ba42" class="outline-3"> | ||||
| <h3 id="orgd27ba42"><span class="section-number-3">2.2</span> Time Domain Results</h3> | ||||
| <div id="outline-container-orgd8ae4ae" class="outline-3"> | ||||
| <h3 id="orgd8ae4ae"><span class="section-number-3">2.2</span> Time Domain Results</h3> | ||||
| <div class="outline-text-3" id="text-2-2"> | ||||
|  | ||||
| <div id="orgbec33e3" class="figure"> | ||||
| <div id="orgff47510" class="figure"> | ||||
| <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> | ||||
| @@ -153,7 +154,7 @@ encoder = detrend(encoder, 0); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org19de732" class="figure"> | ||||
| <div id="org21436f3" class="figure"> | ||||
| <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> | ||||
| @@ -161,8 +162,8 @@ encoder = detrend(encoder, 0); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org963a243" class="outline-3"> | ||||
| <h3 id="org963a243"><span class="section-number-3">2.3</span> Frequency Domain Noise</h3> | ||||
| <div id="outline-container-org864c60c" class="outline-3"> | ||||
| <h3 id="org864c60c"><span class="section-number-3">2.3</span> Frequency Domain Noise</h3> | ||||
| <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; | ||||
| @@ -174,7 +175,7 @@ win = hann(ceil(10<span class="org-type">/</span>Ts)); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="orgb6a29d5" class="figure"> | ||||
| <div id="org63bcf43" class="figure"> | ||||
| <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> | ||||
| @@ -183,8 +184,8 @@ win = hann(ceil(10<span class="org-type">/</span>Ts)); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org0e0c48a" class="outline-2"> | ||||
| <h2 id="org0e0c48a"><span class="section-number-2">3</span> Comparison Interferometer / Encoder</h2> | ||||
| <div id="outline-container-org96539c5" class="outline-2"> | ||||
| <h2 id="org96539c5"><span class="section-number-2">3</span> Comparison Interferometer / Encoder</h2> | ||||
| <div class="outline-text-2" id="text-3"> | ||||
| <p> | ||||
| The goal here is to make sure that the interferometer and encoder measurements are coherent. | ||||
| @@ -192,8 +193,8 @@ We may see non-linearity in the interferometric measurement. | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-orgc15a506" class="outline-3"> | ||||
| <h3 id="orgc15a506"><span class="section-number-3">3.1</span> Load Data</h3> | ||||
| <div id="outline-container-orgc6453b2" class="outline-3"> | ||||
| <h3 id="orgc6453b2"><span class="section-number-3">3.1</span> Load Data</h3> | ||||
| <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>); | ||||
| @@ -209,18 +210,18 @@ u = detrend(u, 0); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-orgc509698" class="outline-3"> | ||||
| <h3 id="orgc509698"><span class="section-number-3">3.2</span> Time Domain Results</h3> | ||||
| <div id="outline-container-orgc362641" class="outline-3"> | ||||
| <h3 id="orgc362641"><span class="section-number-3">3.2</span> Time Domain Results</h3> | ||||
| <div class="outline-text-3" id="text-3-2"> | ||||
|  | ||||
| <div id="orgdf791be" class="figure"> | ||||
| <div id="orgfd33423" class="figure"> | ||||
| <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> | ||||
|  | ||||
|  | ||||
| <div id="org7e30f32" class="figure"> | ||||
| <div id="orgf82fd3e" class="figure"> | ||||
| <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> | ||||
| @@ -228,8 +229,8 @@ u = detrend(u, 0); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org1b5953a" class="outline-3"> | ||||
| <h3 id="org1b5953a"><span class="section-number-3">3.3</span> Difference between Encoder and Interferometer as a function of time</h3> | ||||
| <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> | ||||
| <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; | ||||
| @@ -250,7 +251,7 @@ d_err_mean = d_err_mean <span class="org-type">-</span> mean(d_err_mean); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org95838e4" class="figure"> | ||||
| <div id="org6eb78a0" class="figure"> | ||||
| <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> | ||||
| @@ -258,8 +259,8 @@ d_err_mean = d_err_mean <span class="org-type">-</span> mean(d_err_mean); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-orgcb56769" class="outline-3"> | ||||
| <h3 id="orgcb56769"><span class="section-number-3">3.4</span> Difference between Encoder and Interferometer as a function of position</h3> | ||||
| <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> | ||||
| <div class="outline-text-3" id="text-3-4"> | ||||
| <p> | ||||
| Compute the mean of the interferometer measurement corresponding to each of the encoder measurement. | ||||
| @@ -278,7 +279,7 @@ i_mean_error = (i_mean <span class="org-type">-</span> e_sorted); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="orga34e36f" class="figure"> | ||||
| <div id="org2aecb58" class="figure"> | ||||
| <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> | ||||
| @@ -299,7 +300,7 @@ e_sorted_mean_over_period = mean(reshape(i_mean_error(i_init<span class="org-typ | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org064a7da" class="figure"> | ||||
| <div id="orgd0cea4e" class="figure"> | ||||
| <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> | ||||
| @@ -308,12 +309,12 @@ e_sorted_mean_over_period = mean(reshape(i_mean_error(i_init<span class="org-typ | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org8399536" class="outline-2"> | ||||
| <h2 id="org8399536"><span class="section-number-2">4</span> Identification</h2> | ||||
| <div id="outline-container-org6b73303" class="outline-2"> | ||||
| <h2 id="org6b73303"><span class="section-number-2">4</span> Identification</h2> | ||||
| <div class="outline-text-2" id="text-4"> | ||||
| </div> | ||||
| <div id="outline-container-org4b364a5" class="outline-3"> | ||||
| <h3 id="org4b364a5"><span class="section-number-3">4.1</span> Load Data</h3> | ||||
| <div id="outline-container-orga15e9e2" class="outline-3"> | ||||
| <h3 id="orga15e9e2"><span class="section-number-3">4.1</span> Load Data</h3> | ||||
| <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>); | ||||
| @@ -329,8 +330,8 @@ u = detrend(u, 0); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org0dd3820" class="outline-3"> | ||||
| <h3 id="org0dd3820"><span class="section-number-3">4.2</span> Identification</h3> | ||||
| <div id="outline-container-org6974653" class="outline-3"> | ||||
| <h3 id="org6974653"><span class="section-number-3">4.2</span> Identification</h3> | ||||
| <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> | ||||
| @@ -348,14 +349,14 @@ win = hann(ceil(10<span class="org-type">/</span>Ts)); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org4e10071" class="figure"> | ||||
| <div id="org37fcd05" class="figure"> | ||||
| <p><img src="figs/identification_dynamics_coherence.png" alt="identification_dynamics_coherence.png" /> | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
|  | ||||
|  | ||||
| <div id="orgfa48d56" class="figure"> | ||||
| <div id="orge65c21c" class="figure"> | ||||
| <p><img src="figs/identification_dynamics_bode.png" alt="identification_dynamics_bode.png" /> | ||||
| </p> | ||||
| </div> | ||||
| @@ -363,12 +364,12 @@ win = hann(ceil(10<span class="org-type">/</span>Ts)); | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org4a7e08f" class="outline-2"> | ||||
| <h2 id="org4a7e08f"><span class="section-number-2">5</span> Change of Stiffness due to Sensors stack being open/closed circuit</h2> | ||||
| <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> | ||||
| <div class="outline-text-2" id="text-5"> | ||||
| </div> | ||||
| <div id="outline-container-orgba85fb9" class="outline-3"> | ||||
| <h3 id="orgba85fb9"><span class="section-number-3">5.1</span> Load Data</h3> | ||||
| <div id="outline-container-org00fc76c" class="outline-3"> | ||||
| <h3 id="org00fc76c"><span class="section-number-3">5.1</span> Load Data</h3> | ||||
| <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>); | ||||
| @@ -378,8 +379,8 @@ sc = load(<span class="org-string">'./mat/identification_short_circuit.mat'</spa | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org2876c52" class="outline-3"> | ||||
| <h3 id="org2876c52"><span class="section-number-3">5.2</span> Transfer Functions</h3> | ||||
| <div id="outline-container-org757917f" class="outline-3"> | ||||
| <h3 id="org757917f"><span class="section-number-3">5.2</span> Transfer Functions</h3> | ||||
| <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> | ||||
| @@ -397,26 +398,26 @@ win = hann(ceil(10<span class="org-type">/</span>Ts)); | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org525ff65" class="figure"> | ||||
| <div id="orgcba7c3a" class="figure"> | ||||
| <p><img src="figs/stiffness_force_sensor_coherence.png" alt="stiffness_force_sensor_coherence.png" /> | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
|  | ||||
|  | ||||
| <div id="orge72a5de" class="figure"> | ||||
| <div id="orgfdef3b4" class="figure"> | ||||
| <p><img src="figs/stiffness_force_sensor_bode.png" alt="stiffness_force_sensor_bode.png" /> | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="orgd8a00e8" class="figure"> | ||||
| <div id="org655038d" class="figure"> | ||||
| <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> | ||||
|  | ||||
| <div class="important" id="org5981596"> | ||||
| <div class="important" id="orga5e301b"> | ||||
| <p> | ||||
| The change of resonance frequency / stiffness is very small and is not important here. | ||||
| </p> | ||||
| @@ -426,8 +427,8 @@ The change of resonance frequency / stiffness is very small and is not important | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org1abff1f" class="outline-2"> | ||||
| <h2 id="org1abff1f"><span class="section-number-2">6</span> Generated Number of Charge / Voltage</h2> | ||||
| <div id="outline-container-org8dab16f" class="outline-2"> | ||||
| <h2 id="org8dab16f"><span class="section-number-2">6</span> Generated Number of Charge / Voltage</h2> | ||||
| <div class="outline-text-2" id="text-6"> | ||||
| <p> | ||||
| Two stacks are used as actuator (in parallel) and one stack is used as sensor. | ||||
| @@ -438,8 +439,8 @@ The amplifier gain is 20V/V (Cedrat LA75B). | ||||
| </p> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org65e8206" class="outline-3"> | ||||
| <h3 id="org65e8206"><span class="section-number-3">6.1</span> Steps</h3> | ||||
| <div id="outline-container-org28149b5" class="outline-3"> | ||||
| <h3 id="org28149b5"><span class="section-number-3">6.1</span> Steps</h3> | ||||
| <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>); | ||||
| @@ -459,7 +460,7 @@ xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-stri | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="org0233cf4" class="figure"> | ||||
| <div id="org0c7c950" class="figure"> | ||||
| <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> | ||||
| @@ -468,11 +469,12 @@ xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-stri | ||||
| <p> | ||||
| Three steps are performed at the following time intervals: | ||||
| </p> | ||||
| <ul class="org-ul"> | ||||
| <li>2.5, 23</li> | ||||
| <li>23.8, 35</li> | ||||
| <li>35.8, 50</li> | ||||
| </ul> | ||||
| <div class="org-src-container"> | ||||
| <pre class="src src-matlab">t_s = [ 2.5, 23; | ||||
|        23.8, 35; | ||||
|        35.8, 50]; | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| Fit function: | ||||
| @@ -485,52 +487,25 @@ Fit function: | ||||
| <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(3,1); | ||||
| V0  = zeros(3,1); | ||||
| <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">t_cur = t(2.5 <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> 23); | ||||
| t_cur = t_cur <span class="org-type">-</span> t_cur(1); | ||||
| y_cur = v(2.5 <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> 23); | ||||
| <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.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> | ||||
|     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> | ||||
|  | ||||
| tau<span class="org-type">(1) </span>= 1<span class="org-type">/</span>B(2); | ||||
| V0<span class="org-type">(1)  </span>= B(3); | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| <div class="org-src-container"> | ||||
| <pre class="src src-matlab">t_cur = t(23.8 <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> 35); | ||||
| t_cur = t_cur <span class="org-type">-</span> t_cur(1); | ||||
| y_cur = v(23.8 <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> 35); | ||||
|  | ||||
| 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> | ||||
|  | ||||
| tau<span class="org-type">(2) </span>= 1<span class="org-type">/</span>B(2); | ||||
| V0<span class="org-type">(2)  </span>= B(3); | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| <div class="org-src-container"> | ||||
| <pre class="src src-matlab">t_cur = t(35.8 <span class="org-type"><</span> t); | ||||
| t_cur = t_cur <span class="org-type">-</span> t_cur(1); | ||||
| y_cur = v(35.8 <span class="org-type"><</span> t); | ||||
|  | ||||
| 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> | ||||
|  | ||||
| tau<span class="org-type">(3) </span>= 1<span class="org-type">/</span>B(2); | ||||
| V0<span class="org-type">(3)  </span>= B(3); | ||||
|     tau(t_i) = 1<span class="org-type">/</span>B(2); | ||||
|     V0(t_i)  = B(3); | ||||
| <span class="org-keyword">end</span> | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| @@ -584,7 +559,7 @@ Rin = abs(mean(tau))<span class="org-type">/</span>Cp; | ||||
| The input impedance of the Speedgoat’s ADC should then be close to \(1.5\,M\Omega\) (specified at \(1\,M\Omega\)). | ||||
| </p> | ||||
|  | ||||
| <div class="important" id="org8ca234e"> | ||||
| <div class="important" id="org60ccf75"> | ||||
| <p> | ||||
| How can we explain the voltage offset? | ||||
| </p> | ||||
| @@ -592,11 +567,11 @@ How can we explain the voltage offset? | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| As shown in Figure <a href="#org6a0d23a">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\). | ||||
| 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\). | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <div id="org6a0d23a" class="figure"> | ||||
| <div id="org39e1694" class="figure"> | ||||
| <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> | ||||
| @@ -632,7 +607,7 @@ 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; | ||||
| Ra = Rin<span class="org-type">/</span>(fc<span class="org-type">*</span>C<span class="org-type">*</span>Rin <span class="org-type">-</span> 1); | ||||
| 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); | ||||
| </pre> | ||||
| </div> | ||||
|  | ||||
| @@ -660,9 +635,178 @@ Which is much more acceptable. | ||||
| </div> | ||||
| </div> | ||||
|  | ||||
| <div id="outline-container-org4df253f" class="outline-3"> | ||||
| <h3 id="org4df253f"><span class="section-number-3">6.2</span> Sinus</h3> | ||||
| <div id="outline-container-org900387e" class="outline-3"> | ||||
| <h3 id="org900387e"><span class="section-number-3">6.2</span> Add Parallel Resistor</h3> | ||||
| <div class="outline-text-3" id="text-6-2"> | ||||
| <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"> | ||||
| <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>); | ||||
|  | ||||
| @@ -674,14 +818,14 @@ t       = t(t<span class="org-type">></span>25); | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure <a href="#orga819354">19</a>). | ||||
| The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure <a href="#orga42b4f8">20</a>). | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <div id="orga819354" class="figure"> | ||||
| <div id="orga42b4f8" class="figure"> | ||||
| <p><img src="figs/force_sensor_sin_u.png" alt="force_sensor_sin_u.png" /> | ||||
| </p> | ||||
| <p><span class="figure-number">Figure 19: </span>Driving Voltage</p> | ||||
| <p><span class="figure-number">Figure 20: </span>Driving Voltage</p> | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| @@ -698,14 +842,14 @@ The full stroke as measured by the encoder is: | ||||
|  | ||||
|  | ||||
| <p> | ||||
| Its signal is shown in Figure <a href="#orgde5c100">20</a>. | ||||
| Its signal is shown in Figure <a href="#orgcda82ea">21</a>. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <div id="orgde5c100" class="figure"> | ||||
| <div id="orgcda82ea" class="figure"> | ||||
| <p><img src="figs/force_sensor_sin_encoder.png" alt="force_sensor_sin_encoder.png" /> | ||||
| </p> | ||||
| <p><span class="figure-number">Figure 20: </span>Encoder measurement</p> | ||||
| <p><span class="figure-number">Figure 21: </span>Encoder measurement</p> | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| @@ -713,10 +857,10 @@ The generated voltage by the stack is shown in Figure | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <div id="org1f6aabd" class="figure"> | ||||
| <div id="orgdd5fd9b" class="figure"> | ||||
| <p><img src="figs/force_sensor_sin_stack.png" alt="force_sensor_sin_stack.png" /> | ||||
| </p> | ||||
| <p><span class="figure-number">Figure 21: </span>Voltage measured on the stack used as a sensor</p> | ||||
| <p><span class="figure-number">Figure 22: </span>Voltage measured on the stack used as a sensor</p> | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| @@ -728,18 +872,18 @@ The capacitance of the stack is | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| The corresponding generated charge is then shown in Figure <a href="#orgcfb4c95">22</a>. | ||||
| The corresponding generated charge is then shown in Figure <a href="#org15cf433">23</a>. | ||||
| </p> | ||||
|  | ||||
| <div id="orgcfb4c95" class="figure"> | ||||
| <div id="org15cf433" class="figure"> | ||||
| <p><img src="figs/force_sensor_sin_charge.png" alt="force_sensor_sin_charge.png" /> | ||||
| </p> | ||||
| <p><span class="figure-number">Figure 22: </span>Generated Charge</p> | ||||
| <p><span class="figure-number">Figure 23: </span>Generated Charge</p> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <p> | ||||
| The relation between the generated voltage and the measured displacement is almost linear as shown in Figure <a href="#orgd584dd5">23</a>. | ||||
| The relation between the generated voltage and the measured displacement is almost linear as shown in Figure <a href="#orge276186">24</a>. | ||||
| </p> | ||||
|  | ||||
| <div class="org-src-container"> | ||||
| @@ -748,10 +892,10 @@ The relation between the generated voltage and the measured displacement is almo | ||||
| </div> | ||||
|  | ||||
|  | ||||
| <div id="orgd584dd5" class="figure"> | ||||
| <div id="orge276186" class="figure"> | ||||
| <p><img src="figs/force_sensor_linear_relation.png" alt="force_sensor_linear_relation.png" /> | ||||
| </p> | ||||
| <p><span class="figure-number">Figure 23: </span>Almost linear relation between the relative displacement and the generated voltage</p> | ||||
| <p><span class="figure-number">Figure 24: </span>Almost linear relation between the relative displacement and the generated voltage</p> | ||||
| </div> | ||||
|  | ||||
| <p> | ||||
| @@ -777,7 +921,7 @@ With a 16bits ADC, the resolution will then be equals to (in [nm]): | ||||
| </div> | ||||
| <div id="postamble" class="status"> | ||||
| <p class="author">Author: Dehaeze Thomas</p> | ||||
| <p class="date">Created: 2020-10-29 jeu. 10:08</p> | ||||
| <p class="date">Created: 2020-11-04 mer. 20:38</p> | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
|   | ||||
							
								
								
									
										161
									
								
								index.org
									
									
									
									
									
								
							
							
						
						
									
										161
									
								
								index.org
									
									
									
									
									
								
							| @@ -551,9 +551,11 @@ The amplifier gain is 20V/V (Cedrat LA75B). | ||||
| [[file:figs/force_sen_steps_time_domain.png]] | ||||
|  | ||||
| Three steps are performed at the following time intervals: | ||||
| - 2.5, 23 | ||||
| - 23.8, 35 | ||||
| - 35.8, 50 | ||||
| #+begin_src matlab | ||||
|   t_s = [ 2.5, 23; | ||||
|          23.8, 35; | ||||
|          35.8, 50]; | ||||
| #+end_src | ||||
|  | ||||
| Fit function: | ||||
| #+begin_src matlab | ||||
| @@ -561,49 +563,24 @@ Fit function: | ||||
| #+end_src | ||||
|  | ||||
| We are interested by the =b(2)= term, which is the time constant of the exponential. | ||||
|  | ||||
| #+begin_src matlab | ||||
|   tau = zeros(3,1); | ||||
|   V0  = zeros(3,1); | ||||
|   tau = zeros(size(t_s, 1),1); | ||||
|   V0  = zeros(size(t_s, 1),1); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab | ||||
|   t_cur = t(2.5 < t & t < 23); | ||||
|   for t_i = 1:size(t_s, 1) | ||||
|       t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); | ||||
|       t_cur = t_cur - t_cur(1); | ||||
|   y_cur = v(2.5 < t & t < 23); | ||||
|       y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); | ||||
|  | ||||
|       nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function | ||||
|       B0 = [0.5, -0.15, 2.2];                        % Choose Appropriate Initial Estimates | ||||
|       [B,rnrm] = fminsearch(nrmrsd, B0);     % Estimate Parameters ‘B’ | ||||
|  | ||||
|   tau(1) = 1/B(2); | ||||
|   V0(1)  = B(3); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab | ||||
|   t_cur = t(23.8 < t & t < 35); | ||||
|   t_cur = t_cur - t_cur(1); | ||||
|   y_cur = v(23.8 < t & t < 35); | ||||
|  | ||||
|   nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function | ||||
|   B0 = [0.5, -0.15, 2.2];                 % Choose Appropriate Initial Estimates | ||||
|   [B,rnrm] = fminsearch(nrmrsd, B0);      % Estimate Parameters ‘B’ | ||||
|  | ||||
|   tau(2) = 1/B(2); | ||||
|   V0(2)  = B(3); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab | ||||
|   t_cur = t(35.8 < t); | ||||
|   t_cur = t_cur - t_cur(1); | ||||
|   y_cur = v(35.8 < t); | ||||
|  | ||||
|   nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function | ||||
|   B0 = [0.5, -0.15, 2.2];                 % Choose Appropriate Initial Estimates | ||||
|   [B,rnrm] = fminsearch(nrmrsd, B0);     % Estimate Parameters ‘B’ | ||||
|  | ||||
|   tau(3) = 1/B(2); | ||||
|   V0(3)  = B(3); | ||||
|       tau(t_i) = 1/B(2); | ||||
|       V0(t_i)  = B(3); | ||||
|   end | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) | ||||
| @@ -665,7 +642,7 @@ An additional resistor in parallel with $R_{in}$ would have two effects: | ||||
| If we allow the high pass corner frequency to be equals to 3Hz: | ||||
| #+begin_src matlab | ||||
|   fc = 3; | ||||
|   Ra = Rin/(fc*C*Rin - 1); | ||||
|   Ra = Rin/(fc*Cp*Rin - 1); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab :results value replace :exports results | ||||
| @@ -689,6 +666,116 @@ With this parallel resistance value, the voltage offset would be: | ||||
|  | ||||
| Which is much more acceptable. | ||||
|  | ||||
| ** Add Parallel Resistor | ||||
| A resistor of $\approx 100\,k\Omega$ is added in parallel with the force sensor and the same kin. | ||||
|  | ||||
| #+begin_src matlab | ||||
|   load('./mat/force_sensor_steps_R_82k7.mat', 't', 'encoder', 'u', 'v'); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab | ||||
|   figure; | ||||
|   tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None'); | ||||
|   nexttile; | ||||
|   plot(t, v); | ||||
|   xlabel('Time [s]'); ylabel('Measured voltage [V]'); | ||||
|   nexttile; | ||||
|   plot(t, u); | ||||
|   xlabel('Time [s]'); ylabel('Actuator Voltage [V]'); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab :tangle no :exports results :results file replace | ||||
|   exportFig('figs/force_sen_steps_time_domain_par_R.pdf', 'width', 'wide', 'height', 'tall'); | ||||
| #+end_src | ||||
|  | ||||
| #+name: fig:force_sen_steps_time_domain_par_R | ||||
| #+caption: Time domain signal during the actuator voltage steps | ||||
| #+RESULTS: | ||||
| [[file:figs/force_sen_steps_time_domain_par_R.png]] | ||||
|  | ||||
| Three steps are performed at the following time intervals: | ||||
| #+begin_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] | ||||
| #+end_src | ||||
|  | ||||
| Fit function: | ||||
| #+begin_src matlab | ||||
|   f = @(b,x) b(1).*exp(b(2).*x) + b(3); | ||||
| #+end_src | ||||
|  | ||||
| We are interested by the =b(2)= term, which is the time constant of the exponential. | ||||
|  | ||||
| #+begin_src matlab | ||||
|   tau = zeros(size(t_s, 1),1); | ||||
|   V0  = zeros(size(t_s, 1),1); | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab | ||||
|   for t_i = 1:size(t_s, 1) | ||||
|       t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2)); | ||||
|       t_cur = t_cur - t_cur(1); | ||||
|       y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2)); | ||||
|  | ||||
|       nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function | ||||
|       B0 = [0.5, -0.2, 0.2];                        % Choose Appropriate Initial Estimates | ||||
|       [B,rnrm] = fminsearch(nrmrsd, B0);     % Estimate Parameters ‘B’ | ||||
|  | ||||
|       tau(t_i) = 1/B(2); | ||||
|       V0(t_i)  = B(3); | ||||
|   end | ||||
| #+end_src | ||||
|  | ||||
| And indeed, we obtain a much smaller offset voltage and a much faster time constant. | ||||
|  | ||||
| #+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) | ||||
|   data2orgtable([abs(tau), V0], {}, {'$tau$ [s]', '$V_0$ [V]'}, ' %.2f '); | ||||
| #+end_src | ||||
|  | ||||
| #+RESULTS: | ||||
| | $tau$ [s] | $V_0$ [V] | | ||||
| |-----------+-----------| | ||||
| |      0.43 |      0.15 | | ||||
| |      0.45 |      0.16 | | ||||
| |      0.43 |      0.15 | | ||||
| |      0.43 |      0.15 | | ||||
| |      0.45 |      0.15 | | ||||
| |      0.46 |      0.16 | | ||||
| |      0.48 |      0.16 | | ||||
|  | ||||
| Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of $\approx 1\,M\Omega$): | ||||
|  | ||||
| #+begin_src matlab | ||||
|   Cp = 4.4e-6; % [F] | ||||
|   Rin = abs(mean(tau))/Cp; | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab :results value replace :exports results | ||||
|   ans = Rin | ||||
| #+end_src | ||||
|  | ||||
| #+RESULTS: | ||||
| : 101200.0 | ||||
|  | ||||
| And we can verify that the bias current estimation stays the same: | ||||
| #+begin_src matlab | ||||
|   in = mean(V0)/Rin; | ||||
| #+end_src | ||||
|  | ||||
| #+begin_src matlab :results value replace :exports results | ||||
|    ans = in | ||||
| #+end_src | ||||
|  | ||||
| #+RESULTS: | ||||
| : 1.5305e-06 | ||||
|  | ||||
| This validates the model of the ADC and the effectiveness of the added resistor. | ||||
|  | ||||
| ** Sinus | ||||
| #+begin_src matlab | ||||
|   load('./mat/force_sensor_sin.mat', 't', 'encoder', 'u', 'v'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user