\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.2}
\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 Controllability and Observability of LTI Systems}\\
by\\
{\large Stanislaw H. \.{Z}ak}
\end{center}
\begin{center}
October 21, 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 begin our discussion of linear system theory with a description of the concept of linearity by Mitchell J. Feigenbaum~\cite[page~3]{peitgen92}, who is a researcher of nonlinear systems. ``Linearity means that the rule that determines what a piece of a system is going to do next is not influenced by what it is doing now. More precisely, this is intended in a differential or incremental sense: For a linear spring, the increase of its tension is proportional to the increment whereby it is stretched, with the ratio of these increments exactly independent of how much it has already been stretched. Such a spring can be stretched arbitrarily far, and in particular will never snap or break. Accordingly, no real spring is linear.'' The real world is nonlinear. However, there is a number of reasons to investigate linear systems. Linear models are often used to approximate nonlinear systems. Many times, this approximation is sufficient for the controller design for the underlying nonlinear system. Knowledge of linear system theory helps to understand the intricate theory of nonlinear systems.


\section{Reachability and Controllability}
We first consider a linear, time-invariant, discrete-time system modeled by
\begin{equation}
\b x[k+1]=\b A\b x[k]+\b B\b u[k],\quad\b x[0]=\b x_0,
\label{eq:ltidissys}
\end{equation}
where $\b A \in \mb{\Bb R}^{n \times n}$, $\b B \in \mb{\Bb R}^{n \times m}$. The solution to~(\ref{eq:ltidissys}) is
\[
\b x[i]=\b A^i\b x[0]+\sum_{k=0}^{i-1} \b A^{i-k-1}\b B \b u[k],
\]
which can be represented as
\begin{equation}
\b x[i]=\b A^i\b x[0]+\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{i-1}\b B
\end{array}\right]\left[ \begin{array}{c}
\b u[i-1]\\
\b u[i-2]\\
\vdots\\
\b u[0]
\end{array}\right].
\label{eq:altrepofsol}
\end{equation}
Let
\[
\b U_i=\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{i-1}\b B
\end{array}\right],\quad i=1,2,\ldots .
\]
Note that $\b U_i\in \mb{\Bb R}^{n\times mi}$. If for some positive $l$,
\[
\mb{rank}\,\b U_l = \mb{rank}\,\b U_{l+1},
\]
then all the columns of $\b A^{l}\b B$ are linearly dependent on those of $\b U_l$. This, in turn, implies that all the columns of $\b A^{l+1}\b B$, $\b A^{l+2}\b B,\ldots$ must also be linearly dependent on those of $\b U_l$. Hence,
\begin{equation}
\mb{rank}\,\b U_l = \mb{rank}\,\b U_{l+1}=\mb{rank}\,\b U_{l+2} = \ldots
\label{eq:inrabyone}
\end{equation}
The above implies that the rank of $\b U_i$ increases by at least one when $i$ is increased by one, until the maximum value of $\mb{rank}\,\b U_i$ is attained. The maximum value of the rank $\b U_i$ is guaranteed to be achieved for $i=n$, which means that, we always have
\begin{equation}
\mb{rank}\,\b U_n = \mb{rank}\,\b U_{n+1}=\mb{rank}\,\b U_{n+2} = \ldots
\label{eq:satrafon}
\end{equation}
It follows from~(\ref{eq:inrabyone}) that if $\mb{rank}\,\b B=p$, then
\begin{equation}
\mb{rank}\;\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]=\mb{rank}\;\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-p}\b B
\end{array}\right].
\label{eq:satrarbp}
\end{equation}

We say that the system~(\ref{eq:ltidissys}) is {\em reachable\/} if for any $\b x_f$ there exists an integer $q>0$ and a control sequence, $\{\b u[i]:i=0,1,\ldots,q-1\}$, that transfers $\b x[0]=\b 0$ to $\b x[q]=\b x_f$.
\begin{thm}\label{thm:reachfodissy}
The system~(\ref{eq:ltidissys}) is reachable if and only if
\[
rank \left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]=n.
\]
\end{thm}
{\bf Proof}\quad Using~(\ref{eq:altrepofsol}) where $\b x[0]=\b 0$ and $\b x[q]=\b x_f$, we obtain
\begin{eqnarray}
\b x_f &=& \sum_{k=0}^{q-1} \b A^{q-k-1}\b B \b u[k]\nonumber\\
&=& \left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{q-1}\b B
\end{array}\right]\left[ \begin{array}{c}
\b u[q-1]\\
\b u[q-2]\\
\vdots\\
\b u[0]
\end{array}\right].
\label{eq:xfreafor}
\end{eqnarray}
It follows from the above that for any $\b x_f$ there exists a control sequence $\{\b u[i]:i=0,1,\ldots,q-1\}$ that transfers $\b x[0]=\b 0$ to $\b x[q]=\b x_f$ if and only if
\[
\mb{rank}\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{q-1}\b B
\end{array}\right]=\mb{rank}\,\b U_q=n.
\]
By~(\ref{eq:satrafon}) the maximum value of the rank of $\b U_q$ is guaranteed to be attained for $q=n$, which proves the theorem.\\
\hspace*{5.5in} $\Box$
%Let now $\b v\in \mb{\Bb R}$ be such that for some $s\in \mb{\Bb C}$,
%\begin{equation}
%\b v^T\left[ s\b I_n-\b A \vdots \b B\right]=\b 0,
%\label{eq:vtrhau}
%\end{equation}
%that is,
%\[
%\b v^T\b B=\b 0\quad\mb{and}\quad \b v^T\b A=s\b v^T.
%\]
%Then, we have
%\[
%\b v^T\b A\b B=s\b v^T\b B=\b 0,\quad \b v^T\b A^2\b B=s\b v^T\b A\b B=\b %0,\ldots,\b v^T\b A^{n-1}\b B=\b 0,
%\]
%that is,
%\begin{equation}
%\b b^T\left[\begin{array}{cccc}
%\b B&\b A\b B&\cdots \b A^{n-1}\b B
%\end{array}\right]=\b 0
%\label{eq:vtrkalmat}
%\end{equation}

A closely related notion to reachability is the notion of {\em controllability\/}. The notion of controllability is related to the property of a controlled system being transferable from any given state to the origin $\b 0$ of the state space by means of an appropriately chosen control law.
\begin{thm}\label{thm:contrfodissy}
The system~(\ref{eq:ltidissys}) is controllable if and only if
\[
\mb{range}\:\left(\b A^n\right)\subset\mb{range}\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right].
\]
\end{thm}
{\bf Proof}\quad Using the solution formula for the system~(\ref{eq:ltidissys}), for the case when $\b x[0]=\b x_0$ and $\b x_f=\b x[q]=\b 0$, we obtain
\begin{eqnarray}
\b A^q\b x_0 &=& -\sum_{k=0}^{q-1} \b A^{q-k-1}\b B \b u[k]\nonumber\\
&=& -\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{q-1}\b B
\end{array}\right]\left[ \begin{array}{c}
\b u[q-1]\\
\b u[q-2]\\
\vdots\\
\b u[0]
\end{array}\right].
\label{eq:stafrxo}
\end{eqnarray}
The system~(\ref{eq:ltidissys}) is controllable if and only if for some $q>0$ and arbitrary initial condition $\b x_0$, the vector $\b A^q\b x_0$ is in the range of $\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{q-1}\b B
\end{array}\right]=\b U_q$. Taking into account that the maximal range of $\b U_q$ is guaranteed to be attained for $q=n$, the system~(\ref{eq:ltidissys}) is controllable if and only if the condition of the theorem is satisfied.\\
\hspace*{5.5in} $\Box$

Note that the condition of the above theorem can be equivalently represented as
\begin{equation}
\mb{rank}\,\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]=\mb{rank}\,\left[\begin{array}{ccccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B&\b A^n
\end{array}\right].
\label{eq:eqreofcomate}
\end{equation}
We illustrate the above discussion with a simple example that we found in~\cite[page~482]{kaczorek98}.
\begin{example}\rm
Consider a discrete-time system modeled by
\begin{eqnarray}
\b x[k+1]&=&\b A\b x[k]+\b bu[k]\nonumber\\
&=&\left[\begin{array}{cc}
0 & a\\
0 & 0
\end{array}\right]\b x[k]+\left[\begin{array}{c}
1\\
0
\end{array}\right]u[k], \quad a\in \mb{\Bb R}.
\label{eq:twdidiss}
\end{eqnarray}
The above system model is not reachable because
\[
\mb{rank}\left[\begin{array}{cc}
\b b & \b A\b b
\end{array}\right]=\mb{rank}\left[\begin{array}{cc}
1 & 0\\
0 & 0
\end{array}\right]=1<2.
\]
It is easy to check using~(\ref{eq:xfreafor}) that, for example, the state $\b x_f=\left[\begin{array}{cc}
0 & 1
\end{array}\right]^{\top}$ is not reachable from $\b x[0]=\b 0$ because $\b x_f$ does not belong to the range of $\left[\begin{array}{cc}
\b b & \b A\b b
\end{array}\right]$. In fact, nonreachable states form the set,
\[
\left\{c \left[\begin{array}{c}
0\\
1
\end{array}\right],\; c \in \mb{\Bb R} \right\}.
\]
However, the system~(\ref{eq:twdidiss}) is controllable because for any $a\in \mb{\Bb R}$,
\[
\mb{rank}\left[\begin{array}{cc}
\b b & \b A\b b
\end{array}\right]=\mb{rank}\left[\begin{array}{cc}
1 & 0\\
0 & 0
\end{array}\right]=\mb{rank}\left[\begin{array}{ccc}
\b b & \b A\b b & \b A^2
\end{array}\right]=\mb{rank}\left[\begin{array}{cccc}
1 & 0 & 0 & 0\\
0 & 0 & 0 & 0
\end{array}\right].
\]
That is,
\[
\mb{range}\,\left(\b A^2 \right)=\mb{range}\,(\b O)\subset \mb{range}\,\left[\begin{array}{cc}
\b b & \b A\b b
\end{array}\right].
\]
Using~(\ref{eq:stafrxo}), we can easily see that arbitrary initial state $\b x(0)\in \mb{\Bb R}^2$ of the system~(\ref{eq:twdidiss}) can be transferred to the origin of $\mb{\Bb R}^2$ using, for example, the zero control sequence, $u[0]=u[1]=0$. This is because $\b A^2=\b O$ and hence $\b A^2\b x[0]=\b 0$ for any $\b x[0]\in \mb{\Bb R}^2$.
\end{example}\markex

In summary, for discrete-time linear systems, reachability implies controllability, and the two notions are equivalent if the matrix $\b A$ of the given discrete system is nonsingular.

We next discuss the notions of reachability and controllability for continuous-time linear systems.

We say that the system $\dot{\b x}(t)=\b A\b x(t) + \b B\b u(t)$, where $\b A \in \mb{\Bb R}^{n \times n}$, $\b B \in \mb{\Bb R}^{n \times m}$, or equivalently, the pair $\left(\b A,\b B\right)$, is reachable if for any $\b x_f \in \mb{\Bb R}^n$ there is $t_1$ and a control law $\b u(t)$ that transfers $\b x(t_0)=\b 0$ to $\b x(t_1)=\b x_f$.

We say that the system $\dot{\b x}(t)=\b A\b x(t) + \b B\b u(t)$, or equivalently, the pair $\left(\b A,\b B\right)$, is {\em controllable\/} if there is a control law $\b u(t)$ that transfers any initial state $\b x_0=\b x(t_0)$ at any time $t_0$ to the origin $\b 0$ of the state space at some time $t_1>t_0$.

It turns out that in the case of continuous, time invariant, systems the two notions are equivalent. Indeed, from the solution formula for the controlled system, for $\b x(0)=\b 0$ and $\b x(t_1)=\b x_f$, we obtain
\[
\b x_f =\int_0^{t_1}e^{\b A(t_1-t)}\b B\b u(t)d t.
\]
Pre-multiplying the above equation by $e^{-\b At_1}$ and rearranging, we get
\begin{equation}
\b v=\int_0^{t_1}e^{-\b A t}\b B\b u(t)dt,
\label{eq:foforaech}
\end{equation}
where $\b v=e^{-\b A t_1}\b x_f$. On the other hand, from the solution formula for the controlled system, for $\b x(0)=\b x_0$ and $\b x(t_1)=\b 0$, we obtain
\[
\b 0 =e^{\b A t_1}\b x_0+\int_0^{t_1}e^{\b A(t_1-t)}\b B\b u(t)d t.
\]
Pre-multiplying the above equation by $e^{-\b At_1}$ and rearranging yields
\begin{equation}
-\b x_0=\int_0^{t_1}e^{-\b A t}\b B\b u(t)dt.
\label{eq:fofocontr}
\end{equation}
Comparing~(\ref{eq:foforaech}) and~(\ref{eq:fofocontr}), we conclude that reachability of the system $\dot{\b x}(t)=\b A\b x(t) + \b B\b u(t)$ is equivalent to its controllability. This is not true in the case of discrete-time systems, where reachability implies controllability, and the two notions are equivalent if the matrix $\b A$ of the given discrete system is nonsingular.

There are many criteria for checking if a given system is reachable/controllable or not. We present a few of them in this section.
\begin{thm}
The following are equivalent:
\begin{enumerate}
\item [(1)] The system $\dot{\b x}(t)=\b A\b x(t) + \b B\b u(t)$ is reachable;
\item [(2)] rank$\,\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]=n$;
%\item [(3)] The $n$ rows of the matrix $e^{-\b At} \b B$ are linearly independent over the set of real numbers for all $t\in[0,\infty)$;
\item [(3)] The matrix
\[
\b W(t_0,t_1)=\int_{t_0}^{t_1}e^{-\b A t}\b B \b B^{T}e^{-\b A^{\top} t} d t
\]
is nonsingular for all $t_1>t_0$;
\end{enumerate}
\end{thm}
{\bf Proof}\quad We first prove the implication $(1) \Rightarrow (2)$, that is, if the pair $\left(\b A,\b B\right)$ is reachable, then the so called controllability matrix
\[
\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]\in \mb{\Bb R}^{n \times mn}
\]
is of full rank $n$. We prove this statement by contraposition. Thus, we assume that
\[
\mb{rank}\,\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right] <n,
\]
then, there is a constant $n$-vector $\b q \ne \b 0$ so that
\[
\b q^{\top} \b B = \b 0^{\top},\quad \b q^{\top} \b A\b B=\b 0^{\top},\ldots,\b q^{\top}\b A^{n-1}\b B=\b 0^{\top}.
\]
By the Cayley-Hamilton theorem the matrix $\b A$ satisfies its own characteristic equation. Hence
\[
\b A^n=-a_{n-1}\b A^{n-1}-\cdots-a_1\b A-a_0\b I_n.
\]
Therefore
\[
\b q^{\top}\b A^n\b B = \b q^{\top}\left(-a_{n-1}\b A^{n-1}\b B-\cdots-a_1\b A\b B-a_0\b B \right) = \b 0^{\top}.
\]
By induction
\[
\b q^{\top}\b A^i\b B=\b 0^{\top}\quad\mb{for}\quad i=n+1,n+2,\ldots
\]
Let now $\b x(0)=\b 0$ and $\b x(t_1)=\b q$. We will now show that there is no control law that can transfer the system from $\b x(0)=\b 0$ to $\b x(t_1)=\b q$. From the solution formula for the controlled system, we obtain
\[
\b q =\int_0^{t_1}e^{\b A(t_1-t)}\b B\b u(t)d t.
\]
%Premultiplying the above equation by $e^{-\b At_1}$ and rearranging, we get
%\[
%-\b q=\int_0^{t_1}e^{-\b A t}\b B\b u(t)dt.
%\]
We now premultiply the resulting equation by $\b q^{\top}$ to get
\[
0\ne \|\b q\|^2=\int_0^{t_1}\b q^{\top}e^{\b A(t_1- t)}\b B\b u(t)dt=0
\]
because
\[
\b q^{\top}e^{\b A(t_1-t)}\b B=\b q^{\top}\left(\b B+(t_1-t)\b A\b B+\frac{(t_1-t)^2}{2!}\b A^2\b B-\cdots\right)=\b 0^{\top}.
\]
Thus the system cannot be transferred from $\b x(0)=\b 0$ to $\b x(t_1)=\b q$, and hence the pair $\left(\b A,\b B\right)$ is not reachable.

