text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Discrete-time H2-Hinf-optimal Full state Feedback control

Discrete-Time Mixed H2-H∞-Optimal Full-State Feedback Control

A discrete time system operates on a discrete time signal input and produces a discrete time signal output. They are used in digital signal processing, such as digital filters for images or sound. The class of discrete time systems that are both linear and time invariant, known as discrete time LTI systems.

A full-state feedback controller $$K = K_d \in {R^{n_u*n_x}}$$ (i.e., $$uk = K_dx_k$$) is to be designed to minimize the H2 norm of the closed loop transfer matrix $$T11(z)$$ from the exogenous input $$w_{1,k}$$ to the performance output $$z_{1,k}$$ while ensuring the H∞ norm of the closed-loop transfer matrix $$T22(z)$$ from the exogenous input $$w_{2,k}$$ to the performance output $$z_{2,k}$$ is less than $$\gamma_{d}$$.

The System
Discrete-Time LTI System with state space realization

$$ \begin{align}

x_{k+1}&=A_{d}x_{k}+B_{d1,1}w_{1,k}+B_{d1,2}w_{2,k}+B_{d2}u_{k},\\

\begin{bmatrix} Z_{1,k}\\ Z_{2,k}\end{bmatrix} &= \begin{bmatrix} C_{d1,1}\\ C_{d1,2}\end{bmatrix}x_{k}+ \begin{bmatrix} 0 & D_{d11,12}\\ D_{d11,21} & D_{d11,22}\end{bmatrix} \begin{bmatrix} w_{1,k}\\ w_{2,k}\end{bmatrix}+ \begin{bmatrix} D_{d12,1}\\ D_{d12,2}\end{bmatrix}u_{k}\\

y_k &= x_k\\ \end{align} $$

The Data
The matrices: System $$ (A_d,B_{d1,1},B_{d1,2},B_{d2},C_{d1,1},C_{d1,2},D_{d11,12},D_{d11,21},D_{d11,22},,D_{d12,1},D_{d12,2}), P, F_d $$.

The Optimization Problem
The following feasibility problem should be optimized:

Minimize the H2 norm of the closed loop transfer matrix $$T11(z)$$, while ensuring the H∞ norm of the closed-loop transfer matrix $$T22(z)$$ is less than $$\gamma_{d}$$, while obeying the LMI constraints.

The LMI:
Discrete-Time Mixed H2-H∞-Optimal Full-State Feedback Controller is synthesized by solving for $$P \in S^{n_{x}}, Z \in S^{n_{w}}, F_{d} \in R^{n_{u} * n_{x}}$$, and $$\mu \in R_{>0}$$ that minimize $$\mu$$ subject to $$P>0, Z>0$$

The LMI formulation

H∞ norm < $$\gamma_{d}$$

H2 norm < $$\mu$$

$$ \begin{align}

\begin{bmatrix}P & A_{d}P-B_{d2}F_{d} & B_{d1,1}\\
 * & P & 0\\
 * & * & 1\end{bmatrix}&>0\\

\begin{bmatrix}P & A_{d}P-B_{d2}F_{d} & B_{d1,2} & 0\\
 * & P & 0 & PC_{d1,2}^T-F_{d}^TD_{d12,2}^T\\
 * & * & \gamma_{d} I & D_{d11,22}^T\\
 * & * & * & \gamma_{d} I\end{bmatrix}&>0\\

\begin{bmatrix} Z & C_{d1,1}P-D_{d12,1}\\
 * & P\end{bmatrix}&>0\\

trace(Z) &< \mu^2

\end{align}$$

Conclusion:
The H2-optimal full-state feedback controller gain is recovered by $$K_{d}=F_{d}P^{-1}$$

Implementation
A link to CodeOcean or other online implementation of the LMIMATLAB Code

Related LMIs
- Continuous Time Mixed H2-H∞ Optimal Full State Feedback Control


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Mixed H2-Hinf-optimal Dynamic output Feedback control

LMI for Mixed $$H_{2}/H_{\infty}$$ Output Feedback Controller

The mixed $$ H_{2}/H_{\infty}$$ output feedback control has been known as an example of a multi-objective optimal control problem. In this problem, the control feedback should respond properly to several specifications. In the $$ H_{2}/H_{\infty}$$ controller, the $$H_{\infty}$$ channel is used to improve the robustness of the design while the $$H_{2}$$ channel guarantees good performance of the system.

The System
We consider the following state-space representation for a linear system:

$$ \begin{align} \dot{x} &= Ax + Bu \\ y &= Cx + Du \end{align} $$

where $$ A $$, $$ B$$, $$ C$$, and $$D $$ are the state matrix, input matrix, output matrix, and feedforward matrix, respectively.

These are the system (plant) matrices that can be shown as $$ P = (A, B, C, D) $$.

The Data
We assume that all the four matrices of the plant, $$ A, B, C, D $$, are given.

The Optimization Problem
In this problem, we use an LMI to formulate and solve the optimal output-feedback problem to minimize both the <> and <> norms. Giving equal weights to each of the norms, we will have the optimization problem in the following form:

$$ \begin{align} \text{min} \quad ||S(P,K)||_{H_{2}}^{2} + ||S(P,K)||_{H_{\infty}}^{2} \end{align} $$

The LMI: LMI for mixed $$H_{2}$$/$$H_{\infty}$$
Mathematical description of the LMI formulation for a mixed $$H_{2}$$/$$H_{\infty}$$ optimal output-feedback problem can be written as follows:

$$ \begin{align} &\text{min} \quad \gamma_{1}^{2} + \gamma_{2}^{2} \\ &\text{s.t.} \\ &\begin{bmatrix} X_{1}     & I \\ I         & Y_{1} \end{bmatrix} > 0 \\ &\begin{bmatrix} AY_{1}+Y_{1}A^{\text{T}}+B_{2}C_{n}+C_{n}B_{2}^{\text{T}} & *^{\text{T}} & *^{\text{T}} & *^{\text{T}} \\ A^{\text{T}}+A_{n}+(B_{2}D_{n}C_{2})^{\text{T}} & X_{1}A+A^{\text{T}}+B_{n}C_{2}+C_{2}^{\text{T}}B_{n}^{\text{T}} & *^{\text{T}} & *^{\text{T}} \\ (B_{1}+B_{2}D_{n}D_{21})^{\text{T}} & (X_{1}B_{1} + B_{n}D_{21})^{\text{T}} & -\gamma I & *^{\text{T}}\\ C_{1}Y_{1}+D_{12}C_{n} & C_{1}+D_{12}D_{n}C_{2} & D_{11}+D_{12}D_{n}D_{21} & -\gamma I\\ \end{bmatrix} < 0 \\ &\begin{bmatrix} Y_{1}  & I & (C_{1}Y_{1}+D_{12}C_{n})^{\text{T}} \\ I & X_{1} & (C_{1}+D_{12}D_{n}C_{2})^{\text{T}}\\ (C_{1}Y_{1}+D_{12}C_{n}) & (C_{1}+D_{12}D_{n}D_{21} & Z\\ C_{1}Y_{1}+D_{12}C_{n} & C_{1}+D_{12}D_{n}C_{2} & D_{11}+D_{12}D_{n}D_{21} & -\gamma I\\ \end{bmatrix} > 0 \\ &\begin{bmatrix} AY_{1}+Y_{1}A^{\text{T}}+B_{2}C_{n}+C_{n}\text{T}B_{2}\text{T} & *^{\text{T}} & *^{\text{T}} & *^{\text{T}} \\ (A^{\text{T}}+An+(B_{2}*D_{n}*C_{2})^{\text{T}})  & X_{1}A+A^{\text{T}}X_{1}+B_{n}C_{2}+C_{2}^{\text{T}}B_{n}^{\text{T}}  & *^{\text{T}} & *^{\text{T}} \\ (B_{1}+B_{2}D_{n}D_{21})^{\text{T}}  & (X_{1}B_{1}+B_{n}D_{21})^{\text{T}} & -\gamma_{2}^{2}I  & *^{\text{T}} \\ (C_{1}Y_{1}+D_{12}C_{n}) &  (C_{1}+D_{12}D_{n}C_{2}) & (D_{11}+D_{12}D_{n}*D_{21}) & -I \\ \end{bmatrix} < 0 \\ & \text{trace}(Z) < \gamma_{1}^{2} \\ & D_{11} + D_{12}D_{n}D_{21} = 0 \end{align} $$

where $$ \gamma_{1}^{2} $$ and $$\gamma_{1}^{2}$$ are defined as the $$ H_{2}$$ and $$ H_{\infty}$$ norm of the system:

$$ \begin{align} &||S(P,K)||_{H_{2}}^{2} = \gamma_{1}^{2} \\ &||S(P,K)||_{H_{\infty}}^{2} = \gamma_{2}^{2} \end{align} $$

Moreover, $$X_{1} $$, $$ Y_{1}$$, $$ A_{n}$$, $$ B_{n}$$, $$ C_{n}$$, and $$ D_{n}$$ are variable matrices with appropriate dimensions that are found after solving the LMIs.

Conclusion:
The calculated scalars $$ \gamma_{1}^{2} $$ and $$ \gamma_{2}^{2} $$ are the $$ H_{2}$$ and $$ H_{\infty}$$ norms of the system, respectively. Thus, the norm of mixed $$ H_{2}$$/$$ H_{\infty}$$ is defined as $$ \beta = \gamma_{1}^{2} + \gamma_{2}^{2}$$. The results for each individual $$ H_{2}$$ norm and $$H_{\infty} $$ norms of the system show that a bigger value of norms are found in comparison with the case they are solved separately.

Implementation
A link to Matlab codes for this problem in the Github repository:

https://github.com/asalimil/LMI_for_Mixed_H2_Hinf_Output_Feedback_Controller

Return to Main Page
LMIs in Control/Tools

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/H2-Optimal Observer

State observer is a system that provides estimates of internal states of a given real system, from measurements of the inputs and outputs of the real system.The goal of $$ H_2$$ -optimal state estimation is to design an observer that minimizes the $$ H_2 $$ norm of the closed-loop transfer matrix from w to z. Kalman filter is a form of Optimal Observer.

The System
Consider the continuous-time generalized plant $$ P $$ with state-space realization

\begin{align} \dot x&=Ax+B_1w(t),\\ y&=C_2x+D_{21}w\\ \end{align}$$

The Data
The matrices needed as input are $$ A,B,C,D $$.

The Optimization Problem
The task is to design an observer of the following form:

\begin{align} \dot{\hat{x}}=A\hat{x} + L(y - \hat{y}),\\ \hat{y} = C_2\hat{x}\\ \end{align}$$

The LMI: $$ H_2 $$ Optimal Observer
LMIs in the variables $$ P, G, Z, \nu $$ are given by:

\begin{align}

\begin{bmatrix} PA+ A^TP-GC_2-{C_2}^TG^T && PB_1-GD_{21}\\ \star && -1 \end{bmatrix} <0\\ trZ < \nu \end{align}$$

Conclusion:
The $$ H_2$$ -optimal observer gain is recovered by $$ L = P^{-1}G $$ and the $$ H_2 $$ norm of T(s) is $$ \mu = \sqrt {\nu} $$

Implementation
https://github.com/Ricky-10/coding107/blob/master/H2%20Optimal%20Observer

= External Links =

A list of references documenting and validating the LMI.

 * LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
 * LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
 * LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
 * https://onlinelibrary.wiley.com/doi/abs/10.1002/rnc.1310


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Hinf-Optimal Observer

$$ H\infin $$-Optimal observers yield  robust  estimates  of  some  or  all  internal  plant states  by  processing  measurement  data. Robust observers are increasingly  demanded in industry  as they  may provide state  and  parameter  estimates  for  monitoring  and  diagnosis purposes even in the presence of large disturbances such as noise etc. It is there where Kalman filters may tend to fail. State observer is a system that provides estimates of internal states of a given real system, from measurements of the inputs and outputs of the real system. The goal of $$ H_\infin$$ -optimal state estimation is to design an observer that minimizes the $$ H_\infin $$ norm of the closed-loop transfer matrix from w to z.

The System
Consider the continuous-time generalized plant $$ P $$ with state-space realization

\begin{align} \dot x&=Ax+B_1w,\\ y&=C_2x+D_{21}w\\ \end{align}$$

The Data
The matrices needed as input are $$ A,B_1,B_2,C_2,D_{21},D_{11} $$.

The Optimization Problem
The observer gain $$ L $$ is to be designed such that the $$ H\infin $$ of the transfer matrix from w to z, given by

\begin{align} T(s) = C_1(s1-(A-LC_2))^{-1}(B_1-LD_{21})+D_{11}\\ \end{align} $$ is minimized. The form of the observer would be:

\begin{align} \dot{\hat{x}}=A\hat{x} + L(y - \hat{y}),\\ \hat{y} = C_2\hat{x}\\ \end{align}$$

The LMI: $$ H_\infin $$ Optimal Observer
The $$H\infin $$-optimal observer gain is synthesized by solving for $$ P \in \mathbb{S} ^{n_x}, G \in \mathbb{R} ^{n_x \times n_y} $$, and $$ \gamma \in \mathbb{R}_{>0} $$ that minimize $$ \zeta(\gamma) = \gamma $$ subject to $$ P>0 $$ and

\begin{align}

\begin{bmatrix} PA+ A^TP-GC_2-{C_2}^TG^T && PB_1-GD_{21} && C_1^T\\ \star && -\gamma1 && {D_{11}}^T\\ \star && \star && -\gamma1 \end{bmatrix} <0\\ \end{align}$$

Conclusion:
The $$ H_\infin$$ -optimal observer gain is recovered by $$ L = P^{-1}G $$ and the $$ H_\infin $$ norm of T(s) is $$ \gamma$$.

Implementation
Link to the MATLAB code designing $$ H\infin $$- Optimal Observer

https://github.com/Ricky-10/coding107/blob/master/HinfinityOptimalobserver

= External Links =

 * LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
 * LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
 * LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
 *
 *


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Mixed H2-Hinf-Optimal Observer

The goal of mixed $$ H_2-H\infin $$-optimal state estimation is to design an observer that minimizes the $$ H_2 $$ norm of the closed-loop transfer matrix from $$ w_1 $$ to $$ z_1 $$, while ensuring that the $$ H\infin $$ norm of the closed-loop transfer matrix from $$ w_2 $$ to $$ z_2 $$ is below a specified bound.

The System
Consider the continuous-time generalized plant $$ P $$ with state-space realization

\begin{align} \dot x&=Ax+B_{1,1}w_1 +B_{1,2}w_2,\\ y&=C_2x+D_{21,1}w_1+D_{21,1}w_2\\ \end{align}$$

where it is assumed that $$ (A, C_2) $$ is detectable.

The Data
The matrices needed as input are $$ A,B_1,B_2,C_2,D_{21},D_{11} $$.

The Optimization Problem
The observer gain L is to be designed to minimize the $$ H_2 $$ norm of the closed-loop transfer matrix $$ T_{11}(s) $$ from the exogenous input $$ w_1 $$ to the performance output $$ z_1 $$ while ensuring the $$ H\infin $$ norm of the closed-loop transfer matrix $$ T_{22}(s) $$ from the exogenous input $$ w_2 $$ to the performance output $$ z_2 $$ is less than $$ \gamma_d $$, where

\begin{align} T_{11}(s) = C_{1,1}(s1-(A-LC_2))^{-1}(B_{1,1}-LD_{21,1})\\ T_{22}(s) = C_{1,2}(s1-(A-LC_2))^{-1}(B_{1,2}-LD_{21,2})+D_{11,22} \end{align} $$

is minimized. The form of the observer would be:

\begin{align} \dot{\hat{x}}=A\hat{x} + L(y - \hat{y}),\\ \hat{y} = C_2\hat{x}\\ \end{align}$$

is to be designed, where $$ L \in \mathbb{R}^{n_x \times n_y} $$ is the observer gain.

The LMI: $$ H_\infin $$ Optimal Observer
The mixed $$H_2 -H\infin $$-optimal observer gain is synthesized by solving for $$ P \in \mathbb{S} ^{n_x}, G \in \mathbb{R} ^{n_x \times n_y} $$, and $$ \nu \in \mathbb{R}_{>0} $$ that minimize $$ \zeta(\nu) = \nu $$ subject to $$ P>0, Z>0 $$,

\begin{align} \begin{bmatrix} PA+ A^TP-GC_2-{C_2}^TG^T && PB_1-GD_{21}\\ \star && -1 \end{bmatrix} <0\\

\begin{bmatrix} PA+ A^TP-GC_2-{C_2}^TG^T && PB_1-GD_{21} && C_1\\ \star && -\gamma1 && {D_{11}}^T\\ \star && \star && -\gamma1 \end{bmatrix} <0\\ \begin{bmatrix} P && C{_{1,1}}^T \\ \star && Z\end{bmatrix} >0\\ trZ < \nu \end{align}$$

Conclusion:
The mixed $$ H_2- H_\infin$$ -optimal observer gain is recovered by $$ L = P^{-1}G $$, the $$ H_2 $$ norm of $$ T_{11}(s) $$ is less than $$ \mu = \sqrt {\nu} $$ and the $$ H_\infin $$ norm of T(s) is less than $$ \gamma_d$$.

Implementation
Link to the MATLAB code designing $$ H_2- H\infin $$- Optimal Observer

Code $ H_2-H\infin $ Optimal Observer

Related LMIs

 * $ H_2 $ Optimal observer
 * $ H\infin $ Optimal observer


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Discrete-Time H2-Optimal observer

In many applications, perhaps even most, the state of the system cannot be directly known. In this case, you will need to strategically to measure key system outputs that will make the system states indirectly observable. Observers need to converge much faster than the system dynamics in order for their estimations to be accurate. Optimal observer synthesis is therefore advantageous. In this LMI, we seek to optimize the H2 norm, which conceptually is minimizing the average magnitude of error in the observer.

The System

\begin{align}

x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k},\\

