389 lines
12 KiB
TeX
389 lines
12 KiB
TeX
\documentclass[10pt,a4paper]{article}
|
||
\usepackage[margin=1.5cm]{geometry} %other geomentry
|
||
\setlength{\parindent}{0cm} %other indent of paragraphs
|
||
\usepackage[utf8]{inputenc}%needed for äöüàéè etc.
|
||
\usepackage[T1]{fontenc} %needed for äöüàéè etc. read http://de.wikipedia.org/wiki/LaTeX
|
||
\usepackage[bookmarks]{hyperref} %adds commands as \url for external links
|
||
\usepackage{fancyvrb} %Verbatim
|
||
\usepackage[abspath]{currfile} %%works only with PDFLaTeX-argument -recorder
|
||
\usepackage{fancyhdr} %define new headers and footers
|
||
\pagestyle{fancy}
|
||
\fancyhead{} % sets header to nothing (instead of chapter)
|
||
\renewcommand{\headrulewidth}{0pt}%remove header line
|
||
\fancyfoot[R]{\currfilename}
|
||
\input{|"/home/zamofing_t/Documents/doc-git/git2texInfo.sh"}%works only with PDFLaTeX-argument -shell-escape
|
||
\usepackage{graphicx}
|
||
\usepackage{hyperref}
|
||
\usepackage{amsmath}
|
||
\renewcommand{\deg}{$^\circ$}
|
||
|
||
\title{Tuning/modeling fast stages of ESB-MX}
|
||
\author{Thierry Zamofing}
|
||
\usepackage{datetime}
|
||
\date{\today, \currenttime\\
|
||
\texttt{git:\gitAbrHash, ver:\gitVerNo{ }\gitStatus}}
|
||
|
||
\begin{document}
|
||
\maketitle
|
||
\tableofcontents
|
||
\section{Introduction}
|
||
This document describes the tuning and modeling process of the ESB-MX fast stages.
|
||
|
||
\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:\\
|
||
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 64|\\
|
||
The used frequencies are: 20 kHz Phase, 5 kHz Servo, 6.25MHz AdcAmp. This results in 50us PhaseTime and 0.2ms ServoTime.\\
|
||
|
||
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.\\
|
||
This is set in the gpasciiCommander templates:
|
||
\begin{verbatim}
|
||
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
|
||
\end{verbatim}
|
||
Nerverless the documentation is confusing. Therefore PwmSf will measure to convert idCmd bits values to idVolts bits at a DC value.
|
||
|
||
In steady state an idMeas=... results in idVolts=...
|
||
(TO BE DONE)\\
|
||
|
||
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 set 0.92Amp DC and 2.8Amp DC.
|
||
|
||
\subsection{Measure Current Step}
|
||
\verb|MXTuning.py –mode 1| $\rightarrow$ \verb|identifyFxFyStage.m|\\
|
||
|
||
\includegraphics[scale=.5]{../../matlab/figures/currstep_1.eps}
|
||
\includegraphics[scale=.5]{/home/zamofing_t/Documents/doc-ext/DeltaTau/UsrMan257.png}
|
||
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)$\\
|
||
rise time $(0\rightarrow 100\%)$ ca. 0.4ms\\
|
||
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))|\\
|
||
The loop parameters are:\\
|
||
IiGain=5, IpfGain=8, IpbGain=8
|
||
|
||
|
||
\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 images have been generated with
|
||
\verb|./MXTuning.py --dir MXTuning/19_01_29 --mode 32|.\\
|
||
|
||
\begin{figure}[h]
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/bode_model_plot0.eps}
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/bode_model_plot2.eps}
|
||
\caption{open loop of motor 1 and 2}
|
||
\end{figure}
|
||
|
||
|
||
\emph{Motor 1 (fy) has a better response, as expected because it has less mass to move.}\\
|
||
|
||
\hbox{
|
||
\parbox[t]{5cm}{
|
||
Motor 1:\\
|
||
0dB at 20.28Hz\\
|
||
10 Hz: 9.63 dB -134\deg \\
|
||
100Hz: -28.5dB -191.7\deg\\
|
||
resonances 198 Hz \\
|
||
}
|
||
|
||
\parbox[t]{6cm}{
|
||
Motor 2\\
|
||
0dB at 12.39Hz\\
|
||
10 Hz: 4.68 dB -162\deg\\
|
||
100 Hz: -38.15 dB -187.5\deg\\
|
||
resonances 60Hz,142Hz,414Hz,231Hz\\
|
||
}
|
||
}
|
||
|
||
\subsection{Closed Loop}
|
||
\subsubsection{Deltatau schematics}
|
||
|
||
\includegraphics[scale=.7]{../../../../../../doc-ext/DeltaTau/UsrMan290.png}
|
||
|
||
\includegraphics[scale=.2]{../../../../../../doc-ext/DeltaTau/ServoBlockDiag.png}
|
||
\\
|
||
|
||
Closed loops have been measured with the following control loop settings.
|
||
\begin{verbatim}
|
||
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)
|
||
\end{verbatim}
|
||
|
||
|
||
|
||
\subsubsection{chirp sine closed loop}
|
||
|
||
|
||
Chirp plot with input(blue) and output(green) and its bode plots.
|
||
The parameters for that sweep is:\\
|
||
\verb| amp: 5, minFrq: 10, maxFrq: 220, ts: 0.0002, tSec: 20|
|
||
|
||
|
||
|
||
\begin{figure}[h!]
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_1b0.eps}
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_1b1.eps}
|
||
\caption{DesPos->ActPos of motor 1}
|
||
\end{figure}
|
||
|
||
\begin{figure}[h!]
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_2b0.eps}
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_2b1.eps}
|
||
\caption{DesPos->ActPos of motor 2}
|
||
\end{figure}
|
||
|
||
|
||
\begin{figure}[h!]
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_1b2.eps}
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_1b3.eps}
|
||
\caption{DesPos->IqCmd of motor 1}
|
||
\end{figure}
|
||
|
||
\begin{figure}[h!]
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_2b2.eps}
|
||
\includegraphics[scale=.45]{../MXTuning/19_01_29/img/chirp_all_2b3.eps}
|
||
\caption{DesPos->IqCmd of motor 2}
|
||
\end{figure}
|
||
|
||
|
||
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$ The response becomes bad above 15Hz (about 3dB)\\
|
||
$\rightarrow$ Moving 1um at 1kHz seems to consume a current of about 2 amps.\\
|
||
|
||
|
||
%→n times higher mass → n times lower frequency for same amplitude response
|
||
%→n times higher frequency → n times higher velocity → n² times more acceleration==current
|
||
%1um at 12Hz with 1 mA →with 2000mA → sqrt(2000)*12Hz=540Hz
|
||
%
|
||
%A very simplified transfer function of the system is G(s)=k/s²
|
||
\newpage
|
||
\section{Modeling the system}
|
||
\subsection{Electrical model}
|
||
\begin{figure}[h!]
|
||
\centering
|
||
\includegraphics[scale=.45]{model1.eps}
|
||
\includegraphics[scale=.6]{model2.eps}
|
||
\caption{electrical model}
|
||
\end{figure}
|
||
|
||
Basic formulas: $U=R \cdot I$ \hspace{.5cm}
|
||
$U=L \cdot \frac{di}{dt}$\\
|
||
|
||
Solving in Laplace space:\\
|
||
$iqVolts=(R+Ls)\cdot iqMeas$\\
|
||
$s \cdot iqMeas =\frac{1}{L}iqVolts - \frac{R}{L}iqMeas$\\
|
||
|
||
Transferfunction open loop of $G_1(s)=iqVolts \rightarrow iqCmd$
|
||
\\
|
||
using Masons rule:
|
||
\url{https://en.wikipedia.org/wiki/Mason's_gain_formula}:
|
||
|
||
\[
|
||
G_1(s)=\frac{y_{out}}{y_{in}}=\frac{iqCmd}{iqVolts}=
|
||
\frac{\frac{1}{Ls}}{1+ \frac{R}{Ls}} = \frac{1}{Ls+R} = \frac{k}{1+Ts} = \frac{\frac{1}{R}}{1+\frac{L}{R}s}
|
||
\]
|
||
|
||
\vspace{1pc}
|
||
|
||
Transferfunction closed loop of $G_2(s)=iqCmd \rightarrow iqMeas$:
|
||
\[
|
||
\begin{aligned}
|
||
&\text{with}\quad
|
||
a=Ipf+\frac{Li}{s} \quad
|
||
b=PwmSF \cdot G(s) \quad
|
||
c=Ipb \quad
|
||
d=1\\
|
||
&\text{using Masons rule:} \quad G_2(s)=\frac{ab}{1+bc+abd}\\
|
||
\\
|
||
&\text{extending:} \quad =\frac{(Ipf+\frac{Ii}{s}) \cdot PwmSF \cdot G_1(s)}
|
||
{1+PwmSF \cdot G_1(s) \cdot Ipb +(Ipf+\frac{Ii}{s})
|
||
\cdot PwmSF \cdot G_1(s)}\\
|
||
\\
|
||
&=\left.\frac{(Ipf+\frac{Ii}{s}) \cdot PwmSF \cdot \frac{1}{Ls+R}}
|
||
{1+PwmSF \cdot \frac{1}{Ls+R} \cdot Ipb +(Ipf+\frac{Ii}{s}) \cdot PwmSF \cdot \frac{1}{Ls+R}} \right| \cdot (Ls+R) \cdot s\\
|
||
\\
|
||
&=\frac{(Ipf \cdot s+Ii) \cdot PwmSF }
|
||
{(Ls+R)s+PwmSF \cdot Ipb \cdot s +(Ipf \cdot s+Ii) \cdot PwmSF }\\
|
||
\\
|
||
&=\frac{Ipf \cdot s+Ii }
|
||
{\frac{L}{PwmSF}s^2 +(\frac{R}{PwmSF}+ Ipb+Ipf)s +Ii}\\
|
||
\\
|
||
\end{aligned}
|
||
\]
|
||
|
||
|
||
\subsection{Mechanical model}
|
||
|
||
\begin{figure}[h!]
|
||
\centering
|
||
\includegraphics[scale=.45]{model3.eps}
|
||
\caption{mechanical model}
|
||
\end{figure}
|
||
|
||
Input: Force $u(t)=F$\\
|
||
Output: Position $y(t)=x_1(t)$\\
|
||
mass $m=m_1+m_2+\ldots+m_n$\\
|
||
damping: $d=d_1+d_2+\ldots+d_n$\\
|
||
springs: $k=k_1+k_2+\ldots+k_n$\\
|
||
|
||
\eqref{mech1} shows the mechanical differential equations:
|
||
|
||
\begin{equation}
|
||
\begin{aligned}
|
||
m_1\ddot{x}_1 = & u(t) -k_1x_1-d_1\dot{x}_1\\
|
||
& + k_2(x_2-x_1)+d_2(\dot{x}_2-\dot{x}_1)
|
||
+ k_3(x_3-x_1)+d_3(\dot{x}_3-\dot{x}_1)
|
||
+ k_4(x_4-x_1)+d_4(\dot{x}_4-\dot{x}_1)\\
|
||
m_2\ddot{x}_2= & k_2(x_2-x_1)+d_2(\dot{x}_2-\dot{x}_1)\\
|
||
m_3\ddot{x}_3= & k_3(x_3-x_1)+d_3(\dot{x}_3-\dot{x}_1)\\
|
||
m_4\ddot{x}_4= & k_4(x_4-x_1)+d_4(\dot{x}_4-\dot{x}_1)\\
|
||
\end{aligned}\label{mech1}
|
||
\end{equation}
|
||
|
||
\begin{equation}
|
||
\begin{aligned}
|
||
\dot{x} = Ax + Bu\\
|
||
y = Cx + Du
|
||
\end{aligned}\label{mech2}
|
||
\end{equation}
|
||
|
||
\eqref{mech2} are the general input output equations in matrix form with x and A defines as \eqref{mech3}:
|
||
|
||
\begin{equation}
|
||
x=
|
||
\begin{bmatrix}
|
||
x_1\\
|
||
\dot{x}_1\\
|
||
x_2\\
|
||
\dot{x}_2\\
|
||
x_3\\
|
||
\dot{x}_3\\
|
||
x_4\\
|
||
\dot{x}_4\\
|
||
\end{bmatrix},\quad
|
||
\dot{x}=
|
||
\begin{bmatrix}
|
||
\dot{x}_1\\
|
||
\ddot{x}_1\\
|
||
\dot{x}_2\\
|
||
\ddot{x}_2\\
|
||
\dot{x}_3\\
|
||
\ddot{x}_3\\
|
||
\dot{x}_4\\
|
||
\ddot{x}_4\\
|
||
\end{bmatrix},\quad
|
||
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}\\
|
||
|
||
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
|
||
-\frac{k_1}{m_2} & -\frac{d_1}{m_2} & \frac{k_2}{m_2} & \frac{d_2}{m_2} & 0 & 0 & 0 & 0 \\
|
||
|
||
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\
|
||
-\frac{k_1}{m_3} & -\frac{d_1}{m_3} & 0 & 0 & \frac{k_3}{m_1} & \frac{d_3}{m_3} & 0 & 0 \\
|
||
|
||
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\
|
||
-\frac{k_1}{m_4} & -\frac{d_1}{m_4} & 0 & 0 & 0 & 0 & \frac{k_4}{m_1} & \frac{d_4}{m_4} \\
|
||
\end{bmatrix},\quad
|
||
B=\begin{bmatrix}
|
||
\frac{1}{m_1} \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0\\
|
||
\end{bmatrix}
|
||
%,\quad
|
||
%C=\begin{bmatrix}
|
||
%\1 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0\\
|
||
%\end{bmatrix},\quad
|
||
%D=0
|
||
\label{mech2}
|
||
\end{equation}
|
||
|
||
\subsection{Stage data}
|
||
|
||
This data comes from datasheets and construction information [biblio: 'Dynamics of Parker Stage', Wayne Glettig 5.12.2018].
|
||
|
||
\begin{tabular}{|r|l|}
|
||
\hline
|
||
Stage Y mass& 340g \\
|
||
Stage X mass& 950g \\
|
||
Interferometer mirrors & 51g (additional)\\
|
||
Aluminun (instead ABS) & 42g (additional)\\
|
||
\hline
|
||
\end{tabular}
|
||
|
||
\vspace{1pc}
|
||
|
||
\begin{tabular}{|r|c|l|}
|
||
\hline
|
||
Continous force && 5.51N \\
|
||
Peak force && 12N \\
|
||
Static friction && 1N\\
|
||
Viscose damping && 0.5N$\cdot$s/m\\
|
||
Motor constant &Km& 1.46N/$\sqrt{watt}$\\
|
||
Resistance &R&8.8$\Omega$\\
|
||
Inductance &L& 2.4mH\\
|
||
\hline
|
||
\end{tabular}
|
||
|
||
\vspace{1pc}
|
||
|
||
The data in the data sheet are quite confusing. But lets check the motor Konstant Km.\\
|
||
The data sheet says:\\
|
||
Stall Current Continous 0.92A, 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$
|
||
|
||
\section{Simulink/MATLAB simulations}
|
||
|
||
|
||
TODO: describe the identification process to get a model out of the bode plots. identifyFxFyStage.m\\
|
||
|
||
Simulink simulation \verb|stage_closed_loop.slx| with \verb|ServoDeltaTau_z G(z)| showed similar response
|
||
Therefore the model seems good enough
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
\newpage
|
||
\section{HelicalScan coordinates}
|
||
|
||
|
||
\begin{figure}[h!]
|
||
\includegraphics[scale=.4]{../helicalscanDoc/helicalscan1a.eps}
|
||
\includegraphics[scale=.4]{../helicalscanDoc/helicalscan2a.eps}
|
||
\includegraphics[scale=.4]{../helicalscanDoc/helicalscan3a.eps}
|
||
\caption{coordinate transformation}
|
||
\end{figure}
|
||
|
||
|
||
%proces compiled as job \texttt{\jobname} from the file \texttt{\currfileabspath}\\
|
||
%\eject
|
||
%
|
||
%hyperref package sample
|
||
%\url{http://stackoverflow.com/questions/9845292/converting-matlab-to-python}\\
|
||
%
|
||
%fancyvrb package sample
|
||
%\begin{Verbatim}[frame=single]
|
||
%Verbatim Verbatim Verbatim
|
||
%Verbatim
|
||
% Verbatim
|
||
%\end{Verbatim}
|
||
\newpage
|
||
\bibliographystyle{alpha}
|
||
\bibliography{myBib}
|
||
%\printbibliography
|
||
\end{document}
|
||
|