%We will now prove the implication $(2) \Rightarrow (3)$, that is, if the controllability matrix is of full rank, then the $n$ rows of $e^{-\b At}\b B$ are linearly independent over $\mb{\Bb R}$ for all $t\in[0,\infty)$. We prove this statement by contraposition. So assume that for some nonzero $n$-vector $\b q$ we have
%\[
%\b q^Te^{-\b At}\b B = \b 0^T,\quad \mb{for all}\quad t\in[0,\infty).
%\]
%If we set $t=0$, then we obtain
%\[
%\b q^T\b B=\b 0^T.
%\]
%Differentiating $\b q^Te^{-\b At}\b B=\b 0$ and letting $t=0$ yields
%\[
%\b q^T\b A\b B=\b 0^T.
%\]
%Continuing this process gives
%\[
%\b q^T\left[\begin{array}{cccc}
%\b B & \b A\b B & \cdots & \b A^{n-1}\b B
%\end{array}\right]
%=\b 0^T,
%\]
%which means that $\mb{rank}\left[\begin{array}{cccc}
%\b B & \b A\b B & \cdots & \b A^{n-1}\b B
%\end{array}\right] <n$.

We will now prove, by contraposition, the implication $(2) \Rightarrow (3)$, that is, if the controllability matrix is of full rank, then $\det \b W(t_0,t_1)\ne 0$ for any $t_1>t_0$. So assume that $\det \b W(t_0,t_1)= 0$. Then, there is a nonzero $n$-vector $\b q\in\mb{\Bb R}^n$ such that
\[
\b q^{\top}\int_{t_0}^{t_1}e^{-\b A t}\b B\b B^{\top}e^{-\b A^{\top} t}d t=\b 0
\]
for all $t\in \left[t_0,t_1\right]$. We postmultiply the above equation by $\b q$ to get
\[
\int_{t_0}^{t_1}\left(\b q^{\top}e^{-\b A t}\b B\right)\left(\b B^{\top}e^{-\b A^{\top} t}\b q \right)d t= 0.
\]
Let $\b v(t)=\b B^{\top}e^{-\b A^{\top}t}\b q$, then the above equation can be written as
\[
\int_{t_0}^{t_1}\|\b v(t)\|^2 d t =0.
\]
However, the above is true if and only if $\b v(t)=\b 0$, that is, if and only if the rows of $e^{-\b At}\b B$ are linearly dependent over the set of real numbers for all $t\in \left[t_0,t_1\right]$. Now, evaluating
\[
\b q^{\top}e^{-\b A t} \b B = \b 0^{\top}
\]
and its successive derivatives with respect to $t$ at $t=0$, we obtain
\[
\b q^{\top}\b B=\b 0^{\top},\quad \b q^{\top}\b A\b B=\b 0^{\top}, \ldots, \b q^{\top}\b A^{n-1}\b B=\b 0^{\top},
\]
which means that $\mb{rank}\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right] <n$.

We now prove, constructively, the implication $(3) \Rightarrow (1)$. Let $\b x(t_0)=\b x_0$ be an arbitrary initial state and $\b x(t_1)=\b x_f$ an arbitrary final state. Then, we claim that the control law
\begin{equation}
\b u(t)=\b B^{\top}e^{-\b A^{\top}t}\b W^{-1}(t_0,t_1)\left(e^{-\b At_1}\b x(t_1)-e^{-\b At_0}\b x_0\right)
\label{eq:trlsyfota}
\end{equation}
will transfer the system from $\b x_0$ to $\b x_f$. Note that to construct the above control law the matrix $\b W(t_0,t_1)$ must be invertible. Substituting~(\ref{eq:trlsyfota}) into
\[
\b x(t_1) =e^{\b A(t_1-t_0)}\b x_0 + \int_{t_0}^{t_1}e^{\b A(t_1-\tau)}\b B\b u(\tau)d\tau
\]
yields
\begin{eqnarray*}
\b x(t_1) &=& e^{\b A(t_1-t_0)}\b x_0\\
&{}&\quad +e^{\b At_1}\int_{t_0}^{t_1}e^{-\b A\tau}\b B\b B^Te^{-\b A^T\tau} d\tau\b W^{-1}(t_0,t_1)\left(e^{-\b At_1}\b x(t_1)-e^{-\b At_0}\b x_0\right).
\end{eqnarray*}
Performing easy manipulations gives $\b x(t_1)=\b x(t_1)$, which means that indeed the proposed control law does the required job. Thus, we have established equivalence between the four statements of the theorem.\\
\hspace*{5.5in} $\Box$
%\begin{example}\label{ex:simp_dcmo}\rm
%Consider an armature-controlled DC motor system whose schematic is shown in Figure~\ref{fig:open_dcex}, where the system parameters are: $R_a=1\,\Omega$, $L_a\approx 0\,\mb{H}$, $K_b=5\,\mb{V/rad/sec}$, $K_i=5\,\mb{Nm/A}$, and the effective moment of inertia is $I_{eq}=0.1$~kg$\cdot$m$^2$. The gear inertia and friction are negligible.
%\begin{figure}
%\centering
%\includegraphics[scale=0.75]{hw2.eps}
%%\vspace{3.5in}
%%\hskip1in\special{bmp:c:/mybook/hw2.bmp x=4.67in y=3.5in}
%\caption{Schematic of an armature-controlled DC motor system of Example~\ref{ex:simp_dcmo}.}
%\label{fig:open_dcex}
%\end{figure}
%
%Applying Kirchhoff's voltage law to the armature circuit gives
%\begin{equation}
%R_a i_a+K_b\dot{\theta} = e_a.
%\label{eq:kvltodcmotsys}
%\end{equation}
%The armature-controlled DC motor uses a constant field current, and therefore the motor torque is
%\[
%\tau_m=K_i i_a.
%\]
%The motor torque is equal to the torque delivered to the load. Hence,
%\begin{equation}
%I_{eq}\ddot{\theta} = K_ii_a.
%\label{eq:mottoreq}
%\end{equation}
%Substituting $i_a$ from~(\ref{eq:kvltodcmotsys}) into the above equation and dividing both sides by $I_{eq}$ yields
%\begin{eqnarray*}
%\ddot{\theta}&=&\frac{K_i}{I_{eq}}\left( \frac{e_a-K_b\dot{\theta}}{R_a}\right)\\
%&=&-\frac{K_iK_b}{I_{eq}R_a}\dot{\theta}+\frac{K_i}{I_{eq}R_a}e_a.
%\end{eqnarray*}
%Let $x_1=\theta$, $x_2=\dot{\theta}$, and $u=e_a$. Then taking into account the system parameters, we represent the above equation in a state space format,
%\[
%\left[\begin{array}{c}
%\dot{x}_1\\
%\dot{x}_2
%\end{array}\right]=\left[\begin{array}{cc}
%0 & 1\\
%0 & -250
%\end{array}\right]\left[\begin{array}{c}
%{x}_1\\
%{x}_2
%\end{array}\right]+\left[\begin{array}{c}
%0\\
%50
%\end{array}\right]u.
%\]
%We will now find a control $u$ that transfers the system from the initial state $\b x(t_0)=\b x(0)=\left[\begin{array}{cc}
%10 & 1
%\end{array}\right]^T$ to the final state $\b x(2)=\left[\begin{array}{cc}
%0 & 0
%\end{array}\right]^T$. Recall that the solution of a controlled system has the form
%\[
%\b x(t)=e^{\b A(t-t_0)}\b x(t_0)+\int_{t_0}^{t}e^{\b A(t-\tau)}\b B\b u(\tau)d\tau.
%\]
%Our goal is to find $u$ so that
%\[
%\b 0=e^{2\b A}\b x(0)+\int_0^2e^{\b A(2-\tau)}\b bu(\tau)d\tau.
%\]
%One can verify that one such $u$ has the form
%\[
%u(t)=-\b b^{\top}e^{\b A^T(2-t)}\left( \int_0^2e^{\b A(2-\tau)}\b b\b b^Te^{\b A^T(2-\tau)}d\tau\right)^{-1}e^{2\b A}\b x(0),
%\]
%where
%\[
%e^{\b At}=\left[\begin{array}{cc}
%1 & \frac{1}{250}\left( 1-e^{-250t}\right)\\
%0 & e^{-250t}
%\end{array}\right].
%\]
%Hence,
%\begin{eqnarray*}
%\int_0^2e^{\b A(2-\tau)}\b b\b b^{\top}e^{\b A^{\top} (2-\tau)}d\tau
%&=& \int_0^2\left[\begin{array}{cc}
%1 & \frac{1}{250}\left( 1-e^{-250(2-\tau)}\right)\\
%0 & e^{-250(2-\tau)}
%\end{array}\right]\left[\begin{array}{c}
%0\\
%50
%\end{array}\right]\left[\begin{array}{cc}
%0 & 50
%\end{array}\right]\\
%&{}&\quad\times\left[\begin{array}{cc}
%1 & 0\\
%\frac{1}{250}\left( 1-e^{-250(2-\tau)}\right)& e^{-250(2-\tau)}
%\end{array}\right]d\tau\\
%&=& \left[\begin{array}{cc}
%0.07976 & 0.02\\
%0.02 & 5
%\end{array}\right].
%\end{eqnarray*}
%The inverse of the above matrix is
%\[
%\left[\begin{array}{cc}
%12.5502 & -0.0502\\
%-0.0502 & 0.2002
%\end{array}\right].
%\]
%Hence,
%\begin{eqnarray*}
%u(t) &=& -\left[\begin{array}{cc}
%0 & 50
%\end{array}\right]\left[\begin{array}{cc}
%1 & 0\\
%\frac{1}{250}\left( 1-e^{-250(2-t)}\right)& e^{-250(2-t)}
%\end{array}\right]\\
%&{}&\quad\times \left[\begin{array}{cc}
%12.5502 & -0.0502\\
%-0.0502 & 0.2002
%\end{array}\right]e^{2\b A}\left[\begin{array}{c}
%10\\
%1
%\end{array}\right]\\
%&=& 50.22e^{(250t-500)}-25.11.
%\end{eqnarray*}
%The above control strategy transfers the system from $\b x(0)=\left[\begin{array}{cc}
%10 & 1
%\end{array}\right]^{\top}$ to $\b x(2)=\left[\begin{array}{cc}
%0 & 0
%\end{array}\right]^{\top}$. Plots of $x_1$, $x_2$ versus time are shown in Figure~\ref{fig:hw2x}.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{hw2x.eps}
%%\vspace{4in}
%%\centering{\epsfig{file=c:/mybook/hw2x.eps,height=3in}}
%%\hskip.5in\special{bmp:c:/ee680/hw2x.bmp x=5.33in y=4in}
%\caption{Plots of state variables versus time of Example~\ref{ex:simp_dcmo}.}
%\label{fig:hw2x}
%\end{figure}
%A plot of $u$ versus time is given in Figure~\ref{fig:hw2u}.
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{hw2u.eps}
%%\vspace{4in}
%%\centering{\epsfig{file=c:/mybook/hw2u.eps,height=3in}}
%%\hskip.5in\special{bmp:c:/ee680/hw2u.bmp x=5.33in y=4in}
%\caption{A plot of the control action versus time of Example~\ref{ex:simp_dcmo}.}
%\label{fig:hw2u}
%\end{figure}
%\end{example}\markex