y_{k}&=C_{c2}x_{k} + D_{d21}w_{k}\\ \end{align} $$

where $$ x \in R^{n}$$  and is the state vector,  $$ A \in R^{n\times n}$$  and is the state matrix,  $$ B \in R^{n\times r}$$  and is the input matrix,  $$ w \in R^{r}$$  and is the exogenous input,  $$ C \in R^{m\times n}$$  and is the output matrix,  $$ D \in R^{m\times r}$$  and is the feedthrough matrix,  $$ y \in R^{m}$$ and is the output, and it is assumed that $$(A_{d}, C_{d2})$$ is detectable.

The Data
The matrices $$ A_{d}, B_{d1}, C_{cd2}, C_{cd1}, D_{d21} $$.

The Optimization Problem
An observer of the form:

\begin{align}

\hat x_{k+1}&=A_{d}\hat x_{k}+ L_{d}(y_{k}-\hat y_{k}),\\

\hat y_{k}&=C_{d2} \hat x_{k} \\ \end{align} $$

is to be designed, where $$ L_{d} \in R^{n_{x}\times n_{y}}$$ is the observer gain.

Defining the error state $$ e_{k} = x_{k} - \hat x_{k}$$, the error dynamics are found to be

$$e_{k+1} = (A_{d} - L_{d}C_{d2} e_{k} + (B_{d1} - L_{d}D_{d21})w_{k}$$,

and the performance output is defined as

$$z_{k} = C_{d1}e_{k}$$.

The observer gain $$L_{d}$$ is to be designed such that the $$H_{2}$$ of the transfer matrix from $$w_{k}$$ to $$z_{k}$$, given by

$$L_{d} \begin{align} T(z) &= C_{d1}(z1 - (A_{d} - L_{d}C_{d2}))^{-1}(B_{d1} - L_{d}D_{d21}),\\ \end{align} $$

is minimized.

The LMI: Discrete-Time H2-Optimal Observer
The discrete-time $$H_{2}$$-optimal observer gain is synthesized by solving for $$P \in S^{n_{x}}$$, $$Z \in S^{n_{z}}$$, $$G_{d} \in R^{n_{x}\times n_{y}}$$, and $$v \in R_{>0}$$ that minimize $$J(v) = v$$ subject to $$P>0, Z>0$$,

\begin{align}

\begin{bmatrix}P & PA_{d}-G_{d}C_{d2} & PB_{d1}-G_{d}D_{d21}\\
 * & P & 0\\
 * & * & 1\end{bmatrix}&>0,\\

\begin{bmatrix} Z & PC_{d1}\\
 * & P\end{bmatrix}&>0,\\

\operatorname{tr}Z<v

\end{align}$$ where $$\operatorname{tr}$$ refers to the trace of a matrix.

Conclusion:
The $$H_{2}$$-optimal observer gain is recovered by $$L_{d} = P^{-1}G_{d}$$ and the $$H_{2}$$ norm of $$T(z)$$ is $$\mu = \sqrt{v}$$. The $$L_{d} $$ matrix is the observer gains that can be used to form the optimal observer:

\begin{align}

\hat x_{k+1}&=A_{d}\hat x_{k}+ L_{d}(y_{k}-\hat y_{k}),\\

\hat y_{k}&=C_{d2} \hat x_{k} \\ \end{align} $$

Implementation
This implementation requires Yalmip and Sedumi.

https://github.com/rezajamesahmed/LMImatlabcode/blob/master/Discrete_Time_H2_Optimal_Observer_LMIs_Wikibook_Example.m

Related LMIs
Mixed H2-Hinfinity discrete time observer

Discrete-Time_Hinfinity-Optimal_Observer


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Discrete-time Hinf-Optimal Observer

In many applications, perhaps even most, the state of the system cannot be directly known. In this case, you will need to strategically to measure key system outputs that will make the system states indirectly observable. Observers need to converge much faster than the system dynamics in order for their estimations to be accurate. Optimal observer synthesis is therefore advantageous. In this LMI, we seek to optimize the H-infinity norm, which conceptually is minimizing the maximum magnitude of error in the observer.

The System
The system needed for this LMI is a discrete-time LTI plant $$G$$, which has the state space realization:

\begin{align}

x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k},\\

y_{k}&=C_{d2}x_{k} + D_{d21}w_{k}\\ \end{align} $$

where $$ x \in R^{n}$$  and is the state vector,  $$ A \in R^{n * n}$$  and is the state matrix,  $$ B \in R^{n * r}$$  and is the input matrix,  $$ w \in R^{r}$$  and is the exogenous input,  $$ C \in R^{m * n}$$  and is the output matrix,  $$ D \in R^{m * r}$$  and is the feedthrough matrix,  $$ y \in R^{m}$$ and is the output, and it is assumed that $$(A_{d}, C_{d2})$$ is detectable.

The Data
The matrices $$ A_{d}, B_{d1}, C_{d2}, D_{d21}, D_{d11} $$.

The Optimization Problem
An observer of the form:

\begin{align}

\hat x_{k+1}&=A_{d}\hat x_{k}+ L_{d}(y_{k}-\hat y_{k}),\\

\hat y_{k}&=C_{d2} \hat x_{k} \\ \end{align} $$

is to be designed, where $$ L_{d} \in R^{n_{x} * n_{y}}$$ is the observer gain.

Defining the error state $$ e_{k} = x_{k} - \hat x_{k}$$, the error dynamics are found to be

$$e_{k+1} = (A_{d} - L_{d}C_{d2})e_{k} + (B_{d1} - L_{d}D_{d21})w_{k}$$,

and the performance output is defined as

$$z_{k} = C_{d1}e_{k} + D_{d11}w_{k}$$.

The observer gain $$L_{d}$$ is to be designed such that the $$H_{inf}$$ of the transfer matrix from $$w_{k}$$ to $$z_{k}$$, given by

$$ \begin{align} T(z) &= C_{d1}(z1 - (A_{d} - L_{d}C_{d2}))^{-1}(B_{d1} - L_{d}D_{d21}) + D_{d11},\\ \end{align} $$

is minimized.

The LMI: Discrete-Time Hinf-Optimal Observer
The discrete-time $$H_{inf}$$-optimal observer gain is synthesized by solving for $$P \in S^{n_{x}}$$, $$G_{d} \in R^{n_{x} * n_{y}}$$, and $$\gamma \in R_{>0}$$ that minimize J$$(\gamma) = \gamma$$ subject to $$P>0$$, and

\begin{align}

\begin{bmatrix}P & PA_{d}-G_{d}C_{d2} & PB_{d1}-G_{d}D_{d21} & 0\\
 * & P & 0 & C^{T}_{d1}\\
 * & * & \gamma * 1 & D^{T}_{d11} \\
 * & * & * & \gamma * 1\end{bmatrix}&>0.\\

\end{align}$$

Conclusion:
The $$H_{inf}$$-optimal observer gain is recovered by $$L_{d} = P^{-1}G_{d}$$ and the $$H_{inf}$$ norm of $$T(z)$$ is $$\gamma$$. This matrix of observer gains can then be used to form the optimal observer formulated by:

\begin{align}

\hat x_{k+1}&=A_{d}\hat x_{k}+ L_{d}(y_{k}-\hat y_{k}),\\

\hat y_{k}&=C_{d2} \hat x_{k} \\ \end{align} $$

Implementation
This implementation requires Yalmip and Sedumi.

https://github.com/rezajamesahmed/LMImatlabcode/blob/master/Hinfobsdiscretetime.m

Related LMIs
Mixed H2-Hinfinity discrete time observer

Discrete-Time_H2-Optimal_Observer


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/Hinf-Optimal Filtering

For systems that have disturbances, filtering can be used to reduce the effects of these disturbances. Described on this page is a method of attaining a filter that will reduce the effects of the disturbances as completely as possible. To do this, we look to find a set of new coefficient matrices that describe the filtered system. The process to achieve such a new system is described below. The H-infinity-filter tries to minimize the maximum magnitude of error.

The System
For the application of this LMI, we will look at linear systems that can be represented in state space as

\begin{align} \dot x &= Ax + Bw, x(0) = x_{0}\\ y &= Cx + Dw\\ z &= Lx \end{align}$$

where $$x \in R^{n}, y \in R^{l}, z \in R^{m}$$ represent the state vector, the measured output vector, and the output vector of interest, respectively, $$w \in R^{p}$$ is the disturbance vector, and $$A, B, C, D$$ and $$L$$ are the system matrices of appropriate dimension.

To further define: $$x$$ is $$\in R^{n}$$ and is the state vector, $$A $$ is $$\in R^{n*n}$$ and is the state matrix, $$B$$ is $$\in R^{n*r}$$ and is the input matrix, $$w$$ is $$\in R^{r}$$ and is the exogenous input, $$C $$ is $$\in R^{m*n}$$ and is the output matrix, $$D$$ and $$L$$ are $$\in R^{m*r}$$ and are feedthrough matrices, and $$y$$ and $$z$$ are $$\in R^{m}$$ and are the output and the output of interest, respectively.

The Data
The data are $$w$$ (the disturbance vector), and $$A, B, C, D$$ and $$L$$ (the system matrices). Furthermore, the $$A$$ matrix is assumed to be stable

The Optimization Problem
We need to design a filter that will eliminate the effects of the disturbances as best we can. For this, we take a filter of the following form:

\begin{align} \dot \sigma &= A_{f}\sigma + B_{f}\sigma, \sigma(0) = \sigma_{0}\\ \hat z &= C_{f}\sigma + D_{f}y, \end{align}$$

where $$\sigma \in R^{n}$$ is the state vector, $$\hat z \in R^{m}$$ is the estimation vector of z, and $$A_{f}, B_{f}, C_{f}, and D_{f}$$ are the coefficient matrices of appropriate dimensions.

Note that the combined complete system can be represented as

\begin{align} \dot x_{e} &= \tilde{A}x_{e} + \tilde{B}w, x_{e}(0) = x_{e0}\\ \tilde{z} &= \tilde{C}x_{e} + \tilde{D}w, \end{align}$$

where $$ \tilde{z} = z - \hat z \in R^{m}$$ is the estimation error,

\begin{align} x_{e} = \begin{bmatrix} x \\ \sigma\end{bmatrix}\\ \end{align}$$ is the state vector of the system, and $$\tilde{A}, \tilde{B}, \tilde{C}, \tilde{D} $$ are the coefficient matrices, defined as:

\begin{align} \tilde{A} = \begin{bmatrix} A & 0 \\ B_{f}C & A_{f} \end{bmatrix}, \tilde{B} = \begin{bmatrix} B \\ B_{f}D\end{bmatrix},\\ \tilde{C} = \begin{bmatrix} L-D_{f}C & -C_{f} \end{bmatrix}, \tilde{D} = -D_{f}D \end{align}$$

In other words, for the system defined above we need to find $$A_{f}, B_{f}, C_{f}, and D_{f}$$ such that

\begin{align} \end{align}$$ where $$ \gamma $$ is a positive constant, and
 * G_{\tilde{z}w}(s)|_{\inf} < \gamma,

\begin{align} G_{\tilde{z}w}(s) = \tilde{C}(sI-\tilde{A})^{-1}\tilde{B} + \tilde{D}. \end{align}$$

The LMI: H-inf Filtering
The solution can be obtained by finding matrices $$ R, X, M, N, Z, D_{f}$$ that obey the following LMIs:

