LMI-Linear Matrix Inequality

download LMI-Linear Matrix Inequality

of 34

description

This type Matrxi Inequality is widely used in Control Theory and Optimization techniques

Transcript of LMI-Linear Matrix Inequality

  • Dep. of Information Engineering

    University of Pisa (Italy)

    From Convex Optimization toLinear Matrix Inequalities

    eng. Sergio Grammatico

    [email protected]

    Class of Identification of Uncertain Systems 2012/13

    held by prof. Andrea Caiti

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 1 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 2 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 3 / 30

  • Convex Optimization and Linear Matrix Inequalities(LMIs)Thanks to Stephen Boyd, Carsten Scherer et al.

    This presentation is mainly based on

    S. Boyd and Lieven Vandenberghe, Convex Optimization,Cambridge University Press, 2004.

    S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan,Linear Matrix Inequalities in System and Control Theory,Society for Industrial and Applied Mathematics (SIAM), 1994.

    S. Boyd, Lecture notes in Convex Optimization,Standford University.

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 4 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 5 / 30

  • Convex OptimizationGeneral problem

    Convex Optimization Problem

    minxRn

    f(x)

    sub. to gi(x) 0, i = 1, 2, ...,mAx = b

    (1)

    f , g1, ..., gm convex functions, A Rpn, b Rp.

    Global Optimality

    Any local optimal point of a convex problem is globally optimal

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 6 / 30

  • Special CaseLinear Programming (LP)

    Linear Programming

    minxRn

    c>x

    sub. to Gx h, Ax = b(2)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 7 / 30

  • Special CaseQuadratic Programming (QP)

    Quadratic Programming

    minxRn

    x>Px+ q>x

    sub. to Gx h, Ax = b(3)

    P positive semi-definite P < 0 (P = P>, eig(P ) 0).

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 8 / 30

  • Another Special CaseSemi-Definite Programming (SDP)

    Semi-Definite Programming

    minxRn

    c>x

    sub. to F0 + x1F1 + x2F2 + ...+ xnFn 4 0,Ax = b

    (4)

    Fi = F>i Rnn

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 9 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 10 / 30

  • Linear Matrix InequalitiesDefinition

    Standard LMI

    F (x) := F0 +ni=1

    xiFi 4 0 (5)

    The inequality constraint of an SDP is an LMI.

    Multiple LMIs as a unique LMI:[F0 0

    0 F0

    ]+ x1

    [F1 0

    0 F1

    ]+ ...+ xn

    [Fn 0

    0 Fn

    ]4 0 (6)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 11 / 30

  • Linear Matrix InequalitiesFeasibility and Optimization

    Feasibility LMI Problem

    Find x Rn such that F (x) < 0

    Strict Feasibility LMI Problem

    Find x Rn and R>0 such thatF (x) < In

    LMI Optimization Problem

    Find x Rn such thatF (x) < 0c>x is minimized

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 12 / 30

  • Linear Matrix InequalitiesA trick for NonLinear MIs

    Schur Complement

    Given Q(x) = Q(x)>, R(x) 0, S(x) affinely dependent on x,the NonLinear MI

    Q(x) S(x)R(x)1S(x)> < 0 (7)

    is equivalent to the LMI[Q(x) S(x)

    S(x)> R(x)

    ]< 0. (8)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 13 / 30

  • Brief Historical PerspectiveBack to Lyapunov

    1 First LMI in Control Theory (A.M. Lyapunov)

    Lyapunov Inequality (1890)

    x = Ax A.S. P 0 : A>P + PA 0 (9)

    Lyapunov equality: A>P + PA = Q, P ,Q 0Matrices as variables

    2 Further contributions

    Lure (Stability under Saturations via LMIs);Kalman, Yakubovich, Popov (Positive Real Lemma); ...

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 14 / 30

  • Brief Historical PerspectiveRiccati revisited

    3 On the LQ Optimal Control (J.C. Willems)

    Algebraic Riccati (LM)Inequality (1971)

    A>P + PA+Q (PB + C>)R1 (PB + C>)> < 0 (10)is equivalent (by Schur Complement) to[

    A>P + PA+Q PB + C>(PB + C>

    )>R

    ]< 0. (11)

    4 Interior-point algorithms for LMIs(Y.E. Nesterov and A. Nemirovski)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 15 / 30

  • Brief Historical PerspectiveToday

    LMIs are used for:

    1 Stability analysis of uncertain systems

    2 Robust control design for uncertain systems

    3 Robust optimization

    4 System identification

    5 ...

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 16 / 30

  • Simple LMI problemsStability Analysis of Uncertain Linear Systems

    Linear Differential Inclusions (Time-varying Uncertain Linear Systems)

    x conv {Aix | i [1, s]} (12)

    Quadratic Stability (Sufficient Condition)

    P 0 : A>i P + PAi 0 i = (12) A.S. (13)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 17 / 30

  • Simple LMI problemsRobust Linear State-Feedback Control design (1)

    Controlled Linear Differential Inclusions

    x conv {Aix+Biu | i [1, s]} , (14)

    1 u(x) = Kx

    2 x conv {(Ai +BiK)x}3 NonLinear MI in P , K:

    (Ai +BiK)> P + P (Ai +BiK) 0 i (15)

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 18 / 30

  • Simple LMI problemsRobust Linear State-Feedback Control design (2)

    Change of Variables for the LMI design of K:

    4 Multiply (15) both on the left and on the right by P1

    5 Q := P1

    6 Y := KQ

    7 LMI in Y , Q:

    AiQ+QA>i +BiY + Y

    >B>i 0 i (16)

    8 P := Q1, K := Y Q1

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 19 / 30

  • Simple LMI problemsRobust Linear State-Feedback Control design (2)

    Change of Variables for the LMI design of K:

    4 Multiply (15) both on the left and on the right by P1

    5 Q := P1

    6 Y := KQ

    7 LMI in Y , Q:

    AiQ+QA>i +BiY + Y

    >B>i 0 i (16)

    8 P := Q1, K := Y Q1

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 19 / 30

  • Simple LMI problemsRobust Linear State-Feedback Control design (2)

    Change of Variables for the LMI design of K:

    4 Multiply (15) both on the left and on the right by P1

    5 Q := P1

    6 Y := KQ

    7 LMI in Y , Q:

    AiQ+QA>i +BiY + Y

    >B>i 0 i (16)

    8 P := Q1, K := Y Q1

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 19 / 30

  • Simple LMI problemsRobust Linear State-Feedback Control design (2)

    Change of Variables for the LMI design of K:

    4 Multiply (15) both on the left and on the right by P1

    5 Q := P1

    6 Y := KQ

    7 LMI in Y , Q:

    AiQ+QA>i +BiY + Y

    >B>i 0 i (16)

    8 P := Q1, K := Y Q1

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 19 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 20 / 30

  • Solver and Matlab interfaceSeDuMi and CVX

    Solver: SeDuMi (by J.F. Sturm)

    http://sedumi.ie.lehigh.edu/

    Matlab interface: CVX (by S. Boyd)

    http://cvxr.com/cvx/

    CVXOPT in Python

    CVXGEN for C-code generation

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 21 / 30

  • Example 1Variable Mass-Spring System as Uncertain Linear System (1)

    mx = kx bxk [k, k]

    m

    k

    kx bx

    x0

    1 := x, 2 := x, w := k

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 22 / 30

  • Example 1Variable Mass-Spring System as Uncertain Linear System (2)

    Variable Mass-Spring System as Uncertain Linear System

    =

    [0 1

    w 1] (17)

    w [0.1, 1]

    A1 =

    [0 1

    0.1 1], A2 =

    [0 11 1

    ]Robust LMI Analysis

    A>i P + PAi 0, i = 1, 2

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 23 / 30

  • Example 1Variable Mass-Spring System as Uncertain Linear System (3)

    Matlab code using CVX

    A{1} = [0 1; -0.1 -1]; A{2} = [0 1; -1 -1];n = 2; s = 2;

    cvx begin

    variable P(n,n) symmetric

    variable a

    maximize(a)

    P == semidefinite(n);

    a >= 0;

    for i=1:s

    A{i}*P + P*A{i} + a*eye(n) == -semidefinite(n);end

    cvx end

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 24 / 30

  • Example 2Quadratic Stabilizability is only Sufficient for Uncertain Linear Systems

    Counterexample

    x =

    [0 11 0

    ]x+

    [w1

    ]u (18)

    w [w,w]

    A1 = A2 = A, B1 =

    [w1

    ], B2 =

    [w1

    ]

    Conservatism of Quadratics

    (18) quadratic stabilizable (searching P, K) only if w [1, 1]

    (18) stabilizable w R

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 25 / 30

  • Example 2Quadratic Stabilizability is only Sufficient for Uncertain Linear Systems

    Counterexample

    x =

    [0 11 0

    ]x+

    [w1

    ]u (18)

    w [w,w]

    A1 = A2 = A, B1 =

    [w1

    ], B2 =

    [w1

    ]

    Conservatism of Quadratics

    (18) quadratic stabilizable (searching P, K) only if w [1, 1](18) stabilizable w R

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 25 / 30

  • Example 3Nonlinear Inverted Pendulum as Uncertain Linear System (1)

    I = mgl sin() +

    mg

    2 ,l I

    x1 := , x2 := , u = = x2 = mglI

    sin(x1)

    x1x1 +

    1

    Iu

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 26 / 30

  • Example 3Nonlinear Inverted Pendulum as Uncertain Linear System (2)

    Inverted Pendulum as Uncertain Linear System

    x =

    [0 1

    aw(x) 0

    ]x+

    [0b

    ]u (19)

    w(0) = 1

    x1 [pi4 , pi4 ] w(x1) [0.9, 1]

    A1 =

    [0 1

    0.9 a 0], A2 =

    [0 1

    1 a 0]

    B1 = B2 =

    [0b2

    ]

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 27 / 30

  • Example 3Nonlinear Inverted Pendulum as Uncertain Linear System (3)

    Robust LMI Control design from (16)

    AiQ+QA>i +BiY + Y

    >B>i 0, P = Q1, K = Y Q1

    Matlab code using CVXcvx begin

    variable Q(n,n) symmetric

    variable Y(m,n)

    maximize(log det(Q))

    Q == semidefinite(n);

    for i=1:s

    A{i}*Q + Q*A{i} + B{i}*Y + Y*B{i} == -semidefinite(n);end

    cvx end

    P = Q^(-1); K = Y*P

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 28 / 30

  • Outline

    1 Introduction

    2 Semi-Definite ProgrammingFrom Convex Optimization to Semi-DefiniteProgramming

    3 Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    4 SoftwareSeDuMi and CVXExamples

    5 ConclusionS. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 29 / 30

  • ConclusionLMIs in Systems and Control Theory

    1 LMIs Robust Analysis and Control design

    2 LMIs Uncertain Linear Systems

    S. Grammatico (DEI UNIPI) Introduction to LMIs Identification of Uncertain Systems 30 / 30

    IntroductionSemi-Definite ProgrammingFrom Convex Optimization to Semi-Definite Programming

    Linear Matrix InequalitiesDefinitionBrief Historical PerspectiveFirst simple problems

    SoftwareSeDuMi and CVXExamples

    Conclusion