\documentclass[12pt]{article}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage[hypertex]{hyperref}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{mathrsfs}
\usepackage{cases}
\usepackage{array}
\renewcommand{\baselinestretch}{1.273}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{0in}
\setlength{\textheight}{8.5in}
%\input setbmp
%\input{psfig.sty}
\usepackage{epsfig}
\newtheorem{defn}{Definition}
\newtheorem{thm}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}
\newtheorem{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{algorithm}{Algorithm}
\newtheorem{exercise}{Exercise}
%\usepackage[centertags]{amsmath}
\newcommand{\markex}{\nopagebreak\begin{center}\rule{5in}{.01in}\end{center}}
\newcommand{\markdefn}{\nopagebreak\hfill$\Diamond$}
\newcommand{\mb}{\mbox}
\newcommand{\bm}{\boldmath}
\def\b#1{\mb{\bm$#1$}}
\newfont{\Bb}{msbm10 scaled\magstep1}
\newfont{\Fr}{eufm10 scaled\magstep1}
\newfont{\Sc}{eusm10 scaled\magstep1}
%\pagestyle{empty}
\begin{document}
\noindent{\large ECE 602}\hfill{\Large Fall 2010}
\begin{center}
{\Large \bf Observers for LTI Systems}\\
by\\
{\large Stanislaw H. \.{Z}ak}
\end{center}
\begin{center}
November 8, 2010
\end{center}
\medskip
%\bigskip
%\begin{flushright}
%\parbox{5in}{In bear country, wear bells to avoid surprising bruins. Don't approach a bear, but don't run away from one either. Movement may incite a charge, and a bear can outrun you.
%
%If a bear approaches you, talk to it calmly in a low, firm voice. Slowly back away until the bear is out of sight. If you climb a tree, get at least 12 feet up.
%
%If a bear senses that its food may be stolen or that its cub is in danger, it may charge. If this happens, drop to the ground and assume a fetal position, protecting your head with your arms, and play dead. Keep your pack on; it may serve as armor.~\cite[pages~18--19]{rd91}}
%\end{flushright}

\bigskip


We now know how to construct a linear state-feedback control law. To implement such a control law, one needs availability of all the state variables. Often, this requirement is not met, either because measuring of all the state variables would require excessive number of sensors, or because the state variables are not accessible for direct measurement. Instead, only a subset of state variables or their combination may be available. To implement the control law constructed in the previous section, we will use estimates of state variables rather than the true states. We now discuss the problem of constructing state estimators. Much of the literature refers to state estimators as ``observers.'' However, Franklin and Powell~\cite[page 139]{franklin80} remark that estimator is more descriptive in its function because observer implies a direct measurement. We use the term observers to emphasize a deterministic approach to state estimation. The term estimator will be used when state estimation involves non-deterministic methods.

\section{Observer Construction}
We now discuss the problem of constructing an observer for dynamic systems modeled by
\[
\left.\begin{array}{lll}
\dot{\b x}(t) &=& \b A\b x(t)+\b B\b u(t)\\
\b y(t) &=& \b C\b x(t),
\end{array}\right\}
\]
where $\b C \in \mb{\Bb R}^{p \times n}$, $p \le n$. We assume that the pair $(\b A, \b C)$ is observable. Our goal is to construct a dynamic system that will estimate the state vector $\b x$ based on the plant input $\b u$ and the plant output $\b y$. One could consider constructing a model of the plant dynamics and connecting the resulting dynamic system, referred to as an {\em open-loop observer\/}, as in Figure~\ref{fig:op_esti}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{op_esti.eps}
%\vskip3in
%\centerbmp{3.33in}{2.5in}{c:/mybook/op_esti.bmp}
%\hskip1in\special{bmp:c:/mybook/op_esti.bmp x=4in y=3in}
\caption{Open-loop observer.}
\label{fig:op_esti}
\end{figure}
This open-loop observer is described by
\[
\dot{\tilde{\b x}}(t)=\b A \tilde{\b x}(t)+\b B\b u(t),
\]
where $\tilde{\b x}(t)$ is the estimate of $\b x(t)$. Let
\[
\b e(t)=\b x(t) - \tilde{\b x}(t)
\]
be the observation error. Then, the dynamics of the observation error are described by
\[
\dot{\b e}(t) = \dot{\b x}(t) - \dot{\tilde{\b x}}(t)= \b A \b e(t),
\]
with the initial estimation error
\[
\b e(0)=\b x(0) - \tilde{\b x}(0).
\]
If the eigenvalues of the matrix $\b A$ are in the open left-hand plane, then the error converges to zero. However, we have no control over the convergence rate. Furthermore, the matrix $\b A$ does not have to have all its eigenvalues in the open left-hand plane. Thus, the open-loop observer is impractical. We modify this observer by adding a feedback term to it. The resulting structure, depicted in Figure~\ref{fig:cl_esti}, is called the {\em closed-loop observer\/}, or the {\em Luenberger observer\/}, or the asymptotic full-order estimator.
\begin{figure}
\centering
\includegraphics[scale=0.5]{cl_esti.eps}
%\vskip3in
%\centerbmp{3.33in}{2.5in}{c:/mybook/cl_esti.bmp}
%\hskip1in\special{bmp:c:/mybook/cl_esti.bmp x=4in y=3in}
\caption{Closed-loop observer.}
\label{fig:cl_esti}
\end{figure}
The dynamics of the closed-loop observer are described by
\[
\dot{\tilde{\b x}}(t)=\b A \tilde{\b x}(t)+\b B\b u(t)+\b L\left(\b y(t)-\b C\tilde{\b x}(t)\right),
\]
and the dynamics of the estimation error are governed by
\begin{eqnarray*}
\dot{\b e}(t)&=& \dot{\b x}(t) - \dot{\tilde{\b x}}(t)\\
&=&\left( \b A-\b L\b C\right)\b e(t),\quad \b e(0)=\b x(0) - \tilde{\b x}(0).
\end{eqnarray*}
The pair $(\b A,\b C)$ is observable, if and only if the dual pair $(\b A^{\top}, \b C^{\top})$ is reachable. By assumption, the pair $(\b A, \b C)$ is observable, and therefore the pair $(\b A^{\top},\b C^{\top})$ is reachable. Therefore, we can solve the pole placement problem for the dual pair $(\b A^{\top},\b C^{\top})$, that is, for any set of prespecified $n$ complex numbers, symmetric with respect to the real axis, there is a matrix, call it $\b L^{\top}$, such that the eigenvalues of $\b A^{\top}-\b C^{\top}\b L^{\top}$ and hence of $\b A-\b L\b C$ are in the prespecified locations. It follows from the above that if the pair $(\b A,\b C)$ is observable, then in addition to forcing theobservation error to converge to zero, we can also control its rate of convergence by appropriately selecting the eigenvalues of the matrix $\b A-\b L\b C$. We also note that the selection of the closed-loop observer gain matrix $\b L$ can be approached in exactly the same fashion as the construction of the gain matrix $\b K$ in the linear state-feedback control law design. We illustrate the above point with a numerical example.
\begin{example}\rm
For the given observable pair
\[
\b A=\left[\begin{array}{cccc}
0 & 0 & 1 & 0\\
1 & 0 & 2 & 0\\
0 & 1 & 3 & 0\\
0 & 0 & -21 & 5
\end{array}\right],\quad \b C=\left[\begin{array}{cccc}
1 & 0 & 0 & 0\\
0 & 0 & 0 & 1
\end{array}\right],
\]
construct the matrix $\b L\in \mb{\Bb R}^{4\times 2}$ so that the eigenvalues of $\b A-\b L\b C$ are located at
\[
\{-2,-3+j,-3-j,-4\}.
\]
In our construction of the gain matrix $\b L$ we use the observer companion form of the pair $(\b A, \b C)$. Our goal then is to construct a matrix $\b L$ so that the characteristic polynomial of the matrix $\b A-\b L\b C$ is
\[
\det(s\b I_4-\b A+\b L\b C)=s^4+12s^3+54s^2+108s+80.
\]
Using the observer form of the pair $(\b A,\b C)$, we select $\hat{\b L}$ so that
\[
\hat{\b A}-\hat{\b L}\hat{\b C}=\left[\begin{array}{cccc}
0 &0& 0 & -80\\
1 & 0 & 0 & -108\\
0 & 1 & 0 & -54\\
0 & 0 & 1 & -12
\end{array}\right].
\]
We have
\[
\hat{\b L}=\left[\begin{array}{cc}
1681 & 80\\
2270 & 108\\
1137 & 54\\
251 & 17
\end{array}\right],
\]
and hence
\[
\b L= \hat{\b T}^T\hat{\b L}=\left[\begin{array}{cc}
1137 & 54\\
3955 & 188\\
5681 & 270\\
-23626 & -1117
\end{array}\right].
\]
We note that there are other possible gain matrices $\b L$ that could be used to allocate the eigenvalues of $\b A-\b L\b C$ into desired locations.
\end{example}\markex

