# LMIs in Control/pages/Peak to Peak norm

LMIs in Control/pages/Peak to Peak norm

Peak-to-peak norm performance of a system

## The System

Considering the following system:

{\begin{aligned}{\dot {x}}=Ax+Bu\\z=Cx+Du\\\end{aligned}}

Where $x(t)\in \mathbb {R} ^{n}$  is the state signal, $u(t)\in \mathbb {R} ^{m}$  is the input signal, and $z(t)\in \mathbb {R} ^{p}$  is the output. When given an initial condition $x(0)=0$ , the system can be defined to map the output and input signals for the peak-to-peak performance.

{\begin{aligned}||T||_{\infty ,\infty }:=\sup \limits _{0<||u||_{\infty }<\infty }{\frac {||z||_{\infty }}{||u||_{\infty }}}\\\end{aligned}}

## The Data

The matrices $A$ , $B$ , $C$ , and $D$  are the only data sets required for this optimization problem.

## The Optimization Problem

Consider a continuous-time LTI system, $G:L_{2e}\to L_{2e}$ , given that: $A$ , $B$ , $C$ , and $D$  $A\in \mathbb {R} ^{n\times n}$ , $B\in \mathbb {R} ^{n\times m}$ , $C\in \mathbb {R} ^{p\times n}$ , and $D\in \mathbb {R} ^{p\times m}$ . Given that the matrix $A$  is Hurwitz,The peak-to-peak norm of $G$  is given as:

{\begin{aligned}||T||_{\infty ,\infty }:=\sup \limits _{0<||w||_{\infty }<\infty }{\frac {||z||_{\infty }}{||u||_{\infty }}}\\\end{aligned}}

## The LMI: Peak-to-Peak norm

There exists a matrix $P\in \mathbb {S} ^{n}$  and $\gamma$ , $\epsilon$ , $\mu \in \mathbb {R} _{>0}$ , where the following constraints are used: $\min \mu$

{\begin{aligned}P<0\\{\begin{bmatrix}A^{T}P+PA+\gamma P&PB\\B'P&\epsilon I\end{bmatrix}}&<0\\{\begin{bmatrix}\gamma P&0&C^{T}\\0&(\mu -\epsilon )I&D^{T}\\C&D&\mu I\end{bmatrix}}&>0\\\end{aligned}}

Since this optimization has $\gamma P$  in the constraints, this does make this optimization bi-linear. attempting to solve this LMI is not feasible unless some type of substitute is implemented to the variables $\gamma P$ .

## Conclusion:

The results from this LMI will give the peak to peak norm of the system:

{\begin{aligned}\sup \limits _{0<||u||_{\infty }<\infty }{\frac {||z||_{\infty }}{||u||_{\infty }}}<\mu \end{aligned}}

## Implementation

% Peak-to-Peak Norm
% -- EXAMPLE --

%Clears all variables
clear; clc; close all;

%Example Matrices
A  = [ 1  1  0  1  0  1;
-1  0 -1  0  0  1;
1  0  0 -1  1  1;
-1  1 -1  0  0  0;
-1 -1  1  1 -1 -1;
0 -1  0  0 -1  0];

B =  [ 0 -1 -1;
0  0  0;
-1 -1  1;
-1  0  0;
0  0  1;
-1  1  1];

C = [ 0  1  0 -1 -1 -1;
0  0  0 -1  0  0;
1  0  0  0 -1  0];

D = [ 0  1  1;
0  0  0;
1  1  1];

%SDPVAR variables
gam = sdpvar(1);
eps = sdpvar(1);
up  = sdpvar(1);

%SDPVAR MATRIX
P = sdpvar(size(A,1),size(A,1),'symmetric');

%Constraint matrices
M1 = [A'*P+P*A+gam*P  P*B       ;
B'*P           -eps*eye(3)];

M2 = [gam*P       zeros(6,3)     C'        ;
zeros(3,6) (up-eps)*eye(3) D'        ;
C           D              up*eye(3)];

%Constraints
Fc = (P >= 0);
Fc = [Fc; gam >= 0];
Fc = [Fc; eps >= 0];
Fc = [Fc; M1  <= 0];
Fc = [Fc; M2  >= 0];

%Objective function
obj = up;

%Settings for YALMIP
opt = sdpsettings('solver','sedumi');

%Optimization
optimize(Fc,obj,opt)

fprintf('\nRepresentation of what occurs when attempting to solve \n')
fprintf('problem without considering bilinearity\n\n')

fprintf('setting gamma to a certain value\n eg: 0.5')
gam = 0.5;

eps = sdpvar(1);
up  = sdpvar(1);

%SDPVAR MATRIX
P = sdpvar(size(A,1),size(A,1),'symmetric');

%Constraint matrices
M1 = [A'*P+P*A+gam*P  P*B       ;
B'*P           -eps*eye(3)];

M2 = [gam*P       zeros(6,3)     C'        ;
zeros(3,6) (up-eps)*eye(3) D'        ;
C           D              up*eye(3)];

%Constraints
Fc = (P >= 0);
Fc = [Fc; eps >= 0];
Fc = [Fc; M1  <= 0];
Fc = [Fc; M2  >= 0];

%Objective function
obj = up;

%Optimization
optimize(Fc,obj,opt)

fprintf('mu value: ')
disp(value(up))