Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lectures/week12 #13

Merged
merged 12 commits into from
May 30, 2024
1 change: 1 addition & 0 deletions src/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
\input{sections/stab_and_perf_robustness.tex}
\input{sections/modern_controller_synthesis.tex}
\input{sections/h2_hinf_synthesis.tex}
\input{sections/nonlinear.tex}
\newpage
\input{sections/Appendix.tex}

Expand Down
31 changes: 26 additions & 5 deletions src/sections/h2_hinf_synthesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,20 @@ \subsection{\texorpdfstring{$\mathcal{H}_\infty$}{H-infinity} Synthesis}
\begin{enumerate}
\item The cost trade-offs between the state error and the control effort
\item The expected covariances of the disturbance and sensor noise
\end{enumerate}
\end{enumerate} i.e.\ \textbf{optimal} w.r.t.\ time-domain specifications.
\item $\mathcal{H}_2$ specifications are given in \textbf{time domain}: difficult to handle frequency-domain specifications.
\item For $\mathcal{H}_2$ design one could use a ``mixed sensitivity'' approach, and further augment the plant $P$ with frequency-dependent weigthing functions.
\item $\mathcal{H}_\infty$ provides a more direct way to handle \textbf{frequency-domain specifications.}
\item $\mathcal{H}_\infty$ provides a more direct way to handle \textbf{frequency-domain specifications.} i.e.\ it allows to achieve a desired level of robustness to disturbances and noise (``Bode obstacles'').
\end{itemize}

\newpar{}
\ptitle{Optimal $\mathcal{H}_\infty$ Synthesis}
\ptitle{Remarks}
\begin{itemize}
\item $\mathcal{H}_\infty$ synthesis requires (as $\mathcal{H}_2$) a detectable and stabilizable plant.
\item $\mathcal{H}_\infty$ minimizes the worst-case input-output gain (singular values).
\end{itemize}