\begin{align} X&>0\\ R - X &>0\\ \begin{bmatrix} RA + A^{T}R + ZC + C^{T}Z^{T} & *&*&*\\ M^{T}+ZC+XA & M^{T}+M &*&*\\ B^{T}R+D^{T}Z^{T} & B^{T}X+D^{T}Z^{T} & -\gamma I &*\\ L-D_{f}C & -N & -D_{f}D & -\gamma I\end{bmatrix}&<0\\ \end{align}$$

Conclusion:
To find the corresponding filter, use the optimized matrices from the solution to find:

A_{f} = X^{-1}M, B_{f}=X^{-1}Z, C_{f} = N, D_{f} = D_{f} $$

These matrices can then be used to produce $$\tilde{A}, \tilde{B}, \tilde{C}, \tilde{D}$$ to construct the filter described above, that will best eliminate the disturbances of the system.

Implementation
This implementation requires Yalmip and Sedumi.

https://github.com/rezajamesahmed/LMImatlabcode/blob/master/hinf_filtering.m

Related LMIs
H-2_filtering


text:
User:Margav06/sandbox/Click here to continue/Optimal control systems/H2-Optimal Filtering

For systems that have disturbances, filtering can be used to reduce the effects of these disturbances. Described on this page is a method of attaining a filter that will reduce the effects of the disturbances as completely as possible. To do this, we look to find a set of new coefficient matrices that describe the filtered system. The process to achieve such a new system is described below. The H2-filter tries to minimize the average magnitude of error.

The System
For the application of this LMI, we will look at linear systems that can be represented in state space as

\begin{align} \dot x &= Ax + Bw, x(0) = x_{0}\\ y &= Cx + Dw\\ z &= Lx \end{align}$$

where $$x \in R^{n}, y \in R^{l}, z \in R^{m}$$ represent the state vector, the measured output vector, and the output vector of interest, respectively, $$w \in R^{p}$$ is the disturbance vector, and $$A, B, C, D$$ and $$L$$ are the system matrices of appropriate dimension. To further define: $$x$$ is $$\in R^{n}$$ and is the state vector, $$A $$ is $$\in R^{n*n}$$ and is the state matrix, $$B$$ is $$\in R^{n*r}$$ and is the input matrix, $$w$$ is $$\in R^{r}$$ and is the exogenous input, $$C $$ is $$\in R^{m*n}$$ and is the output matrix, $$D$$ and $$L$$ are $$\in R^{m*r}$$ and are feedthrough matrices, and $$y$$ and $$z$$ are $$\in R^{m}$$ and are the output and the output of interest, respectively.

The Data
The data are $$w$$ (the disturbance vector), and $$A, B, C, D$$ and $$L$$ (the system matrices). Furthermore, the $$A$$ matrix is assumed to be stable

The Optimization Problem
We need to design a filter that will eliminate the effects of the disturbances as best we can. For this, we take a filter of the following form:

\begin{align} \dot \sigma &= A_{f}\sigma + B_{f}y, \sigma(0) = \sigma_{0}\\ \hat z &= C_{f}\sigma, \end{align}$$

where $$\sigma \in R^{n}$$ is the state vector, $$\hat z \in R^{m}$$ is the estimation vector, and $$A_{f}, B_{f}, C_{f}$$ are the coefficient matrices of appropriate dimensions.

Note that the combined complete system can be represented as

\begin{align} \dot x_{e} &= \tilde{A}x_{e} + \tilde{B}w, x_{e}(0) = x_{e0}\\ \tilde{z} &= \tilde{C}x_{e}, \end{align}$$

where $$ \tilde{z} = z - \hat z \in R^{m}$$ is the estimation error,

\begin{align} x_{e} = \begin{bmatrix} x \\ \sigma\end{bmatrix}\\ \end{align}$$ is the state vector of the system, and $$\tilde{A}, \tilde{B}, \tilde{C}$$ are the coefficient matrices, defined as:

\begin{align} \tilde{A} = \begin{bmatrix} A & 0 \\ B_{f}C & A_{f} \end{bmatrix}, \tilde{B} = \begin{bmatrix} B \\ B_{f}D\end{bmatrix},\\ \tilde{C} = \begin{bmatrix} L & -C_{f} \end{bmatrix} \end{align}$$

In other words, for the system defined above we need to find $$A_{f}, B_{f}, C_{f}$$ such that

\begin{align} \end{align}$$ where $$ \gamma $$ is a positive constant, and
 * G_{\tilde{z}w}(s)||_{2} < \gamma,

\begin{align} G_{\tilde{z}w}(s) = \tilde{C}(sI-\tilde{A})^{-1}\tilde{B} \end{align}$$

The LMI: H-2 Filtering
For this LMI, the solution exists if one of the following sets of LMIs hold:

Matrices $$ R, X, M, N, Z, Q$$ exist that obey the following LMIs:

\begin{align} R - X &>0,\\ trace(Q) &< \gamma^{2},\\ \begin{bmatrix} -Q& *&*\\ L^{T} &-R & *\\ -N^{T} & -X & -X\end{bmatrix}&<0,\\ \begin{bmatrix} RA + A^{T}R + ZC + C^{T}Z^{T} & *&*\\ M^{T}+ZC+XA & M^{T}+M &*\\ B^{T}R+D^{T}Z^{T} & B^{T}X+D^{T}Z^{T} & -I\end{bmatrix}&<0.\\ \end{align}$$

or

Matrices $$ \bar{R}, \bar{X}, \bar{M}, \bar{N}, \bar{Z}, \bar{Q}$$ exist that obey the following LMIs:

\begin{align} \bar{R} - \bar{X} &>0,\\ trace(\bar{Q}) &< \gamma^{2},\\ \begin{bmatrix} -\bar{Q}& *&*\\ \bar{R}B+\bar{Z}D &-\bar{R} & *\\ \bar{X}B + \bar{Z}D & -\bar{X} & -I\end{bmatrix}&<0,\\ \begin{bmatrix} \bar{R}A + A^{T}\bar{R} + \bar{Z}C + C^{T}\bar{Z}^{T} & *&*\\ \bar{M}^{T}+\bar{Z}C+\bar{X}A & \bar{M}^{T}+\bar{M} &*\\ L & -\bar{N} & -I\end{bmatrix}&<0.\\ \end{align}$$

Conclusion:
To find the corresponding filter, use the optimized matrices from the first solution to find:

A_{f} = X^{-1}M, B_{f}=X^{-1}Z, C_{f} = N $$

Or the second solution to find:

A_{f} = \bar{X}^{-1}\bar{M}, B_{f}=\bar{X}^{-1}\bar{Z}, C_{f} = \bar{N} $$

These matrices can then be used to produce $$\tilde{A}, \tilde{B}, \tilde{C} $$ to construct the final filter below, that will best eliminate the disturbances of the system.

\begin{align} \dot x_{e} &= \tilde{A}x_{e} + \tilde{B}w, x_{e}(0) = x_{e0}\\ \tilde{z} &= \tilde{C}x_{e}, \end{align}$$

Implementation
This implementation requires Yalmip and Sedumi.

https://github.com/rezajamesahmed/LMImatlabcode/blob/master/H2_Filtering.m

Related LMIs
H-infinity filtering


text:
User:Margav06/sandbox/Click here to continue/Robust Controls

Robust Controls

 * 1) Continuous Time
 * 2) /Robust Stabilization of Second-Order Systems/
 * 3) /Robust Stabilization of Hinf Optimal State Feedback Control/
 * 4) Discrete Time
 * 5) /Robust Hinf state Feedback Control/


text:
User:Margav06/sandbox/Click here to continue/Robust Controls/Robust Stabilization of Second-Order Systems

Stabilization is a vastly important concept in controls, and is no less important for second order systems with perturbations. Such a second order system can be conceptualized most simply by the model of a mass-spring-damper, with added perturbations. Velocity and position are of course chosen as the states for this system, and the state space model can be written as it is below. The goal of stabilization in this context is to design a control law that is made up of two controller gain matrices $$ K_{p}$$, and $$ K_{d}$$. These allow the construction of a stabilized closed loop controller.

The System
In this LMI, we have an uncertain second-order linear system, that can be modeled in state space as:

\begin{align} (A_{2}+\Delta A_{2}) \ddot x + (A_{1} + \Delta A_{1})\dot x + (A_{0} + \Delta A_{0})x &= Bu )\\ y_{d} &= C_{d} \dot x\\ y_{p} &= C_{p} x \end{align}$$

where $$ x \in R^{n}$$ and $$ u \in R^{r}$$ are the state vector and the control vector, respectively, $$ y_{d} \in R^{m_{p}}$$ and $$ y_{d} \in R^{m_{p}}$$ are the derivative output vector and the proportional output vector, respectively, and $$ A_{2}, A_{1}, A_{0}, B, C_{d}, C_{p}$$ are the system coefficient matrices of appropriate dimensions.

$$ \Delta A_{2}, \Delta A_{1},$$ and $$ \Delta A_{0}$$ are the perturbations of matrices $$ A_{2}, A_{1},$$ and $$A_{0}$$, respectively, are bounded, and satisfy

\begin{align} \end{align}$$
 * \Delta A_{2}|_{2} \leq \epsilon_{2}, |\Delta A_{1}|_{2} \leq \epsilon_{1}, |\Delta A_{0}|_{2} \leq \epsilon_{0},

or

\begin{align} max\{\|\Delta a_{2ij}\|\} \leq \eta_{2}, max\{\|\Delta a_{1ij}\|\} \leq \eta_{1}, max\{\|\Delta a_{0ij}\|\} \leq \eta_{0}, \end{align}$$

where $$\epsilon_{2}, \epsilon_{1}, \epsilon_{0}$$ and $$\eta_{2}, \eta_{1}, \eta_{0}$$ are two sets of given positive scalars, $$\Delta a_{2ij}, \Delta a_{1ij},$$ and $$\Delta a_{0ij}$$ are the i-th row and j-th collumn elements of matrices $$\Delta A_{2}, \Delta A_{1}, $$ and $$\Delta A_{0}, $$, respectively. Also, the perturbation notations also satisfy the assumption that $$ \Delta A_{2}, \Delta A_{0} \in S^{n} $$ and $$ A_{2} + \Delta A_{2} > 0$$.

To further define: $$x$$ is$$\in R^{n}$$ and is the state vector, $$A_{0} $$ is $$\in R^{n*n}$$ and is the state matrix on $$ x $$, $$A_{1} $$ is $$\in R^{n*n}$$ and is the state matrix on $$ \dot x $$ , $$A_{2} $$ is $$\in R^{n*n}$$ and is the state matrix on $$ \ddot x $$, $$B$$ is $$\in R^{n*r}$$ and is the input matrix, $$u$$ is $$\in R^{r}$$ and is the input, $$C_{d} $$ and $$C_{p} $$ are $$\in R^{m*n}$$ and are the output matrices, $$y_{d}$$ is $$\in R^{m}$$ and is the output from $$C_{d} $$, and $$y_{p}$$ is $$\in R^{m}$$ and is the output from $$C_{p} $$.

The Data
The matrices $$ A_{2}, A_{1}, A_{0}, B, C_d, C_p $$ and perturbations $$ \Delta A_{2}, \Delta A_{1}, \Delta A_{0}, $$ describing the second order system with perturbations.

The Optimization Problem
For the system defined as shown above, we need to design a feedback control law such that the following system is Hurwitz stable. In other words, we need to find the matrices $$ K_{p}$$ and $$ K_{d}$$ in the below system.

\begin{align} (A_{2}+\Delta A_{2}) \ddot x + (A_{1} - BK_{p}C_{p} + \Delta A_{1})\dot x + (A_{0} - BK_{d}C_{d} + \Delta A_{0})x &= 0 \\ \end{align}$$

However, to do proceed with the solution, first we need to present a Lemma. This Lemma comes from Appendix A.6 in "LMI's in Control systems" by Guang-Ren Duan and Hai-Hua Yu. This Lemma states the following: if $$A_{2} > 0, A_{1} + A_{1}^{T} > 0, A_{0} > 0$$, then the following is also true for the system described above:

The system is hurwitz stable if

\begin{align} \lambda_{min}(A_{2}) > |\Delta A_{2}|_{2}, \lambda_{min}(A_{1} + A_{1}^{T}) > |\Delta A_{1}|_{2}, \lambda_{min}(A_{0}) > |\Delta A_{0}|_{2}\end{align}$$,

or

the system is hurwitz stable if

\begin{align}\lambda_{min}(A_{2}) > \sqrt{l_{2}}max\{\|\Delta a_{2ij}\|\}, \lambda_{min}(A_{1} + A_{1}^{T}) > \sqrt{l_{1}}max\{\|\Delta a_{1ij}\|\}, \lambda_{min}(A_{0}) > \sqrt{l_{0}}max\{\|\Delta a_{0ij}\|\}\end{align}$$

, where $$l_{2}, l_{1}, l_{0}$$ are the numbers of nonzero elements in matrices $$ \Delta A_{2}, \Delta A_{1}, \Delta A_{0},$$ respectively.

The LMI: Robust Stabilization of Second Order Systems
This problem is solved by finding matrices $$K_{p} \in R^{r*m_{p}}$$ and $$K_{d} \in R^{r*m_{d}}$$ that satisfy either of the following sets of LMIs.

\begin{align} A_{0} - BK_{d}C_{d} &> \epsilon_{0}I,\\ (A_{1} - BK_{p}C_{p}) + (A_{1} - BK_{p}C_{p})^{T} &> \epsilon_{1}I. \end{align}$$

or

\begin{align} A_{0} - BK_{d}C_{d} &> \eta_{0}\sqrt{l_{0}}I,\\ (A_{1} - BK_{p}C_{p}) + (A_{1} - BK_{p}C_{p})^{T} &> \eta_{1}\sqrt{l_{1}}I. \end{align}$$

Conclusion:
Having solved the above problem, the matrices $$K_{p}$$ and $$K_{d}$$ can be substituted into the input as $$ u = K_{p}C_{p}\dot x + K_{d}C_{d}x $$ to robustly stabilize the second order uncertain system. The new system is stable in closed loop.

Implementation
This implementation requires Yalmip and Sedumi.

https://github.com/rezajamesahmed/LMImatlabcode/blob/master/ROBstab2ndorder.m

Related LMIs
Stabilization of Second-Order Systems


text:
User:Margav06/sandbox/Click here to continue/Robust Controls/Robust Stabilization of Hinf Optimal State Feedback Control

Additive uncertainty
Full State Feedback is a control technique which places a given system's closed loop system poles in locations specified by desired performance specifications. One can use $$H_{\infty}$$ methods to turn this into an optimization problem with the goal to minimize the impact of uncertain perturbations in a closed loop system while maintaining system stability. This is done by minimizing the $$ H_{\infty} $$ norm of the uncertain closed loop system, which minimizes the worst case effect of the system disturbance or perturbation. This can be done for single-input single-output (SISO) or multiple-input multiple-output (MIMO) systems. Here we consider the case of a MIMO system with additive uncertainties.