We now present an alternative approach to the closed-loop observer design. We assume that the dynamics of an estimator are given by
\begin{equation}
\dot{\b z}(t)=\b D\b z(t)+\b E\b u(t)+\b G\b y(t),
\label{eq:genestima}
\end{equation}
where $\b z(t) \in \mb{\Bb R}^{n}$. To begin with the development, suppose that we would like to obtain
\[
\b z=\b T\b x,
\]
where $\b T \in \mb{\Bb R}^{n \times n}$ is invertible. Premultiplying $\dot{\b x}(t)=\b A\b x(t)+\b B\b u(t)$ by $\b T$ yields
\begin{equation}
\b T\dot{\b x}(t)=\b T\b A\b x(t)+\b T\b B\b u(t).
\label{eq:premgenesti}
\end{equation}
Substituting into~(\ref{eq:genestima}) the relation $\b y(t)=\b C\b x(t)$ gives
\begin{equation}
\dot{\b z}(t)=\b D\b z(t)+\b E\b u(t)+\b G\b C\b x(t).
\label{eq:afsubycx}
\end{equation}
Subtracting~(\ref{eq:afsubycx}) from~(\ref{eq:premgenesti}) and taking into account that $\b z=\b T\b x$ and $\dot{\b z}=\b T\dot{\b x}$ yields
\[
\b 0=\left(\b T\b A-\b D\b T-\b G\b C \right)\b x(t)+\left(\b T\b B-\b E \right)\b u(t)
\]
for all $t$ and for arbitrary input $\b u$. Hence, we must have
\begin{eqnarray*}
\b T\b A-\b D\b T &=& \b G\b C\\
\b E &=& \b T\b B.
\end{eqnarray*}
If $\b z \ne \b T\b x$, but the two above equations hold, then subtracting~(\ref{eq:premgenesti}) from~(\ref{eq:afsubycx}) and taking into account the above relations yields
\begin{eqnarray*}
\frac{d}{dt}\left(\b z-\b T\b x \right) &=& \b D\b z-\b T\b A\b x+\b G\b C\b x\\
&=& \b D\b z-\b D\b T\b x\\
&=& \b D\left( \b z-\b T\b x\right).
\end{eqnarray*}
If the eigenvalues of $\b D$ all have negative real parts, then
\[
\b z-\b T\b x \to \b 0\quad\mb{as}\quad t \to \infty .
\]
Note that if we try $\b T=\b I_n$, then we have the previously analyzed case, where $\b G=\b L$, and
\begin{eqnarray*}
\b E &=& \b B,\\
\b A-\b L\b C &=& \b D.
\end{eqnarray*}
The resulting observer, when $\b T=\b I_n$, was called the identity observer by its developer Luenberger~\cite{luenberger66,luenberger71}. Given the desired eigenvalues, symmetric with respect to the real axis, the equation $\b A-\b L\b C = \b D$ can be solved for $\b L$ so that the resulting $\b D$ has its eigenvalues in the desired locations, if and only if the pair $(\b A,\b C)$ is observable. However, it is not true that given an arbitrary $\b D$ we can solve for $\b L$ so that $\b A-\b L\b C = \b D$ even if the pair $(\b A,\b C)$ is observable.