We now give a necessary and sufficient condition for the pair $\left(\b A,\b B\right)$ to be nonreachable.
\begin{thm}
\label{thm_decomp}
The pair $\left(\b A,\b B\right)$ is nonreachable if and only if there is a similarity transformation $\b z=\b T\b x$ such that
\[
\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{cc}
\b A_1 & \b A_2\\
\b O & \b A_4
\end{array}\right],\quad \tilde{\b B}=\b T\b B=\left[\begin{array}{c}
\b B_1\\
\b O
\end{array}\right],
\]
where the pair $\left(\b A_1,\b B_1\right)$ is reachable, $\b A_1 \in \mb{\Bb R}^{r\times r}$, $\b B_1 \in \mb{\Bb R}^{r\times m}$, and the rank of the controllability matrix of the pair $(\b A,\b B)$ equals $r$.
\end{thm}
{\bf Proof}\quad We first prove necessity $(\Rightarrow)$. After forming the controllability matrix of the pair $(\b A,\b B)$, we use elementary row operations to get
\begin{eqnarray}
\b T\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]
&=&\left[\begin{array}{cccc}
\b T\b B & \left(\b T\b A\b T^{-1}\right)\left(\b T\b B\right) & \cdots & \left(\b T\b A\b T^{-1}\right)^{n-1}\left(\b T\b B\right)
\end{array}\right]\nonumber\\
&=& \left[\begin{array}{ccccccc}
x & x & x& \cdots & x& x&x\\
0& x& x & \cdots & x & x & x\\
\vdots& {}& {}& \vdots&{}& {}&\vdots\\
0& 0& 0& \cdots&x&x&x\\
0&0&0&0&0&0&0\\
\vdots& {}& {}& \vdots&{}& {}&\vdots\\
0&0&0&0&0&0&0
\end{array}\right]\nonumber\\
&=&\left[\begin{array}{ccccc}
\b B_1 &\b A_1\b B_1 &\b A_1^2\b B_1 &\cdots&\b A_1^{n-1}\b B_1\\
\b O& \b O&\b O &\cdots&\b O
\end{array}\right],
\label{eq:prekalman}
\end{eqnarray}
where the symbol $x$ denotes a ``don't care'', that is, an unspecified scalar. We now show that indeed
\[
\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{cc}
\b A_1 & \b A_2\\
\b A_3 & \b A_4
\end{array}\right],\quad \tilde{\b B}=\b T\b B=\left[\begin{array}{c}
\b B_1\\
\b O
\end{array}\right],
\]
where $\b A_3=\b O$. It is clear that $\b T\b B$ must have the above form. If $\b A_3$ were not a zero matrix, then we would have
\[
\tilde{\b A}\tilde{\b B}=\left[\begin{array}{cc}
\b A_1\b B_1\\
\b A_3\b B_1
\end{array}\right].
\]
Comparing the above with~(\ref{eq:prekalman}), we conclude that $\b A_3\b B_1=\b O$. Thus,
\[
\tilde{\b A}\tilde{\b B}=\left[\begin{array}{cc}
\b A_1\b B_1\\
\b O
\end{array}\right].
\]
Next we consider
\[
\tilde{\b A}^2\tilde{\b B}=\left[\begin{array}{cc}
\b A_1^2\b B_1\\
\b A_3\b A_1\b B_1
\end{array}\right].
\]
Again, comparing the above with~(\ref{eq:prekalman}), we conclude that
\[
\b A_3\b A_1\b B_1=\b O,
\]
and thus
\[
\tilde{\b A}^2\tilde{\b B}=\left[\begin{array}{cc}
\b A_1^2\b B_1\\
\b O
\end{array}\right].
\]
Continuing in this manner, we conclude that $\b A_3\b A_1^{n-1}\b B_1=\b O$. Thus it follows that
\[
\b A_3\left[\begin{array}{cccc}
\b B_1 & \b A_1\b B_1 & \cdots & \b A_1^{n-1}\b B_1
\end{array}\right]=\b O.
\]
Because rank$\left[\begin{array}{cccc}
\b B_1 & \b A_1\b B_1 & \cdots & \b A_1^{n-1}\b B_1
\end{array}\right] = r$, that is, the controllability matrix of the pair $\left(\b A_1,\b B_1\right)$ is of full rank, we have to have $\b A_3=\b O$, and the proof of necessity is complete.

To prove sufficiency $(\Leftarrow)$, note that if there is a similarity transformation such that
\[
\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{cc}
\b A_1 & \b A_2\\
\b O & \b A_4
\end{array}\right],\quad \tilde{\b B}=\b T\b B=\left[\begin{array}{c}
\b B_1\\
\b O
\end{array}\right],
\]
then the controllability matrix of the pair $\left(\tilde{\b A},\tilde{\b B}\right)$ has the form
\[
\left[\begin{array}{ccccc}
\b B_1 &\b A_1\b B_1 &\b A_1^2\b B_1 &\cdots &\b A_1^{n-1}\b B_1\\
\b O & \b O &\b O  &\cdots &\b O
\end{array}\right].
\]
Hence, the pair $\left(\tilde{\b A},\tilde{\b B}\right)$ is nonreachable. Because the similarity transformation preserves the reachability property, the pair $\left(\b A,\b B\right)$ is nonreachable.\\
\hspace*{5.5in}$\Box$

%\begin{example}\rm
%For the system model,
%\[
%\dot{\b x} = \left[\begin{array}{cccc}
%-1 & 1 & 0 & 1\\
%1 & 1 & 0 & 0\\
%0 & 0 & 4 & 0\\
%1 & 1 & -1 & 2
%\end{array}\right]\b x+\left[\begin{array}{cc}
%1 & 1\\
%0 & 0\\
%0 & 0\\
%0 & 1
%\end{array}\right]\b u,
%\]
%construct a state variable transformation so that in the new coordinates the reachable part is separated and distinct from the nonreachable part.
%
%We first form the controllability matrix of the pair $(\b A, \b B)$ to get
%\[
%\b {\cal C}=\left[\begin{array}{cccc}
%\b B & \b A\b B & \b A^2\b B & \b A^3\b B
%\end{array}\right] = \left[\begin{array}{cccccccc}
%1 & 1 & -1 & 0 & 3 & 4 & -1 & 4\\
%0 & 0 & 1 & 1 & 0 & 1 & 3 & 5\\
%0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
%0 & 1 & 1 & 3 & 2 & 7 & 7 & 19
%\end{array}\right].
%\]
%We then use the MATLAB command \verb![Q,R]=qr(C)! to obtain
%\[
%\b Q=\left[\begin{array}{cccc}
%-1 & 0 & 0 & 0\\
%0 & 0 & -1 & 0\\
%0 & 0 & 0 & 1\\
%0 & -1 & 0 & 0
%\end{array}\right],\quad \b R=\left[\begin{array}{cccccccc}
%-1 & -1 & 1 & 0 & -3 & -4 & 1 & -4\\
%0 & -1 & -1 & -3 & -2 & -7 & -7 & -19\\
%0 & 0 & -1 & -1 & 0 & -1 & -3 & -5\\
%0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
%\end{array}\right],
%\]
%where the matrices $\b Q$ and $\b R$ satisfy $\b {\cal C}= \b Q\b R$, and $\b R$ is upper row triangular such that $\mb{rank}\,\b R=\mb{rank}\,\b {\cal C}$. Thus, premultiplying the controllability matrix, $\b {\cal C}$, by $\b Q^{-1}$ reduces this matrix to an upper row triangular matrix $\b R$ because $\b Q^{-1}\b {\cal C}=\b R$. Let $\b z=\b Q^{-1}\b x$ be the state variable transformation. Then in the new coordinates the matrices $\b A$ and $\b B$ take the form
%\[
%\b Q^{-1}\b A\b Q=\left[\begin{array}{ccc|c}
%-1& 1 & 1 & 0\\
%1 & 2 & 1 & 1\\
%1 & 0 & 1 & 0\\\hline
%0 & 0 & 0 & 4
%\end{array}\right]\quad\mb{and}\quad
%\b Q^{-1}\b B=\left[\begin{array}{cc}
%-1& -1\\
%0 & -1\\
%0 & 0\\
%\hline
%0 & 0
%\end{array}\right].
%\]
%The dimension of the nonreachable part is 1.
%\end{example}\markex

If the eigenvalues of the noncontrollable part of a given pair $(\b A, \b B)$ are all in the open left-hand complex plane, that is, the nonreachable part is asymptotically stable, then the pair $(\b A, \b B)$ is called {\em stabilizable}.

