major renaming of transfer functions
This commit is contained in:
@@ -128,6 +128,13 @@ Out of the bode plot we can read approx.:\\
|
||||
Motor 1: -33dB at 130Hz\\
|
||||
Motor 2: -33dB at 84Hz\\
|
||||
|
||||
The chirp parameters for low frequencies bode measurements (yellow) are: \verb|minFrq=1, maxFrq=15, amp=1000|.\\
|
||||
In this regime of 0 to 10Hz the bode amplitude is flat, which is mainly the result of the friction:\\
|
||||
Motor 1 has 9.63dB($\approx$ factor 10) at 10 Hz. This means that an amplitude of 1000um needs roughly 100 \verb|curr_bits|.
|
||||
The friction as measured in figure \ref{fig:mot1_frict} is around 100 \verb|curr_bits|. At lower frequencies than 10 Hz with an amplitude of 1000um, the friction free motion consumes much less current (-40dB) than the friction.
|
||||
Therefore the whole current is used to overcome the friction and the bode amplitude remains constant.
|
||||
|
||||
|
||||
%n times higher mass $\rightarrow$ n times lower frequency for same amplitude response\\
|
||||
%n times higher frequency $\rightarrow$ n times higher velocity $\rightarrow$ $n^2$ times more acceleration==current
|
||||
%1um at 12Hz with 1 mA $\rightarrow$ with 2000mA $\rightarrow$ sqrt(2000)*12Hz=540Hz
|
||||
@@ -385,15 +392,15 @@ springs: $k=k_1+k_2+\ldots+k_n$\\
|
||||
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
\dot{x} = Ax + Bu\\
|
||||
y = Cx + Du
|
||||
\mathbf{\dot{x} = Ax + Bu}\\
|
||||
\mathbf{y = Cx + Du}
|
||||
\end{aligned}\label{eq:mech2}
|
||||
\end{equation}
|
||||
|
||||
\eqref{eq:mech2} are the general input output equations in matrix form with x and A defines as \eqref{eq:mech3}:
|
||||
|
||||
\begin{equation}
|
||||
x=
|
||||
\mathbf{x}=
|
||||
\begin{bmatrix}
|
||||
x_1\\
|
||||
\dot{x}_1\\
|
||||
@@ -404,7 +411,7 @@ x_3\\
|
||||
x_4\\
|
||||
\dot{x}_4\\
|
||||
\end{bmatrix},\quad
|
||||
\dot{x}=
|
||||
\mathbf{\dot{x}}=
|
||||
\begin{bmatrix}
|
||||
\dot{x}_1\\
|
||||
\ddot{x}_1\\
|
||||
@@ -415,7 +422,7 @@ x_4\\
|
||||
\dot{x}_4\\
|
||||
\ddot{x}_4\\
|
||||
\end{bmatrix},\quad
|
||||
A=
|
||||
\mathbf{A}=
|
||||
\begin{bmatrix}
|
||||
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
|
||||
-\frac{k}{m_1} & -\frac{d}{m_1} & \frac{k_2}{m_1} & \frac{d_2}{m_1} & \frac{k_3}{m_1} & \frac{d_3}{m_1} & \frac{k_4}{m_1} & \frac{d_4}{m_1}\\
|
||||
@@ -440,7 +447,14 @@ B=\begin{bmatrix}
|
||||
\label{eq:mech3}
|
||||
\end{equation}
|
||||
|
||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
$k_1=0$ The non linear friction has to be compensate outside of the control loop.\\
|
||||
$d_1$ seems to be negligable (section \ref{sec:stageData}).\\
|
||||
But the system is not observable. $\rightarrow$ Perhaps the integrators of the system can be removed. having only $\mathbf{x}=[ \dot{x}_1 \dot{x}_2 \dot{x}_3 \dot{x}_4]$ as the state vector
|
||||
\end{tcolorbox}
|
||||
|
||||
\subsection{Stage data}
|
||||
\label{sec:stageData}
|
||||
|
||||
This data comes from datasheets and construction information \cite{DynParker}.
|
||||
|
||||
@@ -469,16 +483,19 @@ Inductance &L& 2.4mH\\
|
||||
|
||||
\vspace{1pc}
|
||||
|
||||
The data in the data sheet are quite confusing. But lets check the motor Konstant Km.\\
|
||||
The data sheet for the current are quite confusing (sine, trap, rms). But lets check the motor Konstant Km.\\
|
||||
The data sheet says:\\
|
||||
Stall Current Continous 0.92A, Stall force Continous 4N
|
||||
|
||||
Stall Current Continous 0.92A (trap, DC), Stall force Continous 4N
|
||||
\[
|
||||
U=R\cdot I \qquad P=U \cdot I \quad \rightarrow \quad P=R \cdot I^2\\
|
||||
\]
|
||||
|
||||
at a constant current of 0.92A we have $ 8.8 \cdot 0.92^2 = 7.44 $W the resulting force will be:\\
|
||||
$1.46N \cdot \sqrt{7.44} = 3.98 N$
|
||||
$1.46N \cdot \sqrt{7.44} = 3.98 N$\\
|
||||
|
||||
Lets have a look at the viscose damping:\\
|
||||
our speed is roughly 50$\mu$m/10ms. this is 5mm/s. The damping force at that speed is: $0.5\frac{Ns}{m}\cdot 5\frac{mm}{s}=2\cdot10^{-3}N$.
|
||||
The used current for that force is negligable, and theerefore the viscose damopling is negligable.
|
||||
|
||||
|
||||
|
||||
\subsection{identification of stages}
|
||||
@@ -500,20 +517,26 @@ The approximated transfer functions can be tweaked and edited with: e.g. \verb|c
|
||||
The full transfer function is then split in individual parts that are put back into \verb|MXTuning.py|.\\
|
||||
|
||||
the transfer functions for each two motors are separated atomic transfer function as stated in table \ref{tab:trfFunc1}\\
|
||||
tfc = transfer function current, tfp = transfer function position. Consecutive letters are simplified transfer functions. tf[1-9]=transfer function resonance.
|
||||
|
||||
\begin{table}[h!]
|
||||
\center
|
||||
\begin{tabular}{|l|l|l|l|}
|
||||
\hline
|
||||
key & description & motor1 (fy) & motor2 (fx) \\
|
||||
key & description & motor1 (fy) & motor2 (fx) \\
|
||||
\hline
|
||||
tfc & curren loop tf & f=694 ? 1389 , d=0.75 & same \\
|
||||
tf1 & \vtop{\hbox{\strut main mechanical tf} \hbox{\strut with -40dB/dec }}
|
||||
& mag=6dB f=7.96Hz d=0.6 & mag=12dB f=3.34 d=0.4 \\
|
||||
tf2 & mechanical resonance tf & f=[197,199] d=[0.02,0.02] & f=[55|61] d=[0.2|0.2] \\
|
||||
tf3 & mechanical resonance tf & & f=[128|137] d=[0.05|0.05] \\
|
||||
tf4 & mechanical resonance tf & & f=[410|417] d=[0.015|0.015] \\
|
||||
tf5 & mechanical resonance tf & & f=[230|233] d=[0.04|0.04] \\
|
||||
tfc & current loop tf & f=694 ? 1389 , d=0.75 & same \\
|
||||
tfd & simplified cur.loop tf $PT_1$ & f-3dB, 45\deg at 400Hz & same \\
|
||||
\hline
|
||||
tfp & \vtop{\hbox{\strut main mechanical tf} \hbox{\strut with -40dB/dec }}
|
||||
& mag=6dB f=7.96Hz d=0.6 & mag=12dB f=3.34 d=0.4 \\
|
||||
tfq & \vtop{\hbox{\strut simplified mechanical tf} \hbox{\strut 2 integrators with -40dB/dec }}
|
||||
& 0dB at 19.8Hz & 0dB at 11.84Hz\\
|
||||
\hline
|
||||
tf1 & mechanical resonance tf & f=[197,199] d=[0.02,0.02] & f=[55|61] d=[0.2|0.2] \\
|
||||
tf2 & mechanical resonance tf & & f=[128|137] d=[0.05|0.05] \\
|
||||
tf3 & mechanical resonance tf & & f=[410|417] d=[0.015|0.015] \\
|
||||
tf4 & mechanical resonance tf & & f=[230|233] d=[0.04|0.04] \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\caption{plant partial transfer functions}
|
||||
@@ -521,7 +544,7 @@ tf5 & mechanical resonance tf & & f=[23
|
||||
\end{table}
|
||||
%\vspace{1pc}
|
||||
|
||||
The black line on figure \ref{fig:mot_open} shows the concatenate transfer function $tf1 \cdot tf2 \cdot tf3 \cdot tf4 \cdot tf5 \cdot tfc$ .
|
||||
The black line on figure \ref{fig:mot_open} shows the concatenate transfer function $tfc \cdot tfp \cdot tf1 \cdot tf2 \cdot tf3 \cdot tf4$.\\
|
||||
\vspace{1pc}
|
||||
|
||||
\fbox{\parbox[t]{15cm}{The current loop frequency from the MATLAB identification looks different than the used one. Matlab identifies $w_0=8727rad/sec = f0=1389Hz$ but to match the bode plot a value of half frequency need to be taken:$f_0=694$. The reason could be discretization and time delay because the servo loop is processed after the phase loop.}}
|
||||
@@ -584,29 +607,17 @@ opposite to the PID cpntroller which is a ‘black-box design’, the state spa
|
||||
\end{figure}
|
||||
|
||||
|
||||
To implement a state space controller with observer the model has to be observable and controllable. The full model of the tranfer function $tf1 \cdot tf2 \cdot tf3 \cdot tf4 \cdot tf5 \cdot tfc$ is not controllable due to the various resonance frequencies. Therefore for the observer design the state space model has to be simplified.
|
||||
To implement a state space controller with observer the model has to be observable and controllable. The full model of the tranfer function $tfc \cdot tfp \cdot tf1 \cdot tf2 \cdot tf3 \cdot tf4$ is not controllable due to the various resonance frequencies. Therefore for the observer design the state space model has to be simplified. (see simplified transfer function in table \ref{tab:trfFunc1}\\
|
||||
|
||||
In addition to the transferfunction in table \ref{tab:trfFunc1} following simplified transfer functions have been added:\\
|
||||
|
||||
\begin{tabular}{|l|l|l|l|}
|
||||
\hline
|
||||
key & description & motor1 (fy) & motor2 (fx) \\
|
||||
\hline
|
||||
tfd & simplified loop tf $PT_1$ & f-3dB, 45\deg at 400Hz & same \\
|
||||
tf0 & \vtop{\hbox{\strut simplified mechanical tf} \hbox{\strut 2 integrators with -40dB/dec }}
|
||||
& 0dB at 19.8Hz & 0dB at 11.84Hz\\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\vspace{1pc}
|
||||
|
||||
Figure \ref{fig:mdl_bode1} shows the bode plots of the best model to the most simplified model:\\
|
||||
|
||||
\begin{tabular}{ll}
|
||||
plant & best model tranfer function: $tf1 \cdot tf2 \cdot tf3 \cdot tf4 \cdot tf5 \cdot tfc$\\
|
||||
mdl1c & main mechanical with second order current loop: $tf1 \cdot tfc$\\
|
||||
mdl1d & main mechanical with $PT_1$ current loop (first order): $tf1 \cdot tfd$\\
|
||||
mdl1 & main mechanical (incl. 'viscose friction'): $tf1$\\
|
||||
mdl0 & only 2 integrators: $tf0$\\
|
||||
plant & best model tranfer function: $tfc \cdot tfp \cdot tf1 \cdot tf2 \cdot tf3 \cdot tf4$\\
|
||||
mdlcp & main mechanical with second order current loop: $tfc \cdot tfp$\\
|
||||
mdldp & main mechanical with $PT_1$ current loop (first order): $tfd \cdot tfp$\\
|
||||
mdlp & main mechanical (incl. 'viscose friction'): $tfp$\\
|
||||
mdlq & only 2 integrators: $tfq$\\
|
||||
\end{tabular}
|
||||
\vspace{1pc}
|
||||
|
||||
@@ -627,10 +638,10 @@ The matlab models are:\\
|
||||
|
||||
\begin{tabular}{ll}
|
||||
\texttt{ss\_plt:} & best approach of the plant with mechanics, resonance, current loop etc.\\
|
||||
\texttt{ss\_c1:} & model without resonance (only current and main mechanical)\\
|
||||
\texttt{ss\_d1:} & model without resonance (simplified current and main mechanical)\\
|
||||
\texttt{ss\_1:} & model without current loop, no resonance (only main mechanical)\\
|
||||
\texttt{ss\_0:} & simplified mechanical, no current loop, no resonance\\
|
||||
\texttt{ss\_cp:} & model without resonance (only current and main mechanical)\\
|
||||
\texttt{ss\_dp:} & model without resonance (simplified current and main mechanical)\\
|
||||
\texttt{ss\_p:} & model without current loop, no resonance (only main mechanical)\\
|
||||
\texttt{ss\_q:} & simplified mechanical, no current loop, no resonance\\
|
||||
\end{tabular}\\
|
||||
\vspace{1pc}
|
||||
|
||||
@@ -639,13 +650,18 @@ Following code calculates parameters for a observer controller, does a simulatio
|
||||
\begin{verbatim}
|
||||
clear;clear global;close all;
|
||||
mot=identifyFxFyStage(7);
|
||||
sscType=0
|
||||
for k =1:2
|
||||
[ssc]=StateSpaceControlDesign(mot{k},sscType);sim('observer');
|
||||
f=figure(); h=plot(desPos_actPos.Time,desPos_actPos.Data,'g');
|
||||
set(h(1),'color','b'); set(h(2),'color',[0 0.5 0]);
|
||||
print(f,sprintf('figures/sim_cl_observer_%d',mot{k}.id),'-depsc');
|
||||
for sscType=0:1
|
||||
for k=1:2
|
||||
[ssc]=StateSpaceControlDesign(mot{k},sscType);sim('observer');
|
||||
f=figure(); h=plot(desPos_actPos.Time,desPos_actPos.Data,'g');grid on;
|
||||
set(h(1),'color','b'); set(h(2),'color',[0 0.5 0]);
|
||||
print(f,sprintf('figures/sim_cl_obs_%d_%d',sscType,mot{k}.id),'-depsc');
|
||||
f=bodeSamples(desPos_actPos);
|
||||
print(f,sprintf('figures/sim_cl_obs_bode%d_%d',sscType,mot{k}.id),'-depsc');
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
@@ -659,10 +675,10 @@ end
|
||||
|
||||
\begin{figure}[h!]
|
||||
\center
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_observer_1.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_observer_bode1.eps}\\
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_observer_2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_observer_bode2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_0_1.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_bode0_1.eps}\\
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_0_2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_bode0_2.eps}
|
||||
\caption{Observer sim: Motor 1 Motor 2}
|
||||
\label{fig:mot_observer_sim}
|
||||
\end{figure}
|
||||
@@ -675,10 +691,10 @@ With an additional prefilter resonance and reductions can be suppressed a bit.\\
|
||||
|
||||
\begin{figure}[h!]
|
||||
\center
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_pf_1.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_pf_bode1.eps}\\
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_pf_2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_pf_bode2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_1_1.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_bode1_1.eps}\\
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_1_2.eps}
|
||||
\includegraphics[scale=.45]{../matlab/figures/sim_cl_obs_bode1_2.eps}
|
||||
\caption{Observer with prefilter sim: Motor 1 Motor 2}
|
||||
\label{fig:mot_observer_sim}
|
||||
\end{figure}
|
||||
|
||||
Reference in New Issue
Block a user