\section{Combined Controller-Observer Compensator}
We combine a control law with a full-order estimator. We write the equations that govern the behavior of the dynamic system consisting of the plant model and the full-order estimator. The resulting system's order is $2n$, and the equations that describe the system are
\begin{equation}
\left.\begin{array}{rll}
\left[\begin{array}{c}
\dot{\b x}(t)\\
\dot{\tilde{\b x}}(t)
\end{array}\right]&=&\left[\begin{array}{cc}
\b A & \b O\\
\b L\b C & \b A-\b L\b C
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\tilde{\b x}(t)
\end{array}\right]+\left[\begin{array}{c}
\b B\\
\b B
\end{array}\right]\b u(t)\\
\b y(t) &=& \left[\begin{array}{cc}
\b C & \b O
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\tilde{\b x}(t)
\end{array}\right]\end{array}\right\}
\label{eq:plaandesti}
\end{equation}
Suppose that we now apply the control law
\begin{equation}
\b u(t)=-\b K\tilde{\b x}(t)+\b v(t)
\label{eq:statfeefromesti}
\end{equation}
instead of the actual state-feedback control law. In the above, the vector $\b v$ denotes an external input signal. A schematic of a closed-loop system driven by the combined controller-estimator compensator is shown in Figure~\ref{fig:obs_con}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{obs_con.eps}
%\centerbmp{3.33in}{2.5in}{c:/mybook/obs_con.bmp}
\caption{Closed-loop system driven by the combined controller-observer compensator.}
\label{fig:obs_con}
\end{figure}
A model of the closed-loop system is obtained by combining equations~(\ref{eq:plaandesti}) and~(\ref{eq:statfeefromesti}),
\begin{eqnarray*}
\left[\begin{array}{c}
\dot{\b x}(t)\\
\dot{\tilde{\b x}}(t)
\end{array}\right]&=&\left[\begin{array}{cc}
\b A &  -\b B\b K\\
\b L\b C & \b A-\b L\b C-\b B\b K
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\tilde{\b x}(t)
\end{array}\right]+\left[\begin{array}{c}
\b B\\
\b B
\end{array}\right]\b v(t)\\
\b y(t) &=& \left[\begin{array}{cc}
\b C & \b O
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\tilde{\b x}(t)
\end{array}\right].
\end{eqnarray*}
To analyze the above closed-loop system, it is convenient to perform a change of state variables using the following transformation
\[
\left[\begin{array}{c}
\b x\\
\b x - \tilde{\b x}
\end{array}\right]=\left[\begin{array}{cc}
\b I_n & \b O\\
\b I_n & -\b I_n
\end{array}\right]\left[\begin{array}{c}
\b x\\
\tilde{\b x}
\end{array}\right].
\]
Note that
\[
\left[\begin{array}{cc}
\b I_n & \b O\\
\b I_n & -\b I_n
\end{array}\right]^{-1}=\left[\begin{array}{cc}
\b I_n & \b O\\
\b I_n & -\b I_n
\end{array}\right].
\]
In the new coordinates the equations describing the closed-loop system are
\begin{eqnarray*}
\left[\begin{array}{c}
\dot{\b x}(t)\\
\dot{\b x}(t) - \dot{\tilde{\b x}}(t)
\end{array}\right]&=&\left[\begin{array}{cc}
\b A -\b B\b K & \b B\b K\\
\b O & \b A-\b L\b C
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\b x(t)-\tilde{\b x}(t)
\end{array}\right]+\left[\begin{array}{c}
\b B\\
\b O
\end{array}\right]\b v(t)\\
\b y(t) &=& \left[\begin{array}{cc}
\b C & \b O
\end{array}\right]\left[\begin{array}{c}
\b x(t)\\
\b x(t) - \tilde{\b x}(t)
\end{array}\right].
\end{eqnarray*}
Note that in the above system the subsystem corresponding to the error component $\b e(t)=\b x(t) - \tilde{\b x}(t)$ is uncontrollable. Furthermore, the $2n$ poles of the closed-loop system are equal to the individual eigenvalues of both $\b A-\b B\b K$ and $\b A-\b L\b C$, which means that the design of the control law is separated from the construction of the observer. This is what is known as the {\em separation principle\/}. The closed-loop transfer function relating $\b Y(s)$ and $\b V(s)$ is
\begin{eqnarray*}
\b Y(s) &=& \left[\begin{array}{cc}
\b C & \b O
\end{array}\right]\left[\begin{array}{cc}
s\b I_n -\b A +\b B\b K & -\b B\b K\\
\b O & s\b I_n -\b A+\b L\b C
\end{array}\right]^{-1}\left[\begin{array}{c}
\b B\\
\b O
\end{array}\right]\b V(s)\\
&=& \b C\left(s\b I_n -\b A +\b B\b K \right)^{-1}\b B\b V(s).
\end{eqnarray*}
The above expression is identical to that for the closed-loop system if we applied the state-feedback control law $\b u(t)=-\b K\b x(t)+\b v(t)$. Thus, the combined controller-observer compensator yields the same closed-loop transfer function as the actual state-feedback control law.