We now give yet another test for reachability. This test is also known as the Popov-Belevitch-Hautus~(PBH) eigenvector test. We denote the set of eigenvalues of a matrix $\b A$ as $\mb{eig}(\b A)$.
\begin{thm}
\label{thm:pbhtest}
The pair $\left(\b A,\b B\right)$ is reachable if and only if
\[
\mb{rank}\left[\begin{array}{cc}
s\b I_n-\b A & \b B
\end{array}\right]=n\quad \mb{for all}\quad s\in \mb{eig}(\b A).
\]
\end{thm}
{\bf Proof}\quad We first prove the necessity part $(\Rightarrow)$ by contraposition. If there is a vector $\b q \ne \b 0$ such that for some $s\in \mb{eig}(\b A)$,
\[
\b q^{\top}\left[\begin{array}{cc}
s\b I_n-\b A & \b B
\end{array}\right]=\b 0^{\top},
\]
that is,
\[
\b q^{\top}\b A=s\b q^{\top},\quad \b q^{\top}\b B=\b 0^{\top},
\]
then
\[
\b q^{\top}\b A\b B = s\b q^{\top}\b B= \b 0^{\top},
\]
\[
\b q^{\top}\b A^2\b B = s\b q^{\top}\b A\b B= \b 0^{\top},
\]
and so on, until
\[
\b q^{\top}\b A^{n-1}\b B = s\b q^{\top}\b A^{n-2}\b B= \b 0^{\top}.
\]
We write the above equations in the form
\[
\b q^{\top}\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]= \b 0^{\top},
\]
which means that the pair $\left(\b A,\b B\right)$ is nonreachable.

We now prove the sufficiency part $(\Leftarrow)$ also by contraposition. So we assume that $\mb{rank}\left[\begin{array}{cccc}
\b B & \b A\b B & \cdots & \b A^{n-1}\b B
\end{array}\right]=r <n$. By Theorem~\ref{thm_decomp}, there exists a state variable transformation such that in the new basis the pair $\left(\b A,\b B\right)$ takes the form
\[
\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{cc}
\b A_1 & \b A_2\\
\b O & \b A_4
\end{array}\right],\quad \tilde{\b B}=\b T\b B=\left[\begin{array}{c}
\b B_1\\
\b O
\end{array}\right].
\]
We choose $\b q$ of the form
\[
\b q^{\top}=\left[\begin{array}{cc}
\b 0 & \b z
\end{array}\right],
\]
where $\b z\ne\b 0$ is a left eigenvector of $\b A_4$, that is,
\[
\b z\b A_4=s\b z,
\]
where $s\in \mb{eig}(\b A_4)$. Thus
\begin{eqnarray*}
\b q^{\top}\tilde{\b A} &=& \left[\begin{array}{cc}
\b 0 & \b z
\end{array}\right]\tilde{\b A}\\
&=& \left[\begin{array}{cc}
\b 0 & s\b z
\end{array}\right]\\
&=& s\b q^{\top}.
\end{eqnarray*}
Clearly
\[
\b q^{\top}\left[\begin{array}{cc}
s\b I_n-\tilde{\b A} & \tilde{\b B}
\end{array}\right]=\b 0^{\top},
\]
which means that the rank of the matrix $\left[\begin{array}{cc}
s\b I_n-\tilde{\b A} & \tilde{\b B}
\end{array}\right]$ is less than $n$, and therefore the proof of the sufficiency part is complete.\\
\hspace*{5.5in}$\Box$

\section{Observability and Constructability}
As we have seen in the previous section, system reachability implies the ability to completely control the entire state of the system. Suppose now that the system state is not directly accessible. Instead, we have the output of the system,
\[
\b y=\b C\b x + \b D\b u,
\]
where $\b C\in \mb{\Bb R}^{p\times n}$, $p\le n$, and $\b D\in \mb{\Bb R}^{p\times m}$. However, we still want to know the behavior of the entire state.

We say that the system
\[
\left.\begin{array}{lll}
\dot{\b x} &=& \b A\b x+\b B\b u\\
\b y &=& \b C\b x +\b D\b u,
\end{array}\right\}
\]
or equivalently the pair $\left(\b A,\b C\right)$, is {\em observable\/} if there is a finite $t_1>t_0$ such that for arbitrary $\b u(t)$ and resulting $\b y(t)$ over $[t_0,t_1]$, we can determine $\b x(t_0)$ from complete knowledge of the system input $\b u$ and output $\b y$.

Note that once $\b x(t_0)$ is known, we can determine $\b x(t)$ from knowledge of $\b u(t)$ and $\b y(t)$ over any finite time interval $[t_0,t_1]$. We now show how to constructively determine $\b x(t_0)$, given $\b u(t)$ and $\b y(t)$. While doing so we will establish a sufficiency condition for the system to be observable. The condition is also necessary for the system observability as we show it next. To proceed with constructive determination of the state vector, we note that the solution $\b y(t)$ is given by
\[
\b y(t)=\b Ce^{\b A(t-t_0)}\b x_0+\int_{t_0}^{t}\b Ce^{\b A(t-\tau)}\b B\b u(\tau)d\tau +\b D\b u(t).
\]
We subtract $\int_{t_0}^{t}\b Ce^{\b A(t-\tau)}\b B\b u(\tau)d\tau +\b D\b u(t)$ from both sides of the above equation. Let
\[
\b g(t)=\b y(t)-\int_{t_0}^{t}\b Ce^{\b A(t-\tau)}\b B\b u(\tau)d\tau -\b D\b u(t),
\]
then we have
\[
\b g(t)=\b Ce^{\b A(t-t_0)}\b x(t_0),
\]
where $\b g$ is known to us. Our goal now is to determine $\b x(t_0)$. Having $\b x(t_0)$, we can determine the entire $\b x(t)$ for all $t\in[t_0,t_1]$ from the formula
\[
\b x(t)=e^{\b A(t-t_0)}\b x_0+\int_{t_0}^{t}e^{\b A(t-\tau)}\b B\b u(\tau)d\tau.
\]
Pre-multiplying both side of $\b g(t)$ by $e^{\b A^{\top}(t-t_0)}\b C^{\top}$ and integrating the resulting expression between the limits $t_0$ and $t_1$, we get
\[
\int_{t_0}^{t_1}e^{\b A^{\top}(t-t_0)}\b C^{\top} \b Ce^{\b A(t-t_0)}dt\,\b x_0=\int_{t_0}^{t_1}e^{\b A^{\top}(t-t_0)}\b C^{\top}\b g(t)dt.
\]
Let
\[
\b V(t_0,t_1)=\int_{t_0}^{t_1}e^{\b A^{\top}t}\b C^{\top}\b C e^{\b At}dt.
\]
Then, after performing some manipulations and assuming that the matrix $\b V(t_0,t_1)$ is invertible, we obtain
\[
\b x_0=e^{\b At_0}\b V^{-1}(t_0,t_1)e^{\b A^{\top}t_0}\int_{t_0}^{t_1}e^{\b A^{\top}(t-t_0)}\b C^{\top}\b g(t)dt.
\]
Knowledge of $\b x_0$ allows us to reconstruct the entire state $\b x(t)$ over the interval $[t_0,t_1]$. We conclude that if the matrix $\b V(t_0,t_1)$ is invertible, then the system is observable.
%\begin{example}\rm
%For a dynamical system modeled by
%\[
%\left.\begin{array}{lll}
%\dot{\b x} &=& \left[\begin{array}{cc}
%-1/2 & 1/2\\
%-1/2 & 1/2
%\end{array}\right]\b x+\left[\begin{array}{c}
%-1\\
%1
%\end{array}\right]u\\
%y &=& \left[\begin{array}{cc}
%1 & 1
%\end{array}\right]\b x,
%\end{array}\right\}
%\]
%we shall determine $\b x(t)$ over the time interval $[0, 10]$ knowing that $u(t)=1$ for $t\ge 0$ and $y(t)=t^2+2t$ for $t\ge0$.
%
%We first find $\b x(0)$. Knowledge of $\b x(0)$ will allow us to find the entire state vector for all $t\in[0,10]$. We have $t_0=0$ and $t_1=10$. Hence,
%\begin{eqnarray*}
%\b x(t_0) = \b x(0)
%&=& e^{\b At_0}\b V^{-1}(t_0,t_1)e^{\b A^Tt_0}\int_{t_0}^{t_1}e^{\b A^T(t-t_0)}\b c^Tg(t)dt\\
%&=& \b V^{-1}(0,10)\int_{0}^{10}e^{\b A^Tt}\b c^Tg(t)dt,
%\end{eqnarray*}
%where
%\[
%g(t)=y(t)-\b c\int_{0}^te^{\b A(t-\tau)}\b bu(\tau)d\tau.
%\]
%To evaluate the above expression, we first use formula~(\ref{eq:inlatrofunco}) to compute,
%\[
%e^{\b At} = {\cal L}^{-1}\left( [s\b I_2-\b A]^{-1}\right)= {\cal L}^{-1}\left( \left[\begin{array}{cc}
%\frac{1}{s}-\frac{1}{2}\frac{1}{s^2} & \frac{1}{2}\frac{1}{s^2}\\
%-\frac{1}{2}\frac{1}{s^2} & \frac{1}{s}+\frac{1}{2}\frac{1}{s^2}
%\end{array}\right] \right)
%= \left[\begin{array}{cc}
%1-\frac{1}{2}t & \frac{1}{2}t\\
%-\frac{1}{2}t & 1+\frac{1}{2}t
%\end{array}\right].
%\]
%Next, we compute
%\begin{eqnarray*}
%\b V(0,10) &=& \int_0^{10}e^{\b A^Tt}\b c^T\b ce^{\b At}dt\\
%&=& \int_0^{10}\left( \left[\begin{array}{c}
%1-t\\
%1+t
%\end{array}\right]\left[\begin{array}{cc}
%1-t & 1+t
%\end{array}\right]
%\right)dt
%= \int_0^{10}\left[\begin{array}{cc}
%1-2t+t^2 & 1-t^2\\
%1-t^2 & 1+2t + t^2
%\end{array}\right]dt\\
%&=& \left.\left[\begin{array}{cc}
%t-t^2+\frac{t^3}{3} & t-\frac{t^3}{3}\\
%t-\frac{t^3}{3} & t+t^2+\frac{t^3}{3}
%\end{array}\right]\right\arrowvert^{10}_0
%= \left[\begin{array}{cc}
%243.333 & -323.333\\
%-323.333 & 443.333
%\end{array}\right].
%\end{eqnarray*}
%The inverse of $\b V(0,10)$ is
%\[
%\b V^{-1}(0,10)=\left[\begin{array}{cc}
%0.133 & 0.097\\
%0.97 & 0.073
%\end{array}\right].
%\]
%We can now compute $g(t)$ to get
%\begin{eqnarray*}
%g(t) &=& y(t)-\b c\int_0^te^{\b A(t-\tau)}\b bu(\tau)d\tau\\
%&=& t^2+2t -\left[\begin{array}{cc}
%1 & 1
%\end{array}\right]\int_0^t\left[\begin{array}{c}
%-1+t-\tau\\
%1+t+\tau
%\end{array}\right]d\tau
%=t^2+2t-\int_0^t(2t-2\tau)d\tau\\
%&=& \left.t^2+2t-2t(\tau)\right\arrowvert_0^t+\left.\tau^2\right\arrowvert_0^t
%= t^2+2t-t^2\\
%&=&2t.
%\end{eqnarray*}
%Hence,
%\[
%\int_0^{10}e^{\b A^Tt}\b c^Tg(t)dt = \int_0^{10}\left[\begin{array}{c}
%(1-t)2t\\
%(1+t)2t
%\end{array}\right]dt= \left.\left[\begin{array}{c}
%t^2-\frac{2}{3}t^3\\
%t^2+\frac{2}{3}t^3
%\end{array}\right]\right\arrowvert^{10}_0
%= \left[\begin{array}{c}
%-566.6667\\
%766.6667
%\end{array}\right].
%\]
%We can now compute
%\[
%\b x(0) = \b V^{-1}(0,10)\int_0^{10}e^{\b A^Tt}\b c^Tg(t)dt
%= \left[\begin{array}{c}
%-1\\
%1
%\end{array}\right].
%\]
%Alternatively, we could use the Laplace transform method to find $\b x(0)$. Knowing $\b x(0)$, we can find $\b x(t)$ for $t\ge0$,
%\begin{eqnarray*}
%\b x(t) &=& e^{\b At}\b x(0)+\int_0^te^{\b A(t-\tau)}\b bu(\tau)d\tau\\
%&=& \left[\begin{array}{c}
%-1+t\\
%1+t
%\end{array}\right]+\left[\begin{array}{c}
%(-1+t)t-\frac{t^2}{2}\\
%(1+t)t-\frac{t^2}{2}
%\end{array}\right]
%= \left[\begin{array}{c}
%\frac{t^2}{2}-1\\
%\frac{t^2}{2}+2t+1
%\end{array}\right].
%\end{eqnarray*}
%\end{example}\markex
We will now show that the invertibility of $\b V(t_0,t_1)$ is also necessary for observability. We first note that one can use similar arguments to those in the previous section to show that $\b V(t_0,t_1)$ is nonsingular if and only if the $n$ columns of the matrix
\[
\b Ce^{\b At}
\]
are linearly independent for all $t\in [0,\infty)$ over the set of real numbers. Hence, if $\b V(t_0,t_1)$ is singular, there exists a nonzero constant vector, say $\b x_a$, such that $\b V(t_0,t_1)\b x_a=\b 0$. This implies that
\[
\b g(t)=\b Ce^{\b At}\b x_0= \b Ce^{\b At}\left(\b x_0+\b x_a\right).
\]
Thus, $\b x(0)=\b x_0+\b x_a$ yields the same response as $\b x(0)=\b x_0$, which means that we cannot determine the system state, or in other words, the state fails to be observable. In view of the above result, it follows that by repeating essentially the same arguments used in the previous section we can prove the following theorem:
\begin{thm}
The following statements are equivalent:
\begin{itemize}
\item [(1)] The pair $\left(\b A,\b C\right)$ is observable;
\item [(2)] The matrix $\b V(t_0,t_1)$ is nonsingular for all $t_1>t_0$;
%\item [(3)] The $n$ columns of $\b Ce^{\b At}$ are linearly independent for all $t\in[0,\infty)$ over the real numbers;
\item [(3)] The observability matrix
\[
\left[\begin{array}{c}
\b C\\
\b C\b A\\
\vdots\\
\b C\b A^{n-1}
\end{array}\right]\in \mb{\Bb R}^{pn \times n}
\]
is of full rank $n$.
\item [(4)] \[
\mb{rank}\left[\begin{array}{c}
s\b I_n-\b A\\
\b C
\end{array}\right]=n\quad \mb{for all}\quad s\in \mb{eig}(\b A).
\]
\end{itemize}
\end{thm}
%\begin{example}\rm
%For the dynamical system model,
%\[
%\left.\begin{array}{lll}
%\dot{x}&=&\b A\b x=\left[\begin{array}{cc}
%2 & 0\\
%3 & -1
%\end{array}\right]\b x\\
%y&=&\b c\b x=\left[\begin{array}{cc}
%-1 & 1
%\end{array}\right]\b x,
%\end{array}\right\}
%\]
%we will find a non-zero initial vector $\b x(0)=\b x_0$ such that $y(t)=0$ for all $t\ge 0$.
%
%We have $\b x(t)=e^{\b At}\b x_0$, where
%\[
%e^{\b At}={\cal L}^{-1}\left( (s\b I-\b A)^{-1}\right)=\left[\begin{array}{cc}
%e^{2t} & 0\\
%e^{2t}-e^{-t} & e^{-t}
%\end{array}\right].
%\]
%We want
%\[
%0 = y(t)=
%\left[\begin{array}{cc}
%-1 & 1
%\end{array}\right]e^{\b At}\b x_0,\quad \mb{for all}\quad t\ge 0.
%\]
%For example, if
%\[
%\b x_0=\left[\begin{array}{cc}
%1 & 1
%\end{array}\right]^T,
%\]
%then $y(t)=0$ for all $t\ge 0$. Note that we were able to find $\b x_0 \ne \b 0$ such that $y(t)=0$ for all $t\ge 0$, because for all $t\ge 0$, the columns of $\b c e^{\b At}$ are linearly dependent over the real numbers because the pair $(\b A,\b c)$ is nonobservable. The vector $\b x_0$ is in the null-space of the observability matrix
%\[
%\left[\begin{array}{c}
%\b c\\
%\b c\b A
%\end{array}\right].
%\]
%\end{example}\markex
We can also prove analogous result to Theorem~\ref{thm_decomp} for the given pair $(\b A, \b C)$, that is, using a similarity transformation we can separate the observable part from the nonobservable. If the eigenvalues of the nonobservable part of a given pair $(\b A, \b C)$ are all in the open left-hand complex plane, that is, the nonobservable part is asymptotically stable, then we say that the pair $(\b A, \b C)$ is {\em detectable}.

