wip
This commit is contained in:
@@ -194,12 +194,34 @@ $\rightarrow$ The closed loop response becomes bad above 20Hz (motor 1 ca. -10\%
|
||||
\FloatBarrier
|
||||
\subsubsection{Friction}
|
||||
|
||||
\begin{tcolorbox}[width=15cm,colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
Record the friction (=current) at a slow move from +lim to -lim.\\
|
||||
Analyse the friction depending on the positions and motion directions.\\
|
||||
Do the records and analysis at different speeds.
|
||||
\end{tcolorbox}
|
||||
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[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}
|
||||
@@ -311,8 +333,7 @@ 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.\\
|
||||
Therefore the only approach is to use the second order transfer function as approximated in section \ref{sec:measCurStep}.\\
|
||||
|
||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
A further test will be to 'remove' 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$.
|
||||
The resulting transfer function is:
|
||||
\[
|
||||
\frac{Ipf}
|
||||
@@ -323,8 +344,16 @@ The resulting transfer function is:
|
||||
{\frac{L}{R} s +1}\\
|
||||
\\
|
||||
\]
|
||||
This is a $PT_1$ element with a time constant of $\frac{L}{R}=\frac{2.4mH}{8.8\Omega}=0.27ms$. But probably due to additional cables etc. the resistance and therefore also the timeconstant is bigger.
|
||||
\end{tcolorbox}
|
||||
This is a $PT_1$ element with a time constant of $\frac{L}{R}=\frac{2.4mH}{8.8\Omega}=0.27ms$. Figures \ref{fig:curr_ol} shows a current step of 3000 \verb|curr_bit| resulting in a current of about 150 \verb|curr_bit|. The rise time matches roughly. So the cable resistance has not a major impact.
|
||||
|
||||
\begin{figure}[h!]
|
||||
\centering
|
||||
\includegraphics[scale=.25]{../python/MXTuning/19_01_29/img/curr_step_ol_10.eps}
|
||||
\includegraphics[scale=.25]{../python/MXTuning/19_01_29/img/curr_step_ol_20.eps}
|
||||
\caption{voltage step (current open loop)}
|
||||
\label{fig:curr_ol}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\subsection{Mechanical model}
|
||||
|
||||
@@ -610,8 +639,9 @@ 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});sim('observer');
|
||||
[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');
|
||||
@@ -629,10 +659,10 @@ end
|
||||
|
||||
\begin{figure}[h!]
|
||||
\center
|
||||
\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}
|
||||
\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}
|
||||
\caption{Observer sim: Motor 1 Motor 2}
|
||||
\label{fig:mot_observer_sim}
|
||||
\end{figure}
|
||||
@@ -673,11 +703,56 @@ Finally the real time servo code is compliled for the DeltaTau with:\\
|
||||
|
||||
\verb|/epics_ioc_modules/ESB_MX/python/usr_code$ make|\\
|
||||
|
||||
Following lines in gpasciiCommander will activate the user servo loop code:
|
||||
Following lines in gpasciiCommander will activate the user servo loop code.
|
||||
\vspace{1pc}
|
||||
|
||||
\begin{tcolorbox}[width=15cm,colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
Here the full process:
|
||||
|
||||
\begin{tcolorbox}[width=15cm,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!50,coltitle=black,title=MATLAB]
|
||||
\begin{verbatim}
|
||||
clear;clear global;close all;
|
||||
mot=identifyFxFyStage(7);
|
||||
sscType=0;
|
||||
for k =1:2
|
||||
[ssc]=StateSpaceControlDesign(mot{k},sscType);
|
||||
end
|
||||
\end{verbatim}
|
||||
\end{tcolorbox}
|
||||
|
||||
\begin{tcolorbox}[width=15cm,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!50,coltitle=black,title=Shell]
|
||||
\begin{verbatim}
|
||||
cd /home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python
|
||||
./MXTuning.py -m512
|
||||
|
||||
cd /home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python/usr_code
|
||||
make
|
||||
|
||||
cd /home/zamofing_t/Documents/prj/SwissFEL/PBTools/pbtools/usr_servo_phase
|
||||
scp userservo_util userphase_util usrServoSample/usralgo.ko root@SAR-CPPM-EXPMX1:/tmp
|
||||
|
||||
|
||||
\end{verbatim}
|
||||
\end{tcolorbox}
|
||||
|
||||
|
||||
\begin{tcolorbox}[width=15cm,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!50,coltitle=black,title=DeltaTau Shell]
|
||||
\begin{verbatim}
|
||||
root@:/opt/ppmac#
|
||||
LD_LIBRARY_PATH=/opt/ppmac/libppmac/ /tmp/userservo_util -d 1
|
||||
rmmod usralgo
|
||||
insmod /tmp/usralgo.ko
|
||||
LD_LIBRARY_PATH=/opt/ppmac/libppmac/ /tmp/userservo_util -l 1 usr_servo_ctrl_2
|
||||
LD_LIBRARY_PATH=/opt/ppmac/libppmac/ /tmp/userservo_util -e 1
|
||||
|
||||
gpascii:
|
||||
Motor[1].Ctrl =UserAlgo.ServoCtrlAddr[1]
|
||||
\end{verbatim}
|
||||
\end{tcolorbox}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vspace{1pc}
|
||||
|
||||
\begin{appendix}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
\newpage
|
||||
\section{SCRATCH}
|
||||
|
||||
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,colbacktitle=red!50,coltitle=black,title=TODO]
|
||||
Here is still work to do...
|
||||
\end{tcolorbox}
|
||||
|
||||
|
||||
\begin{verbatim}
|
||||
clear;
|
||||
clear global;
|
||||
|
||||
Reference in New Issue
Block a user