#LyX 1.6.4 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass scrartcl
\begin_preamble
\newcommand\blabl{}
\end_preamble
\use_default_options false
\begin_modules
theorems-ams
theorems-ams-extended
\end_modules
\language english
\inputencoding auto
\font_roman lmodern
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Standard
\begin_inset FormulaMacro
\newcommand{\isa}[1]{i_{\alpha#1}}
{i_{\alpha#1}}
\end_inset


\begin_inset FormulaMacro
\newcommand{\isb}[1]{i_{\beta#1}}
{i_{\beta#1}}
\end_inset


\begin_inset FormulaMacro
\newcommand{\Dt}{\Delta t}
{\Delta t}
\end_inset


\begin_inset FormulaMacro
\newcommand{\om}{\omega}
{\omega}
\end_inset


\begin_inset FormulaMacro
\newcommand{\th}{\vartheta}
{\vartheta}
\end_inset


\begin_inset FormulaMacro
\newcommand{\usa}[1]{u_{\alpha#1}}
{u_{\alpha#1}}
\end_inset


\begin_inset FormulaMacro
\newcommand{\usb}[1]{u_{\beta#1}}
{u_{\beta#1}}
\end_inset


\end_layout

\begin_layout Title
PMSM system description
\end_layout

\begin_layout Section
Model of PMSM Drive 
\end_layout

\begin_layout Standard
Permanent magnet synchronous machine (PMSM) drive with surface magnets on
 the rotor is described by conventional equations of PMSM in the stationary
 reference frame:
\begin_inset Formula \begin{align}
\frac{d\isa{}}{dt} & =-\frac{R_{s}}{L_{s}}\isa{}+\frac{\Psi_{PM}}{L_{s}}\omega_{me}\sin\th+\frac{\usa{}}{L_{s}},\nonumber \\
\frac{d\isb{}}{dt} & =-\frac{R_{s}}{L_{s}}\isb{}-\frac{\Psi_{PM}}{L_{s}}\omega_{me}\cos\th+\frac{\usb{}}{L_{s}},\label{eq:simulator}\\
\frac{d\om}{dt} & =\frac{k_{p}p_{p}^{2}\Psi_{pm}}{J}\left(\isb{}\cos(\th)-\isa{}\sin(\th)\right)-\frac{B}{J}\om-\frac{p_{p}}{J}T_{L},\nonumber \\
\frac{d\th}{dt} & =\omega_{me}.\nonumber \end{align}

\end_inset

Here, 
\begin_inset Formula $\isa{}$
\end_inset

, 
\begin_inset Formula $\isb{}$
\end_inset

, 
\begin_inset Formula $\usa{}$
\end_inset

 and 
\begin_inset Formula $\usb{}$
\end_inset

 represent stator current and voltage in the stationary reference frame,
 respectively; 
\begin_inset Formula $\om$
\end_inset

 is electrical rotor speed and 
\begin_inset Formula $\th$
\end_inset

 is electrical rotor position.
 
\begin_inset Formula $R_{s}$
\end_inset

 and 
\begin_inset Formula $L_{s}$
\end_inset

 is stator resistance and inductance respectively, 
\begin_inset Formula $\Psi_{pm}$
\end_inset

 is the flux of permanent magnets on the rotor, 
\begin_inset Formula $B$
\end_inset

 is friction and 
\begin_inset Formula $T_{L}$
\end_inset

 is load torque, 
\begin_inset Formula $J$
\end_inset

 is moment of inertia, 
\begin_inset Formula $p_{p}$
\end_inset

 is the number of pole pairs, 
\begin_inset Formula $k_{p}$
\end_inset

 is the Park constant.
\end_layout

\begin_layout Standard
The sensor-less control scenario arise when sensors of the speed and position
 (
\begin_inset Formula $\om$
\end_inset

 and 
\begin_inset Formula $\th$
\end_inset

) are missing (from various reasons).
 Then, the only observed variables are:
\begin_inset Formula \begin{equation}
y_{t}=\left[\begin{array}{c}
\isa{}(t),\isb{}(t),\usa{}(t),\usb{}(t)\end{array}\right].\label{eq:obs}\end{equation}

\end_inset

Which are, however, observed only up to some precision.
\end_layout

\begin_layout Standard
Discretization of the model (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:simulator"

\end_inset

) was performed using Euler method with the following result:
\begin_inset Formula \begin{align*}
\isa{,t+1} & =(1-\frac{R_{s}}{L_{s}}\Dt)\isa{,t}+\frac{\Psi_{pm}}{L_{s}}\Dt\omega_{t}\sin\vartheta_{e,t}+\usa{,t}\frac{\Dt}{L_{s}},\\
\isb{,t+1} & =(1-\frac{R_{s}}{L_{s}}\Dt)\isb{,t}-\frac{\Psi_{pm}}{L_{s}}\Dt\omega_{t}\cos\vartheta_{t}+\usb{,t}\frac{\Dt}{L_{s}},\\
\om_{t+1} & =(1--\frac{B}{J}\Dt)\om_{t}+\Dt\frac{k_{p}p_{p}^{2}\Psi_{pm}}{J}\left(\isb{,t}\cos(\th_{t})-\isa{,t}\sin(\th_{t})\right)-\frac{p_{p}}{J}T_{L}\Dt,\\
\vartheta_{t+1} & =\vartheta_{t}+\omega_{t}\Dt.\end{align*}

\end_inset

In this work, we consider parameters of the model known, we can make the
 following substitutions to simplify notation, 
\begin_inset Formula $a=1-\frac{R_{s}}{L_{s}}\Dt$
\end_inset

, 
\begin_inset Formula $b=\frac{\Psi_{pm}}{L_{s}}\Dt$
\end_inset

, 
\begin_inset Formula $c=\frac{\Dt}{L_{s}}$
\end_inset

, 
\begin_inset Formula $d=1-\frac{B}{J}\Dt$
\end_inset

, 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none

\begin_inset Formula $e=\Dt\frac{k_{p}p_{p}^{2}\Psi_{pm}}{J}$
\end_inset

, which results in a simplified model:
\family default
\series default
\shape default
\size default
\emph default
\bar default
\noun default
\color inherit
 
\begin_inset Formula \begin{align}
\isa{,t+1} & =a\,\isa{,t}+b\omega_{t}\sin\vartheta_{t}+c\usa{,t},\nonumber \\
\isb{,t+1} & =a\,\isb{,t}-b\omega_{t}\cos\vartheta_{t}+c\usb{,t},\label{eq:model-simple}\\
\om_{t+1} & =d\om_{t}+e\left(\isb{,t}\cos(\th_{t})-\isa{,t}\sin(\th_{t})\right),\nonumber \\
\vartheta_{t+1} & =\vartheta_{t}+\omega_{t}\Dt.\nonumber \end{align}

\end_inset


\end_layout

\begin_layout Standard
The above equations can be aggregated into state 
\begin_inset Formula $x_{t}=[\isa{,t},\isb{,t},\om_{t},\th_{t}]$
\end_inset

 will be denoted as 
\begin_inset Formula $x_{t+1}=g(x_{t},u_{t})$
\end_inset

.
\end_layout

\begin_layout Subsection
Gaussian model of disturbances
\end_layout

\begin_layout Standard
This model is motivated by the well known Kalman filter, which is optimal
 for linear system with Gaussian noise.
 Hence, we model all disturbances to have covariance matrices 
\begin_inset Formula $Q_{t}$
\end_inset

 and 
\begin_inset Formula $R_{t}$
\end_inset

 for the state 
\begin_inset Formula $x_{t}$
\end_inset

 and observations 
\begin_inset Formula $y_{t}$
\end_inset

 respectively.
\begin_inset Formula \begin{align*}
x_{t+1} & \sim\mathcal{N}(g(x_{t}),Q_{t})\\
y_{t} & \sim\mathcal{N}([\isa{,t},\isb{,t}]',R_{t})\end{align*}

\end_inset


\end_layout

\begin_layout Standard
Under this assumptions, Bayesian estimation of the state, 
\begin_inset Formula $x_{t}$
\end_inset

, can be approximated by so called Extended Kalman filter which approximates
 posterior density of the state by a Gaussian 
\begin_inset Formula \[
f(x_{t}|y_{1}\ldots y_{t})=\mathcal{N}(\hat{x}_{t},P_{t}).\]

\end_inset

Its sufficient statistics 
\begin_inset Formula $S_{t}=\left[\hat{x}_{t},P_{t}\right]$
\end_inset

 is evaluated recursively as follows:
\begin_inset Formula \begin{eqnarray}
\hat{x}_{t} & = & g(\hat{x}_{t-1})-K\left(y_{t}-h(\hat{x}_{t-1})\right).\label{eq:ekf_mean}\\
R_{y} & = & C'P_{t-1}C+R_{t},\nonumber \\
K & = & P_{t-1}CR_{y}^{-1}(y_{t}-h(\hat{x}_{t-1})),\nonumber \\
P_{t} & = & A\left(P_{t-1}-P_{t-1}C'R_{y}^{-1}CP_{t-1}\right)A+Q_{t}.\label{eq:ekf_cov}\end{eqnarray}

\end_inset

where 
\begin_inset Formula $A=\frac{d}{dx_{t}}g(x_{t})$
\end_inset

, 
\begin_inset Formula $C=\frac{d}{dx_{t}}h(x_{t})$
\end_inset

, 
\begin_inset Formula $g(x_{t})$
\end_inset

 is model (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:model-simple"

\end_inset

) and 
\begin_inset Formula $h(x_{t})$
\end_inset

 direct observation of 
\begin_inset Formula $y_{t}=[\isa{,t},\isb{,t}]$
\end_inset

, i.e.
\begin_inset Formula \[
A=\left[\begin{array}{cccc}
a & 0 & b\sin\th & b\om\cos\th\\
0 & a & -b\cos\th & b\om\sin\th\\
-e\sin\th & e\cos\th & d & -e(\isb{}\sin\th+\isa{}\cos\th)\\
0 & 0 & \Dt & 1\end{array}\right],\quad C=\left[\begin{array}{cccc}
1\\
 & 1\\
 &  & 0\\
 &  &  & 0\end{array}\right]\]

\end_inset


\end_layout

\begin_layout Standard
Covariance matrices of the system 
\begin_inset Formula $Q$
\end_inset

 and 
\begin_inset Formula $R$
\end_inset

 are supposed to be known.
\end_layout

\begin_layout Subsection
Test system
\end_layout

\begin_layout Standard
A real PMSM system on which the algorithms will be tested has parameters:
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
R_{s} & = & 0.28;\\
L_{s} & = & 0.003465;\\
\Psi_{pm} & = & 0.1989;\\
k_{p} & = & 1.5\\
p & = & 4.0;\\
J & = & 0.04;\\
\Delta t & = & 0.000125\end{eqnarray*}

\end_inset

which yields
\begin_inset Formula \begin{eqnarray*}
a & = & 0.9898\\
b & = & 0.0072\\
c & = & 0.0361\\
d & = & 1\\
e & = & 0.0149\end{eqnarray*}

\end_inset

The covaraince matrices 
\begin_inset Formula $Q$
\end_inset

 and 
\begin_inset Formula $R$
\end_inset

 are assumed to be known.
 For the initial tests, we can use the following values:
\end_layout

\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
Q & = & \mathrm{diag}(0.0013,0.0013,5e-6,1e-10),\\
R & = & \mathrm{diag}(0.0006,0.0006).\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Section
Control
\end_layout

\begin_layout Standard
The task is to reach predefined speed 
\begin_inset Formula $\overline{\omega}_{t}$
\end_inset

.
\end_layout

\begin_layout Standard
For simplicity, we will assume additive loss function:
\begin_inset Formula \[
l(x_{t},u_{t})=(\omega_{t}-\overline{\omega}_{t})^{2}+\psi(\usa{,t}^{2}+\usb{,t}^{2}).\]

\end_inset

Here, 
\begin_inset Formula $\psi$
\end_inset

 is the chosen penalization of the inputs.
 
\end_layout

\begin_layout Standard
Following the standard dynamic programming approach, optimization of the
 loss function can be done recursively, as follows:
\begin_inset Formula \[
V(x_{t-1},u_{t-1})=\arg\min_{u_{t}}\mathsf{E}_{f(x_{t},y_{t}|x_{t-1})}\left\{ l(x_{t},u_{t})+V(x_{t},u_{t})\right\} ,\]

\end_inset

where 
\begin_inset Formula $V(x_{t},u_{t})$
\end_inset

 is the Bellman function.
 Since the model evolution is stochastic, we can reformulate it in terms
 of sufficient statistics, 
\begin_inset Formula $S$
\end_inset

 as follows:
\begin_inset Formula \[
V(S_{t-1})=\min_{u_{t}}\mathsf{E}_{f(x_{t},y_{t}|x_{t-1})}\left\{ l(x_{t},u_{t})+V(S_{t})\right\} .\]

\end_inset


\end_layout

\begin_layout Standard
Representation of the Bellman function depends on chosen approximation.
\end_layout

\begin_layout Subsection
Test Scenarios
\end_layout

\begin_layout Standard
With almost full information, design of the control strategy should be almost
 trivial:
\begin_inset Formula \begin{eqnarray*}
\hat{\isa{}} & = & 0,\,\hat{\isb{}}=0,\hat{\omega}=1,\th=\frac{\pi}{2},\\
P_{t} & = & \mathrm{diag}([0.01,0.01,0.01,0.01]).\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Standard
The difficulty arise when growing covariance matrix:
\begin_inset Formula \begin{eqnarray*}
\hat{\isa{}} & = & 0,\,\hat{\isb{}}=0,\hat{\omega}=1,\th=\frac{\pi}{2},\\
P_{t} & = & \mathrm{diag}([0.01,0.01,1,1]).\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Standard
Or even worse:
\begin_inset Formula \begin{eqnarray*}
\hat{\isa{}} & = & 0,\,\hat{\isb{}}=0,\hat{\omega}=1,\th=\frac{\pi}{2},\\
P_{t} & = & \mathrm{diag}([0.01,0.01,1,10]).\end{eqnarray*}

\end_inset


\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "bibtex/vs,bibtex/vs-world,bibtex/world_classics,bibtex/world,new_bib_PS"
options "plain"

\end_inset


\end_layout

\end_body
\end_document