A related notion to observability is the notion of constructability. We say that the system
\[
\left.\begin{array}{lll}
\dot{\b x} &=& \b A\b x+\b B\b u\\
\b y &=& \b C\b x +\b D\b u,
\end{array}\right\}
\]
or equivalently the pair $\left(\b A,\b C\right)$, is {\em constructable\/} if there is a finite $t_1>t_0$ such that for arbitrary $\b u(t)$ and resulting $\b y(t)$ over $[t_0,t_1]$ we can determine $\b x(t_1)$ from complete knowledge of the system input $\b u$ and output $\b y$.

One can verify that in the case of continuous, time invariant systems, observability is equivalent to constructability. In the case of discrete-time systems observability implies constructability, and the two notions are equivalent if the matrix $\b A$ of the given discrete system is nonsingular.

\section{Companion Forms}
In this section, we discuss two types of special forms of a given linear dynamic system model represented by the triple $\left( \b A, \b B, \b C\right)$. These forms are obtained by a change of state variables, and reveal structural properties of the model. We will use the above mentioned forms to construct algorithms for pole placement. The pole placement algorithms will then be used to design state-feedback controllers, as well as state estimators. We begin by introducing the controller companion form, or for short, controller form.

\subsection{Controller Form}
\label{subsec:controform}
We begin by considering a single-input, continuous-time, model represented by
\[
\dot{\b x}(t)=\b A\b x(t)+\b bu(t),
\]
where the pair $\left( \b A,\b b\right)$ is assumed to be reachable, or equivalently, controllable. This means that
\[
\mb{rank}\left[\begin{array}{cccc}
\b b & \b A\b b & \cdots & \b A^{n-1}\b b
\end{array}\right]=n.
\]
We select the last row of the inverse of the controllability matrix. Let $\b q_1$ be that row. Next, we form the matrix
\[
\b T=\left[\begin{array}{c}
\b q_1\\
\b q_1 \b A\\
\vdots\\
\b q_1 \b A^{n-1}
\end{array}\right].
\]
Note that $\b T$ is invertible. Indeed, because
\[
\b T \left[\begin{array}{cccc}
\b b & \b A\b b & \cdots & \b A^{n-1}\b b
\end{array}\right]=\left[\begin{array}{ccccc}
0 & 0 & \cdots & 0 & 1\\
0 & 0 & \cdots & 1 & x\\
\vdots &\vdots &{}& \vdots& \vdots\\
1 & x & \cdots & x & x
\end{array}\right],
\]
this implies that $\b T$ must be nonsingular. In the above, we used the symbol $x$ to denote ``don't care'', unspecified, scalars in our present discussion. Consider now the state variable transformation, $\tilde{\b x}=\b T\b x$. Then, in the new coordinates, the system model is
\begin{eqnarray*}
\dot{\tilde{\b x}}(t)&=&\b T\b A\b T^{-1}\tilde{\b x}(t)+\b T\b bu(t)\\
&=& \tilde{\b A}\tilde{\b x}(t)+\tilde{\b b}u(t).
\end{eqnarray*}
The matrices $\tilde{\b A}$ and $\tilde{\b b}$ have particular structures that we now discuss. We first analyze the structure of $\tilde{\b b}$. Because $\b q_1$ is the last row of the inverse of the controllability matrix, we have
\[
\b q_1\b b=\b q_1\b A\b b=\cdots=\b q_1\b A^{n-2}\b b=0,
\]
and
\[
\b q_1\b A^{n-1}\b b=1.
\]
Hence,
\[
\tilde{\b b} = \b T\b b=\left[\begin{array}{c}
\b q_1\b b\\
\b q_1 \b A\b b\\
\vdots\\
\b q_1\b A^{n-2}\b b\\
\b q_1 \b A^{n-1}\b b
\end{array}\right]= \left[\begin{array}{c}
0\\
0\\
\vdots\\
0\\
1
\end{array}\right].
\]
The structure of $\tilde{\b A}$ is revealed by considering the relation $\b T\b A\b T^{-1}=\tilde{\b A}$ represented as
\[
\b T\b A=\tilde{\b A}\b T.
\]
The left-hand side of the above matrix equation is
\[
\b T\b A=\left[\begin{array}{c}
\b q_1\b A\\
\b q_1 \b A^2\\
\vdots\\
\b q_1\b A^{n-1}\\
\b q_1 \b A^{n}
\end{array}\right].
\]
By the Cayley-Hamilton theorem,
\[
\b A^n=-a_0\b I_n-a_1\b A-\cdots-a_{n-1}\b A^{n-1},
\]
and hence
\[
\b q_1\b A^n=-a_0\b q_1-a_1\b q_1\b A-\cdots-a_{n-1}\b q_1\b A^{n-1}.
\]
Comparing both sides of the equation $\b T\b A=\tilde{\b A}\b T$, and taking into account the Cayley-Hamilton theorem, we get
\[
\tilde{\b A}=\left[\begin{array}{cccccc}
0 & 1 & 0& \cdots& 0 & 0\\
0 & 0 & 1 & \cdots & 0 & 0\\
\vdots & \vdots & {} & {} & {} & \vdots\\
0 & 0 & 0 & \cdots & 0 & 1\\
-a_0 & -a_1 & -a_2 & \cdots & -a_{n-2} & -a_{n-1}
\end{array}\right].
\]
Note that the coefficients of the characteristic polynomial of $\b A$ are immediately apparent by inspecting the last row of $\tilde{\b A}$. There are other benefits of the pair $(\b A,\b b)$ being given in its controller form that we discuss in Section~\ref{sec:linstfec}. We now illustrate the above algorithm for reducing a single-input system into the controller form with a numerical example.
%\begin{example} \rm
%Consider the following dynamical system model:
%\[
%\dot{\b x} = \left[\begin{array}{cccc}
%0 & 0 & 1 & 0\\
%0 & 0 & 0 & 1\\
%-2 & 1 & 0 & 0\\
%1 & -1 & 0 & 0
%\end{array}\right]\b x+\left[\begin{array}{c}
%0\\
%0\\
%1\\
%0
%\end{array}\right]u.
%\]
%The controllability matrix of the pair $(\b A,\b b)$ is
%\[
%\left[\begin{array}{cccc}
%\b b & \b A\b b & \b A^2\b b & \b A^3 \b b
%\end{array}\right]=\left[\begin{array}{cccc}
%0 & 1 & 0 & -2\\
%0 & 0 & 0 & 1\\
%1 & 0 & -2 & 0\\
%0 & 0 & 1 & 0
%\end{array}\right].
%\]
%The pair $(\b A,\b b)$ is controllable because the controllability matrix is nonsingular. We find the last row of the inverse of the controllability matrix to be $\b q_1=\left[\begin{array}{cccc}
%0 & 1 & 0 & 0
%\end{array}\right]$. Hence the transformation matrix is
%\[
%\b T = \left[\begin{array}{c}
%\b q_1\\
%\b q_1\b A\\
%\b q_1 \b A^2\\
%\b q_1 \b A^3
%\end{array}\right]= \left[\begin{array}{cccc}
%0 & 1 & 0 & 0\\
%0 & 0 & 0 & 1\\
%1 & -1 & 0 & 0\\
%0 & 0 & 1 & -1
%\end{array}\right].
%\]
%The matrices $\b A$ and $\b b$ in the new coordinates have the form,
%\[
%\b T\b A\b T^{-1} =\left[\begin{array}{cccc}
%0 & 1 & 0 & 0\\
%0 & 0 & 0 & 1\\
%1 & -1 & 0 & 0\\
%0 & 0 & 1 & -1
%\end{array}\right]\left[\begin{array}{cccc}
%0 & 0 & 1 & 0\\
%0 & 0 & 0 & 1\\
%-2 & 1 & 0 & 0\\
%1 & -1 & 0 & 0
%\end{array}\right]\left[\begin{array}{cccc}
%1 & 0 & 1 & 0\\
%1 & 0 & 0 & 0\\
%0 & 1 & 0 & 1\\
%0 & 1 & 1 & 0
%\end{array}\right]
%= \left[\begin{array}{cccc}
%0 & 1 & 0 & 0\\
%0 & 0 & 1 & 0\\
%0 & 0 & 0 & 1\\
%-1 & 0 & -3 & 0
%\end{array}\right],
%\]
%and
%\[
%\b T\b b = \left[\begin{array}{c}
%0 \\
%0 \\
%0\\
%1
%\end{array}\right].
%\]
%\end{example}\markex
We now generalize the above method of transforming the given pair $(\b A,\b B)$ into the controller form for multi-input systems. We consider a controllable pair $(\b A,\b B)$ where $\b A \in \mb{\Bb R}^{n \times n}$, $\b B \in \mb{\Bb R}^{n \times m}$, $m \le n$, and $\mb{rank}\,\b B=m$. The last assumption we made is just for convenience to simplify further manipulations. This assumption implies that all inputs are mutually independent, which is usually the case in practical applications. We first form the controllability matrix of the pair $(\b A,\b B)$ and represent it as
\begin{equation}
\left[\begin{array}{cccccccccccc}
\b b_1 & \b b_2 &\cdots &\b b_m &\b A\b b_1 & \b A\b b_2 &\cdots &\b A\b b_m & \cdots & \b A^{n-1}\b b_1 &\cdots & \b A^{n-1}\b b_m
\end{array}\right],
\label{eq:exfoocomat}
\end{equation}
where $\b b_i$, $i=1,2,\ldots,m$, is the $i$-th column of $\b B$. The above controllability matrix is of full rank because we assumed that the pair $(\b A,\b B)$ is controllable. Thus, we can select $n$ linearly independent columns from~(\ref{eq:exfoocomat}). We select these columns proceeding from left to right. Then, we rearrange the selected columns to form a $n\times n$ nonsingular matrix $\b L$ of the form
\[
\b L=\left[\begin{array}{ccccccccccc}
\b b_1 & \b A\b b_1 &\cdots &\b A^{d_1-1}\b b_1 & \b b_2 & \cdots &\b A^{d_2-1}\b b_2 & \cdots &\b b_m &\cdots & \b A^{d_m-1}\b b_m
\end{array}\right].
\]
We call the $m$ integers $d_i$ the {\em controllability indices\/} of the pair $(\b A,\b B)$. Note that
\[
\sum_{i=1}^md_i=n.
\]
We call the integer
\[
d=\max \{d_i:i=1,2,\ldots,m\},
\]
the {\em controllability index\/} of the pair $(\b A,\b B)$. Observe that all $m$ columns of $\b B$ are present in $\b L$ because we assumed that $\b B$ is of full rank and the way we selected mutually independent columns from the controllability matrix~(\ref{eq:exfoocomat}) to construct the matrix $\b L$. Furthermore, if the column $\b A^k\b b_j$ is present in $\b L$, then so is $\b A^{k-1}\b b_j$. To proceed further, we let
\[
\sigma_k=\sum_{i=1}^kd_i,\quad\mb{for}\quad k=1,2,\ldots,m.
\]
Note that $\sigma_1=d_1$, $\sigma_2=d_1+d_2$, $\ldots,$ $\sigma_m=\sum_{i=1}^md_i=n$. We now select $m$ rows from $\b L^{-1}$. We denote the selected rows by $\b q_k$, where $\b q_k$ is the $\sigma_k$-th row of $\b L^{-1}$. Next, we form the $n\times n$ matrix
\[
\b T=\left[\begin{array}{c}
\b q_1\\
\b q_1\b A\\
\vdots\\
\b q_1\b A^{d_1-1}\\
\b q_2\\
\vdots\\
\b q_2\b A^{d_2-1}\\
\vdots\\
\b q_m\\
\vdots\\
\b q_m\b A^{d_m-1}
\end{array}\right].
\]
We can show that $\b T$ is nonsingular by computing the product $\b T\b L$ and noticing that $\det(\b T\b L)=\pm 1$. We define a state-variable transformation $\tilde{\b x}=\b T\b x$, and then using similar arguments as in the single-input case, we arrive at the special structure of the pair
\[
\left( \tilde{\b A},\tilde{\b B}\right)=\left( \b T\b A\b T^{-1},\b T\b B\right),
\]
where
\[
\tilde{\b A}=\left[\begin{array}{ccccc|cccc|c|cccc}
0 & 1 & 0 & \cdots & 0 & 0 & 0 & \cdots & 0 & \cdots & 0 & 0 & \cdots & 0\\
0 & 0 & 1 & \cdots& 0 & 0 & 0 & \cdots & 0 & {}& 0 & 0 & \cdots & 0\\
{} & {} & {} & \ddots& {} & \vdots & {} & {} & \vdots & {} & \vdots & {} &{} & \vdots\\
0 & 0 & 0 & \cdots & 1 & 0 & 0 & \cdots & 0 & {} & 0 & 0 & \cdots & 0\\
x & x & x & \cdots & x & x & x & \cdots & x & \cdots & x & x & \cdots & x\\ \hline
0 & 0 & 0 & \cdots & 0 & 0 & 1 & \cdots & 0 & \cdots & 0 & 0 & \cdots & 0\\
\vdots & {} & {} & {} & \vdots & \vdots & {} & \ddots & \vdots & {} & \vdots & {} & {} & \vdots\\
0 & 0 & 0 & \cdots & 0 & 0 & 0 & \cdots & 1 & {} & 0 & 0 & \cdots & 0\\
x & x & x & \cdots & x & x & x & \cdots & x & \cdots & x & x & \cdots & x\\ \hline
\vdots & {} & {} & {}& {}& {} &\vdots &{} & {} & \ddots& {}& {}& \vdots {} & {}\\ \hline
0 & 0 & 0 & \cdots & 0 & 0 & 0 & \cdots & 0 & \cdots & 0 & 1 & \cdots & 0\\
\vdots & {} & {} & {} & \vdots & \vdots & {} & {} & \vdots & {} & \vdots & {} & \ddots & \vdots\\
0 & 0 & 0 & \cdots & 0 & 0 & 0 & \cdots & 0 & {} & 0 & 0 & \cdots & 1\\
x & x & x & \cdots & x & x & x & \cdots & x & \cdots & x & x & \cdots & x
\end{array}
\right].
\]
Note that the $m$ diagonal blocks of $\tilde{\b A}$ have the structure of the controller form as in the single-input case. The dimensions of the diagonal blocks are $d_i \times d_i$, $i=1,2,\dots,m$. The off-diagonal blocks consist of zero elements except for their respective last rows. Thus, all information about $\tilde{\b A}$, as well as $\b A$, can be derived from knowledge of the controllability indices, and the $m$ nonzero rows containing the elements marked using $x$, of the matrix $\tilde{\b A}$. The matrix $\tilde{\b B}$ has the form,
\[
\tilde{\b B}=\left[\begin{array}{ccccc}
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
1 & x & x& x& x\\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0 & 1 & x& x& x\\ \hline
\vdots & {} & {} & {}& \vdots \\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0& 0 & 0& 0& 1
\end{array}\right].
\]
The nonzero rows of $\tilde{\b B}$ correspond to the rows of $\tilde{\b A}$ containing the elements marked using $x$. We now illustrate the above algorithm for reducing a multi-input system model into the controller form with a numerical example.
%\begin{example} \rm
%Consider the pair $(\b A,\b B)$, where
%\[
%\b A=\left[\begin{array}{cccc}
%-1 & 1 & 0 & 1\\
%1 & 1 & 0 & 0\\
%0 & 0 & 4 & 0\\
%1 & 1 & -1 & 2
%\end{array}\right], \quad \b B=\left[\begin{array}{cc}
%1 & 1\\
%2 & 0\\
%1 & 0\\
%0 & 1
%\end{array}\right].
%\]
%We transform the above pair into its controller companion form. Following the algorithm, we find,
%\[
%\mb{rank}\left[\begin{array}{cccc}
%\b b_1 & \b b_2 & \b A\b b_1 & \b A\b b_2
%\end{array}\right]=4.
%\]
%Hence $d_1=d_2=2$. We next form the matrix $\b L$,
%\[
%\b L = \left[\begin{array}{cccc}
%\b b_1 & \b A\b b_1 & \b b_2 & \b A\b b_2
%\end{array}\right]=\left[\begin{array}{cccc}
%1 & 1 & 1 & 0\\
%2 & 3 & 0 & 1\\
%1 & 4 & 0 & 0\\
%0 & 2 & 1 & 3
%\end{array}\right],
%\]
%and
%\[
%\b L^{-1}=\left[\begin{array}{cccc}
%0.20 & 0.60 & 0.40 & -0.20\\
%-0.05 & -0.15 & 0.35 & 0.05\\
%0.85 & -0.45 & 0.05 & 0.15\\
%-0.25 & 0.25 & -0.25 & 0.25
%\end{array}\right].
%\]
%Hence
%\[
%\b q_1=\left[\begin{array}{cccc}
%-0.05 & -0.15 & 0.35 & 0.05
%\end{array}\right],
%\]
%and
%\[
%\b q_2=\left[\begin{array}{cccc}
%-0.25 & 0.25 & -0.25 & 0.25
%\end{array}\right].
%\]
%The transformation matrix is
%\[
%\b T = \left[\begin{array}{c}
%\b q_1\\
%\b q_1\b A\\
%\b q_2\\
%\b q_2\b A
%\end{array}\right]=\left[\begin{array}{cccc}
%-0.05 & -0.15 & 0.35 & 0.05\\
%-0.05 & -0.15 & 1.35 & 0.05\\
%-0.25 & 0.25 & -0.25 & 0.25\\
%0.75 & 0.25 & -1.25 & 0.25
%\end{array}\right].
%\]
%The matrices $\b A$ and $\b B$ in the new coordinates have the form,
%\[
%\b T\b A\b T^{-1}=\left[\begin{array}{cc|cc}
%0 & 1 & 0 & 0\\
%-4 & 5 & 0 & 0\\
%\hline
%0 & 0 & 0 & 1\\
%3 & -3 & 4 & 1
%\end{array}\right]\quad\mb{and}\quad
%\b T\b B=\left[\begin{array}{cc}
%0 & 0\\
%1 & 0\\
%\hline
%0 & 0\\
%0 & 1
%\end{array}\right].
%\]
%\end{example}\markex

