Skip to content

Commit

Permalink
Merge pull request #12 from MeierTobias/lectures/week11
Browse files Browse the repository at this point in the history
Lectures/week11
  • Loading branch information
DanielSchweizer1999 authored May 15, 2024
2 parents 1751c87 + c965616 commit c56e535
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

\begin{document}
\begin{multicols*}{3}

% create the title section
\input{\templatePath/summary_title.tex} % ChkTex 27

Expand All @@ -23,9 +23,10 @@
\input{sections/MIMO_intro.tex}
\input{sections/stab_and_perf_robustness.tex}
\input{sections/modern_controller_synthesis.tex}
\input{sections/h2_hinf_synthesis.tex}
\newpage
\input{sections/Appendix.tex}

\end{multicols*}
\end{document}

197 changes: 197 additions & 0 deletions src/sections/h2_hinf_synthesis.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
\subsection{\texorpdfstring{$\mathcal{H}_2$}{H2} Synthesis}
\subsubsection{LQR}
In the LQR problem we assume
\begin{itemize}
\item Full state feedback: $\mathbf{C_y}=\mathbf{\mathbb{I}}$
\item No disturbance input: $w=0$
\item $\mathbf{C}_z^{\mathsf{T}}\mathbf{D}_{zu}=0$
\end{itemize}
and try to find a control signal $u(t,x)$ that minimizes
\begin{equation*}
\|\mathbf{z}\|_2^2=\int_0^{+\infty}\|\mathbf{C}_z \mathbf{x}+\mathbf{D}_{zu}\mathbf{u}\|_2^2 dt
\end{equation*}
where
\begin{align*}
\mathbf{C}_z= &
\begin{bmatrix}
\sqrt{\mathbf{Q}} & \mathbf{0}
\end{bmatrix}^{\mathsf{T}} & \Leftrightarrow \mathbf{Q} & = \mathbf{C}_z^{\mathsf{T}}\mathbf{C}_z \\
\mathbf{D}_{zu}= &
\begin{bmatrix}
\mathbf{0} & \sqrt{\mathbf{R}}
\end{bmatrix}^{\mathsf{T}} & \Leftrightarrow \mathbf{R} & = \mathbf{D}_{zu}^{\mathsf{T}}\mathbf{D}_{zu}
\end{align*}
which yields the known LQR problem
\begin{equation*}
\|\mathbf{z}\|_2^2=\int_0^{+\infty}(\mathbf{x}^{\mathsf{T}}\mathbf{Q}\mathbf{x}+\mathbf{u}^{\mathsf{T}}\mathbf{R}\mathbf{u})\;dt
\end{equation*}

\ptitle{ARE}
\noindent\begin{gather*}
\mathbf{A}^{\mathsf{T}}\mathbf{X}_F + \mathbf{X}_F \mathbf{A} - \mathbf{X}_F \mathbf{B}_u{\left(\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{B}_{zu}\right)}^{-1} \mathbf{B}_u^{\mathsf{T}} \mathbf{X}_F + \mathbf{C}_z^{\mathsf{T}}\mathbf{C}_z = \mathbf{0}\\
\mathbf{F} = -{\left(\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{D}_{zu}\right)}^{-1} \mathbf{B}_u^{\mathsf{T}}\mathbf{X}_F
\end{gather*}
where $\mathbf{X}_F$ is symmetric and positive semidefinite.

\ptitle{Technical Considerations}

\begin{enumerate}
\item $(\mathbf{A},\mathbf{B}_u)$ stabilizable.
\item $(\mathbf{C}_z,\mathbf{A})$ detectable.\\
This ensures that any unstable mode of $\mathbf{A}$ is detected by the performance output.
\item $\begin{bmatrix} \mathbf{A}- j\omega \mathbf{I}& \mathbf{B}_u\\ \mathbf{C}_z& \mathbf{D}_{zu}\end{bmatrix}$ has full column rank for all $\omega\in\mathbb{R}$\\
Ensures that control effort is penalized at all $\omega$ so that the Hamiltonian does not have purely imaginary eigenvalues.
\item $\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{D}_{zu}=\mathbf{R}$, invertible, i.e., $\mathbf{D}_{zu}$ has full column rank\\
Is for convenience.
\end{enumerate}

\ptitle{Remarks}

\begin{itemize}
\item One can show that this control law is optimal to achieve the stated minimization.
\item Technical considerations 1.-3.\ ensure that the Riccati equation admits a solution $\mathbf{Y}$ that is positive semi-definite.
\end{itemize}


\subsubsection{LQE}
In the LQE problem we assume
\begin{itemize}
\item That $\mathbf{u}$ takes the role uf the observer update
\item Full state updates: $\mathbf{B}_u=\mathbf{\mathbb{I}}$ ($u$ updates the states)
\item Zero initial conditions: $\tilde{\mathbf{x}}(0)=\mathbf{x}(0)-\hat{\mathbf{x}}(0)=0$
\item $\mathbf{B}_w \mathbf{D}_{yw}^{\mathsf{T}}=0$
\end{itemize}
and try to find an update signal $\mathbf{u}(t,\tilde{x})\in \mathcal{L}_2$ that minimizes power in the error signal due to white noise disturbance $w$.

