\chapter{Practical Stability}
A drawback to the discontinuous controllers discussed in the previous chapters is that rapid switching tends to excite high frequency modes of the plant and this may degrade the performance of the controller. These problems can be alleviated with the insertion of a {\em boundary layer\/} about a switching surface resulting in a continuous control strategy. However, there is a price tag for making discontinuous controllers continuous. The closed-loop system driven by a boundary layer controller may only be {\em uniformly ultimately bounded\/} rather than asymptotically stable. Specifically, we can only prove that a neighborhood of  the equilibrium point of interest, rather than the equilibrium point itself, is stable. We refer to this kind of stability as practical stability. The notions we are concerned with in this chapter are spelled out in the following three definitions.
\begin{defn}
The ball $B_{q}=\left\{ \mb{\bm$x$}\,:\, \|\mb{\bm$x$}\| \le q \right\}$ is uniformly stable if for all $\varepsilon > q$, there is $\delta=\delta(\varepsilon) > 0$ so that if $\|\mb{\bm$x$}(t_0) \| \le \delta$, then $\|\mb{\bm$x$}(t)\| \le \varepsilon$ for $t \ge t_0$.
\end{defn}
For the benefit of the reader we now rephrase the definition of uniform boundedness from Section~\ref{ch:stability}.
\begin{defn}
A system is uniformly bounded if for any given $d>0$, there exists $b=b(d)< \infty$ so that for each solution $\mb{\bm$x$}(t) = \mb{\bm$x$}(t;t_0,\mb{\bm$x$}_0)$ with $\|\mb{\bm$x$}_0\| \le d$, we have $\|\mb{\bm$x$}(t)\| \le b$ for all $t\ge t_0$.
\end{defn}
We next define the uniform ultimate boundedness of a system, or for short, practical stability.
\begin{defn}
A system is uniformly ultimately bounded, or practically stable, with respect to the ball $B$ if for every $d>0$, there is $T(d) \ge t_0$ such that for each solution $\mb{\bm$x$}(t)$ with $\|\mb{\bm$x$}(t_0)\| \le d$, we have $\mb{\bm$x$} \in B$ for $t \ge T(d)$.
\end{defn}