\subsection{Observer Form}
In this subsection, we use duality and the algorithms for reducing reachable systems into controller forms to derive analogous results for observable systems. We consider an observable dynamic system model
\begin{equation}
\left.\begin{array}{lll}
\dot{\b x}(t) &=& \b A \b x(t)\\
\b y(t) &=& \b C \b x(t),
\end{array}\right\}
\label{eq:sysforobsfo}
\end{equation}
or, equivalently, the observable pair $(\b A, \b C)$, where $\b A \in \mb{\Bb R}^{n \times n}$, $\b C \in \mb{\Bb R}^{p \times n}$, $p \le n$, and $\mb{rank}\, \b C=p$. We omitted the input variable $\b u$ for convenience because it plays no role in the subsequent discussion. We next consider the {\em dual system\/} model associated with the system~(\ref{eq:sysforobsfo}),
\[
\dot{\b z}(t)=\b A^{\top} \b z(t)+\b C^{\top} \b v(t).
\]
Because the pair $(\b A,\b C)$ is observable, the dual pair $\left(\b A^{\top},\b C^{\top}\right)$ is reachable. Therefore, the pair $\left(\b A^{\top},\b C^{\top}\right)$ can be transformed into the controller form using the algorithm from the previous subsection. We then take the dual of the result to get
\[
\left.\begin{array}{lll}
\dot{\hat{\b x}}(t) &=& \hat{\b A}\hat{\b x}\\
\b y(t) &=& \hat{\b C}\hat{\b x},
\end{array}\right\}
\]
where
\[
\hat{\b A}=\left[\begin{array}{cccc}
\hat{\b A}_{11} & \hat{\b A}_{12}& \cdots& \hat{\b A}_{1p}\\
\hat{\b A}_{21} & \hat{\b A}_{22}& \cdots& \hat{\b A}_{2p}\\
\vdots & {} & {}& \vdots\\
\hat{\b A}_{p1} & \hat{\b A}_{p2}& \cdots& \hat{\b A}_{pp}
\end{array}\right].
\]
Each diagonal submatrix $\hat{\b A}_{ii} \in \mb{\Bb R}^{\hat{d}_i\times \hat{d}_i}$ of $\hat{\b A}$ has the form
\[
\hat{\b A}_{ii}=\left[\begin{array}{ccccc}
0 & 0 & \cdots & 0 & x\\
1 & 0 & \cdots & 0 & x\\
\vdots& {}& \ddots&{}& \vdots\\
0 & 0 & \cdots & 1 & x
\end{array}\right],
\]
which is just the transpose of the controller form for the single-input case. The integers $\hat{d}_i$, $i=1,2,\ldots,p$ are the controllability indices of the controllable pair $\left(\b A^{\top},\b C^{\top}\right)$. The off-diagonal blocks, $j\ne i$, have the form
\[
\hat{\b A}_{ji}=\left[\begin{array}{ccccc}
0 & 0 & \cdots & 0 & x\\
0 & 0 & \cdots & 0 & x\\
\vdots& {}& {}& {}& \vdots\\
0 & 0 & \cdots & 0 & x
\end{array}\right],
\]
that is, they consist of zeros except for their last columns. The matrix $\hat{\b C}$ consists of $p$ blocks and has the form
\[
\hat{\b C}=\left[\begin{array}{cccc|cccc|c|cccc}
0 & 0 & \cdots& 1&0&0 & \cdots & 0 &\cdots& 0 & 0 & \cdots & 0\\
0 & 0 & \cdots& x&0&0 & \cdots & 1 &\cdots& 0 & 0 & \cdots & 0\\
\vdots&{}&{}&\vdots&\vdots&{}&{}&\vdots&{}&\vdots&{}&{}&\vdots\\
0 & 0 & \cdots& x&0&0 & \cdots & x &\cdots& 0 & 0 & \cdots & 1
\end{array}\right].
\]
The $p$ controllability indices of the pair $\left(\b A^{\top},\b C^{\top}\right)$ are called the {\em observability indices\/} of the pair $(\b A,\b C)$. Note that
\[
\sum_{i=1}^p\hat{d}_i=n.
\]
Similarly as in the controller form, we define the {\em observability index\/} of the pair $(\b A,\b C)$ to be the integer
\[
\hat{d}=\max\{\hat{d}_i:i=1,2,\ldots,p\}.
\]
%We now illustrate the above algorithm for transforming an observable pair into the observer form with a numerical example.
%\begin{example}\rm
%\label{ex:ocf}
%Given the following observable pair $(\b A,\b C)$,
%\[
%\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].
%\]
%We transform the pair $\left(\b A^T,\b C^T\right)$ into the controller form. Thus, we first form the controllability matrix for $\left(\b A^T,\b C^T\right)$, then proceeding from left to right, we select the first $n=4$ linearly independent columns. They are
%\[
%\b c_1^T,\b c_2^T,\b A^T\b c_1^T,\left( \b A^T\right)^2\b c_1^T.
%\]
%Therefore, the observability indices are: $\hat{d}_1=3$ and $\hat{d}_2=1$. Hence,
%\[
%\b L = \left[\begin{array}{cccc}
%\b c_1^T & \b A^T\b c_1^T &\left( \b A^T\right)^2\b c_1^T & \b c_2^T
%\end{array}\right]=\left[\begin{array}{cccc}
%1 & 0 & 0 & 0\\
%0 & 0 & 1 & 0\\
%0 & 1 & 3 & 0\\
%0 & 0 & 0 & 1
%\end{array}\right],
%\]
%and
%\[
%\b L^{-1}=\left[\begin{array}{cccc}
%1 & 0 & 0 & 0\\
%0 & -3 & 1 & 0\\
%0 & 1 & 0 & 0\\
%0 & 0 & 0 & 1
%\end{array}\right].
%\]
%The two vectors that we need to form the desired transformation are
%\[
%\b q_1 = \left[\begin{array}{cccc}
%0 & 1 & 0 & 0
%\end{array}\right]\quad\mb{and}\quad \b q_2 = \left[\begin{array}{cccc}
%0 & 0 & 0 & 1
%\end{array}\right].
%\]
%The transformation matrix is
%\[
%\hat{\b T}=\left[\begin{array}{cccc}
%0 & 1 & 0 & 0\\
%0 & -0 & 1 & 0\\
%1 & 2 & 3 & -21\\
%0 & 0 & 0 & 1
%\end{array}\right].
%\]
%The observer form of the pair $(\b A,\b C)$ is given by the matrices
%\[
%\hat{\b A} = \hat{\b T}^{-T}\b A\hat{\b T}^T=\left[\begin{array}{ccc|c}
%0 & 0 & 1& 0\\
%1 & 0 & 2 & 0\\
%0 & 1 & 3& 0\\ \hline
%0 & 0 & -105& 5
%\end{array}\right]\quad\mb{and}\quad
%\hat{\b C}=\b C\hat{\b T}^T=\left[\begin{array}{ccc|c}
%0 & 0 & 1 & 0\\
%0 & 0 & -21 & 1
%\end{array}\right].
%\]
%\end{example}\markex