The System
Consider linear system with uncertainty below:
 * $$\begin{bmatrix} \dot{x}\\z \end{bmatrix} = \begin{bmatrix} (A+{\Delta}A) & (B_{1}+{\Delta}B_{1}) & B_{2}\\ C & D_{1} & D_{2} \end{bmatrix} \begin{bmatrix} x\\u\\w \end{bmatrix}

$$ Where $$x(t)\in \R^n$$ is the state, $$z(t)\in \R^m$$ is the output, $$w(t)\in \R^p$$ is the exogenous input or disturbance vector, and $$u(t)\in \R^r$$ is the actuator input or control vector, at any $$t\in \R$$

$$ {\Delta}A $$ and $$ {\Delta}B_{1} $$ are real-valued matrices which represent the time-varying parameter uncertainties in the form:

$$ \begin{bmatrix} {\Delta}A & {\Delta}B_{1} \end{bmatrix} = H F \begin{bmatrix} E_{1} & E_{2} \end{bmatrix} $$

Where

$$ H, E_{1}, E_{2} $$ are known matrices with appropriate dimensions and $$ F $$ is the uncertain parameter matrix which satisfies: $$ F^TF \le I $$

For additive perturbations: $$ {\Delta}A = {\delta}_{1}A_{1}+{\delta}_{2}A_{2}+...+{\delta}_{k}A_{k} $$

Where

$$ A_{i}, i = 1, 2, ... k $$ are the known system matrices and

$$ {\delta}_{i}, i = 1, 2, ... k $$ are the perturbation parameters which satisfy $$ \vert {\delta}_{i} \vert < r_{i}, i = 1, 2, ..., k $$

Thus, $$ {\Delta}A = HFE $$ with

$$ H = \begin{bmatrix} A_{1} & A_{2} & ... & A_{k} \end{bmatrix} $$

$$ E = (\sum_{i=1}^k r_{i}^2)^{1/2} $$

$$ F = (\sum_{i=1}^k r_{i}^2)^{-1/2} \begin{bmatrix} {\delta}_{1}I \\ {\delta}_{2}I \\ \vdots \\ {\delta}_{k}I \end{bmatrix} $$

The Data
$$A$$, $$B_{1}$$, $$B_{2}$$, $$C$$, $$D_{1}$$, $$D_{2}$$, $$E_{1}$$, $$E_{2}$$, $$ {\gamma} $$ are known.

The LMI:Full State Feedback Optimal $$H_{\infty}$$ Control LMI
There exists $$X>0$$ and $$W$$ and scalar $$ {\alpha} $$ such that

 * $$\begin{bmatrix} {\Psi}(X,W) & B_{2} & (CX+D_{1}W)^{T} & (E_{1}X+E_{2}W)^{T} \\ B_{2}^{T} & -{\gamma}I & D_{2}^{T} & 0\\ CX+D_{1}W & D_{2} & -{\gamma}I & 0 \\ E_{1}X+E_{2}W & 0 & 0 & -{\alpha}I \end{bmatrix}<0

$$.

Where $$ {\Psi}(X,W) = (AX+B_{1}W)_{s} + {\alpha}HH^{T} $$

And $$K=WX^{-1}$$.

Conclusion:
Once K is found from the optimization LMI above, it can be substituted into the state feedback control law $$ u(t) = Kx(t) $$ to find the robustly stabilized closed loop system as shown below:

 * $$\begin{bmatrix} \dot{x}\\z \end{bmatrix} = \begin{bmatrix} (A+{\Delta}A)+(B_{1}+{\Delta}B_{1})K & B_{2}\\ (C + D_{1})K & D_{2} \end{bmatrix} \begin{bmatrix} x\\w \end{bmatrix}

$$

where $$x(t)\in \R^n$$ is the state, $$z(t)\in \R^m$$ is the output, $$w(t)\in \R^p$$ is the exogenous input or disturbance vector, and $$u(t)\in \R^r$$ is the actuator input or control vector, at any $$t\in \R$$

Finally, the transfer function of the system is denoted as follows:

$$ G_{zw}(s) = (C+D_{1}K)(sI-[(A+{\Delta}A)+(B_{1}+{\Delta}B_{1})K])^{-1}B_{2}+D_{2} $$

Implementation
This implementation requires Yalmip and Sedumi. https://github.com/rubindan/LMIcontrol/blob/master/HinfFilter.m

Related LMIs
Full State Feedback Optimal H_inf LMI

Return to Main Page:
LMIs in Control: https://en.wikibooks.org/wiki/LMIs_in_Control


text:
User:Margav06/sandbox/Click here to continue/Robust Controls/Robust Hinf state Feedback Control

Additive uncertainty
Full State Feedback is a control technique which places a given system's closed loop system poles in locations specified by desired performance specifications. One can use $$H_{\infty}$$ methods to turn this into an optimization problem with the goal to minimize the impact of uncertain perturbations in a closed loop system while maintaining system stability. This is done by minimizing the $$ H_{\infty} $$ norm of the uncertain closed loop system, which minimizes the worst case effect of the system disturbance or perturbation. This can be done for single-input single-output (SISO) or multiple-input multiple-output (MIMO) systems. Here we consider the case of a MIMO system with additive uncertainties.

The System
Consider linear system with uncertainty below:
 * $$\begin{bmatrix} \dot{x}\\z \end{bmatrix} = \begin{bmatrix} (A+{\Delta}A) & (B_{1}+{\Delta}B_{1}) & B_{2}\\ C & D_{1} & D_{2} \end{bmatrix} \begin{bmatrix} x\\u\\w \end{bmatrix}

$$ Where $$x(t)\in \R^n$$ is the state, $$z(t)\in \R^m$$ is the output, $$w(t)\in \R^p$$ is the exogenous input or disturbance vector, and $$u(t)\in \R^r$$ is the actuator input or control vector, at any $$t\in \R$$

$$ {\Delta}A $$ and $$ {\Delta}B_{1} $$ are real-valued matrices which represent the time-varying parameter uncertainties in the form:

$$ \begin{bmatrix} {\Delta}A & {\Delta}B_{1} \end{bmatrix} = H F \begin{bmatrix} E_{1} & E_{2} \end{bmatrix} $$

Where

$$ H, E_{1}, E_{2} $$ are known matrices with appropriate dimensions and $$ F $$ is the uncertain parameter matrix which satisfies: $$ F^TF \le I $$

For additive perturbations: $$ {\Delta}A = {\delta}_{1}A_{1}+{\delta}_{2}A_{2}+...+{\delta}_{k}A_{k} $$

Where

$$ A_{i}, i = 1, 2, ... k $$ are the known system matrices and

$$ {\delta}_{i}, i = 1, 2, ... k $$ are the perturbation parameters which satisfy $$ \vert {\delta}_{i} \vert < r_{i}, i = 1, 2, ..., k $$

Thus, $$ {\Delta}A = HFE $$ with

$$ H = \begin{bmatrix} A_{1} & A_{2} & ... & A_{k} \end{bmatrix} $$

$$ E = (\sum_{i=1}^k r_{i}^2)^{1/2} $$

$$ F = (\sum_{i=1}^k r_{i}^2)^{-1/2} \begin{bmatrix} {\delta}_{1}I \\ {\delta}_{2}I \\ \vdots \\ {\delta}_{k}I \end{bmatrix} $$

The Data
$$A$$, $$B_{1}$$, $$B_{2}$$, $$C$$, $$D_{1}$$, $$D_{2}$$, $$E_{1}$$, $$E_{2}$$, $$ {\gamma} $$ are known.

The LMI:Full State Feedback Optimal $$H_{\infty}$$ Control LMI
There exists $$X>0$$ and $$W$$ and scalar $$ {\alpha} $$ such that

 * $$\begin{bmatrix} {\Psi}(X,W) & B_{2} & (CX+D_{1}W)^{T} & (E_{1}X+E_{2}W)^{T} \\ B_{2}^{T} & -{\gamma}I & D_{2}^{T} & 0\\ CX+D_{1}W & D_{2} & -{\gamma}I & 0 \\ E_{1}X+E_{2}W & 0 & 0 & -{\alpha}I \end{bmatrix}<0

$$.

Where $$ {\Psi}(X,W) = (AX+B_{1}W)_{s} + {\alpha}HH^{T} $$

And $$K=WX^{-1}$$.

Conclusion:
Once K is found from the optimization LMI above, it can be substituted into the state feedback control law $$ u(t) = Kx(t) $$ to find the robustly stabilized closed loop system as shown below:

 * $$\begin{bmatrix} \dot{x}\\z \end{bmatrix} = \begin{bmatrix} (A+{\Delta}A)+(B_{1}+{\Delta}B_{1})K & B_{2}\\ (C + D_{1})K & D_{2} \end{bmatrix} \begin{bmatrix} x\\w \end{bmatrix}

$$

where $$x(t)\in \R^n$$ is the state, $$z(t)\in \R^m$$ is the output, $$w(t)\in \R^p$$ is the exogenous input or disturbance vector, and $$u(t)\in \R^r$$ is the actuator input or control vector, at any $$t\in \R$$

Finally, the transfer function of the system is denoted as follows:

$$ G_{zw}(s) = (C+D_{1}K)(sI-[(A+{\Delta}A)+(B_{1}+{\Delta}B_{1})K])^{-1}B_{2}+D_{2} $$

Implementation
This implementation requires Yalmip and Sedumi. https://github.com/rubindan/LMIcontrol/blob/master/HinfFilter.m

Related LMIs
Full State Feedback Optimal H_inf LMI

Return to Main Page:
LMIs in Control: https://en.wikibooks.org/wiki/LMIs_in_Control


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems

Applications of Linear systems

 * 1) /LMI for Attitude Control of Nonrotating Missiles, Pitch Channel/
 * 2) /LMI for Attitude Control of Nonrotating Missiles, Yaw/Roll Channel/
 * 3) /LMI for H2/Hinf Polytopic Controller for Robot Arm on a Quadrotor/
 * 4) /An LMI for the Kalman Filter/
 * 5) /Hinf Optimal Model Reduction/
 * 6) /An LMI for Multi-Robot Systems/
 * 7) /Helicopter Inner Loop LMI/
 * 8) /Hinf LMI Satellite Attitude Control/
 * 9) /H2 LMI Satellite Attitude Control/
 * 10) /Mixed H2-H∞ LMI Satellite Attitude Control/
 * 11) /Mixed H2/Hinf LMI Satellite Attitude Control/
 * 12) /Problem of Space Rendezvous and LMI Approaches/
 * 13) /LMI for Attitude Control of BTT Missiles, Roll Channel/


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/LMI for Attitude Control of Nonrotating Missiles, Pitch Channel

LMI for Attitude Control of Nonrotating Missles, Pitch Channel

The dynamic model of a missile is very complicated and a simplified model is used. To do so, we consider a simplified attitude system model for the pitch channel in the system. We aim to achieve a non-rotating motion of missiles. It is worthwhile to note that the attitude control design for the pitch channel and the yaw/roll channel can be solved exactly in the same way while representing matrices of the system are different.

The System
The state-space representation for the pitch channel can be written as follows:

$$ \begin{align} \dot{x}(t) &= A(t)x(t) + B_{1}(t)u(t) + B_{2}(t)d(t) \\ y(t) &= C(t)x(t) + D_{1}(t)u(t) + D_{2}(t)d(t) \end{align} $$

where $$ x = [\alpha \quad w_{z} \quad \delta_{z}]^{\text{T}}$$, $$ u = \delta_{zc} $$, $$ y = [\alpha \quad n_{y}]^{\text{T}}$$, and $$ d = [\beta \quad w_{y}]^{\text{T}}$$ are the state variable, control input, output, and disturbance vectors, respectively. The paprameters $$ \alpha $$, $$ w_{z} $$, $$ \delta_{z} $$, $$ \delta_{zc} $$, $$ n_{y} $$, $$ \beta $$, and $$ w_{y} $$ stand for the attack angle, pitch angular velocity, the elevator deflection, the input actuator deflection, the overload on the side direction, the sideslip angle, and the yaw angular velocity, respectively.

The Data
In the aforementioned pitch channel system, the matrices $$ A(t), B_{1}(t), B_{2}(t), C(t), D_{1}(t),$$ and $$D_{2}(t)$$ are given as:

$$ \begin{align} A(t) = \begin{bmatrix} -a_{4}(t) & 1 & -a_{5}(t) \\ -\acute{a}_{1}(t)a_{4}(t) - a_{2}(t) & \acute{a}_{1}(t) - a_{1}(t) & \acute{a}_{1}(t)a_{5}(t) - a_{3}(t) \\ 0 & 0 & -1/\tau_{z} \end{bmatrix} \end{align} $$

$$ \begin{align} B_{1}(t) = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, \quad B_{2}(t) = \frac{w_{x}}{57.3} \begin{bmatrix} -1 & 0 \\ -\acute{a}_{1}(t) & \frac{J_{x}-J_{y}}{J_{z}} \\ 0 & 0 \end{bmatrix} \end{align} $$

$$ \begin{align} C(t) = \frac{w_{x}}{57.3} \begin{bmatrix} 57.3g & 0 & 0 \\ V(t)a_{4}(t) & 0 & V(t)a_{5}(t) \end{bmatrix} \end{align} $$

$$ \begin{align} D_{1}(t) = 0, \quad D_{2}(t) = \frac{1}{57.3g} \begin{bmatrix} 0 & 0 \\ V(t)b_{7}(t) & 0 \end{bmatrix} \end{align} $$

where $$ a_{1}(t) \sim a_{6}(t), \quad b_{1}(t) \sim b_{7}(t), \acute{a}_{1}(t), \acute{b}_{1}(t) $$ and $$ c_{1}(t) \sim c_{4}(t) $$ are the system parameters. Moreover, $$ V $$ is the speed of the missle and $$J_{x}$$, $$J_{y}$$, and $$J_{z}$$ are the rotary inertia of the missle corresponding to the body coordinates.

The Optimization Problem
The optimization problem is to find a state feedback control law $$ u= Kx$$ such that:

1. The closed-loop system:

$$ \begin{align} \dot{x} &= (A+B_{1}K)x + B_{2}d \\ z &= (C + D_{1}K)x + D_{2}d \end{align} $$

is stable.

2. The $$ H_{\infty} $$ norm of the transfer function:

$$G_{zd}(s) = (C + D_{1}K)(sI-(A+B_{1}K))^{-1}B_{2} + D_{2}$$

is less than a positive scalar value, $$ \gamma $$. Thus:

$$ ||G_{zd}(s)||_{\infty} < \gamma $$