We now consider a dynamic system model of the form
\[
\dot{\mb{\bm$x$}}(t)=\mb{\bm$f$}(t,\mb{\bm$x$}(t))+\mb{\bm$G$}(t,\mb{\bm$x$}(t))(\mb{\bm$u$}(t)+\mb{\bm$\xi$}(t,\mb{\bm$x$}(t)),\qquad\mb{\bm$x$}(t_0)=\mb{\bm$x$}_0,
\]
where $\mb{\bm$x$}(t)\in \mb{\Bb R}^n$, $\mb{\bm$u$}(t)\in \mb{\Bb R}^m$, and $\mb{\bm$\xi$}(t,\mb{\bm$x$}(t))\in \mb{\Bb R}^m$ represents the lumped uncertainties. We assume that the uncertain element $\mb{\bm$\xi$}$ is bounded by a known continuous non-negative function $\rho$, that is,
\[
\|\mb{\bm$\xi$}(t,\mb{\bm$x$}(t))\| \le \rho(t,\mb{\bm$x$}(t)).
\]
We also assume that the equilibrium state $\mb{\bm$x$}=\mb{\bm$0$}$ of the uncontrolled nominal system $\dot{\mb{\bm$x$}}(t)=\mb{\bm$f$}(t,\mb{\bm$x$}(t))$ is globally uniformly asymptotically stable, and that we were able to construct a Lyapunov function $W:\mb{\Bb R} \times \mb{\Bb R}^n \to \mb{\Bb R}$ corresponding to this equilibrium state. The Lyapunov function $W$ we found satisfies the condition listed in Section~\ref{ch:stability}. Specifically, there exist three continuous functions $\psi_i$, $i=1,2,3$, where $\psi_1$ and $\psi_3$ are strictly increasing, and $\psi_2$ nondecreasing, such that
\begin{eqnarray*}
\psi_i(0) &=& 0,\quad i=1,2,3,\\
\lim_{r \to \infty} \psi_1(r)&=& \infty,\\
\psi_1(\|\mb{\bm$x$}\|) &\le& W(t,\mb{\bm$x$}) \le \psi_2(\|\mb{\bm$x$}\|),\\
\psi_3\left(\| \mb{\bm$x$}\| \right) &\le& - \dot{W}(t,\mb{\bm$x$})
\end{eqnarray*}
for all $t$ and all $\mb{\bm$x$}$.

If we apply the minmax control strategy
\[
\mb{\bm$u$}(t,\mb{\bm$x$})=\left\{\begin{array}{ccc}
-\frac{\mb{\bm$\mu$}(t,\mb{\bm$x$})}{\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\|} \rho(t,\mb{\bm$x$})&\mb{if}& (t,\mb{\bm$x$}) \notin \Omega\\
\in \left\{\mb{\bm$p$}\in \mb{\Bb R}^m : \|\mb{\bm$p$}\| \le \rho(t,\mb{\bm$x$})\right\} &\mb{if}& (t,\mb{\bm$x$})\in \Omega,
\end{array} \right.
\]
where $\mb{\bm$\mu$}(t,\mb{\bm$x$})=\mb{\bm$G$}^T(t,\mb{\bm$x$}) \nabla_{\mb{\bm$x$}}W(t,\mb{\bm$x$})$, and $\Omega=\left\{(t,\mb{\bm$x$}):\mb{\bm$\mu$}=\mb{\bm$0$}\right\}$, then the equilibrium state $\mb{\bm$x$}=\mb{\bm$0$}$ is a globally uniformly asymptotically stable solution of the closed-loop system. However, the above controller is discontinuous in $\mb{\bm$x$}$. Following Corless and Leitmann~\cite{corless81} we modify it to make it continuous by introducing a boundary layer. The proposed boundary layer controller is
\[
\mb{\bm$u$}(t,\mb{\bm$x$})=\left\{\begin{array}{ccc}
-\frac{\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})}{\| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|} \rho(t,\mb{\bm$x$}) &\mb{if}& \| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$}) \|> \nu\\
\|\mb{\bm$u$}(t,\mb{\bm$x$})\| \le \rho(t,\mb{\bm$x$}) &\mb{if}& \|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\| \le \nu,
\end{array}\right.
\]
where $\nu$ is the thickness of the boundary layer about the naturally defined switching surface $\left\{(t,\mb{\bm$x$}): \| \mb{\bm$\mu$}(t,\mb{\bm$x$}) \rho(t,\mb{\bm$x$}) \|=0 \right\}$. A particular example of the above type of a controller is
\[
\mb{\bm$u$}(t,\mb{\bm$x$})=\left\{\begin{array}{ccc}
-\frac{\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})}{\| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|} \rho(t,\mb{\bm$x$}) &\mb{if}& \| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$}) \|> \nu\\
-\frac{\mb{\bm$\mu$}(t,\mb{\bm$x$})}{\nu}\rho^2(t,\mb{\bm$x$} ) &\mb{if}& \| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$}) \| \le \nu.
\end{array}\right.
\]
We shall now show that the closed-loop system driven by the boundary layer controller is practically stable with respect to a neighborhood of the zero state. This neighborhood can be made arbitrarily small by letting $\nu \to 0$. Before we state the results, we first compute the time derivative of a Lyapunov function candidate on the trajectories of the closed-loop system. We consider the Lyapunov function $W$ we constructed for the uncontrolled nominal system. Then, the corresponding time derivative of $W$ evaluated on the solutions of the closed-loop system is
\begin{eqnarray*}
\dot{W}(t,\mb{\bm$x$}) &=& \frac{\partial W}{\partial t}+\nabla_{\mb{\bm$x$}}^T W \left( \mb{\bm$f$}(t,\mb{\bm$x$})+\mb{\bm$G$}(t,\mb{\bm$x$})(\mb{\bm$u$}+\mb{\bm$\xi$}(t,\mb{\bm$x$})\right)\\
&\le& -\psi_3(\| \mb{\bm$x$} \|)+ \nabla_{\mb{\bm$x$}}^T W \mb{\bm$G$}(t,\mb{\bm$x$}) \mb{\bm$u$} + \| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|.
\end{eqnarray*}
We now consider two cases. The first case is when $\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\|>\nu$. Taking into account the controller structure for this case yields
\begin{eqnarray*}
\dot{W}(t,\mb{\bm$x$}) &\le& -\psi_3(\|\mb{\bm$x$}\|) - \nabla_{\mb{\bm$x$}}^T W \mb{\bm$G$}(t,\mb{\bm$x$})\frac{\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})}{\| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|} \rho(t,\mb{\bm$x$}) + \| \mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|\\
&=& -\psi_3(\|\mb{\bm$x$}\|) - \frac{\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|^2}{\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|} + \|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|\\
&=& -\psi_3(\|\mb{\bm$x$}\|).
\end{eqnarray*}
If, on the other hand, $\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\| \le \nu$, then
\begin{eqnarray*}
\dot{W}(t,\mb{\bm$x$}) &\le& -\psi_3(\|\mb{\bm$x$}\|) + \nabla_{\mb{\bm$x$}}^T W \mb{\bm$G$}(t,\mb{\bm$x$})\mb{\bm$u$} + \|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|\\
&\le& -\psi_3(\|\mb{\bm$x$}\|) + \|\nabla_{\mb{\bm$x$}}^T W \mb{\bm$G$}(t,\mb{\bm$x$})\|\,\|\mb{\bm$u$}\| + \|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|\\
&\le& -\psi_3(\|\mb{\bm$x$}\|) + 2\|\mb{\bm$\mu$}(t,\mb{\bm$x$})\rho(t,\mb{\bm$x$})\|\\
&\le& -\psi_3(\|\mb{\bm$x$}\|) + 2\nu.
\end{eqnarray*}
We conclude that for all $t$ and all $\mb{\bm$x$}$ we have
\[
\dot{W}(t,\mb{\bm$x$}) \le -\psi_3(\|\mb{\bm$x$}\|)+ 2\nu.
\]
To proceed further we need an assumption on the function $\psi_3$.\\
{\bf A1:} If $\psi_3$ is bounded and
\[
\lim_{r \to \infty}\psi_3(r)=l<\infty
\]
then we assume
\[
2\nu < l.
\]
\begin{proposition}
\label{prop:prac_ubd}
The closed-loop system driven by the boundary layer controller is uniformly bounded.
\end{proposition}
{\bf Proof}\quad Let $R$ be such that
\[
\psi_3(R)=2\nu.
\]
Note that $R$ is well defined by virtue of {\bf A1} and the fact that $\psi_3$ is strictly increasing. Since $\psi_3$ is strictly increasing, we can write
\[
R=\psi^{-1}_3(2\nu).
\]
Figure~\ref{fig:psi_the} illustrates the above construction.
\begin{figure}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/psi_the.bmp x=4in y=3in}
\caption{Finding $R$ given $\nu$.}
\label{fig:psi_the}
\end{figure}
Given $d>0$, where $\| \mb{\bm$x$}_0\| \le d$. Let
\[
\tilde{d}=\max \{d,R\}.
\]
We claim that
\[
b=b(d)=\psi^{-1}_1 (\psi_2(\tilde{d})),
\]
that is, the system, or equivalently its null solution, is uniformly bounded. In other words, if $\| \mb{\bm$x$}_0 \| \le d$ then $\|\mb{\bm$x$}(t;t_0,\mb{\bm$x$}_0)\|\le b$ for $t \ge t_0$. First note that $\|\mb{\bm$x$}_0 \| \le \tilde{d}$ and that $\psi_1(b)=\psi_2(\tilde{d})$. Hence $\tilde{d} \le b$---see Figure~\ref{fig:uni_bdd} for an illustration of this construction.
\begin{figure}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/uni_bdd.bmp x=4in y=3in}
\caption{Finding $b$ given $d$.}
\label{fig:uni_bdd}
\end{figure}
We have
\begin{eqnarray*}
\dot{W}(\mb{\bm$x$}(t)) &\le& -\psi_3 ( \| \mb{\bm$x$}(t) \| )+2\nu\\
&=& -\psi_3 ( \| \mb{\bm$x$}(t) \| )+\psi_3(R).
\end{eqnarray*}
If $\| \mb{\bm$x$}_0 \| > R$, then $\dot{W}<0$ and thus
\begin{eqnarray*}
\psi_1(b) &=& \psi_2(\tilde{d})\\
&\ge& W(t_0;t_0,\mb{\bm$x$}_0)\\
&\ge& W(t;t_0,\mb{\bm$x$}_0)\\
&\ge& \psi_1(\| \mb{\bm$x$}(t)\|),
\end{eqnarray*}
which implies that $\| \mb{\bm$x$}(t;t_0,\mb{\bm$x$}_0)\| \le b$ for $t \ge t_0$.