\section{Linear State-Feedback Control}
\label{sec:linstfec}
In the following sections, we discuss methods for a feedback controller design for linear systems. The design process involves three steps. The first step is the design of a state-feedback control law. In this step, we assume that we have all states available to us for feedback purposes. In general, this may not be the case. The assumption that all the states are available allows us to proceed with the state-feedback control law design. We then proceed with the second step that involves the design of an estimator, also referred to as an observer of the state vector. The estimator should use only the input and output of the plant to be controlled to generate an estimate of the plant state. The last step is to combine the first two steps in that the control law, designed in the first step, uses the state estimate instead of the true state vector. The result of this step is a combined controller-estimator compensator. We first discuss the problem of designing a linear state-feedback control law. In the following sections, we present methods for constructing estimators and combined controller-estimator compensators.

The linear state-feedback control law, for a system modeled by $\dot{\b x}=\b A\b x+\b B\b u$, is the feedback of a linear combination of all the state variables, and has the form
\[
\b u=-\b K\b x,
\]
where $\b K \in \mb{\Bb R}^{m \times n}$ is a constant matrix. The closed-loop system then is
\[
\dot{\b x}=\left( \b A-\b B\b K \right)\b x.
\]
The poles of the closed-loop system are the roots of the characteristic equation
\[
\det\left(s\b I_n-\b A+\b B\b K\right)=0.
\]
The linear state-feedback control law design consists of selecting the gains
\[
k_{ij},\quad i=1,2,\ldots,m,\quad j=1,2,\ldots,n,
\]
so that the roots of the closed-loop characteristic equation
\[
\det\left(s\b I_n-\b A+\b B\b K\right)=0
\]
are in desirable locations in the complex plane. We assume that a designer has made the selection of the desired poles of the closed-loop system and they are:
\[
s_1,s_2,\ldots,s_n.
\]
The desired closed-loop poles can be real or complex. If they are complex, then they must come in complex conjugate pairs. This is because we use only real gains $k_{ij}$. Having selected the desired closed-loop poles we can form the desired closed-loop characteristic polynomial,
\begin{eqnarray*}
\alpha_c(s) &=& (s-s_1)(s-s_2)\cdots(s-s_n)\\
&=& s^n + \alpha_{n-1}s^{n-1}+\cdots+\alpha_1s+\alpha_0.
\end{eqnarray*}
Our goal is to select a feedback matrix $\b K$ such that
\[
\det\left(s\b I_n-\b A+\b B\b K\right)=s^n + \alpha_{n-1}s^{n-1}+\cdots+\alpha_1s+\alpha_0.
\]
The above problem is also referred to as the {\em pole placement\/} problem. We first discuss the pole placement problem for the single-input plants. In this case $\b K=\b k\in \mb{\Bb R}^{1\times n}$. The solution to the problem is easily obtained if the pair $(\b A,\b b)$ is already in the controller companion form. In such a case we have
\[
\b A-\b b\b k =\left[\begin{array}{cccccc}
0 & 1 & 0 & \cdots & 0 & 0\\
0 & 0 & 1 & \cdots & 0 & 0\\
\vdots & {}& {}& {}& {}& \vdots\\
0 & 0 & 0 & \cdots & 0 & 1\\
-a_0-k_1 & -a_1-k_2 & -a_2-k_3 & \cdots & -a_{n-2}-k_{n-1}& -a_{n-1}-k_n
\end{array}\right].
\]
Hence, the desired gains are
\begin{eqnarray*}
k_1 &=& \alpha_0-a_0,\\
k_2 &=& \alpha_1-a_1,\\
{}&\vdots&{}\\
k_n &=& \alpha_{n-1}-a_{n-1}.
\end{eqnarray*}
If the pair $(\b A,\b b)$ is not in the controller companion form, we first transform it into the companion form, and then compute the gain vector $\tilde{\b k}$ such that
\[
\det\left(s\b I_n-\tilde{\b A}+\tilde{\b b}\tilde{\b k}\right)=s^n + \alpha_{n-1}s^{n-1}+\cdots+\alpha_1s+\alpha_0.
\]
Thus,
\[
\tilde{\b k}=\left[\begin{array}{cccc}
\alpha_0-a_0 & \alpha_1-a_1 & \cdots & \alpha_{n-1}-a_{n-1}
\end{array}\right].
\]
Then,
\[
\b k=\tilde{\b k}\b T,
\]
where $\b T$ is the transformation that brings the pair $(\b A,\b b)$ into the controller companion form.

