\section{Discontinuous Estimators}
So far in our discussion of VSC design we assumed that the entire state vector of the plant to be controlled is available to us through measurement. If the state vector cannot be measured, then we can try to determine its suitable estimate that can be used by the controller instead of the true state vector. If we use a state vector estimate for the inaccessible state, then we split a control design problem into three phases. The first phase is the design of a controller assuming the availability of the entire state vector of the plant. In the second phase we construct a state estimator based on the plant input and output. In the final, third, phase we combine the controller and the estimator into the combined controller-estimator compensator.

We now discuss the problem of constructing a state estimator for a class of dynamic systems with matched uncertainties modeled by
\begin{eqnarray*}
\dot{\mb{\bm$x$}} &=& \mb{\bm$A$}\mb{\bm$x$} + \mb{\bm$B$}\left(\mb{\bm$u$}+\mb{\bm$\xi$} \right)\\
\mb{\bm$y$} &=& \mb{\bm$C$}\mb{\bm$x$},
\end{eqnarray*}
where $\mb{\bm$C$} \in \mb{\Bb R}^{p \times n}$, and $p \ge m$, which means that the number of input channels does not exceed the number of output channels. The vector function $\mb{\bm$\xi$}$ models the lumped uncertainties or nonlinearities in the plant. We assume that there is a nonnegative real-valued function $\rho = \rho\left(\mb{\bm$y$}\right)$ such that
\[
\|\mb{\bm$\xi$}\| \le \rho.
\]
We assume that the pair $\left( \mb{\bm$A$},\mb{\bm$C$} \right)$ is observable. Our goal is to construct the plant state estimator. Let $\hat{\mb{\bm$x$}}$ be the estimate of $\mb{\bm$x$}$. We denote the estimation error by $\mb{\bm$e$}$, that is,
\[
\mb{\bm$e$}(t)=\hat{\mb{\bm$x$}}(t)-\mb{\bm$x$}(t).
\]
The observability of $\left( \mb{\bm$A$},\mb{\bm$C$} \right)$ implies the existence of a matrix $\mb{\bm$L$} \in \mb{\Bb R}^{n \times p}$ such that $\mb{\bm$A-LC$}$ has prescribed (symmetric with respect to the real axis) eigenvalues in the open left half plane. Since $\mb{\bm$A-LC$}$ is asymptotically stable, by a Lyapunov theorem for any $\mb{\bm$Q$}=\mb{\bm$Q$}^{T}>0$, there is a unique $\mb{\bm$P$}=\mb{\bm$P$}^{T}>0$ such that
\[
\left(\mb{\bm$A$}-\mb{\bm$L$}\mb{\bm$C$} \right) ^{T}\mb{\bm$P$}+\mb{\bm$P$}\left(\mb{\bm$A$}-\mb{\bm$L$}\mb{\bm$C$} \right)=-\mb{\bm$Q$}.
\]
We choose $\mb{\bm$Q$}$, if possible, so that for some $\mb{\bm$F$} \in \mb{\Bb R}^{m \times p}$ we obtain
\[
\mb{\bm$F$}\mb{\bm$C$}=\mb{\bm$B$}^{T}\mb{\bm$P$}.
\]
We need this technical condition for the construction of the state estimator. This condition has a nice system theoretic interpretation. Its satisfaction means that the transfer function matrix
\[
\mb{\bm$G$}(s)=\mb{\bm$FC$}\left(s\mb{\bm$I$}-\mb{\bm$A$}+\mb{\bm$LC$} \right)^{-1}\mb{\bm$B$}
\]
is positive real, that is, the elements of $\mb{\bm$G$}(s)$ are analytic in the open right half plane and $\mb{\bm$G$}(s)+\mb{\bm$G$}^{*}(s) \ge 0$ in the open right half plane. Here the superscript asterisk denotes the conjugate transpose. To proceed, define the vector function
\[
\mb{\bm$E$}\left(\mb{\bm$e$}, \eta \right)=\left\{\begin{array}{ccc}
\frac{\mb{\bm$FCe$}}{\|\mb{\bm$FCe$}\|}\eta & \mb{for} & \mb{\bm$FCe$}\ne \mb{\bm$0$}\\
\left\{\mb{\bm$v$}:\mb{\bm$v$} \in \mb{\Bb R}^{m},\|\mb{\bm$v$}\| \le \eta \right\} & \mb{for} & \mb{\bm$FCe$}=\mb{\bm$0$},
\end{array}\right.
\]
where $\eta \ge 0$ is a design parameter.\\
Note that if we have a single-input single-output plant then assuming $\mb{\bm$F$}=1$ we obtain
\[
\mb{\bm$E$}(\mb{\bm$e$},\eta)=\eta \,\mb{sign}\left(\mb{\bm$ce$}\right).
\]

We now introduce the state estimator proposed by Walcott and \.{Z}ak~\cite{walcott87}. It has the form
\[
\dot{\hat{\mb{\bm$x$}}}=\left(\mb{\bm$A$}-\mb{\bm$LC$} \right)\hat{\mb{\bm$x$}}-\mb{\bm$BE$}(\mb{\bm$e$},\eta)+\mb{\bm$Ly$}+\mb{\bm$Bu$}.
\]
If $\eta \ge \rho$, the function $\hat{\mb{\bm$x$}}$ is an asymptotic estimate of the state $\mb{\bm$x$}$, that is,
\[
\lim_{t \to \infty}\mb{\bm$e$}(t)=\lim_{t \to \infty} \left(\hat{\mb{\bm$x$}}(t)-\mb{\bm$x$}(t) \right)=\mb{\bm$0$}.
\]
We can prove the above statement using Lyapunov's type of arguments. We first construct the differential equation satisfied by the error
\begin{eqnarray*}
\dot{\mb{\bm$e$}} &=& \dot{\hat{\mb{\bm$x$}}}-\dot{\mb{\bm$x$}}\\
&=& \left(\mb{\bm$A$}-\mb{\bm$LC$} \right)\mb{\bm$e$}-\mb{\bm$BE$}(\mb{\bm$e$},\eta)-\mb{\bm$B\xi$}.
\end{eqnarray*}
We then show that
\[
\frac{d}{dt}\left(\mb{\bm$e$}^{T}\mb{\bm$Pe$} \right)=-\mb{\bm$e$}^{T}\mb{\bm$Qe$}<0,
\]
which implies
\[
\lim_{t \to \infty}\mb{\bm$e$}(t)=\mb{\bm$0$}.
\]
We conclude that the estimation error is insensitive to matched uncertainty. For further analysis of the above type of state estimators we refer the reader to Edwards and Spurgeon~\cite{edwards94}.

\section{Boundary Layer Estimators}
We can view the error differential equation $\dot{\mb{\bm$e$}} =\left(\mb{\bm$A$}-\mb{\bm$LC$} \right)\mb{\bm$e$}-\mb{\bm$BE$}(\mb{\bm$e$},\eta)-\mb{\bm$B\xi$}$ as a model of a closed-loop system, with matched uncertainties, controlled by $-\mb{\bm$E$}(\mb{\bm$e$},\eta)$. The controller is discontinuous and varies its structure with respect to the switching surface $\left\{\mb{\bm$e$}:\mb{\bm$FCe$}=\mb{\bm$0$}\right\}$. In our analysis we assumed that $\mb{\bm$E$}(\mb{\bm$e$},\eta)$ can switch with infinitely high frequency. In practice, very high frequencies may excite unmodeled high frequency modes and degrade the system performance. The alleviate this problem we smooth out the discontinuous part of the estimator by introducing a boundary layer around the surface $\left\{\mb{\bm$e$}:\mb{\bm$FCe$}=\mb{\bm$0$}\right\}$. This results in replacing $\mb{\bm$E$}(\mb{\bm$e$},\eta)$ by its continuous approximation $\tilde{\mb{\bm$E$}}(\mb{\bm$e$},\eta)$. An example of such a continuous approximation is
\[
\tilde{\mb{\bm$E$}}\left(\mb{\bm$e$}, \eta \right)=\left\{\begin{array}{ccc}
\frac{\mb{\bm$FCe$}}{\|\mb{\bm$FCe$}\|}\eta & \mb{for} & \|\mb{\bm$FCe$}\| \ge \epsilon\\
\frac{\mb{\bm$FCe$}}{\epsilon}\eta & \mb{for} & \|\mb{\bm$FCe$}\| < \epsilon,
\end{array}\right.
\]
where $\epsilon$ is the width of the boundary layer. However, the error equation, or more precisely $\mb{\bm$e$}=\mb{\bm$0$}$, is not anymore asymptotically stable when a boundary layer estimator is used. To describe the behavior of the error differential equation resulting from the application of a boundary layer estimator, we need the following definitions.
\begin{defn}
The ball $B_{\delta}=\left\{ \mb{\bm$e$}\,:\, \|\mb{\bm$e$}\| \le \delta \right\}$ is uniformly stable if for all $\theta > \delta$, there is $r(\theta) > 0$ so that if $\|\mb{\bm$e$}(t_0) \| \le r(\theta)$, then $\|\mb{\bm$e$}(t)\| \le \theta$ for $t \ge t_0$.
\end{defn}
\begin{defn}
\label{def:ub}
The equilibrium $\mb{\bm$e$}=\mb{\bm$0$}$ is uniformly bounded if for any given $r>0$, there exists $d(r)< \infty$ so that for each solution $\mb{\bm$e$}(t) = \mb{\bm$e$}(t;t_0,\mb{\bm$e$}_0)$ with $\|\mb{\bm$e$}_0\| \le r$, we have $\|\mb{\bm$e$}(t)\| \le d(r)$ for all $t\ge t_0$.
\end{defn}
We next define the uniform ultimate boundedness, or for short, practical stability.
\begin{defn}
The error is uniformly ultimately bounded, or practically stable, with respect to the ball $B$ if for every $r>0$, there is $T(r) \ge t_0$ such that for each solution $\mb{\bm$e$}(t)$ with $\|\mb{\bm$e$}(t_0)\| \le r$, we have $\mb{\bm$e$} \in B$ for $t \ge T(r)$.
\end{defn}

We can show that the error of the boundary layer estimator is uniformly ultimately bounded. Specifically, the estimation error of the boundary layer estimator ends in a ball whose radius depends on $\epsilon$. The ball radius tends to zero with $\epsilon$ tending to zero. To see this consider, as before, the Lyapunov function candidate $V(\mb{\bm$e$})=\mb{\bm$e$}^{T}\mb{\bm$P$}\mb{\bm$e$}$. Performing simple algebraic manipulations yields
\begin{eqnarray*}
\frac{d}{dt}V(\mb{\bm$e$}) &=& -\mb{\bm$e$}^{T}\mb{\bm$Qe$} - 2\mb{\bm$e$}^{T}\mb{\bm$PB$}\tilde{\mb{\bm$E$}}(\mb{\bm$e$},\eta) - 2\mb{\bm$e$}^{T}\mb{\bm$PB$}\mb{\bm$\xi$}\\
&\le& \left\{\begin{array}{ccc}
-\mb{\bm$e$}^{T}\mb{\bm$Qe$} & \mb{for} & \|\mb{\bm$FCe$}\| \ge \epsilon\\
-\mb{\bm$e$}^{T}\mb{\bm$Qe$}+2\epsilon \rho &\mb{for}& \|\mb{\bm$FCe$}\| < \epsilon.
\end{array}\right.
\end{eqnarray*}
To obtain the last inequality we used the definition of $\tilde{\mb{\bm$E$}}$ and the fact that
\[
\mb{\bm$e$}^{T}\mb{\bm$PBFCe$}=\|\mb{\bm$FCe$}\|^2 \ge 0.
\]
Since
\[
-\mb{\bm$e$}^{T}\mb{\bm$Qe$}+2\epsilon \rho \le -\lambda_{\mb{min}}(\mb{\bm$Q$})\|\mb{\bm$e$}\|^2 + 2\epsilon \rho,
\]
we conclude that $\frac{d}{dt}V(\mb{\bm$e$}) < 0$ for
\[
\|\mb{\bm$e$}\| > \sqrt{\frac{2 \epsilon \rho}{\lambda_{\mb{min}}(\mb{\bm$Q$})}} \stackrel{\rm def}{=}R.
\]
We illustrate the regions used in the discussion of the boundary layer state estimator in Figure~\ref{fig:euub_2d}.
\vspace*{0.1in}
\begin{figure}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/euub_2d.bmp x=4in y=3in}
\caption{A two-dimensional illustration of a uniformly ultimately bounded error.}
\label{fig:euub_2d}
\end{figure}
Referring to Figure~\ref{fig:euub_2d} and Definition~\ref{def:ub} we have
\[
d(r)=\sqrt{\frac{\lambda_{\mb{max}}(\mb{\bm$P$})}{\lambda_{\mb{min}}(\mb{\bm$P$})}}\,R.
\]
The estimation error is uniformly ultimately bounded, that is, practically stable, with respect to any ball with a radius greater than
\[
\sqrt{\frac{\lambda_{\mb{max}}(\mb{\bm$P$})}{\lambda_{\mb{min}}(\mb{\bm$P$})}}\,R.
\]
For a stability analysis of uncertain closed-loop systems with the combined estimator-controller compensators we refer the reader to Hui and \.{Z}ak~\cite{hui92}.