\newpar{}
\ptitle{Noise}

Process noise and sensor noise affect the system as
\begin{align*}
\frac{d\tilde{\mathbf{x}} }{dt}= & \mathbf{A}\tilde{\mathbf{x}}+\mathbf{B}_{w} \mathbf{w} & & \text{ affects real, physical state} \\
\mathbf{y}= & \mathbf{C}_y\tilde{\mathbf{x}}+\mathbf{D}_{yw}\mathbf{w} & & \text{ affects measurements}
\end{align*}
and are modelled by
\begin{align*}
\mathbf{B}_w= & \begin{bmatrix}\sqrt{\mathbf{Q}}&\mathbf{0}\end{bmatrix}^{\mathsf{T}} & \Leftrightarrow \mathbf{Q} & = \mathbf{B}_w\mathbf{B}_w^{\mathsf{T}} \\
\mathbf{D}_{yw}= & \begin{bmatrix}\mathbf{0}&\sqrt{\mathbf{R}}\end{bmatrix} & \Leftrightarrow \mathbf{\mathbf{R}} & = \mathbf{D}_{yw}\mathbf{D}_{yw}^{\mathsf{T}}
\end{align*}
where process noise and sensor noise are not correlated i.e.
\begin{equation*}
\mathbb{E}\left[\mathbf{w}^{\mathsf{T}} \mathbf{B}_w^{\mathsf{T}} \mathbf{D}_{yw}\mathbf{w}^{\mathsf{T}}\right]=0
\end{equation*}

\newpar{}
\ptitle{ARE}
\noindent\begin{gather*}
\mathbf{A}\mathbf{Y}_L + \mathbf{Y}_L \mathbf{A}^{\mathsf{T}} - \mathbf{Y}_L \mathbf{C}_y^{\mathsf{T}}{\left(\mathbf{D}_{yw}\mathbf{D}_{yw}^{\mathsf{T}}\right)}^{-1} \mathbf{C}_y \mathbf{Y}_L + \mathbf{B}_w\mathbf{B}_w^{\mathsf{T}} = \mathbf{0}\\
\mathbf{F} = -\mathbf{Y}_L\mathbf{C}_y^{\mathsf{T}}{\left(\mathbf{D}_{yw}\mathbf{D}_{yw}^{\mathsf{T}}\right)}^{-1}
\end{gather*}
where $\mathbf{Y}_L$ is symmetric and positive semidefinite.

\newpar{}
\ptitle{Technical Considerations}

\begin{enumerate}
\item $(\mathbf{C}_y,\mathbf{A})$ detectable.\\
To observe unstable modes.
\item $(\mathbf{A},\mathbf{B}_w)$ stabilizable\\
That unstable modes are affected by disturbance to actually track it.
\item $\begin{bmatrix}\mathbf{A}-j\omega I&\mathbf{B}_w\\\mathbf{C}_y&\mathbf{D}_{yw}\end{bmatrix}$ has full row rank for all $\omega\in\mathbb{R}$\\
That errors are penalized at all frequencies and condition on Hamiltonian.
\item $\mathbf{D}_{yw} \mathbf{D}_{yw}^{\mathsf{T}}=\mathbf{R}_{ww}$ invertible, i.e., $\mathbf{D}_{yw}$ has full row rank.\\
For convenience.
\end{enumerate}

\ptitle{Remarks}

\begin{itemize}
\item One can show that this control law is optimal to achieve the stated minimization.
\item Technical considerations 1.-3.\ ensure that the Riccati equation admits a solution $\mathbf{Y}$ that is positive semi-definite.
\end{itemize}

\subsubsection{LQG}
Due to the \textbf{separation principle} we can design the LQR and LQE controller separately (assuming all technical considerations are fulfilled). This process yields an \textbf{optimal controller} of the form
\begin{equation*}
\mathbf{K}=\left[\begin{array}{c|cc}%chktex 44
\mathbf{A}+\mathbf{B}_u \mathbf{F}+\mathbf{L}\mathbf{C}_y & -\mathbf{L} & \mathbf{B}_u \\
\hline %chktex 44
\mathbf{F} & 0 & \mathbf{I} \\
-\mathbf{C}_y & \mathbf{I} & 0
\end{array}\right]
\end{equation*}
with
\begin{equation*}
\mathbf{F}=-\mathbf{R}_{uu}^{-1}(\mathbf{B}_{u}^{\mathsf{T}}X+\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{C}_{z})
\end{equation*}
where $\mathbf{X}$ is the stabilizing solution to the corresponding ARE and an \textbf{optimal observer}
\begin{equation*}
\mathbf{L}=-(\mathbf{Y}\mathbf{C}_y^{\mathsf{T}}+\mathbf{B}_w \mathbf{D}_{yw}^{\mathsf{T}})\mathbf{R}_{ww}^{-1}
\end{equation*}
where $\mathbf{Y}$ is the stabilizing solution to the corresponding ARE.

