documentation
This commit is contained in:
@@ -577,9 +577,9 @@ The black line on figure \ref{fig:mot_open} shows the concatenate transfer funct
|
||||
\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}
|
||||
|
||||
\section{Simulink/MATLAB simulations}
|
||||
\section{Enhance controller with simulation and implementation}
|
||||
|
||||
It has to be checked if the model matches the real stage. Therefore simulations in MATLAB have been done to validate the identification process of the stages.
|
||||
It has to be checked if the model matches the real stage. Therefore simulations in MATLAB have been done to validate the identification process of the stages. Further simulations and implementations with better controller types were tested
|
||||
|
||||
\subsection{chirp sine closed loop with simulink model}
|
||||
|
||||
@@ -734,7 +734,7 @@ Higher servo loop frequency does not help, because a continuous state space cont
|
||||
Now the controller must be implemented on DeltaTau to check the performance on the real stage.
|
||||
|
||||
\FloatBarrier
|
||||
\subsection{Implementing state space controller on DeltaTau}
|
||||
\subsubsection{Implementing state space controller on DeltaTau}
|
||||
|
||||
In MATLAB the function \verb|StateSpaceControlDesign()| produces files \verb%/tmp/ssc[1|2].mat%.\\
|
||||
|
||||
@@ -806,13 +806,13 @@ Motor[1].Ctrl =UserAlgo.ServoCtrlAddr[1]
|
||||
|
||||
|
||||
\FloatBarrier
|
||||
\subsection{The reality of the state space controller}
|
||||
\subsubsection{The reality of the state space controller}
|
||||
|
||||
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 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}
|
||||
\subsection{Theoretical approach for $\frac{1}{s^2}$ plant}
|
||||
|
||||
A controller consists of a feed forward H(s) and a feed back G(s) path.
|
||||
|
||||
@@ -853,7 +853,7 @@ The Standard Delta Tau controller (figure \ref{fig:deltatau_std_ctrl}), shows a
|
||||
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.\\
|
||||
|
||||
\subsubsection{Controller with pole placement}
|
||||
\subsection{Controller with pole placement}
|
||||
|
||||
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:
|
||||
@@ -892,23 +892,25 @@ For the time being, these regulation parameters should be good enough for the be
|
||||
|
||||
\section{Shapepath: trajectory planing}
|
||||
|
||||
Especially in the use case that the sample has to move at each shot at a new position to hit precisly a cristall with sizes close to 1 um, the trajectory planing is very important to achive good precision.\\
|
||||
DeltaTau has the possibility to use pvt (position-velocity-time) motion. In that mode one can tell at which time a position is passed at a certain speed.\\
|
||||
In this section the trajectory planing of the x and y Parker stages in the 'shapepath' mode is analyzed. In the 'shapepath' mode the goal is to place crystals with sizes close to 1um at the beam position when the FEL pulse arrives. The FEL pulse is so short that motion at the impact time is not relevant. The FEL repetition rate is 25, 50 or 100Hz.\\
|
||||
|
||||
The trajectory planing is very important to achieve good timing and positioning precision. This is crucial for high crystal hit rate of the FEL. DeltaTau has the possibility to use pvt (position-velocity-time) motion. In that mode one can tell to pass a given point at certain time with a certain speed.\\
|
||||
PVT motion is a function of $ax^3+bx^2+cx+d$ between 2 points. Additionally the derivate (velocity) in a point is same for the incoming and outgoing trajectory segment.\\
|
||||
Different approaches have been tested and compared to maximize the yield:
|
||||
|
||||
\paragraph{p0t motion:}
|
||||
A first veriy trivial approach is to stop at each point. This stop and go motion will induce a lot of 'shaking' because it always accelerates and decelerates. This can also have a negative inpact to the sample. Therefore the goal was to create smooth trajectory with optimal speed, when the crystal is hit.\\
|
||||
A first very trivial approach is to stop at each point. This stop and go motion will induce a lot of vibrations because it always accelerates and decelerates. This can also have a negative impact to the sample. Therefore other approaches with smoother trajectory and higher speed at impact time will be compared.
|
||||
|
||||
\paragraph{pvt motion:}
|
||||
PVT motion is a function of $ax^3+bx^2+cx+d$ between 2 points. Additionally the derivate (velocity) in a point is same fro the previous and next trajectory segment.\\
|
||||
Assume that the time between points is $t_s$ ms.
|
||||
In this approach the velocity in the point $p_n$ such that the distance from point $p_{n-1}$ to $p_{n+1}$ is reached in $2 \cdot t_s$ ms. This approach gives a very smooth trajectory planing.\\
|
||||
Assume that the time between two points is $t_s$ ms.
|
||||
The velocity in the point $p_n$ is set in a way that the distance from point $p_{n-1}$ to $p_{n+1}$ is reached in $2 \cdot t_s$ ms. This approach gives a very smooth trajectory planing. But it contains still some high frequency components that can be avoided.
|
||||
|
||||
\paragraph{ift motion:}
|
||||
Each new point has to be reached at equidistant time $t_s$. So we can look at the position as sampling values. The trajectory with the least high frequency components is the inverse Fourier transformation of the sampling points. The reconstruction of the trajectory can be done with summing $sin(x)/x$ in the time domain or by adding zeros in the frequency spectrum and the do the inverse Fourier transformation.\\
|
||||
Each new point has to be reached at equidistant time $t_s$. So we can look at the position as sampling values. The trajectory with the least high frequency components is the inverse Fourier transformation of the sampled points. The reconstruction of the trajectory can be done with summing $sin(x)/x$ in the time domain or by adding zeros in the frequency spectrum and the do the inverse Fourier transformation.\\
|
||||
The resulting trajectory is the best achievable in point of view of frequency bandwidth. Unfortunately motion programs do not allow such trajectory planing out of the box.
|
||||
|
||||
\paragraph{pft motion:}
|
||||
pft means 'position-velocity-time with fft velocity'. This approach makes the best approximation of the ift-motion with a pvt motion. For that the steepness (derivate) of the ift has to be calculated in each sampling points. The derivate in time domain corresponds to multiply the fourier transformation with $i$:
|
||||
pft means 'position-velocity-time with fft velocity'. This approach makes the best approximation of the ift-motion with a pvt motion. For that the steepness (derivate) of the ift has to be calculated in each sampling point. The derivate in time domain corresponds to scale the Fourier coefficients in frequency domain:
|
||||
|
||||
\begin{align*}
|
||||
\mathcal{F}(f')(\xi)&=\int_{-\infty}^{\infty}e^{-2\pi i\xi t}f'(t)\,dt\\
|
||||
@@ -917,7 +919,9 @@ pft means 'position-velocity-time with fft velocity'. This approach makes the be
|
||||
\end{align*}
|
||||
|
||||
With that function the velocities in each point can be calculated easily.\\
|
||||
The trajectory planing is additionaly implemented in such a way, that the calculated speed can be scaled from 1 to 0 (1=pft 0=p0t). With that an optimal tradeoff between 'best bandwith but time critical on shot (pft)' and 'shaking but low speed on shpt (p0t)' can be achived.\\
|
||||
But high speed on FEL impact makes the system very time sensitive.
|
||||
Therefore the trajectory planing is additional implemented in such a way, that the calculated speed can be scaled from 1 to 0 (1=pft 0=p0t).
|
||||
With that an optimal trade off between 'best bandwith (pft)' and 'low speed on FEL impact(p0t)' can be achived.\\
|
||||
|
||||
\begin{figure}[h!]
|
||||
\center
|
||||
@@ -929,31 +933,44 @@ The trajectory planing is additionaly implemented in such a way, that the calcul
|
||||
\end{figure}
|
||||
|
||||
|
||||
Figure \ref{fig:traj} shows one axis trajectory planing with 40ms equidistant sampling points. The displayed trajectories are ift, pvt, p0t and pft. The other figure shows the frequency spectrum. The blue line shows a strong drop at 12.5Hz as expected (40ms sampling $\rightarrow$ 25Hz $\rightarrow$ Nyquist frequency = 12.5Hz). The last figure shows the difference of the pvt, p0t and pft compared to ift.\\
|
||||
As expected the pft matches the best the ift and has better bandwith behaviors than the other trajectory planing approaches.
|
||||
Figure \ref{fig:traj} shows one axis trajectory planing with 40ms equidistant sampling points. The displayed trajectories are ift, pvt, p0t and pft. The other figure shows the frequency spectrum. The blue line shows a strong drop at 12.5Hz as expected (40ms sampling $\rightarrow$ 25Hz $\rightarrow$ Nyquist frequency = 12.5Hz). The last figure shows the difference of the pvt, p0t and pft frequency spectrum compared to ift (y scale not significant).\\
|
||||
As expected pft matches the best to the ift spectrum and has better bandwidth behaviors than the other trajectory planing approaches.
|
||||
|
||||
\subsection{Timing}
|
||||
|
||||
The FEL time is synchronized with the 50Hz of the SwissGrid network. \url{(https://www.swissgrid.ch/de/home/operation/regulation/frequency.html}). But this frequency is changing in a range of about
|
||||
$\pm0.1\%$. This variation if fatal for precise hitting of the target. Therefore the speed of motion must be adapted to match the SwissGrid frequency. This is done with a real time process at 10kHz on the DeltaTau that monitors the timing signal of the EVR. After each shot it guesses the time of next impact and the motion speed is adapted. With that we can achieve a timing jitter of around 0.2ms. If this is not enough it could be enhanced in future with hardware approaches (EVR on encoder entry).
|
||||
|
||||
|
||||
\FloatBarrier
|
||||
\section{HelicalScan coordinates}
|
||||
|
||||
For helical scan the motors cx, cz, rot and fy must be moved. As this coordinates are not simple to interpret at all, a new coordinate system is introduced. That coordinate system is the crystal based.\\
|
||||
it has components rotation fy, dz, dy. It is done in a way, that dx and dz is the deviation in x and z of the 'crystal axis'.
|
||||
For this coordinate system the forward and inverse kinematic has to be calculated.
|
||||
This is done in \verb|helicalscan.py| before the motion program is started.\\
|
||||
|
||||
To find the rotation center the Fourier transformation is used:\\
|
||||
x positions are measured at equidistant angles between 0\deg and 360\deg. The base frequency of the Fourier transformation will give the amplitude and the phase of crystal motion relative to the rotation center. This needs at leas 3 points e.g. 0\deg, 120\deg 240\deg.
|
||||
|
||||
As it is very inconvenient to align 6 points per crystal (bottom 3 points, top 3 points) a faster way was searched.
|
||||
|
||||
After a first precise alignment of a needle the precise position of the rotation center is known. This information never changes. The only thing that changes is the position of the crystal relative to that rotation center.\\
|
||||
With only one point (1 at bottom one at top) the crystam position can be caldulated using the x and z values.
|
||||
|
||||
With an additional point at an other angle (90\deg is the best) the crystal position can be enhanced.
|
||||
|
||||
With that approach crystal alignment is very fast and user friendly.
|
||||
|
||||
|
||||
\begin{figure}[h!]
|
||||
\includegraphics[scale=.4]{helicalscan1a.eps}
|
||||
\includegraphics[scale=.4]{helicalscan2a.eps}
|
||||
\includegraphics[scale=.4]{helicalscan3a.eps}
|
||||
\caption{coordinate transformation}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
\begin{verbatim}
|
||||
Add section shapepath:
|
||||
----------------------
|
||||
TODO:
|
||||
images of spiral motion: with pvt,pvt0,ift motion
|
||||
TODO:
|
||||
timing of motion
|
||||
\end{verbatim}
|
||||
\end{tcolorbox}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vspace{1pc}
|
||||
|
||||
\FloatBarrier
|
||||
\begin{appendix}
|
||||
@@ -991,6 +1008,12 @@ shot average error x 0.865708 um, y 0.965126 um, 1.49323 um
|
||||
\includegraphics[scale=.45]{../python/MXTuning/opt1/img/chirp_all_2b1.eps}
|
||||
|
||||
|
||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
\begin{verbatim}
|
||||
images of spiral motion: with pvt,pvt0,ift motion
|
||||
\end{verbatim}
|
||||
\end{tcolorbox}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1014,7 +1037,7 @@ shot average error x 0.865708 um, y 0.965126 um, 1.49323 um
|
||||
%\printbibliography
|
||||
\end{appendix}
|
||||
|
||||
\include{Scratch}
|
||||
%\include{Scratch}
|
||||
|
||||
\end{document}
|
||||
|
||||
|
||||
@@ -41,18 +41,6 @@ controlSystemDesigner('bode',1,mot1.tf_py); % <<<<<<<<< This opens a transfer
|
||||
\caption{Motor 1 sim Motor 2 sim}
|
||||
\end{figure}
|
||||
|
||||
\newpage
|
||||
\section{HelicalScan coordinates}
|
||||
|
||||
|
||||
\begin{figure}[h!]
|
||||
\includegraphics[scale=.4]{helicalscan1a.eps}
|
||||
\includegraphics[scale=.4]{helicalscan2a.eps}
|
||||
\includegraphics[scale=.4]{helicalscan3a.eps}
|
||||
\caption{coordinate transformation}
|
||||
\end{figure}
|
||||
|
||||
|
||||
%proces compiled as job \texttt{\jobname} from the file \texttt{\currfileabspath}\\
|
||||
%\eject
|
||||
%
|
||||
|
||||
Reference in New Issue
Block a user