The LMI: LMI for non-rotating missle attitude control
Using Theorem 8.1 in [1], the problem can be equivalently expressed in the following form:

$$ \begin{align} &\text{min} \quad \gamma \\ &\text{s.t.} \quad X > 0 \\ &\begin{bmatrix} (AX+B_{1}W)^{T} + AX+B_{1}W & B_{2} & (CX+D_{1}W)^{T} \\ B_{2}^{T} & -\gamma I & D_{2}^{T} \\ CX + D_{1}W & D_{2} & -\gamma I \end{bmatrix} < 0 \end{align}$$

Conclusion:
As mentioned, the aim is to attenuate the disturbance on the performance of the missile. The parameter $$ \gamma $$ is the disturbance attenuation level. When the matrices $$ W $$ and $$ X $$ are determined in the optimization problem, the controller gain matrix can be computed by:

$$ K = WX^{-1} $$

Implementation
A link to Matlab codes for this problem in the Github repository:

https://github.com/asalimil/LMI-for-Non-rotating-Missle-Attitude-Control

Related LMIs
LMI for Attitude Control of Nonrotating Missles, Yaw/Roll Channel

Return to Main Page
LMIs in Control/Tools


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/LMI for Attitude Control of Nonrotating Missiles, Yaw/Roll Channel

LMI for Attitude Control of Nonrotating Missles, Yaw/Roll Channel

Deriving the exact dynamic modeling of a missile is a very complicated procedure. Thus, a simplified model is used to model the missile dynamics. To do so, we consider a simplified attitude system model for the yaw/roll channel of the system. We aim to achieve a non-rotating motion of missiles. Note that the attitude control design for the yaw/roll channel and the pitch channel can be solved exactly in the same way except for different representing matrices of the system.

The System
The state-space representation for the yaw/roll channel can be written as follows:

$$ \begin{align} \dot{x}(t) &= A(t)x(t) + B_{1}(t)u(t) + B_{2}(t)d(t) \\ y(t) &= C(t)x(t) + D_{1}(t)u(t) + D_{2}(t)d(t) \end{align} $$

where $$ x = [\beta \quad w_{y} \quad w_{x} \quad \delta_{x} \quad \delta_{y}]^{\text{T}}$$, $$ u = [\delta_{xc} \quad \delta_{yc} ]^{\text{T}} $$, $$ y = [n_{z} \quad w_{x}]^{\text{T}}$$, and $$ d = \delta_{z}$$ are the state variable, control input, output, and disturbance vectors, respectively. The paprameters $$ \alpha $$, $$ w_{z} $$, $$ \delta_{z} $$, $$ \delta_{zc} $$, $$ n_{y} $$, $$ \beta $$, and $$ w_{y} $$ stand for the attack angle, pitch angular velocity, the elevator deflection, the input actuator deflection, the overload on the side direction, the sideslip angle, and the yaw angular velocity, respectively.

The Data
In the aforementioned yaw/roll channel system, the matrices $$ A(t), B_{1}(t), B_{2}(t), C(t), D_{1}(t),$$ and $$D_{2}(t)$$ are given as:

$$ \begin{align} A(t) = \begin{bmatrix} A_{11}(t) & A_{12}(t)\\ 0    & A_{22}(t) \end{bmatrix} \end{align} $$

where

$$ \begin{align} A_{11}(t) = \begin{bmatrix} -b_{4}(t) & 1 & \frac{\alpha(t)}{57.3} \\ -\acute{b}_{1}(t)b_{4}(t) - b_{2}(t) & -\acute{b}_{1}(t) - \acute{b}_{1}(t) & \frac{J_{y}-J_{z}}{57.3J_{x}}{w}_{z}(t) - \frac{\acute{b}_{1}\alpha(t)}{57.3}\\ c_{2}(t) & \frac{J_{y}-J_{z}}{57.3J_{x}}{w}_{z}(t) & -c_{1}(t) \end{bmatrix} \end{align} $$

$$ \begin{align} A_{12}(t) = \begin{bmatrix} 0 & -b_{5}(t)\\ 0 & -\acute{b}_{1}(t)\acute{b}_{5} - b_{3}(t) \\ -c_{3}(t) & c_{4}(t) \end{bmatrix} \end{align} $$

$$ \begin{align} A_{22}(t) = -\frac{1}{\tau_{x}\tau_{y}} \begin{bmatrix} \tau_{y} & 0\\ 0 & \tau_{x} \end{bmatrix} \end{align} $$

and

$$ \begin{align} B_{1}(t) = \begin{bmatrix} 0 & 0\\ 0 & 0\\ 0 & 0\\ \frac{1}{\tau_{x}} & 0\\ 0 & \frac{1}{\tau_{y}} \end{bmatrix}, \quad B_{2}(t) = \begin{bmatrix} a_{6}(t) \\ -\acute{b}_{1}(t)a_{6}(t) \\ 0\\ 0 \\ 0 \end{bmatrix} \end{align} $$

$$ \begin{align} C(t) = -\frac{1}{57.3g} \begin{bmatrix} V(t)b_{4}(t) & 0 & 0 & 0 & V(t)b_{5}(t)\\ 0 & 0 & -57.3g & 0 & 0 \end{bmatrix} \end{align} $$

$$ \begin{align} D_{1}(t) = 0, \quad D_{2}(t) = -\frac{V(t)}{57.3g} \begin{bmatrix} b_{6}(t) \\ 0 \end{bmatrix} \end{align} $$

where $$ a_{1}(t) \sim a_{6}(t), \quad b_{1}(t) \sim b_{7}(t), \acute{a}_{1}(t), \acute{b}_{1}(t) $$ and $$ c_{1}(t) \sim c_{4}(t) $$ are the system parameters. Moreover, $$ V $$ is the speed of the missle and $$J_{x}$$, $$J_{y}$$, and $$J_{z}$$ are the rotary inertia of the missle corresponding to the body coordinates.

The Optimization Problem
The optimization problem is to find a state feedback control law $$ u= Kx$$ such that:

1. The closed-loop system:

$$ \begin{align} \dot{x} &= (A+B_{1}K)x + B_{2}d \\ z &= (C + D_{1}K)x + D_{2}d \end{align} $$

is stable.

2. The $$ H_{\infty} $$ norm of the transfer function:

$$G_{zd}(s) = (C + D_{1}K)(sI-(A+B_{1}K))^{-1}B_{2} + D_{2}$$

is less than a positive scalar value, $$ \gamma $$. Thus:

$$ ||G_{zd}(s)||_{\infty} < \gamma $$

The LMI: LMI for non-rotating missle attitude control
Using Theorem 8.1 in [1], the problem can be equivalently expressed in the following form:

$$ \begin{align} &\text{min} \quad \gamma \\ &\text{s.t.} \quad X > 0 \\ &\begin{bmatrix} (AX+B_{1}W)^{T} + AX+B_{1}W & B_{2} & (CX+D_{1}W)^{T} \\ B_{2}^{T} & -\gamma I & D_{2}^{T} \\ CX + D_{1}W & D_{2} & -\gamma I \end{bmatrix} < 0 \end{align}$$

Conclusion:
As mentioned, the aim is to attenuate the disturbance on the performance of the missile. The parameter $$ \gamma $$ is the disturbance attenuation level. When the matrices $$ W $$ and $$ X $$ are determined in the optimization problem, the controller gain matrix can be computed by:

$$ K = WX^{-1} $$

Implementation
A link to Matlab codes for this problem in the Github repository:

https://github.com/asalimil/LMI-for-Attitude-Control-Nonrotating-Missle-Yaw-Roll-Channel

Related LMIs
LMI for Attitude Control of Nonrotating Missles, Pitch Channel

Return to Main Page
LMIs in Control/Tools


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/LMI for H2/Hinf Polytopic Controller for Robot Arm on a Quadrotor

The System:

\begin{align} \dot x(t)&=A x(t)+B_1 w(t)+B_2 u(t) \\ z(t)&=C_1 x(t)+D_{11} w(t)+D_{12} u(t)\\ y(t)&=C_2 x(t)+D_{21} w(t)+D_{22} u(t)\\ \dot x_K(t)&=A_K x_K(t)+B_K y(t)\\ u(t)&=C_K x_K (t)+D_K y(t)\\ \end{align} $$

The Optimization Problem:
Given a state space system of

\begin{align} \dot x(t)&=A x(t)+B_1 w(t)+B_2 u(t) \\ z(t)&=C_1 x(t)+D_{11} w(t)+D_{12} u(t)\\ y(t)&=C_2 x(t)+D_{21} w(t)+D_{22} u(t)\\ \dot x_K(t)=A_K x_K(t)+B_K y(t)\\ u(t)&=C_Kx_K(t)+D_Ky(t)\end{align}$$

where $$A_K,$$ ,$$B_K,$$,$$C_K,$$ and $$D_K,$$ form the K matrix as defined in below. This, therefore, means that the Regulator system can be re-written as:

\begin{bmatrix} \dot x(t)\\

z_1(t)\\z_2(t)\\

y(t) \end{bmatrix} = \begin{bmatrix} \begin{array}{c|c c|c} A&{B}&0&{B}\\ C&D&0&D\\ 0&0&0&I\\ C&D&I&D \end{array} \end{bmatrix} \begin{bmatrix} \dot x(t)\\ w_1(t)\\w_2(t)\\ u(t) \end{bmatrix} $$ With the above 9-matrix representation in mind, the we can now derive the controller needed for solving the problem, which in turn will be accomplished through the use of LMI's. Firstly, we will be taking our $$H_2$$/$$H_\infty$$state-feedback control and make some modifications to it. More specifically, since the focus is modeling for worst-case scenario of a given parameter, we will be modifying the LMI's such that the mixed $$H_2$$/$$H_\infty$$ controller is polytopic.

The LMI:
$$H_2$$/$$H_\infty$$ Polytopic Controller for Quadrotor with Robotic Arm.

Recall that from the 9-matrix framework, $$w_1(t)$$ and $$ {w_2}(t)$$ represent our process and sensor noises respectively and $$u(t)$$ represents our input channel. Suppose we were interested in modeling noise across all three of these channels. Then the best way to model uncertainty across all three cases would be modifying the $$D$$ matrix to $$D_i$$, where ($$i=1,..,k$$ parameters, $$D_i=nI$$, and $$n$$ is a constant noise value). This, in turn results in our $$D_{11}$$-$$D_{22}$$ matrices to be modifified to $$D_{11,i}$$-$$D_{22,i}$$

Using the LMI's given for optimal $$H_2$$/$$H_\infty$$-optimal state-feedback controller from Peet Lecture 11 as reference, our resulting polytopic LMI becomes:

$$ \min\limits_{\gamma_1,\gamma_2,X_1,Y_1,Z,A_n,B_n,C_n,D_n}$$$$ \gamma^2_1$$+$$\gamma^2_2$$

\begin{align} \begin{bmatrix} AA_i&AB^T_i&AC^T_i\\ AB_i&BB_i&BC^T_i\\ AC_i&BC_i&-I \end{bmatrix}&<0\\ \begin{bmatrix} AA_i&AB^T_i&AC^T_i&AD^T_i\\ AB_i&BB_i&BC^T_i&BD^T_i\\ AC_i&BC_i&-I&CD^T_i\\ AD_i&BD_i&CD_i&{-\gamma^2_{2}}I \end{bmatrix}&<0 \\ \begin{bmatrix} Y_1&I&AD^T_i\\ I&X_1&BD^T_i\\ AD_i&BD_i&Z \end{bmatrix}&>0 \\ \end{align}$$ CD=0

$$trace(Z)<\gamma^2_1$$

where i=1,..,k,$$||S(K,P)||_{H_2}$$&$$<\gamma_1$$ and $$||S(K,P)||_{H_\infty}<\gamma_2$$ and:

$$ \begin{align} AA_i=A Y_1+ Y_1 A^T + B_2 C_n+ C^T_n B^T_2\\ AB_i=A^T+A_n+[B_2 D_n C_2]^T\\ AC_i=[B_1+B_2 D_n D_{21,i}]^T\\ AD_i=C_1 Y_1+D_{12,i}C_n\\ BB_i=X_1 A+A^T X_1+B_n C_2+C^T_2 B^T_n\\ BC_i=[X_1 B_1+B_n D_{21,i}]^T\\ BD_i=C_1+D_{12,i} D_n C_2\\ CD_i=D_{11,i}+D_{12,i} D_n D_{21,i} \end{align} $$

After solving for both the optimal $$H_2$$ and $$H_\infty$$ gain ratios as well as $${X_1},{Y_1},Z,{A_n},{B_n},{C_n},{D_n}$$, we can then construct our worst-case scenario controller by setting our $$D$$ matrix (and consequently our $${D_{11}},{D_{12}},{D_{21}},{D_{22}}$$ matrices) to the highest $$n$$value. This results in the controller:
 * $$\begin{align}

K=\begin{bmatrix}\begin{array}{c|c}{A_K}&{B_K}\\ \hline {C_K}&{D_K}\\\end{array}\end{bmatrix}\end{align} $$ which is constructed by setting:

\begin{align} &{D_K}=(I+D_{K_2}D_{22})^{-1}{D_{K_2}}\\ &{B_K}={B_{K_2}}(I+D_{22}D_{K})\\ &{C_K}=(I-D_{K}D_{22}){C_{K_2}}\\ &{A_K}={A_{K_2}}-{B_K}(I-D_{22}D_{K})^{-1}D_{22}{C_K} \end{align} $$

where:

\begin{align} &{X_2}{Y^T_2}=I-{X_1}{Y_1}\\ &\begin{bmatrix}\begin{array}{c|c}{A_{K_2}}&{B_{K_2}}\\ \hline {C_{K_2}}&{D_{K_2}}\end{array}\end{bmatrix}= \begin{bmatrix}{X_2}&{X_1}{B_2}\\0&I\end{bmatrix}^{-1} \begin{bmatrix}{A_n}-{X_1}A{Y_1}&{B_n}\\{C_n}&{D_n}\end{bmatrix} \begin{bmatrix}Y^T_2&0\\{C_2}{Y_1}&I\end{bmatrix} \end{align} $$

Conclusion:
The LMI is feasible and the resulting controller is found to be stable under normal noise disturbances for all states.


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/An LMI for the Kalman Filter

This is a An LMI for the Kalman Filter. The Kalman Filter is one of the most widely used state-estimation techniques. It has applications in multiple aspects of navigation (inertial, terrain-aided, stellar.)

The System
Continuous Time:

\begin{align} \dot x(t)&=Ax(t)+Bu(t)+w(t),\\ y(t)&=Cx(t)+v(t)\\ \end{align}$$

The process and sensor noises are given by $$ w(t) $$ and $$ v(t) $$ respectively.

Discrete Time:

\begin{align} x_{k+1} &= Ax_k+w_k\\ y_k &= Cx_k +v_k \end{align}$$