\subsection{\texorpdfstring{$\mathcal{H}_\infty$}{H-infinity} Synthesis}
\ptitle{Differentiation from $\mathcal{H}_2$ Synthesis}
\begin{itemize}
\item $\mathcal{H}_2$ is optimal given
\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}
\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.}
\end{itemize}

\newpar{}
\ptitle{Optimal $\mathcal{H}_\infty$ 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*}
\left\|\mathbf{T}_{zw}\right\|_{\mathcal{H}_\infty}=\sup_{w\neq0}\frac{\left\|\mathbf{z}\right\|_{\mathcal{L}_2}}{\left\|\mathbf{w}\right\|_{\mathcal{L}_2}}
\end{equation*}
\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
\end{enumerate}
\end{itemize}

\subsubsection[Suboptimal H-infinity Synthesis]{Suboptimal $\mathcal{H}_\infty$ Synthesis}
In practice one pursues a sub-optimal design, i.e., given $\gamma>0$, find a controller $K$ such that
\begin{equation*}
\|\mathbf{T}_{zw}\|_{\mathcal{H}_\infty}<\gamma
\end{equation*}
if one exists. This can be formulated mathematically as a cost function:
\begin{equation*}
\|\mathbf{z}\|_{\mathcal{L}_2}^2-\gamma^2\|\mathbf{w}\|_{\mathcal{L}_2}^2
\end{equation*}
where we search for the smallest $\gamma$ such that the controller can achieve negative cost. We \textbf{need} $\boldsymbol{\gamma}\mathbf{\le1}$ for a stabilizing controller as otherways for larger gamma one could easily achieve negative cost even though the energy of the disturbance gets not damped at all! The formula can be understood as
\begin{itemize}
\item $\mathbf{z}$ is the performance output given some disturbance $\mathbf{w}$
\item We want to damp $\mathbf{z}$ given $\mathbf{w}$ (remember the definition of the induced $\mathcal{L}_2$ norm above)
\item The aforementioned formula becomes negative if the disturbance energy term is larger than the (hopefully damped) performance output $\mathbf{z}$. A small $\gamma$ gives an even better controller as it is more difficult to achieve negative cost then.
\end{itemize}

\newpar{}
\ptitle{Bisection Algorithm}

\begin{enumerate}
\item Initialize to, e.g, $\gamma_-=0,\gamma_+=$ the $\mathcal{H}_\infty$ norm of the \textbf{$\mathcal{H}_2$ optimal design} (approximation of a reasonable bound). Let $\mathbf{K}_+$ be the optimal $\mathcal{H}_2$ controller.
\item Let $\gamma\gets \frac{\gamma_-+\gamma_+}{2}$. Check whether a controller exists such that $\|\mathbf{T}_{zw}\|_{\mathcal{H}_\infty}<\gamma$.
\item If yes, set $\gamma_+\leftarrow\gamma$, and set $\mathbf{K}_+$ to the controller just designed. Otherwise, set $\gamma_-\leftarrow\gamma$.
\item Repeat from step 2 until $\gamma_+-\gamma_-<\epsilon$.
\item Return $\mathbf{K}_+$.
\end{enumerate}

\newpar{}
\ptitle{Simplified Setup}

Solving the problem is simplified if
\begin{itemize}
\item $\mathbf{C}_{z}^{\mathsf{T}}\mathbf{D}_{zu}=0$, i.e.,the cost if of the form $\int_0^{+\infty}\mathbf{x}^{\mathsf{T}}\mathbf{Q}\mathbf{x}+\mathbf{u}^{\mathsf{T}}\mathbf{R}\mathbf{u}\;dt$.
\item $\mathbf{B}_w \mathbf{D}_{yw}^{\mathsf{T}}=0$, i.e., process noise and sensor noise are uncorrelated.
\item $\mathbf{D}_{zu}^{\mathsf{T}}\mathbf{D}_{zu}=1,\mathbf{D}_{yw}\mathbf{D}_{yw}^{\mathsf{T}}=1$.
\end{itemize}

2 changes: 1 addition & 1 deletion src/sections/observers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ \subsubsection{Optimal LQE Design}
\end{equation*}
for the \textbf{positive definite} matrix $\mathbf{Y}$ and choosing the \textit{optimal estimation gain} $\mathbf{L}$ as
\begin{equation*}
\mathbf{L}=\mathbf{YC}^{\mathsf{T}} \mathbf{R}^{-1}
\mathbf{L}=-\mathbf{YC}^{\mathsf{T}} \mathbf{R}^{-1}
\end{equation*}

\ptitle{Remarks}:
Expand Down

0 comments on commit c56e535

Please sign in to comment.