We can represent the above formula for the gain matrix in an alternative way. For this note that
\begin{eqnarray*}
\tilde{\b k}\b T &=& \left[\begin{array}{cccc}
\alpha_0-a_0 & \alpha_1-a_1 & \cdots & \alpha_{n-1}-a_{n-1}
\end{array}\right]\left[\begin{array}{c}
\b q_1\\
\b q_1\b A\\
\vdots\\
\b q_1\b A^{n-1}
\end{array}\right]\\
&=& \b q_1\left( \alpha_0 \b I_n+\alpha_1\b A+\cdots +\alpha_{n-1}\b A^{n-1}\right)-\b q_1\left( a_0 \b I_n+a_1\b A+\cdots +a_{n-1}\b A^{n-1}\right).
\end{eqnarray*}
By the Cayley-Hamilton theorem,
\[
\b A^n=-\left( a_0\b I_n+a_1\b A+\cdots+a_{n-1}\b A^{n-1} \right).
\]
Hence,
\[
\b k=\b q_1 \alpha_c\left( \b A \right).
\]
The above expression for the gain row vector was proposed by Ackermann in 1972, and is now referred to as the {\em Ackermann's formula} for pole placement.
%\begin{example}\rm
%For the linear dynamical system
%\[
%\dot{\b x}=\left[\begin{array}{cc}
%1 & -1\\
%1 & -2
%\end{array}\right]\b x + \left[\begin{array}{c}
%2\\
%1
%\end{array}\right]u,
%\]
%we will use the Ackermann's formula to design a state-feedback controller, $u=-\b k\b x$, such that the closed-loop poles are located at $\{-1, -2\}$.
%
%
%To use the Ackermann's formula, we first form the controllability matrix of the pair $(\b A,\b b)$ and then find the last row of its inverse denoted $\b q_1$. The controllability matrix is
%\[
%\left[\begin{array}{cc}
%\b b & \b A\b b
%\end{array}\right]=\left[\begin{array}{cc}
%2 & 1\\
%1 & 0
%\end{array}\right].
%\]
%The inverse of the above matrix is
%\[
%\left[\begin{array}{cc}
%0 & 1\\
%1 & -2
%\end{array}\right].
%\]
%Hence, $\b q_1=\left[\begin{array}{cc}
%1 & -2
%\end{array}\right]$. The desired closed-loop characteristic polynomial is
%\[
%\alpha_c(s)=(s+1)(s+2)=s^2+3s+2.
%\]
%Therefore,
%\begin{eqnarray*}
%\b k&=&\b q_1\alpha_c(\b A)\\
%&=&\b q_1\left(\b A^2+3\b A+2\b I_2 \right)\\
%&=& \b q_1\left(\left[\begin{array}{cc}
%1 & -1\\
%1 & -2
%\end{array}\right]\left[\begin{array}{cc}
%1 & -1\\
%1 & -2
%\end{array}\right]+3\left[\begin{array}{cc}
%1 & -1\\
%1 & -2
%\end{array}\right]+2\left[\begin{array}{cc}
%1 & 0\\
%0 & 1
%\end{array}\right] \right)\\
%&=& \b q_1\left(\left[\begin{array}{cc}
%0 & 1\\
%-1 & 3
%\end{array}\right]+\left[\begin{array}{cc}
%3 & -3\\
%3 & -6
%\end{array}\right]+\left[\begin{array}{cc}
%2 & 0\\
%0 & 2
%\end{array}\right] \right)\\
%&=& \left[\begin{array}{cc}
%1 & -2
%\end{array}\right]\left[\begin{array}{cc}
%5 & -2\\
%2 & -1
%\end{array}\right]\\
%&=& \left[\begin{array}{cc}
%1 & 0
%\end{array}\right]
%\end{eqnarray*}
%\end{example}\markex

We now present a pole placement algorithm for multi-input systems. If the pair $(\b A,\b B)$ is already in the controller companion form, then we may proceed as follows. First, represent the matrix $\b B$ as
\[
\b B=\left[\begin{array}{ccccc}
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
1 & x & x& x& x\\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0 & 1 & x& x& x\\ \hline
\vdots & {} & {} & {}& \vdots \\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0& 0 & 0& 0& 1
\end{array}\right]=\left[\begin{array}{ccccc}
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
1 & 0 & 0& 0& 0\\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0 & 1 & 0& 0& 0\\ \hline
\vdots & {} & {} & {}& \vdots \\ \hline
0 & 0 & \cdots& 0 & 0\\
0 & 0 & \cdots& 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
0& 0 & 0& 0& 1
\end{array}\right]\left[\begin{array}{ccccc}
1 & x & \cdots & x & x\\
0 & 1 & \cdots & x & x\\
\vdots & {} & \ddots & {} & \vdots\\
0 & 0 & \cdots & 1 & x\\
0 & 0 & \cdots & 0 & 1
\end{array}\right]
= \hat{\b B}\b \Gamma,
\]
where the square and nonsingular matrix $\b \Gamma$ consists of the nonzero rows of $\b B$. Next, let
\[
\hat{\b K}=\b \Gamma \b K.
\]
Notice that
\[
\hat{\b B}\hat{\b K}=\left[\begin{array}{ccccc}
0 & 0 & \cdots & 0 & 0\\
0 & 0 & \cdots & 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
\hat{k}_{11} & \hat{k}_{12} & \cdots & \hat{k}_{1\,n-1}& \hat{k}_{1n}\\ \hline
0 & 0 & \cdots & 0 & 0\\
0 & 0 & \cdots & 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
\hat{k}_{21} & \hat{k}_{22} & \cdots & \hat{k}_{2\,n-1}& \hat{k}_{2n}\\ \hline
\vdots & {} & {}& {}& \vdots\\ \hline
0 & 0 & \cdots & 0 & 0\\
0 & 0 & \cdots & 0 & 0\\
\vdots & {}& {}& {}& \vdots\\
\hat{k}_{m1} & \hat{k}_{m2} & \cdots & \hat{k}_{m\,n-1}& \hat{k}_{mn}
\end{array}\right],
\]
that is, the nonzero rows in the product $\hat{\b B}\hat{\b K}$ match the nonzero rows of the matrix $\b A$ in the controller companion form. We can then, for example, select the gains $k_{ij}$, $i=1,2,\ldots,m$, $j=1,2,\ldots,n$, so that
\[
\b A-\b B\b K = \b A-\hat{\b B}\hat{\b K}=\left[\begin{array}{cccccc}
0 & 1 & 0 & \cdots & 0 & 0\\
0 & 0 & 1 & \cdots & 0 & 0\\
\vdots & {}& {}& {}& {}& \vdots\\
0 & 0 & 0 & \cdots & 0 & 1\\
-\alpha_0 & -\alpha_1 & -\alpha_2 & \cdots & -\alpha_{n-2}& -\alpha_{n-1}
\end{array}\right],
\]
where
\[
\b K=\b \Gamma^{-1}\hat{\b K}.
\]
If the pair $(\b A, \b B)$ is not in the controller companion form, we first transform it into this form, then compute the gain matrix that allocates the closed-loop poles into the desired locations for the pair $(\b A, \b B)$ in the controller form. The gain matrix $\b K$ that allocates the closed-loop poles into the prespecified locations for the pair $(\b A, \b B)$ in the original coordinates is then given by
\[
\b K=\b \Gamma^{-1}\hat{\b K}\b T,
\]
where $\b T$ is the transformation matrix that brings the pair $(\b A, \b B)$ into the controller companion form.
%\begin{example}\rm
%\label{ex:twoinpopl}
%For the 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 B=\left[\begin{array}{cc}
%1 & 0\\
%0 & 0\\
%0 & 0\\
%0 & 1
%\end{array}\right],
%\]
%we will use its controller companion form to find the matrix $\b K\in \mb{\Bb R}^{2\times4}$ so that closed-loop poles are located at
%\[
%-2,-3+j,-3-j,-4.
%\]
%
%We first transform the pair $(\b A,\b B)$ into its controller companion form. We begin by forming the controllability matrix
%\[
%\left[\begin{array}{cccccc}
%\b b_1 & \b b_2 & \b A\b b_1 & \b A\b b_2 & \b A^2\b b_1&\cdots
%\end{array}\right]=\left[\begin{array}{cccccc}
%1& 0 & 0 & 0 & 0 &\cdots\\
%0 & 0 & 1 & 0 & 0 & \cdots\\
%0 & 0 & 0 & 0 & 1 & \cdots\\
%0 & 1 & 0 & 5 & 0 & \cdots
%\end{array}\right].
%\]
%We then select, proceeding from left to right, the first four linearly independent columns from the above controllability matrix. We obtain
%\[
%\left[\begin{array}{cccc}
%\b b_1 & \b b_2 & \b A\b b_1 & \b A^2\b b_1
%\end{array}\right].
%\]
%Thus, the controllability indices are $d_1=3$ and $d_2=1$. We rearrange the above columns and form the matrix $\b L$ of the form
%\[
%\b L = \left[\begin{array}{cccc}
%\b b_1 & \b A\b b_1 & \b A^2\b b_1 & \b b_2
%\end{array}\right]= \b I_4= \b L^{-1}.
%\]
%The two row vectors that we need in constructing the transformation are
%\[
%\b q_1 = \left[\begin{array}{cccc}
%0 & 0 & 1 & 0
%\end{array}\right]\quad\mb{and}\quad \b q_2 = \left[\begin{array}{cccc}
%0 & 0 & 0 & 1
%\end{array}\right].
%\]
%The transformation matrix is
%\begin{eqnarray*}
%\b T&=& \left[\begin{array}{c}
%\b q_1\\
%\b q_1\b A\\
%\b q_1\b A^2\\
%\b q_2
%\end{array}\right]=\left[\begin{array}{cccc}
%0 & 0 & 1 & 0\\
%0 & 1 & 3 & 0\\
%1 & 3 & 11 & 0\\
%0 & 0 & 0 & 1
%\end{array}\right].
%\end{eqnarray*}
%The pair $(\b A,\b B)$ in the new coordinates has the form
%\[
%\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{ccc|c}
%0 & 1 & 0 & 0\\
%0 & 0 & 1 & 0\\
%1 & 2 & 3 & 0\\ \hline
%-21 & 0 & 0 & 5
%\end{array}\right]\quad\mb{and}\quad
%\tilde{\b B}=\b T\b B=\left[\begin{array}{cc}
%0 & 0\\
%0 & 0\\
%1 & 0\\ \hline
%0 & 1
%\end{array}\right].
%\]
%The desired closed-loop characteristic polynomial is
%\[
%\alpha_c(s) = (s+2)(s+3-j)(s+3+j)(s+4)= s^4+12s^3+54s^2+108s+80.
%\]
%A possible choice of the gain matrix $\tilde{\b K}$, from among many, that does the job is $\tilde{\b K}$ such that
%\[
%\tilde{\b A}-\tilde{\b B}\tilde{\b K}=\left[\begin{array}{cccc}
%0 & 1 & 0 & 0\\
%0 & 0 & 1 & 0\\
%0 & 0 & 0 & 1\\
%-80 & -108 & -54 & -12
%\end{array}\right].
%\]
%Note that $\b \Gamma = \b I_2$. Therefore,
%\[
%\tilde{\b K}=\left[\begin{array}{cccc}
%1 & 2 & 3 & -1\\
%59 & 108& 54 & 17
%\end{array}\right],
%\]
%and thus
%\[
%\b K = \tilde{\b K}\b T= \left[\begin{array}{cccc}
%3 & 11 & 40 & -1\\
%54 & 270 & 977 & 17
%\end{array}\right].
%\]
%\end{example}\markex
The above algorithm for pole placement for multi-input systems is more of theoretical value rather than practical. This algorithm is not well suited for numerical implementations because the transformation of a given pair $(\b A, \b B)$ into the controller companion form suffers from poor numerical properties. For a discussion of pole placement numerically stable algorithms for multi-input systems, we refer the reader to Jamshidi, Tarokh, and Shafai~\cite{jamshidi92}.


Unlike in the single-input case, a solution to the pole placement problem for a multi-input system is not unique. Therefore, one can use the remaining degrees of freedom to achieve secondary goals.

Using the results preceding the above discussion, we can state and prove a fundamental theorem of linear systems.
\begin{thm}
\label{thm:pp}
The pole placement problem is solvable for all choices of $n$ desired closed-loop poles, symmetric with respect to the real axis, if and only if the given pair $(\b A, \b B)$ is reachable.
\end{thm}
{\bf Proof} \quad The pair $(\b A, \b B)$ is reachable, if and only if it can be transformed into the controller canonical form. Once the transformation is performed, we can solve the pole placement problem for the given set of desired closed-loop poles, symmetric with respect to the real axis. We then transform the pair $(\b A, \b B)$ and the gain matrix back into the original coordinates. Because the similarity transformation does not affect neither controllability nor the characteristic polynomial, the eigenvalues of $\b A-\b B\b K$ are precisely the desired prespecified closed-loop poles. This completes the proof of the necessity part.

We use a proof by contraposition to prove the sufficiency part ($\Rightarrow$). Assume that the pair $(\b A, \b B)$ is nonreachable. By Theorem~\ref{thm_decomp}, there is a similarity transformation $\b z=\b T\b x$ such that the pair $(\b A,\b B)$ in the new coordinates has the form
\[
\tilde{\b A}=\b T\b A\b T^{-1}=\left[\begin{array}{cc}
\b A_1 & \b A_2\\
\b O & \b A_4
\end{array}\right],\quad \tilde{\b B}=\b T\b B=\left[\begin{array}{c}
\b B_1\\
\b O
\end{array}\right],
\]
where the pair $\left(\b A_1,\b B_1\right)$ is reachable, $\b A_1 \in \mb{\Bb R}^{r\times r}$, and $\b B_1 \in \mb{\Bb R}^{r\times m}$. Let
\[
\b u=-\tilde{\b K}\b z=-\left[\begin{array}{cc}
\b K_1 & \b K_2
\end{array}\right]\b z,
\]
where $\b K_1 \in \mb{\Bb R}^{m \times r}$ and $\b K_2 \in \mb{\Bb R}^{m \times (n-r)}$. Then,
\begin{equation}
\tilde{\b A}-\tilde{\b B}\tilde{\b K}=\left[\begin{array}{cc}
\b A_1-\b B_1\b K_1 & \b A_2-\b B_1\b K_2\\
\b O & \b A_4
\end{array}\right].
\label{eq:unconotaffe}
\end{equation}
It follows from~(\ref{eq:unconotaffe}) that the nonreachable portion of the system is not affected by the state-feedback, that is, the eigenvalues of $\b A_4$ cannot be allocated. Hence, the pole placement problem cannot be solved if the pair $(\tilde{\b A}, \tilde{\b B})$, or equivalently the pair $(\b A, \b B)$, is nonreachable, which completes the proof of the sufficiency part.\\
\hspace*{5.5in} $\Box$

For an alternative proof of this important result, the reader may consult Wonham~\cite{wonham67}.



\bibliography{Mybook,root2}
\bibliographystyle{plain}
\end{document} 