# Basic Matrix Theory
## Basic Matrix Notation

Consider the complex matrix $A\in \mathbb {C} ^{n\times m}$.
       $A={\begin{bmatrix}a_{11}&\dots &a_{1m}\\\vdots &\ddots &\vdots \\a_{n1}&\dots &a_{nm}\end{bmatrix}}\in \mathbb {C} ^{n\times m}$
Transpose of a Matrix
The transpose of $A$, denoted as $A^{T}$ or $A'$ is:
       $A^{T}={\begin{bmatrix}a_{11}&\dots &a_{n1}\\\vdots &\ddots &\vdots \\a_{1m}&\dots &a_{nm}\end{bmatrix}}\in \mathbb {C} ^{m\times n}.$
Adjoint of a Matrix
The adjoint or hermitian conjugate of $A$, denoted as $A^{*}$ is:
       $A^{*}={\begin{bmatrix}a_{11}^{*}&\dots &a_{n1}^{*}\\\vdots &\ddots &\vdots \\a_{1m}^{*}&\dots &a_{nm}^{*}\end{bmatrix}}\in \mathbb {C} ^{m\times n}.$
Where $a_{nm}^{*}$ is the complex conjugate of matrix element $a_{nm}$.
Notice that for a real matrix $A\in \mathbb {R} ^{n\times m}$, $A^{*}=A^{T}$.

## Important Properties of Matricies

Hermitian, Self-Adjoint, and Symmetric Matricies
A square matrix $A\in \mathbb {C} ^{n\times n}$ is called Hermitian or self-adjoint if $A=A^{*}$.
If $A\in \mathbb {R} ^{n\times n}$ is Hermitian then it is called symmetric.
Unitary Matricies
A square matrix $A\in \mathbb {C} ^{n\times n}$ is called unitary if $A^{*}=A^{-1}$ or $A^{*}A=I$.

## 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.

# Notion of Matrix Positivity
## Notation of Positivity

A symmetric matrix $A\in \mathbb {R} ^{n\times n}$ is defined to be:
positive semidefinite, $(A\geq 0)$, if $x^{T}Ax\geq 0$ for all $x\in \mathbb {R} ^{n},x\neq \mathbf {0}$.
positive definite, $(A>0)$, if $x^{T}Ax>0$ for all $x\in \mathbb {R} ^{n},x\neq \mathbf {0}$.
negative semidefinite, $(-A\geq 0)$.
negative definite, $(-A>0)$.
indefinite if $A$ is neither positive semidefinite nor negative semidefinite.

## Properties of Positive Matricies

* For any matrix $M$, $M^{T}M>0$.
* Positive definite matricies are invertible and the inverse is also positive definite.
* A positive definite matrix $A>0$ has a square root, $A^{1/2}>0$, such that $A^{1/2}A^{1/2}=A$.
* For a positive definite matrix $A>0$ and invertible $M$, $M^{T}AM>0$.
* If $A>0$ and $M>0$, then $A+M>0$.
* If $A>0$ then $\mu A>0$ for any scalar $\mu >0$.

## 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.

# KYP Lemma (Bounded Real Lemma)

KYP Lemma (Bounded Real Lemma)
The Kalman–Popov–Yakubovich (KYP) Lemma is a widely used lemma in control theory. It is sometimes also referred to as the Bounded Real Lemma. The KYP lemma can be used to determine the $H_{\infty }$ norm of a system and is also useful for proving many LMI results.

## The System

       ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\\x(0)&=x_{0}\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$, $u(t)\in \mathbb {R} ^{q}$, at any $t\in \mathbb {R}$.

## The Data

The matrices $A,B,C,D$ are known.

## The Optimization Problem

The following optimization problem must be solved.
    ${\begin{aligned}&{\underset {\gamma ,\;X}{\operatorname {minimize} }}\quad \gamma \\&\operatorname {subject\;to} &X>0\\&&{\begin{bmatrix}A^{T}X+XA&XB\\B^{T}X&-\gamma I\end{bmatrix}}+{\frac {1}{\gamma }}{\begin{bmatrix}C^{T}\\D^{T}\end{bmatrix}}{\begin{bmatrix}C&D\end{bmatrix}}<0\\\end{aligned}}$

## The LMI: The KYP or Bounded Real Lemma

Suppose ${\hat {G}}(s)(A,B,C,D)$ is the system. Then the following are equivalent.
       $1)\quad \left\|G\right\|_{H_{\infty }}\leq \gamma$
       $2)\quad {\text{There exists a}}\;X>0\;{\text{such that}}$
             ${\begin{bmatrix}A^{T}X+XA&XB\\B^{T}X&-\gamma I\end{bmatrix}}+{\frac {1}{\gamma }}{\begin{bmatrix}C^{T}\\D^{T}\end{bmatrix}}{\begin{bmatrix}C&D\end{bmatrix}}<0$

## Conclusion:

The KYP Lemma can be used to find the bound $\gamma$ on the $H_{\infty }$ norm of a system. Note from the (1,1) block of the LMI we know that $A$ is Hurwitz.

## Implementation

Since the KYP lemma shown above is nonlinear in gamma, in order to implement it in MATLAB we must first linearize it by using the Schur Complement to arrive at the dual formulation below:
       ${\begin{bmatrix}A^{T}X+XA&XB&C^{T}\\B^{T}X&-\gamma I&D^{T}\\C&D&-\gamma I\end{bmatrix}}<0$.
This dual KYP LMI is now linear in both $X$ and $\gamma$.
This implementation requires the use of Yalmip and Sedumi.
https://github.com/eoskowro/LMI/blob/master/KYP_Lemma_LMI.m

## Related LMIs

Positive Real Lemma

## 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.

# Positive Real Lemma

Positive Real Lemma
The Positive Real Lemma is a variation of the Kalman–Popov–Yakubovich (KYP) Lemma. The Positive Real Lemma can be used to determine if a system is passive (positive real).

## The System

       ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\\x(0)&=x_{0}\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$, $u(t)\in \mathbb {R} ^{q}$, at any $t\in \mathbb {R}$.

## The Data

The matrices $A,B,C,D$ are known.

## The LMI: The Positive Real Lemma

Suppose ${\hat {G}}(s)(A,B,C,D)$ is the system. Then the following are equivalent.
       $1)\quad G\;{\text{is passive, i.e.}}\;\left\langle u,Gu\right\rangle _{L_{2}}\geq 0\;({\hat {G}}(s)+{\hat {G}}(s)^{*}\geq 0)$
       $2)\quad {\text{There exists a}}\;X>0\;{\text{such that}}$
             ${\begin{bmatrix}A^{T}X+XA&XB-C^{T}\\B^{T}X-C&-D^{T}-D\end{bmatrix}}\leq 0$

## Conclusion:

The Positive Real Lemma can be used to determine if the system $G$ is passive. Note from the (1,1) block of the LMI we know that $A$ is Hurwitz.

## Implementation

This implementation requires Yalmip and Sedumi. https://github.com/eoskowro/LMI/blob/master/Positive_Real_Lemma.m

## Related LMIs

KYP Lemma (Bounded Real Lemma)

## 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.

# KYP Lemma for QSR Dissipative Systems
## The Concept

In systems theory the concept of dissipativity was first introduced by Willems which describes dynamical systems by input-output properties. Considering a dynamical system described by its state $x(t)$, its input $u(t)$ and its output $y(t)$, the input-output correlation is given a supply rate $w(u(t),y(t))$. A system is said to be dissipative with respect to a supply rate if there exists a continuously differentiable storage function $V(x(t))$ such that $V(0)=0$, $V(x(t))\geq 0$ and
    ${\dot {V}}(x(t))\leq w(u(t),y(t))$
As a special case of dissipativity, a system is said to be passive if the above dissipativity inequality holds with respect to the passivity supply rate $w(u(t),y(t))=u(t)^{T}y(t)$.
The physical interpretation is that $V(x)$ is the energy stored in the system, whereas $w(u(t),y(t))$ is the energy that is supplied to the system.
This notion has a strong connection with Lyapunov stability, where the storage functions may play, under certain conditions of controllability and observability of the dynamical system, the role of Lyapunov functions.
Roughly speaking, dissipativity theory is useful for the design of feedback control laws for linear and nonlinear systems. Dissipative systems theory has been discussed by Vasile M. Popov, Jan Camiel Willems, D.J. Hill, and P. Moylan. In the case of linear invariant systems, this is known as positive real transfer functions, and a fundamental tool is the so-called Kalman–Yakubovich–Popov lemma which relates the state space and the frequency domain properties of positive real systems.Dissipative systems are still an active field of research in systems and control, due to their important applications.

## The System

Consider a contiuous-time LTI system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space realization (A, B, C, D), where ${\mathcal {A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}\in {\mathcal {R}}^{p\times m}$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$

## The Data

The matrices $A,B,C$ and $D$ which defines the state space of the system

## The Optimization Problem

The system ${\mathcal {G}}$ is QSR disipative if
    $\int _{0}^{T}(y^{T}(t)Qy(t)+2y^{T}Su(t)+u^{T}(t)Ru(t))\,dt\geq 0,\forall u\in {\mathcal {L}}_{2e},\forall T\geq 0$
where $u(t)$ is the input to ${\mathcal {G}},y(t)$ is the output of ${\mathcal {G}},Q\in {\mathcal {S}}^{p},S\in {\mathcal {R}}^{p\times m},$ and ${\mathcal {R}}\in {\mathcal {S}}^{m}$.

## LMI : KYP Lemma for QSR Dissipative Systems

The system ${\mathcal {G}}$ is also QSR dissipative if and only if there exists $P\in {\mathcal {S}}^{n},$ where $P>0,$ such that
    ${\begin{bmatrix}PA+A^{T}P-C^{T}QC&PB-C^{T}S-C^{T}QD\\(PB-C^{T}S-C^{T}QD)^{T}&-D^{T}QD-(D^{T}S+S^{T}D)-R\end{bmatrix}}\leq 0.$

## Conclusion:

If there exist a positive definite $P$ for the the selected Q,S and R matrices then the system ${\mathcal {G}}$ is QSR dissipative.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2

# KYP Lemma witout Feedthrough
## The Concept

It is assumed in the Lemma that the state-space representation (A, B, C, D) is minimal. Then Positive Realness (PR) of the transfer function C(SI − A)$^{-1}$B + D is equivalent to the solvability of the set of LMIs given in this page. Consider now the following scalar example, where (A, B, C, D)=(−α, 0, 0, 1), with α > 0. The transfer function is H(s) = 0 that is PR

## The System

Consider a contiuous-time LTI system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (A, B, C, 0), where ${\mathcal {A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},$ and ${\mathcal {C}}\in {\mathcal {R}}^{m\times n},$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)\\\end{aligned}}$

## The Data

The matrices The matrices $A,B$ and $C$

## LMI : KYP Lemma without Feedthrough

The system ${\mathcal {G}}$ is positive real (PR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $p>0$ such that
       ${\begin{aligned}PA+A^{T}P\geq 0\\PB=C^{T}\end{aligned}}$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
       ${\begin{aligned}AQ+QA^{T}\geq 0\\B=QC^{T}\end{aligned}}$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = 0, Q = 0.5 and R = 0.
The system ${\mathcal {G}}$ is strictly positive real (SPR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $p>0$ such that
       ${\begin{aligned}PA+A^{T}P<0\\PB=C^{T}\end{aligned}}$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
       ${\begin{aligned}AQ+QA^{T}<0\\B=QC^{T}\end{aligned}}$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = ε1, Q = 0.5 and R = 0. where ε $\in {\mathcal {R}}_{>0}.$

## Conclusion:

If there exist a positive definite $P$ for the the selected Q,S and R matrices then the system ${\mathcal {G}}$ is Positive Real.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability Discrete Time KYP Lemma with Feedthrough

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London

# KYP Lemma for Descriptor Systems
## The Concept

Descriptor system descriptions frequently appear when solving computational problems in the analysis and design of standard linear systems. The numerically reliable solution of many standard control problems like the solu­tion of Riccati equations, computation of system zeros, design of fault detection and isolation filters (FDI), etc. relies on using descriptor system techniques.
Many algorithm for standard systems as for example stabilization techniques, factorization methods, minimal realization, model reduction, etc. have been extended to the more general descriptor system descriptions. An important application of these algorithms is the numeri­cally reliable computation with rational and polynomial matrices via equivalent descriptor representations. Recall that each rational matrix R(s) can be seen as the transfer-function matrix of a continuous- or discrete-time descriptor system. Thus, each R(s) can be equivalently realized by a descriptor system quadruple (A-sE, B, C, D) satisfying R(S)= C(SE-A)$^{-1}$B+D
Many operations on standard matrices (e.g., finding the rank, determinant, inverse or generalized inverses), or the solution of linear matrix equa­tions can be performed for rational matrices as well using descriptor system techniques. Other important applications of descriptor techniques are the computation of inner-outer and spectral factorisations, or minimum degree and normal­ized coprime factorisations of polynomial and rational matrices. More explanation can be found in the website of Institute of System Dynamics and control

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (E, A, B, C, D), where ${\mathcal {E,A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}\in {\mathcal {R}}^{p\times m}$.
    ${\begin{aligned}E{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$

## The Data

The matrices The matrices $E,A,B,C$ and $D$

## LMI : KYP Lemma for Descriptor Systems

The system ${\mathcal {G}}$ is extended strictly positive real (ESPR) if and only if there exists $X\in {\mathcal {R}}^{n\times n}$ and $W\in {\mathcal {R}}^{n\times m}$ such that
    $E^{T}X=X^{T}E\geq 0$
    $E^{T}W=0$
    ${\begin{bmatrix}X^{T}A+A^{T}X&A^{T}W+X^{T}B-C^{T}\\(A^{T}W+X^{T}B-C^{T})^{T}&W^{T}B+B^{T}W-(D^{T}+D)\end{bmatrix}}<0.$
The system is also ESPR if there exists ${\mathcal {X}}\in {\mathcal {R}}^{n\times n}$ such that
    $E^{T}X=X^{T}E\geq 0$
    ${\begin{bmatrix}X^{T}A+A^{T}X&X^{T}B-C^{T}\\(X^{T}B-C^{T})^{T}&-(D^{T}+D)\end{bmatrix}}<0.$

## Conclusion:

If there exist a X and W matrix satisfying above LMIs then the system ${\mathcal {G}}$ is Extended Strictly Positive Real.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability Discrete Time KYP Lemma with Feedthrough

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London 5. Numerical algorithms and software tools for analysis and modelling of descriptor systems. Prepr. of 2nd IFAC Workshop on System Structure and Control, Prague, Czechoslovakia, pp. 392-395, 1992.

# Generealized KYP (GKYP) Lemma for conic Sectors
## The Concept

The conic sector theorem is a powerful input-output stability analysis tool, providing a fine balance between generality and simplicity of system characterisations that is conducive to practical stability analysis and robust controller synthesis.

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (A, B, C, D), where ${\mathcal {E,A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}\in {\mathcal {R}}^{p\times m}$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$
Also consider $\pi _{c}(a,b)\in {\mathcal {S}}^{m}$, which is defined as
    $\pi _{c}(a,b)={\begin{bmatrix}-{\tfrac {1}{b}}I&{\tfrac {1}{2}}(1+{\tfrac {a}{b}})I\\({\tfrac {1}{2}}(1+{\tfrac {a}{b}})I)^{T}&-aI\end{bmatrix}}$,
where $a\in {\mathcal {R}},b\in {\mathcal {R}}_{>0}$ and $a<b$.

## The Data

The matrices The matrices $A,B,C$ and $D$. The values of a and b

## LMI : Generalized KYP (GKYP) Lemma for Conic Sectors

The following generalized KYP Lemmas give conditions for ${\mathcal {G}}$ to be inside the cone $[a,b]$ within finite frequency bandwidths.
    1. (Low Frequency Range) The system ${\mathcal {G}}$ is inside the cone $[a,b]$ for all $\omega \in {\omega \in {\mathcal {R}}||\omega |<\omega _{1},det(j\omega I-A)\neq 0}$, where $\omega _{1}\in {\mathcal {R}}_{>0},a\in {\mathcal {R}},b\in {\mathcal {R}}_{>0}$ and $a<b$, if there exist $P,Q\in {\mathcal {S}}^{n}$ and ${\overline {\omega }}_{1}\in {\mathcal {R}}_{>0}$, where $Q\geq 0$, such that
       ${\begin{bmatrix}A&B\\I&0\end{bmatrix}}^{T}{\begin{bmatrix}-Q&P\\P^{T}&(\omega _{1}-{\overline {\omega }}_{1})^{2}Q\end{bmatrix}}{\begin{bmatrix}A&B\\I&0\end{bmatrix}}-{\begin{bmatrix}C&D\\0&I\end{bmatrix}}^{T}\pi _{c}(a,b){\begin{bmatrix}C&D\\0&I\end{bmatrix}}<0$.
    If $\omega _{1}\rightarrow \infty ,P>0.$ and Q = 0, then the traditional Conic Sector Lemma is recovered. The parameter ${\overline {\omega }}_{1}$ is incuded in the above LMI to effectively transform $|\omega |\leq (\omega _{1}-{\overline {\omega }}_{1})$ into the strict inequality $|\omega |<\omega _{1}$
    2. (Intermediate Frequency Range) The system ${\mathcal {G}}$ is inside the cone $[a,b]$ for all $\omega \in {\omega \in {\mathcal {R}}|\omega _{1}\leq |\omega |<\omega _{2},det(j\omega I-A)\neq 0}$, where $\omega _{1},\omega _{2}\in {\mathcal {R}}_{>0},a\in {\mathcal {R}},b\in {\mathcal {R}}_{>0}$ and $a<b$, if there exist $P,Q\in {\mathcal {C}}^{n}$ and ${\overline {\omega }}_{2}\in {\mathcal {R}}_{>0}$ and ${\hat {\omega }}_{2}=(\omega _{1}+{\tfrac {(\omega _{2}-{\hat {\omega }}_{2})}{2}}),$ where $P^{H}=P,Q^{H}=Q$ and $Q\geq 0$, such that
       ${\begin{bmatrix}A&B\\I&0\end{bmatrix}}^{T}{\begin{bmatrix}-Q&P+{\mathcal {j{\hat {\omega }}_{2}}}Q\\P-{\mathcal {j{\hat {\omega }}_{2}}}Q&\omega _{1}(\omega _{2}-{\hat {\omega }}-2)Q\end{bmatrix}}{\begin{bmatrix}A&B\\I&0\end{bmatrix}}-{\begin{bmatrix}C&D\\0&I\end{bmatrix}}^{T}\pi _{c}(a,b){\begin{bmatrix}C&D\\0&I\end{bmatrix}}<0$.
    The parameter ${\overline {\omega }}_{2}$ is incuded in the above LMI to effectively transform $\omega _{1}\leq |\omega |\leq (\omega _{2}-{\overline {\omega }}_{2})$ into the strict inequality $\omega _{1}\leq |\omega |<\omega _{2}$.
    3. (High Frequency Range) The system ${\mathcal {G}}$ is inside the cone $[a,b]$ for all $\omega \in {\omega \in {\mathcal {R}}|\omega _{2}<|\omega |,det(j\omega I-A)\neq 0}$, where $\omega _{2}\in {\mathcal {R}}_{>0},a\in {\mathcal {R}},b\in {\mathcal {R}}_{>0}$ and $a<b$, if there exist $P,Q\in {\mathcal {S}}^{n}$, where $Q\geq 0$, such that
       ${\begin{bmatrix}A&B\\I&0\end{bmatrix}}^{T}{\begin{bmatrix}-Q&P\\P^{T}&\omega _{2}^{2}Q\end{bmatrix}}{\begin{bmatrix}A&B\\I&0\end{bmatrix}}-{\begin{bmatrix}C&D\\0&I\end{bmatrix}}^{T}\pi _{c}(a,b){\begin{bmatrix}C&D\\0&I\end{bmatrix}}<0$.
If (A, B, C, D) is a minimal realization, then the matrix inequalities in all of the above LMI, then it can be nostrict.

## Conclusion:

If there exist a positive definite $q$ matrix satisfying above LMIs for the given frequency bandwidths then the system ${\mathcal {G}}$ is inside the cone [a,b].

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability Exterior Conic Sector Lemma Modified Exterior Conic Sector Lemma

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Bridgeman, Leila Jasmine, and James Richard Forbes. "The exterior conic sector lemma." International Journal of Control 88.11 (2015): 2250-2263.

# Discrete time Bounded Real Lemma

Discrete-Time Bounded Real Lemma
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.
Discrete-Time Bounded Real Lemma or the H∞ norm can be found by solving a LMI.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}&A_{d}\in {\bf {{R^{n*n}},}}&B_{d}\in {\bf {{R^{n*m}},}}&C_{d}\in {\bf {{R^{p*n}},}}&D_{d}\in {\bf {{R^{p*m}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d},C_{d},D_{d}),P$.

## The Optimization Problem

The following feasibility problem should be optimized:
$\gamma$ is minimized while obeying the LMI constraints.

## The LMI:

Discrete-Time Bounded Real Lemma
The LMI formulation
H∞ norm < $\gamma$
${\begin{aligned}P\in {S^{n}};\gamma \in {R_{>0}}\;\\&P>0,\\{\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}&C_{d}^{T}\\*&B_{d}^{T}PB_{d}-\gamma I&D_{d}^{T}\\*&*&-\gamma I\end{bmatrix}}&<0,\end{aligned}}$

## Conclusion:

The H∞ norm is the minimum value of $\gamma \in {R_{>0}}$that satisfies the LMI condition. If $(A_{d},B_{d},C_{d},D_{d})$ is the minimal realization then the inequalities can be non-strict.

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous time KYP_Lemma_(Bounded_Real_Lemma)

## 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.

# Discrete Time KYP Lemma for QSR Dissipative System
## The Concept

In systems theory the concept of dissipativity was first introduced by Willems which describes dynamical systems by input-output properties. Considering a dynamical system described by its state $x(t)$, its input $u(t)$ and its output $y(t)$, the input-output correlation is given a supply rate $w(u(t),y(t))$. A system is said to be dissipative with respect to a supply rate if there exists a continuously differentiable storage function $V(x(t))$ such that $V(0)=0$, $V(x(t))\geq 0$ and
    ${\dot {V}}(x(t))\leq w(u(t),y(t))$
As a special case of dissipativity, a system is said to be passive if the above dissipativity inequality holds with respect to the passivity supply rate $w(u(t),y(t))=u(t)^{T}y(t)$.
The physical interpretation is that $V(x)$ is the energy stored in the system, whereas $w(u(t),y(t))$ is the energy that is supplied to the system.
This notion has a strong connection with Lyapunov stability, where the storage functions may play, under certain conditions of controllability and observability of the dynamical system, the role of Lyapunov functions.
Roughly speaking, dissipativity theory is useful for the design of feedback control laws for linear and nonlinear systems. Dissipative systems theory has been discussed by Vasile M. Popov, Jan Camiel Willems, D.J. Hill, and P. Moylan. In the case of linear invariant systems, this is known as positive real transfer functions, and a fundamental tool is the so-called Kalman–Yakubovich–Popov lemma which relates the state space and the frequency domain properties of positive real systems.Dissipative systems are still an active field of research in systems and control, due to their important applications.

## The System

Consider a discrete-time LTI system, ${\mathcal {G}}:{\mathcal {l}}_{2e}\rightarrow {\mathcal {l}}_{2e}$, with minimal state-space relization $({\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d},{\mathcal {D}}_{d})$, where ${\mathcal {A}}_{d}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}_{d}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}_{d}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}_{d}\in {\mathcal {R}}^{p\times m}$.
    $x(k+1)={\mathcal {A}}_{d}x(k)+{\mathcal {B}}_{d}u(k)$
    $y(k)={\mathcal {C}}_{d}x(k)+{\mathcal {D}}_{d}u(k),k=0,1...$

## The Data

The matrices ${\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d}$ and ${\mathcal {D}}_{d}$

## The Optimization Problem

The system ${\mathcal {G}}$ is QSR disipative if
    $\sum _{i\mathop {=} 0}^{K}({\mathcal {y}}_{i}^{T}Q{\mathcal {y}}_{i}+2{\mathcal {y}}_{i}^{T}S{\mathcal {u}}_{i}+{\mathcal {u}}_{i}^{T}R{\mathcal {u}}_{i})\,dt\geq 0,\forall u\in {\mathcal {l}}_{2e},\forall k\in {\mathcal {Z}}\geq 0$
where ${\mathcal {u}}_{k}$ is the input to ${\mathcal {G}},{\mathcal {y}}_{k}$ is the output of ${\mathcal {G}},Q\in {\mathcal {S}}^{p},S\in {\mathcal {R}}^{p\times m},$ and ${\mathcal {R}}\in {\mathcal {S}}^{m}$.

## LMI : Discrete-Time KYP Lemma for QSR Dissipative Systems

The system ${\mathcal {G}}$ is also QSR dissipative if and only if there exists $P\in {\mathcal {S}}^{n},$ where $P>0,$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P-C_{d}^{T}QC_{d}&A_{d}^{T}PB_{d}-C_{d}^{T}S-C_{d}^{T}QD_{d}\\(A_{d}^{T}PB_{d}-C_{d}^{T}S-C_{d}^{T}QD_{d})^{T}&B_{d}^{T}PB_{d}-D_{d}^{T}QD_{d}-(D_{d}^{T}S+S^{T}D_{d})-R\end{bmatrix}}\leq 0.$

## Conclusion:

If there exist a positive definite $P$ for the the selected Q,S and R matrices then the system ${\mathcal {G}}$ is QSR dissipative.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
KYP Lemma for continous Time QSR Dissipative system

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2

# Discrete Time KYP Lemma with Feedthrough
## The Concept

It is assumed in the Lemma that the state-space representation (A$_d$, B$_d$, C$_d$, D$_d$) is minimal. Then Positive Realness (PR) of the transfer function C$_d$(SI − A$_d$)$^{-1}$B$_d$ + D$_d$ is equivalent to the solvability of the set of LMIs given in this page. Consider now the following scalar example, where (A$_d$, B$_d$, C$_d$, D$_d$)=(−α, 0, 0, 1), with α > 0. The transfer function is H(s) = 0 that is PR

## The System

Consider a discrete-time LTI system, ${\mathcal {G}}:{\mathcal {l}}_{2e}\rightarrow {\mathcal {l}}_{2e}$, with minimal state-space relization $({\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d},{\mathcal {D}}_{d})$, where ${\mathcal {A}}_{d}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}_{d}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}_{d}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}_{d}\in {\mathcal {R}}^{p\times m}$.
    $x(k+1)={\mathcal {A}}_{d}x(k)+{\mathcal {B}}_{d}u(k)$
    $y(k)={\mathcal {C}}_{d}x(k)+{\mathcal {D}}_{d}u(k),k=0,1...$

## The Data

The matrices ${\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d}$ and ${\mathcal {D}}_{d}$

## LMI : Discrete-Time KYP Lemma with Feedthrough

The system ${\mathcal {G}}$ is positive real (PR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $P>0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}-C_{d}^{T}\\(A_{d}^{T}PB_{d}-C_{d}^{T})^{T}&B_{d}^{T}PB_{d}-(D_{d}^{T}+D_{d})\end{bmatrix}}\leq 0.$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}A_{d}QA_{d}^{T}-Q&A_{d}QC_{d}^{T}-B_{d}\\(A_{d}QC_{d}^{T}-B_{d})^{T}&C_{d}PC_{d}^{T}-(D_{d}^{T}+D_{d})\end{bmatrix}}\leq 0.$
    3. There exists $P\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}P&PA_{d}&PB_{d}\\(PA_{d})^{T}&P&C_{d}^{T}\\(PB_{d})^{T}&C_{d}&D_{d}^{T}+D_{d}\end{bmatrix}}\geq 0.$
    4. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}Q&A_{d}Q&B_{d}\\(A_{d}Q)^{T}&Q&QC_{d}^{T}\\(B_{d})^{T}&(QC_{d}^{T})^{T}&D_{d}^{T}+D_{d}\end{bmatrix}}\geq 0.$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = 0, Q = 0.5 and R = 0.
The system ${\mathcal {G}}$ is strictly positive real (SPR) under either of the following equivalet necessary and sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ where $P>0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}-C_{d}^{T}\\(A_{d}^{T}PB_{d}-C_{d}^{T})^{T}&B_{d}^{T}PB_{d}-(D_{d}^{T}+D_{d})\end{bmatrix}}<0.$
    2. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}A_{d}QA_{d}^{T}-Q&A_{d}QC_{d}^{T}-B_{d}\\(A_{d}QC_{d}^{T}-B_{d})^{T}&C_{d}PC_{d}^{T}-(D_{d}^{T}+D_{d})\end{bmatrix}}<0.$
    3. There exists $P\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}P&PA_{d}&PB_{d}\\(PA_{d})^{T}&P&C_{d}^{T}\\(PB_{d})^{T}&C_{d}&D_{d}^{T}+D_{d}\end{bmatrix}}>0.$
    4. There exists $Q\in {\mathcal {S}}^{n},$ where $Q>0$ such that
    ${\begin{bmatrix}Q&A_{d}Q&B_{d}\\(A_{d}Q)^{T}&Q&QC_{d}^{T}\\(B_{d})^{T}&(QC_{d}^{T})^{T}&D_{d}^{T}+D_{d}\end{bmatrix}}>0.$
This is a special case of the KYP Lemma for QSR dissipative systems with Q = ε1, Q = 0.5 and R = 0. where ε $\in {\mathcal {R}}_{>0}.$

## Conclusion:

If there exist a positive definite $P$ for the the selected Q,S and R matrices then the system ${\mathcal {G}}$ is Positive Real.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability KYP Lemma without Feedthrough

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London

# Schur Complement

An important tool for proving many LMI theorems is the Schur Compliment. It is frequently used as a method of LMI linearization.

### The Schur Compliment

Consider the matricies $Q$, $M$, and $R$ where $Q$ and $M$ are self-adjoint. Then the following statements are equivalent:
      * $Q>0$ and $M-RQ^{-1}R^{*}>0$ both hold.
      * $M>0$ and $Q-R^{*}M^{-1}R>0$ both hold.
      * ${\begin{bmatrix}M&R\\R^{*}&Q\end{bmatrix}}>0$ is satisfied.
More concisely:
       ${\begin{bmatrix}M&R\\R^{*}&Q\end{bmatrix}}>0\iff {\begin{bmatrix}M&0\\0&Q-R^{*}M^{-1}R\end{bmatrix}}>0\iff {\begin{bmatrix}M-RQ^{-1}R^{*}&0\\0&Q\end{bmatrix}}>0$

## 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.

# LMI for Eigenvalue Minimization

LMI for Minimizing Eigenvalue of a Matrix
Synthesizing the eigenvalues of a matrix plays an important role in designing controllers for linear systems. The eigenvalues of the state matrix of a linear time-invariant system determine if the system is stable or not. The system is stable if all the eigenvalues of the state matrix are located in the left half of the complex plane. Thus, we may desire to minimize the maximal eigenvalue of the state matrix such that the minimized eigenvalue is placed in the left half-plane, which guarantees that the system is stable.

## The System

Assume that we have a matrix function of variables $x$:
${\begin{aligned}A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}\end{aligned}}$
where ${\begin{aligned}A_{i},\quad i=1,2,...,n\end{aligned}}$ are symmetric matrices.

## The Data

The symmetric matrices $A_{i}$ (${\begin{aligned}A_{0},A_{1},...,A_{n}\end{aligned}}$) are given.

## The Optimization Problem

The optimization problem is to find the variables ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ to minimize the following cost function:
${\begin{aligned}J(x)=\lambda _{\text{max}}(A(x))\end{aligned}}$
where $J(x)$ is the cost function and $\lambda _{\text{max}}(.)$ indicates the maximim eigenvalue of a matrix.
According to Lemma 1.1 in LMI in Control Systems Analysis, Design and Applications (page 10), the following statements are equivalent
${\begin{aligned}\lambda _{max}(A(x))\leq t\iff A(x)-tI\leq 0\end{aligned}}$
where $t$ is defined as the maximim eigenvalue of the matrix $A$.

## The LMI: LMI for eigenvalue minimization

This optimization problem can be converted to an LMI problem.
The mathematical description of the LMI formulation can be written as follows:
${\begin{aligned}&{\text{min}}\quad t\\&{\text{s.t.}}\quad A(x)-tI\leq 0\end{aligned}}$

## Conclusion:

As a result, the variables $x_{i},\quad i=1,2,...,n$ after solving this LMI problem.
Moreover, we obtain the maximum eigenvalue, $t$, of the matrix $A(x)$.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Minimizing-the-Maximum-Eigenvalue-of-Matrix

## Related LMIs

LMI for Generalized Eigenvalue Problem
LMI for Matrix Norm Minimization
LMI for Maximum Singular Value of a Complex Matrix
LMI for Matrix Positivity

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* State-space Representation of a System
* Eigenvalues and Eigenvectors of a Matrix

# LMI for Matrix Norm Minimization

LMI for Matrix Norm Minimization
This problem is a slight generalization of the eigenvalue minimization problem for a matrix. Calculating norm of a matrix is necessary in designing an $H_{2}$ or an $H_{\infty }$ optimal controller for linear time-invariant systems. In those cases, we need to compute the norm of the matrix of the closed-loop system. Moreover, we desire to design the controller so as to minimize the closed-loop matrix norm.

## The System

Assume that we have a matrix function of variables $x$:
${\begin{aligned}A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}\end{aligned}}$
where ${\begin{aligned}A_{i},\quad i=1,2,...,n\end{aligned}}$ are symmetric matrices.

## The Data

The symmetric matrices $A_{i}$ (${\begin{aligned}A_{0},A_{1},...,A_{n}\end{aligned}}$) are given.

## The Optimization Problem

The optimization problem is to find the variables ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ in order to minimize the following cost function:
${\begin{aligned}J(x)=||A(x)||_{2}\end{aligned}}$
where $J(x)$ is the cost function and $||.||_{2}$ indicates the norm of the matrix function $A$.
According to Lemma 1.1 in LMI in Control Systems Analysis, Design and Applications (page 10), the following statements are equivalent:
${\begin{aligned}A^{T}A-t^{2}I\leq 0\iff {\begin{bmatrix}-tI&A\\A^{T}&-tI\end{bmatrix}}\leq 0\\\end{aligned}}$

## The LMI: LMI for matrix norm minimization

This optimization problem can be converted to an LMI problem.
The mathematical description of the LMI formulation can be written as follows:
${\begin{aligned}&{\text{min}}\quad t&\\&{\text{s.t.}}\quad {\begin{bmatrix}-tI&A(x)\\A(x)^{T}&-tI\end{bmatrix}}\leq 0\\\end{aligned}}$

## Conclusion:

As a result, the variables $x_{i},\quad i=1,2,...,n$ after solving this LMI problem and we obtain $t$ that is the norm of matrix function $A(x)$.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Matrix-Norm-Minimization

## Related LMIs

LMI for Matrix Norm Minimization
LMI for Generalized Eigenvalue Problem
LMI for Maximum Singular Value of a Complex Matrix
LMI for Matrix Positivity

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications

# LMI for Generalized Eigenvalue Problem

LMI for Generalized Eigenvalue Problem
Technically, the generalized eigenvalue problem considers two matrices, like $A$ and $B$, to find the generalized eigenvector, $x$, and eigenvalues, $\lambda$, that satisfies $Ax=\lambda Bx$. If the matrix $B$ is an identity matrix with the proper dimension, the generalized eigenvalue problem is reduced to the eigenvalue problem.

## The System

Assume that we have three matrice functions which are functions of variables $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}\in \mathbb {R} ^{n}$ as follows:
$A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}$
$B(x)=B_{0}+B_{1}x_{1}+...+B_{n}x_{n}$
$C(x)=C_{0}+C_{1}x_{1}+...+C_{n}x_{n}$
where are $A_{i}$, $B_{i}$, and $C_{i}$ ($i=1,2,...,n$) are the coefficient matrices.

## The Data

The $A(x)$, $B(x)$, and $C(x)$ are matrix functions of appropriate dimensions which are all linear in the variable $x$ and $A_{i}$, $B_{i}$, $C_{i}$ are given matrix coefficients.

## The Optimization Problem

The problem is to find ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ such that:
$A(x)<\lambda B(x)$, $B(x)>0$, and $C(x)<0$ are satisfied and $\lambda$ is a scalar variable.

## The LMI: LMI for Schur stabilization

A mathematical description of the LMI formulation for the generalized eigenvalue problem can be written as follows:
${\begin{aligned}&{\text{min}}\quad \lambda \\&{\text{s.t.}}\quad A(x)<\lambda B(x)\\&\quad \quad B(x)>0\\&\quad \quad C(x)<0\end{aligned}}$

## Conclusion:

The solution for this LMI problem is the values of variables $x$ such that the scalar parameter, $\lambda$, is minimized. In practical applications, many problems involving LMIs can be expressed in the aforementioned form. In those cases, the objective is to minimize a scalar parameter that is involved in the constraints of the problem.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Schur-Stability

## Related LMIs

LMI for Generalized Eigenvalue Problem
LMI for Matrix Norm Minimization
LMI for Maximum Singular Value of a Complex Matrix

## External Links

* - LMI in Control Systems Analysis, Design and Applications

# LMI for Linear Programming

LMI for Linear Programming
Linear programming has been known as a technique for the optimization of a linear objective function subject to linear equality or inequality constraints. The feasible region for this problem is a convex polytope. This region is defined as a set of the intersection of many finite half-spaces which are created by the inequality constraints. The solution for this problem is to find a point in the polytope of existing solutions where the objective function has its extremum (minimum or maximum) value.

## The System

We define the objective function as:
$c_{1}x_{1}+c_{2}x_{2}+...c_{n}x_{n}$
and constraints of the problem as:
$a_{11}x_{1}+a_{12}x_{2}+...+a_{1n}x_{n}<b_{1}$
$a_{21}x_{1}+a_{22}x_{2}+...+a_{2n}x_{n}<b_{2}$
$a_{m1}x_{1}+a_{m2}x_{2}+...+a_{mn}x_{n}<b_{m}$

## The Data

Suppose that $c_{j}\in \mathbb {R} ^{n}$, $a_{ij}\in \mathbb {R} ^{n}$, and $b_{i}\in \mathbb {R} ^{m}$ are given parameters where $i=1,2,...,m$ and $j=1,2,...,n$. Moreover, $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}$ is an $n\times 1$ vector of positive variables.

## The Optimization Problem

The optimization problem is to minimize the objective function, $c^{\text{T}}x$ when the aforementioned linear constraints are satisfied.

## The LMI: LMI for linear programming

The mathematical description of the optimization problem can be readily written in the following LMI formulation:
${\begin{aligned}&{\text{min}}\quad c^{\text{T}}x&\\&{\text{s.t.}}\quad a_{i}^{\text{T}}x\leq b_{i}x\\\end{aligned}}$

## Conclusion:

Solving this problem results in the values of variables $x$ which minimize the objective function. It is also worthwhile to note that if $m\geq n$, the computational cost for solving this problem would be $mn^{2}$.
There does not exist an analytical formulation to solve a general linear programming problem. Nonetheless, there are some efficient algorithms, like the Simplex algorithm, for solving a linear programming problem.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Linear-Programming

## Related LMIs

LMI for Feasibility Problem

## External Links

* - LMI in Control Systems Analysis, Design and Applications

# LMI for Feasibility Problem

LMI for Feasibility Problem in Optimization
The feasibility problem is to find any feasible solutions for an optimization problem without regard to the objective value. This problem can be considered as a special case of an optimization problem where the objective value is the same for all the feasible solutions. Many optimization problems have to start from a feasible point in the range of all possible solutions. One way is to add a slack variable to the problem in order to relax the feasibility condition. By adding the slack variable the problem any start point would be a feasible solution. Then, the optimization problem is converted to find the minimum value for the slack variable until the feasibility is satisfied.

## The System

Assume that we have two matrices as follows:
${\begin{aligned}A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}\quad i=1,2,...,n\end{aligned}}$
${\begin{aligned}B(x)=B_{0}+B_{1}x_{1}+...+B_{n}x_{n}\quad i=1,2,...,n\end{aligned}}$
which are matrix functions of variables $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}\in \mathbb {R} ^{n}$.

## The Data

Suppose that the matrices ${\begin{aligned}A_{0},A_{1},...,A_{n}\quad \end{aligned}}$ and ${\begin{aligned}B_{0},B_{1},...,B_{n}\quad \end{aligned}}$ are given.

## The Optimization Problem

The optimization problem is to find variables ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ such that the following constraint is satisfied:
${\begin{aligned}A(x)<B(x)\end{aligned}}$

## The LMI: LMI for Feasibility Problem

This optimization problem can be converted to a standard LMI problem by adding a slack variable, $t$.
The mathematical description for this problem is to minimize $t$ in the following form of the LMI formulation:
${\begin{aligned}&{\text{min}}\quad t\\&{\text{s.t.}}\quad A(x)<B(x)+tI\\\end{aligned}}$

## Conclusion:

In this problem, $x$ and $t$ are decision variables of the LMI problem.
As a result, these variables are determined in the optimization problem such that the minimum value of $t$ is found while the inequality constraint is satisfied.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Feasibility-Problem-of-Convex-Optimization

## Related LMIs

LMI for Linear Programming

## External Links

* - LMI in Control Systems Analysis, Design and Applications

# Structured Singular Value

LMIs in Control/Print version
The LMI can be used to find a $\Theta$ that belongs to the set of scalings $P\Theta$. Minimizing $\gamma$ allows to minimize the squared norm of $\Theta M\Theta ^{-}1$.

## The System

    ${\begin{aligned}M{\text{ with transfer function }}{\hat {M}}(s)=C(sI-A)^{-1}B+D,&&{\hat {M}}\in H_{\infty }\end{aligned}}$

## The Data

The matrices $A\in R^{n\times n},B\in R^{n\times m},C\in R^{o\times n},D\in R^{o\times m}$.

## The Optimization Problem

${\begin{aligned}{\text{There exists }}\Theta \in \Theta {\text{ such that }}||\Theta M\Theta ^{-1}||^{2}<\gamma .\end{aligned}}$

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&X>0:\\{\begin{bmatrix}A^{T}X+XA&XB\\B^{T}X&-\Theta \end{bmatrix}}+\gamma ^{-2}{\begin{bmatrix}C^{T}\\D^{T}\end{bmatrix}}\Theta {\begin{bmatrix}C&D\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

${\text{The optimization problem and the LMI are equivalent. }}\gamma {\text{ must be optimized using bisection.}}$

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Eigenvalue Problem

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

# Eigenvalue Problem

LMIs in Control/Print version
The maximum eigenvalue of a matrix is going to have the most impact on system performance. This LMI allows for minimization of the maximum eigenvalue by minimizing $\gamma$.

## The System

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

## The Data

The matrices $A\in R^{n\times n},B\in R^{n\times m},C\in R^{o\times n}$.

## The Optimization Problem

${\text{ Minimize }}\gamma {\text{ subject to the LMI below.}}$

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0:\\{\begin{bmatrix}-A^{T}P-PA-C^{T}C&PB\\B^{T}P&\gamma I\end{bmatrix}}>0\\\end{aligned}}$

## Conclusion:

The eigenvalue problem can be utilized to minimize the maximum eigenvalue of a matrix that depends affinely on a variable.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Structured Singular Value

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# LMI for Minimizing Condition Number of Positive Definite Matrix

LMIs in Control/Print version

## The System:

A related problem is minimizing the condition number of a positive-defnite matrix $M$ that depends affinely on the variable $x$, subject to the LMI constraint $F(x)$ > 0. This problem can be reformulated as the GEVP.

## The Optimization Problem:

The GEVP can be formulated as follows:
minimize $\gamma$
subject to $F(x)$ > 0;
$\mu$>0;
$\mu I$< $M(x)$ < $\gamma \mu I$.
We can reformulate this GEVP as an EVP as follows. Suppose,
$M(x)$= $M_{0}$ +$\sum _{n=1}^{m}$$x_{i}M_{i}$ , $F(x)$= $F_{0}$+ $\sum _{n=1}^{m}$$x_{i}F_{i}$

## The LMI:

Defining the new variables $\nu$=$1/\mu$ , ${\tilde {x}}$=$x/\mu$ we can express the previous formulation as the EVP with variables ${\tilde {x}},\nu$ and $\gamma$:
miminize$\gamma$
subject to $\nu F_{0}$+ $\sum _{n=1}^{m}$$x_{i}F_{i}$ >0; $I$ < $\nu M_{0}$+ $\sum _{n=1}^{m}$$x_{i}M_{i}$ < $\gamma I$

## Conclusion:

The LMI is feasible.

## References

* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# Continuous Quadratic Stability

LMIs in Control/Print version
To study stability of a LTI system, we first ask whether all trajectories of system converge to zero as $t\rightarrow \infty$. A sufficient condition for this is the existence of a quadratic function $V(\xi )=\xi ^{T}P\xi$, $P>0$ that decreases along every nonzero trajectory of system . If there exists such a P, we say the system is quadratically stable and we call $V$ a quadratic Lyapunov function.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=A(\delta (t))x(t)\\\end{aligned}}$

## The Data

The system coefficient matrix takes the form of
    ${\begin{aligned}{\dot {x}}(t)&=A_{0}+\Delta A(\delta (t))x(t)\\\end{aligned}}$
where $A_{0}\in \mathbb {R}$is a known matrix, which represents the nominal system matrix, while ${\begin{aligned}\Delta A(\delta (t))x(t)=\delta _{1}(t))A_{1}+\delta _{2}(t))A_{2}+...+\delta _{k}(t))A_{k}\end{aligned}}$ is the system matrix perturbation, where
    $A_{i}\in \mathbb {R} ^{n\times n},i=1,2,..,k,$ are known matrices, which represent the perturbation matrices.
    $\delta _{i}(t),i=1,2,...,k,$ which represent the uncertain parameters in the system.
    $\delta (t)=[\delta _{1}(t)\delta _{2}(t)...\delta _{k}(t)]^{T}$ is the uncertain parameter vector, which is often assumed to be within a certain compact and convex set : : $\Delta$ that is
    $\delta (t)=[\delta _{1}(t)\delta _{2}(t)...\delta ]^{T}\in \Delta$

## The LMI: Continuous-Time Quadratic Stability

The uncertain system is quadratically stable if and only if there exists $P\in \mathbb {S} ^{n}$, where $P>0,$ such that
       ${\begin{aligned}(A_{0}+\Delta A(\delta (t))x(t))^{T}+P(A_{0}+\Delta A(\delta (t))x(t))<0\delta (t)\in \Delta \end{aligned}}$
The following statements can be made for particular sets of perturbations.

### Case 1: Regular Polyhedron

Consider the case where the set of perturbation parameters is defined by a regular polyhedron as
    ${\begin{aligned}\Delta ={\delta (t)=[\delta _{1}(t)\delta _{2}(t)...\delta _{k}(t)]\in \mathbb {R} ^{k}\mid \delta _{i}(t),{\underline {\delta _{i}}}(t),{\overline {\delta _{i}}}(t),{\underline {\delta _{i}}}\leq \delta _{i}(t)\leq {\overline {\delta _{i})}}}\end{aligned}}$
The uncertain system is quadratically stable if and only if there exists $P\in \mathbb {S} ^{n}$, where $P>0,$ such that
    ${\begin{aligned}(A_{0}+\Delta A(\delta (t))x(t))^{T}+P(A_{0}+\Delta A(\delta (t))x(t))<0\delta _{i}(t)\in {{\underline {\delta _{i}}},{\overline {\delta _{i}}}},i=1,2,...k.\end{aligned}}$

### Case 2: Polytope

Consider the case where the set of perturbation parameters is defined by a polytope as
    ${\begin{aligned}\Delta ={\delta (t)=[\delta _{1}(t)\delta _{2}(t)...\delta _{k}(t)]\in \mathbb {R} ^{k}\mid \delta _{i}(t)\in \mathbb {R} _{\geq 0}},\sum _{i=1}^{k}\delta _{i}(t)=1\end{aligned}}$
The uncertain system is quadratically stable if and only if there exists $P\in \mathbb {S} ^{n}$, where $P>0,$ such that
    ${\begin{aligned}(A_{0}+A_{i})^{T}P+P(A_{0}+A_{i})<0,i=1,2...,k.\end{aligned}}$

## Conclusion:

If feasible, System is Quadratically stable for any $x\in \mathbb {R} ^{n}$

## Implementation

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

## 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.

# Exterior Conic Sector Lemma
## The Concept

The conic sector theorem is a powerful input-output stability analysis tool, providing a fine balance between generality and simplicity of system characterisations that is conducive to practical stability analysis and robust controller synthesis.

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (A, B, C, D), where ${\mathcal {E,A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}\in {\mathcal {R}}^{p\times m}$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$

## The Data

The matrices The matrices $A,B,C$ and $D$

## LMI : Exterior Conic Sector Lemma

The system ${\mathcal {G}}$ is in the exterior cone of radius r centered at c (i.e. ${\mathcal {G}}\in$excone$_r$(c)), where $r\in {\mathcal {R}}_{>0}$ and $\in {\mathcal {R}}$, under either of the following equivalent necessary and sufficient conditions.
    1. There exists P $\in {\mathcal {S}}^{n}$, where P $\geq 0$, such that
       ${\begin{bmatrix}PA+A^{T}P-C^{T}C&PB-C^{T}(D-CI)\\(PB-C^{T}(D-CI))^{T}&r^{2}I-(D-cI)^{T}(D-cI)\end{bmatrix}}\leq 0.$
    2. There exists P $\in {\mathcal {S}}^{n}$, where P $\geq 0$, such that
       ${\begin{bmatrix}PA+A^{T}P-C^{T}C&PB-C^{T}(D-CI)&0\\(PB-C^{T}(D-CI))^{T}&-(D-cI)^{T}(D-cI)&rI\\0&(rI)^{T}&-I\end{bmatrix}}\leq 0.$
Proof, Applying the Schur complement lemma to the $r^{2}I$ terms in (1) gives (2).

## Conclusion:

If there exist a positive definite $P$ matrix satisfying above LMIs then the system ${\mathcal {G}}$ is in the exterior cone of radius r centered at c.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transactions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Bridgeman, Leila Jasmine, and James Richard Forbes. "The exterior conic sector lemma." International Journal of Control 88.11 (2015): 2250-2263.

# Modified Exterior Conic Sector Lemma
## The Concept

The conic sector theorem is a powerful input-output stability analysis tool, providing a fine balance between generality and simplicity of system characterisations that is conducive to practical stability analysis and robust controller synthesis.

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization (A, B, C, D), where ${\mathcal {E,A}}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}\in {\mathcal {R}}^{p\times m}$.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$

## The Data

The matrices The matrices $A,B,C$ and $D$

## LMI : Modified Exterior Conic Sector Lemma

The system ${\mathcal {G}}$ is in the exterior cone of radius r centered at c (i.e. ${\mathcal {G}}\in$excone$_r$(c)), where $r\in {\mathcal {R}}_{>0}$ and $\in {\mathcal {R}}$, under either of the following sufficient conditions.
    1. There exists P $\in {\mathcal {S}}^{n}$, where P $\geq 0$, such that
       ${\begin{bmatrix}PA+A^{T}P&PB-C^{T}(D-CI)\\(PB-C^{T}(D-CI))^{T}&r^{2}I-(D-cI)^{T}(D-cI)\end{bmatrix}}\leq 0.$
    Proof. The term $-C^{T}C$ in the Actual Exterior Conic Sector Lemma makes the matrix inequality more neagtive definite.
Therefore,
       ${\begin{bmatrix}PA+A^{T}P-C^{T}C&PB-C^{T}(D-CI)\\(PB-C^{T}(D-CI))^{T}&r^{2}I-(D-cI)^{T}(D-cI)\end{bmatrix}}\leq {\begin{bmatrix}PA+A^{T}P&PB-C^{T}(D-CI)\\(PB-C^{T}(D-CI))^{T}&r^{2}I-(D-cI)^{T}(D-cI)\end{bmatrix}}$
    2. There exists P $\in {\mathcal {S}}^{n}$, where P $\geq 0$, such that
       ${\begin{bmatrix}PA+A^{T}P&PB-C^{T}(D-CI)&0\\(PB-C^{T}(D-CI))^{T}&-(D-cI)^{T}(D-cI)&rI\\0&(rI)^{T}&-I\end{bmatrix}}\leq 0.$
    Proof. Applying the Schur complement lemma to the $r^{2}I$ terms in (1) gives (2).

## Conclusion:

If there exist a positive definite $P$ matrix satisfying above LMIs then the system ${\mathcal {G}}$ is in the exterior cone of radius r centered at c.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability Exterior Conic Sector Lemma

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Bridgeman, Leila Jasmine, and James Richard Forbes. "The exterior conic sector lemma." International Journal of Control 88.11 (2015): 2250-2263.

# DC Gain of a Transfer Matrix

The continuous-time DC gain is the transfer function value at the frequency s = 0.

## The System

Consider a square continuous time Linear Time invariant system, with the state space realization $(A,B,C,D)$ and $\gamma \in \mathbb {R} _{>0}$
    ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\y=Cx(t)+Du(t)\end{aligned}}$

## The Data

$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}$

## The LMI: LMI for DC Gain of a Transfer Matrix

The transfer matrix is given by$G(s)=C(sI-A)^{-1}B+D$
The DC Gain of the system is strictly less than $\gamma$ if the following LMIs are satisfied.
    ${\begin{bmatrix}\gamma I&-CA^{-1}B+D\\(-CA^{-1}B+D)'&\gamma I\end{bmatrix}}$${\begin{aligned}>0\end{aligned}}$
OR
    ${\begin{bmatrix}\gamma I&-B^{T}A^{-T}C^{T}+DT\\(-B^{T}A^{-T}C^{T}+DT)'&\gamma I\end{bmatrix}}$${\begin{aligned}>0\end{aligned}}$

## Conclusion

The DC Gain of the continuous-time LTI system, whose state space realization is give by ($A,B,C,D$), is
$K=D-CA^{-1}B$
* Upon implementation we can see that the value of $\gamma$ obtained from the LMI approach and the value of $K$ obtained from the above formula are the same

## Implementation

A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/LMI_wikibooks

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* -Mathworks reference to DC Gain

# Discrete Time H2 Norm

Discrete-Time H2 Norm
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.
Discrete-Time LTI systems' H2 norm can be found by solving a LMI.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}&A_{d}\in {\bf {{R^{n*n}},}}&B_{d}\in {\bf {{R^{n*m}},}}&C_{d}\in {\bf {{R^{p*n}},}}&D_{d}\in {\bf {{R^{p*m}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d},C_{d},D_{d}),P,Z$.

## The Optimization Problem

The following feasibility problem should be optimized:
$\mu$ is minimized while obeying the LMI constraints.

## The LMI:

Discrete-Time Bounded Real Lemma
The LMI formulation
H2 norm < $\mu$
${\begin{aligned}P\in {S^{n}};Z\in {S^{p}};\mu \in {R_{>0}}\;\\&P>0,&Z>0\\{\begin{bmatrix}P&A_{d}P&B_{d}\\*&P&0\\*&*&I\end{bmatrix}}&>0,\\{\begin{bmatrix}Z&C_{d}P\\*&P\end{bmatrix}}&>0,\\trZ<\mu ^{2}\end{aligned}}$

## Conclusion:

The H2 norm is the minimum value of $\mu \in {R_{>0}}$that satisfies the LMI condition.

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous time H2 norm.

## 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.
* - MATLAB function for the H2 norm.

# Discrete Time Minimum Gain Lemma
## The Concept

The output of the system y(t) is fed back through a sensor measurement F to a comparison with the reference value r(t). The controller C then takes the error e (difference) between the reference and the output to change the inputs u to the system under control P. This is shown in the figure. This kind of controller is a closed-loop controller or feedback controller.
This is called a single-input-single-output (SISO) control system; MIMO (i.e., Multi-Input-Multi-Output) systems, with more than one input/output, are common. In such cases variables are represented through vectors instead of simple scalar values. For some distributed parameter systems the vectors may be infinite-dimensional (typically functions).
If we assume the controller C, the plant P, and the sensor F are linear and time-invariant (i.e., elements of their transfer function C(s), P(s), and F(s) do not depend on time), the systems above can be analysed using the Laplace transform on the variables. This gives the following relations:
    $Y(s)=P(s)U(s)$
    $U(s)=C(s)E(s)$
    $E(s)=R(s)-F(s)Y(s).$
Solving for Y(s) in terms of R(s) gives
    $Y(s)=\left({\frac {P(s)C(s)}{1+P(s)C(s)F(s)}}\right)R(s)=H(s)R(s).$
The expression $H(s)={\frac {P(s)C(s)}{1+F(s)P(s)C(s)}}$ is referred to as the closed-loop transfer function of the system. The numerator is the forward (open-loop) gain from r to y, and the denominator is one plus the gain in going around the feedback loop, the so-called loop gain. If $|P(s)C(s)|\gg 1$, i.e., it has a large norm with each value of s, and if $|F(s)|\approx 1$, then Y(s) is approximately equal to R(s) and the output closely tracks the reference input. This page gives an LMI to reduce the gain so that the ouput closely tracks the reference input.

## The System

Consider a discrete-time LTI system, ${\mathcal {G}}:{\mathcal {l}}_{2e}\rightarrow {\mathcal {l}}_{2e}$, with minimal state-space relization $({\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d},{\mathcal {D}}_{d})$, where ${\mathcal {A}}_{d}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}_{d}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}_{d}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}_{d}\in {\mathcal {R}}^{p\times m}$.
    $x(k+1)={\mathcal {A}}_{d}x(k)+{\mathcal {B}}_{d}u(k)$
    $y(k)={\mathcal {C}}_{d}x(k)+{\mathcal {D}}_{d}u(k),k=0,1...$

## The Data

The matrices ${\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d}$ and ${\mathcal {D}}_{d}$

## LMI : Discrete-Time Minimum Gain Lemma

The system ${\mathcal {G}}$ has minimium gain γ under any of the following equivalent sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ and γ $\in {\mathcal {R}}_{\geq 0}$ where $P\geq 0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P-C_{D}^{T}C_{D}&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}+\gamma ^{2}I-(D_{d}^{T}+D_{d})\end{bmatrix}}\leq 0.$
    2. There exists $P\in {\mathcal {S}}^{n},$ and $\gamma \in {\mathcal {R}}_{\geq 0}$ where $P\geq 0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P-C_{D}^{T}C_{D}&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}&0\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}-(D_{d}^{T}+D_{d})&\gamma I\\0&\gamma I&I\end{bmatrix}}\leq 0.$
$proof$ : Applying the Schur complement lemma to the γ$^2$ term in equation 1 gives equation 2.

## Conclusion:

If there exist a positive definite $P$ for the system ${\mathcal {G}}$, then the minimum gain of the system is γ can be obtaied from above defined LMIs.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability KYP Lemma without Feedthrough

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London

# Modified Discrete Time Minimum Gain Lemma
## The Concept

The output of the system y(t) is fed back through a sensor measurement F to a comparison with the reference value r(t). The controller C then takes the error e (difference) between the reference and the output to change the inputs u to the system under control P. This is shown in the figure. This kind of controller is a closed-loop controller or feedback controller.
This is called a single-input-single-output (SISO) control system; MIMO (i.e., Multi-Input-Multi-Output) systems, with more than one input/output, are common. In such cases variables are represented through vectors instead of simple scalar values. For some distributed parameter systems the vectors may be infinite-dimensional (typically functions).
If we assume the controller C, the plant P, and the sensor F are linear and time-invariant (i.e., elements of their transfer function C(s), P(s), and F(s) do not depend on time), the systems above can be analysed using the Laplace transform on the variables. This gives the following relations:
    $Y(s)=P(s)U(s)$
    $U(s)=C(s)E(s)$
    $E(s)=R(s)-F(s)Y(s).$
Solving for Y(s) in terms of R(s) gives
    $Y(s)=\left({\frac {P(s)C(s)}{1+P(s)C(s)F(s)}}\right)R(s)=H(s)R(s).$
The expression $H(s)={\frac {P(s)C(s)}{1+F(s)P(s)C(s)}}$ is referred to as the closed-loop transfer function of the system. The numerator is the forward (open-loop) gain from r to y, and the denominator is one plus the gain in going around the feedback loop, the so-called loop gain. If $|P(s)C(s)|\gg 1$, i.e., it has a large norm with each value of s, and if $|F(s)|\approx 1$, then Y(s) is approximately equal to R(s) and the output closely tracks the reference input. This page gives an LMI to reduce the gain so that the ouput closely tracks the reference input.

## The System

Consider a discrete-time LTI system, ${\mathcal {G}}:{\mathcal {l}}_{2e}\rightarrow {\mathcal {l}}_{2e}$, with minimal state-space relization $({\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d},{\mathcal {D}}_{d})$, where ${\mathcal {A}}_{d}\in {\mathcal {R}}^{n\times n},{\mathcal {B}}_{d}\in {\mathcal {R}}^{n\times m},{\mathcal {C}}_{d}\in {\mathcal {R}}^{p\times n},$ and ${\mathcal {D}}_{d}\in {\mathcal {R}}^{p\times m}$.
    $x(k+1)={\mathcal {A}}_{d}x(k)+{\mathcal {B}}_{d}u(k)$
    $y(k)={\mathcal {C}}_{d}x(k)+{\mathcal {D}}_{d}u(k),k=0,1...$

## The Data

The matrices ${\mathcal {A}}_{d},{\mathcal {B}}_{d},{\mathcal {C}}_{d}$ and ${\mathcal {D}}_{d}$

## LMI : Discrete-Time Modified Minimum Gain Lemma

The system ${\mathcal {G}}$ has minimium gain γ under any of the following equivalent sufficient conditions.
    1. There exists $P\in {\mathcal {S}}^{n},$ and γ $\in {\mathcal {R}}_{\geq 0}$ where $P\geq 0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}+\gamma ^{2}I-(D_{d}^{T}+D_{d})\end{bmatrix}}$
$Proof$. The term $-C_{d}^{T}C_{d}$ in Discrete Time Minimum Gain Lemma makes the matrix inequality more negative definite. Therefore,
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P-C_{D}^{T}C_{D}&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}+\gamma ^{2}I-(D_{d}^{T}+D_{d})\end{bmatrix}}\leq {\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}+\gamma ^{2}I-(D_{d}^{T}+D_{d})\end{bmatrix}}$
    2. There exists $P\in {\mathcal {S}}^{n},$ and $\gamma \in {\mathcal {R}}_{\geq 0}$ where $P\geq 0$ such that
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P&A_{d}^{T}PB_{d}-C_{d}^{T}D_{d}&0\\(A_{d}^{T}PB_{d}-C_{d}^{T}D_{d})^{T}&B_{d}^{T}PB_{d}-(D_{d}^{T}+D_{d})&\gamma I\\0&\gamma I&I\end{bmatrix}}\leq 0.$
$proof$ : Applying the Schur complement lemma to the γ$^2$ term in equation 1 gives equation 2.

## Conclusion:

If there exist a positive definite $P$ for the system ${\mathcal {G}}$, then the minimum gain of the system γ can be obtaied from above defined LMIs.

## Implementation

Code for implementation of this LMI using MATLAB. https://github.com/VJanand25/LMI

## Related LMIs

KYP Lemma
State Space Stability KYP Lemma without Feedthrough Discrete Time Minimum Gain Lemma

## References

1. J. C. Willems, “Dissipative dynamical systems - part I: General theory,” Archive Rational Mechanics and Analysis, vol. 45, no. 5, pp. 321–351, 1972.
2. D. J. Hill and P. J. Moylan, “The stability of nonlinear dissipative systems,” IEEE Transac- tions on Automatic Control, vol. 21, no. 5, pp. 708–711, 1976.
3. LMI Properties and Applications in Systems, Stability, and Control Theory, by Ryan James Caverly1 and James Richard Forbes2
4. Brogliato B., Maschke B., Lozano R., Egeland O. (2007) Kalman-Yakubovich-Popov Lemma. In: Dissipative Systems Analysis and Control. Communications and Control Engineering. Springer, London

# Discrete-Time Algebraic Riccati Equation

LMIs in Control/Print version

## The System

Consider a Discrete-Time LTI system
    ${\begin{aligned}x_{k+1}=A_{d}x_{k}+B_{d}u_{k}\end{aligned}}$
    ${\begin{aligned}y_{k}=C_{d}x_{k}\end{aligned}}$
Consider A$_d$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^{nxn}$ ; B$_d$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^{nxm}$

## The Data

The Matrices A$_d$ , B$_d$ , C$_d$ , Q, R are given
Q and R should necessarily be Hermitian Matrices.
A square matrix is Hermitian if it is equal to its complex conjugate transpose.

## The Optimization Problem

Our aim is to find
P - Unique solution to the discrete-time algebraic Riccati equation, returned as a matrix.
K - State-feedback gain, returned as a matrix.
The algorithm used to evaluate the State-feedback gain is given by
    ${\begin{aligned}K=(R+B_{d}^{T}PB_{d})^{-1}B_{d}^{T}PA_{d}\end{aligned}}$
L - Closed-loop eigenvalues, returned as a matrix.

## The LMI: Discrete-Time Algebraic Riccati Inequality (DARE)

An algebraic Riccati equation is a type of nonlinear equation that arises in the context of infinite-horizon optimal control problems in continuous time or discrete time
The Discrete-Time Algebraic Riccati Inequality is given by
    ${\begin{aligned}A_{d}^{T}PA_{d}-A_{d}^{T}PB_{d}(R+B_{d}^{T}PB_{d})^{-1}B_{d}^{T}PA_{d}+Q-P\geq 0\end{aligned}}$
P , Q ∈ ${\begin{aligned}\mathbb {S} \end{aligned}}$$^n$ and R ∈ ${\begin{aligned}\mathbb {S} \end{aligned}}$$^m$ where P > 0, Q ≥ 0, R > 0
P is the unknown n by n symmetric matrix and A, B, Q, R are known real coefficient matrices.
The above equation can be rewritten using the Schur Complement Lemma as :
    ${\begin{bmatrix}A_{d}^{T}PA_{d}-P+Q&A_{d}^{T}PB_{d}\\B_{d}^{T}PA_{d}&R+B_{d}^{T}PB_{d}\end{bmatrix}}$${\begin{aligned}\geq 0\end{aligned}}$

## Conclusion:

Algebraic Riccati Inequalities play a key role in LQR/LQG control, H2- and H∞ control and Kalman filtering. We try to find the unique stabilizing solution, if it exists. A solution is stabilizing, if controller of the system makes the closed loop system stable.
Equivalently, this Discrete-Time algebraic Riccati Inequality is satisfied under the following necessary and sufficient condition:
    ${\begin{bmatrix}Q&0&A_{d}^{T}P&P\\0&R&B_{d}^{T}P&0\\PA_{d}&PB_{d}&P&0\\P&0&0&P\end{bmatrix}}$${\begin{aligned}\geq 0\end{aligned}}$

## Implementation

( X in the output corresponds to P in the LMI )
A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/LMI_wikibooks

## Related LMIs

LMI for Continuous-Time Algebraic Riccati Inequality
LMI for Schur Stabilization

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications

# Deduced LMI Conditions for H-infinity Index

H-infinity Index Deduced LMI
Although the KYP Lemma, also known as the Bounded Real Lemma, is a basic condition to evaluate an upper bound on the H$_∞$, the verification of the bound on the H$_∞$-gain of the system can be done via the deduced condition.

## The System

A state-space representation of a linear system as given below:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bw(t)\\y(t)&=Cx(t)+Dw(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $w(t)\in \mathbb {R} ^{r}$ are the system state, output, and the disturbance vector respectively. The transfer function of such a system can be evaluated as:
    ${\begin{aligned}G(s)=C(sI-A)^{-1}B+D\end{aligned}}$

## The Data

Number of states n, number of outputs m and number of external noise channels r need to be known. Moreover, the system matrices A,B,C,D are also required to be known.

## The Feasibility LMI

For an arbitrary $\gamma$, the transfer function G(s) satisfies
    $\left\|G(s)\right\|_{\infty }<\gamma$
if and only if there exists a symmetric matrix X > 0 and a matrix $\Omega .$ such that:
       ${\begin{aligned}{\text{Find}}\;X,\Omega :&\\\Theta +\Phi ^{\top }\Omega \Psi +\Psi ^{\top }\Omega ^{\top }\Phi <0\end{aligned}}$
where:
       ${\begin{aligned}\Theta &={\begin{bmatrix}0&X&0&0&0\\X&-X&0&0&0\\0&0&-\gamma I_{m}&0&0\\0&0&0&-X&0\\0&0&0&0&\gamma I_{r}\end{bmatrix}}\\\Phi &={\begin{bmatrix}-I_{n}&A^{\top }&C^{\top }&I_{n}&0\\0&B^{\top }&D^{\top }&0&-\gamma I_{r}\end{bmatrix}}\\\Psi &={\begin{bmatrix}I_{n}&0&0&0&0\\0&0&0&0&I_{r}\end{bmatrix}}\end{aligned}}$
The above LMI can be combined with the bisection method to find minimum $\gamma$ to find the minimum upper bound on the H$_∞$ gain of $G(s)$.

## Conclusion:

If there is a feasible solution to the aforementioned LMI, then the $\gamma$ upper bounds the infinity norm of the system G(s).

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Deduced_hinf_example.m

## Related LMIs

Bounded Real Lemma

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 5.2.2 pp. 153–156.

# Deduced LMI Conditions for H$_2$ Index

H$_2$ Index Deduced LMI
Although there are ways to evaluate an upper bound on the H$_2$, the verification of the bound on the H$_2$-gain of the system can be done via the deduced condition.

## The System

We consider the generalized Continuous-Time LTI system with the state space realization of $(A,B,C,D)$
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $u(t)\in \mathbb {R} ^{r}$ are the system state, output, and the input vectors respectively.
The transfer function of such a system can be evaluated as:
    ${\begin{aligned}G(s)=C(sI-A)^{-1}B+D\end{aligned}}$

## The Data

The system matrices $A,B,C$ are known.

## The Optimization Problem

For an arbitrary $\gamma >0$(a given scalar), the transfer function satisfies
    $\left\|C(sI-A)^{-1}B+D\right\|_{2}<\gamma$
The H$_2$-norm condition on Transfer function holds only when the matrix A is stable. And this can be conveniently converted to an LMI problem
if and only if 1. There exists a symmetric matrix $X>0$ such that:
$AX+XA^{T}+BB^{T}<0$, $trace(CXC^{T})<\gamma ^{2}$
2. There exists a symmetric matrix $Y>0$ such that:
$AY+YA^{T}+C^{T}C<0$, $trace(B^{T}YB)<\gamma ^{2}$

## The LMI - Deduced Conditions for H2-norm

These deduced condition can be derived from the above equations. According to this
For an arbitrary $\gamma >0$(a given scalar), the transfer function satisfies
    $\left\|G(s)\right\|_{2}<\gamma$
if and only if there exists symmetric matrices $Z$ and $P$; and a matrix $V$ such that
$trace(Z)<\gamma ^{2}$
${\begin{bmatrix}-Z&B^{T}\\B&-P\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
${\begin{bmatrix}-(V+V^{T})&V^{T}A^{T}+P&V^{T}C^{T}&V^{T}\\AV+P&-P&0&0\\CV&0&-I&0\\V&0&0&-P\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
The above LMI can be combined with the bisection method to find minimum $\gamma$ to find the minimum upper bound on the H$_2$ gain of $G(s)$.

## Conclusion:

If there is a feasible solution to the aforementioned LMI, then the $\gamma$ upper bounds the norm of the system G(s).

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the problem, and SeDuMi or MOSEK is required to solve the problem. The following link showcases an example of the problem:
https://github.com/yashgvd/ygovada

## Related LMIs

Bounded Real Lemma
Deduced LMIs for H-infinity index

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications
* 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.

# Dissipativity of Systems

Dissipativity of Systems
The dissipativity of systems is associated with their supply function. In general, a linear system is dissipative if the accumulated sum (integration) of the supply function is non-negative over all the duration of $T\geq 0$.

## The System

A state-space representation of a linear system as given below:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $u(t)\in \mathbb {R} ^{r}$ are the system state, output, and the input vector respectively. A, B, C and D are system coefficient matrices of appropriate dimensions. The control input u is restricted to be a piece-wise continuous vector function defined of $[0,\infty )$.
The transfer function of such a system can be evaluated as:
    ${\begin{aligned}G(s)=C(sI-A)^{-1}B+D\end{aligned}}$
For such a system, a general quadratic supply function is defined as:
       ${\begin{aligned}s(u,y)&={\begin{bmatrix}y&u\end{bmatrix}}Q{\begin{bmatrix}y\\u\end{bmatrix}}\end{aligned}}$
where Q is a real symmetric matrix of (m+r) dimensions. Q need not be either symmetric positive or negative definite.

## The Data

Number of states n, number of outputs m and number of control inputs r need to be known. Moreover, the system matrices A,B,C,D are also required to be known. The system should also be controllable.

## The Feasibility LMI

The system $G(s)$ defined can be evaluated to be dissipative with respect to a supply function $s(u,y)$ iff there exist $P\geq 0$ and a $Q$ (defining $s(u,y)$) such that the following is feasible:
       ${\begin{aligned}{\text{Find}}\;&P,Q:\\&P\geq 0\\{\begin{bmatrix}A^{\top }P+PA&PB\\B^{\top }P&0\end{bmatrix}}&-{\begin{bmatrix}C&D\\0&I\end{bmatrix}}^{\top }Q{\begin{bmatrix}C&D\\0&I\end{bmatrix}}\leq 0.\end{aligned}}$

## Conclusion:

If there is a feasible solution to the aforementioned LMI, then there exists a supply function $s(u,y)$ for which the system $G(s)$ is dissipative. Since the assumption of the system being controllable is required for it to be dissipative, this check can be used of as a sufficient condition to check the controllability of the linear system, just like the feasibility for Lyapunov stability.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Dissipativity_example.m

## Related LMIs

Continuous_Time_Lyapunov_Inequality

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 6.3 pp. 178–184.

# D-Stabilization

$\mathbb {D} _{(q,r)}$-Stabilization
There are a wide variety of control design problems that are addressed in a wide variety of different ways. One of the most important control design problem is that of state feedback stabilization. One such state feedback problem, which will be the main focus of this article, is that of $\mathbb {D} _{(q,r)}$-Stabilization, a form of $\mathbb {D}$-Stabilization where the closed-loop poles are located on the left-half of the complex plane.

## The System

For this particular problem, suppose that we were given a linear system in the form of:
    ${\begin{aligned}\rho x&=Ax+Bu,\\\end{aligned}}$
where $x\in \mathbb {R} ^{n}$, $u\in \mathbb {R} ^{r}$, and $\rho$ represents either the differential operator (in the continuous-time case) or the one-step forward operator (for the discrete-time system case). Then the LMI for determining the $\mathbb {D} _{(q,r)}$-stabilization case would be obtained as described below.

## The Data

In order to obtain the LMI, we need the following 2 matrices: $A{\text{ and }}B$.

## The Optimization Problem

Suppose - for the linear system given above - we were asked to design a state-feedback control law where $u=Kx$ such that the closed-loop system:
    ${\begin{aligned}\rho x&=(A+BK)x\\\end{aligned}}$
is $\mathbb {D} _{(q,r)}$-stable, then the system would be stabilized as follows.

## The LMI: $\mathbb {D} _{(q,r)}$-Stabilization

From the given pieces of information, it is clear that the optimization problem only has a solution if there exists a matrix $W$ and a symmetric matrix $P$ that satisfies the following:
       ${\begin{aligned}{\begin{bmatrix}-rP&&qP+AP+BW\\qP+PA^{T}+{W^{T}}{B^{T}}&&-rP\end{bmatrix}}<0\end{aligned}}$

## Conclusion:

Given the resulting controller matrix $K=WP^{-1}$, it can be observed that the matrix is $\mathbb {D} _{(q,r)}$-stable.

## Implementation

* Example Code - A GitHub link that contains code (titled "DStability.m") that demonstrates how this LMI can be implemented using MATLAB-YALMIP.

## Related LMIs

      * H stabilization - Equivalent LMI for $\mathbb {H} _{(\alpha ,\beta )}$-stabilization.
      * Continuous Time D-Stability Controller - LMI for deriving a Controller using D-Stability.
      * Continuous Time D-Stability Observer - LMI for deriving an Observer using D-Stability.

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - A book co-authored by Guang-Ren Duan and Hai-Hua Yu.

# H-Stabilization

$\mathbb {H} _{(\alpha ,\beta )}$-Stabilization
There are a wide variety of control design problems that are addressed in a wide variety of different ways. One of the most important control design problem is that of state feedback stabilization. One such state feedback problem, which will be the main focus of this article, is that of $\mathbb {H} _{(\alpha ,\beta )}$-Stabilization, a form of $\mathbb {D}$-Stabilization where the real components are located on the left-half of the complex plane.

## The System

For this particular problem, suppose that we were given a linear system in the form of:
    ${\begin{aligned}{\dot {x}}&=Ax+Bu,\\\end{aligned}}$
where $x\in \mathbb {R} ^{n}$ and $u\in \mathbb {R} ^{r}$. Then the LMI for determining the $\mathbb {H} _{(\alpha ,\beta )}$-stabilization case would be obtained as described below.

## The Data

In order to obtain the LMI, we need the following 2 matrices: $A{\text{ and }}B$.

## The Optimization Problem

Suppose - for the linear system given above - we were asked to design a state-feedback control law where $u=Kx$ such that the closed-loop system:
    ${\begin{aligned}{\dot {x}}&=(A+BK)x\\\end{aligned}}$
is $\mathbb {H} _{(\alpha ,\beta )}$ stable, then the system would be stabilized as follows.

## The LMI: $\mathbb {H} _{(\alpha ,\beta )}$-Stabilization

From the given pieces of information, it is clear that the optimization problem only has a solution if there exists a matrix $W$ and a symmetric matrix $P>0$ that satisfy the following:
       ${\begin{aligned}{\begin{cases}AP+P{A^{T}}+BW+{W^{T}}{B^{T}}+2{\alpha }P&<0\\-AP-P{A^{T}}-BW-{W^{T}}{B^{T}}-2{\beta }P&<0\end{cases}}\end{aligned}}$

## Conclusion:

Given the resulting controller matrix $K=WX^{-1}$, it can be observed that the matrix is $\mathbb {H} _{(\alpha ,\beta )}$-stable.

## Implementation

* Example Code - A GitHub link that contains code (titled "HStability.m") that demonstrates how this LMI can be implemented using MATLAB-YALMIP.

## Related LMIs

      * D stabilization - Equivalent LMI for $\mathbb {D} _{(q,r)}$-stabilization.

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - A book co-authored by Guang-Ren Duan and Hai-Hua Yu.

# H-2 Norm of the System

${H_{2}}$-norm of System
The ${H_{2}}$-norm is conceptually identical to the Frobenius (aka Euclidean) norm on a matrix. It can be used to determine whether the system representation can be reduced to its simplest form, thereby allowing its use in performing effective block-diagram algebra.

## The System

Suppose we define the state-space system$G:{L_{2}}\rightarrow {L_{2}}{\text{ by }}y=Gu$ if:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\\\end{aligned}}$
where $A\in \mathbb {R} ^{mxm}$, $B\in \mathbb {R} ^{mxn}$, $C\in \mathbb {R} ^{pxm}$, and $D\in \mathbb {R} ^{qxn}$ for any $t\in \mathbb {R}$. Then the ${H_{2}}$-norm of the system can be determined as described below.

## The Data

In order to determine the ${H_{2}}$-norm of the system, we need the matrices ${A}$, ${B}$, and ${C}$.

## The Optimization Problem

Suppose we wanted to to infer properties of the system behaviour (which is represented in the form (A,B,C,D)). Then it becomes necessary to ensure that the overall system forms an algebra, as the standard use of block-diagram algebra would otherwise be invalid. The only way this is possible is by calculating ${H_{2}}$ and/or ${H_{\infty }}$-norms - both of which are signal norms that (in a certain sense) measure the size of the transfer function.

## The LMI: The $H_{2}$ Norm

Assuming that ${\hat {P}}(s)=C(sI-A)^{-1}B$, this means that the following are equivalent:
       $1)\quad A{\text{ is Hurwitz and }}||{\hat {P}}||_{H_{2}}^{2}<\gamma$
       $2){\begin{aligned}{\begin{cases}trace(CXC^{T})&<\gamma \\AX+XA^{T}+BB^{T}&<0\\X&>0\end{cases}}\end{aligned}}$

## Conclusion:

The LMI can be used to minimize the ${H_{2}}$-norm of the system. It is worth noting that a finite ${H_{2}}$-norm does not guarantee finite ${H_{\infty }}$-norm, and that in order for the block diagram algebra to be valid, ${H_{\infty }}$-norm must be finite.

## Implementation

* Example Code - A GitHub link that contains code (titled "H2Norm.m") that demonstrates how this LMI can be implemented using MATLAB-YALMIP.

## Related LMIs

      * $H_{2}$-Filtering - LMI for $H_{2}$-Filtering
      * Discrete-Time $H_{2}$ Norm - LMI for $H_{2}$-norm in the Discrete-Time case.

## 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.

# Algebraic Riccati Equation

Algebraic Riccati Equations are particularly significant in Optimal Control, filtering and estimation problems. The need to solve such equations is common in the analysis and linear quadratic Gaussian control along with general Control problems. In one form or the other, Riccati Equations play significant roles in optimal control of multivariable and large-scale systems, scattering theory, estimation, and detection processes. In addition, closed forms solution of Riccti Equations are intractable for two reasons namely; one, they are nonlinear and two, are in matrix forms.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\\end{aligned}}$

## The Data

Following matrices are needed as Inputs:.
    $A,B,N$.

## The Optimization Problem

In control systems theory, many analysis and design problems are closely related to Riccati algebraic equations or inequalities. Find

## The LMI: Algebraic Riccati Inequality

Title and mathematical description of the LMI formulation.
       P>0, Q>0, R>0. The Algebraic Riccati inequality is given byA$^T$P+PA−(PB+N$^T$)R$^−$1(B$^T$P+N)+Q≥0 can be written using the Schur complement lemma as[A$^T$P+PA+QPB+N$^T$⋆R]≥0{\textstyle {\begin{aligned}P>0, \\Q>0, \\R>0.\\{\text{ The Algebraic Riccati inequality is given by}}\;\\A^{T}P+PA-(PB+N^{T})R^{-}1(B^{T}P+N)+Q&\geq 0\\\\{\text{ can be written using the Schur complement lemma as}}\;\\{\begin{bmatrix}A^{T}P+PA+Q&&PB+N^{T}\\\star &&R\\\end{bmatrix}}&\geq 0\end{aligned}}}

## Conclusion:

If the solution exists, LMIs give a unique, stabilizing, symmetric matrix P.

## Implementation:

Matlab code for this LMI in the Github repository:
* REDIRECT- CODE

## External links

* -Optimal Solution to Matrix Riccati Equation
* https://https://arxiv.org/abs/1903.08599/ LMI Properties and Applications in Systems, Stability, and Control Theory.- - A List of LMIs by Ryan Caverly and James Forbes

# System Zeros without feedthrough

Let's say we have a transfer function defined as a ratio of two polynomials: ${\begin{aligned}H(s)={\frac {N(s)}{D(s)}}\\\end{aligned}}$ Zeros are the roots of N(s) (the numerator of the transfer function) obtained by setting $N(s)=0$ and solving for s.The values of the poles and the zeros of a system determine whether the system is stable, and how well the system performs. Similarly, the system zeros are either real or appear in complex conjugate pairs. In the case of system zeros without feedthrough, we take the assumption that $D=0$.

## The System

Consider a continuous-time LTI system, $G$ , with minimal statespace representation $(A,B,C,0)$
       ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\y(t)=Cx(t)\end{aligned}}$

## The Data

The matrices:
    ${\begin{aligned}A\in \mathbb {R} ^{n\times n}\\M\in \mathbb {R} ^{n\times q}\\N\in \mathbb {R} ^{q\times n}\\\end{aligned}}$

## The LMI: System Zeros without feedthrough

The transmission zeros of $G(s)=C(sI-A)^{-}1B$ are the eigenvalues of $NAM$, where $N\in \mathbb {R} ^{q\times n},M\in \mathbb {R} ^{n\times q},CM=0,NB=0,NM=1.$. Therefore , $G(s)$ is a minimum phase if and only if there exists $P\in \mathbb {S} ^{q}$, where $P>0$ such that
       ${\begin{aligned}PNAM+M^{T}A^{T}N^{T}P<0\end{aligned}}$

## Conclusion:

If P exists, it ensures non-minimum phase. Eigenvalues of NAM then gives the zeros of the system.

## Implementation

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

## 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.
* Control_Systems/Poles_and_Zeros

# System zeros with feedthrough

Let's say we have a transfer function defined as a ratio of two polynomials: ${\begin{aligned}H(s)={\frac {N(s)}{D(s)}}\\\end{aligned}}$ Zeros are the roots of N(s) (the numerator of the transfer function) obtained by setting $N(s)=0$ and solving for s.The values of the poles and the zeros of a system determine whether the system is stable, and how well the system performs. Similarly, the system zeros are either real or appear in complex conjugate pairs. In the case of system zeros with feedthrough, we take $D$ as full rank.

## The System

Consider a continuous-time LTI system, $G$ , with minimal statespace representation $(A,B,C,D)$
       ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\y(t)=Cx(t)+Du\end{aligned}}$

## The Data

The matrices needed as inputs are:
    ${\begin{aligned}A\in \mathbb {R} ^{n\times n}\\B\in \mathbb {R} ^{n\times m}\\N\in \mathbb {R} ^{p\times n}\\\end{aligned}}$
In this case, $m\leq p$

## The LMI: System Zeros with feedthrough

The transmission zeros of $G(s)=C(sI-A)^{-}1B+D$ are the eigenvalues of $A-B(D^{T}D)^{-1}D^{T}C$. Therefore , $G(s)$ is a minimum phase if and only if there exists $P\in \mathbb {S} ^{q}$, where $P>0$ such that
       ${\begin{aligned}P(A-B(D^{T}D)^{-1}D^{T}C)+(A-B(D^{T}D)^{-1}D^{T}C)^{T}P<0\\\end{aligned}}$

## Conclusion:

If P exists, it ensures non-minimum phase. Eigenvalues of $A-B(D^{T}D)^{-1}D^{T}C$ then gives the zeros of the system.

## Related LMIs

LMIs_in_Controls/pages/systemzeroswithoutfeedthrough

## Implementation

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

## 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.
* Control_Systems/Poles_and_Zeros

# Negative Imaginary Lemma

LMIs in Control/Print version Positive real systems are often related to systems involving energy dissipation. But the standard Positive real theory will not be helpful in establishing closed-loop stability. However transfer functions of systems with a degree more than one can be satisfied with the negative imaginary conditions for all frequency values and such systems are called "systems with negative imaginary frequency response" or "negative imaginary systems".

## The System

Consider a square continuous time Linear Time invariant system, with the state space realization $(A,B,C,D)$
    ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\y=Cx(t)+Du(t)\end{aligned}}$

## The Data

$A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},C\in \mathbb {R} ^{m\times n},D\in \mathbb {S} ^{m}$

## The LMI: LMI for Negative Imaginary Lemma

According to the Lemma, The aforementioned system is negative imaginary under either of the following equivalent necessary and sufficient conditions
* There exists a $P$ ∈ ${\begin{aligned}\mathbb {S} \end{aligned}}$$^n$,where $P\geq 0$, such that,
    ${\begin{bmatrix}A^{T}P+PA&PB-A^{T}C^{T}\\B^{T}P-CA&-(CB+B^{T}C^{T})\end{bmatrix}}$${\begin{aligned}\leq 0\end{aligned}}$
* There exists a $Q$ ∈ ${\begin{aligned}\mathbb {S} \end{aligned}}$$^n$,where $Q\geq 0$, such that,
    ${\begin{bmatrix}QA^{T}+AQ&B-QA^{T}C^{T}\\B^{T}-CAQ&-(CB+B^{T}C^{T})\end{bmatrix}}$${\begin{aligned}\leq 0\end{aligned}}$

## Conclusion

The system is strictly negative if det($A$) $\neq$ 0 and either of the above LMIs are feasible with resulting $P>0$ or $Q>0$

## Implementation

A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/ygovada

## Related LMIs

Positive Real Lemma

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* Xiong, Junlin & Petersen, Ian & Lanzon, Alexander. (2010). A Negative Imaginary Lemma and the Stability of Interconnections of Linear Negative Imaginary Systems.

# Small Gain Theorem

LMIs in Control/Matrix and LMI Properties and Tools/Small Gain Theorem
The Small Gain Theorem provides a sufficient condition for the stability of a feedback connection.

## Theorem

Suppose $B$ is a Banach Algebra and $Q\in B$. If $\|Q\|<1$, then $(I-Q)^{-1}$ exists, and furthermore,

## Proof

Assuming we have an interconnected system $(G,K)$:
$y_{1}=G(u_{1}-y_{2})$ and, $y_{2}=K(u_{2}-y_{1})$
The above equations can be represented in matrix form as
${\begin{aligned}{\begin{bmatrix}I&0\\0&I\end{bmatrix}}{\begin{bmatrix}y_{1}\\y_{2}\end{bmatrix}}&={\begin{bmatrix}\ 0&-G\\\ -K&0\\\end{bmatrix}}{\begin{bmatrix}y_{1}\\y_{2}\end{bmatrix}}+{\begin{bmatrix}G&0\\0&K\end{bmatrix}}{\begin{bmatrix}u_{1}\\u_{2}\end{bmatrix}}\end{aligned}}$
Making ${\begin{bmatrix}y_{1}&y_{2}\end{bmatrix}}^{T}$ the subject, we then have:
${\begin{aligned}{\begin{bmatrix}y_{1}\\y_{2}\end{bmatrix}}&={\begin{bmatrix}\ I&G\\\ K&I\\\end{bmatrix}}^{-1}{\begin{bmatrix}G&0\\0&K\end{bmatrix}}{\begin{bmatrix}u_{1}\\u_{2}\end{bmatrix}}&={\begin{bmatrix}\ (I-GK)^{-1}G&-G(I-KG)^{-1}K\\\ -K(I-GK)^{-1}G&(I-KG)^{-1}K\\\end{bmatrix}}{\begin{bmatrix}u_{1}\\u_{2}\end{bmatrix}}\end{aligned}}$
If $(I-GK)^{-1}$ is well-behaved, then the interconnection is stable. For $(I-GK)^{-1}$ to be well-behaved, $\|(I-GK)^{-1}\|$ must be finite.
Hence, we have $\|(I-GK)^{-1}\|<\infty$
$\|G\|\|K\|=\|Q\|$ and $\|Q\|<I$ for the higher exponents of $\|Q\|$ to converge to $0.$

## Conclusion

If $\|Q\|<1$, then this implies stability, since the higher exponents of $Q$ in the summation of $\sum _{k=0}^{\infty }Q^{k}$ will converge to $0$, instead of blowing up to infinity.

## 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.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# Tangential Nevanlinna-Pick Interpolation
## Tangential Nevanlinna-Pick

The Tangential Nevanlinna-Pick arises in multi-input, multi-output (MIMO) control theory, particularly $H_{\infty }$ robust and optimal control.
The problem is to try and find a function $H:C\to C^{pxq}$ which is analytic in $C_{+}$ and satisfies ‌ $H({\lambda }_{i})u_{i}=v_{i},$   $i=1,...,m$   with $||H||_{\infty }\leq 1$ $(1)$

## The System

$N_{(ij)}$ is a set of $pxq$ matrix valued Nevanlinna functions. The matrix valued function H({\lambda}) analytic on the open upper half plane is a Nevanlinna function if $Im(H({\lambda }))\geq 0$ $({\lambda }\in {\pi }^{+})$.

## The Data

Given: ‌ Initial sequence of data points on real axis ${\lambda }_{1},...,{\lambda }_{m}$ with ${\lambda }_{i}\in C_{+}{\widehat {=}}(s|Re(s)>0)$, ‌ And two sequences of row vectors containing distinct target points $u_{1},....,u_{m}$ with $u_{i}\in C^{q}$, and $v_{1},...,v_{m}$ with $v_{i}\in C^{p},i=1,...,m$.

## The LMI: Tangential Nevanlinna- Pick

Problem (1) has a solution if and only if the following is true:

##### Nevanlinna-Pick Approach

$N_{ij}=$ ${\frac {u_{i}^{\ast }u_{j}-v_{i}^{\ast }v_{j}}{\ {\lambda }_{i}^{\ast }+{\lambda }_{j}}}$ ‌

##### Lyapunov Approach

N can also be found using the Lyapunov equation:
$A^{\ast }N+NA-(U^{\ast }U-V^{\ast }V)=0$
where $A=diag({\lambda }_{1},...,{\lambda }_{m}),U=[u_{1}...u_{m}],V=[v1...vm]$
The tangential Nevanlinna-Pick problem is then solved by confirming that $N\geq 0$.

## Conclusion:

If $N_{(ij)}$ is positive (semi)-definite, then there exists a norm-bounded analytic function, $H$ which satisfies $H({\lambda }_{i})u_{i}=v_{i},$  $i=1,...,m$   with $||H||_{\infty }\leq 1$

## Implementation

Implementation requires YALMIP and a linear solver such as sedumi. - MATLAB code for Tangential Nevanlinna-Pick Problem.

## Related LMIs

Nevalinna-Pick Interpolation with Scaling

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* Generalized Interpolation in $H_{\infty }$ by Donald Sarason.
* Tangential Nevanlinna-Pick Interpolation Problem With Boundary Nodes in the Nevanlinna Class And The Related Moment Problem by Yong Jian Hu and Xiu Ping Zhang.

# Nevanlinna-Pick Interpolation with Scaling
## Nevanlinna-Pick Interpolation with Scaling

The Nevanlinna-Pick problem arises in multi-input, multi-output (MIMO) control theory, particularly $H_{\infty }$ robust and optimal controller synthesis with structured perturbations.
The problem is to try and find ${\gamma }_{opt}=inf(||DHD^{-1}||_{\infty })$ such that $H$ is analytic in $C_{+},$   $D=D^{\ast }>0,$ and $D\in \mathbb {D}$ define the scaling, and finally, ‌ $H({\lambda }_{i})u_{i}=v_{i}$   $i=1,...,m$   $(1)$

## The System

The scaling factor $\mathbb {D}$ is given as a set of $mxm$ block-diagonal matrices with specified block structure. The matrix valued function H({\lambda}) analytic on the open upper half plane is a Nevanlinna function if $Im(H({\lambda }))\geq 0$ $({\lambda }\in {\pi }^{+})$. The Nevanlinna LMI matrix $N$ is defined as $N=G_{in}-G_{out}$. The matrix $A$ is a diagonal matrix of the given sequence of data points ${\lambda }_{i}\in \mathbb {C} (A=diag({\lambda }_{1},...,{\lambda }_{m})$

## The Data

Given: ‌ Initial sequence of data points in the complex plane ${\lambda }_{1},...,{\lambda }_{m}$ with ${\lambda }_{i}\in C_{+}{\widehat {=}}(s|Re(s)>0)$. ‌ Two sequences of row vectors containing distinct target points $u_{1},....,u_{m}$ with $u_{i}\in C^{q}$, and $v_{1},...,v_{m}$ with $v_{i}\in C^{p},i=1,...,m$.

## The LMI: Nevanlinna- Pick Interpolation with Scaling

First, implement a change of variables for $P=D^{\ast }D$ and $N=G_{in}-G_{out}$.
From this substitution it can be concluded that ${\gamma }_{opt}$ is the smallest positive ${\gamma }$ such that there exists a $P>0,P\in \mathbb {D}$ such that the following is true:
$A^{\ast }G_{in}+G_{in}A-U^{\ast }PU=0$,
$A^{\ast }G_{out}+G_{out}A-V^{\ast }PV=0$,
${\gamma }^{2}G_{in}-G_{out}\geq 0$

## Conclusion:

If the LMI constraints are met, then there exists a $H_{\infty }$ norm-bounded optimal gain ${\gamma }$ which satisfies the scaled Nevanlinna-Pick interpolation objective defined above in Problem (1).

## Implementation

Implementation requires YALMIP and Mosek. - MATLAB code for Nevanlinna-Pick Interpolation.

## Related LMIs

Nevalinna-Pick Interpolation

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* Generalized Interpolation in $H_{\infty }$.

# Generalized $H_{2}$ Norm
## Generalized $H_{2}$ Norm

The $H_{2}$ norm characterizes the average frequency response of a system. To find the H2 norm, the system must be strictly proper, meaning the state space represented $D$ matrix must equal zero. The H2 norm is frequently used in optimal control to design a stabilizing controller which minimizes the average value of the transfer function, $G$ as much as possible. This optimal control problem is also called the Linear Quadratic Gaussian.

## The System

Consider a continuous-time, linear, time-invariant system $G:L_{2e}\to L_{2e}$ with state space realization $(A,B,C,0)$ where $A\in \mathbb {R} ^{n\times n}$, $B\in \mathbb {R} ^{n\times m}$, $C\in \mathbb {R} ^{p\times n}$, amd $A$ is Hurwitz. The generalized $H_{2}$ norm of $G$ is:
$\left\|G\right\|_{2,{\infty }}=\sup _{u\in L_{2},{u}\neq {\text{zero}}}$ ${\frac {\left\|Gu\right\|_{\infty }}{\ \left\|u\right\|_{2}}}$

## The Data

The transfer function $G$, and system matrices $A$, $B$, $C$ are known and $A$ is Hurwitz.

## The LMI: Generalized $H_{2}$ Norm LMIs

The inequality $\left\|G\right\|_{2,{\infty }}<\mu$ holds under the following conditions:
1. There exists $P\in \mathbb {S} ^{n}$ and $\mu \in \mathbb {R} _{>0}$ where $P>0$ such that:
       ${\begin{bmatrix}A^{T}P+PA&PB\\*&-\mu 1\end{bmatrix}}<0$.
       ${\begin{bmatrix}P&C^{T}\\*&\mu 1\end{bmatrix}}>0$.
2. There exists $Q\in \mathbb {S} ^{n}$ and $\mu \in \mathbb {R} _{>0}$ where $Q>0$ such that:
       ${\begin{bmatrix}QA^{T}+AQ&B\\*&-\mu 1\end{bmatrix}}<0$.
       ${\begin{bmatrix}Q&QC^{T}\\*&\mu 1\end{bmatrix}}>0$.
3. There exists $P\in \mathbb {S} ^{n},V\in \mathbb {R} ^{n\times n}$ and $\mu \in \mathbb {R} _{>0}$ where $P>0$ such that:
       ${\begin{bmatrix}-(V+V^{T})&V^{T}A+P&V^{T}B&V^{T}\\*&-P&0&0\\*&**-\mu 1&0\\*&*&*&-P\end{bmatrix}}<0$.
       ${\begin{bmatrix}P&C^{T}\\*&\mu 1\end{bmatrix}}>0$.

## Conclusion:

The generalized $H_{2}$ norm of $G$ is the minimum value of $\mu \in \mathbb {R} _{>0}$ that satisfies the LMIs presented in this page.

## Implementation

This implementation requires Yalmip and Sedumi.
Generalized $H_{2}$ Norm - MATLAB code for Generalized $H_{2}$ Norm.

## Related LMIs

LMI for System H_{2} Norm

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013.

# Passivity and Positive Realness

This section deals with passivity of a system.

## The System

Given a state-space representation of a linear system
    ${\begin{aligned}\ {\dot {x}}=Ax+Bu\\\ y=Cx+Du\\\end{aligned}}$
$x\in \mathbb {R} ^{n},y\in \mathbb {R} ^{m},u\in \mathbb {R} ^{r}$ are the state, output and input vectors respectively.

## The Data

$A,B,C,D$ are system matrices.

## Definition

The linear system with the same number of input and output variables is called passive if
    ${\begin{aligned}\int \limits _{0}^{T}u^{T}y(t)dt\geq 0\\\end{aligned}}$         (1)
hold for any arbitrary $T\geq 0$, arbitrary input $u(t)$, and the corresponding solution $y(t)$ of the system with $x(0)=0$. In addition, the transfer function matrix
    ${\begin{aligned}G(s)&=C(sI-A)^{-1}B+D\\\end{aligned}}$         (2)
of system is called is positive real if it is square and satisfies
    ${\begin{aligned}\ G^{H}(s)+G(s)\geq 0\forall s\in \mathbb {C} ,Re(s)>0\\\end{aligned}}$         (3)

## LMI Condition

Let the linear system be controllable. Then, the system is passive if an only if there exists $P>0$ such that
    ${\begin{aligned}\ {\begin{bmatrix}A^{T}P+PA&PB-C^{T}\\B^{T}P-C&-D^{T}-D\end{bmatrix}}\leq 0\\\end{aligned}}$         (4)

## Implementation

This implementation requires Yalmip and Mosek.
* https://github.com/ShenoyVaradaraya/LMI--master/blob/main/Passivity.m

## Conclusion

Thus, it is seen that passivity and positive-realness describe the same property of a linear system, one gives the time-domain feature and the other provides frequency-domain feature of this property.

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & Francis Group, 2013

# Non-expansivity and Bounded Realness

This section studies the non-expansivity and bounded-realness of a system.

## The System

Given a state-space representation of a linear system
    ${\begin{aligned}\ {\dot {x}}=Ax+Bu\\\ y=Cx+Du\\\end{aligned}}$
$x\in \mathbb {R} ^{n},y\in \mathbb {R} ^{m},u\in \mathbb {R} ^{r}$ are the state, output and input vectors respectively.

## The Data

$A,B,C,D$ are system matrices.

## Definition

The linear system with the same number of input and output variables is called non-expansive if
    ${\begin{aligned}\int \limits _{0}^{T}y^{T}y(t)dt\geq \int \limits _{0}^{T}u^{T}u(t)dt\\\end{aligned}}$         (1)
hold for any arbitrary $T\geq 0$, arbitrary input $u(t)$, and the corresponding solution $y(t)$ of the system with $x(0)=0$. In addition, the transfer function matrix
    ${\begin{aligned}G(s)&=C(sI-A)^{-1}B+D\\\end{aligned}}$         (2)
of system is called is positive real if it is square and satisfies
    ${\begin{aligned}\ G^{H}(s)+G(s)\geq I\forall s\in \mathbb {C} ,Re(s)>0\\\end{aligned}}$         (3)

## LMI Condition

Let the linear system be controllable. Then, the system is bounded-real if an only if there exists $P>0$ such that
    ${\begin{aligned}\ {\begin{bmatrix}A^{T}P+PA&PB&C^{T}\\B^{T}P&-I&D^{T}\\C&D&-I\end{bmatrix}}<0\\\end{aligned}}$         (4)
and
    ${\begin{aligned}\ {\begin{bmatrix}PA+A^{T}P+C^{T}C&PB+C^{T}D\\B^{T}P+D^{T}C&D^{T}D-I\end{bmatrix}}<0\\\end{aligned}}$         (5)

## Implementation

This implementation requires Yalmip and Mosek.
* https://github.com/ShenoyVaradaraya/LMI--master/blob/main/bounded_realness.m

## Conclusion:

Thus, it is seen that passivity and positive-realness describe the same property of a linear system, one gives the time-domain feature and the other provides frequency-domain feature of this property.

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & Francis Group, 2013

# Change of Subject

LMIs in Control/Matrix and LMI Properties and Tools/Change of Subject
A Bilinear Matrix Inequality (BMI) can sometimes be converted into a Linear Matrix Inequality (LMI) using a change of variables. This is a basic mathematical technique of changing the position of variables with respect to equal signs and the inequality operators. The change of subject will be demonstrated by the example below.

## Example

Consider $A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},K\in \mathbb {R} ^{m\times n}$, and $Q\in \mathbb {S} ^{n}$, where $Q>0$.
The matrix inequality given by:
$QA^{T}+AQ-QK^{T}B{T}-BKQ<0$ is bilinear in the variables $Q$ and $K$.
Defining a change of variable as $F=KQ$ to obtain
$QA^{T}+AQ+-F^{T}B^{T}-BF<0$,
which is an LMI in the variables $Q$ and $F$.
Once this LMI is solved, the original variable can be recovered by $K=FQ^{-1}$.

## Conclusion

It is important that a change of variables is chosen to be a one-to-one mapping in order for the new matrix inequality to be equivalent to the original matrix inequality. The change of variable $F=KQ$ from the above example is a one-to-one mapping since $Q^{-1}$ is invertible, which gives a unique solution for the reverse change of variable $K=FQ^{-1}$.

## 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.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A downloadable book on LMIs by Ryan James Caverly and James Richard Forbes.

# Congruence Transformation

LMIs in Control/Matrix and LMI Properties and Tools/Congruence Transformation
This methods uses change of variable and some matrix properties to transform Bilinear Matrix Inequalities to Linear Matrix Inequalities. This method preserves the definiteness of the matrices that undergo the transformation.

## Theorem

Consider $Q\in \mathbb {S} ^{n},W\in \mathbb {R} ^{n\times n}$, where $\operatorname {rank} (W)=n$. The matrix inequality $Q<0$ is satisfied if and only if $WQW^{T}<0$ or equivalently, $W^{T}QW<0$.

## Example

Consider $A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},K\in \mathbb {R} ^{m\times p},C^{T}\in \mathbb {R} ^{n\times p},P\in \mathbb {S} ^{n}$ and $V\in \mathbb {S} ^{p}$, where $P>0$ and $V>0$. The matrix inequality given by
${\begin{aligned}\ Q&={\begin{bmatrix}\ A^{T}P+PA&-PBK+C^{T}V\\\ *&-2V\\\end{bmatrix}}\ <0,\end{aligned}}$
is linear in variable $V$ and bilinear in the variable pair $(P.K)$. Choose the matrix $\operatorname {diag} (P^{-1},V^{-1})$ to obtain the equivalent BMI given by
${\begin{aligned}\ WQW^{T}&={\begin{bmatrix}\ P^{-1}A^{T}+AP^{-1}&-BKV^{-1}+P^{-1}C^{T}\\\ *&-2V^{-1}\\\end{bmatrix}}\ <0,\end{aligned}}$
Using a change of variable $X=P^{-1},U=V^{-1}$ and $F=KV^{-1}$, the above equation becomes
${\begin{aligned}\ WQW^{T}&={\begin{bmatrix}\ XA^{T}+AX&-BF+XC^{T}\\\ *&-2U\\\end{bmatrix}}\ <0,\end{aligned}}$
which is an LMI of variables $X,U$ and $F$. The original variable $K$ is recovered by doing a reverse change of variable $K=FU^{-1}$.

## Conclusion

A congruence transformation preserves the definiteness of a matrix by ensuring that $Q<0$ and $W^{T}QW<0$ are equivalent. A congruence transformation is related, but not equivalent to a similarity transformation $TQT^{-1}$, which preserves not only the definiteness, but also the eigenvalues of a matrix. A congruence transformation is equivalent to a similarity transformation in the special case when $W^{T}=W^{-1}$.

## 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.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A downloadable book on LMIs by Ryan James Caverly and James Richard Forbes.

# Finsler's Lemma

LMIs in Control/Matrix and LMI Properties and Tools/Finsler's Lemma
This method It states equivalent ways to express the positive definiteness of a quadratic form Q constrained by a linear form L. It is equivalent to other lemmas used in optimization and control theory, such as Yakubovich's S-lemma, Finsler's lemma and it is wedely used in Linear Matrix Inequalities

## Theorem

Consider $\Psi \in \mathbb {S} ^{n},G\in \mathbb {R} ^{n\times m},\mathrm {A} \in \mathbb {R} ^{m\times p},H\in \mathbb {R} ^{n\times p}$and $\sigma \in \mathbb {R}$. There exists $\mathrm {A}$ such that
$\Psi +G\mathrm {A} H^{T}+H\mathrm {A} ^{T}G^{T}<0,$
if and only if there exists $\sigma$ such that
$\Psi -\sigma GG^{T}<0$
$\Psi -\sigma HH^{T}<0$

## Alternative Forms of Finsler's Lemma

Consider $\Psi \in \mathbb {S} ^{n},Z\in \mathbb {R} ^{p\times n},x\in \mathbb {R} ^{n}$and $\sigma \in \mathbb {R} _{>0}$. If there exists $Z$ such that
$x^{T}\Psi x,0$
holds for all $x$ ≠ $0$ satisfying $Zx=0$, then there exists $\sigma$ such that
$\Psi -\sigma Z^{T}Z<0$

## Modified Finsler's Lemma

Consider $\Psi \in \mathbb {S} ^{n},G\in \mathbb {R} ^{n\times m},\mathrm {A} \in \mathbb {R} ^{m\times p},H\in \mathbb {R} ^{n\times p}$and $\epsilon \in \mathbb {R} _{>0}$, where $\mathrm {A} ^{T}\mathrm {A}$ is less that on equal to $\mathbb {R}$, and $R>0$. There exists $\mathrm {A}$ such that
$\Psi +G\mathrm {A} H^{T}+H\mathrm {A} ^{T}G^{T}{T}<0,$
there exists $\epsilon$ such that
$\Psi +\epsilon ^{-1}GG^{T}+\epsilon HRH^{T}<0.$

## Conclusion

In summary, a number of identical methods have been stated above to determine the positive definiteness of LMIs.

## 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.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A downloadable book on LMIs by Ryan James Caverly and James Richard Forbes.

# D-Stability

      * Continuous Time D-Stability Observer

# Time-Delay Systems

      * Delay Dependent Time-Delay Stabilization
      * Delay Independent Time-Delay Stabilization

# Parametric, Norm-Bounded Uncertain System Quadratic Stability

LMIs in Control/Print version
Given a system with matrices A,M,N,Q the quadratic stability of the system with parametric, norm-bounded uncertainty can be determined by the following LMI. The feasibility of the LMI tells if the system is quadratically stable or not.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Mp(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+Qp(t),&&\Delta \in \mathbf {\Delta } \;:=\{\Delta \in \mathbb {R} ^{n\times n}:\|\Delta \|\leq 1\}\\\end{aligned}}$

## The Data

The matrices $A,M,N,Q$.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0,\mu \geq 0:\\{\begin{bmatrix}AP+PA^{T}&PN^{T}\\NP&0\end{bmatrix}}+\mu {\begin{bmatrix}MM^{T}&MQ^{T}\\QM^{T}&QQ^{T}-I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

The system above is quadratically stable if and only if there exists some mu >= 0 and P > 0 such that the LMI is feasible.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Stability of Structured, Norm-Bounded Uncertainty
Stability under Arbitrary Switching
Quadratic Stability Margins

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

# Stability of Structured, Norm-Bounded Uncertainty

LMIs in Control/Print version
Given a system with matrices A,M,N,Q with structured, norm-bounded uncertainty, the stability of the system can be found using the following LMI. The LMI takes variables P and $\Theta$ and checks for a feasible solution.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Mp(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+Qp(t),&&\Delta \in {\bf {{\Delta }\;,||\Delta ||\leq 1}}\\\end{aligned}}$

## The Data

The matrices $A,M,N,Q$.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0:\\{\begin{bmatrix}AP+PA^{T}&PN^{T}\\NP&0\end{bmatrix}}+{\begin{bmatrix}M\Theta M^{T}&M\Theta Q^{T}\\Q\Theta M^{T}&Q\Theta Q^{T}-\Theta \end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

${\begin{aligned}{\text{The system above is quadratically stable if and only if there exists some }}\Theta \in P\Theta {\text{ and }}P>0{\text{ such that the LMI is feasible.}}\end{aligned}}$

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Parametric, Norm-Bounded Uncertain System Quadratic Stability
Stability under Arbitrary Switching
Quadratic Stability Margins

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

# Stability under Arbitrary Switching

LMIs in Control/Stability Analysis/Continuous Time/Stability under Arbitrary Switching
Using the LMI below, find a P matrix that fits the constraints. If there exists one, then the system can switch between subsystems $A_{1}$ and $A_{2}$ arbitrarily and remain stable.

## The System

    ${\begin{aligned}{\dot {x}}(t)\in \{A_{1}x(t),A_{2}x(t)\}\end{aligned}}$

## The Data

The matrices $A_{1}\in R^{n\times n},A_{2}\in R^{n\times n}$.

## The LMI

       ${\begin{aligned}{\text{Find}}\;&P>0:\\A_{1}^{T}P+PA_{1}<0{\text{ and }}\\A_{2}^{T}P+PA_{2}<0\end{aligned}}$

## Conclusion

The switched system is stable under arbitrary switching if there exists some P > 0 such that the LMIs hold.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Parametric, Norm-Bounded Uncertain System Quadratic Stability
Stability of Structured, Norm-Bounded Uncertainty
Quadratic Stability Margins

## External links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

# Quadratic Stability Margins

LMIs in Control/Print version
${\begin{aligned}{\text{The quadratic stability margin of the system is defined as the largest }}\alpha \geq 0{\text{ for which the system is quadratically stable.}}{\text{This LMI applies for systems with norm-bounded uncertainty.}}\end{aligned}}$

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{p}p(t),&&p^{T}p\leq \alpha ^{2}x^{T}C_{q}^{T}C_{q}x\\\end{aligned}}$

## The Data

The matrices $A,B_{p},C_{q}$.

## The Optimization Problem

${\text{Maximize }}\beta =\alpha ^{2}{\text{ subject to the LMI constraint.}}$

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P,\lambda ,{\text{ and }}\beta =\alpha ^{2}:\\{\begin{bmatrix}A^{T}P+PA+\beta \lambda C_{q}^{T}C_{q}&PB_{p}\\B_{p}^{T}P&-\lambda I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

If there exists an $\alpha \geq 0$ then the system is quadratically stable, and the stability margin is the largest such $\alpha$.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Parametric, Norm-Bounded Uncertain System Quadratic Stability
Stability of Structured, Norm-Bounded Uncertainty
Stability under Arbitrary Switching

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# Stability of Linear Delayed Differential Equations
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+\sum _{i=1}^{L}A_{i}x(t-\tau _{i}),\\\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$ and $\tau _{i}>0$.

## The Data

The matrices $A,\{A_{i}.\tau _{i}\}_{i=1}^{L}$.

## The LMI:

Solve the following LMIP
       ${\begin{aligned}&{\text{Find}}\{P\succ 0,P_{1}\succ 0,\dots ,P_{L}\succ 0\}:\\&\quad s.t.{\begin{bmatrix}A^{\top }P+PA+\sum _{i=1}^{L}P_{i}&PA_{1}&\dots &PA_{L}\\A_{1}^{\top }P&-P_{1}&\dots &0\\\vdots &\vdots &\ddots &\vdots \\A_{L}^{\top }P&0&\dots &-P_{L}\end{bmatrix}}\prec 0,P_{1}\succ 0,\dots ,P_{L}\succ 0.\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/50fc71737b69f2cf57d15634f2f19d091bf37d02

## Conclusion

The stability of the above linear delayed differential equation is proved, using Lyapunov functionals of the form $V(x,t)=x(t)^{\top }Px(t)+\sum _{i=1}^{L}\int _{0}^{L}x^{\top }(t-s)P_{i}x(t-s)\ ds$, if the provided LMIP is feasible.

## Remark

The techniques for proving stability of norm-bound LDIs [Boyd, ch.5] can also be used.

## 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.

# H infinity Norm for Affine Parametric Varying Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{w}w(t),\\z(t)&=C_{z}(\theta )x(t)+D_{zw}(\theta )w(t),\end{aligned}}$
where $C_{z}$ and $D_{zw}$ depend affinity on parameter $\theta \in \mathbb {R} ^{p}$.

## The Data

The matrices $A,B_{w},C_{z}(.),D_{zw}(.)$.

## The Optimization Problem:

Solve the following semi-definite program
       ${\begin{aligned}&\min _{\{P\succ 0,\gamma \geq 0\}}\gamma \\&\quad s.t.{\begin{bmatrix}A^{\top }P+PA&PB_{w}\\B_{w}^{\top }P&-\gamma ^{2}I\end{bmatrix}}+{\begin{bmatrix}C_{z}^{\top }(\theta )\\D_{zw}^{\top }(\theta )\end{bmatrix}}{\begin{bmatrix}C_{z}(\theta )&D_{zw}(\theta )\end{bmatrix}}\preceq 0.\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/5462bc1dc441bc298d50a2c35075e9466eba8355

## Conclusion

The value function of the above semi-definite program returns the ${\mathcal {H}}_{\infty }$ norm of the system.

## Remark

It is assumed that $A$ is stable and $(A,B_{w})$ is controllable and the semi-infinite convex constraint $\|H_{\theta }(j\omega )\|<\gamma$ for all $\omega \in \mathbb {R}$, is converted into a finite-dimensional convex LMI.

## 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.

# Entropy Bond for Affine Parametric Varying Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{w}w(t),\\z(t)&=C_{z}(\theta )x(t)+D_{zw}(\theta )w(t),\end{aligned}}$
where $C_{z}$ and $D_{zw}$ depend affinely on parameter $\theta \in \mathbb {R} ^{p}$.

## The Data

The matrices $A,B_{w},C_{z}(.),D_{zw}(.)$.

## The Optimization Problem:

Solve the following semi-definite program
       ${\begin{aligned}&\min _{\{P\succ 0,\gamma ^{2},\lambda ,\theta \}}\gamma ^{2}\\&\quad s.t.\quad D_{zw}(\theta )=0,{\begin{bmatrix}A^{\top }P+PA&PB_{w}&C_{z}(\theta )^{\top }\\B_{w}^{\top }P&-\gamma ^{2}I&0\\C_{z}(\theta )&0&-I\end{bmatrix}}\preceq 0,\quad {\rm {{Tr}(B_{w}^{\top }PB_{w})\leq \lambda .}}\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/02f31a2d7a22b2464dfe9212eb76409bda9439b1

## Conclusion

The value function of the above semi-definite program returns a bound for $\gamma$-entropy of the system, which is defined as
       ${\begin{aligned}I_{\gamma }(H_{\theta })\triangleq {\begin{cases}{\frac {-\gamma ^{2}}{2\pi }}\int _{-\infty }^{\infty }\log \det(I-\gamma ^{2}H_{\theta }(i\omega )H_{\theta }(i\omega )^{*})d\omega ,\quad {\text{if}}\ \|H_{\theta }\|_{\infty }<\gamma \\\infty ,\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad {\text{otherwise.}}\end{cases}}\end{aligned}}$

## Remark

When it is finite, $I_{\gamma }(H_{\theta })$ is given by ${\rm {{Tr}(B_{w}^{\top }PB_{w})}}$ where $P$, is asymmetric matrix with the smallest possible maximum singular value among all solutions of a Riccati equation.

## 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.

# Dissipativity of Affine Parametric Varying Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{w}w(t),\\z(t)&=C_{z}(\theta )x(t)+D_{zw}(\theta )w(t),\end{aligned}}$
where $C_{z}$ and $D_{zw}$ depend affinely on parameter $\theta \in \mathbb {R} ^{p}$.

## The Data

The matrices $A,B_{w},C_{z}(.),D_{zw}(.)$.

## The Optimization Problem:

Solve the following semi-definite program
       ${\begin{aligned}&\min _{\{P\succ 0,\gamma ,\theta \}}\gamma \\&\quad s.t.\quad {\begin{bmatrix}A^{\top }P+PA&PB_{w}-C_{z}(\theta )^{\top }\\B_{w}^{\top }P-C_{z}(\theta )&2\gamma I-D_{zw}(\theta )-D_{zw}(\theta )^{\top }\end{bmatrix}}\preceq 0.\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/b6cd6b81f75be4a2052ba3fa76cad1a2f9c49caa

## Conclusion

The dissipativity of $H_{\theta }$ (see [Boyd,eq:6.59]) exceeds ${\gamma }$ if and only if the above LMI holds and the value function returns the minimum provable dissipativity.

## Remark

It is worth noticing that passivity corresponds to zero dissipativity.

## 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.

# Hankel Norm of Affine Parameter Varying Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{w}w(t),\\z(t)&=C_{z}(\theta )x(t)+D_{zw}(\theta )w(t),\end{aligned}}$
where $C_{z}$ and $D_{zw}$ depend affinely on parameter $\theta \in \mathbb {R} ^{p}$.

## The Data

The matrices $A,B_{w},C_{z}(.),D_{zw}(.)$.

## The Optimization Problem:

Solve the following semi-definite program
       ${\begin{aligned}&\min _{\{Q\succeq 0,\gamma ^{2},\theta \}}\gamma ^{2}\\&\quad s.t.\quad D_{zw}(\theta )=0,\quad A^{\top }Q+QA+C_{z}(\theta )C_{z}(\theta )\preceq 0,\quad \gamma ^{2}I-W_{c}^{1/2}QW_{c}^{1/2}\succeq 0,\end{aligned}}$
where $W_{c}$ is the controllability Gramian, i.e., $W_{c}\triangleq \int _{0}^{\infty }e^{At}B_{w}B_{w}^{\top }e^{A^{\top }t}dt$.

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/0faedcdd9fba92bc27a318d80159c04a0b342f35

## Conclusion

The Hanakel norm (i.e., the square root of the maximum eigenvalue) of $H_{\theta }$ is less than ${\gamma }$ if and only if the above LMI holds and the value function returns the maximum provable Hankel norm.

## Remark

$D_{zw}$ is assumed to be zero.

## 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.

# Positive Orthant Stabilizability

Positive Orthant Stabilizability
The positive orthant stability of a linear system refers to the property of the system states being real and positive for all $t\geq 0$ and decaying down to zero over time. In this section, the feasibility problem for systems to be positive orthant stable, and the stabilizability conditions to make the system positive orthant stable will be covered.

## The System

Consider a linear state-space representation of a system as:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$ and $u(t)\in \mathbb {R} ^{r}$ are the system state and the input vector respectively. A and B are system coefficient matrices of appropriate dimensions.

## The Data

Number of states n and number of control inputs r need to be known. Moreover, the system matrices A,B are also required to be known.

## The Feasibility LMI

An LTI system is positive orthant stable if $x(0)\in \mathbb {R} _{+}^{n}$ implies that $\forall t\geq 0,x(t)\in \mathbb {R} _{+}^{n}$. Moreover, as $t\rightarrow \infty$, $x(t)\rightarrow 0$. This is possible if and only if the following conditions hold:
       ${\begin{aligned}A_{ij}&\geq 0,\forall i\neq j,\\\exists P&>0{\text{ s.t. }}PA^{\top }+AP<0,\end{aligned}}$
The above LMI feasibility is the positive orthant stability criteria. To convert it into a positive orthant stabilizability check, the problem can be modified so that we check if ${\dot {x}}=(A+BK)x$ is positive orthant stable. As $K$ is also a design variable here, the second inequality in the above LMI will result in bilinearity. A simple change of variables can overcome that to result in the following LMI feasibility problem for checking positive orthant stabilizability of the LTI system:
       ${\begin{aligned}{\text{Find }}Q,Y&{\text{ subj. to:}}\\&Q>0,(AQ+BY)_{ij}\geq 0,\forall i\neq j,\\&{\text{ s.t. }}QA^{\top }+AQ+BY+Y^{\top }B^{\top }<0,\end{aligned}}$
If the above LMI is feasible, the LTI system is stabilizable with controller $K=YQ^{-1}$.

## Conclusion:

The feasibility of the above LMIs guarantees that the system is positive orthant stable if the first LMI is feasible or stabilizable with a controller if the second LMI holds.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Positive_Orthant_LMI.m

## External Links

A list of references documenting and validating the LMI.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# LMI For Stabilization Condition for Systems With Unsymmetrical Saturated Control

LMI For Stabilization Condition for Systems With Unsymmetrical Saturated Control
The LMI in this page gives the feasibility conditions which, if satisfied, imply that the correstponding system can be stabilized.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+BSat(u(t)),\\x(0)&=x_{0},\\Sat(u)_{i}=,\end{aligned}}$
where $x\in \|R^{n}$ is the state, $u\in \|R^{m}$ is the control input.
For the system given as above, its symmetrical saturated control form can be derived by following the procedure in the original article. The new system will have the form:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+{\tilde {B}}sat(z(t))+Ew\end{aligned}}$
where $w_{i}=u_{i}-{\frac {\alpha _{i}-\beta _{i}}{2}},z_{i}=w_{i}{\frac {2}{\alpha _{i}+\beta _{i}}}$

## The Data

The system matrices $(A,{\tilde {B}},E)$, the saturation bounds $(\alpha _{i},\beta _{i})$ of the control inputs. Positive scalars $\rho ,\eta$.

## The LMI: The Stabilization Feasibility Condition

       ${\begin{aligned}&{\text{Find}}\;X,Y,Z:\\&{\text{subj. to: }}X>0,\\&\quad {\begin{bmatrix}AX+{\tilde {B}}(D_{s}Y+{\hat {D}}_{s}^{-}Z)\end{bmatrix}}+{\begin{bmatrix}AX+{\tilde {B}}(D_{s}Y+{\hat {D}}_{s}^{-}Z)\end{bmatrix}}^{\top }+{\frac {\eta }{\rho }}X+{\frac {1}{\eta }}EE^{\top }<0,\\{\begin{bmatrix}\mu &Z_{i}\\*X\end{bmatrix}}>0,i=1,...,{\bar {m}}\end{aligned}}$
Here $D_{s}$ is a diagonal matrix with a component either 0 or 1, and $D_{s}+D_{s}^{-}={\frac {\Lambda +\mathrm {T} }{2}}$ and ${\hat {D}}_{s}^{-}=e_{f_{m}}\times D_{s}^{-}$

## Conclusion:

The feasibility of the given LMI implies that the system is stabilizable with control gains $K=YX^{-1},H=ZX^{-1}$.

## Implementation

A link to CodeOcean or other online implementation of the LMI

## External Links

* Stabilization of Systems with Unsymmetrical Saturated Control: An LMI Approach Link to the original article.

# LMI Condition For Exponential Stability of Linear Systems With Interval Time-Varying Delays

LMI Condition For Exponential Stability of Linear Systems With Interval Time-Varying Delays
For systems experiencing time-varying delays where the delays are bounded, the feasibility LMI in this section can be used to determine if the system is $\alpha$-exponentially stable.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Dx(t-h(t)),&t\in \mathbb {R} ^{+},\\x(t)&=\phi (t),&t\in [-h_{2},0],\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$ is the state, $A,D\in \mathbb {R} ^{n\times n}$ are the matrices of delay dynamics, and $\phi (t)\in \mathbb {R} ^{n}$ is the initial function with norm $\|\phi \|=sup_{-{\bar {h}}\leq t\leq 0}\{\|\phi (t)\|,\|{\dot {\phi }}(t)\|\}$ and it is continuously differentiable function on $[-h_{2},0]$. The tyime-varying delay function $h(t)$ satisfies:
    $0\leq h_{1}\leq h(t)\leq h_{2},t\in \mathbb {R} ^{+},$

## The Data

The matrices $(A,D)$ are known, as well as the bounds $(h_{1},h_{2})$ of the time-varying delay.

## The Optimization Problem

For a given $\alpha >0$, the zero solution of the system described above is $\alpha$-exponentially stable if there exists a positive number $N>0$ such that every solution $x(t,\phi )$ satisfies the following condition:
$\|x(t,\phi )\|\leq Ne^{-\alpha t}\|\phi \|,\forall t\in \mathbb {R} ^{+}$

## The LMI: $\alpha$-Stability Condition

The following feasibility LMI can be used to check if the system is $\alpha$-exponentially stable or not for a given $\alpha >0$:
       ${\begin{aligned}&{\text{Find}}\;P,Q,R,U,S_{i},{\text{ where }}i=1,2,...,5:\\&\quad \quad {\begin{bmatrix}M_{11}&M_{12}&M_{13}&M_{14}&M_{15}\\*&M_{22}&0&M_{24}&S_{2}\\*&*&M_{33}&M_{34}&S_{3}\\*&*&*&M_{44}&S_{4}-S_{5}D\\*&*&*&*&M_{55}\end{bmatrix}}<0\\&{\text{where:}}\\&\quad \quad M_{11}=A^{\top }P+PA+2\alpha P-(e^{-2\alpha h_{1}}+e^{-2\alpha h_{2}})R+0.5S_{1}(I-A)+0.5(I-A^{\top })S_{1}^{\top }+2Q,\\&\quad \quad M_{12}=e^{-2\alpha h_{1}}R-S_{2}A,\quad M_{13}=e^{-2\alpha h_{2}}R-S_{3}A,\\&\quad \quad M_{14}=PD-S_{1}D-S_{4}A,\quad M_{15}=S_{1}-S_{5}A,\\&\quad \quad M_{22}=-e^{-2\alpha h_{1}}(Q+R),\quad M_{24}=S_{2}D+e^{-2\alpha h_{2}}U,\\&\quad \quad M_{33}=-e^{-2\alpha h_{1}}(Q+R+U),\quad M_{34}=-S_{3}D+e^{-2\alpha h_{2}}U,\\&\quad \quad M_{44}=0.5(S_{4}D+D^{\top }S_{4}^{\top })-e^{-2\alpha h_{2}}U,\\&\quad \quad M_{55}=S_{5}+S_{5}^{\top }+(h_{1}^{2}+h_{2}^{2})R+(h_{2}-h_{1})^{2}U,\end{aligned}}$
The above LMI can be combined with the bisection method to find $\alpha$.

## Conclusion:

For systems with time-varying delays with intervals, the LMI in this section can be used to check if the system is exponentially stable with a certain $\alpha$. The bisection algorithm can be additionally used to compute $\alpha$.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Intervaled_Delay_Sys_Stability_example.m

## External Links

A list of references documenting and validating the LMI.
* LMI approach to exponential stability of linear systems with interval time-varying delays - Original Article by Phat et al.

## Return to Main Page:
# Conic Sector Lemma

Conic Sector Lemma
For general input-output systems, sector conditions are formulated to verify or enforce the feedback stability. One of these sector conditions is the conic sector lemma, and the problem that designs the feedback controller is the conic sector theorem.

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization $(A,B,C,D)$, where $A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},C\in \mathbb {R} ^{m\times n},$ and $D\in {\mathcal {R}}^{m\times m}$. The state-space representation is:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $u(t)\in \mathbb {R} ^{m}$ are the system state, output, and the input vector respectively.

## The Data

The system coefficient matrices $(A,B,C,D)$ are required. Optionally, the parameters to define a cone, either in the form of $[a,b]$ where $a,b\in \mathbb {R} ,a<b$ or a radius $r\in \mathbb {R} _{+}$ and ceter $c\in \mathbb {R}$.

## The Feasibility LMI

The system ${\mathcal {G}}$ is inside the given cone $[a,b]$ if the following is feasible:
       ${\begin{aligned}{\text{Find: }}&P\\{\text{subj. to: }}&P>0\\&{\begin{bmatrix}PA+A^{\top }P+C^{\top }C&PB-{\frac {a+b}{2}}C^{\top }+C^{\top }D\\(PB-{\frac {a+b}{2}}C^{\top }+C^{\top }D)^{\top }&D^{\top }D-{\frac {a+b}{2}}(D+D^{\top })+abI\end{bmatrix}}\leq 0.\end{aligned}}$
The above LMI can be used to also determine the cone parameters by setting $a$ as a variable along with the condition $a<b$, and use the bisection method to find $b$.
If the given cone is represented by a center $c$ and radius $r$, then the following feasibility problem can be evaluated to check if ${\mathcal {G}}$ is inside the given cone:
       ${\begin{aligned}{\text{Find: }}&P\\{\text{subj. to: }}&P>0\\&{\begin{bmatrix}PA+A^{\top }P+C^{\top }C&PB-cC^{\top }+C^{\top }D\\(PB-cC^{\top }+C^{\top }D)^{\top }&D^{\top }D-c(D+D^{\top })+(c^{2}-r^{2})I\end{bmatrix}}\leq 0.\end{aligned}}$
In order to also find the cone parameters, substituting $\gamma =r^{2}$ as a decision variable with additional constraint $\gamma \geq 0$ and then solving for $c$ via the bisection method will give the cone in which the system ${\mathcal {G}}$ resides if the problem is feasible.

## Conclusion:

The aforementioned LMIs can be utilized to either check if ${\mathcal {G}}$ is in the specified cone or not, or can be used to check the stability of ${\mathcal {G}}$ by finding if a feasible cone can be obtained that encloses ${\mathcal {G}}$. An important point to note here is that the Conic Sector Lemma is a special case of the KYP Lemma for QSR dissipative systems with:
$Q=-1,S=frac{a+b}{2}I=cI,R=-abI=(r^{2}-c^{2})I$.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Conic_sector_example.m

## Related LMIs

Exterior Conic Sector Lemma.
KYP Lemma

## External Links

A list of references documenting and validating the LMI.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.

## Return to Main Page:
# Polytopic Quadratic Stability

An important result to determine the stability of the system with uncertainties

## The System:

Consider the system with Affine Time-Varying uncertainty (No input)
    ${\begin{aligned}{\dot {x}}(t)&=(A_{0}+\Delta A(t))x(t)\\\end{aligned}}$
where
    ${\begin{aligned}\Delta A(t)=A_{1}\delta _{1}(t)+....+A_{k}\delta _{k}(t)\\\end{aligned}}$
where $\delta _{i}(t)$ lies in either the intervals
    ${\begin{aligned}\delta _{i}\in [\delta _{i}^{-},\delta _{i}^{+}]\\\end{aligned}}$
or the simplex
    ${\begin{aligned}\delta (t)\in {\delta :\Sigma \alpha _{i}=1,\alpha \geq 0}\end{aligned}}$
where $x\in \mathbb {R} ^{m}$ and $A\in \mathbb {R} ^{mxm}$

## The Data

The matrix A and $\Delta _{A(t)}$ are known

## The Optimization

The Definitions: Quadratic Stability for Dynamic Uncertainty
The system
    ${\begin{aligned}{\dot {x}}(t)&=(A_{0}+\Delta A(t))x(t)\\\end{aligned}}$
is Quadraticallly Stable over $\Delta$ if there exists a P > 0
Theorem $(A+\Delta ,{\boldsymbol {\Delta }})$ is quadratically stable over ${\boldsymbol {\Delta }}:=Co(A_{1},...,A_{k})$ if and only if there exists a P > 0 such that
    ${\begin{aligned}(A+A_{i})^{T}P+P(A+A_{i})<0\quad for\quad all\quad i=1,....,k\end{aligned}}$
The theorem says the LMI only needs to hold at the EXTREMAL POINTS or VERTICES of the polytope.
* Quadratic Stability MUST be expressed as an LMI

## The LMI

    ${\begin{aligned}(A+\Delta )^{T}P+P(A+\Delta )<0\quad for\quad all\quad \Delta \in {\boldsymbol {\Delta }}\end{aligned}}$

## Conclusion:

Quadratic Stability Implies Stability of trajectories for any $\Delta$ with $\Delta \in {\boldsymbol {\Delta }}$ for all $t\geq 0$
Quadratic Stability is CONSERVATIVE.
There are Stable System which are not Quadratically stable. Quadratic Stability is sometimes referred to as an "infinite-dimensional LMI"
* Meaning it represents an infinite number of LMI constraints.
* One for each possible value $\Delta$ with $\Delta \in {\boldsymbol {\Delta }}$
* Also called a parameterized LMI
* Such LMIs are not tractable.
* For polytopic sets, the LMI can be made finite.

## Implementation

A link to implementation of the LMI
https://github.com/JalpeshBhadra/LMI/blob/master/polytopicstability.m

## Related LMIs

* Parametric Norm Bounded Uncertain System Quadratic Stability

## 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.

## Return to Main Page:
# Mu Analysis

Mu Synthesis. The technique of $\mu$ synthesis extends the methods of $H\infty$ synthesis to design a robust controller for an uncertain plant. You can perform $\mu$ synthesis on plants with parameter uncertainty, dynamic uncertainty, or both using the "musyn" command in MATLAB. $\mu$ analysis is an extremely powerful multivariable technique which has been applied to many problems in the almost every industry including Aerospace, process industry etc.

## The System:

Consider the continuous-time generalized LTI plant with minimal states-space realization
    ${\begin{aligned}{\dot {x}}&=Ax+Bu\\y&=Cx+Du\\\end{aligned}}$
where it is assumed that $D$ is Invertible.

## The Data

The matrices needed as inputs are only, $A$ and $D$.

## The LMI: $\mu$- Analysis

The inequality ${\overline {\sigma }}(DAD^{-1})<\gamma$ holds if and only if there exist $X\in \mathbb {S} ^{n}$ and $\gamma \in \mathbb {R} _{>0}$, where $X>0$, satisfying:
       ${\begin{aligned}A^{T}XA-\gamma ^{2}X<0\end{aligned}}$

## Conclusion:

The inequality ${\overline {\sigma }}(DAD^{-1})<\gamma$ holds for $D=X^{1/2},$ where X satisfies the above Inequality.

## Implementation

* https://github.com/Ricky-10/coding107/blob/master/Mu%20Analysis - $\mu$-Analysis

## External links

* -MATLAB $\mu$-synthesis Implementation
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.

# Optimization Over Affine Family of Linear Systems
## Optimization over an Affine Family of Linear Systems

Presented in this page is a general framework for optimizing various convex functionals for a system which depends affinely, or linearly, on a parameter using linear matrix inequalities.
The optimization problem presented on this page generalizes an LMI which can be applied to various problems within linear systems and control. Some examples of these applications are finding the $H_{2}$ and $H_{\infty }$ norms, entropy, dissipativity, and the Hankel norm of an affinely parametric system.

## The System

Consider a family of linear systems ‌ ${\dot {x}}=Ax+B_{w}w,$ ‌ $z=C_{z}({\theta })x+D_{zw}({\theta })w$ ‌with state space realization $(A,B_{w},C_{z},D_{zw})$ where $C_{z}$ and $D_{zw}$ depend affinely on the parameter ${\theta }\in \mathbb {R} ^{p}$.
We assume $A$ is stable and $(A,B_{w})$ is controllable.
The transfer function, $H_{\theta }(s){\widehat {=}}C_{z}({\theta })(sI-A)^{-1}B_{w}+D_{zw}({\theta })$ depends affinely on ${\theta }$.

## The Data

The transfer function $H$, and system matrices $A$, $B_{w}$, $C_{z}$, $D_{zw}$ are known. ${\varphi }$ represents the convex functionals, ${\alpha }$ and ${\psi }$ represent some auxiliary variables dependent on the problem being solved.

## The LMI:Generalized Optimization for Affine Linear Systems

Several control theory problems, mentioned earlier, take the following form: ‌minimize ${\psi }_{0}(H_{\theta })$ ‌subject to ${\psi }_{i}(H_{\theta })<{\alpha }_{i},i=1,...,p$
Problems of this nature can be formulated as an LMI by representing ${\psi }_{i}(H_{\theta })<{\alpha }_{i}$ as an LMI in ${\theta },{\alpha }_{i},$ and possibly ${\psi }_{i}$ such that $F_{i}({\theta },{\alpha }_{i},{\psi }_{i})>0$
Thus, the general optimization problem to be applied to an affine family of linear systems is as follows: ‌minimize ${\alpha }_{0}$ ‌subject to $F_{i}({\theta },{\alpha }_{i},{\psi }_{i})>0,i=0,1,....,P$

## Conclusion:

The LMI for this generalized optimization problem may be extended to various convex functionals for affine parametric systems. For extensions of this LMI, see the related LMIs section.

## Implementation

Implementation of LMI's of this form require Yalmip and a linear solver such as Sedumi or SDPT3.
$H_{\infty }$ Norm for Affine Parametric Systems - MATLAB code for an extension of this generalized LMI.
Entropy Bond for Affine Parametric Systems - MATLAB code for an extension of this generalized LMI.
LMI can be applied to other extensions in stability and controller analysis. Please see the related LMI pages in the section below.

## Related LMIs

$H_{\infty }$ Norm for Affine Parametric Systems
Entropy Bond for Affine Parametric Systems
Dissipativity for Affine Parametric Systems
for Affine Parametric Systems

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013.

## Return to Main Page:

LMIs in Control: https://en.wikibooks.org/wiki/LMIs_in_Control

# Hurwitz Stabilizability

This section studies the stabilizability properties of the control systems.

## The System

Given a state-space representation of a linear system
    ${\begin{aligned}\ \rho x=Ax+Bu\\\ y=Cx+Du\\\end{aligned}}$
Where $\rho$ represents the differential operator ( when the system is continuous-time) or one-step forward shift operator ( Discrete-Time system). $x\in \mathbb {R} ^{n},y\in \mathbb {R} ^{m},u\in \mathbb {R} ^{r}$ are the state, output and input vectors respectively.

## The Data

$A,B,C,D$ are system matrices.

## Definition

The system , or the matrix pair $(A,B)$ is Hurwitz Stabilizable if there exists a real matrix $K$ such that $(A+BK)$ is Hurwitz Stable. The condition for Hurwitz Stabilizability of a given matrix pair (A,B) is given by the PBH criterion:
    ${\begin{aligned}\ rank{\begin{bmatrix}sI-A&B\end{bmatrix}}&=n,\forall s\in \mathbb {C} ,Re(s)\geq 0\\\end{aligned}}$         (1)
The PBH criterion shows that the system is Hurwitz stabilizable if all uncontrollable modes are Hurwitz stable.

## LMI Condition

The system, or matrix pair $(A,B)$ is Hurwitz stabilizable if and only if there exists symmetric positive definite matrix $P$ and $W$ such that:
    ${\begin{aligned}AP+PA^{T}+BW+W^{T}B^{T}<0\\\end{aligned}}$         (2)
Following definition of Hurwitz Stabilizability and Lyapunov Stability theory, the PBH criterion is true if and only if , a matrix $K$ and a matrix $P>0$ satisfying:
    ${\begin{aligned}(A+BK)P+P(A+BK)^{T}<0\\\end{aligned}}$         (3)
Letting
    ${\begin{aligned}W=KP\\\end{aligned}}$         (4)
Putting (4) in (3) gives us (2).

## Implementation

This implementation requires Yalmip and Mosek.
* https://github.com/ShenoyVaradaraya/LMI--master/blob/main/Hurwitz_Stabilizability.m

## Conclusion

Compared with the second rank condition, LMI has a computational advantage while also maintaining numerical reliability.

## References

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & Francis Group, 2013

## Return to Main Page:
# Quadratic Hurwitz Stabilization for Polytopic Systems

This section studies the Quadratic Hurwitz stabilization for polytopic systems.

## The System

Given a state-space representation of a linear system
    ${\begin{aligned}\ {\dot {x}}(t)=A(\delta (t)x(t)+B\delta (t)u(t)\\A(\delta (t))=A_{0}+\delta _{1}(t)A_{1}+\delta _{2}(t)A_{2}\\B(\delta (t))=B_{0}+\delta _{1}(t)B_{1}+\delta _{2}(t)B_{2}\end{aligned}}$         (1)

## LMI Condition

With $\Delta =\Delta _{p}$ , the quadratic Hurwitz Stabilization problem has a solution if and only if there exists a symmetric positive definite matrix $P$ and a matrix $W$ satisfying the below LMI :
    ${\begin{aligned}(A_{0}+A_{i})P+P(A_{0}+A_{i})^{T}+(B_{0}+B_{i})W+W(B_{0}+B_{i})^{T}<0,i&=1,2,....k\end{aligned}}$         (2)
In this case, a solution to the problem is given by
    ${\begin{aligned}K=WP^{-1}\\\end{aligned}}$         (3)

## Conclusion

Stability of a system does not guarantee quadratic stability. Since quadratic stability can represent infinite LMI constraints, it is not tractable. Therefore, to make it feasible and tractable, polytopic sets are helpful.

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & Francis Group, 2013

# Discrete-Time Lyapunov Stability

Discrete-Time Lyapunov Stability
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.
Stability of DT LTI systems can be determined by solving Lyapunov Inequality.

## The System

Discrete-Time System
    ${\begin{aligned}x(t)_{k+1}&=A_{d}x(t)_{k},&A_{d}\in {\bf {{R^{n*n}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $A_{d},P$.

## The Optimization Problem

The following feasibility problem should be optimized:
Find P obeying the LMI constraints.

## The LMI:

Discrete-Time Bounded Real Lemma
The LMI formulation
       ${\begin{aligned}P\in {\bf {{S^{n}}\;}}\\{\text{Find}}\;&P>0,\\{\begin{bmatrix}A_{d}^{T}PA_{d}-P\end{bmatrix}}&<0\end{aligned}}$

## Conclusion:

If there exists a $P\in {\bf {S^{n}}}$ satisfying the LMI then, $|\lambda _{i}(A_{d})|\leq 1,\forall i=1,2,...,n;$ and the equilibrium point ${\bar {x}}=0$ of the system is Lyapunov stable.

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

Continuous_Time_Lyapunov_Inequality - Lyapunov_Inequality

## 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.

## Return to Main Page:
# LMI for Schur Stabilization

LMI for Schur Stabilization
Similar to the stability of continuous-time systems, one can analyze the stability of discrete-time systems. A discrete-time system is said to be stable if all roots of its characteristic equation lie in the open unit disk. This provides a condition for the stability of discrete-time linear systems and a linear time-invariant system with this property is called a Schur stable system.

## The System

We consider the following system:
${\begin{aligned}x(k+1)=Ax(k)+Bu(k)\end{aligned}}$
where the matrices $A\in \mathbb {R} ^{n\times n}$, $B\in \mathbb {R} ^{n\times r}$, $x\in \mathbb {R} ^{n}$, and $u\in \mathbb {R} ^{r}$ are the state matrix, input matrix, state vector, and the input vector, respectively.
Moreover, $k$ represents time in the discrete-time system and $k+1$ is the next time step.
The state feedback control law is defined as follows:
${\begin{aligned}u(k)=Kx(k)\end{aligned}}$
where $K\in \mathbb {R} ^{n\times r}$ is the controller gain. Thus, the closed-loop system is given by:
${\begin{aligned}x(k+1)=(A+BK)x(k)\end{aligned}}$

## The Data

The matrices $A$ and $B$ are given.
We define the scalar as $\gamma$ with the range of $0<\gamma \leq 1$.

## The Optimization Problem

The optimization problem is to find a matrix ${\begin{aligned}K\in \mathbb {R} ^{r\times n}\end{aligned}}$ such that:
${\begin{aligned}||A+BK||_{2}<\gamma \end{aligned}}$
According to the definition of the spectral norms of matrices, this condition becomes equivalent to:
${\begin{aligned}(A+BK)^{T}(A+BK)<\gamma ^{2}I\end{aligned}}$
Using the Lemma 1.2 in LMI in Control Systems Analysis, Design and Applications (page 14), the aforementioned inequality can be converted into:
${\begin{aligned}{\begin{bmatrix}-\gamma I&(A+BK)\\(A+BK)^{T}&-\gamma I\end{bmatrix}}<0\\\end{aligned}}$

## The LMI: LMI for Schur stabilization

The LMI for Schur stabilization can be written as minimization of the scalar, $\gamma$, in the following constraints:
${\begin{aligned}&{\text{min}}\quad \gamma \\&{\text{s.t.}}\quad {\begin{bmatrix}-\gamma I&(A+BK)\\(A+BK)^{T}&-\gamma I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

After solving the LMI problem, we obtain the controller gain $K$ and the minimized parameter $\gamma$. This problem is a special case of Intensive Disk Region Design (page 230 in [1]). This problem may not have a solution even when the system is stabilizable. In other words, once there exists a solution, the solution is robust in the sense that when there are parameter perturbations, the closed-loop system's eigenvalues are not easy to go outside of a circle region within the unit circle [1].

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Schur-Stability

## Related LMIs

LMI for Hurwitz stability

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

# L2-Gain of Systems with Multiplicative noise
## The System

    ${\begin{aligned}x(k+1)&=Ax(k)+B_{w}w(k)+\sum _{i=1}^{L}(A_{i}x(k)+B_{w,i}w(k))p_{i}(k),\quad x(0)=0,\\z(k)&=C_{z}x(k)+D_{zw}w(k)+\sum _{i=1}^{L}(C_{z,i}x(k)+D_{zw,i}w(k))p_{i}(k),\end{aligned}}$
where $p(0),p(1),\dots$, are independent, identically distributed random variables with $Ep(k)=0,Ep(k)p^{\top }(k)=\Sigma =diag(\sigma _{1},\dots ,\sigma _{L})$ and $x(0)$ is independent of the process $p$.

## The Data

The matrices $A,B_{w},\{A_{i}.B_{w,i}\}_{i=1}^{L},C_{z},D_{zw},\{C_{z,i},D_{zw,i}\}_{i=1}^{L},\{\sigma _{i}\}_{i=1}^{L}$.

## The LMI:

       ${\begin{aligned}&\min _{\{P\succ 0,\gamma ^{2}\}}\gamma ^{2}\\&\quad s.t.{\begin{bmatrix}A&B_{w}\\C_{z}&D_{zw}\end{bmatrix}}^{\top }{\begin{bmatrix}P&0\\0&I\end{bmatrix}}{\begin{bmatrix}A&B_{w}\\C_{z}&D_{zw}\end{bmatrix}}-{\begin{bmatrix}P&0\\0&\gamma ^{2}I\end{bmatrix}}+\sum _{i=1}^{L}\sigma _{i}^{2}{\begin{bmatrix}A_{i}&B_{w,i}\\C_{z,i}&D_{zw,i}\end{bmatrix}}^{\top }{\begin{bmatrix}P&0\\0&I\end{bmatrix}}{\begin{bmatrix}A_{i}&B_{w,i}\\C_{z,i}&D_{zw,i}\end{bmatrix}}^{\top }\preceq 0\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/a34713575cd8ae9831cb5b7eb759d0fd45a8c37f

## Conclusion

The optimal $\gamma$ returns an upper bound on the ${\mathcal {L}}_{2}$ gain of the system. .

## Remark

It is straightforward to apply scaling method [Boyd, sec.6.3.4] to obtain component-wise results.

## 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.

## Return to Main Page:
# Discrete-Time Quadratic Stability
## Discrete-Time Quadratic Stability

Stability is an important property, stability analysis is necessary for control theory. For robust control, this criterion is applicable for the uncertain discrete-time linear system. It is based on the Discrete Time Lyapunov Stability.

## The System

    ${\begin{aligned}x_{k+1}&=A_{d}(\alpha )x_{k}\\Where:\\&A_{d}(\alpha )=A_{d}+\Delta A_{d}(\delta (t))\\&\Delta A_{d}(\delta (t))=\sum _{k=1}^{n}\delta _{k}(t)A_{d;k}\in \mathrm {R} ^{n\times n}\\&\delta (t)=[\delta _{1}(t),...\delta _{n}(t)]-{\text{The set of perturbation parameters}}\\&\delta (t)\in \mathrm {R} \;\;\;A_{d;i}\in \mathrm {R} ^{n\times n}\end{aligned}}$

## The Data

The matrices $A\in R^{n\times n}\;A_{d;i}\in R^{n\times n}$.

## The Optimization Problem

The following feasibility problem should be solved:
    ${\begin{aligned}{\text{Find}}\;&P>0:\\&(A_{d;0}+\Delta A_{d}(\delta (t)))^{T}P(A_{d;0}+\Delta A_{d}(\delta (t)))-P<0{\text{ for all }}\delta \end{aligned}}$
Where $P\in R^{n,n}$.
In case of polytopic uncertainty:
    ${\begin{aligned}{\text{Find}}\;&P>0:\\&(A_{d;0}+A_{d;i})^{T}P(A_{d;0}+A_{d;i})-P<0{\text{ for all }}i=1,...n\end{aligned}}$

## Conclusion:

This LMI allows us to investigate stability for the robust control problem in the case of polytopic uncertainty and gives on the controller for this case

## Implementation:

* - Matlab implementation using the YALMIP framework and Mosek solver

## Related LMIs: =

* - Discrete Time Stabilizability
* Polytopic stability for continuous time case
* Quadratic polytopic stabilization
* Discrete Time Lyapunov Stability

## 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. (3.20.2 page 64)
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

## Return to Main Page:

* Main Page.

# Stability of Lure's Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{p}p(t)+B_{w}w(t),\\z(t)&=C_{z}x(t)\\p_{i}(t)&=\phi _{i}(q_{i}(t)),i=1,\dots ,n_{p}\\q&=C_{q}x,\\0&\leq \sigma \phi _{i}(\sigma )\leq \sigma ^{2}\ \forall \sigma \in \mathbb {R} \end{aligned}}$

## The Data

The matrices $A,B_{p},B_{w},C_{q},C_{z}$.

## The LMI: The Lure's System's Stability

The following feasibility problem should be solved as sufficient condition for the stability of the above Lur'e system.
       ${\begin{aligned}{\text{Find}}\;&P>0,\Lambda =diag(\lambda _{1},\dots ,\lambda _{n_{p}})\succeq 0,T=diag(\tau _{1},\dots ,\tau _{n_{p}})\succeq 0:\\&{\begin{bmatrix}A^{\top }P+PA&PB_{p}+A^{\top }C_{q}^{\top }\Lambda +C_{q}^{\top }T\\B_{p}^{\top }P+\Lambda C_{q}A+TC_{q}&\Lambda C_{q}B_{p}+B_{p}^{\top }C_{q}^{\top }\Lambda -2T\end{bmatrix}}\prec 0\\\end{aligned}}$

## Implementation

https://codeocean.com/capsule/0232754/tree

## Conclusion

If the feasibility problem with LMI constraints has solution, then the Lure's system is stable.

## Remark

The LMI is only a sufficient condition for the existence of a Lur’e Lyapunov function that proves stability of Lur'e system . It is also necessary when there is only one nonlinearity, i.e., when $n_{p}=1$.

## 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.

## Return to Main Page:
# L2 Gain of Lure's Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{p}p(t)+B_{w}w(t),\\z(t)&=C_{z}x(t)\\p_{i}(t)&=\phi _{i}(q_{i}(t)),i=1,\dots ,n_{p}\\q&=C_{q}x,\\0&\leq \sigma \phi _{i}(\sigma )\leq \sigma ^{2}\ \forall \sigma \in \mathbb {R} \end{aligned}}$

## The Data

The matrices $A,B_{p},B_{w},C_{q},C_{z}$.

## The Optimization Problem:

The following semi-definite problem should be solved.
       ${\begin{aligned}&\min _{\{P\succ 0,\Lambda =diag(\lambda _{1},\dots ,\lambda _{n_{p}})\succeq 0,T=diag(\tau _{1},\dots ,\tau _{n_{p}})\succeq 0\}}\gamma ^{2}\;\\&\quad \quad \quad \quad \quad \quad \quad \quad s.t.\quad {\begin{bmatrix}A^{\top }P+PA+C_{z}^{\top }C_{z}&PB_{p}+A^{\top }C_{q}^{\top }\Lambda +C_{q}^{\top }T&PB_{w}\\B_{p}^{\top }P+\Lambda C_{q}A+TC_{q}&\Lambda C_{q}B_{p}+B_{p}^{\top }C_{q}^{\top }\Lambda -2T&\Lambda C_{q}B_{w}\\B_{w}^{\top }P&B_{w}^{\top }C_{q}^{\top }\Lambda &-\gamma ^{2}I\end{bmatrix}}\preceq 0\\\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/12a7039f9e3d966e24b43fd58a3cce3725282ed2

## Conclusion

The value function returns the square of the smallest provable upper bound on the ${\mathcal {L}}_{2}$ gain of the Lure's system.

## Remark

The Lyapunov function which is used to proof is similar to the one for the systems with unknown parameters.

## 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.

## Return to Main Page:
# Output Energy Bound for Lure's Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{p}p(t)+B_{w}w(t),\\z(t)&=C_{z}x(t)\\p_{i}(t)&=\phi _{i}(q_{i}(t)),i=1,\dots ,n_{p}\\q(t)&=C_{q}x(t),\\0&\leq \sigma \phi _{i}(\sigma )\leq \sigma ^{2}\ \forall \sigma \in \mathbb {R} \end{aligned}}$

## The Data

The matrices $A,B_{p},B_{w},C_{q},C_{z},x(0)$.

## The Optimization Problem:

The following optimization problem should be to find the tightest upper bound for the output energy of the above Lur'e system.
       ${\begin{aligned}&\min _{P\succ 0,\Lambda =diag(\lambda _{1},\dots ,\lambda _{n_{p}})\succeq 0,T=diag(\tau _{1},\dots ,\tau _{n_{p}})\succeq 0}x^{\top }(0)(P+C_{q}^{\top }\Lambda C_{q})x(0)\\&\quad \quad \quad \quad \quad \quad \quad {\begin{bmatrix}A^{\top }P+PA&PB_{p}+A^{\top }C_{q}^{\top }\Lambda +C_{q}^{\top }T\\B_{p}^{\top }P+\Lambda C_{q}A+TC_{q}&\Lambda C_{q}B_{p}+B_{p}^{\top }C_{q}^{\top }\Lambda -2T\end{bmatrix}}\preceq 0\\\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/blob/master/LMIs%20for%20Output%20Energy%20Bounds%20of%20Lure's%20Systems

## Conclusion

The value function returns the the lowest bound for the energy function of the Lure's systems, i.e., $J=\int _{0}^{\infty }z^{\top }z\ dt$ with initial conditions $x(0)$.

## Remark

The key step in the proof is to satisfy ${\frac {d}{dt}}V(x)+z^{\top }z\leq 0$, where $V(.)$ is Lyapunov function in a special form.

## 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.

## Return to Main Page:
# Stability of Quadratic Constrained Systems
## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{p}p(t)+B_{u}u(t)+B_{w}w(t),\\q(t)&=C_{q}x(t)+D_{qp}p(t)+D_{qu}u(t)+D_{qw}w(t),\\z(t)&=C_{z}x(t)+D_{zp}p(t)+D_{zu}u(t)+D_{zw}w(t)\\\int _{0}^{t}&p^{\top }(\tau )p(\tau )\ d\tau \leq \int _{0}^{t}q^{\top }(\tau )q(\tau )\ d\tau .\end{aligned}}$

## The Data

The matrices $A,B_{p},B_{w},C_{q},C_{z},D_{qp},D_{zw}$.

## The LMI:

The following feasibility problem should be solved.
       ${\begin{aligned}{\text{Find}}\;&\{P\succ 0,\lambda \geq 0\}:\\&s.t.\quad {\begin{bmatrix}A^{\top }P+PA+\lambda C_{q}^{\top }C_{q}&PB_{p}+\lambda C_{q}^{\top }D_{qp}\\(PB_{p}+\lambda C_{q}^{\top }D_{qp})^{\top }&\lambda (I-D_{qp}^{\top }D_{qp})\end{bmatrix}}\prec 0.\end{aligned}}$

## Implementation

https://github.com/mkhajenejad/Mohammad-Khajenejad/commit/38f3b55ca7060a1260384a96e9dc31142af07a9a

## Conclusion

The integral quadratic constrained system is stable if the provided LMI is feasible

## Remark

The key point of the proof is to satisfy ${\dot {V}}<0$ whenever $p^{\top }p\leq q^{\top }q$, using ${\mathcal {S}}$-procedure.

## 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.

## Return to Main Page:
# Conic Sector Lemma

Conic Sector Lemma
For general input-output systems, sector conditions are formulated to verify or enforce the feedback stability. One of these sector conditions is the conic sector lemma, and the problem that designs the feedback controller is the conic sector theorem.

## The System

Consider a square, contiuous-time linear time-invariant (LTI) system, ${\mathcal {G}}:{\mathcal {L}}_{2e}\rightarrow {\mathcal {L}}_{2e}$, with minimal state-space relization $(A,B,C,D)$, where $A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},C\in \mathbb {R} ^{m\times n},$ and $D\in {\mathcal {R}}^{m\times m}$. The state-space representation is:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $u(t)\in \mathbb {R} ^{m}$ are the system state, output, and the input vector respectively.

## The Data

The system coefficient matrices $(A,B,C,D)$ are required. Optionally, the parameters to define a cone, either in the form of $[a,b]$ where $a,b\in \mathbb {R} ,a<b$ or a radius $r\in \mathbb {R} _{+}$ and ceter $c\in \mathbb {R}$.

## The Feasibility LMI

The system ${\mathcal {G}}$ is inside the given cone $[a,b]$ if the following is feasible:
       ${\begin{aligned}{\text{Find: }}&P\\{\text{subj. to: }}&P>0\\&{\begin{bmatrix}PA+A^{\top }P+C^{\top }C&PB-{\frac {a+b}{2}}C^{\top }+C^{\top }D\\(PB-{\frac {a+b}{2}}C^{\top }+C^{\top }D)^{\top }&D^{\top }D-{\frac {a+b}{2}}(D+D^{\top })+abI\end{bmatrix}}\leq 0.\end{aligned}}$
The above LMI can be used to also determine the cone parameters by setting $a$ as a variable along with the condition $a<b$, and use the bisection method to find $b$.
If the given cone is represented by a center $c$ and radius $r$, then the following feasibility problem can be evaluated to check if ${\mathcal {G}}$ is inside the given cone:
       ${\begin{aligned}{\text{Find: }}&P\\{\text{subj. to: }}&P>0\\&{\begin{bmatrix}PA+A^{\top }P+C^{\top }C&PB-cC^{\top }+C^{\top }D\\(PB-cC^{\top }+C^{\top }D)^{\top }&D^{\top }D-c(D+D^{\top })+(c^{2}-r^{2})I\end{bmatrix}}\leq 0.\end{aligned}}$
In order to also find the cone parameters, substituting $\gamma =r^{2}$ as a decision variable with additional constraint $\gamma \geq 0$ and then solving for $c$ via the bisection method will give the cone in which the system ${\mathcal {G}}$ resides if the problem is feasible.

## Conclusion:

The aforementioned LMIs can be utilized to either check if ${\mathcal {G}}$ is in the specified cone or not, or can be used to check the stability of ${\mathcal {G}}$ by finding if a feasible cone can be obtained that encloses ${\mathcal {G}}$. An important point to note here is that the Conic Sector Lemma is a special case of the KYP Lemma for QSR dissipative systems with:
$Q=-1,S=frac{a+b}{2}I=cI,R=-abI=(r^{2}-c^{2})I$.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/Conic_sector_example.m

## Related LMIs

Exterior Conic Sector Lemma.
KYP Lemma

## External Links

A list of references documenting and validating the LMI.
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.

## Return to Main Page:
# State Feedback

      * H-infinity
      * H-2
      * Mixed
      * Stabilization of Second-Order Systems
      * LQ Regulation via H2 Control
      * Controller to achieve the desired Reachable set; Polytopic uncertainty
      * Controller to achieve the desired Reachable set; Norm bound uncertainty
      * Controller to achieve the desired Reachable set; Diagonal Norm-bound uncertainty

# D-Stability

      * Continuous Time D-Stability Controller

# Optimal State Feedback

      * H-infinity
      * H-2
      * Mixed

# Output Feedback

      * H-infinity
      * H-2
      * Mixed

# Static Output Feedback

      * H-infinity
      * H-2
      * Mixed
      * Continuous-Time Static Output Feedback Stabilizability

# Optimal Output Feedback

      * H-infinity
      * H-2
      * Mixed

# Stabilizability LMI

Stabilizability LMI
A system is stabilizable if all unstable modes of the system are controllable. This implies that if the system is controllable, it will also be stabilizable. Thus, stabilizability is a essentially a weaker version of the controllability condition. The LMI condition for stabilizability of pair $(A,B)$ is shown below.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\x(0)&=x_{0},\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $u(t)\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.

## The Data

The matrices necessary for this LMI are $A$ and $B$. There is no restriction on the stability of A.

## The LMI: Stabilizability LMI

$(A,B)$ is stabilizable if and only if there exists $X>0$ such that
       $AX+XA^{T}-BB^{T}<0$,
where the stabilizing controller is given by
       $u(t)=-{\frac {1}{2}}B^{T}X^{-1}x(t)$.

## Conclusion:

If we are able to find $X>0$ such that the above LMI holds it means the matrix pair $(A,B)$ is stabilizable. In words, a system pair $(A,B)$ is stabilizable if for any initial state $x(0)=x_{0}$ an appropriate input $u(t)$ can be found so that the state $x(t)$ asymptotically approaches the origin. Stabilizability is a weaker condition than controllability in that we only need to approach $x(t)=0$ as $t\rightarrow \infty$ whereas controllability requires that the state must reach the origin in a finite time.

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/eoskowro/LMI/blob/master/Stabilizability_LMI.m

## Related LMIs

Hurwitz Stability LMI
Detectability LMI
Controllability Grammian LMI
Observability Grammian LMI

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 6.1.1 and Table 6.1 pp. 166–170, 192.
* A Course in Robust Control Theory: a Convex Approach, - by Geir E. Dullerud and Fernando G. Paganini, Springer, 2011, Section 2.2.3, pp. 71-73.

## Return to Main Page:
# LMI for the Controllability Grammian

LMI to Find the Controllability Gramian
Being able to adjust a system in a desired manor using feedback and sensors is a very important part of control engineering. However, not all systems are able to be adjusted. This ability to be adjusted refers to the idea of a "controllable" system and motivates the necessity of determining the "controllability" of the system. Controllability refers to the ability to accurately and precisely manipulate the state of a system using inputs. Essentially if a system is controllable then it implies that there is a control law that will transfer a given initial state $x(t_{0})=x_{0}$ and transfer it to a desired final state $x(t_{f})=x_{f}$. There are multiple ways to determine if a system is controllable, one of which is to compute the rank "controllability Gramian". If the Gramian is full rank, the system is controllable and a state transferring control law exists.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\x(0)&=x_{0},\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $u(t)\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.

## The Data

The matrices necessary for this LMI are $A$ and $B$. $A$ must be stable for the problem to be feasible.

## The LMI: LMI to Determine the Controllability Gramian

$(A,B)$ is controllable if and only if $W>0$ is the unique solution to
       $AW+WA^{T}+BB^{T}<0$,
where $W$ is the Controllability Gramian.

## Conclusion:

The LMI above finds the controllability Gramian $W$of the system $(A,B)$. If the problem is feasible and a unique $W$ can be found, then we also will be able to say the system is controllable. The controllability Gramian of the system $(A,B)$ can also be computed as: $W=\int _{0}^{\infty }e^{As}BB^{T}e^{A^{T}s}ds$, with control law $u(t)=B^{T}W^{-1}x(t)$ that will transfer the given initial state $x(t_{0})=x_{0}$ to a desired final state $x(t_{f})=x_{f}$.

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/eoskowro/LMI/blob/master/Controllability_Gram_LMI.m

## Related LMIs

Stabilizability LMI
Hurwitz Stability LMI
Detectability LMI
Observability Grammian LMI

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 6.1.1 and Table 6.1 pp. 166–170, 192.
* A Course in Robust Control Theory: a Convex Approach, - by Geir E. Dullerud and Fernando G. Paganini, Springer, 2011, Section 2.2.3, pp. 71-73.

## Return to Main Page:
# LMI for Decentralized Feedback Control

LMI for Decentralized Feedback Control
In large-scale systems like a multi-agent robotic system, national economies, or chemical refineries, an actuator should act based on local information, which necessitates a decentralized or distributed control strategy. In a decentralized control framework, the controllers are distributed and each controller has only access to a subset of local measurements. We describe LMI formulations for a general decentralized control framework and then provide an illustrative example of a decentralized control design.

## The System

In a decentralized controller design, the state feedback controller $u=Kx$ can be divided into $n$ sub-controllers $u_{i}=K_{i}x_{i},\quad i=1,2,...,n$.

## The Data

A general state space representation of a linear time-invariant system is as follows:
${\begin{aligned}&{\dot {x}}=Ax+Bu\\&y=Cx+Du\end{aligned}}$
where $x$ is a $n\times n$ vector of state variables, $B$ is the input matrix, $C$ is the output matrix, and $D$ is called the feedforward matrix. We assume that all the four matrices, $A$, $B$, $C$, and $D$ are given.

## The Optimization Problem

We aim to solve the $H_{\infty }$-optimal full-state feedback control problem using a controller $u=Kx$.
In a decentralized fashion, the control input $u$ can be divided into sub-controllers $u_{1},u_{2},...,u_{j}$ and can be written as $u=[u_{1}\quad u_{2}\quad ...\quad u_{j}]_{1\times n}^{\text{T}}$.
For instance, let $j=3$ and $n=6$. Thus, there are three control inputs $u_{1}$, $u_{2}$, and $u_{3}$. We also assume that u_{1} only depends on the first and the second states, while $u_{2}$ and $u_{3}$ only depend on thrid to sixth states. For this example, the controller gain matrix can be described by:
$K={\begin{bmatrix}k_{1}&k_{2}&0&0&0&0\\0&0&k_{3}&k_{4}&k_{5}&k_{6}\\0&0&k_{7}&k_{8}&k_{9}&k_{10}\\\end{bmatrix}}$
Thus, the decentralized controller gain consists of sub-matrices of gains.

## The LMI: LMI for decentralized feedback controller

The mathematical description of the LMI formulation for a decentralised optimal full-state feedback controller can be described by:
${\begin{aligned}&{\text{min}}\quad \gamma \\&{\begin{bmatrix}YA^{\text{T}}+AY+Z^{\text{T}}B_{2}^{\text{T}}+B_{2}Z&*^{T}&*^{T}\\B_{1}^{T}&-\gamma I&*^{T}\\YC_{1}^{T}+Z^{T}D_{12}&D_{11}&-\gamma I\end{bmatrix}}\end{aligned}}$
where $Y>0$ is a positive definite matrix and $Z$ such that the aforemtntioned constraints in LMIs are satisfied.

## Conclusion:

The controller gain matrix is defined as:
$K={\begin{bmatrix}0&0\\0&F\end{bmatrix}}$
where $F$ can be found after solving the LMIs and obtaining the variables matrices $Y$ and $Z$. Thus,
$F=ZY^{-1}$.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI_for_decentralized_feedback_controller/tree/master

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

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

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{aligned}{\dot {x}}&=Ax+Bu\\y&=Cx+Du\end{aligned}}$
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{aligned}{\text{min}}\quad ||S(P,K)||_{H_{2}}^{2}+||S(P,K)||_{H_{\infty }}^{2}\end{aligned}}$

## 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{aligned}&{\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{aligned}}$
where $\gamma _{1}^{2}$ and $\gamma _{1}^{2}$ are defined as the $H_{2}$ and $H_{\infty }$ norm of the system:
${\begin{aligned}&||S(P,K)||_{H_{2}}^{2}=\gamma _{1}^{2}\\&||S(P,K)||_{H_{\infty }}^{2}=\gamma _{2}^{2}\end{aligned}}$
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

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

# Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty

LMIs in Control/Print version
If the system is quadratically stable, then there exists some $\mu \geq 0,P>0,$ and $Z$ such that the LMI is feasible. The $Z$ and $P$ matrices can also be used to create a quadratically stabilizing controller.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)+Mp(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+Qp(t)+D_{12}u(t),&&\Delta \in \mathbf {\Delta } \;:=\{\Delta \in \mathbb {R} ^{n\times n}:\|\Delta \|\leq 1\}\\\end{aligned}}$

## The Data

The matrices $A,B,M,N,Q,D_{12}$.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0,\mu \geq 0,{\text{ and }}Z:\\{\begin{bmatrix}AP+BZ+PA^{T}+Z^{T}B^{T}&PN^{T}+Z^{T}D_{12}^{T}\\NP+D_{12}Z&0\end{bmatrix}}+\mu {\begin{bmatrix}MM^{T}&MQ^{T}\\QM^{T}&QQ^{T}-I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

There exists a controller for the system with $u(t)=Kx(t)$ where $K=ZP^{-1}$ is the quadratically stabilizing controller, if the above LMI is feasible.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

H-infinity Optimal Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
Stabilizing State-Feedback Controllers with Structured Norm-Bounded Uncertainty
Optimal State-Feedback Controllers with Structured Norm-Bounded Uncertainty

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

## Return to Main Page:
# H-inf Optimal Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty

LMIs in Control/Print version
If there exists some $\mu \geq 0,P>0$, and $Z$ such that the LMI holds, then the system satisfies $\|y\|_{L_{2}}\leq \gamma \|u\|_{L_{2}}.$ There also exists a controller with $u(t)=Kx(t).$

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)+Mp(t)+B_{2}w(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+D_{12}u(t),&&\Delta \in \mathbf {\Delta } \;:=\{\Delta \in \mathbb {R} ^{n\times n}:\|\Delta \|\leq 1\}\\y(t)&=Cx(t)+D_{22}u(t)\\\end{aligned}}$

## The Data

The matrices $A,B,M,B_{2},N,D_{12},C,D_{22}$.

## The Optimization Problem

Minimize $\gamma$ subject to the LMI constraints below.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0,\mu \geq 0,{\text{ and }}Z:\\{\begin{bmatrix}AP+BZ+PA^{T}+Z^{T}B^{T}+B_{2}B_{2}^{T}+\mu MM^{T}&(CP+D_{22}Z)^{T}&PN^{T}+Z^{T}D_{12}^{T}\\CP+D_{22}Z&-\gamma ^{2}I&0\\NP+D_{12}Z&0&-\mu I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

The controller gains, K, are calculated by $K=ZP^{-1}$.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
Stabilizing State-Feedback Controllers with Structured Norm-Bounded Uncertainty
Optimal State-Feedback Controllers with Structured Norm-Bounded Uncertainty

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

## Return to Main Page:
# Stabilizing State-Feedback Controllers with Structured Norm-Bounded Uncertainty

LMIs in Control/Print version
${\begin{aligned}{\text{The system is quadratically stable if and only if there exists some }}\Theta \in P\Theta ,P>0,{\text{ and }}Z{\text{ such that the LMI is feasible.}}{\text{ Furthermore, there exists a quadratically stabilizing controller with }}u(t)=Kx(t).\end{aligned}}$

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)+Mp(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+Qp(t)+D_{12}u(t),&&\Delta \in {\bf {{\Delta }\;,||\Delta ||\leq 1}}\\\end{aligned}}$

## The Data

The matrices $A,B,M,N,Q,D_{12}$.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0,Z:\\{\begin{bmatrix}AP+BZ+PA^{T}+Z^{T}B^{T}&PN^{T}+Z^{T}D_{12}^{T}\\NP+D_{12}Z&0\end{bmatrix}}+{\begin{bmatrix}M\Theta M^{T}&M\Theta Q^{T}\\Q\Theta M^{T}&Q\Theta Q^{T}-\Theta \end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

If the LMI is feasible, the controller, K, is calculated by $K=ZP^{-1}$.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
H-infinity Optimal Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
Optimal State-Feedback Controllers with Structured Norm-Bounded Uncertainty

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

## Return to Main Page:
# Optimal State-Feedback Controllers with Structured Norm-Bounded Uncertainty

LMIs in Control/Print version
${\begin{aligned}{\text{If there exists some }}\Theta \in P\Theta ,P>0,{\text{ and }}Z{\text{ such that the LMI is feasible, then the system satisfies }}||y||_{L_{2}}\leq \gamma ||u||_{L_{2}}.{\text{ There also exists a controller with }}u(t)=Kx(t).\end{aligned}}$

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)+Mp(t)+B_{2}w(t),&&p(t)=\Delta (t)q(t),\\q(t)&=Nx(t)+D_{12}u(t),&&\Delta \in {\bf {{\Delta }\;,||\Delta ||\leq 1}}\\y(t)&=Cx(t)+D_{22}u(t)\\\end{aligned}}$

## The Data

The matrices $A,B,M,B_{2},N,D_{12},C,D_{22}$.

## The Optimization Problem

${\text{Minimize }}\gamma$ subject to the LMI constraints.

## The LMI:

       ${\begin{aligned}{\text{Find}}\;&P>0,Z:\\{\begin{bmatrix}AP+BZ+PA^{T}+Z^{T}B^{T}+B_{2}B_{2}^{T}+M\Theta M^{T}&(CP+D_{22}Z)^{T}&PN^{T}+Z^{T}D_{12}^{T}\\CP+D_{22}Z&-\gamma ^{2}I&0\\NP+D_{12}Z&0&-\Theta \end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

The controller is $K=ZP^{-1}$.

## Implementation

https://github.com/mcavorsi/LMI

## Related LMIs

Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
H-infinity Optimal Quadratically Stabilizing Controllers with Parametric Norm-Bounded Uncertainty
Stabilizing State-Feedback Controllers with Structured Norm-Bounded Uncertainty

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.

## Return to Main Page:
# $H_{\infty }$ Optimal Output Controllability for Systems With Transients

$H_{\infty }$ Optimal Output Controllability for Systems With Transients
This LMI provides an $H_{\infty }$ optimal output controllability problem to check if such controllers for systems with unknown exogenous disturbances and initial conditions can exist or not.

## The System

    ${\begin{aligned}{\dot {x}}&=Ax+B_{1}v+B_{2}u,x(0)=x_{0},\\z&=C_{1}x+D_{11}v+D_{12}u,\\y&=C_{2}x+D_{21}v,\end{aligned}}$
where $x\in \mathbb {R} ^{n}$ is the state, $v\in \mathbb {R} ^{r}$ is the exogenous input, $u\in \mathbb {R} ^{m}$ is the control input, $y\in \mathbb {R} ^{p}$ is the measured output and $z\in \mathbb {R} ^{s}$ is the regulated output.

## The Data

System matrices $(A,B_{1},B_{2},C_{1},C_{2},D_{11},D_{12},D_{21},D_{22})$ need to be known. It is assumed that $v\in L_{2}[0,\infty )$. $N_{1},N_{2}$ are matrices with their columns forming the bais of kernels of $C_{2}D_{21}$ and $C_{2}D_{12}$ respectively.

## The Optimization Problem

For a given $\gamma$, the following $H_{\infty }$ condition needs to be fulfilled:
$\gamma _{w}=sup_{\|v\|_{\infty }^{2}+x_{0}^{\top }Rx_{0}\neq 0}{\frac {\|z\|_{\infty }}{(\|v\|_{\infty }^{2}+x_{0}^{\top }Rx_{0})^{1/2}}}<\gamma _{w},$

## The LMI: $H_{\infty }$ Output Feedback Controller for Systems With Transients

       ${\begin{aligned}&{\text{min}}_{\gamma ,X_{11},Y_{11}}:\gamma \\&{\text{subj. to: }}X_{11}>0,Y_{11}>0,\\&\quad {\begin{bmatrix}N_{1}&0\\0&I\end{bmatrix}}^{\top }{\begin{bmatrix}A^{\top }X_{11}+X_{11}A&X_{11}B_{1}&C_{1}^{\top }\\*&-\gamma ^{2}I&D_{11}^{\top }\\*&*&-I\end{bmatrix}}{\begin{bmatrix}N_{1}&0\\0&I\end{bmatrix}}<0,\\&\quad {\begin{bmatrix}N_{2}&0\\0&I\end{bmatrix}}^{\top }{\begin{bmatrix}AY_{11}+Y_{11}A^{\top }&Y_{11}C_{1}^{\top }&B_{1}\\*&-I&D_{11}\\*&*&-\gamma ^{2}I\end{bmatrix}}{\begin{bmatrix}N_{2}&0\\0&I\end{bmatrix}}<0,\\&\quad {\begin{bmatrix}X_{11}&I\\I&Y_{11}\end{bmatrix}}\geq 0,X_{11}<\gamma ^{2}R,\end{aligned}}$

## Conclusion:

Solution of the above LMI gives a check to see if an $H_{\infty }$ optimal output controller for systems with transients can exist or not.

## Implementation

A link to CodeOcean or other online implementation of the LMI

## Related LMIs

Links to other closely-related LMIs

## External Links

* LMI-based $H_{\infty }$-optimal control with transients Link to the original article.

## Return to Main Page:
# Quadratic Polytopic Stabilization

A Quadratic Polytopic Stabilization Controller Synthesis can be done using this LMI, requiring the information about $A$,$\Delta _{A(t)}$ ,$B$ and $\Delta _{B(t)}$ matrices.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\x(0)&=x_{0},\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $u(t)\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.
The system consist of uncertainties of the following form
    ${\begin{aligned}\Delta _{A(t)}=A_{1}\delta _{1}(t)+....+A_{k}\delta _{k}(t)\\\Delta _{B(t)}=B_{1}\delta _{1}(t)+....+B_{k}\delta _{k}(t)\\\end{aligned}}$
where $x\in \mathbb {R} ^{m}$,$u\in \mathbb {R} ^{n}$,$A\in \mathbb {R} ^{mxm}$ and $B\in \mathbb {R} ^{mxn}$

## The Data

The matrices necessary for this LMI are $A$,$\Delta _{A(t)}\,ie\,A_{i}$ ,$B$ and $\Delta _{B(t)}\,ie\,B_{i}$

## The Optimization and LMI:LMI for Controller Synthesis using the theorem of Polytopic Quadratic Stability

There exists a K such that
    ${\begin{aligned}{\dot {x}}(t)&=(A+\Delta _{A}+(B+\Delta _{B})K)x(t)\\\end{aligned}}$
is quadratically stable for $(\Delta _{A},\Delta _{B})\in C_{0}((A_{1},B_{2}),...,(A_{k},B_{k}))$ if and only if there exists some P>0 and Z such that
    ${\begin{aligned}(A+A_{i})P+P(A+A_{i})^{T}+(B+B_{i})Z+Z^{T}(B+B_{i})^{T}<0\quad for\quad i=1,...k.\end{aligned}}$

## Conclusion:

The Controller gain matrix is extracted as $K=ZP^{-1}$
Note that here the controller doesn't depend on $\Delta$
* If you want K to depend on $\Delta$ , the problem is harder.
* But this would require sensing $\Delta$ in real-time.

## Implementation

This implementation requires Yalmip and Sedumi. https://github.com/JalpeshBhadra/LMI/blob/master/quadraticpolytopicstabilization.m

## Related LMIs

Quadratic Polytopic $H_{\infty }$ Controller
Quadratic Polytopic $H_{2}$ Controller

## 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.

# Quadratic D-Stabilization

Continuous-Time D-Stability Controller
This LMI will let you place poles at a specific location based on system performance like rising time, settling time and percent overshoot, while also ensuring the stability of the system.

## The System

Suppose we were given the continuous-time system
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)+Du(t)\end{aligned}}$
whose stability was not known, and where $A\in \mathbb {R} ^{mxm}$, $B\in \mathbb {R} ^{mxn}$, $C\in \mathbb {R} ^{pxm}$, and $D\in \mathbb {R} ^{qxn}$ for any $t\in \mathbb {R}$.
Adding uncertainty to the system
    ${\begin{aligned}{\dot {x}}(t)&=(A+A_{i})x(t)+(B+B_{i})u(t)\\\end{aligned}}$

## The Data

In order to properly define the acceptable region of the poles in the complex plane, we need the following pieces of data:
      * matrices $A$, $B$, $A_{i}$, $B_{i}$
      * rise time ($t_{r}$)
      * settling time ($t_{s}$)
      * percent overshoot ($M_{p}$)
Having these pieces of information will now help us in formulating the optimization problem.

## The Optimization Problem

Using the data given above, we can now define our optimization problem. In order to do that, we have to first define the acceptable region in the complex plane that the poles can lie on using the following inequality constraints:
Rise Time: $\omega _{n}{\leq }{1.8 \over t_{r}}$
Settling Time: $\sigma {\leq }{-4.6 \over t_{s}}$
Percent Overshoot: $\sigma {\leq }{-ln({M_{p}}) \over {\pi }}|{\omega _{d}}|$
Assume that $z$ is the complex pole location, then:
       ${\begin{aligned}{\omega _{n}}^{2}=\|z\|^{2}&=z^{*}z\\{\omega _{d}}=Im{z}&={(z-z^{*}) \over 2}\\{\sigma }=Re{z}&={(z+z^{*}) \over 2}\end{aligned}}$
This then allows us to modify our inequality constraints as:
Rise Time: $z^{*}z-{1.8^{2} \over {t_{r}}^{2}}{\leq }0$
Settling Time: ${(z+z^{*}) \over 2}+{4.6 \over t_{s}}{\leq }0$
Percent Overshoot: $z-z^{*}+{{\pi } \over ln({M_{p}})}|z+z^{*}|{\leq }0$
which not only allows us to map the relationship between complex pole locations and inequality constraints but it also now allows us to easily formulate our LMIs for this problem.

## The LMI: An LMI for Quadratic D-Stabilization

Suppose there exists $X>0$ and $Z$ such that
       ${\begin{aligned}{\begin{bmatrix}-rP&&AP+BZ\\(AP+BZ)^{T}&&-rP\end{bmatrix}}+{\begin{bmatrix}0&&A_{i}P+B_{i}Z\\(A_{i}P+B_{i}Z)^{T}&&0\end{bmatrix}}<0\\AP+BZ+(AP+BZ)^{T}+A_{i}P+B_{i}Z+(A_{i}P+B_{i}Z)^{T}+2\alpha P&<0,and\\\end{aligned}}$
       ${\begin{aligned}{\begin{bmatrix}AP+BZ+(AP+BZ)^{T}&&c(AP+BZ-(AP+BZ)^{T})\\c((AP+BZ)^{T}-(AP+BZ))&&AP+BZ+(AP+BZ)^{T}\end{bmatrix}}+{\begin{bmatrix}A_{i}P+B_{i}Z+(A_{i}P+B_{i}Z)^{T}&&c(A_{i}P+B_{i}Z-(A_{i}P+B_{i}Z)^{T})\\c((A_{i}P+B_{i}Z)^{T}-(A_{i}P+B_{i}Z))&&A_{i}P+B_{i}Z+(A_{i}P+B_{i}Z)^{T}\end{bmatrix}}<0\\\end{aligned}}$
for $i=1,...,k$

## Conclusion:

Given the resulting controller $K=ZP^{-1}$, we can now determine that the pole locations $z\in \mathbb {C}$ of $A(\Delta )+B(\Delta )K$ satisfies the inequality constraints $|x|{\leq }r$, $Re(x){\leq }-{\alpha }$ and $z+z^{*}{\leq }-c|z-z^{*}|$ for all $\,\Delta \,\in \,C_{0}(\Delta _{1},...,\Delta _{k})$

## Implementation

The implementation of this LMI requires Yalmip and Sedumi https://github.com/JalpeshBhadra/LMI/blob/master/quadraticDstabilization.m

## Related LMIs

      * Continuous Time D-Stability Observer - Equivalent D-stability LMI for a continuous-time observer.

## 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.

## Return to Main Page:
# Quadratic Polytopic Full State Feedback Optimal $H_{\infty }$ Control
## Quadratic Polytopic Full State Feedback Optimal $H_{\infty }$ Control

For a system having polytopic uncertainties, Full State Feedback is a control technique that attempts to place the system's closed-loop system poles in specified locations based off of performance specifications given. $H_{\infty }$ methods formulate this task as an optimization problem and attempt to minimize the $H_{\infty }$ norm of the system.

## The System

Consider System with following state-space representation.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}q(t)+B_{2}w(t)\\p(t)&=C_{1}x(t)+D_{11}q(t)+D_{12}w(t)\\z(t)&=C_{2}x(t)+D_{21}q(t)+D_{22}w(t)\\\end{aligned}}$
where $x\in \mathbb {R} ^{m}$ , $q\in \mathbb {R} ^{n}$ , $w\in \mathbb {R} ^{g}$, $A\in \mathbb {R} ^{mxm}$, $B_{1}\in \mathbb {R} ^{mxn}$, $B_{2}\in \mathbb {R} ^{mxg}$, $p\in \mathbb {R} ^{p}$ , $C_{1}\in \mathbb {R} ^{pxm}$, $D_{11}\in \mathbb {R} ^{pxn}$, $D_{12}\in \mathbb {R} ^{pxg}$, $z\in \mathbb {R} ^{s}$, $C_{2}\in \mathbb {R} ^{sxm}$, $D_{21}\in \mathbb {R} ^{sxn}$ , $D_{22}\in \mathbb {R} ^{sxg}$ for any $t\in \mathbb {R}$.
Add uncertainty to system matrices
    $A,B_{1},B_{2},C_{1},C_{2},D_{11},D_{12}$
New state-space representation
    ${\begin{aligned}{\dot {x}}(t)&=(A+A_{i})x(t)+(B_{1}+B_{i})q(t)+(B_{2}+B_{i})w(t)\\p(t)&=(C_{1}+C_{i})x(t)+(D_{11}+D_{i})q(t)+(D_{12}+D_{i})w(t)\\z(t)&=C_{2}x(t)+D_{21}q(t)+D_{22}w(t)\\\end{aligned}}$

## The Optimization Problem:

Recall the closed-loop in state feedback is:
$S(P,K)=$
       ${\begin{aligned}{\begin{bmatrix}A+B_{2}F&&B_{1}\\C_{1}+D_{12}F&&D_{11}\end{bmatrix}}\\\end{aligned}}$
This problem can be formulated as $H\infty$ optimal state-feedback, where K is a controller gain matrix.

## The LMI:

An LMI for Quadratic Polytopic $H\infty$ Optimal State-Feedback Control $||S(P(\Delta ),K(0,0,0,F))||_{H\infty }\leq \gamma$
$Y>0$
       ${\begin{aligned}{\begin{bmatrix}Y(A+A_{i})^{T}+(A+A_{i})Y+Z^{T}(B_{2}+B_{1,i})^{T}+(B_{2}+B_{1,i})Z&&*^{T}&&*^{T}\\(B_{1}+B_{1,i})^{T}&&-\gamma I&&*^{T}\\(C_{1}+C_{1,i})Y+(D_{12}+D_{12,i})Z&&(D_{11}+D_{11,i})&&-\gamma I\end{bmatrix}}<0\end{aligned}}$

## Conclusion:

The $H\infty$ Optimal State-Feedback Controller is recovered by $F=ZY^{-1}$
Controller will determine the bound $\gamma$ on the $H_{\infty }$ norm of the system.

## Implementation:

https://github.com/JalpeshBhadra/LMI/tree/master

## Related LMIs

Full State Feedback Optimal $H_{\infty }$ Controller

## 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.

# Quadratic Polytopic Full State Feedback Optimal $H_{2}$ Control

LMIs in Control/Print version

## Quadratic Polytopic Full State Feedback Optimal $H_{2}$ Control

For a system having polytopic uncertainties, Full State Feedback is a control technique that attempts to place the system's closed-loop system poles in specified locations based on performance specifications given, such as requiring stability or bounding the overshoot of the output. By minimizing the $H_{2}$ norm of this system we are minimizing the effect noise has on the system as part of the performance specifications.

## The System

Consider System with following state-space representation.
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}q(t)+B_{2}w(t)\\p(t)&=C_{1}x(t)+D_{11}q(t)+D_{12}w(t)\\z(t)&=C_{2}x(t)+D_{21}q(t)+D_{22}w(t)\\\end{aligned}}$
where $x\in \mathbb {R} ^{m}$ , $q\in \mathbb {R} ^{n}$ , $w\in \mathbb {R} ^{g}$, $A\in \mathbb {R} ^{mxm}$, $B_{1}\in \mathbb {R} ^{mxn}$, $B_{2}\in \mathbb {R} ^{mxg}$, $p\in \mathbb {R} ^{p}$ , $C_{1}\in \mathbb {R} ^{pxm}$, $D_{11}\in \mathbb {R} ^{pxn}$, $D_{12}\in \mathbb {R} ^{pxg}$, $z\in \mathbb {R} ^{s}$, $C_{2}\in \mathbb {R} ^{sxm}$, $D_{21}\in \mathbb {R} ^{sxn}$ , $D_{22}\in \mathbb {R} ^{sxg}$ for any $t\in \mathbb {R}$.
Add uncertainty to system matrices
    $A,B_{1},B_{2},C_{1},C_{2},D_{11},D_{12}$
New state-space representation
    ${\begin{aligned}{\dot {x}}(t)&=(A+A_{i})x(t)+(B_{1}+B_{i})q(t)+(B_{2}+B_{i})w(t)\\p(t)&=(C_{1}+C_{i})x(t)+(D_{11}+D_{i})q(t)+(D_{12}+D_{i})w(t)\\z(t)&=C_{2}x(t)+D_{21}q(t)+D_{22}w(t)\\\end{aligned}}$

## The Data

The matrices necessary for this LMI are

## The Optimization Problem:

Recall the closed-loop in state feedback is:
$S(P,K)=$
       ${\begin{aligned}{\begin{bmatrix}A+B_{22}F&&B_{1}\\C_{1}+D_{12}F&&D_{11}\end{bmatrix}}\\\end{aligned}}$
This problem can be formulated as $H_{2}$ optimal state-feedback, where K is a controller gain matrix.

## The LMI: An LMI for Quadratic Polytopic $H_{2}$ Optimal

State-Feedback Control
$||S(P(\Delta ),K(0,0,0,F))||_{H_{2}}\leq \gamma$
$X>0$
       ${\begin{aligned}{\begin{bmatrix}AX+B_{2}Z+XA^{T}+Z^{T}B_{2}^{T}&&B_{1}\\B_{1}^{T}&&-I\end{bmatrix}}+{\begin{bmatrix}A_{i}X+B_{2,i}Z+XA_{i}^{T}+Z^{T}B_{2,I}^{T}&&B_{1,i}\\B_{1,i}^{T}&&0\end{bmatrix}}<0\quad i=1,......,k\end{aligned}}$
       ${\begin{aligned}{\begin{bmatrix}X&&(C_{1}X+D_{12}Z)^{T}\\C_{1}X+D_{12}Z&&W\end{bmatrix}}+{\begin{bmatrix}0&&(C_{1,i}X+D_{12,i}Z)^{T}\\C_{1,i}X+D_{12,i}Z&&0\end{bmatrix}}>0\quad i=1,......,k\end{aligned}}$
       ${\begin{aligned}\\TraceW<\gamma \end{aligned}}$

## Conclusion:

The $H_{2}$ Optimal State-Feedback Controller is recovered by $F=ZX^{-1}$

## Implementation:

https://github.com/JalpeshBhadra/LMI/blob/master/H2_optimal_statefeedback_controller.m

## Related LMIs

$H_{2}$ Optimal State-Feedback Controller

## 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.

# Continuous-Time Static Output Feedback Stabilizability

LMIs in Control/Print version
In view of applications, static feedback of the full state is not feasible in general: only a few of the state variables (or a linear combination of them, $y=Cx(t)$, called the output) can be actually measured and re-injected into the system.
So, we are led to the notion of static output feedback

## The System

Consider the continuous-time LTI system, with generalized state-space realization $(A,B,C,0)$
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)\\\end{aligned}}$

## The Data

* $A\in \mathbb {R} ^{n\times n},B\in \mathbb {R} ^{n\times m},C\in \mathbb {R} ^{p\times n}$
* $x\in \mathbb {R} ^{n},y\in \mathbb {R} ^{p},u\in \mathbb {R} ^{m}$

## The Optimization Problem

This system is static output feedback stabilizable (SOFS) if there exists a matrix F such that the closed-loop system
${\dot {x}}=(A-BKC)x$
(obtained by replacing $u=-Ky$ which means applying static output feedback) is asymptotically stable at the origin

## The LMI: LMI for Continuous Time - Static Output Feedback Stabilizability

The system is static output feedback stabilizable if and only if it satisfies any of the following conditions:
* There exists a $K\in \mathbb {R} ^{m\times p}$ and $P\in \mathbb {S} ^{n}$, where $P>0$, such that
    ${\begin{bmatrix}A^{T}P+PA-PBB^{T}P&PB+C^{T}K^{T}\\KC+B^{T}P&-1\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
* There exists a $K\in \mathbb {R} ^{m\times p}$ and $Q\in \mathbb {S} ^{n}$, where $Q>0$, such that
    ${\begin{bmatrix}QA^{T}+AQ-QC^{T}CQ&BK+QC^{T}\\CQ^{T}+K^{T}B^{T}&-1\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
* There exists a $K\in \mathbb {R} ^{m\times p}$ and $Q\in \mathbb {S} ^{n}$, where $Q>0$, such that
    ${\begin{bmatrix}QA^{T}+AQ-BB^{T}&B+QC^{T}K^{T}\\B^{T}+KCQ^{T}&-1\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
* There exists a $K\in \mathbb {R} ^{m\times p}$ and $P\in \mathbb {S} ^{n}$, where $P>0$, such that
    ${\begin{bmatrix}A^{T}P+PA-C^{T}C&PBK+C^{T}\\K^{T}B^{T}P&-1\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$

## Conclusion

On implementation and optimization of the above LMI using YALMIP and MOSEK (or) SeDuMi we get 2 output matrices one of which is the Symmeteric matrix $P$ (or $Q$) and $K$

## Implementation

A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/LMI_wikibooks

## Related LMIs

Discrete time Static Output Feedback Stabilizability
Static Feedback Stabilizability

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* D. d. S. Madeira and J. Adamy, "Static output feedback: An LMI condition for stabilizability based on passivity indices," 2016 IEEE Conference on Control Applications (CCA), Buenos Aires, 2016, pp. 960-965.

## Return to Main Page:
# Multi-Criterion LQG

LMIs in Control/Print version
The Multi-Criterion Linear Quadratic Gaussian (LQG) linear matrix inequality will allow one to form an optimized controller, similar to that in an LQR framework, for a state space system with gaussian noise based on several different criterions defined in the Q and R matrices, that are optimized as a part of the arbitrary cost function. Just like traditional LQR, the cost matrices must be tuned in much a similar fashion as traditional gains in classical control. In the LQR and LQG framework however, the gains are more intuitive as each correlates directly to a state or an input.

## The System

The system is a linear time-invariant system, that can be represented in state space as shown below:
    ${\begin{aligned}{\dot {x}}&=Ax+Bu+w,\\y&=Cx+v,\\z&={\begin{bmatrix}Q^{1/2}&0\\0&R^{1/2}\end{bmatrix}}{\begin{bmatrix}x\\u\end{bmatrix}}\end{aligned}}$
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,Q,R$ 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,Q,R$ is $\in R^{m*n}$ and are the output matrices, and $y$ and $z$ are $\in R^{m}$ and are the output and the output of interest, respectively.
$Q\geq 0$ and $R>0$, and the system is controllable and observable.

## The Data

The matrices $A,B,C,Q,R,W,V$ and the noise signals $w,v$.

## The Optimization Problem

In the Linear Quadratic Gaussian (LQG) control problem, the goal is to minimize a quadratic cost function while the plant has random initial conditions and suffers white noise disturbance on the input and measurement.
There are multiple outputs of interest for this problem. They are defined by
    ${\begin{aligned}z&={\begin{bmatrix}Q^{1/2}&0\\0&R^{1/2}\end{bmatrix}}{\begin{bmatrix}x\\u\end{bmatrix}},Q_{i}\geq 0,R_{i}>0,i=0,...,p.\end{aligned}}$
For each of these outputs of interest, we associate a cost function:
    ${\begin{aligned}J_{LQG}^{i}=\lim _{t\to \infty }Ez_{i}(t)^{T}z_{i}(t),i=0,...,p.\end{aligned}}$
Additionally, the matrices $X_{LQG}$ and $Y_{LQG}$ must be found as the solutions to the following Riccati equations:
    ${\begin{aligned}A^{T}X_{LQG}+X_{LQG}A=X_{LQG}BR^{-1}B^{T}X_{LQG}+Q&=0\\AY_{LQG}+Y_{LQG}A^{T}-Y_{LQG}C^{T}V^{-1}CY_{LQG}+W&=0\\\end{aligned}}$
The optimization problem is to minimize $J_{LQG}^{0}$ over u subject to the measurability condition and the constraints $J_{LQG}^{i}<\gamma _{i},i=0,...,p.$. This optimization problem can be formulated as:
    ${\begin{aligned}\max trace(X_{LQG}U+QY_{LQG})-\sum _{i=1}^{p}\gamma _{i}\tau _{i},\end{aligned}}$
over $\tau _{1},...,\tau _{p}$, with:
    ${\begin{aligned}Q&=Q_{0}+\sum _{i=1}^{p}\tau _{i}Q_{i},\\R&=R_{0}+\sum _{i=1}^{p}\tau _{i}R_{i}.\end{aligned}}$

## The LMI: Multi-Criterion LQG

       ${\begin{aligned}\max :trace(XU+(Q_{0}+\sum _{i=1}^{p}\tau _{i}Q_{i})Y_{LQG})-\sum _{i=1}^{p}\gamma _{i}\tau _{i},\end{aligned}}$
over $X,\tau _{1},...\tau _{p}$, subject to the following constraints:
       ${\begin{aligned}X&>0,\\\tau _{1}\geq 0,...,\tau _{p}&\geq 0,\\A^{T}X+XA-XB(R_{0}+\sum _{i=1}^{p}\tau _{i}R_{i})^{-1}B^{T}X+Q_{0}+\sum _{i=1}^{p}\tau _{i}Q_{i}&\geq 0.\\\end{aligned}}$

## Conclusion:

The result of this LMI is the solution to the aforementioned Ricatti equations:
    ${\begin{aligned}A^{T}X_{LQG}+X_{LQG}A=X_{LQG}BR^{-1}B^{T}X_{LQG}+Q&=0\\AY_{LQG}+Y_{LQG}A^{T}-Y_{LQG}C^{T}V^{-1}CY_{LQG}+W&=0\\\end{aligned}}$

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/rezajamesahmed/LMImatlabcode/blob/master/multicriterionquadraticproblems.m

## Related LMIs

      * Inverse Problem of Optimal Control

## 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.

## Return to Main Page:
# Inverse Problem of Optimal Control

LMIs in Control/Print version
In some cases, it is needed to solve the inverse problem of optimal control within an LQR framework. In this inverse problem, a given controller matrix needs to be verified for the system by assuring that it is the optimal solution to some LQR optimization problem that is controllable and detectable. In other words: in this inverse problem, the controller is known and the LQR gain matrices are to be calculated such that the controller is the optimal solution.

## The System

The system is a linear time-invariant system, that can be represented in state space as shown below:
    ${\begin{aligned}{\dot {x}}&=Ax+Bu,\\z&={\begin{bmatrix}Q^{1/2}&0\\0&R^{1/2}\end{bmatrix}}{\begin{bmatrix}x\\u\end{bmatrix}}\end{aligned}}$
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,Q,R$ 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,Q,R$ is $\in R^{m*n}$ and are the output matrices, and $y$ and $z$ are $\in R^{m}$ and are the output and the output of interest, respectively.

## The Data

The matrices $A,B,C$ that define the system, and a given controller $K$ for which the inverse problem is to be solved.

## The Optimization Problem

In this LMI, the following cost function is to be minimized for a given controller K by finding an optimal input:
    ${\begin{aligned}\int _{0}^{\infty }z^{T}zdt\end{aligned}}$
the solution of the problem can be formulated as a state feedback controller given as:
    ${\begin{aligned}K&=-R^{-1}B^{T}P,\\A^{T}P+PA-PBR^{-1}B^{T}P+Q&=0\end{aligned}}$

## The LMI: Inverse Problem of Optimal Control

the inverse problem of optimal control is the following: Given a matrix $K$, determine if there exist $Q\geq 0$ and $R>0$, such that $(Q,A)$ is detectable and $u=Kx$ is the optimal control for the corresponding LQR problem. Equivalently, we seek $R>0$ and $Q\geq 0$ such that there exist $P$ nonnegative and $P_{1}$ positive-definite satisfying
    ${\begin{aligned}(A+BK)^{T}P+P(A+BK)+K^{T}RK+Q&=0\\B^{T}P+RK&=0\\A^{T}P_{1}+P_{1}A&<Q\end{aligned}}$

## Conclusion:

If the solution exists, then $K$ is the optimal controller for the LQR optimization on the matrices $Q$ and $R$

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/rezajamesahmed/LMImatlabcode/blob/master/inverseprob.m

## Related LMIs

      * Multi-Criterion LQG]

## 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.

## Return to Main Page:
# Nonconvex Multi-Criterion Quadratic Problems

LMIs in Control/Print version
The Non-Concex Multi-Criterion Quadratic linear matrix inequality will allow one to form an optimized controller, similar to that in an LQR framework, for a non-convex state space system based on several different criterions defined in the Q and R matrices, that are optimized as a part of the arbitrary cost function. Just like traditional LQR, the cost matrices must be tuned in much a similar fashion as traditional gains in classical control. In the LQR and LQG framework however, the gains are more intuitive as each correlates directly to a state or an input.

## The System

The system for this LMI is a linear time invariant system that can be represented in state space as shown below:
    ${\begin{aligned}{\dot {x}}&=Ax+Bw,x(0)=x_{0}\\\end{aligned}}$
where the system is assumed to be controllable.
where $x\in R^{n}$ represents the state vector, respectively, $w\in R^{p}$ is the disturbance vector, and $A,B$ 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.
for any input, we define a set $p+1$ cost indices $J_{0},...,J_{P}$ by
    ${\begin{aligned}J_{i}(u)=\int _{0}^{\infty }{\begin{bmatrix}x^{T}&u^{T}\end{bmatrix}}{\begin{bmatrix}Q_{i}&C_{i}\\C_{i}^{T}&R_{i}\end{bmatrix}}{\begin{bmatrix}x\\u\end{bmatrix}}dt,\\i=0,...,p\end{aligned}}$
Here the symmetric matrices,
    ${\begin{aligned}{\begin{bmatrix}Q_{i}&C_{i}\\C_{i}^{T}&R_{i}\end{bmatrix}},i=0,...,p\end{aligned}}$,
are not necessarily positive-definite.

## The Data

The matrices $A,B,C$.

## The Optimization Problem

The constrained optimal control problem is:
       ${\begin{aligned}\max :J_{0},\\\end{aligned}}$
subject to
       ${\begin{aligned}J_{i}\leq \gamma _{i},i=1,...,p,x\rightarrow 0,t\rightarrow \infty \end{aligned}}$

## The LMI: Nonconvex Multi-Criterion Quadratic Problems

The solution to this problem proceeds as follows: We first define
    ${\begin{aligned}Q=Q_{0}+\sum _{i=1}^{p}\tau _{i}Q_{i},\\R=R_{0}+\sum _{i=1}^{p}\tau _{i}R_{i},\\C=C_{0}+\sum _{i=1}^{p}\tau _{i}C_{i},\\\end{aligned}}$
where $\tau _{i}\geq 0$ and for every $\tau _{i}$, we define
    ${\begin{aligned}S=J_{0}+\sum _{i=1}^{p}\tau _{i}J_{i}-\sum _{i=1}^{p}\tau _{i}\gamma _{i}\end{aligned}}$
then, the solution can be found by:
    ${\begin{aligned}\max :x(0)^{T}Px(0)-\sum _{i=1}^{p}\tau _{i}\gamma _{i}\end{aligned}}$
subject to
    ${\begin{aligned}{\begin{bmatrix}A^{T}P+PA+Q&PQ+C^{T}\\B^{T}P+C&R\end{bmatrix}}&\geq 0\\\tau _{i}&\geq 0\end{aligned}}$

## Conclusion:

If the solution exists, then $K$ is the optimal controller and can be solved for via an EVP in P.

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/rezajamesahmed/LMImatlabcode/blob/master/multicriterionquadraticproblems.m

## Related LMIs

      * Multi-Criterion LQG
      * Inverse Problem of Optimal Control
      * Nonconvex Multi-Criterion Quadratic Problems
      * Static-State Feedback Problem

## 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.

## Return to Main Page:
# Static-State Feedback Problem

LMIs in Control/Print version
We are attempting to stabilizing The Static State-Feedback Problem

## The System

Consider a continuous time Linear Time invariant system
    ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\\end{aligned}}$

## The Data

$A,B$ are known matrices

## The Optimization Problem

The Problem's main aim is to find a feedback matrix such that the system
    ${\begin{aligned}{\dot {x}}(t)=Ax(t)+Bu(t)\\\end{aligned}}$
and
    ${\begin{aligned}u(t)=Kx(t)\\\end{aligned}}$
is stable Initially we find the $K$ matrix such that $(A+BK)$ is Hurwitz.

## The LMI: Static State Feedback Problem

This problem can now be formulated into an LMI as Problem 1:
    $X(A+BK)+(A+BK)^{T}X<0$
From the above equation $X>0$ and we have to find K
The problem as we can see is bilinear in $K,X$
* The bilinear in X and K is a common paradigm
* Bilinear optimization is not Convex. To Convexify the problem, we use a change of variables.
Problem 2:
    $AP+BZ+PA^{T}+Z^{T}B^{T}<0$
where $P>0$ and we find $Z$ $K=ZP^{-1}$
The Problem 1 is equivalent to Problem 2

## Conclusion

If the (A,B) are controllable, We can obtain a controller matrix that stabilizes the system.

## Implementation

A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/ygovada

## Related LMIs

Hurwitz Stability

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* -Mathworks reference to DC Gain

## Return to Main Page:
# Mixed H2 Hinf with desired pole location control

LMI for Mixed $H_{2}/H_{\infty }$ with desired pole location 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 and additional constraint is used to place poles at desired location.

## The System

We consider the following state-space representation for a linear system:
${\begin{aligned}{\dot {x}}&=Ax+B_{1}u+B_{2}w\\z_{\infty }&=C_{\infty }+D_{\infty 1}u+D_{\infty 2}w\\z_{2}&=C_{2}x+D_{21}u\end{aligned}}$
where
* $x\in \mathbb {R} ^{n}$, $z_{2},z_{\infty }\in \mathbb {R} ^{m}$are the state vector and the output vectors, respectively
* $w\in \mathbb {R} ^{p}$, $u\in \mathbb {R} ^{r}$ are the disturbance vector and the control vector
* $A$, $B_{1}$,$B_{2}$, $C_{\infty }$,$C_{2}$,$D_{\infty 1}$,$D_{\infty 2}$, and $D_{21}$ are the system coefficient matrices of appropriate dimensions

## The Data

We assume that all the four matrices of the plant,$A$, $B_{1}$,$B_{2}$, $C_{\infty }$,$C_{2}$,$D_{\infty 1}$,$D_{\infty 2}$, and $D_{21}$ are given.

## The Optimization Problem

For the system with the following feedback law: $u=Kx$
The closed loop system can be obtained as: ${\begin{aligned}{\dot {x}}&=(A+B_{1}K)x+B_{2}w\\z_{\infty }&=(C_{\infty }+D_{\infty 1}K)x+D_{\infty 2}w\\z_{2}&=(C_{2}+D_{21}K)u\end{aligned}}$
the transfer function matrices are $G_{z\infty w}(s)$ and $G_{z2w}(s)$
Thus the $H_{\infty }$ performance and the $H_{2}$ performance requirements for the system are, respectiverly
$||G_{z\infty w}(s)||_{\infty }<\gamma _{\infty }$
and
$||G_{z2w}(s)||_{2}<\gamma _{2}$ . For the performance of the system response, we introduce the closed-loop eigenvalue location requirement. Let
$D={s|s\in C,L+sM+sM^{T}<0},$
It is a region on the complex plane, which can be used to restrain the closed-loop eigenvalue locations. Hence a state feedback control law is designed such that,
* The $H_{\infty }$ performance and the $H_{2}$ performance are satisfied.
* The closed-loop eigenvalues are all located in $D$, that is,
$\,\,\,\,\,$ $\lambda (A+B_{1}K)\subset D$.

## The LMI: LMI for mixed $H_{2}$/$H_{\infty }$ with desired Pole locations

The optimization problem discussed above has a solution if there exist two symmetric matrices $X,Z$ and a matrix $W$, satisfying
min $c_{2}\gamma _{2}^{2}+c_{\infty }\gamma _{\infty }$
s.t
${\begin{aligned}&{\begin{bmatrix}(AX+B_{1}W)^{T}+AX+B_{1}W&B_{2}&(C_{\infty }X+D_{\infty 1}W)^{T}\\B_{2}^{T}&-\gamma _{\infty }I&D_{\infty 2}^{T}\\C_{\infty }X+D_{\infty 1}W&D_{\infty 2}&-\gamma _{\infty }I\\\end{bmatrix}}<0\\&AX+B_{1}W+(AX+B_{1}W)^{T}+B_{2}B_{2}^{T}<0\\&{\begin{bmatrix}-Z&C_{2}X+D_{21}W\\(C_{2}X+D_{21}W)^{T}&-X\\\end{bmatrix}}>0\\&{\text{trace}}(Z)<\gamma _{2}^{2}\\&L\otimes +M\otimes (AX+B_{1}W)+M^{T}\otimes (AX+B_{1}W)^{T}<0\\\end{aligned}}$
where $c_{2}>0$ and $c_{\infty }>0$ are the weighting factors.

## Conclusion:

The calculated scalars $\gamma _{\infty }$ and $\gamma _{2}$ are the $H_{2}$ and $H_{\infty }$ norms of the system, respectively. The controller is extracted as $K=WX^{-1}$

## Implementation

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

## Related LMIs

Mixed H2 Hinf with desired pole location for perturbed system

## 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.

## Return to Main Page

LMIs in Control/Tools

# Mixed H2 Hinf with desired pole location control for perturbed systems

LMI for Mixed $H_{2}/H_{\infty }$ with desired pole location Controller for perturbed system case
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 and additional constraint is used to place poles at desired location.

## The System

We consider the following state-space representation for a linear system:
${\begin{aligned}{\dot {x}}&=(A+\Delta A)x+(B_{1}+\Delta B_{1})u+B_{2}w\\z_{\infty }&=C_{\infty }+D_{\infty 1}u+D_{\infty 2}w\\z_{2}&=C_{2}x+D_{21}u\end{aligned}}$
where
* $x\in \mathbb {R} ^{n}$, $z_{2},z_{\infty }\in \mathbb {R} ^{m}$are the state vector and the output vectors, respectively
* $w\in \mathbb {R} ^{p}$, $u\in \mathbb {R} ^{r}$ are the disturbance vector and the control vector
* $A$, $B_{1}$,$B_{2}$, $C_{\infty }$,$C_{2}$,$D_{\infty 1}$,$D_{\infty 2}$, and $D_{21}$ are the system coefficient matrices of appropriate dimensions.
* $\Delta A$ and $\Delta B_{1}$ are real valued matrix functions which represent the time varying parameters uncertainities.
Furthermore, the parameter uncertainties $\Delta A$ and $\Delta B_{1}$ are in the form of $[\Delta A\,\,\,\,\,\Delta B_{1}]=HF[E_{1}\,\,\,\,\,E_{2}]$ where
* $H$, $E_{1}$ and $E_{2}$ are known matrices of appropriate dimensions.
* $F$ is a matrix containing the uncertainty, which satisfies
$F^{T}F<I$

## The Data

We assume that all the four matrices of the plant,$A$, $\Delta A$,$B_{1}$ $\Delta B_{1}$,$B_{2}$, $C_{\infty }$,$C_{2}$,$D_{\infty 1}$,$D_{\infty 2}$, and $D_{21}$ are given.

## The Optimization Problem

For the system with the following feedback law: $u=Kx$
The closed loop system can be obtained as: ${\begin{aligned}{\dot {x}}&=((A+\Delta A)+(B_{1}+\Delta B_{1})K)x+B_{2}w\\z_{\infty }&=(C_{\infty }+D_{\infty 1}K)x+D_{\infty 2}w\\z_{2}&=(C_{2}+D_{21}K)u\end{aligned}}$
the transfer function matrices are $G_{z\infty w}(s)$ and $G_{z2w}(s)$
Thus the $H_{\infty }$ performance and the $H_{2}$ performance requirements for the system are, respectiverly
$||G_{z\infty w}(s)||_{\infty }<\gamma _{\infty }$
and
$||G_{z2w}(s)||_{2}<\gamma _{2}$ . For the performance of the system response, we introduce the closed-loop eigenvalue location requirement. Let
$D={s|s\in C,L+sM+sM^{T}<0},$
It is a region on the complex plane, which can be used to restrain the closed-loop eigenvalue locations. Hence a state feedback control law is designed such that,
* The $H_{\infty }$ performance and the $H_{2}$ performance are satisfied.
* The closed-loop eigenvalues are all located in $D$, that is,
$\,\,\,\,\,$ $\lambda (A+B_{1}K)\subset D$.

## The LMI: LMI for mixed $H_{2}$/$H_{\infty }$ with desired Pole locations

The optimization problem discussed above has a solution if there exist scalars $\alpha ,\,\,\,\beta$ two symmetric matrices $X,Z$ and a matrix $W$, satisfying
min $c_{2}\gamma _{2}^{2}+c_{\infty }\gamma _{\infty }$
s.t
${\begin{aligned}&{\begin{bmatrix}\Psi (X,W)&B_{2}&(C_{\infty }X+D_{\infty 1}W)^{T}&(E_{1}X+E_{2}W)^{T}\\B_{2}^{T}&-\gamma _{\infty }I&D_{\infty 2}^{T}&0\\C_{\infty }X+D_{\infty 1}W&D_{\infty 2}&-\gamma _{\infty }I&0\\(E_{1}X+E_{2}W)&0&0&-\alpha I\\\end{bmatrix}}<0\\&{\begin{bmatrix}\langle AX+B_{1}W\rangle +B_{2}B_{2}^{T}+\beta HH^{T}&(E_{1}X+E_{2}W)^{T}\\E_{1}X+E_{2}W&-\beta I\\\end{bmatrix}}<0\\&{\begin{bmatrix}-Z&C_{2}X+D_{21}W\\(C_{2}X+D_{21}W)^{T}&-X\\\end{bmatrix}}>0\\&{\text{trace}}(Z)<\gamma _{2}^{2}\\&L\otimes +M\otimes (AX+B_{1}W)+M^{T}\otimes (AX+B_{1}W)^{T}<0\\\end{aligned}}$
where $\Psi (X,W)=\langle AX+B_{1}W\rangle +\alpha HH^{T}$
$c_{2}>0$ and $c_{\infty }>0$ are the weighting factors.

## Conclusion:

The calculated scalars $\gamma _{\infty }$ and $\gamma _{2}$ are the $H_{2}$ and $H_{\infty }$ norms of the system, respectively. The controller is extracted as $K=WX^{-1}$

## Implementation

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

## Related LMIs

Mixed H2 Hinf with desired poles controller

## 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.

## Return to Main Page

LMIs in Control/Tools

# Robust H2 State Feedback Control
## Robust $H_{2}$ State Feedback Control

For the uncertain linear system given below, and a scalar $\gamma >0$. The goal is to design a state feedback control $u(t)$ in the form of $u(t)=Kx(t)$ such that the closed-loop system is asymptotically stable and satisfies.
    ${\begin{aligned}||G_{zw}(s)||_{2}<\gamma \end{aligned}}$

## The System

Consider System with following state-space representation.
    ${\begin{aligned}{\dot {x}}(t)&=(A+\Delta {A})x(t)+(B_{1}+\Delta {B_{1}})u(t)+B_{2}w(t)\\z(t)&=Cx(t)+D_{1}u(t)+D_{2}w(t)\\\end{aligned}}$
where $x\in \mathbb {R} ^{n}$ , $u\in \mathbb {R} ^{r}$ , $w\in \mathbb {R} ^{p}$, $z\in \mathbb {R} ^{m}$. For $H_{2}$ state feedback control $D_{2}=0$
$\Delta {A}$ and $\Delta {B_{1}}$ are real valued matrix functions that represent the time varying parameter uncertainties and of the form
    ${\begin{aligned}{\begin{bmatrix}\Delta {A}&\Delta {B_{1}}\end{bmatrix}}=HF{\begin{bmatrix}E_{1}&E_{2}\end{bmatrix}}\end{aligned}}$
where matrices $E_{1},E_{2}$ and $H$ are some known matrices of appropriate dimensions, while $F$ is a matrix which contains the uncertain parameters and satisfies.
    ${\begin{aligned}F^{T}F\leq I\end{aligned}}$
For the perturbation, we obviously have
    ${\begin{aligned}{\begin{bmatrix}\Delta {A}&\Delta {B_{1}}\end{bmatrix}}={\begin{bmatrix}0&0\end{bmatrix}}\end{aligned}}$, for $F=0$
    ${\begin{aligned}{\begin{bmatrix}\Delta {A}&\Delta {B_{1}}\end{bmatrix}}=H{\begin{bmatrix}E_{1}&E_{2}\end{bmatrix}}\end{aligned}}$, for $F=0$

## The Problem Formulation:

The $H_{2}$ state feedback control problem has a solution if and only if there exist a scalar $\beta$, a matrix $W$, two symmetric matrices $Z$ and $X$ satisfying the following LMI's problem.

## The LMI:

$\min \gamma ^{2}::$
    ${\begin{aligned}{\begin{bmatrix}\langle AX+B_{1}W\rangle _{s}+B_{2}B_{2}^{T}+\beta {H}H^{T)&(E_{1}X+E_{2}W)^{T}\\E_{1}X+E_{2}W&-\beta {I}\end{bmatrix}}<0\end{aligned}}$
    ${\begin{aligned}{\begin{bmatrix}-Z&CX+D_{1}W\\(CX+D_{1}W)^{T}&-X\end{bmatrix}}<0\end{aligned}}$
    ${\begin{aligned}trace(Z)<\gamma ^{2}\end{aligned}}$
where $\langle M\rangle _{s}=(M+M^{T})$ is the definition that is need for the above LMI.

## Conclusion:

In this case, an $H_{2}$ state feedback control law is given by $u(t)=WX^{-1}x(t)$.

## External Links

* LMIs in Control Systems Analysis, Design and Applications - Duan and Yu
* A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# LQ Regulation via H2 control
## LQ Regulation via $H_{2}$ Control

The LQR design problem is to build an optimal state feedback controller $u=Kx$ for the system ${\dot {x}}=Ax+Bu,x(0)=x_{0}$ such that the following quadratic performance index.
    ${\begin{aligned}J(x,u)=\int _{0}^{\infty }(x^{T}Qx+u^{T}Ru)dt\end{aligned}}$
is minimized, where
    ${\begin{aligned}Q=Q^{T}\geq 0,R=R^{T}>0\end{aligned}}$
The following assumptions should hold for a traditional solution.
${\boldsymbol {A1}}.(A,B)$ is stabilizable.
${\boldsymbol {A2}}.(A,L)$ is observable, with $L=Q^{1/2}$.

## Relation to $H_{2}$ performance

For the system given above an auxiliary system is constructed
    ${\begin{aligned}{\dot {x}}=Ax+Bu+x_{0}\omega ,y=Cx+Du\end{aligned}}$
where
    ${\begin{aligned}C={\begin{bmatrix}Q^{1/2}\\0\end{bmatrix}},D={\begin{bmatrix}0\\R^{1/2}\end{bmatrix}}\end{aligned}}$
Where $\omega$ represents an impulse disturbance. Then with state feedback controller $u=Kx$ the closed loop transfer function from disturbance $\omega$ to output $y$ is
    ${\begin{aligned}G_{y\omega }(s)=(C+DK)[sI-(A+BK)]^{-1}x_{0}\end{aligned}}$
Then the LQ problem and the $H_{2}$ norm of $G_{y\omega }$ are related as
    ${\begin{aligned}J(x,u)=||G_{y\omega }(s)||_{2}^{2}\end{aligned}}$
Then $H_{2}$ norm minimization leads minimization of $J$.

## Data

The state-representation of the system is given and matrices $Q,R$ are chosen for the optimal LQ problem.

## The Problem Formulation:

Let assumptions $A1$ and $A2$ hold, then the state feedback control of the form $u=Kx$ exists such that $J(x,u)<\gamma$ if and only if there exist $X\in \mathbb {S} ^{n}$, $Y\in \mathbb {S} ^{r}$ and $W\in \mathbb {R} ^{rxn}$. Then $K$ can be obtained by the following LMI.

## The LMI:

$\min \gamma ::$
    ${\begin{aligned}(AX+BW)+(AX+BW)^{T}+x_{0}x_{0}^{T}<0\end{aligned}}$
    ${\begin{aligned}trace(Q^{1/2}X(Q^{1/2}))+trace(Y)<\gamma \end{aligned}}$
    ${\begin{aligned}{\begin{bmatrix}-Y&R^{1/2}W\\(R^{1/2}W)^{T}&-X\end{bmatrix}}<0\end{aligned}}$

## Conclusion:

In this case, a feedback control law is given as $K=WX^{-1}$.

## External Links

* LMIs in Control Systems Analysis, Design and Applications - Duan and Yu
* A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

# State Feedback

      * H-infinity
      * H-2
      * Mixed
      * Closed-Loop Robust Stability and Controller synthesis of Discrete-Time System with Polytopic Uncertainty

# Optimal State Feedback

      * Discrete Time Hinf Optimal Full State Feedback Control
      * Discrete Time H2 Optimal Full State Feedback Control
      * Discrete Time Mixed H2-Hinf Optimal Full State Feedback Control

# Output Feedback

      * H-infinity
      * H-2
      * Mixed

# Static Output Feedback

      * H-infinity
      * H-2
      * Mixed
      * Discrete-Time Static Output Feedback Stabilizability

# Optimal Output Feedback

      * H-infinity
      * H-2
      * Mixed

# Optimal Dynamic Output Feedback

      * Discrete Time Hinf Optimal Dynamic Output Feedback Control
      * Discrete Time H2 Optimal Dynamic Output Feedback Control
      * Mixed

# Discrete Time Stabilizability

Discrete-Time Stabilizability
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.
Discrete-Time LTI systems can be made stable using controller gain K, which can be found using LMI optimization, such that the close loop system is stable.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}&A_{d}\in {\bf {{R^{n*n}},}}&B_{d}\in {\bf {{R^{n*m}},}}&C_{d}\in {\bf {{R^{p*n}},}}&D_{d}\in {\bf {{R^{p*m}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d},C_{d},D_{d}),P,W$.

## The Optimization Problem

The following feasibility problem should be optimized:
Maximize P while obeying the LMI constraints. Then K is found.

## The LMI:

Discrete-Time Stabilizability
The LMI formulation
${\begin{aligned}P\in {S^{n}};W\in {R^{m*n}}\;\\&P>0\\{\begin{bmatrix}P&A_{d}P+B_{d}W\\*&P\end{bmatrix}}&>0,\\K_{d}=WP^{-1}\end{aligned}}$

## Conclusion:

The system is stabilizable iff there exits a $P$, such that $P>0$. The matrix $A_{d}+B_{d}K_{d}$ is Schur with $K_{d}=WP^{-1}$

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous Time Stabilizability

## 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.

## Return to Main Page:
# Quadratic Schur Stabilization

LMI for Quadratic Schur Stabilization
A discrete-time system is said to be stable if all roots of its characteristic equation lie in the open unit disk. This provides a condition for the stability of discrete-time linear systems with polytopic uncertainties and a linear time-invariant system with this property is called a Schur stable system.

## The System

Consider discrete time system
    ${\begin{aligned}x_{k+1}=Ax_{k}+Bu_{k},\\\end{aligned}}$
where $x_{k}\in \mathbb {R} ^{n}$, $u_{k}\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.
The system consist of uncertainties of the following form
    ${\begin{aligned}\Delta _{A(t)}=A_{1}\delta _{1}(t)+....+A_{k}\delta _{k}(t)\\\Delta _{B(t)}=B_{1}\delta _{1}(t)+....+B_{k}\delta _{k}(t)\\\end{aligned}}$
where $x\in \mathbb {R} ^{m}$,$u\in \mathbb {R} ^{n}$,$A\in \mathbb {R} ^{mxm}$ and $B\in \mathbb {R} ^{mxn}$

## The Data

The matrices necessary for this LMI are $A$,$\Delta _{A(t)}\,ie\,A_{i}$ ,$B$ and $\Delta _{B(t)}\,ie\,B_{i}$

## The LMI:

There exists some X > 0 and Z such that
       ${\begin{aligned}{\begin{bmatrix}X&&AX+BZ\\(AX+BZ)^{T}&&X\end{bmatrix}}+{\begin{bmatrix}0&&A_{i}X+B_{i}Z\\(A_{i}X+B_{i}Z)^{T}&&0\end{bmatrix}}>0\quad i=1,......,k\end{aligned}}$

## The Optimization Problem

The optimization problem is to find a matrix ${\begin{aligned}K\in \mathbb {R} ^{r\times n}\end{aligned}}$ such that:
${\begin{aligned}||A+BK||_{2}<\gamma \end{aligned}}$
According to the definition of the spectral norms of matrices, this condition becomes equivalent to:
${\begin{aligned}(A+BK)^{T}(A+BK)<\gamma ^{2}I\end{aligned}}$
Using the Lemma 1.2 in LMI in Control Systems Analysis, Design and Applications (page 14), the aforementioned inequality can be converted into:
${\begin{aligned}{\begin{bmatrix}-\gamma I&(A+BK)\\(A+BK)^{T}&-\gamma I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

The Controller gain matrix is extracted as $F=ZX^{-1}$
$u_{k}=Fx_{k}$
    ${\begin{aligned}x_{k+1}=Ax_{k}+Bu_{k},\\\quad \quad \quad =Ax_{k}+BFx_{k}\\\quad \quad =(A+BF)x_{k}\end{aligned}}$
It follows that the trajectories of the closed-loop system (A+BK) are stable for any $\,\Delta \,\in \,C_{0}(\Delta _{1},...,\Delta _{k})$

## Implementation

https://github.com/JalpeshBhadra/LMI/blob/master/quadratic_schur_stabilization.m

## Related LMIs

Schur Complement Schur Stabilization

## 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.
* LMI in Control Systems Analysis, Design and Applications

# Generic Insensitive Strip Region Design

Insensitive Strip Region Design
Suppose if one were interested in robust stabilization where closed-loop eigenvalues are placed in particular regions of the complex plane where the said regions has an inner boundary that is insensitive to perturbations of the system parameter matrices. This would be accomplished with the help of 2 design problems: the insensitive strip region design and insensitive disk region design (see link below for the latter).

## The System

Suppose we consider the following continuous-time linear system that needs to be controlled:
    ${\begin{aligned}{\begin{cases}{\dot {x}}&=Ax+Bu,\\y&=Cx\\\end{cases}}\end{aligned}}$
where $x\in \mathbb {R} ^{n}$, $y\in \mathbb {R} ^{m}$, and $u\in \mathbb {R} ^{r}$ are the state, output and input vectors respectively. Then the steps to obtain the LMI for insensitive strip region design would be obtained as follows.

## The Data

Prior to obtaining the LMI, we need the following matrices: $A$, $B$, and $C$.

## The Optimization Problem

Consider the above linear system as well as 2 scalars $\gamma _{1}$ and $\gamma _{2}$. Then the output feedback control law $u=Ky$ would be such that ${\gamma _{1}}<{\lambda _{i}}(A_{c}^{s})<{\gamma _{1}}$, where:
    ${\begin{aligned}{A_{c}^{s}}&\triangleq {\frac {1}{2}}{\langle {A_{c}}\rangle _{s}}={\frac {{(A+BKC)^{T}}+(A+BKC)}{2}}\\\end{aligned}}$
Letting $K$ being the solution to the above problem, then
    ${\begin{aligned}{\gamma _{1}}&<{\alpha _{1}}\leq {Re({\lambda _{i}}(A+BKC))\leq {\alpha _{2}}<{\gamma _{2}}},&i=1,2,...,n\\\end{aligned}}$
where
    ${\begin{aligned}{\begin{cases}{\alpha _{1}}&={\lambda _{min}}({A_{c}^{s}})\\{\alpha _{2}}&={\lambda _{max}}({A_{c}^{s}})\\\end{cases}}\end{aligned}}$

## The LMI: Insensitive Strip Region Design

Using the above info, we can simplify the problem by setting $\gamma _{1}$ to $-\infty$ for all practical applications. This then simplifies our problem and results in the following LMI:
       ${\begin{aligned}{\begin{cases}{\text{min }}\gamma \\{\text{s.t. }}{(A+BKC)^{T}}+(A+BKC)<{\gamma }I\\\end{cases}}\end{aligned}}$

## Conclusion:

If the resulting solution from the LMI above produces a negative $\gamma$, then the output feedback controller $K$ is Hurwitz-stable. Hoewever, if $\gamma$ is a really small positive number, then ${\alpha _{2}}=\lambda _{max}(A_{c}^{s})$ must be negative for the controller to be Hurwitz-stable.

## Implementation

* Example Code - A GitHub link that contains code (titled "InsensitiveStripRegion.m") that demonstrates how this LMI can be implemented using MATLAB-YALMIP.

## Related LMIs

      * Insensitive Disk Region Design - Equivalent LMI for Insensitive Disk Region Design
      * $H_{2}$ Strip Region Design - LMI for $H_{2}$ Strip Region Design

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - A book co-authored by Guang-Ren Duan and Hai-Hua Yu.

## Return to Main Page:
# Generic Insensitive Disk Region Design

Insensitive Disk Region Design
Similar to the insensitive strip region design problem, insensitive disk region design is another way with which robust stabilization can be achieved where closed-loop eigenvalues are placed in particular regions of the complex plane where the said regions has an inner boundary that is insensitive to perturbations of the system parameter matrices.

## The System

Suppose we consider the following linear system that needs to be controlled:
    ${\begin{aligned}{\begin{cases}\rho x&=Ax+Bu,\\y&=Cx\\\end{cases}}\end{aligned}}$
where $x\in \mathbb {R} ^{n}$, $y\in \mathbb {R} ^{m}$, and $u\in \mathbb {R} ^{r}$ are the state, output and input vectors respectively, and $\rho$ represents the differential operator (in the continuous-time case) or one-step shift forward operator (i.e., $\rho x(k)=x(k+1)$) (in the discrete-time case). Then the steps to obtain the LMI for insensitive strip region design would be obtained as follows.

## The Data

Prior to obtaining the LMI, we need the following matrices: $A$, $B$, and $C$.

## The Optimization Problem

Consider the above linear system as well as 2 positive scalars $\gamma$ and $q$. Then the output feedback control law $u=Ky$ would be designed such that:
    ${\begin{aligned}{\eta }&=||A+BKC+qI||<{\gamma }\\\end{aligned}}$
Recalling the definition, we have:
    ${\begin{aligned}{\mathbb {D} _{q,\eta }}&=\{{s|s\in \mathbb {C} ,|s+q|<{\eta }}\}\\&=\{x+jy|x,y\in \mathbb {R} ,{(x+q)^{2}}+{y^{2}}<{\eta ^{2}}\}\\\end{aligned}}$
and
    ${\begin{aligned}{\mathbb {D} _{q,r}}&=\{{s|s\in \mathbb {C} ,|s+q|<{\gamma }}\}\\&=\{x+jy|x,y\in \mathbb {R} ,{(x+q)^{2}}+{y^{2}}<{\gamma ^{2}}\}\\\end{aligned}}$
Letting $K$ being the solution to the above problem, then
    ${\begin{aligned}{\lambda _{i}}(A+BKC)&\in {\mathbb {D} _{q,\eta }}\subset {\mathbb {D} _{q,r}},&i=1,2,...,n\\\end{aligned}}$

## The LMI: Insensitive Strip Region Design

Using the above info, we can convert the given problem into an LMI, which - after using Schur compliment Lemma - results in the following:
       ${\begin{aligned}{\begin{cases}{\text{min }}\gamma \\{\text{s.t. }}{\begin{bmatrix}-{\gamma }I&&(A+BKC+qI)\\{(A+BKC+qI)^{T}}&&-{\gamma }I\end{bmatrix}}&<0\\\end{cases}}\end{aligned}}$

## Conclusion:

For Schur stabilization, we can choose to solve the problem with $q=0$. Schur stability is achieved when ${\gamma }{\leq }1$. Alternately, if ${\gamma }$ is greater than (but very close to) 1, then Schur stability is also achieved when ${\eta }=||A+BKC+qI||_{2}{\leq }1$.

## Implementation

* Example Code - A GitHub link that contains code (titled "InsensitiveDiskRegion.m") that demonstrates how this LMI can be implemented using MATLAB-YALMIP.

## Related LMIs

      * $H_{2}$ Disk Region Design - LMI for Disk Region Design with minimal $H_{2}$ gain
      * Insensitive Strip Region Design - Equivalent LMI for Insensitive Strip Region Design

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - A book co-authored by Guang-Ren Duan and Hai-Hua Yu.

## Return to Main Page:
# Design for Insensitive Strip Region

Insensitive Strip Region Design with Minimum $H_{2}$ Gain
When designing controllers with insensitive region conditions, the aim is to place the closed-loop poles of the system in a particular region defined by its inner boundary. These regions are specified based on their insensitivity to perturbations to the system parameter matrices.
One type of such design is the Insensitive Strip Region Design. In this section, building upon that, optimization problems will be provided that ensure that the conditions for insensitive strip region design are satisfied with some bounds on the $H_{2}$ gain of the closed-loop system.

## The System

A state-space representation of a linear system as given below:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)\\y(t)&=Cx(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$ and $u(t)\in \mathbb {R} ^{r}$ are the system state, output, and the input vector respectively.

## The Data

To solve the design optimization problem, the linear system matrices A,B,C are required. Furthermore, to define the strip region on the eigenvalue-space, two parameters $\gamma _{1}$ and $\gamma _{2}$ are required.

## The Optimization Problem

The problem of designing an $H_{2}$ optimal controller that results in the closed loop system insensitive to a certain strip region involves two sub-problems:
* Finding a control gain $K$ such that: $\left\|K\right\|_{2}<\gamma$.
* The conditions for insensitive strip region design for the closed-loop system, as provided in the section Insensitive Strip Region Design are fulfilled.
* The optimization goal is to minimize $\gamma$ such that above two hold.

## The LMI: $H_{2}$ Optimal Control Design for Insensitive Strip Region

The problem above has a solution if and only if the following optimization problem has a solution $(K,\gamma )$:
${\begin{aligned}{\text{min }}&\gamma \\{\text{s.t. }}&{\begin{bmatrix}-\gamma I&K\\K^{\top }&-\gamma I\end{bmatrix}}<0\\&2\gamma _{1}I<(A+BKC)^{\top }+(A+BKC)<2\gamma _{2}I\end{aligned}}$

## Conclusion:

By using the design problem provided here, an optimal $H_{2}$ controller is designed to make the closed-loop system robust to perturbations in the system matrices.

## Implementation

To solve the optimization problem with LMI presented here, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/H2_Strip_example.m

## Related LMIs

Insensitive Strip Region Design

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 10.1.1 pp. 322–323.

## Return to Main Page:
# Design for Insensitive Disk Region

Insensitive Disk Region Design with Minimum $H_{2}$ Gain
Apart from the design for the insensitive strip region with minimum $H_{2}$ gain, another type of such design is the Insensitive Disk Region Design. In this section, optimization problems will be provided that ensure that the conditions for insensitive disk region design are satisfied with some bounds on the $H_{2}$ gain of the closed-loop system.

## The System

A state-space representation of a linear system as given below:
    ${\begin{aligned}\rho x&=Ax+Bu\\y&=Cx\end{aligned}}$
where $x\in \mathbb {R} ^{n}$, $y\in \mathbb {R} ^{m}$ and $u\in \mathbb {R} ^{r}$ are the system state, output, and the input vector respectively. $\rho$ represents the differential operation for continuous time systems, or the one-step shift forward operator for discrete time case.

## The Data

To solve the design optimization problem, the linear system matrices A,B,C are required. Furthermore, to define the disk region on the eigenvalue-space, its radius $\gamma _{0}$ is required.

## The Optimization Problem

The problem of designing an $H_{2}$ optimal controller that results in the closed loop system insensitive to a certain disk region involves two sub-problems:
* Finding a control gain $K$ such that: $\left\|K\right\|_{2}<\gamma$.
* The conditions for insensitive disk region design for the closed-loop system, as provided in the section Insensitive Disk Region Design are fulfilled.
* The optimization goal is to minimize $\gamma$ such that above two hold.

## The LMI: $H_{2}$ Optimal Control Design for Insensitive Disk Region

The problem above has a solution if and only if the following optimization problem has a solution $(K,\gamma )$:
${\begin{aligned}{\text{min }}&\gamma \\{\text{s.t. }}&{\begin{bmatrix}-\gamma I&K\\K^{\top }&-\gamma I\end{bmatrix}}<0\\&{\begin{bmatrix}-\gamma _{0}I&A+BKC+qI\\(A+BKC+qI)^{\top }&-\gamma _{0}I\end{bmatrix}}<0\end{aligned}}$

## Conclusion:

By using the design problem provided here, an optimal $H_{2}$ controller is designed to make the closed-loop system robust to perturbations in the system matrices.

## Implementation

To solve the optimization problem with LMI presented here, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/H2_Disk_example.m

## Related LMIs

Insensitive Disk Region Design

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 10.1.2 pp. 323–325.

## Return to Main Page:
# Quadratic Stability

LMIs in Control/Print version

## The System:

A TS fuzzy model allows the representation of a non-linear model as a set of local LTI (Linear Time Invariant) models $[1,p.10]$, each one called subsystem. A subsystem is the local representation of the system in the space of premise variables $z(t)$ = $[z1(t)z2(t)...zp(t)]$ which are known and could depend on the state variables and input variables.

## The Optimization Problem:

Let consider an autonomous system $x$=$Ax$ with $A$ being a constant matrix. If we define the Lyapunov function $V(x)$=$x^{T}Px$, then the system is stable if there exist $P>0$ such that condition is satisfied.
$A^{T}P+PA<0$
If we have a family of matrices $A(\delta (t))$ (where $\delta (t)$ is a parameter that is bounded by a polytope ∆) instead of a single matrix A, then the system equation becomes $x$=$A(\delta (t))x$ and condition should be satisfied for all possible values of $\delta (t)$. If exists $P>0$ such that following condition is satisfied then the system is quadratically stable.
$A(\delta (t))^{T}P+PA(\delta (t))<0$ ∀$\delta (t)$ ∈ ∆.
Since there are an infinite number of matrices A(δ(t)) there is also an infinite number of constraints like that for quadratic stability mentioned previously that should be fulfilled. From a practical point of view this makes the problem impossible to be solved. Let consider now that the system $x=A(\delta (t))x$ can be written in a polytopic form as a Takagi-Sugeno (TS) polytopic system with premise variables $z(t)$ and a set of r subsystems $Ai$ for $i={1,...,r}$.
$x(t)=\sum _{i=1}^{r}(h_{i}(z(t))A_{i}x(t)$.
It can be proven that a polytopic autonomous system is quadratically stable if previous condition is satisfied in the vertices (subsystems) of the polytope. Therefore there is no need to check stability in an infinite number of matrices, but only in subsystems matrices $A_{i}$.
$A_{i}^{T}P+PAi<0$ ∀i = 1, . . . , r.
Stability conditions can be applied to the closed-loop system and the following set of conditions are obtained.
$G_{ii}^{T}P+PG_{ii}<0$ ∀i = 1, . . . , r.
$((G_{ij}+G_{ji})/2)^{T}P+P((G_{ij}+G_{ji})/2)<=0$ ∀i, j ∈ {1, . . . , r}, i < j.
where $G_{ij}=A_{i}+B_{i}K_{j}$and $hi(z(t))hj(z(t))\neq 0$.
In the special case where matrices Bi are constant (i.e. $B_{i}=B$), the first set of inequalities are enough to prove stability. Therefore, assuming constant B for all the subsystems, if there exist P > 0 such that conditions are fulfilled, then the polytopic TS model (2.2) with state feedback control is quadratically stable inside the polytope.
$(A_{i}+BK_{i})^{T}P+P(A_{i}+BK_{i})<0$ ∀i = 1, . . . , r.
The assumption of constant B can be achieve using a prefiltering of the input. This change is not restrictive and the main consequence is the addition of some new state variables (the ones from the filter) to the TS model.

## The LMI:

The design of the controller that stabilizes the closed-loop system boils down to solve the Linear Matrix Inequality (LMI) problem of finding a positive definite matrix P and a set of matrices $K_{i}$ such that conditions are fulfilled. However, since the constraints should be linear combinations of the unknown variable, the following change of variables is applied: $W_{i}=K_{i}Q$ where $Q=P^{-}1$. The solution of the LMI problem is the set of matrices $W_{i}$ such that conditions are fulfilled.
$Q>0$
$A_{i}Q+QA_{i}^{T}+BW_{i}+W_{i}^{T}B^{T}<0$. ∀i = 1, . . . , r.
The i-th controller is computed from the solution as $K_{i}$ = $W_{i}$ $Q^{-1}$

## Conclusion:

The LMI is feasible.

## References

* Control, A. (2016). Gain-scheduling Control of a Quadrotor Using the Takagi-Sugeno Approach.

# Apkarian Filter and State Feedback

LMIs in Control/Print version

## The System:

The number of LMI constraints needed to check quadratic stability is reduced if all the subsystems in the polytopic model has the same matrix $B$. This can be achieved by adding an Apkarian filter in the input of the system.

## The Optimization Problem:

Apkarian Filter
Let consider our TS-LIA model. This can be re written in linear form as:
       ${\dot {x}}=A(z(t))x+B(z(t))u$
The filter should be such that the equilibrium of the states are the input values and the dynamics should be fast, so we could assume the dynamics of the filter negligible (i.e. the input of the filter is equivalent to the input of the quadrotor). One possible filter is shown , where $A_{F}$ = −100$I_{4}$, $B_{F}$ = 100$I_{4}$ and $I_{4}$ ∈ $R^{4\times 4}$ is the identity matrix.
       ${\dot {x_{F}}}=A_{F}x_{F}+B_{F}u_{F};y_{f}=x_{f}$.
When applying the filter, we are imposing that the output of the filter is the new input of the TS-LIA model (i.e. $u$ = $y_{F}$ ). Then, the extended model is:
       ${\dot {x_{c}}}={\begin{bmatrix}A(z(t))&B(z(t))\\0&A_{F}\\\end{bmatrix}}x_{c}+{\begin{bmatrix}0\\B_{F}\end{bmatrix}}u_{F}=A_{e}(z(t))x_{e}+B_{e}u_{f};x_{e}={\begin{bmatrix}x\\x_{F}\end{bmatrix}}$
This prefiltering does not affect the procedure followed to obtain the TS-LIA model, so the premise variables, membership functions and activations functions remains the same.
State Feedback Controller Design
Let consider the state feedback control law for the extended TS-LIA model:${\dot {x_{e}}}=\sum _{i=1}^{32}h_{i}(z(t))[A_{ei}x_{e}+B_{ei}u_{F}]$, where the state feedback control laws are :$u_{F}=\sum _{i=1}^{32}h_{i}(z(t))K_{i}x(t)$, we get the closed loop system :${\dot {x_{e}}}=\sum _{i=1}^{32}\sum _{j=1}^{32}h_{j}(z(t))[A_{ei}x_{e}+B_{ei}K_{j}]x_{e}$

## The LMI:

The design of the controller is done by solving an LMI problem involving the quadratic stability constraints. In case we want D- stabilization, the following set of LMI constraints are needed:
       $L\otimes P+M\otimes P(A_{ei}+B_{e}K_{i})+MT\otimes (A_{e}i+B_{e}K_{i})^{T}P<0$ ∀i = 1, . . . , 32.

## Conclusion:

The LMI is feasible.

## Related LMIs

* LMI for Natural Frequency in State Feedback. https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Maximum_Natural_Frequency_in_State_Feedback#The_LMI%3A
* LMI for Minimum Decay Rate in State Feedback. https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Minimum_Decay_Rate_in_State_Feedback#The_LMI%3A

## References

* Control, A. (2016). Gain-scheduling Control of a Quadrotor Using the Takagi-Sugeno Approach.

# Minimum Decay Rate in State Feedback

LMIs in Control/Print version

## The System:

The number of LMI constraints needed to check quadratic stability is reduced if all the subsystems in the polytopic model has the same matrix $B$. This can be achieved by adding an Apkarian filter in the input of the system.

## The Optimization Problem:

Apkarian Filter
Let consider our TS-LIA model. This can be re written in linear form as:
       ${\dot {x}}=A(z(t))x+B(z(t))u$
The filter should be such that the equilibrium of the states are the input values and the dynamics should be fast, so we could assume the dynamics of the filter negligible (i.e. the input of the filter is equivalent to the input of the quadrotor). One possible filter is shown , where $A_{F}$ = −100$I_{4}$, $B_{F}$ = 100$I_{4}$ and $I_{4}$ ∈ $R^{4\times 4}$ is the identity matrix.
       ${\dot {x_{F}}}=A_{F}x_{F}+B_{F}u_{F};y_{f}=x_{f}$.
When applying the filter, we are imposing that the output of the filter is the new input of the TS-LIA model (i.e. $u$ = $y_{F}$ ). Then, the extended model is:
       ${\dot {x_{c}}}={\begin{bmatrix}A(z(t))&B(z(t))\\0&A_{F}\\\end{bmatrix}}x_{c}+{\begin{bmatrix}0\\B_{F}\end{bmatrix}}u_{F}=A_{e}(z(t))x_{e}+B_{e}u_{f};x_{e}={\begin{bmatrix}x\\x_{F}\end{bmatrix}}$
This prefiltering does not affect the procedure followed to obtain the TS-LIA model, so the premise variables, membership functions and activations functions remains the same.
State Feedback Controller Design
Let consider the state feedback control law for the extended TS-LIA model:${\dot {x_{e}}}=\sum _{i=1}^{32}h_{i}(z(t))[A_{ei}x_{e}+B_{ei}u_{F}]$, where the state feedback control laws are :$u_{F}=\sum _{i=1}^{32}h_{i}(z(t))K_{i}x(t)$, we get the closed loop system :${\dot {x_{e}}}=\sum _{i=1}^{32}\sum _{j=1}^{32}h_{j}(z(t))[A_{ei}x_{e}+B_{ei}K_{j}]x_{e}$

## The LMI:

The design of the controller is done by solving an LMI problem involving the quadratic stability constraints. In case we want D- stabilization, the following set of LMI constraints are needed:
       $L\otimes P+M\otimes P(A_{ei}+B_{e}K_{i})+MT\otimes (A_{e}i+B_{e}K_{i})^{T}P<0$ ∀i = 1, . . . , 32.
A pair of conjugate complex poles s of the closed loop system can be written as $s$ = − ${\xi }\omega _{n}\pm j\omega _{d}$where $\xi$ is the damping ratio,$\omega _{n}$ is the undamped natural frequency and $\omega _{d}$ is the frequency response defined as $\omega _{d}=\omega _{n}$ ${\sqrt {1-\xi ^{2}}}$.Three different LMI regions have been considered, each one related with a performance specification regarding $\alpha =\xi \omega _{n},\omega _{n}$ and $\xi$:
Minimum Decay Rate:
If we want to set a minimum decay rate α in the closed loop system response, the poles should be inside the LMI region defined in : $S_{\alpha }$ = [s = x + j y | x < − $\alpha$].where $\alpha$ > 0. In this case L$_{\alpha }$ = $2\alpha$ and M$_{\alpha }$ = 1.
Applying condition to the closed-loop system , the LMI condition associated to this LMI region is:
       $2\alpha P+(A_{ei}+B_{e}K_{i})^{T}P+P(A_{ei}+B_{e}K_{i})<0$ ∀i = 1, . . . , 32.

## Conclusion:

The LMI is feasible.

## Related LMIs

* Apkarian Filter and State Feedback. https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Apkarian_Filter-and_State_Feedback
* Maximum Natural Frequency in State Feedback https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Maximum_Natural_Frequency_in_State_Feedback#The_LMI%3A

## References

* Control, A. (2016). Gain-scheduling Control of a Quadrotor Using the Takagi-Sugeno Approach.

# Maximum Natural Frequency in State Feedback

LMIs in Control/Print version

## The System:

The number of LMI constraints needed to check quadratic stability is reduced if all the subsystems in the polytopic model has the same matrix $B$. This can be achieved by adding an Apkarian filter in the input of the system.

## The Optimization Problem:

Apkarian Filter
Let consider our TS-LIA model. This can be re written in linear form as:
       ${\dot {x}}=A(z(t))x+B(z(t))u$
The filter should be such that the equilibrium of the states are the input values and the dynamics should be fast, so we could assume the dynamics of the filter negligible (i.e. the input of the filter is equivalent to the input of the quadrotor). One possible filter is shown , where $A_{F}$ = −100$I_{4}$, $B_{F}$ = 100$I_{4}$ and $I_{4}$ ∈ $R^{4\times 4}$ is the identity matrix.
       ${\dot {x_{F}}}=A_{F}x_{F}+B_{F}u_{F};y_{f}=x_{f}$.
When applying the filter, we are imposing that the output of the filter is the new input of the TS-LIA model (i.e. $u$ = $y_{F}$ ). Then, the extended model is:
       ${\dot {x_{c}}}={\begin{bmatrix}A(z(t))&B(z(t))\\0&A_{F}\\\end{bmatrix}}x_{c}+{\begin{bmatrix}0\\B_{F}\end{bmatrix}}u_{F}=A_{e}(z(t))x_{e}+B_{e}u_{f};x_{e}={\begin{bmatrix}x\\x_{F}\end{bmatrix}}$
This prefiltering does not affect the procedure followed to obtain the TS-LIA model, so the premise variables, membership functions and activations functions remains the same.
State Feedback Controller Design
Let consider the state feedback control law for the extended TS-LIA model:${\dot {x_{e}}}=\sum _{i=1}^{32}h_{i}(z(t))[A_{ei}x_{e}+B_{ei}u_{F}]$, where the state feedback control laws are :$u_{F}=\sum _{i=1}^{32}h_{i}(z(t))K_{i}x(t)$, we get the closed loop system :${\dot {x_{e}}}=\sum _{i=1}^{32}\sum _{j=1}^{32}h_{j}(z(t))[A_{ei}x_{e}+B_{ei}K_{j}]x_{e}$

## The LMI:

The design of the controller is done by solving an LMI problem involving the quadratic stability constraints. In case we want D- stabilization, the following set of LMI constraints are needed:
       $L\otimes P+M\otimes P(A_{ei}+B_{e}K_{i})+MT\otimes (A_{e}i+B_{e}K_{i})^{T}P<0$ ∀i = 1, . . . , 32.
A pair of conjugate complex poles s of the closed loop system can be written as $s$ = − ${\xi }\omega _{n}\pm j\omega _{d}$where $\xi$ is the damping ratio,$\omega _{n}$ is the undamped natural frequency and $\omega _{d}$ is the frequency response defined as $\omega _{d}=\omega _{n}$ ${\sqrt {1-\xi ^{2}}}$.Three different LMI regions have been considered, each one related with a performance specification regarding $\alpha =\xi \omega _{n},\omega _{n}$ and $\xi$:
Maximizing Natural Frequency:
Natural frequency is related with the maximum frequency response in the undamped case ($\xi$ = 0). If we want to set a maximum $\omega _{n}$ condition, the LMI region associated is $S_{\rho }$ = [s = x + jy | |x + jy| < $\rho$], ::$L_{\rho }={\begin{bmatrix}-{\rho }&0\\0&\rho \end{bmatrix}},M_{\rho }={\begin{bmatrix}0&1\\0&0\end{bmatrix}}$. Resulting LMI condition is:
       ${\begin{bmatrix}-\rho P&P(A_{ei}+B_{ei}K_{i})\\(A_{ei}+B_{ei}K_{i})^{T}P&-\rho P\end{bmatrix}}<0$ ∀i = 1, . . . , 32.

## Conclusion:

The LMI is feasible.

## Related LMIs

* Apkarian Filter and State Feedback. https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Apkarian_Filter-and_State_Feedback
* Minimum Decay Rate in State Feedback. https://en.wikibooks.org/wiki/LMIs_in_Control/pages/Minimum_Decay_Rate_in_State_Feedback#The_LMI%3A

## References

* Control, A. (2016). Gain-scheduling Control of a Quadrotor Using the Takagi-Sugeno Approach.

# Optimal Observer and State Estimation

{{:LMIs in Control/Observer Synthesis/Continuous Time/Optimal Observer and State Estimation}

# Detectability LMI
## Detectability LMI

Detectability is a weaker version of observability. A system is detectable if all unstable modes of the system are observable, whereas observability requires all modes to be observable. This implies that if a system is observable it will also be detectable. The LMI condition to determine detectability of the pair $(A,C)$ is shown below.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t),\\x(0)&=x_{0},\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $u(t)\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.

## The Data

The matrices necessary for this LMI are $A$ and $C$. There is no restriction on the stability of $A$.

## The LMI: Detectability LMI

$(A,B)$ is detectable if and only if there exists $X>0$ such that
       $AX+XA^{T}-B^{T}B<0$.

## Conclusion:

If we are able to find $X>0$ such that the above LMI holds it means the matrix pair $(A,C)$ is detectable. In words, a system pair $(A,C)$ is detectable if the unobservable states asymptotically approach the origin. This is a weaker condition than observability since observability requires that all initial states must be able to be uniquely determined in a finite time interval given knowledge of the input $u(t)$ and output $y(t)$.

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/eoskowro/LMI/blob/master/Detectability_LMI.m

## Related LMIs

Stabilizability LMI
Hurwitz Stability LMI
Controllability Grammian LMI
Observability Grammian LMI

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 6.1.1 and Table 6.1 pp. 166–170, 192.
* A Course in Robust Control Theory: a Convex Approach, - by Geir E. Dullerud and Fernando G. Paganini, Springer, 2011, Section 2.2.3, pp. 71-73.

## Return to Main Page:
# LMI for the Observability Grammian

LMI for the Observability Grammian
Observability is a system property which says that the state of the system $x(T)$ can be reconstructed using the input $u(t)$ and output $y(t)$ on an interval $[0,T]$. This is necessary when knowledge of the full state is not available. If observable, estimators or observers can be created to reconstruct the full state. Observability and controllability are dual concepts. Thus in order to investigate the observability of a system we can study the controllability of the dual system. Although system observability can be determined with multiple methods, one is to compute the rank of the observability grammian.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t),\\x(0)&=x_{0},\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $u(t)\in \mathbb {R} ^{m}$, at any $t\in \mathbb {R}$.

## The Data

The matrices necessary for this LMI are $A$ and $C$.

## The LMI:LMI to Determine the Observability Grammian

$(A,B)$ is observable if and only if $Y>0$ is the unique solution to
       $AY+YA^{T}-C^{T}C<0$,
where $Y$ is the observability grammian.

## Conclusion:

The above LMI attempts to find the observability grammian $Y$of the system $(A,C)$. If the problem is feasible and a unique $Y$ is found, then the system is also observable. The observability grammian can also be computed as: $Y=\int _{0}^{\infty }e^{A^{T}s}C^{T}Ce^{As}ds$. Due to the dual nature of observability and controllability this LMI can be determined by determining the controllability of the dual nature, which results in the above LMI. The Observability and Controllability matricies are written as ${\mathcal {O}}$ and ${\mathcal {C}}$ respectively. They are related as follows:
       ${\mathcal {O}}(C,A)={\mathcal {C}}(A^{T},C^{T})^{T}$
       ${\mathcal {C}}(A,B)={\mathcal {O}}(B^{T},A^{T})^{T}$
Hence $(C,A)$ is observable if and only if $(A^{T},C^{T})$ is controllable. Please refer to the section on controllability grammians.

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/eoskowro/LMI/blob/master/Observability_Gram_LMI.m

## Related LMIs

Stabilizability LMI
Hurwitz Stability LMI
Detectability LMI
Controllability Grammian LMI

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013, Section 6.1.1 and Table 6.1 pp. 166–170, 192.
* A Course in Robust Control Theory: a Convex Approach, - by Geir E. Dullerud and Fernando G. Paganini, Springer, 2011, Section 2.2.3, pp. 71-73.

## Return to Main Page:
# H-infinity filtering

LMIs in Control/Print version
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{aligned}{\dot {x}}&=Ax+Bw,x(0)=x_{0}\\y&=Cx+Dw\\z&=Lx\end{aligned}}$
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{aligned}{\dot {\sigma }}&=A_{f}\sigma +B_{f}\sigma ,\sigma (0)=\sigma _{0}\\{\hat {z}}&=C_{f}\sigma +D_{f}y,\end{aligned}}$
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},andD_{f}$ are the coefficient matrices of appropriate dimensions.
Note that the combined complete system can be represented as
       ${\begin{aligned}{\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{aligned}}$
where ${\tilde {z}}=z-{\hat {z}}\in R^{m}$ is the estimation error,
       ${\begin{aligned}x_{e}={\begin{bmatrix}x\\\sigma \end{bmatrix}}\\\end{aligned}}$
is the state vector of the system, and ${\tilde {A}},{\tilde {B}},{\tilde {C}},{\tilde {D}}$ are the coefficient matrices, defined as:
       ${\begin{aligned}{\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{aligned}}$
In other words, for the system defined above we need to find $A_{f},B_{f},C_{f},andD_{f}$ such that
       ${\begin{aligned}|G_{{\tilde {z}}w}(s)|_{\inf }<\gamma ,\end{aligned}}$
where $\gamma$ is a positive constant, and
       ${\begin{aligned}G_{{\tilde {z}}w}(s)={\tilde {C}}(sI-{\tilde {A}})^{-1}{\tilde {B}}+{\tilde {D}}.\end{aligned}}$

## 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{aligned}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{aligned}}$

## 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

## External Links

This LMI comes from
* - "LMIs in Control Systems: Analysis, Design and Applications" by Guang-Ren Duan and Hai-Hua Yu
Other resources:
* 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.

## References

Duan, G. (2013). LMIs in control systems: analysis, design and applications. Boca Raton: CRC Press, Taylor & Francis Group.

## Return to Main Page:
# H2 filtering

LMIs in Control/Print version
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{aligned}{\dot {x}}&=Ax+Bw,x(0)=x_{0}\\y&=Cx+Dw\\z&=Lx\end{aligned}}$
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{aligned}{\dot {\sigma }}&=A_{f}\sigma +B_{f}y,\sigma (0)=\sigma _{0}\\{\hat {z}}&=C_{f}\sigma ,\end{aligned}}$
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{aligned}{\dot {x}}_{e}&={\tilde {A}}x_{e}+{\tilde {B}}w,x_{e}(0)=x_{e0}\\{\tilde {z}}&={\tilde {C}}x_{e},\end{aligned}}$
where ${\tilde {z}}=z-{\hat {z}}\in R^{m}$ is the estimation error,
       ${\begin{aligned}x_{e}={\begin{bmatrix}x\\\sigma \end{bmatrix}}\\\end{aligned}}$
is the state vector of the system, and ${\tilde {A}},{\tilde {B}},{\tilde {C}}$ are the coefficient matrices, defined as:
       ${\begin{aligned}{\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{aligned}}$
In other words, for the system defined above we need to find $A_{f},B_{f},C_{f}$ such that
       ${\begin{aligned}||G_{{\tilde {z}}w}(s)||_{2}<\gamma ,\end{aligned}}$
where $\gamma$ is a positive constant, and
       ${\begin{aligned}G_{{\tilde {z}}w}(s)={\tilde {C}}(sI-{\tilde {A}})^{-1}{\tilde {B}}\end{aligned}}$

## 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{aligned}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{aligned}}$
or
Matrices ${\bar {R}},{\bar {X}},{\bar {M}},{\bar {N}},{\bar {Z}},{\bar {Q}}$ exist that obey the following LMIs:
       ${\begin{aligned}{\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{aligned}}$

## 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{aligned}{\dot {x}}_{e}&={\tilde {A}}x_{e}+{\tilde {B}}w,x_{e}(0)=x_{e0}\\{\tilde {z}}&={\tilde {C}}x_{e},\end{aligned}}$

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/rezajamesahmed/LMImatlabcode/blob/master/H2_Filtering.m

## Related LMIs

H-infinity filtering

## External Links

This LMI comes from
* - "LMIs in Control Systems: Analysis, Design and Applications" by Guang-Ren Duan and Hai-Hua Yu
Other resources:
* 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.

## References

Duan, G. (2013). LMIs in control systems: analysis, design and applications. Boca Raton: CRC Press, Taylor & Francis Group.

## Return to Main Page:
# 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{aligned}{\dot {x}}&=Ax+B_{1}w(t),\\y&=C_{2}x+D_{21}w\\\end{aligned}}$

## 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{aligned}{\dot {\hat {x}}}=A{\hat {x}}+L(y-{\hat {y}}),\\{\hat {y}}=C_{2}{\hat {x}}\\\end{aligned}}$

## The LMI: $H_{2}$ Optimal Observer

LMIs in the variables $P,G,Z,\nu$ are given by:
       ${\begin{aligned}{\begin{bmatrix}PA+A^{T}P-GC_{2}-{C_{2}}^{T}G^{T}&&PB_{1}-GD_{21}\\\star &&-1\end{bmatrix}}<0\\trZ<\nu \end{aligned}}$

## 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

## Return to Main Page:
# HInf Optimal Observer

$H\infty$-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_{\infty }$ -optimal state estimation is to design an observer that minimizes the $H_{\infty }$ 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{aligned}{\dot {x}}&=Ax+B_{1}w,\\y&=C_{2}x+D_{21}w\\\end{aligned}}$

## 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\infty$ of the transfer matrix from w to z, given by
    ${\begin{aligned}T(s)=C_{1}(s1-(A-LC_{2}))^{-1}(B_{1}-LD_{21})+D_{11}\\\end{aligned}}$
is minimized. The form of the observer would be:
    ${\begin{aligned}{\dot {\hat {x}}}=A{\hat {x}}+L(y-{\hat {y}}),\\{\hat {y}}=C_{2}{\hat {x}}\\\end{aligned}}$

## The LMI: $H_{\infty }$ Optimal Observer

The $H\infty$-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{aligned}{\begin{bmatrix}PA+A^{T}P-GC_{2}-{C_{2}}^{T}G^{T}&&PB_{1}-GD_{21}&&C_{1}^{T}\\\star &&-\gamma 1&&{D_{11}}^{T}\\\star &&\star &&-\gamma 1\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

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

## Implementation

Link to the MATLAB code designing $H\infty$- 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.

## Return to Main Page:
# Mixed H2 HInf Optimal Observer

The goal of mixed $H_{2}-H\infty$-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\infty$ 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{aligned}{\dot {x}}&=Ax+B_{1,1}w_{1}+B_{1,2}w_{2},\\y&=C_{2}x+D_{21,1}w_{1}+D_{21,1}w_{2}\\\end{aligned}}$
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\infty$ 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{aligned}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{aligned}}$
is minimized. The form of the observer would be:
    ${\begin{aligned}{\dot {\hat {x}}}=A{\hat {x}}+L(y-{\hat {y}}),\\{\hat {y}}=C_{2}{\hat {x}}\\\end{aligned}}$
is to be designed, where $L\in \mathbb {R} ^{n_{x}\times n_{y}}$ is the observer gain.

## The LMI: $H_{\infty }$ Optimal Observer

The mixed $H_{2}-H\infty$-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{aligned}{\begin{bmatrix}PA+A^{T}P-GC_{2}-{C_{2}}^{T}G^{T}&&PB_{1}-GD_{21}\\\star &&-1\end{bmatrix}}<0\\{\begin{bmatrix}PA+A^{T}P-GC_{2}-{C_{2}}^{T}G^{T}&&PB_{1}-GD_{21}&&C_{1}\\\star &&-\gamma 1&&{D_{11}}^{T}\\\star &&\star &&-\gamma 1\end{bmatrix}}<0\\{\begin{bmatrix}P&&C{_{1,1}}^{T}\\\star &&Z\end{bmatrix}}>0\\trZ<\nu \end{aligned}}$

## Conclusion:

The mixed $H_{2}-H_{\infty }$ -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_{\infty }$ norm of T(s) is less than $\gamma _{d}$.

## Implementation

Link to the MATLAB code designing $H_{2}-H\infty$- Optimal Observer
Code $H_{2}-H\infty$ Optimal Observer

## 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.

## Related LMIs

* $H_{2}$ Optimal observer
* $H\infty$ Optimal observer

## Return to Main Page:
# H2 Optimal Filter

Optimal filtering is a means of adaptive extraction of a weak desired signal in the presence of noise and interfering signals. Optimal filters normally are free from stability problems. There are simple operational checks on an optimal filter when it is being used that indicate whether it is operating correctly. Optimal filters are probably easier to make adaptive to parameter changes than suboptimal filters.The goal of optimal filtering is to design a filter that acts on the output $z$ of the generalized plant and optimizes the transfer matrix from w to the filtered output.

## The System:

Consider the continuous-time generalized LTI plant with minimal states-space realization
    ${\begin{aligned}{\dot {x}}&=Ax+B_{1}w\\z&=C_{1}x+D_{11}w,\\y&=C_{2}x+D_{21}w,\end{aligned}}$
where it is assumed that $A$ is Hurwitz.

## The Data

The matrices needed as inputs are $A,B_{1},C_{2},D_{21}$.

## The Optimization Problem:

An $H_{2}$-optimal filter is designed to minimize the $H_{2}$ norm of ${\tilde {P}}(s)$ in following equation.
    ${\begin{aligned}{\tilde {P}}(s)={\tilde {C}}_{1}(sI-{\tilde {A}})^{-}1{\tilde {B}}_{1}+{\tilde {D}}_{11},\\{\text{where}}\\{\tilde {A}}={\begin{bmatrix}A&&0\\B_{f}C_{2}&&A_{f}\end{bmatrix}}&<0\\{\tilde {B}}_{1}={\begin{bmatrix}B_{1}\\B_{f}D_{21}\end{bmatrix}}&<0\\{\tilde {C}}_{1}={\begin{bmatrix}C_{1}-D_{f}C_{2}-C_{f}\end{bmatrix}}&<0\\{\tilde {D}}_{11}=D_{11}-D_{f}D_{21}\\\end{aligned}}$
To ensure that ${\tilde {P}}(s)$ has a finite $H_{2}$ norm, it is required that $D_{f}=D_{11}$, which results in ${\tilde {D}}_{11}=D_{11}-D_{f}=0$

## The LMI: $H_{2}$- Optimal filter

Solve for $A_{n}\in \mathbb {R} ^{n_{x}\times n_{x}},B_{n}\in \mathbb {R} ^{n_{x}\times n_{y}},C_{f}\in \mathbb {R} ^{n_{x}\times n_{x}}$, $X,Y\in \mathbb {S} ^{n_{x}},Z\in \mathbb {S} ^{n_{z}}$ and $\nu \in \mathbb {R} _{>0}$ that minimize $\zeta (\nu )=\nu$ subject to $X>0,Y>0,Z>0$.
       ${\begin{aligned}{\begin{bmatrix}YA+A^{T}Y+B_{n}C_{2}&&A_{n}+C_{2}^{T}B_{n}^{T}+A^{T}X&&YB_{1}+B_{n}D_{21}\\\star &&A_{n}+A_{n}^{T}&&XB_{1}+B_{n}D_{21}\\\star &&\star &&-1\end{bmatrix}}&<0\\{\begin{bmatrix}-Z&&C_{1}-D_{f}C_{2}&&-C_{f}\\\star &&-Y&&-X\\\star &&\star &&-X\end{bmatrix}}&<0\\Y-X>0\\trZ</nu\end{aligned}}$

## Conclusion:

The filter is recovered by $A_{f}=X^{-1}A_{n}$ and $B_{f}=X^{-1}B_{n}$.

## Implementation

MATLAB code of $H_{2}$ Optimal filter

## External links

* - Optimal Filtering
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
* [http://users.cecs.anu.edu.au/~john/papers/BOOK/B02.PDF}- Optimal Filtering by Brian D.O. Anderson

# HInf Optimal Filter

Optimal filtering is a means of adaptive extraction of a weak desired signal in the presence of noise and interfering signals. The goal of optimal filtering is to design a filter that acts on the output $z$ of the generalized plant and optimizes the transfer matrix from w to the filtered output.

## The System:

Consider the continuous-time generalized LTI plant with minimal states-space realization
    ${\begin{aligned}{\dot {x}}&=Ax+B_{1}w\\z&=C_{1}x+D_{11}w,\\y&=C_{2}x+D_{21}w,\end{aligned}}$
where it is assumed that $A$ is Hurwitz.

## The Data

The matrices needed as inputs are $A,B_{1},C_{2},C_{1},,D_{11},D_{21}$.

## The Optimization Problem:

An $H\infty$-optimal filter is designed to minimize the $H_{\infty }$ norm of ${\tilde {P}}(s)$ in following equation.
    ${\begin{aligned}{\tilde {P}}(s)={\tilde {C}}_{1}(sI-{\tilde {A}})^{-}1{\tilde {B}}_{1}+{\tilde {D}}_{11},\\{\text{where}}\\{\tilde {A}}={\begin{bmatrix}A&&0\\B_{f}C_{2}&&A_{f}\end{bmatrix}}&<0\\{\tilde {B}}_{1}={\begin{bmatrix}B_{1}\\B_{f}D_{21}\end{bmatrix}}&<0\\{\tilde {C}}_{1}={\begin{bmatrix}C_{1}-D_{f}C_{2}-C_{f}\end{bmatrix}}&<0\\{\tilde {D}}_{11}=D_{11}-D_{f}D_{21}\\\end{aligned}}$

## The LMI: $H_{\infty }$- Optimal filter

Solve for $A_{n}\in \mathbb {R} ^{n_{x}\times n_{x}},B_{n}\in \mathbb {R} ^{n_{x}\times n_{y}},C_{f}\in \mathbb {R} ^{n_{x}\times n_{x}}$, $X,Y\in \mathbb {S} ^{n_{x}}$ and $\nu \in \mathbb {R} _{>0}$ that minimize $\zeta (\nu )=\nu$ subject to $X>0,Y>0$.
       ${\begin{aligned}{\begin{bmatrix}YA+A^{T}Y+B_{n}C_{2}&&A_{n}+C_{2}^{T}B_{n}^{T}+A^{T}X&&YB_{1}+B_{n}D_{21}&&{C_{1}}^{T}-{C_{2}}^{T}{D_{f}}^{T}\\\star &&A_{n}+A_{n}^{T}&&XB_{1}+B_{n}D_{21}&&-{C_{f}}^{T}\\\star &&\star &&-\gamma I&&{D_{1}1}^{T}-{D_{2}1}^{T}{D_{f}}^{T}\\\star &&\star &&\star &&-\gamma I\end{bmatrix}}&<0\\\\Y-X>0\\\end{aligned}}$

## Conclusion:

The filter is recovered by $A_{f}=X^{-1}A_{n}$ and $B_{f}=X^{-1}B_{n}$.

## Implementation

* https://github.com/Ricky-10/coding107/blob/master/Hinfinity%20Optimal%20filter- $H\infty$- Optimal Filter

## External links

* - Optimal Filtering
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.

# FDI Filter Design For Systems With Sensor Faults: an LMI

FDI Filter Design For Systems With Sensor Faults: an LMI
Systems with faulty sensors are a very common type of systems. In many cases, redundancy is added in the form of additional sensors, but in certain cases it could be a costly solution. For general linear system models, the LMI in this section can be utilized to design state estimators which can detect and isolate faulty sensor readings in order to mitigate their effects.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}w(t)+B_{2}u(t)\\y(t)&=Cx(t)+v(t)\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$ is the state, $u(t)\in \mathbb {R} ^{m}$ is the control input, $w(t)\in \mathbb {R} ^{r}$ is the process noise, $y(t)\in \mathbb {R} ^{p}$ is the output and $v(t)\in \mathbb {R} ^{q}$ is the measurement noise.

## The Data

The state space matrices $(A,B_{1},B_{2},C)$ are required to be known.

## The Optimization LMI

The following LMI is used to design the Fault Detection and Isolation (FDI) filter:
       ${\begin{aligned}&{\text{min}}_{\Phi ,\Theta ,\gamma }\;\gamma ,\\&{\text{subj. to: }}\Phi >0,\\&\quad \quad {\begin{bmatrix}A^{\top }\Phi +\Phi A+C^{\top }\Theta ^{\top }+\Theta C&\Phi B_{1}&\Theta &I\\*&-\gamma I&0&0\\*&*&-\gamma I&0\\*&*&*&-\gamma I\end{bmatrix}}<0\\\end{aligned}}$
Then the filter is $K=\Phi ^{-1}\Theta$.

## Conclusion:

The LMI designed in this section is used to design filters that can work on systems that are prone to sensors getting damaged or faulty.

## Implementation

To solve the feasibility LMI, YALMIP toolbox is required for setting up the feasibility problem, and SeDuMi is required to solve the problem. The following link showcases an example of the feasibility problem:
https://github.com/smhassaan/LMI-Examples/blob/master/FDI_Filter_example.m

## Related LMIs

H-infinity Optimal Filter
H-infinity Optimal Observer

## 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.

## Return to Main Page:
# H$_2$ Optimal State estimation

LMIs in Control/Print version The H2 norm of a stable system H is the root-mean-square of the impulse response of the system. The H2 norm measures the steady-state covariance (or power) of the output response to unit noise input. In this module, 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

## The System

Consider the continuous-time generalized plant P with state-space realization
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}u(t)+B_{2}w(t)&x(0)=x_{0}\\y(t)&=C_{1}x(t)+D_{1}u(t)+D_{2}w(t)\\&z(t)=C_{2}x(t)\end{aligned}}$
where it is assumed that (A,C$_2$) is detectable. An observer of the form

## The Data

* $x$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^n$, $y$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^l$ , $z$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^m$ are respectively the state vector, the measured
output vector, and the output vector of interests
* $w$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^p$ and $u$ ∈ ${\begin{aligned}\mathbb {R} \end{aligned}}$$^r$ are the disturbance vector and the control vector,
respectively
* A, B$_1$, B$_2$, C$_1$, C$_2$, D$_1$, and D$_2$ are the system coefficient matrices of
appropriate dimensions

## The Optimization Problem

Given the system and a positive scalar $\gamma$ we have to find the matrix L such that
||$G_{zw}(s)$||$_2$ < $\gamma$
An observer of the form
    ${\begin{aligned}{\dot {x}}(t)=Ax(t)+(Ly-Ly)+B_{1}u(t)+B_{2}w(t)\\{\dot {x}}(t)=(A+LC_{1})x(t)-Ly+(B_{1}+LD_{1})u(t)\\+(B_{2}+LD_{2})w(t)\end{aligned}}$
is to be designed, where L is the observer gain.
Defining the error state as
$e=x-{\hat {x}}$
The break dynamics are found to be
    ${\begin{aligned}{\dot {e}}=(A+LC_{1})e+(B_{2}+LD_{2})w\\{\bar {z}}(t)=C_{2}e\end{aligned}}$
For the system we introduce a full state observer in the following form:
${\dot {\hat {x}}}=(A+LC_{1}){\hat {x}}-Ly+(B_{1}+LD_{1})u$ ${\hat {x}},L$ are the observation vector and the observer gain.
The transfer function for this case is $G_{zw}(s)=C_{2}(sI-A-LC_{1})^{-1}(B_{2}+LD_{2})$ and thus the problem of $H_{2}$ state observer design is to find L such that ||$G_{zs}(s)||_{2}<\gamma$

## The LMI: LMI for H$_2$ Observer estimation

The H$_2$ state observer problem has a solution if and only if there exists a matrix $W$, a symmetric matrix $Q$ and a symmetric matrix $X$ such that
    ${\begin{bmatrix}XA+WC_{1}+(XA+WC_{1})^{T}&XB_{2}+WD_{2}\\(XB_{2}+WD_{2})^{T}&-I\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
    ${\begin{bmatrix}-Q&C_{2}\\C_{2}^{T}&-X\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
    ${\begin{aligned}trace(Q)<\gamma ^{2}\end{aligned}}$
and from the solution of the above LMIs we can obtain the observer matrix as
    $L=X^{-1}W$

## Conclusion

Thus by formulation, we have converted the problem of H$_2$ state observer design into an LMI feasibility problem by optimizing the above LMIs. In application we are often concerned with the problem of finding the minimal attenuation level $\gamma$
On implementation and optimization of the above LMI using YALMIP and MOSEK (or) SeDuMi we get 3 matrices as output, $X,WandQ$ and also $\rho$ which is used to calculate $\gamma$ which is the H$_2$ norm of the system.
There exists another set of LMIs which holds true for the same optimization problem as above.
    ${\begin{aligned}A^{T}Y+C_{1}^{T}V^{T}+YA+VC_{1}+C_{2}^{T}C_{2}<0\\\end{aligned}}$
    ${\begin{bmatrix}-Z&YB_{2}+VD_{2}\\(YB_{2}+VD_{2})^{T}&-Y\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
${\begin{aligned}trace(Z)<\gamma ^{2}\end{aligned}}$
When a minimal $\rho$ is obtained, the minimal attenuation level is
$\gamma ={\sqrt {\rho }}$

## Implementation

A link to the Matlab code for a simple implementation of this problem in the Github repository:
https://github.com/yashgvd/ygovada

## Related LMIs

H$_{∞{\displaystyle\infty}}$ State Observer Design
Discrete time H$_2$ State Observer Design

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.

## Return to Main Page:
# Hurwitz Detectability

LMIs in Control/Print version

## Hurwitz Detectability

Hurwitz detectability is a dual concept of Hurwitz stabilizability and is defined as the matrix pair $(A,C)$, is said to be Hurwitz detectable if there exists a real matrix $L$ such that $A+LC$ is Hurwitz stable.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\x(0)&=x_{0}\\\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$, $u(t)\in \mathbb {R} ^{q}$, at any $t\in \mathbb {R}$.

## The Data

* The matrices $A,B,C,D$ are system matrices of appropriate dimensions and are known.

## The Optimization Problem

There exist a symmetric positive definite matrix $P$ and a matrix $W$ satisfying $A^{T}P+PA+W^{T}C+C^{T}W<0$
There exists a symmetric positive definite matrix $P$ satisfying
$N_{c}^{T}(A^{T}P+PA)N_{c}<0$
with $N_{c}$ being the right orthogonal complement of $C$.
There exists a symmetric positive definite matrix $P$ such that
$A^{T}P+PA<\gamma C^{T}C$
for some scalar $\gamma >0$

## The LMI:

Matrix pair $(A,C)$, is Hurwitz detectable if and only if following LMI holds
* $A^{T}P+PA+W^{T}C+C^{T}W<0.$
* $N_{c}^{T}(A^{T}P+PA)N_{c}<0$
* $A^{T}P+PA-\gamma C^{T}C<0$

## Conclusion:

Thus by proving the above conditions we prove that the matrix pair $(A,C)$ is Hurwitz Detectable.

## Implementation

Find the MATLAB implementation at this link below Hurwitz detectability

## Related LMIs

Links to other closely-related LMIs LMI for Hurwitz stability LMI for Schur stability Schur Detectability

## 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.

## Return to Main Page:

* https://en.wikibooks.org/wiki/LMIs_in_Control

# Full-Order State Observer

LMIs in Control/Print version

## Full-Order State Observer

The problem of constructing a simple full-order state observer directly follows from the result of Hurwitz detectability LMI's, Which essentially is the dual of Hurwitz stabilizability. If a feasible solution to the first LMI for Hurwitz detectability exist then using the results we can back out a full state observer $L$ such that $A+LC$ is Hurwitz stable.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\x(0)&=x_{0}\\\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$, $u(t)\in \mathbb {R} ^{q}$, at any $t\in \mathbb {R}$.

## The Data

* The matrices $A,B,C,D$ are system matrices of appropriate dimensions and are known.

## The Optimization Problem

The full-order state observer problem essential is finding a positive definite $P$ such that the following LMI conclusions hold.

## The LMI:

1) The full-order state observer problem has a solution if and only if there exist a symmetric positive definite Matrix $P$ and a matrix $W$ that satisfy
* $A^{T}P+PA+W^{T}C+C^{T}W<0.$
Then the observer can be obtained as $L=P^{-1}W$ 2) The full-state state observer can be found if and only if there is a symmetric positive definite Matrix $P$ that satisfies the below Matrix inequality
* $A^{T}P+PA-C^{T}C<0$
In this case the observer can be reconstructed as $L=-{\frac {1}{2}}P^{-1}C^{T}$. It can be seen that the second relation can be directly obtained by substituting $W=-{\frac {1}{2}}C^{T}$ in the first condition.

## Conclusion:

Hence, both the above LMI's result in a full-order observer $L$ such that $A+LC$ is Hurwitz stable.

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems Analysis, Design and Applications - Duan and Yu
* 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.

## Return to Main Page:
# Full-Order H-infinity State Observer

In this section, we design full order H-$\infty$ state observer.

## The System

Given a state-space representation of a linear system
    ${\begin{aligned}\ {\dot {x}}(t)=Ax(t)+B_{1}u(t)+B_{2}w(t),x(0)=x_{0}\\\ y(t)=C_{1}x(t)+D_{1}u(t)+D_{2}w(t)\\\ z(t)=C_{2}x(t)\\\end{aligned}}$
* $x\in \mathbb {R} ^{n},y\in \mathbb {R} ^{l},zin\mathbb {R} ^{m}$ are the state vector, measured output vector and output vectors of interest.
* $w\in \mathbb {R} ^{p},u\in \mathbb {R} ^{r},$ are the disturbance vector and control vector respectively.

## The Data

$A,B_{1},B_{2},C_{1},C_{2},D_{1},D_{2}$ are system matrices

## Definition

For the system , a full order state observer of the form of equation (1) is introduced and the estimate of interested output is given by .
    ${\begin{aligned}\ {\dot {\hat {x}}}=(A+LC_{1}){\hat {x}}-Ly+(B_{1}+LD_{1})u\\\end{aligned}}$         (1)
The estimate of interested output is
    ${\begin{aligned}{\hat {z}}(t)=C_{2}{\hat {x}}(t)\\\end{aligned}}$         (2)
Given the system and a positive scalar $\gamma$ , L is found such that
    ${\begin{aligned}\|G_{{\tilde {z}}w}(s)\|_{\infty }=\gamma \\\end{aligned}}$         (3)

## LMI Condition

The $H_{\infty }$ state observers problem has a solution if and only if there exists a symmetric positive definite matrix $P$ and a matrix $W$ satisfying the below LMI
    ${\begin{aligned}{\begin{bmatrix}A^{T}P+C_{1}^{T}W^{T}+PA+WC_{1}&PB_{2}+WD_{2}&C_{2}^{T}\\(PB_{2}+WD_{2})^{T}&-\gamma I&0\\C_{2}&0&-\gamma I\end{bmatrix}}\\\end{aligned}}$         (4)
When such a pair of matrics is found, the solution is
    ${\begin{aligned}L=P^{-1}W\\\end{aligned}}$         (5)

## Implementation

This implementation requires Yalmip and Mosek.
* https://github.com/ShenoyVaradaraya/LMI--master/blob/main/hinf_obs.m

## Conclusion

Thus, an $H_{\infty }$ state observer is designed such that the output vectors of interest are accurately estimated.

## External Links

* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & Francis Group, 2013

# Reduced-Order State Observer

LMIs in Control/Print version

## Reduced Order State Observer

The Reduced Order State Observer design paradigm follows naturally from the design of Full Order State Observer.

## The System

    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t),\\y(t)&=Cx(t)+Du(t)\\x(0)&=x_{0}\\\end{aligned}}$
where $x(t)\in \mathbb {R} ^{n}$, $y(t)\in \mathbb {R} ^{m}$, $u(t)\in \mathbb {R} ^{q}$, at any $t\in \mathbb {R}$.

## The Data

* The matrices $A,B,C,D$ are system matrices of appropriate dimensions and are known.

## The Problem Formulation

Given a State-space representation of a system given as above. First an arbitrary matrix $R\in \mathbb {R} ^{(n-m)xn}$ is chosen such that the vertical augmented matrix given as
    ${\begin{aligned}T={\begin{bmatrix}C\\R\\\end{bmatrix}}\end{aligned}}$
is nonsingular, then
    ${\begin{aligned}CT^{-1}={\begin{bmatrix}I_{m}&0\end{bmatrix}}\end{aligned}}$
Furthermore, let
    ${\begin{aligned}TAT^{-1}={\begin{bmatrix}A_{11}&A_{12}\\A_{21}&A_{22}\\\end{bmatrix}},A_{11}\in \mathbb {R} ^{mxm}\end{aligned}}$
then the matrix pair $(A_{22},A_{12})$ is detectable if and only if $(A,C)$ is detectable, then let
    ${\begin{aligned}Tx={\begin{bmatrix}x_{1}\\x_{2}\\\end{bmatrix}},TB={\begin{bmatrix}B_{1}\\B_{2}\\\end{bmatrix}}\end{aligned}}$
then a new system of the form given below can be obtained
    ${\begin{aligned}{\begin{bmatrix}{\dot {x}}_{1}\\{\dot {x}}_{2}\\\end{bmatrix}}={\begin{bmatrix}A_{11}&A_{12}\\A_{21}&A_{22}\\\end{bmatrix}}{\begin{bmatrix}{\dot {x}}_{1}\\{\dot {x}}_{2}\\\end{bmatrix}}+{\begin{bmatrix}B_{1}\\B_{2}\\\end{bmatrix}}u,y=x_{1}\end{aligned}}$
once an estimate of $x_{2}$ is obtained the the full state estimate can be given as
    ${\begin{aligned}{\hat {x}}=T^{-1}{\begin{bmatrix}y\\{\hat {x}}_{2}\\\end{bmatrix}}\end{aligned}}$
the the reduced order observer can be obtained in the form.
    ${\begin{aligned}{\dot {z}}&=Fz+Gy+Hu,\\{\hat {x}}_{2}&=Mz+Ny\\\end{aligned}}$
Such that for arbitrary control and arbitrary initial system values, There holds
    ${\begin{aligned}lim_{t\to \infty }(x_{2}-{\hat {x}}_{2})=0\end{aligned}}$
The value for $F,G,H,M,N$ can be obtain by solving the following LMI.

## The LMI:

The reduced-order observer exists if and only if one of the two conditions holds.
1) There exist a symmetric positive definite Matrix $P$ and a matrix $W$ that satisfy
* $A_{22}^{T}P+PA_{22}+W_{12}^{A}+A_{12}^{T}W<0.$
Then $L=P^{-1}W$ 2) There exist a symmetric positive definite Matrix $P$ that satisfies the below Matrix inequality
* $A_{22}^{T}P+PA_{22}-A_{12}^{T}A_{12}<0$
Then $L=-{\frac {1}{2}}P^{-1}A_{12}^{T}$.
By using this value of $L$ we can reconstruct the observer state matrices as
    ${\begin{aligned}F=A_{22}+LA{12},G=(A_{21}+LA_{11})-(A_{22}+LA_{12})L,H=B_{2}+LB_{1},M=I,N=-L,\end{aligned}}$

## Conclusion:

Hence, we are able to form a reduced-order observer using which we can back of full state information as per the equation given at the end of the problem formulation given above.

## External Links

A list of references documenting and validating the LMI.
* LMIs in Control Systems Analysis, Design and Applications - Duan and Yu
* 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.

## Return to Main Page:
# Optimal Observer; Mixed

LMIs in Control/Print version
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 both H2 and Hinf norms, to minimize both the average and the maximum error of the observer.

## The System

    ${\begin{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1,1}w_{1,k}+B_{d1,2}w_{2,k},\\y_{k}&=C_{c2}x_{k}+D_{d21,1}w_{1,k}+D_{d21,2}w_{2,k}\\\end{aligned}}$
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_{cd2},C_{cd1},D_{d21}$.

## The Optimization Problem

An observer of the form:
    ${\begin{aligned}{\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{aligned}}$
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,1}-L_{d}D_{d21,1})w_{1,k}+(B_{d1,2}-L_{d}D_{d21,2})w_{2,k}$,
and the performance output is defined as
${\begin{bmatrix}Z_{1,k}\\Z_{2,k}\end{bmatrix}}={\begin{bmatrix}C_{d1,1}\\C_{d1,2}\end{bmatrix}}e_{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}}$.
The observer gain $L_{d}$ is to be designed to minimize the $H_{2}$ norm of the closed loop transfer matrix $T_{11}(z)$ from the exogenous input $w_{2,k}$ to the performance output $z_{2,k}$ is less than $\gamma _{d}$, where
${\begin{aligned}T_{11}(z)&=C_{d1,1}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1,1}-L_{d}D_{d21,1}),\\T_{22}(z)&=C_{d1,2}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1,2}-L_{d}D_{d21,2})+D_{d11,22}\end{aligned}}$

## The LMI: Discrete-Time Mixed H2-Hinf-Optimal Observer

The discrete-time mixed-$H_{2}H_{inf}$-optimal observer gain is synthesized by solving for $P\in S^{n_{x}}$, $Z\in S^{n_{z}}$, $G_{d}\in R^{n_{x}*n_{y}}$, and $v\in R_{>0}$ that minimize J$(v)=v$ subject to $P>0,Z>0$,
       ${\begin{aligned}{\begin{bmatrix}P&PA_{d}-G_{d}C_{d2}&PB_{d1,1}-G_{d}D_{d21,1}\\*&P&0\\*&*&1\end{bmatrix}}&>0,\\{\begin{bmatrix}P&PA_{d}-G_{d}C_{d2}&PB_{d1,2}-G_{d}D_{d21,2}&0\\*&P&0&C_{d1,2}^{T}\\*&*&\gamma _{d}1&D_{d11,22}^{T}\\*&*&*&\gamma _{d}1\end{bmatrix}}&>0,\\{\begin{bmatrix}Z&PC_{d1,1}\\*&P\end{bmatrix}}&>0,\\trZ<v\end{aligned}}$
where $tr$ refers to the trace of a matrix.

## Conclusion:

The mixed-$H_{2}H_{inf}$-optimal observer gain is recovered by $L_{d}=P^{-1}G_{d}$, the $H_{2}$ norm of $T_{11}(z)$ is less than $\mu ={\sqrt {v}}$, and the $H_{inf}$ norm of $T_{22}(z)$ is less than $\gamma _{d}$. This result gives us a matrix of observer gains $L_{d}$ that allow us to optimally observe the states of the system indirectly as:
    ${\begin{aligned}{\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{aligned}}$

## Implementation

This implementation requires Yalmip and Sedumi.
https://github.com/rezajamesahmed/LMImatlabcode/blob/master/mixedh2hinfobsdiscretetime.m

## Related LMIs

Discrete-Time_Hinfinity-Optimal_Observer
Discrete-Time_H2-Optimal_Observer

## External Links

This LMI comes from Ryan Caverly's text on LMI's (Section 5.3.2):
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
Other resources:
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

## Return to Main Page:
# Optimal Observer; H2

LMIs in Control/Print version
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{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k},\\y_{k}&=C_{c2}x_{k}+D_{d21}w_{k}\\\end{aligned}}$
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{aligned}{\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{aligned}}$
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{aligned}T(z)&=C_{d1}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1}-L_{d}D_{d21}),\\\end{aligned}}$
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{aligned}{\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{aligned}}$
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{aligned}{\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{aligned}}$

## 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

## External Links

This LMI comes from Ryan Caverly's text on LMI's (Section 5.1.2):
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
Other resources:
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

## Return to Main Page:
# Optimal Observer; Hinf

LMIs in Control/Print version
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{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1}w_{k},\\y_{k}&=C_{d2}x_{k}+D_{d21}w_{k}\\\end{aligned}}$
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{aligned}{\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{aligned}}$
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{aligned}T(z)&=C_{d1}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1}-L_{d}D_{d21})+D_{d11},\\\end{aligned}}$
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{aligned}{\begin{bmatrix}P&PA_{d}-G_{d}C_{d2}&PB_{d1}-G_{d}D_{d21}&0\\*&P&0&C_{d1}^{T}\\*&*&\gamma *1&D_{d11}^{T}\\*&*&*&\gamma *1\end{bmatrix}}&>0.\\\end{aligned}}$

## 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{aligned}{\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{aligned}}$

## 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

## External Links

This LMI comes from Ryan Caverly's text on LMI's (Section 5.2.2):
* LMI Properties and Applications in Systems, Stability, and Control Theory - A List of LMIs by Ryan Caverly and James Forbes.
Other resources:
* LMI Methods in Optimal and Robust Control - A course on LMIs in Control by Matthew Peet.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.

## Return to Main Page:
# Discrete Time Detectability

Discrete-Time Detectability
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.
Discrete-Time LTI systems can be made detectable using observer gain L, which can be found using LMI optimization, such that the close loop system is detectable.

## The System

Discrete-Time LTI System with state space realization $(A_{d},B_{d},C_{d},D_{d})$ ${\begin{aligned}&A_{d}\in {\bf {{R^{n*n}},}}&B_{d}\in {\bf {{R^{n*m}},}}&C_{d}\in {\bf {{R^{p*n}},}}&D_{d}\in {\bf {{R^{p*m}}\;}}\\\end{aligned}}$

## The Data

The matrices: System $(A_{d},B_{d},C_{d},D_{d}),P,W$.

## The Optimization Problem

The following feasibility problem should be optimized:
Maximize P while obeying the LMI constraints. Then L is found.

## The LMI:

Discrete-Time Detectability
The LMI formulation
${\begin{aligned}P\in {S^{n}};W\in {R^{m*n}}\;\\&P>0\\{\begin{bmatrix}P&A_{d}^{T}P+C_{d}^{T}W\\*&P\end{bmatrix}}&>0,\\L=P^{-1}W\end{aligned}}$

## Conclusion:

The system is detectabe iff there exits a $P$, such that $P>0$. The matrix $A_{d}+LC_{d}$ is Schur with $L=P^{-1}W$

## Implementation

A link to CodeOcean or other online implementation of the LMI MATLAB Code

## Related LMIs

- Continuous time Detectability

## 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.

## Return to Main Page:
# Schur Detectability

Schur Detectability
Schur detectability is a dual concept of Schur stabilizability and is defined as follows, the matrix pair $(A,C),$ is said to be Schur detectable if there exists a real matrix $L$ such that $A+LC$ is Schur stable.

## The System

We consider the following system:
${\begin{aligned}x(k+1)=Ax(k)+Bu(k)\\y(k)=Cx(k)+Du(k)\\\end{aligned}}$
where the matrices $A\in \mathbb {R} ^{n\times n}$, $B\in \mathbb {R} ^{n\times r}$, $C\in \mathbb {R} ^{m\times n}$,$D\in \mathbb {R} ^{m\times r}$$x\in \mathbb {R} ^{n}$,$y\in \mathbb {R} ^{m}$ , and $u\in \mathbb {R} ^{r}$ are the state matrix, input matrix, state vector, and the input vector, respectively.
Moreover, $k$ represents time in the discrete-time system and $k+1$ is the next time step.
The state feedback control law is defined as follows:
${\begin{aligned}u(k)=Kx(k)\end{aligned}}$
where $K\in \mathbb {R} ^{n\times r}$ is the controller gain. Thus, the closed-loop system is given by:
${\begin{aligned}x(k+1)=(A+BK)x(k)\end{aligned}}$

## The Data

* The matrices $A,B,C,D$ are system matrices of appropriate dimensions and are known.

## The Optimization Problem

There exist a symmetric matrix $P$ and a matrix W satisfying
${\begin{aligned}{\begin{bmatrix}-P&A^{T}P+C^{T}W^{T}\\PA+WC&P\end{bmatrix}}<0\\\end{aligned}}$
There exists a symmetric matrix $P$ satisfying
${\begin{aligned}{\begin{bmatrix}-N_{c}^{T}PN_{c}&N_{c}^{T}A^{T}P\\PAN_{c}&-P\end{bmatrix}}<0\\\end{aligned}}$
with $N_{c}$ being the right orthogonal complement of $C$. There exists a symmetric matrix P such that ${\begin{aligned}{\begin{bmatrix}-P&PA\\A^{T}P&-P-\gamma C^{T}C\end{bmatrix}}<0\\\end{aligned}}$
$\gamma >1$

## The LMI:

The LMI for Schur detecability can be written as minimization of the scalar, $\gamma$, in the following constraints:
${\begin{aligned}&{\text{min}}\quad \gamma \\&{\text{s.t.}}\end{aligned}}$
${\begin{aligned}{\begin{bmatrix}-P&A^{T}P+C^{T}W^{T}\\PA+WC&P\end{bmatrix}}<0\\\end{aligned}}$
${\begin{aligned}{\begin{bmatrix}-N_{c}^{T}PN_{c}&N_{c}^{T}A^{T}P\\PAN_{c}&-P\end{bmatrix}}<0\\\end{aligned}}$
${\begin{aligned}{\begin{bmatrix}-P&PA\\A^{T}P&-P-\gamma C^{T}C\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

Thus by proving the above conditions we prove that the matrix pair $(A,C)$ is Schur Detectable.

## Implementation

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

## Related LMIs

LMI for Hurwitz stability LMI for Schur stability Hurwitz Detectability

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

# Robust Stabilization of Second-Order Systems

LMIs in Control/Print version
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{aligned}(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{aligned}}$
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{aligned}|\Delta A_{2}|_{2}\leq \epsilon _{2},|\Delta A_{1}|_{2}\leq \epsilon _{1},|\Delta A_{0}|_{2}\leq \epsilon _{0},\end{aligned}}$
or
    ${\begin{aligned}max\{\|\Delta a_{2ij}\|\}\leq \eta _{2},max\{\|\Delta a_{1ij}\|\}\leq \eta _{1},max\{\|\Delta a_{0ij}\|\}\leq \eta _{0},\end{aligned}}$
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{aligned}(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{aligned}}$
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{aligned}\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{aligned}}$,
or
the system is hurwitz stable if
    ${\begin{aligned}\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{aligned}}$
, 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{aligned}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{aligned}}$
or
       ${\begin{aligned}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{aligned}}$

## 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

## External Links

This LMI comes from
* - "LMIs in Control Systems: Analysis, Design and Applications" by Guang-Ren Duan and Hai-Hua Yu
Other resources:
* 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.

## References

Duan, G. (2013). LMIs in control systems: analysis, design and applications. Boca Raton: CRC Press, Taylor & Francis Group.

## Return to Main Page:
# Robust Stabilization of $H{\infty }$ Optimal State Feedback Control
## Robust Full State Feedback Optimal $H_{\infty }$ 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 \mathbb {R} ^{n}$ is the state, $z(t)\in \mathbb {R} ^{m}$ is the output, $w(t)\in \mathbb {R} ^{p}$ is the exogenous input or disturbance vector, and $u(t)\in \mathbb {R} ^{r}$ is the actuator input or control vector, at any $t\in \mathbb {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}}=HF{\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^{T}F\leq 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 \mathbb {R} ^{n}$ is the state, $z(t)\in \mathbb {R} ^{m}$ is the output, $w(t)\in \mathbb {R} ^{p}$ is the exogenous input or disturbance vector, and $u(t)\in \mathbb {R} ^{r}$ is the actuator input or control vector, at any $t\in \mathbb {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

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013.

## Return to Main Page:

LMIs in Control: https://en.wikibooks.org/wiki/LMIs_in_Control

# Robust H inf State Feedback Control
## Robust Full State Feedback Optimal $H_{\infty }$ 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 \mathbb {R} ^{n}$ is the state, $z(t)\in \mathbb {R} ^{m}$ is the output, $w(t)\in \mathbb {R} ^{p}$ is the exogenous input or disturbance vector, and $u(t)\in \mathbb {R} ^{r}$ is the actuator input or control vector, at any $t\in \mathbb {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}}=HF{\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^{T}F\leq 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 \mathbb {R} ^{n}$ is the state, $z(t)\in \mathbb {R} ^{m}$ is the output, $w(t)\in \mathbb {R} ^{p}$ is the exogenous input or disturbance vector, and $u(t)\in \mathbb {R} ^{r}$ is the actuator input or control vector, at any $t\in \mathbb {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

## 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.
* LMIs in Control Systems: Analysis, Design and Applications - by Guang-Ren Duan and Hai-Hua Yu, CRC Press, Taylor & amp; Francis Group, 2013.

## Return to Main Page:

LMIs in Control: https://en.wikibooks.org/wiki/LMIs_in_Control

# LMI for Time-Delay system on delay Independent Condition
## The System

The problem is to check the stability of the following linear time-delay system
    ${\begin{aligned}{\begin{cases}{\dot {x}}(t)&=Ax(t)+A_{d}x(t-d)\\x(t)&=\phi (t),t\in [-d,0],0<d\leq {\bar {d}},\\\end{cases}}\end{aligned}}$
where
    ${\begin{aligned}{A,A_{d}}\in \mathbb {R} ^{n\times n}{\text{, }}{A}\in \mathbb {R} ^{n\times r}{\text{ are the system coefficient matrices,}}\\\end{aligned}}$
$\phi (t)$ is the initial condition
$d$ represents the time-delay ${\bar {d}}$ is a known upper-bound of $d$

## The Data

The matrices $A,A_{d}$ are known

## The LMI: The Time-Delay systems (Delay Independent Condition)

From the given pieces of information, it is clear that the optimization problem only has a solution if there exists two symmetric matrices $P,S\in \mathbb {S} ^{n}$ such that
$P>0$
    ${\begin{bmatrix}A^{T}P+PA+S&PA_{d}\\A_{d}^{T}P&-S\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
This LMI has been derived from the Lyapunov function for the system. By Schur Complement we can see that the above matrix inequality is equivalent to the Riccati inequality
$A^{T}P+PA+PA_{d}S^{-1}A_{d}^{T}P+S<0$

## Conclusion:

We can now implement these LMIs to do stability analysis for a Time delay system on the delay independent condition

## Implementation

The implementation of the above LMI can be seen here
https://github.com/yashgvd/LMI_wikibooks

## Related LMIs

Time Delay systems (Delay Dependent Condition)

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* D. d. S. Madeira and J. Adamy, "Static output feedback: An LMI condition for stabilizability based on passivity indices," 2016 IEEE Conference on Control Applications (CCA), Buenos Aires, 2016, pp. 960-965.

## Return to Main Page:
# LMI for Time-Delay system on delay Dependent Condition
## The System

The problem is to check the stability of the following linear time-delay system on a delay dependent condition
    ${\begin{aligned}{\begin{cases}{\dot {x}}(t)&=Ax(t)+A_{d}x(t-d)\\x(t)&=\phi (t),t\in [-d,0],0<d\leq {\bar {d}},\\\end{cases}}\end{aligned}}$
where
    ${\begin{aligned}{A,A_{d}}\in \mathbb {R} ^{n\times n},A\in \mathbb {R} ^{n\times r}{\text{ are the system coefficient matrices,}}\\\end{aligned}}$
$\phi (t)$ is the initial condition
$d$ represents the time-delay ${\bar {d}}$ is a known upper-bound of $d$
For the purpose of the delay dependent system we rewrite the system as
    ${\begin{cases}{\dot {x}}(t)&=Ax(t)+A_{d}x(t-d)\\{\dot {x}}(t)&=(A+A_{d})x(t)-A_{d}(x(t)-x(t-d)\end{cases}}$

## The Data

The matrices $A,A_{d}$ are known

## The LMI: The Time-Delay systems (Delay Dependent Condition)

From the given pieces of information, it is clear that the optimization problem only has a solution if there exists a symmetric positive definite matrix $X$ and a scalar $0<\beta <1$ such that
    ${\begin{bmatrix}\Phi (X)&{\bar {d}}XA^{T}&{\bar {d}}XA_{d}^{T}\\{\bar {d}}AX&-d\beta I&0\\{\bar {d}}A_{d}X&0&-{\bar {d}}(1-\beta )I\end{bmatrix}}$${\begin{aligned}<0\end{aligned}}$
Here $\Phi (X)=X)A+A_{d})^{T}+(A+A_{d})X+{\bar {d}}A_{d}A_{d}^{T}<0$
This LMI has been derived from the Lyapunov function for the system. It follows that the system is asymptotically stable if
$P(A+A_{d})+(A+A_{d})^{T}P+{\bar {d}}PA_{d}A_{d}^{T}P+{\frac {\bar {d}}{\beta }}A^{T}A+{\frac {\bar {d}}{1-\beta }}A_{d}^{T}A_{d}<0$
This is obtained by replacing $X$ with $P^{-1}$

## Conclusion:

We can now implement these LMIs to do stability analysis for a Time delay system on the delay dependent condition

## Implementation

The implementation of the above LMI can be seen here
https://github.com/yashgvd/LMI_wikibooks

## Related LMIs

Time Delay systems (Delay Independent Condition)

## External Links

* - LMI in Control Systems Analysis, Design and Applications
* 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.
* D. d. S. Madeira and J. Adamy, "Static output feedback: An LMI condition for stabilizability based on passivity indices," 2016 IEEE Conference on Control Applications (CCA), Buenos Aires, 2016, pp. 960-965.

## Return to Main Page:
# LMI for Stability of Retarded Differential Equation with Slowly-Varying Delay

LMIs in Control/Print version
This page describes an LMI for stability analysis of a continuous-time system with a time-varying delay. In particular, a delay-independent condition is provided to test uniform asymptotic stability of a retarded differential equation through feasibility of an LMI. The system under consideration pertains a single discrete delay, with the extent of the delay at any time bounded by some known value. Moreover, the delay is assumed to vary only slowly in time, with a temporal derivative bounded by a value less than one. Solving the LMI for a particular value of this bound, uniform asymptotic stability can be shown for any time-delay satisfying this bound.

## The System

The system under consideration is one of the form:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+A_{1}x(t-\tau (t))&t&\geq t_{0},&0&\leq \tau (t)\leq h,&{\dot {\tau }}(t)&\leq d<1\end{aligned}}$
In this description, $A$ and $A_{1}$ are matrices in $\mathbb {R} ^{n\times n}$. The variable $\tau (t)$ denotes a delay in the state at time $t\geq t_{0}$, assuming a value no greater than some $h\in \mathbb {R} _{+}$. Moreover, we assume that the function $\tau (t)$ is differentiable at any time, with the derivative bounded by some value $d<1$, assuring the delay to be slowly-varying in time.

## The Data

To determine stability of the system, the following parameters must be known:
${\begin{aligned}A&\in \mathbb {R} ^{n\times n}\\A_{1}&\in \mathbb {R} ^{n\times n}\\d&\in [0,1)\end{aligned}}$

## The Optimization Problem

Based on the provided data, uniform asymptotic stability can be determined by testing feasibility of the following LMI:

## The LMI: Delay-Independent Uniform Asymptotic Stability for Continuous-Time TDS

       ${\begin{aligned}&{\text{Find}}:\\&\qquad P,Q\in \mathbb {R} ^{n\times n}\\&{\text{such that:}}\\&\qquad P>0,\quad Q>0\\&\qquad {\begin{bmatrix}A^{T}P+PA+Q&PA_{1}\\A_{1}^{T}P&-(1-d)Q\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

If the presented LMI is feasible, the system will be uniformly asymptotically stable for any delay function $\tau (t)$ satisfying ${\dot {\tau }}(t)\leq d<1$. That is, independent of the values of the delays $\tau (t)$ and the starting time $t_{0}\in \mathbb {R}$:
* For any real number $\epsilon >0$, there exists a real number $\delta >0$ such that:
    $\|x_{t_{0}}\|_{\mathcal {C}}<\delta \quad \Rightarrow \quad \|x(t)\|<\epsilon \qquad \forall t\geq t_{0}$
* There exists a real number $\delta _{a}>0$ such that for any real number $\eta >0$, there exists a time $T(\delta _{a},\eta )$ such that:
    $\|x_{t_{0}}\|_{\mathcal {C}}<\delta _{a}\quad \Rightarrow \quad \|x(t)\|<\eta \qquad \forall t\geq t_{0}+T(\delta _{a},\eta )$
Here, we let $x_{t_{0}}(\theta )=x(t_{0}+\theta )$ for $\theta \in [-\tau (t_{0}),0]$ denote the delayed state function at time $t_{0}$. The norm $\|x_{t_{0}}\|_{\mathcal {C}}$ of this function is defined as the maximal value of the vector norm assumed by the state over the delayed time interval, given by:
    $\|x_{t_{0}}\|_{\mathcal {C}}:=\max _{\theta \in [-\tau (t_{0}),0]}\|x(t_{0}+\theta )\|$
Obtaining a feasible point for the LMI, this result can be proven using a Lyapunov-Krasovkii functional:
    ${\begin{aligned}&V(t,x_{t})=x^{T}(t)Px(t)+\int _{t-\tau (t)}^{t}x^{T}(s)Qx(s)ds\\\end{aligned}}$
Notably, if matrices $P>0,Q>0$ prove feasibility of the LMI for the pair $(A,A_{1})$, these same matrices will also prove feasibility of the LMI for the pair $(A,-A_{1})$. As such, feasibility of this LMI proves uniform asymptotic stability of both systems:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)\pm A_{1}x(t-\tau (t))&t&\geq t_{0},&0&\leq \tau (t)\leq h&{\dot {\tau }}(t)&\leq d<1\end{aligned}}$
Moreover, since the result is independent of the value of the delay, it will also hold for a delay $\tau (t)\equiv 0$. Hence, if the LMI is feasible, the matrices $A\pm A_{1}$ will be Hurwitz.

## Implementation

An example of the implementation of this LMI in Matlab is provided on the following site:
* https://github.com/djagt/LMI_Codes/blob/main/stblty_cTDS_SlowVarying.m
Note that this implementation requires packages for YALMIP with solver mosek, though a different solver can also be implemented.

## Related LMIs

* - Delay-dependent stability LMI for continuous-time TDS
* - Stability LMI for delayed discrete-time system

## External Links

The presented results have been obtained from:
* Fridman E. 2014. Introduction to Time-Delay Systems, Analysis and Control. Springer. ISBN: 978-3-319-09392-5.
Additional information on LMI's in control theory can be obtained from the following resources:
* 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.

## Return to Main Page:
# LMI for Robust Stability of Retarded Differential Equation with Norm-Bounded Uncertainty

LMIs in Control/Print version
This page describes an LMI for stability analysis of an uncertain continuous-time system with a time-varying delay. In particular, a delay-independent condition is provided to test uniform asymptotic stability of a retarded differential equation with uncertain matrices through feasibility of an LMI. The system under consideration pertains a single discrete delay, with the extent of the delay at any time bounded by some known value. The matrices describing the system are assumed to be uncertain, with the norm of the uncertainty bounded by a value of one. In addition, the delay is assumed to vary only slowly in time, with a temporal derivative bounded by a value less than one. Solving the LMI for a particular value of this bound, uniform asymptotic stability can be shown for any time-delay satisfying this bound, independent of the value of the uncertainty function.

## The System

The system under consideration is one of the form:
    ${\begin{aligned}{\dot {x}}(t)&=(A+H\Delta (t)E)x(t)+(A_{1}+H\Delta (t)E_{1})x(t-\tau (t))&t&\geq t_{0},&0&\leq \tau (t)\leq h,&{\dot {\tau }}(t)&\leq d<1\end{aligned}}$
In this description, $A$ and $A_{1}$ are matrices in $\mathbb {R} ^{n\times n}$. The variable $\tau (t)$ denotes a delay in the state at time $t\geq t_{0}$, assuming a value no greater than some $h\in \mathbb {R} _{+}$. Moreover, we assume that the function $\tau (t)$ is differentiable at any time, with the derivative bounded by some value $d<1$, assuring the delay to be slowly-varying in time. The uncertainty $\Delta (t)\in \mathbb {R} ^{r_{1}\times r_{2}}$ is also allowed to vary in time, but at any time $t\geq t_{0}$ must satisfy the inequality:
    ${\begin{aligned}\Delta ^{T}(t)\Delta (t)&\leq I\end{aligned}}$
The uncertainty affects the system through matrices $H\in \mathbb {R} ^{n\times r_{1}}$ and $E,E_{1}\in \mathbb {R} ^{r_{2}\times n}$, which are constant in time and assumed to be known.

## The Data

To determine stability of the system, the following parameters must be known:
${\begin{aligned}A,A_{1}&\in \mathbb {R} ^{n\times n}\\H&\in \mathbb {R} ^{n\times r_{1}}\\E,E_{1}&\in \mathbb {R} ^{r_{2}\times n}\\d&\in [0,1)\end{aligned}}$

## The Optimization Problem

Based on the provided data, uniform asymptotic stability can be determined by testing feasibility of the following LMI:

## The LMI: Delay-Independent Robust Uniform Asymptotic Stability for Continuous-Time TDS

       ${\begin{aligned}&{\text{Find}}:\\&\qquad \epsilon \in \mathbb {R} ,\quad P,Q\in \mathbb {R} ^{n\times n}\\&{\text{such that:}}\\&\qquad \epsilon >0,\quad P>0,\quad Q>0\\&\qquad {\begin{bmatrix}A^{T}P+PA+Q&PA_{1}&PH&\epsilon E^{T}\\A_{1}^{T}P&-(1-d)Q&0&\epsilon E_{1}^{T}\\H^{T}P&0&-\epsilon I&0\\\epsilon E&\epsilon E_{1}&0&-\epsilon I\end{bmatrix}}<0\\\end{aligned}}$

## Conclusion:

If the presented LMI is feasible, the system will be uniformly asymptotically stable for any delay function $\tau (t)$ satisfying ${\dot {\tau }}(t)\leq d<1$, and any uncertainty $\Delta (t)$ satisfying $\Delta ^{T}(t)\Delta (t)\leq I$. That is, independent of the values of the delays $\tau (t)$, uncertainties $\Delta (t)$, and the starting time $t_{0}\in \mathbb {R}$:
* For any real number $\epsilon >0$, there exists a real number $\delta >0$ such that:
    $\|x_{t_{0}}\|_{\mathcal {C}}<\delta \quad \Rightarrow \quad \|x(t)\|<\epsilon \qquad \forall t\geq t_{0}$
* There exists a real number $\delta _{a}>0$ such that for any real number $\eta >0$, there exists a time $T(\delta _{a},\eta )$ such that:
    $\|x_{t_{0}}\|_{\mathcal {C}}<\delta _{a}\quad \Rightarrow \quad \|x(t)\|<\eta \qquad \forall t\geq t_{0}+T(\delta _{a},\eta )$
Here, we let $x_{t_{0}}(\theta )=x(t_{0}+\theta )$ for $\theta \in [-\tau (t_{0}),0]$ denote the delayed state function at time $t_{0}$. The norm $\|x_{t_{0}}\|_{\mathcal {C}}$ of this function is defined as the maximal value of the vector norm assumed by the state over the delayed time interval, given by:
    $\|x_{t_{0}}\|_{\mathcal {C}}:=\max _{\theta \in [-\tau (t_{0}),0]}\|x(t_{0}+\theta )\|$
The proof of this result relies on the fact that the following inequality holds for any value $\epsilon >0$ and constant matrices $\alpha ,\beta$ of appropriate dimensions:
    $\alpha \Delta (t)\beta +\beta ^{T}\Delta ^{T}(t)\alpha ^{T}\leq \epsilon ^{-1}\alpha \alpha ^{T}+\epsilon \beta ^{T}\beta$
Using this inequality with $\alpha ^{T}={\begin{bmatrix}H^{T}P&0\end{bmatrix}}$ and $\beta ={\begin{bmatrix}E&E_{1}\end{bmatrix}}$, the described LMI can then be derived from that presented in , corresponding to a situation without uncertainty.

## Implementation

An example of the implementation of this LMI in Matlab is provided on the following site:
* https://github.com/djagt/LMI_Codes/blob/main/Rstblty_cTDS_SlowVarying.m
Note that this implementation requires packages for YALMIP with solver mosek, though a different solver can also be implemented.

## Related LMIs

* - Stability LMI for continuous-time RDE with slowly-varying delay without uncertainty
* - LMI for quadratic stability of continuous-time system with norm-bounded uncertainty
* - Stability LMI for delayed discrete-time system

## External Links

The presented results have been obtained from:
* Fridman E. 2014. Introduction to Time-Delay Systems, Analysis and Control. Springer. ISBN: 978-3-319-09392-5.
Additional information on LMI's in control theory can be obtained from the following resources:
* 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.

## Return to Main Page:
# Bounded Real Lemma under Slowly-Varying Delay

LMIs in Control/Print version
This page describes a bounded real lemma for a continuous-time system with a time-varying delay. In particular, a condition is provided to obtain a bound on the $L_{2}$-gain of a retarded differential system through feasibility of an LMI. The system under consideration pertains a single discrete delay, with the extent of the delay at any time bounded by some known value. This delay is only present in the state, with no direct delay in the effects of exogenous inputs on the state. In addition, the delay is assumed to vary only slowly in time, with a temporal derivative bounded by a value less than one, although results can also be attained if no bound is known. Solving the LMI for a particular value of the bound, while minimizing a scalar variable, an upper limit on the $L_{2}$-gain of the system can be shown for any time-delay satisfying this bound.

## The System

The system under consideration is one of the form:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+A_{1}x(t-\tau (t))+B_{0}w(t)&t&\geq t_{0},&0&\leq \tau (t)\leq h,&{\dot {\tau }}(t)&\leq d<1\\z(t)&=C_{0}x(t)+C_{1}x(t-\tau (t))\end{aligned}}$
In this description, $A$ and $A_{1}$ are constant matrices in $\mathbb {R} ^{n\times n}$. In addition, $B_{0}$ is a constant matrix in $\mathbb {R} ^{n\times n_{w}}$, and $C_{0},C_{1}$ are constant matrices in $\mathbb {R} ^{n_{z}\times n}$ where $n_{w},n_{z}\in \mathbb {N}$ denote the number of exogenous inputs and regulated outputs respectively. The variable $\tau (t)$ denotes a delay in the state at time $t\geq t_{0}$, assuming a value no greater than some $h\in \mathbb {R} _{+}$. Moreover, we assume that the function $\tau (t)$ is differentiable at any time, with the derivative bounded by some value $d<1$, assuring the delay to be slowly-varying in time.

## The Data

To obtain a bound on the $L_{2}$-gain of the system, the following parameters must be known:
${\begin{aligned}A,A_{1}&\in \mathbb {R} ^{n\times n}\\B_{0}&\in \mathbb {R} ^{n\times n_{w}}\\C_{0},C_{1}&\in \mathbb {R} ^{n_{z}\times n}\\h&\in \mathbb {R} _{+}\\d&\in [0,1)\end{aligned}}$

## The Optimization Problem

Based on the provided data, we can obtain a bound on the $L_{2}$-gain of the system by testing feasibility of an LMI. In particular, the bounded real lemma states that if the LMI presented below is feasible for some $\gamma >0$, the $L_{2}$-gain of the system is less than or equal to this $\gamma$. To attain a bound that is as small as possible, we minimize the value of $\gamma$ while solving the LMI:

## The LMI: L2-gain for TDS with Slowly-Varying Delay

       ${\begin{aligned}&{\text{Solve}}:\\&\qquad \min \gamma \\&{\text{such that there exist}}:\\&\qquad P,P_{2},P_{3},R,S,S_{12},Q\in \mathbb {R} ^{n\times n}\\&{\text{for which}}:\\&\qquad P>0,\quad R>0,\quad S>0,\quad Q>0\\&\qquad {\begin{bmatrix}{\begin{array}{c c c c | c c}\Phi _{11}&\Phi _{12}&S_{12}&R-S_{12}+P_{2}^{T}A_{1}&P_{2}^{T}B_{0}&C_{0}^{T}\\*&\Phi _{22}&0&P_{3}^{T}A_{1}&P_{3}^{T}B_{0}&0\\*&*&-S-R&R-S_{12}^{T}&0&0\\*&*&*&-2R-S_{12}-S_{12}^{T}-(1-d)Q&0&C_{1}^{T}\\\hline *&*&*&*&-\gamma ^{2}I&0\\*&*&*&*&*&-I\end{array}}\end{bmatrix}}<0\\&{\text{where}}:\\&\qquad \Phi _{11}=A^{T}P_{2}+P_{2}^{T}A+S+Q-R\\&\qquad \Phi _{12}=P-P_{2}^{T}+A^{T}P_{3}\\&\qquad \Phi _{22}=-P_{3}-P_{3}^{T}+h^{2}R\end{aligned}}$
In this notation, the symbols $*$ are used to indicate appropriate matrices to assure the overall matrix is symmetric.

## Conclusion:

If the presented LMI is feasible for some $\gamma$, the system is internally stable, and will have an $L_{2}$-gain less than $\gamma$. That is, independent of the values of the delays $\tau (t)$:
    $\|z\|_{L_{2}}<\gamma \|w\|_{L_{2}}$
It should be noted that this result is conservative. That is, even when minimizing the value of $\gamma$, there is no guarantee that the bound obtained on the $L_{2}$-gain is sharp.
In a scenario where no bound $d$ on the change in the delay is known, the above LMI can still be used to obtain a bound on the $L_{2}$-gain. In particular, setting $Q=0$ in the above LMI, a bound can be attained independent of the value of the derivative of the delay.

## Implementation

An example of the implementation of this LMI in Matlab is provided on the following site:
* https://github.com/djagt/LMI_Codes/blob/main/L2gain_cTDS.m
Note that this implementation requires packages for YALMIP with solver mosek, though a different solver can also be implemented.

## Related LMIs

* - Bounded real lemma for continuous-time system without delay
* - Bounded real lemma for discrete-time system without delay
* - Stability LMI for continuous-time RDE with slowly-varying delay

## External Links

The presented results have been obtained from:
* Fridman E. 2014. Introduction to Time-Delay Systems, Analysis and Control. Springer. ISBN: 978-3-319-09392-5.
Additional information on LMI's in control theory can be obtained from the following resources:
* 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.

## Return to Main Page:
# LMI for L2-Optimal State-Feedback Control under Time-Varying Input Delay

LMIs in Control/Print version
This page describes a method for constructing a full-state-feedback controller for a continuous-time system with a time-varying input delay. In particular, a condition is provided to obtain a bound on the $L_{2}$-gain of closed-loop system under time-varying delay through feasibility of an LMI. The system under consideration pertains a single discrete delay in the actuator input, with the extent of the delay at any time bounded by some known value. Moreover, the delay is assumed to vary only slowly in time, with a temporal derivative bounded by a value less than one, although results may also be attained if no bound is known. Solving the LMI for a particular value of the bound, while minimizing a scalar variable, an upper limit on the $L_{2}$-gain of the system can be shown for any time-delay satisfying this bound.

## The System

The system under consideration is one of the form:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{2}u(t-\tau (t))+B_{1}w(t)&t&\geq t_{0},&0&\leq \tau (t)\leq h,&{\dot {\tau }}(t)&\leq d<1\\z(t)&=C_{1}x(t)+D_{12}u(t-\tau (t))\end{aligned}}$
In this description, $A$ and $A_{1}$ are constant matrices in $\mathbb {R} ^{n\times n}$. In addition, $B_{1}$ is a constant matrix in $\mathbb {R} ^{n\times n_{w}}$, and $B_{2}$ is a constant matrix in $\mathbb {R} ^{n\times n_{u}}$, where $n_{w},n_{u}\in \mathbb {N}$ denote the number of exogenous and actuator inputs respectively. Finally, $C_{1}$ and $D_{12}$ are constant matrices in $\mathbb {R} ^{n_{z}\times n}$ and $\mathbb {R} ^{n_{z}\times n_{u}}$ respectively, where $n_{z}\in \mathbb {N}$ denotes the number of regulated outputs. The variable $\tau (t)$ denotes a delay in the actuator input at time $t\geq t_{0}$, assuming a value no greater than some $h\in \mathbb {R} _{+}$. Moreover, we assume that the function $\tau (t)$ is differentiable at any time, with the derivative bounded by some value $d<1$, assuring the delay to be slowly-varying in time.

## The Data

To construct an $L_{2}$-optimal controller of the system, the following parameters must be known:
${\begin{aligned}A&\in \mathbb {R} ^{n\times n}\\B_{1}&\in \mathbb {R} ^{n\times n_{w}}\\B_{2}&\in \mathbb {R} ^{n\times n_{u}}\\C_{1}&\in \mathbb {R} ^{n_{z}\times n}\\D_{12}&\in \mathbb {R} ^{n_{z}\times n_{u}}\\h&\in \mathbb {R} _{+}\\d&\in [0,1)\end{aligned}}$
In addition to these parameters, a tuning scalar $\epsilon >0$ is also implemented in the LMI.

## The Optimization Problem

Based on the provided data, we can construct an $L_{2}$-optimal full-state-feedback controller of the system by testing feasibility of an LMI. In particular, we note that if the LMI presented below is feasible for some $\gamma >0$ and matrices ${\bar {P}}_{2}^{-1}>0$ and $Y$, implementing the state-feedback $u(t)=Kx(t)$ with $K=Y{\bar {P}}_{2}^{-1}$, the $L_{2}$-gain of the closed-loop system will be less than or equal to $\gamma$. To attain a bound that is as small as possible, we minimize the value of $\gamma$ while solving the LMI:

## The LMI: L2-Optimal Full-State-Feedback for TDS with Slowly-Varying Input Delay

       ${\begin{aligned}&{\text{Solve}}:\\&\qquad \min \gamma \\&{\text{such that there exist}}:\\&\qquad {\bar {P}},{\bar {P}}_{2},{\bar {R}},{\bar {S}},{\bar {S}}_{12},{\bar {Q}}\in \mathbb {R} ^{n\times n},\quad Y\in \mathbb {R} ^{n_{u}\times n}\\&{\text{for which}}:\\&\qquad {\bar {P}}>0,\quad {\bar {P}}_{2}>0,\quad {\bar {R}}>0,\quad {\bar {S}}>0\\&\qquad {\begin{bmatrix}{\begin{array}{c c c c | c c}{\bar {\Phi }}_{11}&{\bar {\Phi }}_{12}&{\bar {S}}_{12}&B_{2}Y+{\bar {R}}-{\bar {S}}_{12}&B_{1}&{\bar {P}}_{2}^{T}C_{1}^{T}\\*&{\bar {\Phi }}_{22}&0&\epsilon B_{2}Y&\epsilon B_{1}&0\\*&*&-{\bar {S}}-{\bar {R}}&{\bar {R}}-{\bar {S}}_{12}^{T}&0&0\\*&*&*&-(1-d){\bar {Q}}-2{\bar {R}}+{\bar {S}}_{12}+{\bar {S}}_{12}^{T}&0&Y^{T}D_{12}^{T}\\\hline *&*&*&*&-\gamma ^{2}I&0\\*&*&*&*&*&-I\end{array}}\end{bmatrix}}<0\\&{\text{where}}:\\&\qquad \Phi _{11}=A{\bar {P}}_{2}+{\bar {P}}_{2}^{T}A^{T}+{\bar {S}}+{\bar {Q}}-{\bar {R}}\\&\qquad \Phi _{12}={\bar {P}}-{\bar {P}}_{2}+\epsilon {\bar {P}}_{2}^{T}A^{T}\\&\qquad \Phi _{22}=-\epsilon {\bar {P}}_{2}-\epsilon {\bar {P}}_{2}^{T}+h^{2}R\end{aligned}}$
In this notation, the symbols $*$ are used to indicate appropriate matrices to assure the overall matrix is symmetric.

## Conclusion:

If the presented LMI is feasible for some $\gamma ,Y,{\bar {P}}_{2}x(t)$, implementing the full-state-feedback controller $u(t)=Kx(t)=Y{\bar {P}}_{2}^{-1}$, the closed-loop system will be asymptotically stable, and will have an $L_{2}$-gain less than $\gamma$. That is, independent of the values of the delays $\tau (t)$, the system:
    ${\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{2}Kx(t-\tau (t))+B_{1}w(t)\\z(t)&=C_{1}x(t)+D_{12}Kx(t-\tau (t))\end{aligned}}$
with:
    $\|z\|_{L_{2}}<\gamma \|w\|_{L_{2}}{\begin{aligned}K=Y{\bar {P}}_{2}^{-1}\end{aligned}}$
will satisfy:
    $\|z\|_{L_{2}}<\gamma \|w\|_{L_{2}}$
Here we note that ${\bar {P}}_{2}^{-1}x(t)$ is guaranteed to exist as $P_{2}$ is positive definite, and thus nonsingular.
It should be noted that the obtained result is conservative. That is, even when minimizing the value of $\gamma$, there is no guarantee that the bound obtained on the $L_{2}$-gain is sharp, meaning that the actual $L_{2}$-gain of the closed-loop can be (significantly) smaller than $\gamma$.
In a scenario where no bound $d$ on the change in the delay is known, or this bound is greater than one, the above LMI may still be used to construct a controller. In particular, if the presented LMI is feasible with ${\bar {Q}}=0$, the closed-loop system imposing $u(t)=Kx(t)=Y{\bar {P}}_{2}^{-1}$ will be internally exponentially stable with an $L_{2}$-gain less than $\gamma$ independent of the value of ${\dot {\tau }}(t)$.

## Implementation

An example of the implementation of this LMI in Matlab is provided on the following site:
* https://github.com/djagt/LMI_Codes/blob/main/L2_OptStateFdbck_cTDS.m
Note that this implementation requires packages for YALMIP with solver mosek, though a different solver can also be implemented.

## Related LMIs

* - Bounded real lemma for continuous-time system with slowly-varying delay
* - LMI for Hinf-optimal full-state-feedback control in a non-delayed continuous-time system
* - LMI for Hinf-optimal output-feedback control in a non-delayed continuous-time system

## External Links

The presented results have been obtained from:
* Fridman E. 2014. Introduction to Time-Delay Systems, Analysis and Control. Springer. ISBN: 978-3-319-09392-5.
Additional information on LMI's in control theory can be obtained from the following resources:
* 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.

## Return to Main Page:
# Discrete Time

LMIs in Control/Print version
This page describes an LMI for stability analysis of a discrete-time system with a time-varying delay. In particular, a delay-dependent condition is provided to test asymptotic stability of a discrete-delay system through feasibility of an LMI. The system under consideration pertains a single discrete delay, with the extent of the delay at any time bounded by some known value. Solving the LMI for different values of this bound, a limit on the delay can be attained for which the system remains asymptotically stable.

## The System

The system under consideration is one of the form:
    ${\begin{aligned}x(k+1)&=Ax(k)+A_{1}x(k-\tau _{k})&k&\in \mathbb {Z} _{+},&\tau _{k}&\in \mathbb {N} ,&0&\leq \tau _{k}\leq h\end{aligned}}$
In this description, $A$ and $A_{1}$ are matrices in $\mathbb {R} ^{n\times n}$. The variable $\tau _{k}$ denotes a delay in the state at discrete time $k$, assuming a value no greater than some $h\in \mathbb {Z} _{+}$.

## The Data

To determine stability of the system, the following parameters must be known:
${\begin{aligned}A&\in \mathbb {R} ^{n\times n}\\A_{1}&\in \mathbb {R} ^{n\times n}\\h&\in \mathbb {Z} _{+}\end{aligned}}$

## The Optimization Problem

Based on the provided data, asymptotic stability can be determined by testing feasibility of the following LMI:

## The LMI: Asymptotic Stability for Discrete-Time TDS

       ${\begin{aligned}&{\text{Find}}:\\&\qquad P,S,R,S_{12},P_{2},P_{3}\in \mathbb {R} ^{n\times n}\\&{\text{such that:}}\\&\qquad P>0,\quad S>0,\quad R>0,\\&\qquad {\begin{bmatrix}\Phi _{11}&\Phi _{12}&S_{12}&R-S_{12}+P_{2}^{T}A_{1}\\*&\Phi _{22}&0&P_{3}^{T}A_{1}\\*&*&-(S+R)&R-S_{12}^{T}\\*&*&*&-2R+S_{12}+S_{12}^{T}\end{bmatrix}}<0\\&{\text{where:}}\\&\qquad \Phi _{11}=(A^{T}-I)P_{2}+P_{2}^{T}(A-I)+S-R\\&\qquad \Phi _{12}=P-P_{2}^{T}+(A^{T}-I)P_{3}\\&\qquad \Phi _{22}=-P_{3}-P_{3}^{T}+P+h^{2}R\end{aligned}}$
In this notation, the symbols $*$ are used to indicate appropriate matrices to assure the overall matrix is symmetric.

## Conclusion:

If the presented LMI is feasible, the system will be asymptotically stable for any sequence $\tau _{k}$ of delays within the interval $[0,h]$. That is, independent of the values of the delays $\tau _{k}\in [0,h]$ at any time:
* For any real number $\epsilon >0$, there exists a real number $\delta >0$ such that:
    $\|x(0)\|<\delta \quad \Rightarrow \quad \|x(k)\|<\epsilon \qquad \forall k\in \mathbb {N}$
* $\lim _{k\rightarrow \infty }x(k)=0$
Obtaining a feasible point for the LMI, this result can be proven using a Lyapunov-Krasovkii functional:
    ${\begin{aligned}&V(x_{k})=V_{P}(k)+V_{S}(k)+V_{R}(k)\\\end{aligned}}$
where:
    ${\begin{aligned}&V_{P}(k)=x^{T}(k)Px(k),\\&V_{S}(k)=\sum _{j=k-h}^{k-1}x^{T}(j)Sx(j),\\&V_{R}(k)=h\sum _{m=-h}^{-1}\sum _{j=k+m}^{k-1}[x(j+1)-x(j)]^{T}R[x(j+1)-x(j)]\\\end{aligned}}$

## Implementation

An example of the implementation of this LMI in Matlab is provided on the following site:
* https://github.com/djagt/LMI_Codes/blob/main/D_TDS_DC.m
Note that this implementation requires packages for YALMIP with solver mosek, though a different solver can also be implemented.

## Related LMIs

* TDSDC – Delay-dependent stability LMI for continuous-time TDS
* LMI for Stability of Retarded Differential Equation with Slowly-Varying Delay – Delay-independent stability LMI for continuous-time TDS
* Discrete Time Lyapunov Stability – Stability LMI for non-delayed discrete-time system

## External Links

The presented results have been obtained from:
* Fridman E. 2014. Introduction to Time-Delay Systems, Analysis and Control. Springer. ISBN: 978-3-319-09392-5.
Additional information on LMI's in control theory can be obtained from the following resources:
* 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.

## Return to Main Page:
# 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{aligned}{\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{aligned}}$
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{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
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{aligned}{\dot {x}}&=(A+B_{1}K)x+B_{2}d\\z&=(C+D_{1}K)x+D_{2}d\end{aligned}}$
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{aligned}&{\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{aligned}}$

## 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

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

# 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{aligned}{\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{aligned}}$
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{aligned}A(t)={\begin{bmatrix}A_{11}(t)&A_{12}(t)\\0&A_{22}(t)\end{bmatrix}}\end{aligned}}$
where
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}A_{22}(t)=-{\frac {1}{\tau _{x}\tau _{y}}}{\begin{bmatrix}\tau _{y}&0\\0&\tau _{x}\end{bmatrix}}\end{aligned}}$
and
${\begin{aligned}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{aligned}}$
${\begin{aligned}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{aligned}}$
${\begin{aligned}D_{1}(t)=0,\quad D_{2}(t)=-{\frac {V(t)}{57.3g}}{\begin{bmatrix}b_{6}(t)\\0\end{bmatrix}}\end{aligned}}$
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{aligned}{\dot {x}}&=(A+B_{1}K)x+B_{2}d\\z&=(C+D_{1}K)x+D_{2}d\end{aligned}}$
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{aligned}&{\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{aligned}}$

## 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

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools

# LMI for H2/Hinf Polytopic Controller for Robot Arm on a Quadrotor

LMIs in Control/Print version

## The System:

       ${\begin{aligned}{\dot {x}}(t)&=Ax(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{aligned}}$

## The Optimization Problem:

Given a state space system of
       ${\begin{aligned}{\dot {x}}(t)&=Ax(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{aligned}}$
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 _{1}^{2}$+$\gamma _{2}^{2}$
       ${\begin{aligned}{\begin{bmatrix}AA_{i}&AB_{i}^{T}&AC_{i}^{T}\\AB_{i}&BB_{i}&BC_{i}^{T}\\AC_{i}&BC_{i}&-I\end{bmatrix}}&<0\\{\begin{bmatrix}AA_{i}&AB_{i}^{T}&AC_{i}^{T}&AD_{i}^{T}\\AB_{i}&BB_{i}&BC_{i}^{T}&BD_{i}^{T}\\AC_{i}&BC_{i}&-I&CD_{i}^{T}\\AD_{i}&BD_{i}&CD_{i}&{-\gamma _{2}^{2}}I\end{bmatrix}}&<0\\{\begin{bmatrix}Y_{1}&I&AD_{i}^{T}\\I&X_{1}&BD_{i}^{T}\\AD_{i}&BD_{i}&Z\end{bmatrix}}&>0\\\end{aligned}}$
CD=0
$trace(Z)<\gamma _{1}^{2}$
where i=1,..,k,$||S(K,P)||_{H_{2}}$&$<\gamma _{1}$ and $||S(K,P)||_{H_{\infty }}<\gamma _{2}$ and:
${\begin{aligned}AA_{i}=AY_{1}+Y_{1}A^{T}+B_{2}C_{n}+C_{n}^{T}B_{2}^{T}\\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_{2}^{T}B_{n}^{T}\\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{aligned}}$
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{aligned}K={\begin{bmatrix}{\begin{array}{c|c}{A_{K}}&{B_{K}}\\\hline {C_{K}}&{D_{K}}\\\end{array}}\end{bmatrix}}\end{aligned}}$
which is constructed by setting:
       ${\begin{aligned}&{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{aligned}}$
where:
       ${\begin{aligned}&{X_{2}}{Y_{2}^{T}}=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_{2}^{T}&0\\{C_{2}}{Y_{1}}&I\end{bmatrix}}\end{aligned}}$

## Conclusion:

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

## References

1. An LMI-Based Approach for Altitude and Attitude Mixed H2/Hinf-Polytopic Regulator Control of a Quadrotor Manipulator by Aditya Ramani and Sudhanshu Katarey.

# An LMI for the Kalman Filter

LMIs in Control/Print version
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{aligned}{\dot {x}}(t)&=Ax(t)+Bu(t)+w(t),\\y(t)&=Cx(t)+v(t)\\\end{aligned}}$
The process and sensor noises are given by $w(t)$ and $v(t)$ respectively.
Discrete Time:
    ${\begin{aligned}x_{k+1}&=Ax_{k}+w_{k}\\y_{k}&=Cx_{k}+v_{k}\end{aligned}}$
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{aligned}{\dot {\hat {x}}}(t)&=A{\hat {x}}(t)+Bu(t)+L(y(t)-{\hat {y}}(t))\\\end{aligned}}$
Discrete Time
    ${\begin{aligned}{\hat {x}}_{k+1}&=A{\hat {x}}_{k}+L(C{\hat {x}}_{k}-y_{k})\\\end{aligned}}$

## The Error

The error dynamics evolve according to the following expression
Continuous Time
    ${\begin{aligned}{\dot {e}}(t)&=(A+LC)e(t)+w(t)+Lv(t)\\\end{aligned}}$
Discrete Time
    ${\begin{aligned}e_{k+1}&=(A+LC)e_{k}+w_{k}+Lv_{k}\\\end{aligned}}$

## 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^{T}e].$ 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^{T}V_{2}^{-1}$
The process and measurement noise covariances for the Kalman filter are given by
    ${\begin{aligned}V_{1}&=E[w(t)w(t)^{T}]{\text{ aka: }}Q\\V_{2}&=E[v(t)v(t)^{T}]{\text{ aka: }}R\\\end{aligned}}$
The matrix $\Sigma$ satisfies the following equality
$A\Sigma +\Sigma A^{T}+V_{1}=\Sigma C^{T}V_{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{aligned}W&=E[w_{k}w_{k}^{T}]{\text{ aka: }}Q\\V&=E[v_{k}v_{k}^{T}]{\text{ aka: }}R\\\end{aligned}}$
The steady-state covariance of the error in the estimated state is given by $\Sigma$ and satisfies the following Riccati equation.
    ${\begin{aligned}\Sigma =A\Sigma A^{T}+W-A\Sigma C^{T}(C\Sigma C^{T}+V)^{-1}C\Sigma A^{T}\end{aligned}}$
* 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{aligned}1.||S(K,P)||_{H2}&<\gamma \\\end{aligned}}$
    ${\begin{aligned}2.K&=ZX^{-1}{\text{ for some }}Z{\text{ and }}X>0{\text{ where}}\\\end{aligned}}$
    ${\begin{aligned}{\begin{bmatrix}A&B_{2}\end{bmatrix}}{\begin{bmatrix}X\\Z\\\end{bmatrix}}+{\begin{bmatrix}X&Z^{T}\end{bmatrix}}{\begin{bmatrix}A^{T}\\B_{2}^{T}\\\end{bmatrix}}+B_{1}B_{1}^{T}<0\\{\begin{bmatrix}X&(C_{1}X+D_{12}Z)^{T}\\C_{1}X+D_{12}Z&W\end{bmatrix}}>0\\{\text{Trace}}(W)<\gamma ^{2}\end{aligned}}$
To solve the LQR problem using H2 optimal state-feedback control the following variable substitutions are required.
    ${\begin{aligned}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{aligned}}$
Then
    ${\begin{aligned}S(P,K)={\begin{bmatrix}A+B_{2}K&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{aligned}}$
This results in the following LMI.
    ${\begin{aligned}{\begin{bmatrix}A&B_{2}\end{bmatrix}}{\begin{bmatrix}X\\Z\\\end{bmatrix}}+{\begin{bmatrix}X&Z^{T}\end{bmatrix}}{\begin{bmatrix}A^{T}\\B_{2}^{T}\\\end{bmatrix}}+B_{1}B_{1}^{T}<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{aligned}}$
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{aligned}{\begin{bmatrix}A^{T}&C^{T}\end{bmatrix}}{\begin{bmatrix}X\\Z\\\end{bmatrix}}+{\begin{bmatrix}X&Z^{T}\end{bmatrix}}{\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{aligned}}$
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

## 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
* - Applied Optimal Estimation, Arthur Gelb (Kalman Filtering and Optimal Estimation Classic)
* - All Source Position, Navigation and Timing. New textbook that has a good development and description of the Kalman Filter and some of its very practical uses and implementations by Boeing Senior Technical Fellow Ken Li.

## Return to Main Page:
# 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{aligned}\ G(s)&=C(sI-A)B+D,\\\ {\hat {G}}(s)&={\hat {C}}(sI-{\hat {A}}){\hat {B}}+{\hat {D}},\\\end{aligned}}$
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{aligned}\ P&={\begin{bmatrix}\ P11&P12\\\ P21&P22\\\end{bmatrix}}\ >0,\end{aligned}}$
${\begin{aligned}{\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{aligned}}$
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.

## External Links

A list of references documenting and validating the LMI.
* Model order Reduction using LMIs - A conference paper by Helmersson, Anders, Proceedings of the 33rd IEEE Conference on Decision and Control, 1994, p. 3217-3222 vol.4

## Return to Main Page:
# An LMI for Multi-Robot Systems

An LMI for Multi-Robot Systems
      * Consensus for Multi-Agent Systems

# Helicopter Inner Loop LMI

LMIs in Control/Print version
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{aligned}{\dot {x}}(t)&={\hat {A}}x(t)+B_{1}w(t)+{\hat {B_{2}}}u(t),\\z(t)&=C_{1}x(t)+D_{12}u(t)\\\end{aligned}}$
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{aligned}{\hat {A}}=A+\Delta A,{\hat {B_{2}}}=B_{2}+\Delta B\\\end{aligned}}$
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)^{T}w(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{aligned}\\{\begin{bmatrix}\Psi _{11}&B_{1}&XC_{1}^{T}+Z^{T}D_{1}2^{T}&A_{\alpha }X_{+}B_{2}Z&XF_{1}^{T}+Z^{T}F_{2}^{T}&\epsilon H\\B_{1}^{T}&-\gamma ^{2}I&0&0&0&0\\C_{1}X+D_{12}Z&0&-I&0&0&0\\XA_{\alpha }^{T}+Z^{T}B_{2}^{T}&0&0&-rX&XF_{1}^{T}+Z^{T}F_{2}^{T}&0\\F_{1}X+F_{2}Z&0&0&F_{1}X+F_{2}Z&-\epsilon I&0\\\epsilon H^{T}&0&0&0&0&-\epsilon I\end{bmatrix}}<0\\\end{aligned}}$
where, $\Psi _{11}=A_{\alpha }X+XA_{\alpha }^{T}+B_{2}Z+Z^{T}B_{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{aligned}u(t)=Kx(t)\\K=ZX^{-1}\end{aligned}}$

## 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

## 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.
* - Multi-Mode Flight Control for an Unmanned Helicopter Based on Robust H∞ D-Stabilization and PI Tracking Configuration

## Return to Main Page:
# Hinf LMI Satellite Attitude Control

LMIs in Control/Print version
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{aligned}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{aligned}}$
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{aligned}x&={\begin{bmatrix}q&{\dot {q}}\end{bmatrix}}^{T},&z_{\infty }=10^{-3}M{\ddot {q}},&z_{2}=q,\\\end{aligned}}$
Introduce the notations
    ${\begin{aligned}I_{\alpha \beta }&=I_{\alpha }-I_{\beta },&I_{\alpha \beta \gamma }=I_{\alpha }-I_{\beta }-I_{\gamma }\\\end{aligned}}$
where $\alpha ,\beta ,\gamma$ stand for any element in ${x,y,z}$. Then the state-space system is:
    ${\begin{aligned}{\dot {x}}&=Ax+B_{1}u+B_{2}d\\z_{\infty }&=C_{1}x+D_{1}u+D_{2}d\\z_{2}&=C_{2}x\\\end{aligned}}$
where the matrices in the above state-space representation are defined as follows:
    ${\begin{aligned}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}^{2}I_{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{aligned}}$

## 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_{1}K)(sI-(A+B_{1}K))^{-1}B_{2}+D_{2}$
satisfies
    $||G_{z_{\infty }d}(s)||_{\infty }=(C_{1}+D_{1}K)(sI-(A+B_{1}K))^{-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{aligned}\\&min\gamma _{\infty }\\\\&{\text{s.t. }}X>0\\\\&{\begin{bmatrix}(AX+B_{1}W)^{T}+AX+B_{1}W&B_{2}&(C_{1}X+D_{1}W)^{T}\\B_{2}^{T}&-\gamma _{H\infty }I&D_{2}^{T}\\C_{1}X+D_{1}W&D_{2}&-\gamma _{H\infty }I\end{bmatrix}}<0\\\end{aligned}}$
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{aligned}I_{x}=1030.17kg\cdot m^{2},I_{y}=3015.65kg\cdot m^{2},I_{Z}=3030.43kg\cdot m^{2}\\\end{aligned}}$
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{aligned}&-I<{\begin{bmatrix}(AX+B_{1}W)^{T}+AX+B_{1}W&B_{2}&(C_{1}X+D_{1}W)^{T}\\B_{2}^{T}&-\gamma _{H\infty }I&D_{2}^{T}\\C_{1}X+D_{1}W&D_{2}&-\gamma _{H\infty }I\end{bmatrix}}<0\\\end{aligned}}$
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

## 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.
* - LMIs in Control Systems: Analysis, Design, and Applications - Duan and Yu

# H2 LMI Satellite Attitude Control

LMIs in Control/Print version
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{aligned}{\dot {H}}&=T_{c}+T_{g}+T_{d},\\H&=I_{b}\omega \\\end{aligned}}$
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{aligned}{\dot {H}}&=I_{b}{\dot {\omega }}+\omega \times (I_{b}\omega ),\\\end{aligned}}$
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{aligned}I_{b}{\dot {\omega }}+\omega \times (I_{b}\omega )=T_{c}+T_{g}+T_{d},\\\end{aligned}}$
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{aligned}\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{aligned}}$
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{aligned}{\dot {x}}&=Ax+B_{1}u+B_{2}d\\z_{\infty }&=C_{1}x+D_{1}u+D_{2}d\\z_{2}&=C_{2}x\\\\\end{aligned}}$
    ${\begin{aligned}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}^{2}I_{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{aligned}}$

## 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{aligned}u=Kx\\\end{aligned}}$
such that the closed-loop system is stable and the transfer function matrix
    ${\begin{aligned}G_{z2w}(s)=C_{2}(sI-(A+B_{1}K))^{-1}B_{2}\\\end{aligned}}$
satisfies
    ${\begin{aligned}\|G_{z2w}(s)\|_{2}<\gamma _{2}\\\end{aligned}}$
for a minimal positive scalar $\gamma _{2}$.
This scalar is found from the solution of the following LMI
    ${\begin{aligned}\\\min &\ \ \rho \\\\{\text{s.t. }}&AX+B_{1}W+(AX+B_{1}W)^{T}+B_{2}B_{2}^{T}<0\\\\&{\begin{bmatrix}-Z&C_{2}X\\(C_{2}X)^{T}&-X\end{bmatrix}}<0\\\\&\operatorname {trace} (Z)<\rho \\{\text{where }}\rho =\gamma _{2}^{2}.\end{aligned}}$
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

## 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.
* - LMIs in Control Systems: Analysis, Design, and Applications - Duan and Yu

# Problem of Space Rendezvous and LMI Approaches

LMIs in Control/Print version
This is a Problem of Space Rendezvous and LMI Approaches
In Section 12.4 of their book LMIs in Control Systems: Analysis, Design, and Applications, Duan and Yu discuss the problem of space rendezvous and how it can be formulated into an LMI problem. Modeling and simulating space rendezvous is of importance because it is used for any cargo or passenger spacecraft traveling to and from earth-orbiting space stations and also for satellites servicing aging in-orbit satellites, and for potential missions to mine asteroids.

## The System

Though Duan and Yu first mention space rendezvous in Example 7.14 of their book. In this example, they show that the relative orbital dynamic model of spacecraft rendezvous can be described by the famous Clohessy-Wiltshire equations.
    ${\begin{aligned}m{\ddot {r_{x}}}-2m\omega _{0}{\dot {r_{y}}}-3m\omega _{0}^{2}r_{x}&=T_{x}+d_{x}\\m{\ddot {r_{y}}}+2m\omega _{0}{\dot {r_{x}}}&=T_{y}+d_{y}\\m{\ddot {r_{z}}}+m\omega _{0}^{2}r_{z}&=T_{z}+d_{z}\\\end{aligned}}$
where
* $r_{x},r_{y},r_{z}$ are the components of the relative position between chaser and target
* $\omega _{0}=\pi /12$ [rad/h] is the orbital angular velocity of the target satellite
* $m$ is the mass of the chaser
* $T_{i},(i=x,y,z)$ is the i-th component of the control input force acting on the relative motion dynamics
* $d_{i},(i=x,y,z)$ is the i-th component of the external disturbance
The C-W equations give a first-order approximation of the chaser's motion in a target-centered coordinate system and is often used in planning space rendezvous problems (ISS, Salyut, and Tiangong space stations are just some examples.)
With appropriate definitions of states and variables the dynamic equations of motion for space-rendezvous can be converted into standard state-space form for LMI optimization as follows:
    ${\begin{aligned}{\dot {x}}&=Ax+B_{1}u+B_{2}d\\y&=Cx\\\end{aligned}}$
where the vectors in the above state-space representation are defined as follows:
    ${\begin{aligned}x={\begin{bmatrix}r_{x}&r_{y}&r_{z}&{\dot {r_{x}}}&{\dot {r_{y}}}&{\dot {r_{z}}}\\\end{bmatrix}}^{T}\\\\y={\begin{bmatrix}r_{z}&r_{y}&r_{z}\end{bmatrix}}^{T}\\\\u={\begin{bmatrix}T_{x}&T_{y}&T_{z}\end{bmatrix}}^{T}\\\\d={\begin{bmatrix}d_{x}&d_{y}&d_{z}\end{bmatrix}}^{T}\\\end{aligned}}$
and the matrices in the above state-space representation are defined as follows:
    ${\begin{aligned}A={\begin{bmatrix}0&0&0&1&0&0\\0&0&0&0&1&0\\0&0&0&0&0&1\\3\omega _{0}^{2}&0&0&0&2\omega _{0}^{2}&0\\0&0&0&-2\omega _{0}&0&0\\0&0&-\omega _{0}^{2}&0&0&0\end{bmatrix}}\\\\B_{1}=B_{2}={\begin{bmatrix}0_{3x3}\\I_{3}\\\end{bmatrix}}\\\\C={\begin{bmatrix}I_{3}&0_{3x3}\\\end{bmatrix}}\\\\\end{aligned}}$

## The Data

The data required are the mass properties of both the target and chaser vehicles for space rendezvous. Also required is the orbital angular velocities of the target and chasers and measurements of relative kinematics between the two.

## The Optimization Problem

The optimization problem is trying to attenuate the disturbance to output transfer function using either the H-inf or H2 norm.
* Objective: Hinf or H2 norm
* Variables: Controller Gains
* Constraints: Relative Dynamics/Kinematics between Chaser and Target in Orbit

## The LMI: Space Rendezvous LMI Optimization

The space rendezvous problem can be approached with either H-inf or H-2 optimization formulations. Both formulations can achieve closed-loop stability which ensures that rendezvous occurs because the relative distance between target and chaser eventually approaches zero. The LMIs for the H-inf and H2 optimization problem are shown below which are easily solvable because the matrices for the space rendezvous problem are available above in standard form.
Duan and Yu approach the $H_{\infty }$. The minimum attenuation level from disturbance to output can be found by solving the following LMI optimization problem.
    ${\begin{aligned}\\&min\gamma _{\infty }\\\\&{\text{s.t. }}X>0\\\\&{\begin{bmatrix}(AX+B_{1}W)^{T}+AX+B_{1}W&B_{2}&(C_{1}X+D_{1}W)^{T}\\B_{2}^{T}&-\gamma _{H\infty }I&D_{2}^{T}\\C_{1}X+D_{1}W&D_{2}&-\gamma _{H\infty }I\end{bmatrix}}<0\\\end{aligned}}$
which is the same as Theorem 8.1 in Duan and Yu's Book, the solution to the $H_{\infty }$ problem.

## Conclusion:

The LMI for Space Rendezvous is a useful and interesting method to model and simulate practical problems in spacecraft engineering. Space Rendezvous usually requires very good vision-based navigation or an exceptional human operator that can close the gap for final mating of the two docking adapters.

## 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
* H2OptimalOutputFeedback

## 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.
* - LMIs in Control Systems: Analysis, Design, and Applications - Duan and Yu

# Template

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{aligned}\ G(s)&=C(sI-A)B+D,\\\ {\hat {G}}(s)&={\hat {C}}(sI-{\hat {A}}){\hat {B}}+{\hat {D}},\\\end{aligned}}$
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}$.

## The Data

The full order state matrices $A,B,C,D$.

## The Optimization Problem

The objective of the optimization is to reduce the $H_{\infty }$ norm .

## The LMI: The Lyapunov Inequality

Objective: $\min \gamma$.
Subject to:: ${\begin{aligned}\ P&={\begin{bmatrix}\ P11&P12\\\ P21&P22\\\end{bmatrix}}\ >0,\end{aligned}}$
${\begin{aligned}{\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{aligned}}$

## Conclusion:

The LMI techniques results in model reduction close to the theoretical bounds.

## 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.
* LMIs in Systems and Control Theory - A downloadable book on LMIs by Stephen Boyd.