The process and sensor noises are given by $$ w_k $$ and $$ v_k $$ respectively.

The Data
The data required for the Kalman Filter include a model of the system that the states are trying to be output and a measurement that is the output of the system dynamics being estimated.

The Filter
The Filter and Estimator equations can be written as:

Continuous Time

\begin{align} \dot \hat{x}(t) &= A\hat{x}(t)+Bu(t)+L(y(t)-\hat{y}(t))\\ \end{align}$$

Discrete Time

\begin{align} \hat{x}_{k+1} &= A\hat{x}_k + L(C\hat{x}_k-y_k)\\ \end{align}$$

The Error
The error dynamics evolve according to the following expression

Continuous Time

\begin{align} \dot e(t)&=(A+LC)e(t)+w(t)+Lv(t)\\ \end{align}$$

Discrete Time

\begin{align} e_{k+1}&=(A+LC)e_k + w_k + Lv_k\\ \end{align}$$

The Optimization Problem
The Kalman Filtering (or LQE) problem is a Dual to the LQR problem. Replace the matrices $$ (A,B,Q,R,K) $$ from LQR with $$ (A^T,C^T,V_1,V_2,L^T). $$

The Kalman Filter chooses $$ L $$ to minimize the cost $$ J = E[e^Te]. $$ This cost can be thought of as the covariance of the state error between the actual and estimated state. When the state error covariance is low the filter has converged and the estimate is good.

The Luenberger or Kalman gain can be computed from $$ L = \Sigma C^TV_2^{-1} $$

The process and measurement noise covariances for the Kalman filter are given by

\begin{align} V_1 &= E[w(t)w(t)^T] \text{ aka: } Q\\ V_2 &= E[v(t)v(t)^T] \text{ aka: } R\\ \end{align}$$

The matrix $$ \Sigma $$ satisfies the following equality

$$ A\Sigma + \Sigma A^T + V_1 = \Sigma C^TV_2^{-1}C\Sigma $$

We also cover the discrete Kalman Filter formulation which is more useful for real-life computer implementations.

The discrete Kalman filter chooses the gain $$ L = A\Sigma C^T(C\Sigma C^T+V)^{-1} $$ where the PSDs of the process and sensor noises are given by

\begin{align} W &= E[w_kw_k^T] \text{ aka: } Q\\ V &= E[v_kv_k^T] \text{ aka: } R\\ \end{align}$$

The steady-state covariance of the error in the estimated state is given by $$\Sigma$$ and satisfies the following Riccati equation.

\begin{align} \Sigma = A\Sigma A^T+W-A\Sigma C^T (C\Sigma C^T+V)^{-1}C\Sigma A^T \end{align}$$

 * Objective: State Estimate Error Covariance
 * Variables: Observer Gains
 * Constraints: Dynamics of System to be Estimated

The LMI: H2-Optimal Control Full-State Feedback to LQR to Kalman Filter
The Kalman Filter is a dual to the LQR problem which has been shown to be equivalent to a special case of H2-static state feedback.

Start with the H2-Optimal Control Full-State Feedback.

The following are equivalent

\begin{align} 1. ||S(K,P)||_{H2} &< \gamma\\ \end{align}$$

\begin{align} 2. K &= ZX^{-1} \text{ for some } Z \text{ and } X > 0 \text{ where} \\ \end{align}$$

\begin{align} [A \ B_2] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A^T\\ B_2^T\\ \end{bmatrix} + B_1B_1^T < 0 \\

\begin{bmatrix} X & (C_1X+D_{12}Z)^T\\ C_1X+D_{12}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

To solve the LQR problem using H2 optimal state-feedback control the following variable substitutions are required.

\begin{align} C_1 = \begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}, D_{12} = \begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}, D_{11} = 0, \\ B_2 = B, B_1 = I \end{align}$$

Then

\begin{align} S(P,K) = \begin{bmatrix} A+B_2K & B_1\\ C_1+D_{12}K & D_{11}\\ \end{bmatrix} = \begin{bmatrix} A+BK& I\\ Q^{1/2}& 0 \\K & 0\\ \end{bmatrix} \end{align}$$

This results in the following LMI.

\begin{align} [A \ B] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A^T\\ B^T\\ \end{bmatrix} + I < 0 \\

\begin{bmatrix} X & (\begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}X+\begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}Z)^T\\ \begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}+\begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

To solve the Kalman Filtering problem using the LQR LMI replace $$A,B,Q,R,K$$ with $$A^T,C^T,V_1,V_2,$$ and $$L^T.$$ This results in the following LMI.

\begin{align} [A^T \ C^T] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A\\ C\\ \end{bmatrix} + I < 0 \\

\begin{bmatrix} X & (\begin{bmatrix} V_1^{1/2}\\ 0\\ \end{bmatrix}X+\begin{bmatrix} V_2^{1/2}\\ 0\\ \end{bmatrix}Z)^T\\ \begin{bmatrix} V_1^{1/2}\\ 0\\ \end{bmatrix}+\begin{bmatrix} V_2^{1/2}\\ 0\\ \end{bmatrix}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

The discrete-time Kalman Filtering LMI is saved for another page as it requires derivation of the Discrete-Time LQR LMI problem which was not covered in class.

Conclusion:
The LMI for the Kalman Filter allows us to calculate the optimal gain for state estimation. It is shown that it can be found as a special case of the H2-optimal state feedback with the appropriate substitution of matrices. The LMI gives us a different way of computing the optimal Kalman gain.

Implementation
A link to CodeOcean or other online implementation of the LMI

Related LMIs
Links to other closely-related LMIs

 * H2OptimalObserver


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/Hinf Optimal Model Reduction

Given a full order model and an initial estimate of a reduced order model it is possible to obtain a reduced order model optimal in $$

H_{\infty} $$ sense. This methods uses LMI techniques iteratively to obtain the result.

The System
Given a state-space representation of a system $$

G(s) $$ and an initial estimate of reduced order model $$

\hat{G}(s) $$.

\begin{align} \ G(s) &= C(sI-A)B + D,\\ \ \hat{G}(s) &= \hat{C}(sI-\hat{A})\hat{B} + \hat{D},\\ \end{align}$$

Where $$ A \in \mathbb{R}^{n\times n}, B \in \mathbb{R}^{n\times m}, C \in \mathbb{R}^{p\times n}, D \in \mathbb{R}^{p\times m}, \hat{A} \in \mathbb{R}^{k\times k}, \hat{B} \in \mathbb{R}^{k\times m}, \hat{C} \in \mathbb{R}^{p\times k}$$ and $$\hat{D} \in \mathbb{R}^{p\times m}$$. Where $$ n,k,m,p $$ are full order, reduced order, number of inputs and number of outputs respectively.

The Data
The full order state matrices $$ A,B,C,D $$ and the reduced model order $$ k $$.

The Optimization Problem
The objective of the optimization is to reduce the $$ H_{\infty} $$ norm distance of the two systems. Minimizing $$ \|G - \hat{G}\|_{\infty}$$ with respect to $$ \hat{G} $$.

The LMI: The Lyapunov Inequality
Objective: $$ \min \gamma $$.

Subject to:: $$

\begin{align} \ P &= \begin{bmatrix} \ P11 & P12 \\ \ P21 & P22 \\ \end{bmatrix} \ > 0, \end{align} $$

$$ \begin{align} \begin{bmatrix} \ A^{T}P11 + P11A & A^{T}P12 + P12\hat{A} & P11B - P12\hat{B} & C^T \\ \ \hat{A}^{T}P12^T + P12^{T}A & \hat{A}^{T}P22 + P22\hat{A} & P12^{T}B - P22\hat{B} & \hat{C}^T \\ \ B^{T}P11 - \hat{B}^{T}P12^{T} & B^{T}P12 - \hat{B}^{T}P22 & -\gamma{I} & D^{T} -\hat{D}^{T} \\ \ C & \hat{C} & D -\hat{D} & -\gamma{I} \\ \end{bmatrix} \ > 0 \end{align}$$

It can be seen from the above LMI that the second matrix inequality is not linear in $$ \hat{A}, \hat{B}, \hat{C}, \hat{D}, P $$. But making $$ \hat{A}, \hat{B}$$ constant it is linear in $$ \hat{C}, \hat{D}, P $$. And if $$ P12, P22 $$ are constant it is linear in $$ \hat{A}, \hat{B}, \hat{C}, \hat{D}, P11 $$. Hence the following iterative algorithm can be used.

(a) Start with initial estimate $$ \hat{G} $$ obtained from techniques like Hankel-norm reduction/Balanced truncation.

(b) Fix $$ \hat{A}, \hat{B}$$ and optimize with respect to $$ \hat{C}, \hat{D}, P $$.

(c) Fix $$ P12, P22 $$ and optimize with respect to $$ \hat{A}, \hat{B}, \hat{C}, \hat{D}, P11 $$.

(d) Repeat steps (b) and (c) until the solution converges.

Conclusion:
The LMI techniques results in model reduction close to the theoretical limits set by the largest removed hankel singular value. The improvements are often not significant to that of Hankel-norm reduction. Due to high computational load it is recommended to only use this algorithm if optimal performance becomes a necessity.


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/An LMI for Multi-Robot Systems

LMIs in Control/Applications/An LMI for Multi-Robot Systems/Consensus for Multi-Agent Systems

This application gives an instance of the use of LMIs in achieving consensus for multi-agent systems. More focus is placed on the flocking algorithm, which is one of the consensus algorithms extensively used in multi-robot systems.

Introduction
A robot swarm is a network of multiple robots working together as a unit to achieve an objective. In order for robots in a swarm to work together, they need to come to consensus/agreement on a number of parameters. A number of algorithms called consensus algorithms exist to serve that purpose. Consensus Algorithms are algorithms that allow a set of agents to reach an agreement. Various areas such as graph theory, control theory and matrix theory overlap when it comes to designing consensus algorithms for multi-agent systems.

Flocking Algorithm
The flocking algorithm is one of the consensus algorithms used in trajectory planning for multi-agent networks. The algorithm helps in maintaining separation, so that the agents do not collide, alignment, so that the agents have the same headings, and cohesion, so that the agents do not wonder far away from each other. The flocking algorithm can be represented in a graph network form, where the nodes in the graph represent the agents or individual robots, and the edges/links represent the nature of interaction between the nodes. Consequently. the interactions between the nodes can be Below is the general equation for a flocking algorithm.

$$\dot {v_i}-\sum_{ i=N_i}^n i = (v_i - v_j) + \sum_{ i=N_i}^n i \Delta_{r_i} V_{ij} (r_{ij})$$, where

$$V_{ij}$$ is the artificial potential function

$$n $$ is the number of robots

$$\dot {v_i}$$ is the input/acceleration control

$$r_{i}$$ is the position vector of robot $$i$$

$$r_{ij} = r_i - r_j$$, which is the distance between two neighboring robots

Mathematical Model:
Before we begin, we need to obtain a state space representation for our system. Based on observation, it can be deduced that the general form of a consensus algorithm bears some resemblance to the state space equation. The general equation for a consensus algorithm in terms of the Laplacian matrix is:

$$\dot{x} = -Lx$$, where $$L$$ represents the Laplacian matrix.

Comparing the above equation to the state space equation, $$\dot{x} = Ax$$, we notice that the $$A$$ has been substituted with a $$-L$$.

The A, B and C matrices are represented as diagonal blocks because of the decentralized nature of the control framework. Each block in the A, B and C matrices is associated with its corresponding state, input, or output vector.

$$

\begin{align} \ A &= \begin{bmatrix} \ a_{11} & a_{1n} \\ \ a_{n1} & a_{nn} \\ \end{bmatrix}&

\ B = \begin{bmatrix} \ b_{11} & b_{1n} \\ \ b_{n1} & b_{nn} \\ \end{bmatrix}&

\ &C = \begin{bmatrix} \ c_{11} & c_{1n} \\ \ c_{n1} & c_{nn} \\ \end{bmatrix} \end{align} $$

x, u and y represent the state, input and output vectors respectively.

$$

\begin{align} \ x &= \begin{bmatrix} \ x_1 & ... &x_n \\ \end{bmatrix}^T &

\ y &= \begin{bmatrix} \ y_1 & ... &y_n \\ \end{bmatrix}^T &

\ u &= \begin{bmatrix} \ u_1 & ... &u_n \\ \end{bmatrix}^T & \end{align} $$

Further Discussion:
In Elham Semsar-Kazerooni and Khashayar's paper, "Optimal Consensus Seeking in a Network of Multi-Agent Systems", further work was done through a series of variable substitutions and other mathematical operations to obtain the an LMI as seen below. For more information on the LMI formulation procedure, and the details of the variables in the above LMI, please visit follow the link in the reference section to review the paper.

Objective: $$ \min trace(P) $$.

Subject to::

$$ \begin{align} \ \begin{bmatrix} \ \gamma & \bar{S}^*ZQ^{1/2} & \bar{S}^*W^*R^{1/2} \\ \ Q^{1/2}Z \bar{S} & -I & 0 \\ \ R^{1/2}W \bar{S} & 0 & -I \\ \end{bmatrix} \ < 0, \end{align}

$$


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/Helicopter Inner Loop LMI

This is a Helicopter Inner Loop LMI. Optimization methods and optimal control have had difficulty gaining traction in the rotorcraft control law community. However, this LMI derived in the referenced paper attempts to address the issues with a LMI for Robust, Optimal Control.

The System
Continuous Time:

\begin{align} \dot x(t)&=\hat{A}x(t)+B_1w(t)+\hat{B_2}u(t),\\ z(t)&=C_1x(t)+D_{12}u(t)\\ \end{align}$$

The Helicopter model is given by knowledge of the stability and control derivatives which populate the elements of the $$ \hat{A}, \hat{B_2} $$ matrices in the dynamic equations above.

The state vector is given by the typical elements of a rigid 6-DOF body model. $$ x = \begin{bmatrix} u,w,q,\theta,v,p,\psi,r\end{bmatrix}^T $$. The input vector is given by $$ u = \begin{bmatrix}\delta_0,\delta_{1s},\delta_{1c},\delta_T\end{bmatrix}^T $$ which pertain to the main rotor collective, longitudinal/lateral cyclic and tail rotor collective blade angles in radians.

The gust disturbance is denoted by $$w(t)$$ and is assumed to be random in nature. The stability and control derivative matrices are modeled with uncertainty as follows:

\begin{align} \hat{A} = A + \Delta A, \hat{B_2} = B_2 + \Delta B\\ \end{align}$$

The $$\Delta $$ terms represent the uncertainties in the helicopter system model.

The Data
The Data required for this LMI are the stability and control derivatives that populate the A and B-matrices of the system above which can be obtained from linearizing non-linear models. It can also be obtained from experimental methods such as step responses and swept sines (System Identification.)