\subsubsection{Optimal \texorpdfstring{$\mathcal{H}_\infty$}{H-infinity} Synthesis}
\begin{itemize}
\item In principle, we would like to find a controller K that minimizes the energy ($\mathcal{L}_2$) gain of the CL system i.e.
\begin{equation*}
Expand All @@ -153,8 +159,8 @@ \subsection{\texorpdfstring{$\mathcal{H}_\infty$}{H-infinity} Synthesis}
\item However, the optimal controller(s) are such that
\begin{enumerate}
\item $\sigma_{\max}(\mathbf{T}_{zw}(j\omega))$ is a constant over all frequencies, the response does not roll off at high frequencies (\textit{Bode's integral law}).
\item The controller is not strictly proper. (The optimal controller is not unique.)
\item Computing an optimal controller is numerically challenging
\item The controller is not strictly proper. (The optimal controller is not unique)
\item Computing an optimal controller is numerically challenging.
\end{enumerate}
\end{itemize}

Expand Down Expand Up @@ -195,3 +201,18 @@ \subsection{\texorpdfstring{$\mathcal{H}_\infty$}{H-infinity} Synthesis}
\item $\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{D}_{zu}=1,\mathbf{D}_{yw}\mathbf{D}_{yw}^{\mathsf{T}}=1$.
\end{itemize}

\subsubsection{Applying Frequency Weights}
One can apply frequency weights to different performance outputs, similar to the ``Bode obstacles'' for SISO systems.
\begin{itemize}
\item In order for $\mathcal{H}_\infty$ synthesis to be possible, frequency weights must be \textbf{stable and proper}.
\item Integrators (not asymptotically stable) can be approximated by very slow poles.
\item MATLAB:
\begin{itemize}
\item \texttt{Pinf=augw(G,W1,0,W3)}\\
creates the augmented (weighted) system
\item \texttt{[Kinf, CL, GAM, INFO]=hinfsyn(Pinf,1,1)}\\
applies optimal $\mathcal{H}_\infty$ synthesis
\item \texttt{[K09, CL, GAM, I]=hinfsyn(Pinf,1,1,0.9)}\\
applies suboptimal $\mathcal{H}_\infty$ synthesis targeting $\gamma=0.9$. This can yield a more feasible controller (less control effort)
\end{itemize}
\end{itemize}
214 changes: 214 additions & 0 deletions src/sections/nonlinear.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
\section{Nonlinear Systems}

\subsection{Concepts of Stability}
A nonlinear system
\noindent\begin{align*}
\dot{\mathbf{x}}(t) & = f(\mathbf{x}(t), \mathbf{u}(t)) & \mathbf{x}(0)=\mathbf{x}_0 \\
\mathbf{y}(t) & = h(\mathbf{x}(t), \mathbf{u}(t))
\end{align*}
\textbf{does not satisfy the superposition property} and therefore
\begin{itemize}
\item Effects from inputs and from initial conditions caannot be seperated.
\item The input cannot be seperated into elementary inputs and the output will not be a composition of elementary outputs.
\end{itemize}

\newpar{}
\ptitle{Properties}
\begin{itemize}
\item A nonlinear system can have zero, one or multiple \textbf{equillibrium points} s.t.\ $f(\mathbf{x}_e, 0)=0$.
\item In contrast to linear systems that require infinite time to go to infinity, nonlinear systes can \textbf{go to infinity in finite time}.
\item Nonlniear systems may generate permanent oscillations of fixed amplitude - \textbf{limit cycles} - independent of initial conditions.
\item Nonlinear systems can generate outputs at frequencies that are submultiples or multiples of the input frequency (\textbf{Subharmonic oscillations}).
\item Deterministic nonlinear systems can generate \textbf{chaos}.
\end{itemize}

\subsection{Lyapunov Stability Theory}
\subsubsection{Types of Stability}
Assuming $\mathbf{u}=0, \mathbf{x}_e=0$, the eqilibrium $\mathbf{x}_e$ of the systems
\noindent\begin{equation*}
\dot{\mathbf{x}} = f(\mathbf{x}), \quad f(\mathbf{x}_e) = 0
\end{equation*}
is
\begin{itemize}
\item \textbf{Stable in the sense of Lyapunov}
\noindent\begin{equation*}
\|\mathbf{x}(0)\| < \delta \Rightarrow \|\mathbf{x}(t)\| \leq \varepsilon,\qquad \forall t\geq 0,\; \delta > 0,\; \varepsilon\geq0
\end{equation*}
\item \textbf{Asymtotically stable}
\noindent\begin{equation*}
\|\mathbf{x}(0)\| < \delta \Rightarrow \lim_{t\to +\infty} \mathbf{x}(t)=0, \qquad \delta>0
\end{equation*}
\item \textbf{Exponentially stable}
\noindent\begin{equation*}
\|\mathbf{x}(0)\| < \delta \Rightarrow \|\mathbf{x}(t)\| < \beta e^{-\alpha t}, \qquad \forall t\geq 0,\; \alpha, \beta, \delta >0
\end{equation*}
\end{itemize}

\subsubsection{Lyapunov Functions}
\textit{Lyapunov functions are, in a sense, a notion of energy: non-negative, minimized (0) only at the quilibrium point and non-increasing along all trajectories.}
\newpar{}
For a given compact subset $D$ of the state space containing $\mathbf{x}_e$, a Lypunov function is defined as
\noindent\begin{equation*}
V:D \to \mathbb{R} \mapsto V(\mathbf{x})
\end{equation*}

If this Lyapunov function satisfies
\noindent\begin{align*}
V(\mathbf{x}) & \geq 0 & & \forall \mathbf{x}\in D \\
V(\mathbf{x}) & = 0 \Leftrightarrow \mathbf{x}_e = \mathbf{x} \\
\frac{d}{dt} V(\mathbf{x}(t)) & = \frac{\partial V(\mathbf{x})}{\partial t} \frac{\partial \mathbf{x}(t)}{\partial \mathbf{x}} = \frac{\partial V(\mathbf{x})}{\partial t} f(\mathbf{x}) \leq 0 & & \forall \mathbf{x}(t)\in D
\end{align*}
the equillibrium point $\mathbf{x_e}$ is \textbf{stable in the sense of Lyapunov}.

\newpar{}
Futhermore, $\mathbf{x}_e$ is \textbf{asymptotically stable} if
\noindent\begin{equation*}
\dot{V}(\mathbf{x}(t)) = 0 \Leftarrow \mathbf{x}(t) = \mathbf{x}_e
\end{equation*}
i.e.\ given $\dot{V}(\mathbf{x}(t)) = 0$ we know that the system is in the \textbf{only} equilibrium point. Finally, $\mathbf{x}_e$ is \textbf{exponentially stable} if
\noindent\begin{equation*}
\dot{V}(\mathbf{x}(t)) < -\alpha V(\mathbf{x}(t)), \qquad \alpha>0
\end{equation*}

\newpar{}
\ptitle{Remarks}
\begin{itemize}
\item If there could be multiplie equilibrium points one needs to use LaSalle.
%TBD: must the "only equilibrium point" from above be (0,...0)?
%TBD: x eventually aproaches the largest pos. inv. set. in which Vdot=0. But are there also pos. inv. sets in which Vdot \neq 0?
\end{itemize}

\paragraph{Global Stability}
To ensure global stability, i.e. $D=\mathbb{R}^n$, a Lyapunov function $V$ satisfying the aforementioned properties needs to be \textbf{radially unbounded}:
\noindent\begin{equation*}
\|\mathbf{x}\| \to +\infty \Rightarrow V(\mathbf{x}) \to +\infty
\end{equation*}

\paragraph{Indirect Method}
According to the \textbf{Hartman-Grobman Theorem}, a linearized system
\noindent\begin{equation*}
A = \left.\frac{\partial f(\mathbf{x})}{\partial \mathbf{x}} \right|_{\mathbf{x} = 0}
\end{equation*} with no unstable pole behaves qualitatively the same as the nonlinear around the equilibrium point.

\newpar{}
As a result, the Lyapunov function of the linear system also describes the nonlinear system for sufficiently small deviations from the equilibrium point.

\newpar{}
\textbf{Remark}

The solution $\mathbf{P}$ of the Riccati equation can be interpreted as a Lyapunov equation:
\noindent\begin{equation*}
V(\mathbf{x}) = \mathbf{x}^{\mathsf{T}} \mathbf{Px}
\end{equation*}

\paragraph{LaSalle's Invariance Principle}
LaSalle's invariance theorem is useful if Lyapunov stability is given by the existence of a Lyapunov function but $\dot{V}=0$ not only at $\mathbf{x}_e$:

\newpar{}
\textit{Let $\Omega\in D$ be a (compact) positively invariant set i.e., $\mathbf{x}(t_0)\in \Omega \Rightarrow \mathbf{x}(t)\in\Omega$.
Let $V_D\to \mathbb{R}^n$, such that $\dot{V}(\mathbf{x})\leq 0\; \forall \mathbf{x}\in \Omega$ (i.e.\ there could be multiple points with $\dot{V}=0$).
Then, $\mathbf{x}(t)$ will eventually approach the largest positively invariant set in which $\dot{V}=0$
}
\newpar{}
\textbf{Remarks}
\begin{itemize}
\item A set $\Omega$ is positively invariant if, once the system's state $\mathbf{x}(t)$ enters this set, it will stay in this set for all future time $t \geq t_0$. This means if $\mathbf{x}(t_0) \in \Omega$, then $\mathbf{x}(t) \in \Omega\; \forall t \geq t_0$.
\item For the pendulum, one has multiple states (turning points, origin) where $\dot{\mathbf{x}}=0$ but $\mathbf{x}(t)$ only stays at the origin (but not at the turning points) once it has ``entered'' this equilibrium set (i.e.\ stopped moving).
\end{itemize}

\subsection{Control Lyapunov Functions}
If a Control Lyapunov Function (CLF) exists, it provides a way to construct a stabilizing feedback with an appropriate control input $\tilde{\mathbf{u}}$ (\textit{Artstein's Theorem}).

\newpar{}
A CLF satisfies
\noindent\begin{align*}
V(\mathbf{x}) & \geq 0 & & \text{positive definite} \\
V(\mathbf{x}) & = 0 \Leftrightarrow \mathbf{x} = 0 & & \text{radially unbounded} \\
\frac{d}{dt} V(\mathbf{x}, \tilde{\mathbf{u}}(\mathbf{x})) & = \frac{\partial V(\mathbf{x})}{\partial t} f(\mathbf{x}, \tilde{\mathbf{u}}(\mathbf{x})) \leq 0 & & \forall \mathbf{x}\neq 0
\end{align*}

\subsubsection{Gain Scheduling}
In gain scheduling, the state space is partitioned into disjoint subspaces and for a number of design equilibria ($\mathbf{x}_i, \mathbf{u}_i$) nominal contorl laws $\mathbf{K}_i$ are designed using the aforementioned techniques.

\newpar{}
The dynamics of the system around a equilibrium point $\mathbf{x}_i$ can be approximated by
\noindent\begin{equation*}
\dot{\mathbf{x}} = \mathbf{A}_i(\mathbf{x}-\mathbf{x}_i) + \mathbf{B}_i(\mathbf{u}-\mathbf{u}_i)
\end{equation*}

The stability of
\noindent\begin{equation*}
\mathbf{u} = \mathbf{u}_i+\mathbf{K}_i(\mathbf{x}-\mathbf{x}_i)
\end{equation*}
can be proven with the Lyapunov function ($\forall i$)
\noindent\begin{equation*}
V(\mathbf{x}) = \min_{i} {(\mathbf{x}-\mathbf{x}_i)}^{\mathsf{T}}\mathbf{P}(\mathbf{x}-\mathbf{x}_i)
\end{equation*}

\subsubsection{Multiple Lyapunov Functions}
Another option is to consider multiple Lyapunov functions $V_i$ with corresponding sets $X_i$ that satisfy
\begin{itemize}
\item positive definite in $X_i$
\item $\dot{V_i}(\mathbf{x})\leq 0$ when $\mathbf{x}\in X_i$
\end{itemize}

and to check if the system satisfies the \textbf{sequence non-increasing condition}:
\noindent\begin{equation*}
V_i[k+1] < V_i[k] \qquad \forall k \in \mathbb{N}
\end{equation*}

\subsubsection{Linear Parameter-Varying Systems}
A third option is to rewrite the nonlinear system in a ``linear'' fashion with slow varying parameter $\sigma(\mathbf{x})$
\noindent\begin{equation*}
\dot{\mathbf{x}}_\delta = \mathbf{A} (\sigma(\mathbf{x}))\mathbf{x}_\delta + \mathbf{B}(\sigma(\mathbf{x}))\mathbf{u}_\delta\quad
\begin{cases}
\mathbf{x}_\delta = \mathbf{x}-\mathbf{x}_e(\sigma(\mathbf{x})) \\
\mathbf{u}_\delta = \mathbf{u}-\mathbf{u}_e(\sigma(\mathbf{x}))
\end{cases}
\end{equation*}

This system is \textbf{exponentially stable} if
\noindent\begin{equation*}
{\bar{\mathbf{A}}(\sigma)}^{\mathsf{T}} \mathbf{P} + \mathbf{P}\bar{\mathbf{A}}(\sigma) + \sum \rho_i \frac{\partial \mathbf{P}(\sigma)}{\partial \sigma_i} < 0,\qquad
\begin{cases}
\sigma(t)\in S \\
\dot{\sigma(t)}\in R \\
\forall \sigma\in S, \rho\in R
\end{cases}
\end{equation*}
In other words, the existence of a family of positive matrices $\mathbf{P}(\sigma)$ (common Lyapunov functions) prove the systems exponential stability.

\subsubsection{Backstepping Control}
Backstepping is a form of \textit{cascaded control} where a control input $\mathbf{u}$ is chosen s.t.\ the output $\mathbf{z}$ of the outer loop stabilizes the inner loop:

\noindent\begin{align*}
\dot{\mathbf{x}} & = f_0(\mathbf{x}) + g_0(\mathbf{x})\mathbf{z} & & \text{inner loop} \\
\dot{\mathbf{z}} & = f_1(\mathbf{x},\mathbf{z}) + g_1(\mathbf{x}, \mathbf{z}) \mathbf{u} & & \text{outer loop}
\end{align*}
where the inner system has an equilibrium point in $\mathbf{x}=0, \mathbf{z}=0$.

\newpar{}
If $\mathbf{z} = \mathbf{u}_0(\mathbf{x})$ then
\noindent\begin{equation*}
\frac{d}{dt} V_0(\mathbf{x}) = -W(\mathbf{x}) < 0
\end{equation*}
proving stability in the sense of Lyapounov.

\newpar{}
\ptitle{Controlling the Error}

In order to ensure stability, Lyapunov stability of the error $\mathbf{e} = \mathbf{z}-\mathbf{u}_0$ needs to be established.

The Lypunov candidate
\noindent\begin{equation*}
V_1(\mathbf{x}, \mathbf{e}) = V_0(\mathbf{x})+\frac{1}{2} \mathbf{e}^2
\end{equation*}
satisfies
\noindent\begin{equation*}
\frac{d}{dt}V_1(\mathbf{x}, \mathbf{e}) = -W(\mathbf{x}) - k_1 \mathbf{e}^2 <0 ,\qquad \forall(\mathbf{x},\mathbf{e}) \neq 0
\end{equation*}
and thus proves the stability of the ``error'' system
\noindent\begin{align*}
\dot{\mathbf{x}} &= f_0(\mathbf{x})+g_0(\mathbf{x})\mathbf{u}_0(\mathbf{x}) + g_0(\mathbf{x})\mathbf{e}\\
\dot{\mathbf{e}} &= \dot{\mathbf{z}} - \underbrace{\frac{\partial \mathbf{u}_0(\mathbf{x})}{\partial \mathbf{x}}(\dot{\mathbf{x}})}_{\dot{\mathbf{u}}_0} = \mathbf{v}
\end{align*}
Loading