documentation
This commit is contained in:
@@ -32,19 +32,21 @@
|
|||||||
This document describes the tuning and modeling process of the ESB-MX fast stages.
|
This document describes the tuning and modeling process of the ESB-MX fast stages.
|
||||||
|
|
||||||
\section{Measurements}
|
\section{Measurements}
|
||||||
The tool used to record data of the fast stages is the bode plots is MXTuning.py, a script specially developed to record system responses. The main call to collect all data was:\\
|
The tool used to record data of the fast stages, to plot bode diagrams and to do further analysis is MXTuning.py. The main call to collect all data is:\\
|
||||||
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 64|\\
|
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 64|\\
|
||||||
The used frequencies are: 20 kHz phase loop, 5 kHz servo loop, 6.25MHz AdcAmp. This results in 50us phase time and 0.2ms servo time.\\
|
|
||||||
|
The used frequencies on the DeltaTau are: 20 kHz phase loop, 5 kHz servo loop, 6.25MHz AdcAmp. This results in 50us phase time and 0.2ms servo time.\\
|
||||||
|
|
||||||
According to the amplifier specs \cite[19]{PMAClv} a DAC Value of $32737=2^{15}$ corresponds to 33.85A current. So 1 \verb|curr_bit| is $33.85/32737A =1.034mA$.\\
|
According to the amplifier specs \cite[19]{PMAClv} a DAC Value of $32737=2^{15}$ corresponds to 33.85A current. So 1 \verb|curr_bit| is $33.85/32737A =1.034mA$.\\
|
||||||
|
|
||||||
\cite[245-259]{PMACusr} Shows how the PwmSf works and is explained with some calculation examples.\\
|
\cite[245-259]{PMACusr} shows how the PwmSf parameter works and is explained with some calculation examples.\\
|
||||||
This is set in the gpasciiCommander templates:
|
|
||||||
|
The settings of the PwmSf is done in the templates of gpasciiCommander:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
PwmSf=15134.8909 # =.95*16384. PMAC3-style DSPGATE3 ASIC is being used for the output,
|
PwmSf=15134.8909 # =.95*16384. PMAC3-style DSPGATE3 ASIC is being used for the output,
|
||||||
the counter moves between +/- 16384. PwmSf is typically set to 95% of 16384
|
the counter moves between +/- 16384. PwmSf is typically set to 95% of 16384
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
Nerverless the documentation is confusing. Therefore PwmSf will be measured to convert idCmd bits values to idVolts bits in section \ref{sec:measCurStep}
|
Nevertheless the documentation is confusing. Therefore PwmSf is measured to convert idCmd bits values to idVolts bits in section \ref{sec:measCurStep}\\
|
||||||
|
|
||||||
The Parker stages are configured to contCur=800mA ,peakCur=2400mA. Specs of the D11 stage are 0.8Amp RMS (producing 4N force) and 2.4Amp RMS peak.\\
|
The Parker stages are configured to contCur=800mA ,peakCur=2400mA. Specs of the D11 stage are 0.8Amp RMS (producing 4N force) and 2.4Amp RMS peak.\\
|
||||||
It should be save to use the higher DC value of 0.92Amp and 2.8Amp instead of the RMS value.
|
It should be save to use the higher DC value of 0.92Amp and 2.8Amp instead of the RMS value.
|
||||||
@@ -56,15 +58,16 @@ It should be save to use the higher DC value of 0.92Amp and 2.8Amp instead of th
|
|||||||
\includegraphics[scale=.5]{/home/zamofing_t/Documents/doc-ext/DeltaTau/UsrMan257.png}
|
\includegraphics[scale=.5]{/home/zamofing_t/Documents/doc-ext/DeltaTau/UsrMan257.png}
|
||||||
The current step looks similar for both motors.
|
The current step looks similar for both motors.
|
||||||
The transfer function is: $k \cdot {w_0}^2/({w_0}^2+2 \cdot damp \cdot w_0 \cdot s+s^2)$\\
|
The transfer function is: $k \cdot {w_0}^2/({w_0}^2+2 \cdot damp \cdot w_0 \cdot s+s^2)$\\
|
||||||
rise time $(0\rightarrow 100\%)$ ca. 0.4ms\\
|
the rise rise time $(0\rightarrow 100\%)$ is ca. 0.4ms\\
|
||||||
rise time: \url{https://nptel.ac.in/courses/101108056/module7/lecture20.pdf}\\
|
(rise time: \url{https://nptel.ac.in/courses/101108056/module7/lecture20.pdf}\\
|
||||||
$\rightarrow$ \verb|1/(w0*np.sqrt(1-0.75**2))*(np.pi/2+np.arcsin(0.75))|\\
|
$\rightarrow$ \verb|1/(w0*np.sqrt(1-0.75**2))*(np.pi/2+np.arcsin(0.75))|)\\
|
||||||
|
|
||||||
The loop parameters are:\\
|
The loop parameters are:\\
|
||||||
IiGain=5, IpfGain=8, IpbGain=8
|
IiGain=5, IpfGain=8, IpbGain=8
|
||||||
|
|
||||||
|
|
||||||
In steady state an idCmd=idMeas=406. results in aprox. idVolts=7400\\
|
In steady state an idCmd=idMeas=406. results in aprox. idVolts=7400\\
|
||||||
This has been measured precisly from gathered data \verb|chirp_all_1a.npz|
|
This has been measured precisely from gathered data \verb|chirp_all_1a.npz|
|
||||||
at frequencies from 10 to 220 Hz.
|
at frequencies from 10 to 220 Hz.
|
||||||
The images have been generated with
|
The images have been generated with
|
||||||
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 128|.\\
|
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 128|.\\
|
||||||
@@ -72,28 +75,29 @@ The images have been generated with
|
|||||||
The overall aplification $iqCmd \rightarrow iqVolts$ is approx. 18.2.
|
The overall aplification $iqCmd \rightarrow iqVolts$ is approx. 18.2.
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF0.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF0.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF1.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF1.eps}
|
||||||
\caption{IqCmd->IqMeas of motor 1 (bode same for both motors)}
|
\caption{IqCmd->IqMeas of motor 1 (bode same for both motors)}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF2.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF2.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF3.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/iqCmd_TF3.eps}
|
||||||
\caption{IqCmd->IqVolts of motor 1 (bode same for both motors)}
|
\caption{IqCmd->IqVolts of motor 1 (bode same for both motors)}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\FloatBarrier
|
\FloatBarrier
|
||||||
\subsection{Measure Open Loop}
|
\subsection{Measure Open Loop}
|
||||||
|
|
||||||
The frequency response has been measured with chirps at different amplitudes and frequency regions. The yellow line is averaged measurement data. The black line is the approximated model. The diagram shows \verb|curr_bits| (ca.1mA) to \verb|ActPos| (in um) transfer function.\\
|
The frequency response has been measured with chirps at different amplitudes and frequency regimes. The yellow line is averaged measurement data. The black line is the approximated model. The diagram shows \verb|curr_bits| (ca.1mA) to \verb|ActPos| (in um) transfer function.\\
|
||||||
The images have been generated with
|
The images have been generated with
|
||||||
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 32|.\\
|
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 64|.\\
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
|
\vspace{-1cm}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/bode_model_plot0.eps}
|
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/bode_model_plot0.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/bode_model_plot2.eps}
|
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/bode_model_plot2.eps}
|
||||||
\caption{open loop of motor 1 and 2}
|
\vspace{-1cm}\caption{open loop of motor 1 and 2}
|
||||||
\label{fig:mot_open}
|
\label{fig:mot_open}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
@@ -118,10 +122,10 @@ resonances 60Hz,142Hz,414Hz,231Hz\\
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
The bode plot drops as expected at approx. 40dB/dec. (due to $F=m\ddot{x}$)
|
The bode plot drops as expected at approx. 40dB/dec. (due to the equation $F=m\ddot{x}$)\\
|
||||||
|
|
||||||
Here a example to roughly calculate at which frequency the motor moves 1um at 2A current:\\
|
Here a example to roughly calculate at which frequency the motor moves 1um at 2A current:\\
|
||||||
1curr\_bits is approx. 1mA. At 0dB 1mA moves a sine of 1um.\\
|
1\texttt{curr\_bits} is approx. 1mA. Hence at 0dB 1mA moves a sine of 1um.\\
|
||||||
10dB=factor 10, 20dB=factor 100, 30dB=factor 1000, 3dB $\approx$ factor 2\\
|
10dB=factor 10, 20dB=factor 100, 30dB=factor 1000, 3dB $\approx$ factor 2\\
|
||||||
A factor 2000 is $1000 \cdot 2 =30dB+3dB=33dB$.
|
A factor 2000 is $1000 \cdot 2 =30dB+3dB=33dB$.
|
||||||
Out of the bode plot we can read approx.:\\
|
Out of the bode plot we can read approx.:\\
|
||||||
@@ -143,17 +147,20 @@ Therefore the whole current is used to overcome the friction and the bode amplit
|
|||||||
|
|
||||||
|
|
||||||
\subsection{Closed Loop}
|
\subsection{Closed Loop}
|
||||||
\subsubsection{Deltatau schematics}
|
\subsubsection{DeltaTau schematics}
|
||||||
|
|
||||||
\includegraphics[scale=.7]{/home/zamofing_t/Documents/doc-ext/DeltaTau/UsrMan290.png}
|
\includegraphics[scale=.7]{/home/zamofing_t/Documents/doc-ext/DeltaTau/UsrMan290.png}
|
||||||
\\
|
\\
|
||||||
|
|
||||||
Closed loops have been measured with the following control loop settings.
|
For now only features of the basic PID loop are used: \verb|Kp, Kvfb, Ki, Kvff, Kaff, MaxInt|.\\
|
||||||
|
These values have been tweaked as it is recommended by various DeltaTau turorials. But this twearing is just based on trial and error and not on regulation theory.\\
|
||||||
|
The settings so far are:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
motor_servo(mot=1,Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000)
|
motor_servo(mot=1,Kp=25,Kvfb=400,Ki=0.02,Kvff=350,Kaff=5000,MaxInt=1000)
|
||||||
motor_servo(mot=2,Kp=22,Kvfb=350,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
motor_servo(mot=2,Kp=22,Kvfb=350,Ki=0.02,Kvff=240,Kaff=1500,MaxInt=1000)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
|
With these setting the 'chirp sine closed loop' bode diagrams have been measured.
|
||||||
|
|
||||||
\subsubsection{chirp sine closed loop}
|
\subsubsection{chirp sine closed loop}
|
||||||
|
|
||||||
@@ -163,89 +170,60 @@ shows chirp plot with the input(blue) and the output(green) and its bode plots.
|
|||||||
The parameters for that chirp is:\\
|
The parameters for that chirp is:\\
|
||||||
\verb| amp: 5, minFrq: 10, maxFrq: 220, ts: 0.0002, tSec: 20|
|
\verb| amp: 5, minFrq: 10, maxFrq: 220, ts: 0.0002, tSec: 20|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b0.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b0.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b1.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm, scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b1.eps}
|
||||||
\caption{DesPos->ActPos of motor 1}
|
\caption{DesPos->ActPos of motor 1}
|
||||||
\label{fig:mot1_chirp}
|
\label{fig:mot1_chirp}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
\vspace{2cm}
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b0.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b0.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b1.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b1.eps}
|
||||||
\caption{DesPos->ActPos of motor 2}
|
\caption{DesPos->ActPos of motor 2}
|
||||||
\label{fig:mot2_chirp}
|
\label{fig:mot2_chirp}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b2.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b2.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b3.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_1b3.eps}
|
||||||
\caption{DesPos->IqCmd of motor 1}
|
\caption{DesPos->IqCmd of motor 1}
|
||||||
\label{fig:mot1_chirp_cmd}
|
\label{fig:mot1_chirp_cmd}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b2.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b2.eps}
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b3.eps}
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/chirp_all_2b3.eps}
|
||||||
\caption{DesPos->IqCmd of motor 2}
|
\caption{DesPos->IqCmd of motor 2}
|
||||||
\label{fig:mot2_chirp_cmd}
|
\label{fig:mot2_chirp_cmd}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!50,coltitle=black,title=Conclusion]
|
||||||
Moving 5um with frequencies from 10 to 220Hz\\
|
Moving 5um with frequencies from 10 to 220Hz\\
|
||||||
$\rightarrow$ at frequencies above 200 Hz, the current increses up to 2 amps, and the the following error kicks in\\
|
$\rightarrow$ at frequencies above 200 Hz, the current increses up to 2 amps, and the the following error kicks in\\
|
||||||
$\rightarrow$ The closed loop response becomes bad above 20Hz (motor 1 ca. -10\%, motor 2 +5\% )\\
|
$\rightarrow$ the closed loop response becomes bad above 20Hz (motor 1 ca. -10\%, motor 2 +5\% )\\
|
||||||
|
$\rightarrow$ improvements at that level without regulation theory background is based on luck.
|
||||||
|
\end{tcolorbox}
|
||||||
|
|
||||||
|
|
||||||
\FloatBarrier
|
\FloatBarrier
|
||||||
\subsubsection{Friction} \label{sec:friction}
|
\subsubsection{using advanced DeltaTau Servo Loop}
|
||||||
|
|
||||||
To measure the friction, the stage is moved at slow speed from
|
The standard PID servo loop (figure\ref{fig:deltatau_std_ctrl}) has some additional features, that were not yet used, especially the polynomial filters and nonlinear components as backlash and friction compensation.
|
||||||
+lim to -lim. The current is proportional to the force.
|
|
||||||
Additionally the friction is measured depending on the stage positions and motion directions. This is measured at different speed to see if at these velocities the viscose friction is visible.
|
|
||||||
|
|
||||||
\begin{figure}[h!]
|
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/friction10.eps}
|
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/friction11.eps}
|
|
||||||
\caption{position dependant friction of motor 1}
|
|
||||||
\label{fig:mot1_frict}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
\begin{figure}[h!]
|
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/friction20.eps}
|
|
||||||
\includegraphics[scale=.45]{../python/MXTuning/19_01_29/img/friction21.eps}
|
|
||||||
\caption{position dependant friction of motor 2}
|
|
||||||
\label{fig:mot2_frict}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
Data recording is done with: \verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 16|.\\
|
|
||||||
The function parameters are: \verb|pMin=-10000, pMax=10000, speed=(5,10,20,30,60), cnt=2, period=10|.
|
|
||||||
The recorded data moves from -10000um to 10000um at speed of 5 to 60 mm/s.\\
|
|
||||||
|
|
||||||
Avg current forward: 111.7 Avg current backward: -105.3\\
|
|
||||||
Avg current forward: 95.3 Avg current backward: -130.7\\
|
|
||||||
|
|
||||||
These values should be used for the $K_{fff}$ parameter of the Servo loop:\\
|
|
||||||
|
|
||||||
Motor 1,2: $K_{fff}\approx100$\\
|
|
||||||
|
|
||||||
\FloatBarrier
|
|
||||||
\subsubsection{using advanced Deltatau Servo Loop}
|
|
||||||
|
|
||||||
For now only following settings of the servo loop are used:Kp, Kvfb, Ki, Kvff, Kaff, MaxInt.\\
|
|
||||||
The standard PID servo loop (figure\ref{fig:deltatau_std_ctrl}) has some additional features, that were not yet used, especially the polynomial filters.
|
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\center
|
\center
|
||||||
\includegraphics[scale=.2]{/home/zamofing_t/Documents/doc-ext/DeltaTau/ServoBlockDiag.png}
|
\includegraphics[trim=0cm 2cm 0cm 1cm,scale=.2]{/home/zamofing_t/Documents/doc-ext/DeltaTau/ServoBlockDiag.png}
|
||||||
\caption{position dependant friction of motor 2}
|
\caption{position dependent friction of motor 2}
|
||||||
\label{fig:deltatau_std_ctrl}
|
\label{fig:deltatau_std_ctrl}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\cite[293]{PMACusr} shows details about the standard servo loop but unfortunately there are errors in documentation and the explanations are not really helpful. Hopefully the implementation is correct.\\
|
\cite[293]{PMACusr} shows details about the standard servo loop but unfortunately there are errors in documentation and the explanations are barely helpful.\\
|
||||||
|
|
||||||
\textbf{Polynomial Filters:}
|
\paragraph{Polynomial Filters:}
|
||||||
|
There are no information in the documentation how these filters should be set.
|
||||||
\begin{description}
|
\begin{description}
|
||||||
\item[A:] $Ka_0+Ka_1z^{-1}+\ldots+Ka_1z^{-7}$
|
\item[A:] $Ka_0+Ka_1z^{-1}+\ldots+Ka_1z^{-7}$
|
||||||
\item[B:] $Kb_0+Kb_1z^{-1}+\ldots+Kb_1z^{-7}$
|
\item[B:] $Kb_0+Kb_1z^{-1}+\ldots+Kb_1z^{-7}$
|
||||||
@@ -260,24 +238,57 @@ if \texttt{Motor[x].Servo.SwPoly7} is set to its default value of 0, these only
|
|||||||
If this element is set to 1, these execute as full 7th-order polynomials.
|
If this element is set to 1, these execute as full 7th-order polynomials.
|
||||||
Filters E and F are always 2nd-order polynomials.\\
|
Filters E and F are always 2nd-order polynomials.\\
|
||||||
|
|
||||||
The flat amplitude in figure \ref{fig:mot_open} at low frequencies is mostly the result of the static and viscose friction and not of a linear mechanical spring and element as one could suggest out of the bode plot.\\
|
\paragraph{$\mathbf{K_{fff}}$:}
|
||||||
|
|
||||||
The Value of $K_{fff}$ is used to compensate the non linear static friction. It can be estimated out of the bode plot at low frequencies. It is a non linear element, because it only depends on the sign if the velocity.\\
|
The Value of $K_{fff}$ is used to compensate the non linear static friction. It can be estimated out of the bode plot at low frequencies. It is a non linear element, because it only depends on the sign if the velocity.\\
|
||||||
|
|
||||||
|
\paragraph{$\mathbf{K_{vff}}$:}
|
||||||
$K_{vff}$ is used to compensate the linear viscose friction.\\
|
$K_{vff}$ is used to compensate the linear viscose friction.\\
|
||||||
|
|
||||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
\paragraph{$\mathbf{K_{aff}}$:}
|
||||||
Make simulations in MATLAB. Set C/D filter to compensate resonance and the current loop.\\
|
On a friction free and error free plant a pure feed forward control in open loop would only need the parameter $K_{aff}$ to be set. The value of $K_{aff}$ can be calculated out of the bode diagram.\\
|
||||||
This sshould be mostly the inverse of the figures: \ref{fig:mot1_chirp} and \ref{fig:mot2_chirp}.\\
|
|
||||||
Use $K_{fff}$
|
\subsubsection{Friction} \label{sec:friction}
|
||||||
\end{tcolorbox}
|
The flat amplitude in figure \ref{fig:mot_open} at low frequencies is mostly the result of the static and viscose friction and not of a linear mechanical spring and element as one could suggest out of the bode plot.\\
|
||||||
|
|
||||||
|
|
||||||
|
To measure the friction, the stage is moved at slow speed from
|
||||||
|
+lim to -lim. The current is proportional to the force.
|
||||||
|
Additionally the friction is measured depending on the stage positions and motion directions. This is measured at different speed to see if at these velocities the viscose friction is visible.
|
||||||
|
|
||||||
|
\begin{figure}[h!]
|
||||||
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/friction10.eps}
|
||||||
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/friction11.eps}
|
||||||
|
\caption{position dependant friction of motor 1}
|
||||||
|
\label{fig:mot1_frict}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[h!]
|
||||||
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/friction20.eps}
|
||||||
|
\includegraphics[trim=0cm 1.5cm 0cm 1cm,scale=.45]{../python/MXTuning/19_01_29/img/friction21.eps}
|
||||||
|
\caption{position dependant friction of motor 2}
|
||||||
|
\label{fig:mot2_frict}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
The recorded data moves from -10000um to 10000um at speed of 5 to 60 mm/s.\\
|
||||||
|
Data recording is done with: \verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 16|.\\
|
||||||
|
The function parameters are: \verb|pMin=-10000, pMax=10000, speed=(5,10,20,30,60), cnt=2, period=10|.\\
|
||||||
|
|
||||||
|
Avg current forward: 111.7 Avg current backward: -105.3\\
|
||||||
|
Avg current forward: 95.3 Avg current backward: -130.7\\
|
||||||
|
|
||||||
|
Hence a value of $K_{fff}\approx100$ should used to compensate friction.\\
|
||||||
|
Tests with the motors showed that this value will overcompensate and best results are achived with values of $K_{fff}\approx10$\\
|
||||||
|
|
||||||
|
\FloatBarrier
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
\section{Modeling the system}
|
\section{Modeling the system}
|
||||||
|
|
||||||
|
The goal of this section is to make a mathematical model of the stage. Out of the bode diagram and the physical knowledge, the system consists of a current regulation loop and a mechanical setup with resonance frequencies.
|
||||||
|
|
||||||
\subsection{Electrical model}
|
\subsection{Electrical model}
|
||||||
|
The electrical model is derived from the knowledge that the motor consists of a resistance and a inductance. Further the control structure in the DeltaTau is known (section \ref{sec:measCurStep}).
|
||||||
|
|
||||||
\label{sec:mdlElec}
|
\label{sec:mdlElec}
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\centering
|
\centering
|
||||||
@@ -293,8 +304,8 @@ Solving in Laplace space:\\
|
|||||||
$iqVolts=(R+Ls)\cdot iqMeas$\\
|
$iqVolts=(R+Ls)\cdot iqMeas$\\
|
||||||
$s \cdot iqMeas =\frac{1}{L}iqVolts - \frac{R}{L}iqMeas$\\
|
$s \cdot iqMeas =\frac{1}{L}iqVolts - \frac{R}{L}iqMeas$\\
|
||||||
|
|
||||||
Transferfunction open loop of $G_1(s)=iqVolts \rightarrow iqCmd$
|
Transferfunction open loop of $G_1(s)=iqVolts \rightarrow iqCmd$\\
|
||||||
\\
|
|
||||||
using Masons rule:
|
using Masons rule:
|
||||||
\url{https://en.wikipedia.org/wiki/Mason's_gain_formula}:
|
\url{https://en.wikipedia.org/wiki/Mason's_gain_formula}:
|
||||||
|
|
||||||
@@ -332,16 +343,16 @@ d=1\\
|
|||||||
\]
|
\]
|
||||||
|
|
||||||
To use real values we have to consider: The values
|
To use real values we have to consider: The values
|
||||||
$IiGain=5, IpfGain=8, IpbGain=8$ for the Deltatau are in z-domain.\\
|
$IiGain=5, IpfGain=8, IpbGain=8$ for the DeltaTau are in z-domain.\\
|
||||||
Therefore for the continous domain they have to be scaled:
|
Therefore for the continous domain they have to be scaled:
|
||||||
$Ii=IiGain/ts \quad Ipf=IpfGain \quad Ipb=IpbGain$ with $ts=50\mu s$ (20kHz)\\
|
$Ii=IiGain/ts \quad Ipf=IpfGain \quad Ipb=IpbGain$ with $ts=50\mu s$ (20kHz)\\
|
||||||
|
|
||||||
The overall aplification $iqCmd \rightarrow iqVolts$ measured in section \ref{sec:measCurStep} is approx. 18.2.
|
The overall amplification $iqCmd \rightarrow iqVolts$ measured in section \ref{sec:measCurStep} is approx. 18.2.
|
||||||
|
|
||||||
The resistance of the stage is 8.8 $\Omega$\\
|
The resistance of the stage is 8.8 $\Omega$\\
|
||||||
The inductance of the stage is 2.4 mH.\\
|
The inductance of the stage is 2.4 mH.\\
|
||||||
|
|
||||||
Nevertheless simulations with \verb|current_loop.slx| showed, that the current loop only works in the discrete domain. In continous domain neither the amplification nor the shape mached.\\
|
Nevertheless simulations with \verb|current_loop.slx| showed, that the current loop only works in the discrete domain. In continous domain neither the amplification nor the shape matched.\\
|
||||||
Therefore the only approach is to use the second order transfer function as approximated in section \ref{sec:measCurStep}.\\
|
Therefore the only approach is to use the second order transfer function as approximated in section \ref{sec:measCurStep}.\\
|
||||||
|
|
||||||
A further test is to 'turn of' the current loop. This can be done by setting:$IiGain=0, IpfGain=1, IpbGain=-1$.
|
A further test is to 'turn of' the current loop. This can be done by setting:$IiGain=0, IpfGain=1, IpbGain=-1$.
|
||||||
@@ -380,7 +391,7 @@ mass $m=m_1+m_2+\ldots+m_n$\\
|
|||||||
damping: $d=d_1+d_2+\ldots+d_n$\\
|
damping: $d=d_1+d_2+\ldots+d_n$\\
|
||||||
springs: $k=k_1+k_2+\ldots+k_n$\\
|
springs: $k=k_1+k_2+\ldots+k_n$\\
|
||||||
|
|
||||||
\eqref{mech1} shows the mechanical differential equations:
|
Eq.\eqref{eq:mech1} shows the mechanical differential equations:
|
||||||
|
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\begin{aligned}
|
\begin{aligned}
|
||||||
@@ -401,7 +412,7 @@ springs: $k=k_1+k_2+\ldots+k_n$\\
|
|||||||
\end{aligned}\label{eq:mech2}
|
\end{aligned}\label{eq:mech2}
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
|
||||||
\eqref{eq:mech2} are the general input output equations in matrix form with x and A defines as \eqref{eq:mech3}:
|
Eq.\eqref{eq:mech2} are the general input output equations in matrix form with x and A defines as eq.\eqref{eq:mech3}:
|
||||||
|
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\mathbf{x}=
|
\mathbf{x}=
|
||||||
@@ -451,23 +462,32 @@ B=\begin{bmatrix}
|
|||||||
\label{eq:mech3}
|
\label{eq:mech3}
|
||||||
\end{equation}
|
\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}).\\
|
\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!50,coltitle=black,title=Conclusion]
|
||||||
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
|
$k_1=0$: There is nothing like a spring that brings the system to a neutral position. The reason of the flat bode diagram at low frequencies is the friction. This non linear friction has to be compensate outside of the control loop. ($K_{fff}$)\\
|
||||||
|
|
||||||
|
$d_1$ seems to be negligible (section \ref{sec:stageData}).\\
|
||||||
|
|
||||||
|
The system is neither observable nor controllable.
|
||||||
|
$\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.\\
|
||||||
|
|
||||||
|
But all that resonance frequency stuff seems hardly controllable. Therefore the only way to have good control seems to avoid any resonance frequency.\\
|
||||||
|
|
||||||
|
Neverless that model helped a lot to understand the whole system and to build good suited models in MATLAB.
|
||||||
\end{tcolorbox}
|
\end{tcolorbox}
|
||||||
|
|
||||||
\subsection{Stage data}
|
\subsection{Stage data}
|
||||||
\label{sec:stageData}
|
\label{sec:stageData}
|
||||||
|
|
||||||
This data comes from datasheets and construction information \cite{DynParker}.
|
This data comes from datasheets \cite{ParkerStage} and construction information \cite{DynParker}.
|
||||||
|
|
||||||
\begin{tabular}{|r|l|}
|
\begin{tabular}{|r|l|}
|
||||||
\hline
|
\hline
|
||||||
Stage Y mass& 340g \\
|
Stage Y mass& 340g \\
|
||||||
Stage X mass& 950g \\
|
Stage X mass& 950g \\
|
||||||
Interferometer mirrors & 51g (additional)\\
|
Interferometer mirrors & 51g (additional)\\
|
||||||
Aluminun (instead ABS) & 42g (additional)\\
|
Aluminum (instead ABS) & 42g (additional)\\
|
||||||
\hline
|
\hline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
||||||
@@ -475,7 +495,7 @@ Aluminun (instead ABS) & 42g (additional)\\
|
|||||||
|
|
||||||
\begin{tabular}{|r|c|l|}
|
\begin{tabular}{|r|c|l|}
|
||||||
\hline
|
\hline
|
||||||
Continous force && 5.51N \\
|
Continuous force && 5.51N \\
|
||||||
Peak force && 12N \\
|
Peak force && 12N \\
|
||||||
Static friction && 1N\\
|
Static friction && 1N\\
|
||||||
Viscose damping && 0.5N$\cdot$s/m\\
|
Viscose damping && 0.5N$\cdot$s/m\\
|
||||||
@@ -487,9 +507,9 @@ Inductance &L& 2.4mH\\
|
|||||||
|
|
||||||
\vspace{1pc}
|
\vspace{1pc}
|
||||||
|
|
||||||
The data sheet for the current are quite confusing (sine, trap, rms). But lets check the motor Konstant Km.\\
|
The data sheet for the current are quite confusing (sine, trap, rms). But lets check the motor constant Km.\\
|
||||||
The data sheet says:\\
|
The data sheet says:\\
|
||||||
Stall Current Continous 0.92A (trap, DC), Stall force Continous 4N
|
Stall Current Continuous 0.92A (trap, DC), Stall force Continuous 4N
|
||||||
\[
|
\[
|
||||||
U=R\cdot I \qquad P=U \cdot I \quad \rightarrow \quad P=R \cdot I^2\\
|
U=R\cdot I \qquad P=U \cdot I \quad \rightarrow \quad P=R \cdot I^2\\
|
||||||
\]
|
\]
|
||||||
@@ -498,7 +518,7 @@ $1.46N \cdot \sqrt{7.44} = 3.98 N$\\
|
|||||||
|
|
||||||
Lets have a look at the viscose damping:\\
|
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$.
|
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.
|
The used current for that force is negligible, and therefore the viscose damping is negligible.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -513,15 +533,19 @@ The goal is to build an optimal state space model of the plant with following in
|
|||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
\verb|full_bode_mot[1|2].mat| is generated from \verb|MXTuning.py| in function \verb|bode_model_plot()|. It contains the bode data of real measurements and approximated transfer functions.
|
\verb#full_bode_mot[1|2].mat# is generated from \verb|MXTuning.py| in function \verb|bode_model_plot()|. It contains the bode data of real measurements and approximated transfer functions.
|
||||||
|
|
||||||
\verb|identifyFxFyStage.m| reads the python data \verb|full_bode_mot[1|2].mat| and build motor objects with transfer functions and state space models.
|
\verb|identifyFxFyStage.m| reads the python data \verb#full_bode_mot[1|2].mat# and build motor objects with transfer functions and state space models.
|
||||||
|
|
||||||
The approximated transfer functions can be tweaked and edited with: e.g. \verb|controlSystemDesigner('bode',1,mot1.tf_xx)| to enhance the model.
|
The approximated transfer functions can be tweaked and edited with: e.g. \verb|controlSystemDesigner('bode',1,mot1.tf_xx)| to enhance the model.
|
||||||
The full transfer function is then split in individual parts that are put back into \verb|MXTuning.py|.\\
|
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}\\
|
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.
|
\-\hspace{2em}tfc = transfer function current\\
|
||||||
|
\-\hspace{2em}tfp = transfer function position\\
|
||||||
|
\-\hspace{2em}tf[1-9]=transfer function for resonance\\
|
||||||
|
\-\hspace{2em}Consecutive letters are simplified transfer functions (tfd,tfq).
|
||||||
|
|
||||||
|
|
||||||
\begin{table}[h!]
|
\begin{table}[h!]
|
||||||
\center
|
\center
|
||||||
@@ -551,7 +575,7 @@ tf4 & mechanical resonance tf & & f=[23
|
|||||||
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$.\\
|
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}
|
\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.}}
|
\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.}}
|
||||||
\vspace{1pc}
|
\vspace{1pc}
|
||||||
|
|
||||||
\section{Simulink/MATLAB simulations}
|
\section{Simulink/MATLAB simulations}
|
||||||
@@ -602,7 +626,7 @@ Therefore for better regulation quality more sophisticated controllers as state
|
|||||||
|
|
||||||
A standard PID controller uses feedback to detect errors between the desired position and the actual position and applies corrective commands to compensate for those errors. Although PID control is the most common type of industrial controller, it does have limitations.
|
A standard PID controller uses feedback to detect errors between the desired position and the actual position and applies corrective commands to compensate for those errors. Although PID control is the most common type of industrial controller, it does have limitations.
|
||||||
The idea of a state space controller with observer is to have a model of the plant which follows all internal states of the real plant. All these internal states of the model can then be used states to build an optimal controller.
|
The idea of a state space controller with observer is to have a model of the plant which follows all internal states of the real plant. All these internal states of the model can then be used states to build an optimal controller.
|
||||||
opposite to the PID cpntroller which is a ‘black-box design’, the state space controller with observer is a ‘white box design’. (Figure \ref{fig:observer1})\\
|
opposite to the PID controller which is a ‘black-box design’, the state space controller with observer is a ‘white box design’. (Figure \ref{fig:observer1})\\
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\centering
|
\centering
|
||||||
@@ -611,13 +635,13 @@ opposite to the PID cpntroller which is a ‘black-box design’, the state spa
|
|||||||
\end{figure}
|
\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 $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}\\
|
To implement a state space controller with observer the model has to be observable and controllable. The full model of the transfer 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})\\
|
||||||
|
|
||||||
|
|
||||||
Figure \ref{fig:mdl_bode1} shows the bode plots of the best model to the most simplified model:\\
|
Figure \ref{fig:mdl_bode1} shows the bode plots of the best model to the most simplified model:\\
|
||||||
|
|
||||||
\begin{tabular}{ll}
|
\begin{tabular}{ll}
|
||||||
plant & best model tranfer function: $tfc \cdot tfp \cdot tf1 \cdot tf2 \cdot tf3 \cdot tf4$\\
|
plant & best model transfer function: $tfc \cdot tfp \cdot tf1 \cdot tf2 \cdot tf3 \cdot tf4$\\
|
||||||
mdlcp & main mechanical with second order current loop: $tfc \cdot tfp$\\
|
mdlcp & main mechanical with second order current loop: $tfc \cdot tfp$\\
|
||||||
mdldp & main mechanical with $PT_1$ current loop (first order): $tfd \cdot tfp$\\
|
mdldp & main mechanical with $PT_1$ current loop (first order): $tfd \cdot tfp$\\
|
||||||
mdlp & main mechanical (incl. 'viscose friction'): $tfp$\\
|
mdlp & main mechanical (incl. 'viscose friction'): $tfp$\\
|
||||||
@@ -706,12 +730,12 @@ With an additional prefilter resonance and reductions can be suppressed a bit.\\
|
|||||||
|
|
||||||
|
|
||||||
The system was simulated with 5kHz servo loop frequency.
|
The system was simulated with 5kHz servo loop frequency.
|
||||||
Higher servo loop frequency does not help, because a continious state space controller behaves not relevantly better than a sampled state space controller at 5kHz.\\
|
Higher servo loop frequency does not help, because a continuous state space controller behaves not relevantly better than a sampled state space controller at 5kHz.\\
|
||||||
|
|
||||||
Now the controller must be implemented on deltatau to check the performance on the real stage.
|
Now the controller must be implemented on DeltaTau to check the performance on the real stage.
|
||||||
|
|
||||||
\FloatBarrier
|
\FloatBarrier
|
||||||
\subsection{Implementing state space controller on Deltatau}
|
\subsection{Implementing state space controller on DeltaTau}
|
||||||
|
|
||||||
In MATLAB the function \verb|StateSpaceControlDesign()| produces files \verb%/tmp/ssc[1|2].mat%.\\
|
In MATLAB the function \verb|StateSpaceControlDesign()| produces files \verb%/tmp/ssc[1|2].mat%.\\
|
||||||
|
|
||||||
@@ -719,7 +743,7 @@ The servo loop code is generated with: \verb|MXTuning.py –mode 256|.\\
|
|||||||
This python code reads \verb%/tmp/ssc[1|2].mat% and substitutes part of
|
This python code reads \verb%/tmp/ssc[1|2].mat% and substitutes part of
|
||||||
\verb%usr_code/usrcode_template.[h|c]% to build the servo loop code \verb%usr_code/usrcode.[h|c]%.\\
|
\verb%usr_code/usrcode_template.[h|c]% to build the servo loop code \verb%usr_code/usrcode.[h|c]%.\\
|
||||||
|
|
||||||
Finally the real time servo code is compliled and installed on the DeltaTau with:\\
|
Finally the real time servo code is compiled and installed on the DeltaTau with:\\
|
||||||
|
|
||||||
\verb|/epics_ioc_modules/ESB_MX/python/usr_code$ make install|\\
|
\verb|/epics_ioc_modules/ESB_MX/python/usr_code$ make install|\\
|
||||||
|
|
||||||
@@ -736,7 +760,7 @@ The \verb|make install| process consists of many sub parts:\\
|
|||||||
- generate observer date in MATLAB with \verb|StateSpaceControlDesign()|\\
|
- generate observer date in MATLAB with \verb|StateSpaceControlDesign()|\\
|
||||||
- generate code in python with \verb|MXTuning.py|\\
|
- generate code in python with \verb|MXTuning.py|\\
|
||||||
- compile the code with \verb|MXTuning.py| (make all)\\
|
- compile the code with \verb|MXTuning.py| (make all)\\
|
||||||
- upload the module to Deltatau (make install)\\
|
- upload the module to DeltaTau (make install)\\
|
||||||
- activate the user servo loop (make install)\\
|
- activate the user servo loop (make install)\\
|
||||||
|
|
||||||
Here the full process:
|
Here the full process:
|
||||||
@@ -785,10 +809,12 @@ Motor[1].Ctrl =UserAlgo.ServoCtrlAddr[1]
|
|||||||
\FloatBarrier
|
\FloatBarrier
|
||||||
\subsection{The reality of the state space controller}
|
\subsection{The reality of the state space controller}
|
||||||
|
|
||||||
The state space controller assumes that the system is observable and controlable. The bode plot shows a flat amplitude at low frequencies, which makes the feeling, that the system is observable and controlable. But in fact the reason of that flat amplitude is friction (section \ref{sec:friction}). The viscode damping is negligable.\\
|
The state space controller assumes that the system is observable and controllable. The bode plot shows a flat amplitude at low frequencies, which makes the feeling, that the system is observable and controllable. But in fact the reason of that flat amplitude is friction (section \ref{sec:friction}).\\
|
||||||
This results to the fact that the stage consists of really 2 integrators and behaves without friction roughly like $F=m \cdot \ddot{x}$. But an integrator $\frac{1}{s}$ is neighter observable nor controlable. Therefore we have to check, how to implement an optimal controller for such a system.\\
|
This results to the fact that the stage consists of really 2 integrators and behaves without friction roughly like $F=m \cdot \ddot{x}$. But an integrator $\frac{1}{s}$ is neither observable nor controllable. Therefore we have to check, how to implement an optimal controller for such a system. A state space observer controller seems not to be appropriate in stat case.\\
|
||||||
|
|
||||||
|
|
||||||
|
\subsubsection{Theoretical approach for $\frac{1}{s^2}$ plant}
|
||||||
|
|
||||||
A controller consists of a feed forward H(s) and a feed back G(s) path.
|
A controller consists of a feed forward H(s) and a feed back G(s) path.
|
||||||
|
|
||||||
|
|
||||||
@@ -802,36 +828,53 @@ A controller consists of a feed forward H(s) and a feed back G(s) path.
|
|||||||
Assume a plant consists of a integrator $\frac{1}{s}$ the overall transfer functions are $\frac{y}{u}=\frac{\frac{H}{s}+\frac{G}{s}}{1+\frac{G}{s}}=\frac{H+G}{s+G}$ and $\frac{y}{e}=\frac{\frac{G}{s}}{1+\frac{G}{s}}=\frac{G}{s+G}$. Setting H(s)=s and G(s)=k results in a overall transfer function of $\frac{y}{u}=\frac{s+G}{s+G}=1$ and $\frac{y}{e}=\frac{k}{s+k}$. So the output follows the input and k defines how fast errors will be compensated.\\
|
Assume a plant consists of a integrator $\frac{1}{s}$ the overall transfer functions are $\frac{y}{u}=\frac{\frac{H}{s}+\frac{G}{s}}{1+\frac{G}{s}}=\frac{H+G}{s+G}$ and $\frac{y}{e}=\frac{\frac{G}{s}}{1+\frac{G}{s}}=\frac{G}{s+G}$. Setting H(s)=s and G(s)=k results in a overall transfer function of $\frac{y}{u}=\frac{s+G}{s+G}=1$ and $\frac{y}{e}=\frac{k}{s+k}$. So the output follows the input and k defines how fast errors will be compensated.\\
|
||||||
|
|
||||||
|
|
||||||
Simulating a single integrator plant in MATLAB works. But with 2 integrators the system is unstable because of the two derivate elements. With a discrete differentiator it becomes stable again. In fact a derivate element is a very critical element, because it can create instability and adds a lot of noise. But in this case it is acceptable, because is acts on the trajectory and not on the feedback loop. The only thing that has to be granted is that the trajectory is twice differentiable. This is the case with limited jirk or with the pvt motion. A step response should be avoided and not used to tweak the parameters.\\
|
Simulating a single integrator plant in MATLAB works. But with 2 integrators the system is unstable because of the two derivate elements. With a discrete differentiator it becomes stable again. In fact a derivate element is a very critical element, because it can create instability and adds a lot of noise. But in this case it is acceptable, because is acts on the trajectory and not on the feedback loop. The only thing that has to be granted is that the trajectory is twice differentiable. This is the case with limited jerk or with the pvt motion. A step response should be avoided and not used to tweak the parameters.\\
|
||||||
|
|
||||||
\includegraphics[scale=.45]{FF_FB_ctrl.png}
|
\includegraphics[scale=.45]{FF_FB_ctrl.png}
|
||||||
The optimal parameters for a pure feed forward systems are calculated
|
The optimal parameters for a pure feed forward systems are calculated
|
||||||
in equation \ref{eq:calc_Kaff}.
|
in equation \ref{eq:calc_Kaff}:
|
||||||
|
|
||||||
\def\ccdot{\negthinspace\cdot\negthinspace}
|
\def\ccdot{\negthinspace\cdot\negthinspace}
|
||||||
|
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\begin{aligned}
|
\begin{aligned}
|
||||||
&DesPosFB=DesVelFF=0,\quad posErrFB=velErrFB=accErrFB=0\\
|
&DesPosFB=DesVelFF=0,\quad posErrFB=velErrFB=accErrFB=0\\
|
||||||
&\text{Motor 1: 19.8Hz 0dB, Ts=5kHz=.2ms,}\quad
|
&\text{Motor 1: 19.8Hz$\hat{=}$0dB, Ts=5kHz=.2ms,}\quad
|
||||||
k=(19.8 \ccdot 2 \ccdot \pi)^2\\
|
k=(19.8 \ccdot 2 \ccdot \pi)^2\\
|
||||||
&Kaff = 1/(Ts \ccdot Ts \ccdot k) = 1/((19.8 \ccdot 2 \ccdot \pi)^2/5000^2) = 1615.2\\
|
&Kaff = 1/(Ts \ccdot Ts \ccdot k) = 1/((19.8 \ccdot 2 \ccdot \pi)^2/5000^2) = 1615.2\\
|
||||||
&\text{Motor 2:11.84Hz 0dB, Ts=5kHz=.2ms,}\quad
|
&\text{Motor 2:11.84Hz$\hat{=}$0dB, Ts=5kHz=.2ms,}\quad
|
||||||
k=(11.84 \ccdot 2 \ccdot \pi)^2\\
|
k=(11.84 \ccdot 2 \ccdot \pi)^2\\
|
||||||
&Kaff = 1/(Ts \ccdot Ts \ccdot k) = 1/((11.84 \ccdot 2 \ccdot \pi)^2/5000^2) = 4517.28\\
|
&Kaff = 1/(Ts \ccdot Ts \ccdot k) = 1/((11.84 \ccdot 2 \ccdot \pi)^2/5000^2) = 4517.28\\
|
||||||
\end{aligned}\label{eq:calc_Kaff}
|
\end{aligned}\label{eq:calc_Kaff}
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
|
||||||
To correct errors, posErrFB is increased. But in a discrete system, the regulation becomes instable, because the actPos always lags the desPos for one sample. To avoid instability, a fiter can attenuate this problem.\\
|
To correct errors, posErrFB is increased. But in a discrete system, the regulation becomes instable, because the actPos always lags the desPos for one sample. To avoid instability, a filter can attenuate this problem.\\
|
||||||
|
|
||||||
The Standard Delta Tau controller (figure \ref{fig:deltatau_std_ctrl}), shows a very similar feed forward and feedback loop structure with additional filters. So after all the measurements, we can calculate the optimal Kfff and Kaff values.
|
The Standard Delta Tau controller (figure \ref{fig:deltatau_std_ctrl}), shows a very similar feed forward and feedback loop structure with additional filters. So after all the measurements, we can calculate the optimal Kfff and Kaff values.
|
||||||
Kp and Ki values will attenuate the errors. Kvff=Kvfb makes the system stable at higher Kp values, but setting the filter B seems to be more appropriate.\\
|
Kp and Ki values will attenuate the errors. Kvff=Kvfb makes the system stable at higher Kp values, but setting the filter B seems to be more appropriate.\\
|
||||||
|
Now that we had some experimental experiences the focus is to use regulation theory knowledge to find the best parameters.\\
|
||||||
|
|
||||||
MATLAB simulations \verb|(tool: DeltaTauOptimizer.m)| and real test showed similar behaviour and the following error could be reduced roughly by factor 2 with first tests.\\
|
\subsubsection{Controller with pole placement}
|
||||||
|
|
||||||
This should be good enough for the beam time in March 2019 but further improvements still should be possible.
|
As a full observer controller is not possible, the goal is to implement a controller with pole placement with a simplified plant model. The simplified motion (tfq) with simplified current (tfd) loop has all the needed states directly as measurement values or as calculated values in the default DeltaTau servo controller. The used states are: position, velocity, acceleration(proportional to measured current). With these states a pole placement controller can be implemented. The calculated values are: Kp Kvfb and Kafb. The result is a quite good looking controller.\\
|
||||||
|
Additional feed forward gains follows the trajectory even better by setting of these values:
|
||||||
|
\begin{itemize}
|
||||||
|
\setlength\itemsep{0em}
|
||||||
|
\item optimize Kfff by tests to roughly 10
|
||||||
|
\item Kvff=Kvfb
|
||||||
|
\item Kaff as caldulated in equation \ref{eq:calc_Kaff}.
|
||||||
|
\item Ki value will attenuate the static error, but also make the dynamic regulation worse
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
|
||||||
|
MATLAB simulations \verb|(tool: DeltaTauOptimizer.m)| and real test showed similar behaviour and the following error could be reduced roughly by factor 2. (Appendix \ref{ax:optimize}). Further the behavior at higher frequencies (50Hz, 100Hz FEL repetition rate) is much better.\\
|
||||||
|
|
||||||
|
Further improvements could be done with filters to shape the bode diagram. But first of all lets focus on the induced frequencies from the trajectory: The trajectory contains frequencies of half of the FEL repetition rate. so e.g. 0-50Hz at a FEL rate of 100 Hz. (section \ref{sec:trajPlan}). Therefore to follow the trajectory only frequencies below 50Hz are relevant. In this regime the bode plot looks very good. Only at higher frequencies the bode plot looks worse, mainly because of the impact of the resonance frequencies. Therefore filters in the feed forward path would make no sense. Only filters in the closed loop can enhance the regulation quality.\\
|
||||||
|
|
||||||
|
Therefore in the figure \ref{fig:deltatau_std_ctrl} the filter $\frac{C}{D}$ is the main filter that can enhance the regulation quality. Up to now, this was not achived, because the regulation seems to be stronger than the effect of the filter.\\
|
||||||
|
|
||||||
|
For the time being, these regulation parameters should be good enough for the beam time in March 2019 but still some further minor improvements should be possible.\\
|
||||||
|
|
||||||
|
|
||||||
% Motor 2:11.84Hz 0dB
|
% Motor 2:11.84Hz 0dB
|
||||||
% Kaff = 1/((11.84*2*np.pi)**2/5000/5000) = 4517.278506241804
|
% Kaff = 1/((11.84*2*np.pi)**2/5000/5000) = 4517.278506241804
|
||||||
@@ -848,7 +891,7 @@ This should be good enough for the beam time in March 2019 but further improveme
|
|||||||
\vspace{1pc}
|
\vspace{1pc}
|
||||||
|
|
||||||
\begin{appendix}
|
\begin{appendix}
|
||||||
\section{Appendix}
|
\section{Appendix}\label{ax:optimize}
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
amp: 5, minFrq: 10, maxFrq: 220, ts: 0.0002, tSec: 20
|
amp: 5, minFrq: 10, maxFrq: 220, ts: 0.0002, tSec: 20
|
||||||
@@ -892,7 +935,7 @@ shot average error x 0.865708 um, y 0.965126 um, 1.49323 um
|
|||||||
|
|
||||||
\texttt{helicalscan.py} & functions for helical scan motion (motion program, coordinate transformation, calibration)\\
|
\texttt{helicalscan.py} & functions for helical scan motion (motion program, coordinate transformation, calibration)\\
|
||||||
\texttt{shapepath.py} & functions for x,y-scan motion (trajectory planing, motion program)\\
|
\texttt{shapepath.py} & functions for x,y-scan motion (trajectory planing, motion program)\\
|
||||||
\texttt{ShapePathAnalyser.py} & interactive analyse tool of recorded x,y-scan motion\\
|
\texttt{ShapePathAnalyser.py} & interactive analyze tool of recorded x,y-scan motion\\
|
||||||
\\
|
\\
|
||||||
\texttt{identifyFxFyStage.m}& read python data and build motor objects. plot bode\\
|
\texttt{identifyFxFyStage.m}& read python data and build motor objects. plot bode\\
|
||||||
\texttt{simFxFyStage.m}& build a pb structure which contains current (Jan 2019) Powerbrick controller settings\\
|
\texttt{simFxFyStage.m}& build a pb structure which contains current (Jan 2019) Powerbrick controller settings\\
|
||||||
|
|||||||
@@ -6,6 +6,14 @@ Here is still work to do...
|
|||||||
\end{tcolorbox}
|
\end{tcolorbox}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||||
|
Make simulations in MATLAB. Set C/D filter to compensate resonance and the current loop.\\
|
||||||
|
This sshould be mostly the inverse of the figures: \ref{fig:mot1_chirp} and \ref{fig:mot2_chirp}.\\
|
||||||
|
Use $K_{fff}$
|
||||||
|
\end{tcolorbox}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
clear;
|
clear;
|
||||||
clear global;
|
clear global;
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ year = {2015},
|
|||||||
url = {Power Brick LV User Manual.pdf},
|
url = {Power Brick LV User Manual.pdf},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@online{ParkerStage,
|
||||||
|
author = {Parker Automation},
|
||||||
|
title = {MX80L Precision Grade Product Manual No. 100-5326-01},
|
||||||
|
year = {2010},
|
||||||
|
url = {http://www.parkermotion.com/manuals/mx80/MX80LManualRev6.pdf},
|
||||||
|
}
|
||||||
|
|
||||||
biblio: '',
|
biblio: '',
|
||||||
@TechReport{DynParker,
|
@TechReport{DynParker,
|
||||||
author = {Wayne Glettig },
|
author = {Wayne Glettig },
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user