We now briefly discuss the issue of the observer pole selection. Franklin, Powell, and Emami-Naeini~\cite[page~552]{franklin02} recommend that the real parts of the observer poles, that is, the real parts of the eigenvalues of the matrix $\b A-\b L\b C$, be a factor of 2 to 6 times deeper in the open left-half plane than the real parts of the controller poles which are the eigenvalues of the matrix $\b A-\b B\b K$. Such a choice ensures a faster decay of the observation error $\b e(t)=\b x(t) - \tilde{\b x}(t)$ compared with the desired controller dynamics. This in turn causes the controller poles to dominate the closed-loop system response. Because the observer poles represent a measure of the speed with which the error $\b e(t)=\b x(t) - \tilde{\b x}(t)$ decays to zero, one would tend to assign the observer poles deep in the left-hand plane. However, fast decay requires large gains which may lead to saturation of some signals and unpredictable nonlinear effects. If the observer poles were slower than the controller poles, the closed-loop system response would be dominated by the observer, which is undesirable. As it is usual in engineering practice, the term compromise can be used to describe the process of constructing the final compensator structure.

\begin{example}\label{ex:dcobserv}\rm
Consider a schematic of an armature-controlled DC motor system, shown in Figure~\ref{fig:open_dc}, where the system parameters are: $R_a=5$~$\Omega$, $L_a=200$~mH, $K_b=0.1$~V/rad/sec, $K_i=0.1$~Nm/A, the gear ratio $N_1/N_2=1/50$. The armature inertia is $I_{armature}=2\times10^{-3}$~kg$\cdot$m$^2$. The load of $10$~kg is located at an effective radius of $0.2$~m. The gear inertia and friction are negligible.
\begin{figure}
\centering
\includegraphics[scale=0.57]{hw2fig2.eps}
%\vspace{3in}
%\centerbmp{4in}{3in}{c:/mybook/hw2fig2.bmp}
%\hskip1.2in\special{bmp:c:/mybook/hw2fig2.bmp x=4in y=3in}
\caption{Schematic of an armature-controlled DC motor system of Example~\ref{ex:dcobserv}.}
\label{fig:open_dc}
\end{figure}

