Update simulink file. Redifined parameters

This commit is contained in:
Thomas Dehaeze 2019-01-23 15:21:17 +01:00
parent 909b4de60a
commit 575cb20d7f
6 changed files with 83 additions and 11 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

View File

@ -454,7 +454,34 @@ The loop gain is $L = G K$.
open rotating_frame.slx open rotating_frame.slx
#+end_src #+end_src
** Parameter for the Simscape simulations
#+begin_src matlab :exports code :results silent
w = 2*pi; % Rotation speed [rad/s]
theta_e = 0; % Static measurement error on the angle theta [rad]
m = 5; % mass of the sample [kg]
mTuv = 30;% Mass of the moving part of the Tuv stage [kg]
kTuv = 1e8; % Stiffness of the Tuv stage [N/m]
cTuv = 0; % Damping of the Tuv stage [N/(m/s)]
#+end_src
#+begin_src matlab :exports code :results silent
mlight = 5; % Mass for light sample [kg]
mheavy = 55; % Mass for heavy sample [kg]
wlight = 2*pi; % Max rot. speed for light sample [rad/s]
wheavy = 2*pi/60; % Max rot. speed for heavy sample [rad/s]
kvc = 1e3; % Voice Coil Stiffness [N/m]
kpz = 1e8; % Piezo Stiffness [N/m]
d = 0.01; % Maximum excentricity from rotational axis [m]
#+end_src
** Identification in the rotating referenced frame ** Identification in the rotating referenced frame
We initialize the inputs and outputs of the system to identify. We initialize the inputs and outputs of the system to identify.
#+begin_src matlab :exports code :results silent #+begin_src matlab :exports code :results silent
%% Options for Linearized %% Options for Linearized
@ -472,27 +499,72 @@ We initialize the inputs and outputs of the system to identify.
io(4) = linio([mdl, '/dv'], 1, 'output'); io(4) = linio([mdl, '/dv'], 1, 'output');
#+end_src #+end_src
*** Piezo and Voice coil
We start we identify the transfer functions at high speed with the light sample. We start we identify the transfer functions at high speed with the light sample.
#+begin_src matlab :exports code :results silent #+begin_src matlab :exports code :results silent
rot_speed = wlight; w = wlight; % Rotation speed [rad/s]
angle_e = 0; m = mlight; % mass of the sample [kg]
m = mlight;
k = kpz; kTuv = kpz;
c = 1e3;
Gpz_light = linearize(mdl, io, 0.1); Gpz_light = linearize(mdl, io, 0.1);
k = kvc;
c = 1e3;
Gvc_light = linearize(mdl, io, 0.1);
Gpz_light.InputName = {'Fu', 'Fv'}; Gpz_light.InputName = {'Fu', 'Fv'};
Gpz_light.OutputName = {'Du', 'Dv'}; Gpz_light.OutputName = {'Du', 'Dv'};
kTuv = kvc;
Gvc_light = linearize(mdl, io, 0.1);
Gvc_light.InputName = {'Fu', 'Fv'}; Gvc_light.InputName = {'Fu', 'Fv'};
Gvc_light.OutputName = {'Du', 'Dv'}; Gvc_light.OutputName = {'Du', 'Dv'};
#+end_src #+end_src
Then we identify the system with an heavy mass and low speed.
#+begin_src matlab :exports code :results silent
w = wheavy; % Rotation speed [rad/s]
m = mheavy; % mass of the sample [kg]
kTuv = kpz;
Gpz_heavy = linearize(mdl, io, 0.1);
Gpz_heavy.InputName = {'Fu', 'Fv'};
Gpz_heavy.OutputName = {'Du', 'Dv'};
kTuv = kvc;
Gvc_heavy = linearize(mdl, io, 0.1);
Gvc_heavy.InputName = {'Fu', 'Fv'};
Gvc_heavy.OutputName = {'Du', 'Dv'};
#+end_src
Finally, we plot the coupling ratio in both case (figure [[fig:coupling_ration_light_heavy]]).
We obtain the same result than the analytical case (figures [[fig:coupling_light]] and [[fig:coupling_heavy]]).
#+begin_src matlab :results silent :exports none
freqs = logspace(-2, 3, 1000);
figure;
hold on;
plot(freqs, abs(squeeze(freqresp(Gvc_light('Du', 'Fu'), freqs, 'Hz')))./abs(squeeze(freqresp(Gvc_light('Dv', 'Fu'), freqs, 'Hz'))));
plot(freqs, abs(squeeze(freqresp(Gpz_light('Du', 'Fu'), freqs, 'Hz')))./abs(squeeze(freqresp(Gpz_light('Dv', 'Fu'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(Gvc_heavy('Du', 'Fu'), freqs, 'Hz')))./abs(squeeze(freqresp(Gvc_heavy('Dv', 'Fu'), freqs, 'Hz'))), '--');
plot(freqs, abs(squeeze(freqresp(Gpz_heavy('Du', 'Fu'), freqs, 'Hz')))./abs(squeeze(freqresp(Gpz_heavy('Dv', 'Fu'), freqs, 'Hz'))), '--');
hold off;
xlim([freqs(1), freqs(end)]);
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('Coupling ratio');
legend({'light - VC', 'light - PZ', 'heavy - VC', 'heavy - PZ'})
#+end_src
#+HEADER: :tangle no :exports results :results file :noweb yes
#+HEADER: :var filepath="Figures/coupling_ration_light_heavy.png" :var figsize="wide-tall"
#+begin_src matlab
<<plt-matlab>>
#+end_src
#+NAME: fig:coupling_ration_light_heavy
#+RESULTS:
[[file:Figures/coupling_ration_light_heavy.png]]
#+begin_src matlab :exports none :results silent #+begin_src matlab :exports none :results silent
figure; figure;
bode(Gpz_light, Gvc_light); bode(Gpz_light, Gvc_light);

Binary file not shown.