The Control Architecture
A control architecture for the inner loop of the helicopter model mentioned above is designed using a state feedback control law.

$$u = Kx(t) $$

The objective for the inner loop control is to design a full state feedback law such that the closed-loop helicopter system satisfies the following 3 performance specifications.

The Optimization Problem
Objective 1: The closed-loop system is internally stable for any admissible uncertainty.

Objective 2: Poles of the close-loop system lie within the disk $$ D(-q,r)$$ with center $$-q+j_0$$ and radius $$r, q>r>0$$, for any admissible uncertainty.

Objective 3: Given gust disturbance suppression index $$\gamma$$, for any admissible uncertainty, the effect of the gust disturbance to selected flight states and control input is in the given level, i.e.

$$\int_0^{\infty} \! \{x^T(t)Qx(t)+u^T(t)Ru(t)\} \ \mathrm{d}x < \gamma^2\int_0^{\infty} \! w(t)^Tw(t) \, \mathrm{d}t.$$

where $$w(t)\in L_2(0,\infty).$$ $$Q$$ and $$R$$ are weighting matrices with appropriate dimensions and $$Q=Q^T \geq 0, R = R^T>0.$$

It can be shown that the inner loop performance specifications listed in Objectives 1-3 can be met with a state feedback control law if the LMI described in the following section is true.

 * Objective: Objectives listed above
 * Variables: Controller Gains
 * Constraints: Rotorcraft Dynamics and Modeled Actuator Limits

The LMI: H-Inf Inner Loop D-Stabilization Optimization
The paper derives and LMI of the form below and asserts that the if there exists a constant $$\epsilon$$, matrix $$Z$$ with appropriate dimensions and a symmetric positive matrix $$P$$, such that

\begin{align} \\

\begin{bmatrix} \Psi_{11} & B_1 & XC_1^T+Z^TD_12^T & A_{\alpha}X_+B_2Z & XF_1^T+Z^TF_2^T & \epsilon H \\ B_1^T & -\gamma ^2 I & 0 & 0 & 0 & 0 \\ C_1X+D_{12}Z & 0 & -I & 0 & 0 & 0 \\ XA_{\alpha}^T + Z^TB_2^T & 0 & 0 & -rX & XF_1^T+Z^TF_2^T & 0 \\ F_1X+F_2Z & 0 & 0 & F_1X+F_2Z & -\epsilon I & 0 \\ \epsilon H^T & 0 & 0 & 0 & 0 & -\epsilon I \end{bmatrix} < 0 \\

\end{align}$$ where, $$\Psi_{11} = A_{\alpha}X+XA_{\alpha}^T+B_2Z+Z^TB_2^T,A_{\alpha}=A+\alpha I $$

This LMI is shown to satisfy Objectives 1, 2,3, and the control law is given by

\begin{align} u(t) = Kx(t)\\ K = ZX^{-1} \end{align} $$

Conclusion:
The LMI for Helicopter Inner Loop Control design provides an optimization-based approach towards achieving Level 1 Handling Qualities per ADS-33E. This is an interesting way to approach a very difficult problem that has usually been approached through classical control methods and with extensive piloted simulation and flight test.

Implementation
A link to CodeOcean or other online implementation of the LMI

Related LMIs
Links to other closely-related LMIs

 * Optimal_Output_Feedback_Hinf_LMI


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/Hinf LMI Satellite Attitude Control

This is a $$H_{\infty}$$ LMI for Satellite Attitude Control. Satellite attitude control is necessary to allow satellites in orbit accomplish their mission. Poor satellite attitude control results in poor pointing performance which can result in increased cost, delayed service, and reduced lifetime of the satellite.

The System
The full derivation of the system from first principles is accomplished in the companion LMI for $$H_2$$ Satellite Attitude Control. The link to that page is at the bottom with the references.

Continuous Time:

\begin{align} I_x\ddot{\phi}+4(I_y-I_z)\omega _0^2 \phi + (I_y - I_z - I_z)\omega _0 \dot{\psi} &= T_{cx} + T_{dx}\\ I_y\ddot{\theta}+3(I_x-I_z)\omega _0^2 \theta &= T_{cy} + T_{dy}\\ I_z\ddot{\psi}+(I_x+I_z-I_y)\omega _0 \dot{\psi} &= T_{cz} + T_{dz}\\ \end{align}$$

The above model was derived by substituting satellite attitude kinematics into the attitude dynamics of a satellite. The following are definitions of the variables above:

 * Moments of inertia about the corresponding axis: $$I_x, I_y, I_z $$
 * Euler Angles: $$\phi,\theta,\psi $$
 * Disturbance Torques (flywheel, gravitational, and disturbance): $$T_c, T_g, T_d $$
 * Rotational-angular velocity of the Earth: $$ \omega _0 = 7.292115x10^{-5} \text{ [rad/s]} $$

The state-space representation of the system can be found by the following steps. Let

\begin{align} x &= \begin{bmatrix} q & \dot{q} \end{bmatrix}^T,& z_{\infty} = 10^{-3}M\ddot{q},& z_2 = q,\\ \end{align}$$

Introduce the notations

\begin{align} I_{\alpha \beta}&=I_{\alpha}-I_{\beta}, & I_{\alpha \beta \gamma} = I_{\alpha} - I_{\beta} - I_{\gamma}\\ \end{align}$$

where $$ \alpha, \beta, \gamma $$ stand for any element in $${x,y,z}$$. Then the state-space system is:

\begin{align} \dot{x} &= Ax + B_1u+B_2d \\ z_{\infty} &= C_1x+D_1u+D_2d \\ z_2 &= C_2x \\ \end{align}$$

where the matrices in the above state-space representation are defined as follows:

\begin{align} A = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\               0 & 0 & 0 & 0 & 0 & 1 \\                \frac{-4\omega_0^2 I_{yz}}{I_x}  & 0 & 0 & 0 & 0 & \frac{-\omega_0 I_{yzx}}{I_x} \\ 0 & \frac{-3\omega_0^2 I_{xz}}{I_y} & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{-\omega_0^2 I_{yx}}{I_z} & \frac{\omega_0 I_{yzx}}{I_x} & 0 & 0 \end{bmatrix}\\ \\ B_1 = B_2 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\                           0 & 0 & 0 \\                            \frac{1}{I_x} & 0 & 0 \\ 0 & \frac{1}{I_y} & 0 \\ 0 & 0 & \frac{1}{I_z} \\ \end{bmatrix}\\ \\ C_1 = 10^{-3} \times \begin{bmatrix} -4\omega_0^2I_{yz} & 0 & 0 & 0 & -\omega_0 I_{yxz}\\ 0 & -3\omega_0^2 I_{xz} & 0 & 0 & 0 & 0\\ 0 & 0 & -\omega_0^2 I_{yx} & \omega_0 I_{yxz} & 0 & 0 \end{bmatrix}\\ \\ C_2 = \begin{bmatrix} I_{3x3} & 0_{3x3} \end{bmatrix} \\ \\ D_1 = 10^{-3} \times L_1, D_2 = 10^{-3} \times L_2 \end{align}$$

The Data
Data required for this LMI include moments of inertia of the satellite being controlled and the angular velocity of the earth. Any knowledge of the disturbance torques would also facilitate solution of the problem.

The Optimization Problem
The idea is to design a state feedback control law for the previous satellite state-space system of the form

u = Kx $$

This control law is designed so that the closed-loop system is stable and the transfer function matrix from disturbance to output

G_{z_\infty d}(s) = (C_1+D_1K)(sI-(A+B_1K))^{-1}B_2+D_2 $$

satisfies

$$
 * G_{z_\infty d}(s)||_{\infty} = (C_1+D_1K)(sI-(A+B_1K))^{-1}B_2+D_2

for a minimal positive scalar $$\gamma_{\infty}$$ which represents the minimum attenuation level.

The idea here is to attenuate the disturbances as much as possible while still maintaining the ability of the satellite to track. This minimum attenuation level is found from the LMI in the following section.

 * Objective: Hinf norm
 * Variables: Controller Gains
 * Constraints: Satellite Attitude Dynamics and Kinematics. Maximum safe rotational rate of Satellite, maximum jet pulse thrust

The LMI: $$H_{\infty}$$ Feedback Control of the Satellite System
Duan and Yu approach the $$H_{\infty}$$ satellite system as follows. The minimum attenuation level from disturbance to output can be found by solving the following LMI optimization problem.

\begin{align} \\ &min \gamma_{\infty} \\ \\ &\text{s.t. } X > 0 \\ \\ &\begin{bmatrix} (AX+B_1W)^T+AX+B_1W & B_2 & (C_1X+D_1W)^T \\ B_2^T & -\gamma_{H\infty} I & D_2^T \\ C_1X+D_1W & D_2 & -\gamma_{H\infty} I \end{bmatrix} < 0 \\

\end{align}$$

which is the same as Theorem 8.1 in Duan and Yu's Book, the solution to the $$ H_{\infty} $$ problem.

Conclusion:
The Duan and Yu textbook takes as typical values of the satellite moment of inertias as:

\begin{align}

I_x = 1030.17 kg\cdot m^2, I_y = 3015.65kg\cdot m^2, I_Z = 3030.43kg\cdot m^2\\

\end{align}$$

They then proceed to solve the optimization problem to find a controller gain that yields an attenuation level of 0.0010. Though this value is very small and represents very good attenuation the optimized controller pushes the poles of the closed loop system very close to the imaginary axis, resulting in slow oscillatory behavior with a very long settling time.

To address this a second approach was used by the authors which involves modifying the final LMI in the expression above and requiring that it be constrained as follows

\begin{align} &-I < \begin{bmatrix} (AX+B_1W)^T+AX+B_1W & B_2 & (C_1X+D_1W)^T \\ B_2^T & -\gamma_{H\infty} I & D_2^T \\ C_1X+D_1W & D_2 & -\gamma_{H\infty} I \end{bmatrix} < 0 \\ \end{align}$$

These results are planned verified in the linked code implementation using YALMIP, whereas the authors took advantage of the MATLAB LMI Toolbox to achieve their results.

Implementation
A link to CodeOcean or other online implementation of the LMI

Related LMIs
Links to other closely-related LMIs

 * H2_LMI_SatelliteAttitudeControl
 * Optimal_Output_Feedback_Hinf_LMI
 * Full-State_Feedback_Optimal_Control_Hinf_LMI


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/H2 LMI Satellite Attitude Control

This is a H2 LMI for Satellite Attitude Control

Satellite attitude control is important for military, civil, and scientific activities. Attitude control of a satellite involves fast maneuvering and accurate pointing in the presence of all kinds of disturbances and parameter uncertainties.

The System
The satellite state-space formulation is given in the $$H_{\infty}$$ LMI page for Satellite Attitude Control which is also in the applications section of this WikiBook. This section discusses the derivation of that state-space formulation based on first principles.

The attitude dynamics of a satellite in an inertial coordinate system can be described in terms of the time rate of change of its angular momentum and the sum of the external torques and moments acting on the system. That is:

\begin{align} \dot H&=T_c+T_g+T_d,\\ H&=I_b\omega\\ \end{align}$$

where the following variables are defined as follows:

 * $$T_c,T_g, \text{ and } T_d $$ are the flywheel torque, the gravitational torque, and the disturbance torque.
 * $$H$$ is the total momentum/torque acting on the satellite
 * $$I_b$$ is the inertia matrix/tensor for the satellite
 * $$\omega$$ is the angular velocity vector of the satellite.

The time derivative of the total angular momentum in an arbitrary rotating reference frame (such as the body frame of the satellite) is given by:

\begin{align} \dot H&=I_b\dot{\omega}+\omega \times (I_b \omega),\\ \end{align}$$

which takes into the account of the angular velocity of the rotating reference frame relative to the inertial reference frame where Newton's laws are valid.

Combining equations, collecting terms and choosing the principle axes of the spacecraft so that the Inertia Tensor is diagonalized yields the following equations of motion:

\begin{align} I_b \dot{\omega} + \omega \times (I_b \omega) = T_c + T_g + T_d,\\ \end{align}$$

Using the small angle approximation, the angular velocity of the satellite in the inertial coordinate system represented in the body coordinate system can be written as

\begin{align} \omega = \begin{bmatrix} \omega _x \\ \omega _y \\ \omega_z \end{bmatrix} = \begin{bmatrix} \dot{\phi} - \omega _0 \psi \\ \dot{\theta} - \omega _0 \\ \dot{\psi} + \omega _0 \psi \end{bmatrix} \\ \text{where } \omega _0 = 7.292115 \times 10^{-5} \text{ [rad/s]} \\ \end{align}$$

These equations form the basis of the state-space representation used in the H-inf LMI for satellite attitude control. For clarity, they are repeated below.

\begin{align} \dot{x} &= Ax + B_1u+B_2d \\ z_{\infty} &= C_1x+D_1u+D_2d \\ z_2 &= C_2x \\ \\ \end{align}$$

\begin{align} A = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\               0 & 0 & 0 & 0 & 0 & 1 \\                \frac{-4\omega_0^2 I_{yz}}{I_x}  & 0 & 0 & 0 & 0 & \frac{-\omega_0 I_{yzx}}{I_x} \\ 0 & \frac{-3\omega_0^2 I_{xz}}{I_y} & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{-\omega_0^2 I_{yx}}{I_z} & \frac{\omega_0 I_{yzx}}{I_x} & 0 & 0 \end{bmatrix}\\ \\ B_1 = B_2 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\                           0 & 0 & 0 \\                            \frac{1}{I_x} & 0 & 0 \\ 0 & \frac{1}{I_y} & 0 \\ 0 & 0 & \frac{1}{I_z} \\ \end{bmatrix}\\ \\ C_1 = 10^{-3} \times \begin{bmatrix} -4\omega_0^2I_{yz} & 0 & 0 & 0 & -\omega_0 I_{yxz}\\ 0 & -3\omega_0^2 I_{xz} & 0 & 0 & 0 & 0\\ 0 & 0 & -\omega_0^2 I_{yx} & \omega_0 I_{yxz} & 0 & 0 \end{bmatrix}\\ \\ C_2 = \begin{bmatrix} I_{3x3} & 0_{3x3} \end{bmatrix} \\ \\ D_1 = 10^{-3} \times L_1, D_2 = 10^{-3} \times L_2 \end{align}$$

The Data
Data required for this LMI include moments of inertia of the satellite being controlled and the angular velocity of the earth. Any knowledge of the disturbance torques would also facilitate solution of the problem.