We first construct the state space model of the DC motor system. We start with writing the equation relating torque to angular acceleration,
\begin{equation}
T_m=I_{eq}\ddot{\theta},
\label{eq:mechtorq}
\end{equation}
where
\begin{eqnarray*}
I_{eq}&=&I_{armature}+\left(N_1/N_2 \right)^2 I_{l}\\
&=&2\times10^{-3}\,\mb{kg$\cdot$m}^2+(1/50)^2\times10\times(0.2)^2\,\mb{kg$\cdot$m}^2\\
&=&2.16\times10^{-3}\,\mb{kg$\cdot$m}^2.
\end{eqnarray*}
Kirchhoff's voltage law applied to the armature circuit gives
\[
R_ai_a+L_a\frac{di_a}{dt}+e_b=e_a,
\]
where $e_b=K_b\frac{d\theta}{dt}$. The equation for the developed torque is
\begin{equation}
T_m = K_i i_a.
\label{eq:electrtor}
\end{equation}
Combining~(\ref{eq:mechtorq}) and~(\ref{eq:electrtor}) gives
\[
\ddot{\theta}=\frac{K_i}{I_{eq}} i_a.
\]
Let $x_1=i_a$, $x_2=\theta$, $x_3=\dot{\theta}=\omega$, $u=e_a$, and $y=\theta_l$. Taking into account the definition of the state variables, we represent the above modeling equations in state-space format,
\begin{eqnarray*}
\left[\begin{array}{c}
\dot{x}_1\\
\dot{x}_2\\
\dot{x}_3
\end{array}\right] &=& \left[\begin{array}{ccc}
-\frac{R_a}{L_a} & 0 & -\frac{K_b}{L_a}\\
0 & 0 & 1\\
\frac{K_i}{I_{eq}} & 0 & 0
\end{array}\right]\left[\begin{array}{c}
{x}_1\\
{x}_2\\
{x}_3
\end{array}\right]+\left[\begin{array}{c}
\frac{1}{L_a}\\
0\\
0
\end{array}\right]u\\
y &=& \left[\begin{array}{ccc}
0 & \frac{N_1}{N_2} & 0
\end{array}\right]\left[\begin{array}{c}
{x}_1\\
{x}_2\\
{x}_3
\end{array}\right].
\end{eqnarray*}
Substituting the given parameter values, we get
\begin{eqnarray*}
\left[\begin{array}{c}
\dot{x}_1\\
\dot{x}_2\\
\dot{x}_3
\end{array}\right] &=& \left[\begin{array}{ccc}
-25 & 0 & -0.5\\
0 & 0 & 1\\
46.296 & 0 & 0
\end{array}\right]\left[\begin{array}{c}
{x}_1\\
{x}_2\\
{x}_3
\end{array}\right]+\left[\begin{array}{c}
5\\
0\\
0
\end{array}\right]u=\b A\b x+\b b u\\
y &=& \left[\begin{array}{ccc}
0 & 0.02 & 0
\end{array}\right]\left[\begin{array}{c}
{x}_1\\
{x}_2\\
{x}_3
\end{array}\right]=\b c\b x.
\end{eqnarray*}
Our next step is to design a state-feedback controller $u=-\b k\b x + v$, such that the eigenvalues of $\b A-\b b\b k$ are
\[
-1+j,-1-j,-10.
\]
To allocate the poles into the desired locations, we first transform the system model into the controller form. We first form the controllability matrix
\[
\left[\begin{array}{ccc}
\b b & \b A\b b & \b A^2\b b
\end{array}\right]=\left[\begin{array}{ccc}
5 & -125 & 3009.3\\
0 & 0 & 231.5\\
0 & 231.5 &-5787
\end{array}\right].
\]
The system is controllable. The last row of the inverse of the controllability matrix is
\[
\b q_1=\left[\begin{array}{ccc}
0 & 0.0043 & 0
\end{array}\right],
\]
and hence the transformation matrix we are seeking has the form
\[
\b T = \left[\begin{array}{c}
\b q_1\\
\b q_1\b A\\
\b q_1\b A^2
\end{array}\right]= \left[\begin{array}{ccc}
0 & 0.0043 & 0\\
0 & 0 & 0.0043\\
0.2 & 0 & 0
\end{array}\right].
\]
The system's matrices in the new coordinates are
\[
\tilde{\b A} = \b T\b A\b T^{-1}
= \left[\begin{array}{ccc}
0 & 1 & 0\\
0 & 0 & 1\\
0 & -23.148 & -25
\end{array}\right],
\]
\[
\tilde{\b b} = \b T\b b
= \left[\begin{array}{c}
0\\
0\\
1
\end{array}\right],
\]
and
\[
\tilde{\b c} = \b c\b T^{-1}
= \left[\begin{array}{ccc}
4.63 & 0 & 0
\end{array}\right].
\]
The desired closed-loop characteristic polynomial $\alpha_c(s)$ is
\[
\alpha_s(s) = (s+1-j)(s+1+j)(s+10)= s^3+12s^2+22s+20.
\]
We now find $\tilde{\b k}$ so that
\[
\tilde{\b A}-\tilde{\b b}\tilde{\b k}=\left[\begin{array}{ccc}
0 & 1 & 0\\
0 & 0 & 1\\
-20 & -22 & -12
\end{array}\right].
\]
We have
\[
\tilde{\b k}=\left[\begin{array}{ccc}
20 & -1.148 & -13
\end{array}\right],
\]
and
\[
\b k = \tilde{\b k}\b T=\left[\begin{array}{ccc}
-2.6 & 0.0864 & -0.005
\end{array}\right].
\]
Hence,
\[
\b A-\b b \b k = \left[\begin{array}{ccc}
-12 & -0.432 & -0.4752\\
0 & 0 & 1\\
46.294 & 0 & 0
\end{array}\right].
\]
The transfer function of the closed-loop system is
\[
\frac{{\cal L}(y(t))}{{\cal L}(v(t))}=\frac{Y(s)}{V(s)}=\b c\left( s\b I-\b A+\b b\b k\right)^{-1}\b b=\frac{4.6296}{s^3+12s^2+22s+20}.
\]
The unit-step response of the closed-loop system is shown in Figure~\ref{fig:motcl}.
\begin{figure}
\centering
\includegraphics[scale=0.5]{dc_noest.eps}
%\vspace{4in}
%\centerline{\psfig{figure=c:/mybook/dc_noest.eps,height=3in}}
%\centering{\epsfig{file=c:/mybook/dc_noest.eps,height=3in}}
%\centerbmp{4in}{3in}{c:/ee680/motcl.bmp}
%\hskip.5in\special{bmp:c:/ee680/motcl.bmp x=5.33in y=4in}
\caption{Step response of the closed-loop DC motor system with state feedback.}
\label{fig:motcl}
\end{figure}


