Opt Cont Term Project(511101135)

Embed Size (px)

Citation preview

  • 8/2/2019 Opt Cont Term Project(511101135)

    1/23

    ISTANBUL TECHNICAL UNIVERSITY

    INTERDISIPLINARY AERONAUTICAL AND ASTRONAUTICAL

    GRADUATION PROGRAM

    UUM 518E - THEORY AND APPLICATION OF OPTIMAL CONTROL

    LECTURER

    Prof. Dr. Georgi M. DIMIROVSKI

    TERM PROJECT

    brahim Can Karagz

    Student ID : 511101135

    e-mail: [email protected]

    TERM: SPRING, 2010-2011

    mailto:[email protected]:[email protected]
  • 8/2/2019 Opt Cont Term Project(511101135)

    2/23

    ANALYSIS AND SYNTHESIS DESIGN OF OPTIMAL CONTROLS

    VIA LYAPUNOV AND RICCATI MATRIX EQUATIONS

    FOR LINEARISED JET AIRCRAFT MODEL

    ATTITUDE RATE CONTROL

    In aircraft control engineering area, attitude rate control problem is a crucial subject which must be

    perfectly designed. Due to pitch angle must be well regulated, especially for jet aircraft, because

    response must be highly rapid, a good design must be done.

    For this research and development project, a given dynamic modeling of aircraft has been

    proceeding. This already linearised approximate model has been developed for the purpose of

    regulator for automatic control system when driving control surfaces by hydraulic actuator.

    Mathematical model was approximated for both subsonic and supersonic and also for different

    control surfaces dimensions. And afterwards, a plant transfer function was found.

    In this elaborated R&D project, step-by step, firstly control problem was established, plant was

    presented. Secondly, a pole-placement with observer design was presented to have more knowledge

    about given dynamic plant. After this recognition period of dynamic plant, actual purpose of this

    project was presented. These actual problems are to make an optimal control design synthesis viaboth lyapunov and riccati algebraic matrix equations.

    On this part, theoretical background of riccati and lyapunov equations was showed to support

    application part which is mostly worked on in this project. After in the light of these formulations, i.e.

    background theory, necessary calculations was computed on matlab, simulated on simulink and

    showed results. And most importantly, these results have been evaluated. Especially, when we

    change the control parameters, it is important to observe how to change results, how to impact on

    response, these were observed.

  • 8/2/2019 Opt Cont Term Project(511101135)

    3/23

    STATE FEEDBACK with OBSERVER DESIGN

    Pole placement problems are easy problems which require some basic rules to solve. Because main

    purpose of this project is not strongly pole placement, some general remarks and calculations will be

    showed and tried to show simulation results.

    In a pole placement problem with state-feedback, main purpose is to define roots of characteristic

    equation and place them into desired roots at s-plane. Purpose of observer design is to feed state

    variables (in our problem, these are x1, x2, x3) which are not measured.

    After some calculations, it is understood that open loop transfer function: In the state space form, system:

    (1.1-a) (1.1-b)System in controllable companion form:

    *x + *u, y= *x +*u

    Roots of given plant are

    In pole placement case, desired roots:

    S1,2,3=-3

    Desired characteristic equation= (s+3)3

    So, feedback gain matrix A proper observer root would be -7.5

    So, observer gain matrix:

    Equations for state feedback design with observer as below:

    (1.2)

    ,

    (1.3)

    , (1.4)

  • 8/2/2019 Opt Cont Term Project(511101135)

    4/23

    Global system:

    (1.5)

    ,

    (1.6)

    Block diagram, with regard to formulations, is drawn as below:

    (1.7)n is calculated with regard to desired output over input ratio.

    Estimation response:

  • 8/2/2019 Opt Cont Term Project(511101135)

    5/23

    Real response:

    RICCATI EQUATIONs SOLUTION

    One of the optimal control solutions to linear systems is the matrix riccati equation solution.

    For a given equation (f(x)) in the form of above function, riccati equation gives optimal linear

    quadratic control solution. One rule to apply this equation is to be completely controllable of the pair

    (A, b) matrices.

    THEORY of RICCATI EQUATION

    Given a completely controllable system is in state space form:

    (2.1-a)

    (2.1-b)

    Control law: here, K is feedback gain matrix

  • 8/2/2019 Opt Cont Term Project(511101135)

    6/23

    (2.3)K minimizes the following performance index. Performance index:

    (2.4)

    f(x) in the new form:

    (2.5)Time derivative of lyapunov function

    (2.6)

    Lyapunov (V) function:

    (2.7) (2.8)R must be a positive definite matrix. So a non-singular matrix is presented into R matrix. (2.9)New form of equation (2.8) would be (2.10)

    (2.10)

    A more detailed presentation of the equation:

    (2.11)For unconstrained minimization of J, condition causes following equation:

    (2.12)

  • 8/2/2019 Opt Cont Term Project(511101135)

    7/23

    When following equation is used, equation (2.12) will be enabled.

    (2.13)So feedback gain matrix is found as following equation:

    (2.14)Control law is found by multiplication of K and x matrix:

    (2.15)All known equation will be placed in equation and following equation is found: (2.16)After rearrangement of the equation (2.16), Riccati equation is found:

    (2.17)

    SOME RULES and APPLICATION of RICCATI EQUATION

    In order to ensure asymptotic stability by riccati equation, some rules must be followed. These are:

    1) Q must be non-negative definite matrix. It can be either positive definite or positive semi-definite.

    (1.18)Q can be chosen as seen above.

    By this choice of Q, time derivative of lyapunov function will be negative. This shows that system will

    be damped and it will reach its stability point (or an arbitrary point).

    This means that optimal feedback system is asymptotically stable.

  • 8/2/2019 Opt Cont Term Project(511101135)

    8/23

    2) P must be positive definite, real, symmetric, constant matrix. This leads that lyapunovfunction value will grow as time goes.

    3) Under this condition of P matrix, solution of P is sought.

    After necessary rules are defined for riccati solution, it is possible to apply these rules to our design

    problem. Our control problem is seen below:

    For control problem which is worked on:

    So, transfer function of system (elevator angle to pitch angle) appears below:

    (2.19)When, hydraulic actuator is introduced to the system, transfer function becomes as follow. (2.20)System in observable companion form:

    *x + *u, y= *x +*u (2.21)

    First thing that should be done in order to start the solution is to seek controllability.

    (2.22)

  • 8/2/2019 Opt Cont Term Project(511101135)

    9/23

    (2.23)It has a full rank, so riccati equation can be applied.

    For the next simulation diagram, putting A, b, c and d (system matrix) into observable companion

    form will be proper. Because k1 (first element of feedback gain matrix) is placed at the feed-forwardpath. So actually, in this diagram, feedback element is y, in other words it is x1.

    Other feedback element (k2 and k3) is also placed properly.

    System block diagram can be drawn as indicated below:

    (2.24)

    (2.25)After defining required parameter, these are R, Q and calculating gain matrix, system is ready to

    simulate. Now, design parameters will be defined, they will be changed and effects of these

    parameters on system response will be observed.

    It should not be forgotten that this design parameter will effects results directly, and best parameters

    should be chosen. Besides of ensuring asymptotic stability, also a fast and low overshoot are

    important.

    For the first design lets choose below parameters:

    R= 0.01

    For required design parameters

    q11=16.5, q22=1, q33=1

    As a solution of this equation

  • 8/2/2019 Opt Cont Term Project(511101135)

    10/23

    From this graph, we see that, a proper overshoot (%14.97) is enabled, and output (pitch angle)

    reaches its stability point at about third second.

    Next analysis will be changing of R value. When R is selected as 5 and Q stays same, parameters and

    result will be as below:

  • 8/2/2019 Opt Cont Term Project(511101135)

    11/23

    We observe that, as R value increment, maximum overshoot is decreasing but damping time is

    incrementing.

    Overshoot: %7

    Time: about 4.2 second

    Now, another analysis should also be observed. This is effects of Q elements on system response.

    R=0.01

    q11=500

  • 8/2/2019 Opt Cont Term Project(511101135)

    12/23

    This result shows that a big number of q11 provides a fast response with low overshoot. It is clear

    that, as q11 increments, overshoot and time are getting smaller. But a big control (u) law is necessary.

  • 8/2/2019 Opt Cont Term Project(511101135)

    13/23

    LYAPUNOV STABILITY ANALYSIS

    In this part of project, we will consider design and solution to given linear dynamic system based on

    lyapunov stability analysis. System is given as below:

    In designing control system in the sense of lyapunov function, the most important thing is to choosecontrol law (u). In the future, this control vector will minimize performance index and lyapunov

    method will be applied.

    THEORY of LYAPUNOV STABILTY ANALYSIS

    When we consider linear time invariant system as below:

    We define a lyapunov function as:

    Time derivative of lyapunov function:

    Jacobian matrix appears:

    By some substitutions, time derivative of lyapunov function is as below:

    (3.6)In the sense of lyapunov equation

    (3.7)In order to make system asymptotically stable V(x) must be a positive definite, time derivative of V

    function must be negative definite. So Q matrix becomes a positive definite matrix.

    Now, different types of control laws will be applied and results will be compared. Afterward, best

    control law will be chosen as compensator.

    3.1

    (3.2)

    (3.3)

    (3.4)

    (3.5)

  • 8/2/2019 Opt Cont Term Project(511101135)

    14/23

    PROPORTIONAL (P) CONTROL

    First, we define K (proportional control) gain value as compensator. In this case transfer function

    becomes: (3.8)A matrix in controllable companion form:

    (3.9)

    P is a symmetric, positive definite matrix.

    (3.10)Q is also positive definite matrix.

    (3.11)q33 is a random positive real number.

    When we apply following equation

    (3.12)Solution to this equation gives:

    (3.13)

    Lets define p23=1,

    We know that P must be a positive definite matrix. To ensure this rule, we seek determinant of P

    matrix.

    det(P) must be greater than zero.

  • 8/2/2019 Opt Cont Term Project(511101135)

    15/23

    det(P)= K(K+4) (3.14)

    To ensure stability criteria, K must be greater than zero.

    K>0, stability criterion.

    This range of K makes Q and P matrices positive definite.

    Here, K is simply a real positive number and it is used as proportional control design.

    So, compensator Gc is K proportional gain constant.

    However, by this compensator design, we cant reach required performance criterions (fast and

    minimum overshoot). As an example, when we choose K is equal to 3,we observe a response like

    below:

    Also when we change value of K, it is clear that, reaching to a good response is not possible.

    So a new compensator design should be done.

  • 8/2/2019 Opt Cont Term Project(511101135)

    16/23

    DERIVATIVE (D) CONTROL

    Now, we will observe a response to derivative gain KD. Block diagram will be same as proportional

    control but only difference is multiplication Kd by s.

    Block diagrams occurs:

    Result of this analysis will show that response to step input will create a steady state error.

    For example when we choose KD to be 10

    Infinite value of K will give a good response but input u value limits are constrained. Because of this

    reason, we need to make both derivative and proportional control action. In this case

  • 8/2/2019 Opt Cont Term Project(511101135)

    17/23

    PROPORTIONAL and DERIVATIVE (PD) CONTROL

    Best way to minimize overshoot, to get rid of steady state error and to provide a short time to reach

    stability point is to make proportional and derivative action in the control design.

    In this action, open loop transfer function occurs as follow: (3.15)Block diagram:

    To find system matrices, first we must determine closed loop transfer function and afterward

    because controllable companion form make easier calculations, it should transform into controllable

    companion form.

    A system matrix of closed loop system in controllable companion form:

    (3.16)

    Lets choose P matrix as 3x3 dimensional identity matrix:

    (3.17)

    So becomes: (3.18)In order to ensure lyapunov stability criterion Q matrix must be positive definite. We will seek

    determinant of Q matrix and this value will depend on KP and KD parameter.

  • 8/2/2019 Opt Cont Term Project(511101135)

    18/23

    (3.19) (3.20)Now, proper KP and KD values should be defined and simulation should be realized.

    For KP=30, KD=20, result:

  • 8/2/2019 Opt Cont Term Project(511101135)

    19/23

    RESULTS

    After theoretical, numerical and simulation analysis, results should be evaluated. For this purpose,

    we will compare lyapunov and riccati equation response of system, and also we will evaluate system

    performance change that depends on system parameters.

    So, if we need align effect of system parameters on system response, alignment will be as follow:

    Rccati Equation

    1) System parameters are R, P and Q matrices. First defined matrix R which is positive definite,when it increments, Q stays same, we observe that response getting slower and overshoot

    decreases. When we compare control input magnitude, we see that K is decreasing as R

    value increases.

    2) Second system parameter can be counted Q matrix. This matrix affects system response in areally different way. In a given example, we will change Q matrix and observe systemresponse. First lets define Q matrices as follow:

    And observe the difference between these three responses.

  • 8/2/2019 Opt Cont Term Project(511101135)

    20/23

    Afterwards, if we take another set of Q matrices as follow:

    Changes on Q matrix:

    - When Q11 and Q33 do not change, but Q22 increases, responsetime getting slower butovershoot getting smaller. But we can assume that response time does not change, becausetime change can be ingored.

    - When Q11 does not change, Q22 stays in changed form but Q33 increases, response timegetting slower and overshoot getting bigger.

    - When Q22 and Q33 do not change, but Q33 increases, response times are almost same,overshoot getting smaller.

    3) Another important parameter which should be observed is magnitudes of valuse of K matrix.K matrix changes with Q and R matrices. K matrix is directly related to R matrix. As R matrix

    increases, we see that, Ks values are getting smaller.

  • 8/2/2019 Opt Cont Term Project(511101135)

    21/23

    When we change Q values, situation is a little bit different. Q11 affects largely first element of K

    matrix. Effect on other elements is smaller with regard to first element. Other elements are like

    previous. Q22 affects largely second element of K, and finally, Q33s effect is largely on third

    element of K.

    Lyapunov Analysis

    When we make lyapunov analysis, we see that, Q and P matrices depend on proportional and

    derivative gain values. Because, KP and KD values are placed at P matrix. After calculations, it is

    understood that, proper KP and KD values effect directly on system response. For example,

    KP=80, KD=20

    Response is really fast, and overshoot is very low.

  • 8/2/2019 Opt Cont Term Project(511101135)

    22/23

    KP=80, KD=20

    So, as we observe, classical PD control laws are admissible in this analysis.

  • 8/2/2019 Opt Cont Term Project(511101135)

    23/23

    References

    Ogata K., 1990 Modern Control Engineering, Prentice HALL, INC, 837-846

    Dimirovski G., Control System Engineering lecture notes.

    Dimirovski G., Theory and Application of Optimal Control lecture notes.

    Bayraktarolu Z., Modern Control Engineering lecture notes.