The Optimization Problem
The optimization problem seeks to minimize the H2 norm of the transfer function from disturbance to output. Thus, we expect slightly different results than the H-inf case. Deriving the H2 control problem and setup also serves for useful setup for the mixed H-inf/H2 optimization that the book follows up with later.

 * Objective: H2 norm
 * Variables: Controller Gains
 * Constraints: Satellite Attitude Dynamics and Kinematics. Maximum safe rotational rate of Satellite, maximum jet pulse thrust

The LMI: H-2 Satellite Attitude Control
Duan and Yu use the following H-2 Satellite Attitude Control LMI to minimize the attenuation level from disturbance to output. Note that in the H2-case we are minimizing the integral of the magnitude of the bode plot transfer function whereas in the H-inf case the optimization is minimizing the maximum value of the bode plot magnitude.

To design an optimizing controller of the form

\begin{align} u=Kx\\ \end{align}$$

such that the closed-loop system is stable and the transfer function matrix

\begin{align} G_{z2w}(s) = C_2(sI-(A+B_1K))^{-1}B_2\\ \end{align}$$

satisfies

\begin{align} \|G_{z2w}(s)\|_2 < \gamma _2\\ \end{align}$$

for a minimal positive scalar $$\gamma_2$$.

This scalar is found from the solution of the following LMI

\begin{align} \\ \min &\ \ \rho \\ \\ \text{s.t. } &AX+B_1W+(AX+B_1W)^T+B_2B_2^T < 0 \\ \\ &\begin{bmatrix} -Z & C_2X \\ (C_2X)^T & -X \end{bmatrix} < 0 \\ \\ &\operatorname{trace}(Z)<\rho \\

\text{where } \rho = \gamma_2^2.

\end{align}$$

and the controller is given by $$K = WX^{-1}$$

Conclusion:
The LMI for H-2 Satellite Attitude Control comes up with a different attenuation value for the disturbance vs the H-inf problem which is expected. It also serves for good preparation for the mixed H2/H-inf problem that Duan and Yu cover in a later section. Though no implementation is included for the mixed H2/H-inf optimization problem it is interesting to compare the results of all three cases for the satellite attitude control problem.

Implementation
A link to CodeOcean or other online implementation of the LMI

Related LMIs
Links to other closely-related LMIs

 * Hinf_LMI_SatelliteAttitudeControl
 * H2OptimalOutputFeedback
 * Full-State_Feedback_Optimal_Control_H2


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/Mixed H2-H∞ LMI Satellite Attitude Control

Satellite attitude control helps control the orientation of a satellite with respect to an inertial frame of reference mostly planets. In this section an LMI for Mixed $$H_2$$-$$H_{\infty}$$ Satellite Attitude Control is given.

The System
The system described below for Mixed H$$_2-$$$$H_\infty$$ Satellite Attitude Control is the same as the one used for separate $$H_2$$ and $$H_\infty$$ Satellite Attitude controls.

$$ \begin{align} &\quad \quad \begin{cases} I_x\ddot{\phi}+4(I_y-I_z)\omega _0^2 \phi + (I_y - I_z - I_z)\omega _0 \dot{\psi} = T_{cx} + T_{dx}\\ I_y\ddot{\theta}+3(I_x-I_z)\omega _0^2 \theta = T_{cy} + T_{dy}\\ I_z\ddot{\psi}+(I_x+I_z-I_y)\omega _0 \dot{\psi} = T_{cz} + T_{dz}\\ \end{cases} \end{align}$$

$$where$$

 * $$T_c$$ and $$T_d$$ are the flywheel torque and the disturbance torque respectively.
 * $$I_x$$, $$I_y$$, and $$I_z$$ are the diagonalized inertias from the inertia matrix $$I_b$$.
 * $$\omega_0= 7.292115 \times 10^{-5}rad/s$$ is the rotational angular velocity of the Earth, and $$\theta$$, $$\phi$$, and $$\psi$$ are the three Euler angles.

The state space representation of The Mixed $$H_2-H_\infty$$ Satellite Attitude Control system is given below, which is the same as the one described on the $$H_2$$ and $$H_\infty$$ Satellite Attitude Control pages.

$$ \begin{align} &\quad \quad \begin{cases} \dot x =Ax+B_1u+B_2 d \\ z_\infty=C_1x+D_1u+D_2d \\ z_2=C_2x \end{cases}\end{align} $$

$$where: $$

$$A = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\               0 & 0 & 0 & 0 & 0 & 1 \\                \frac{-4\omega_0^2 I_{yz}}{I_x}  & 0 & 0 & 0 & 0 & \frac{-\omega_0 I_{yzx}}{I_x} \\ 0 & \frac{-3\omega_0^2 I_{xz}}{I_y} & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{-\omega_0^2 I_{yx}}{I_z} & \frac{\omega_0 I_{yzx}}{I_x} & 0 & 0 \end{bmatrix} $$

$$ B_1 = B_2 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\                           0 & 0 & 0 \\                            \frac{1}{I_x} & 0 & 0 \\ 0 & \frac{1}{I_y} & 0 \\ 0 & 0 & \frac{1}{I_z} \\ \end{bmatrix}$$

$$C_1 = 10^{-3} \times \begin{bmatrix} -4\omega_0^2I_{yz} & 0 & 0 & 0 & -\omega_0 I_{yxz}\\ 0 & -3\omega_0^2 I_{xz} & 0 & 0 & 0 & 0\\ 0 & 0 & -\omega_0^2 I_{yx} & \omega_0 I_{yxz} & 0 & 0 \end{bmatrix}$$

$$C_2 = \begin{bmatrix} I_{3x3} & 0_{3x3} \end{bmatrix} $$

$$ D_1 = 10^{-3} \times L_1, D_2 = 10^{-3} \times L_2 $$

$$I_{ab} = I_a - I_b, I_{abc} = I_a - I_b - I_c $$

$$q = \begin{bmatrix} \phi \\ \theta \\ \psi \end{bmatrix},x = \begin{bmatrix} q & \dot q\end{bmatrix}^T, M = diag(I_x , I_y, I_z),$$ $$z_{\infty} = 10^{-3} M \ddot q ,$$ $$z_2 = q$$

These formulations are found in Duan, page 374-375, steps 12.10 to 12.15.

The Data
Data required for this LMI include moments of inertia of the satellite being controlled and the angular velocity of the earth. Any knowledge of the disturbance torques would also facilitate solution of the problem.

The Optimization Problem
There are two requirements of this problem:

 * Closed-loop poles are restricted to a desired LMI region
 * Where $$\mathbb{D} = \{s|s \in \mathbb{C}, L + sM + \bar{s}M^T < 0\}$$, L and M are matrices of correct dimensions and L is symmetric
 * Minimize the effect of disturbance d on output vectors z2 and zinf.

Design a state feedback control law

$$u = Kx$$

such that

 * 1) The closed-loop eigenvalues are located in $$\mathbb{D}$$,
 * 2) * $$ \lambda (A+BK) $$$$\subset \mathbb{D}$$
 * 3) That the H2 and Hinf performance conditions below are satisfied with a small $$\gamma_\infty  $$ and $$\gamma_2 $$:
 * 4) * $$\lVert G_{{z_\infty}d} \rVert_\infty = \lVert (C_1+N_2 K)(sI-(A+B_1K))^{-1}B_2+N_1 \rVert_\infty \leq\gamma_\infty$$
 * 5) * $$\lVert G_{{z_2}d} \rVert_2 = \lVert C_2(sI-(A+B_1 K))^{-1} B_2 \rVert_\infty \leq\gamma_2$$

The LMI: Mixed H2-H∞ Satellite Attitude Control
$$\begin{align} \begin{cases} &\text{min} \quad c_\infin \gamma_\infin + c_2\rho \\ &\text{s.t.} \quad \begin{bmatrix} -Z & C_2X \\ XC_2^T & -X \end{bmatrix} < 0 \\ \\ &\quad \quad trace(Z) < \rho \\ \\ &\quad \quad AX+B_1W + (AX+B_1W)^T + BB^T< 0 \\ \\ &\quad \quad L \otimes X + M\otimes (AX+B_1W) + M^T \otimes (AX+B_1W)^T < 0 \\ \\ &\quad \quad \begin{bmatrix} (AX+B_1W)^T +AX + B_1W & B_1 & (C_1X+D_2W)^T \\ B & -\gamma_\infin I & D_1^T \\ (C_1X+D_2W) & D_1 & -\gamma_\infin I \end{bmatrix} < 0 \\ \\ \end{cases} \\ \end{align}$$

Solving the above LMI gives the value of $$\gamma_\infin$$, $$\rho$$, and $$W, Z$$ and $$X > 0$$, where $$\rho$$ is equal to $$\gamma_2^2$$.

Conclusion
Once the solutions are calculated, the state feedback gain matrix can be constructed as $$K = WX^{-1}$$, and $$\gamma_2$$ = $$\sqrt{\rho}$$

Implementation
This LMI can be translated into MATLAB code that uses YALMIP and an LMI solver of choice such as MOSEK or CPLEX.

Related LMIs

 * H2 LMI for Satellite Attitude Control
 * Hinf LMI for Satellite Attitude Control


text:
User:Margav06/sandbox/Click here to continue/Applications of Linear systems/Mixed H2/Hinf LMI Satellite Attitude Control

The System
Using the same formulation of the problem as in the H2 and Hinf feedback applications (linked below) the system is of the form:

$$ \begin{align} I_x\ddot{\phi}+4(I_y-I_z)\omega _0^2 \phi + (I_y - I_z - I_z)\omega _0 \dot{\psi} &= T_{cx} + T_{dx}\\ I_y\ddot{\theta}+3(I_x-I_z)\omega _0^2 \theta &= T_{cy} + T_{dy}\\ I_z\ddot{\psi}+(I_x+I_z-I_y)\omega _0 \dot{\psi} &= T_{cz} + T_{dz}\\ \end{align}$$

This formulation comes from the process described in Duan, page 371-373, steps 12.1 to 12.8.

 * Tc and Td are the flywheel torque and the disturbance torque respectively.
 * Ix, Iy, and Iz are the diagonalized inertias from the inertia matrix Ib.
 * ω0 = 7.292115 x 10-5 rad/s is the rotational angular velocity of the Earth, and θ, Φ, and ψ are the three Euler angles.

The LMI below utilizes the state space representation of the above system, which is described on the H2 and Hinf pages as well:

$$\begin{cases} \dot x =Ax+B_1u+B_2 d \\ z_\infty=C_1x+D_1u+D_2d \\ z_2=C_2x\end{cases} $$

$$ \begin{align} A = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\               0 & 0 & 0 & 0 & 0 & 1 \\                \frac{-4\omega_0^2 I_{yz}}{I_x}  & 0 & 0 & 0 & 0 & \frac{-\omega_0 I_{yzx}}{I_x} \\ 0 & \frac{-3\omega_0^2 I_{xz}}{I_y} & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{-\omega_0^2 I_{yx}}{I_z} & \frac{\omega_0 I_{yzx}}{I_x} & 0 & 0 \end{bmatrix}\\ \\ B_1 = B_2 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\                           0 & 0 & 0 \\                            \frac{1}{I_x} & 0 & 0 \\ 0 & \frac{1}{I_y} & 0 \\ 0 & 0 & \frac{1}{I_z} \\ \end{bmatrix}\\ \\ C_1 = 10^{-3} \times \begin{bmatrix} -4\omega_0^2I_{yz} & 0 & 0 & 0 & -\omega_0 I_{yxz}\\ 0 & -3\omega_0^2 I_{xz} & 0 & 0 & 0 & 0\\ 0 & 0 & -\omega_0^2 I_{yx} & \omega_0 I_{yxz} & 0 & 0 \end{bmatrix}\\ \\ C_2 = \begin{bmatrix} I_{3x3} & 0_{3x3} \end{bmatrix} \\ \\ D_1 = 10^{-3} \times L_1, D_2 = 10^{-3} \times L_2 \end{align}$$

 * Iab = Ia - Ib, Iabc = Ia - Ib - Ic
 * $$q = \begin{bmatrix} \phi \\ \theta \\ \psi \end{bmatrix}$$, x = [q  q']T,   M = diag(Ix, Iy, Iz),     zinf = 10-3 M q ''' ,       z2 = q

These formulations are found in Duan, page 374-375, steps 12.10 to 12.15.

The Data
Data required for this problem include the moment of inertias and angular velocities of the system. Knowledge of expected disturbances d would be beneficial.

The Optimization Problem
There are two requirements of this problem:

 * Closed-loop poles are restricted to a desired LMI region
 * Where $$\mathbb{D} = \{s|s \in \mathbb{C}, L + sM + \bar{s}M^T < 0\}$$, L and M are matrices of correct dimensions and L is symmetric
 * Minimize the effect of disturbance d on output vectors z2 and zinf.

Design a state feedback control law

u = Kx

such that

 * 1) The closed-loop eigenvalues are located in $$\mathbb{D}$$,
 * 2) * λ(A+BK) $$\subset \mathbb{D}$$
 * 3) That the H2 and Hinf performance conditions below are satisfied with a small $$\gamma_\infty  $$ and $$\gamma_2 $$:
 * 4) * $$\lVert G_{{z_\infty}d} \rVert_\infty = \lVert (C_1+N_2 K)(sI-(A+B_1K))^{-1}B_2+N_1 \rVert_\infty \leq\gamma_\infty$$
 * 5) * $$\lVert G_{{z_2}d} \rVert_2 = \lVert C_2(sI-(A+B_1 K))^{-1} B_2 \rVert_\infty \leq\gamma_2$$

The LMI: Mixed H2/Hinf Feedback Control
min $$c_\infin \gamma_\infin + c_2\rho$$

s.t.

 * $$\begin{bmatrix} -Z & C_2X \\ XC_2^T & -X \end{bmatrix} < 0$$

 * trace(Z) < $$\rho$$

 * AX + B1W + (AX + B1W)T + BBT < 0

 * $$L \otimes X + M\otimes (AX+B_1W) + M^T \otimes (AX+B_1W)^T < 0$$
 * $$\begin{bmatrix} (AX+B_1W)^T +AX + B_1W & B_1 & (C_1X+D_2W)^T \\ B & -\gamma_\infin I & D_1^T \\ (C_1X+D_2W) & D_1 & -\gamma_\infin I \end{bmatrix} < 0$$

Gives a set of solutions to $$ \gamma_\infin, \rho$$, and W, Z and X > 0, where $$\rho$$ is equal to $$\gamma_2^2$$.

Conclusion
Once the solutions are calculated, the state feedback gain matrix can be constructed as K = WX-1, and $$\gamma_2$$ = $$\sqrt{\rho}$$

Implementation
This LMI can be translated into MATLAB code that uses YALMIP and an LMI solver of choice such as MOSEK or CPLEX.

Related LMIs

 * H2 LMI for Satellite Attitude Control
 * Hinf LMI for Satellite Attitude Control