Next, we design an observer placing its poles at $\{-4, -5+2j, -5-2j\}$, and then synthesize the combined controller-observer compensator. To compute the observer gain vector $\b l$, we first transform the pair $(\b A, \b c)$ into the observer form. This is equivalent to transforming the pair $(\b A^{\top}, \b c^{\top})$ into the controller companion form. The transformation matrix that brings the pair $(\b A, \b c)$ into its observer form is
\[
\hat{\b Q}=\hat{\b T}^{\top}= \left[\begin{array}{ccc}
1.1 & -27 & 650\\
0 & 0 & 50\\
0 & 50 & -1250
\end{array}\right].
\]
The matrices $\b A$ and $\b c$ in the new coordinates have the form:
\[
\hat{\b A}=\hat{\b Q}^{-1}\b A\hat{\b Q}=\left[\begin{array}{ccc}
0 & 0 & 0\\
1 & 0 & -23.1481\\
0 & 1 & -25
\end{array}\right]\quad\mb{and}\quad
\hat{\b c}=\b c\hat{\b Q}=\left[\begin{array}{ccc}
0 & 0 & 1
\end{array}\right].
\]
The desired characteristic polynomial of the observer is
\[
\det\left(\b I_3-\b A+\b l\b c\right) = (s+4)(s+5-2j)(s+5+2j)= s^3+14s^2+69s+116.
\]
We now find $\hat{\b l}$ so that
\[
\hat{\b A}-\hat{\b l}\hat{\b c}=\left[\begin{array}{ccc}
0 & 0 & -116\\
1 & 0 & -69\\
0 & 1 & -14
\end{array}\right].
\]
We have
\[
\hat{\b l}=\left[\begin{array}{c}
116\\
45.8519\\
-11
\end{array}\right]\quad\mb{and therefore}\quad
\b l=\hat{\b Q}\hat{\b l}=\left[\begin{array}{c}
-8263\\
-550\\
16043
\end{array}\right].
\]
The dynamics of the observer are given by
\[
\dot{\tilde{\b x}}=(\b A-\b l\b c)\tilde{\b x}+\b b u+\b l y,
\]
that is,
\[
\dot{\tilde{\b x}}=\left[\begin{array}{ccc}
-25 & 165.2544 & -0.5\\
0 & 11 & 1\\
46.2963 & -320.8519 & 0
\end{array}\right]\tilde{\b x} + \left[\begin{array}{c}
5\\
0\\
0
\end{array}\right]u+\left[\begin{array}{c}
-8263\\
-550\\
16043
\end{array}\right]y.
\]

We connect the observer to the DC motor system, thus obtaining a closed-loop system with the combined controller-observer compensator in the loop as in Figure~\ref{fig:obs_con}. In Figure~\ref{fig:mobser}, we show a plot of $x_1$ and its estimate for the closed-loop system with the observer in the loop, where $v=0$, $\b x(0)=\left[\begin{array}{ccc}
1 & 0.2 & -0.1
\end{array}\right]^{\top}$, and $\tilde{\b x}(0)=\b 0$.
\begin{figure}
\centering
\includegraphics[scale=0.5]{esti_fo.eps}
%\vspace{4in}
%\centerline{\psfig{figure=c:/mybook/esti_fo.eps,height=3in}}
%\centering{\epsfig{file=c:/mybook/esti_fo.eps,height=3in}}
%\hskip.5in\special{bmp:c:/ee680/mobser.bmp x=5.33in y=4in}
\caption{A plot of $x_1$ and its estimate versus time for the closed-loop system with the observer in the loop.}
\label{fig:mobser}
\end{figure}
\end{example}\markex
\bibliography{Mybook,root2}
\bibliographystyle{plain}
\end{document} 