If, on the other hand, $\| \mb{\bm$x$}_0 \| \le R$, then since $\dot{W}(\mb{\bm$x$}(t)) \le -\psi_3 ( \| \mb{\bm$x$}(t) \| )+2\nu$, the solution may reach the sphere $\| \mb{\bm$x$}_0 \| = R$ at some time $t_2 \ge t_0$. However, $\dot{W} < 0$ outside $\| \mb{\bm$x$}_0 \| = R$. Therefore, the solution cannot leave the ball $\| \mb{\bm$x$}_0 \| = b$. Thus the null solution is uniformly bounded.\\
\hspace*{5.5in} $\Box$\\
We illustrate Proposition~\ref{prop:prac_ubd} with Figure~\ref{fig:unib_2d}.
\begin{figure}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/unib_2d.bmp x=4in y=3in}
\caption{A two-dimensional illustration of an uniformly ultimately bounded solution.}
\label{fig:unib_2d}
\end{figure}
The initial condition in Figure~\ref{fig:unib_2d} satisfies $\| \mb{\bm$x$}_0 \|< d$, and $d<R$. The trajectory is confined to stay within the ball of radius $b=\psi_1^{-1}(\psi_2(R))$.

We now show, using arguments similar to those of Corless and Leitmann~\cite{corless81}, that the closed-loop system is uniformly ultimately bounded with respect to the ball of radius $\tilde{b}>\psi^{-1}_1(\psi_2(R))$.
\begin{thm}
If 
\[
\mb{\bm$x$}(t)=\mb{\bm$x$}(t;t_0,\mb{\bm$x$}_0)
\]
is a solution for $[t_0,\infty)$ with $\| \mb{\bm$x$}_0 \| \le d$, then for a given
\[
\tilde{b} > \psi_1^{-1}(\psi_2(R)),
\]
$\|\mb{\bm$x$}(t;t_0,\mb{\bm$x$}_0)\| \le \tilde{b}$ for all $t \ge t_0 + T(\tilde{b},d)$, where
\[
T(\tilde{b},d)=\left\{\begin{array}{ccc}
0 & \mb{if} & r \le \tilde{R}\\
\frac{\psi_2(d)-\psi_1(\tilde{R})}{\psi_3(\tilde{R})-2\nu}& \mb{if}& r>\tilde{R},
\end{array}\right.
\]
and
\[
\psi_2\left(\tilde{R}\right) = \psi_1(\tilde{b}).
\]
\end{thm}
{\bf Proof}\quad Since by assumption
\[
\psi_1(\tilde{b}) > \psi_2(R),
\]
and
\[
\psi_1(\tilde{b}) = \psi_2(\tilde{R}),
\]
we have
\[
\tilde{R} \ge R.
\]
We consider two cases. The first case is when $d \le \tilde{R}$. Then by uniform boundedness, for all $t \ge t_0$
\[
\| \mb{\bm$x$}(t) \| < b,
\]
for any $b$ such that $\psi_1(b) > \psi_2(\tilde{R})$, that is, $\tilde{b}=b(d)$. Hence in this case $T(\tilde{b},d)=0$.

We now consider the case when $d>\tilde{R}$. We show, by contradiction, that for some $t_1 \in [t_0,t_0+T(\tilde{b},d)]$
\[
\| \mb{\bm$x$}(t_1) \| \le \tilde{R}.
\]
From this we shall conclude the result by referring to the previous case. So suppose that
\[
\| \mb{\bm$x$}(t) \| > \tilde{R}
\]
for all $t \in \left[t_0, t_0 + T(\tilde{b},d) \right]$. Then,
\begin{eqnarray*}
\psi_1\left( \| \mb{\bm$x$}\left(t_0+T(\tilde{b},d)\right);t_0,\mb{\bm$x$}_0)\| \right) &\le& W \left( t_0+T(\tilde{b},d),\mb{\bm$x$}\left(t_0+T(\tilde{b},d)\right);t_0,\mb{\bm$x$}_0)\right)\\
&=& W(t_0,\mb{\bm$x$}_0)+\int_{t_0}^{t_0+T(\tilde{b},d)}\dot{W}dt\\
&=& W(t_0,\mb{\bm$x$}_0)-\int_{t_0}^{t_0+T(\tilde{b},d)}\left(-\dot{W} \right)dt\\
&\le& \psi_2(d) - \int_{t_0}^{t_0+T(\tilde{b},d)}\left(\psi_3(\tilde{R})-2\nu\right)dt.
\end{eqnarray*}
Note that $\psi_3(\tilde{R})-2\nu \ge 0$ because $\tilde{R} \ge R$. We proceed with the evaluation to get
\begin{eqnarray*}
\psi_1\left(\| \mb{\bm$x$}\left(t_0+T(\tilde{b},d)\right);t_0,\mb{\bm$x$}_0)\| \right) &\le& \psi_2(d)-\left(\psi_3(\tilde{R})-2\nu\right)T(\tilde{b},d)\\
&=& \psi_2(d)-\left(\psi_3(\tilde{R})-2\nu\right)\frac{\psi_2(d)-\psi_1(\tilde{R})}{\psi_3(\tilde{R})-2\nu}\\
&=&\psi_1\left(\tilde{R}\right).
\end{eqnarray*}
Thus, since $\psi_1$ is strictly increasing
\[
\| \mb{\bm$x$}\left(t_0+T(\tilde{b},d)\right);t_0,\mb{\bm$x$}_0)\| \le \tilde{R}
\]
which contradicts our assumption that for all $t \in \left[t_0, t_0 + T(\tilde{b},d) \right]$ it should have been $\| \mb{\bm$x$}(t)\| > \tilde{R}$. Hence, there exists $t_1 \in \left[t_0, t_0 + T(\tilde{b},d) \right]$ such that $\| \mb{\bm$x$}(t_1)\| \le \tilde{R}$. Then using the same argument as in the previous case we can show that
\[
\| \mb{\bm$x$}(t) \| < \tilde{b}
\]
for all $t \ge t_1$ and the proof is complete.\\
\hspace*{5.5in} $\Box$

We have the following consequence of the above theorem.
\begin{corollary}
The ball
\[
\left\{ \mb{\bm$x$}:\|\mb{\bm$x$}\| \le \psi_1^{-1}(\psi_2(R)) \right\}
\]
is uniformly stable.
\end{corollary}
{\bf Proof}\quad Let
\[
\varepsilon > \psi_1^{-1}(\psi_2(R)),
\]
and consider $\delta=\delta(\varepsilon)$ obtained from
\[
\psi_1(\varepsilon)=\psi_2(\delta).
\]
Obviously $\delta \ge R$---see Figure~\ref{fig:ub_ball}.
\begin{figure}
\vspace{3in}
\hskip1.5in\special{bmp:c:/mybook/ub_ball.bmp x=4in y=3in}
\caption{Constructing $\delta$ given $\varepsilon$ for an uniformly stable ball.}
\label{fig:ub_ball}
\end{figure}
Hence by uniform boundedness if $\| \mb{\bm$x$}_0 \| \le \delta$, then $\| \mb{\bm$x$}(t) \| \le \varepsilon$ for all $t \ge t_0$ which means that the ball is uniformly stable.\\
\hspace*{5.5in} $\Box$

\section{Exercises}
\begin{exercise}\rm
Show
\end{exercise}