Chapter1 EEE3001 & EEE8013

Embed Size (px)

Citation preview

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    1/25

    Chapter 1 EEE3001- 8013

    Chapter #1

    EEE3001 & EEE8013

    Design of Linear Control Systems

    Introduction

    1st order dynamics

    2nd order dynamics

    Nonhomogeneous differential equations

    Module Leader: Dr Damian Giaouris - [email protected] 1/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    2/25

    Chapter 1 EEE3001- 8013

    Introduction

    System: is a set of objects/elements that are connected or related to each

    other in such a way that they create and hence define a unity that performs acertain objective.

    Control: means regulate, guide or give a command.

    Task: To study, analyse and ultimately to control the system to produce a

    satisfactory performance.

    Model: Ordinary Differential Equations (ODE):

    2

    2

    dt

    xdm

    dt

    dxBfmaBfmaffmaF friction ====

    Dynamics: Properties of the system, we have to solve/study the ODE.

    Module Leader: Dr Damian Giaouris - [email protected] 2/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    3/25

    Chapter 1 EEE3001- 8013

    First order ODEs: ),( txfdt

    dx=

    Analytical solution: Explicit formula forx(t) (a solution which can be found

    using separate variables, integrating factor) which satisfies ),( txfdt

    dx=

    Example:

    The ODE adt

    dx= has as a solution ( ) attx = .

    First order Initial Value Problem : ( ) 00),,( xtxtxfdt

    dx==

    Analytical solution: Explicit formula for x(t) which satisfies ),( txfdt

    dx=

    and passes through when0x 0tt=

    Example:

    ( ) ( ) ( ) 00 xattxCxCattxadtdxadt

    dx+==+===

    INFINITE curves (for all Initial Conditions (ICs)).

    For that reason a different symbol is used for the above solution: ( )00 ,, xtt .

    You must be clear about the difference to an ODE and the solution to an

    IVP! From now on we will just study IVP unless otherwise explicitly

    mentioned.

    Module Leader: Dr Damian Giaouris - [email protected] 3/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    4/25

    Chapter 1 EEE3001- 8013

    Numerical solution: Using Simulink it is possible to see how the solution

    behaves. In order to do that we place one integrator, set the IC (in the

    integrator block) and then we create the signal

    ( )tx

    ( )txf , at the input of the

    integrator. Remember the set the properties of the Simulation parameters

    (I would say set the maximum step size to 1e-3) and of the Scope (change

    in the Data History the option Limit data points to last:

    Module Leader: Dr Damian Giaouris - [email protected] 4/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    5/25

    Chapter 1 EEE3001- 8013

    Example: Numerical solution of ( )txx cos2=& , ( ) 1.00 =x

    In order to improve the presentation of our results I set in the Save data to

    workspace option the following:

    That way, once we run the simulation, we have in the command window the

    matrix s which has in tits first column the values of the time and in the

    second the values of our solution:

    Module Leader: Dr Damian Giaouris - [email protected] 5/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    6/25

    Chapter 1 EEE3001- 8013

    >> plot(s(:,1),s(:,2))

    0 1 2 3 4 5 6 7 8 9 100.09

    0.095

    0.1

    0.105

    0.11

    0.115

    Module Leader: Dr Damian Giaouris - [email protected] 6/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    7/25

    Chapter 1 EEE3001- 8013

    First order linear equations - (linear in x and x)

    General form:

    =+

    =+

    Autonomouscbxax

    autonomousNontcxtbxta

    ,'

    ),()(')(

    Example: ukxx =+'

    Numerical Solution:

    k=5, u=0.5

    Scope

    1s

    Integrator

    5

    Gain

    0.5

    Constant

    0 1 2 3 40

    0.02

    0.04

    0.06

    0.08

    0.1

    Module Leader: Dr Damian Giaouris - [email protected] 7/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    8/25

    Chapter 1 EEE3001- 8013

    k=0.5, u=sin(10t)

    Sine Wave Scope

    1s

    Integrator

    0.5

    Gain

    0 5 10-0.1

    -0.05

    0

    0.05

    0.1

    0.15

    0.2

    Module Leader: Dr Damian Giaouris - [email protected] 8/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    9/25

    Chapter 1 EEE3001- 8013

    Analytical Solutions:

    Integrating factor (NOT ASSESSED MATERIAL):

    ktconstk

    kdtee

    ==

    ( ) ( ) uexeuekxxe ktktktkt ==+ ''

    ( ) = udtedtxe ktkt '

    ceudteexcudtexe

    ktktktktkt

    +=+=

    or: ( ) +=

    tktktktudteexex

    0

    110

    The equation that we derived is:

    ( ) +=t

    ktktkt udteexex

    0

    110

    Assuming that k>0 the first part is called transient and the second is called

    steady state solution.

    Module Leader: Dr Damian Giaouris - [email protected] 9/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    10/25

    Chapter 1 EEE3001- 8013

    Response to a sinusoidal input (Not assessed)

    ( )tkkyy cos' 11 =+

    ( ) ( )tkjkjyjytkkyy sin'sin' 2222 =+=+

    ( ) ( )tktkjkyykjyjy cossin'' 1122 +=+++

    tjkeyky

    =+ ~'~

    Integrating factor: =>kte ( ) ( )tjkkt keey +='~

    ( )

    +

    =

    +

    = +

    tj

    tjkkt

    etjk

    ky

    etjk

    key

    ~

    ~

    ( )

    +=

    ktj

    e

    k

    y

    1tan

    2

    21

    1~

    ( )

    ( )( )

    +

    =

    +

    =

    k

    tj

    t

    k

    e

    k

    y

    k

    1

    2

    2

    tan

    2

    2tancos

    1

    1

    1

    1Re~Re

    1

    ( )

    +

    kt

    k

    1

    2

    2tancos

    1

    1

    = magnified/attenuated amplitude and phase shifted.

    Module Leader: Dr Damian Giaouris - [email protected] 10/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    11/25

    Chapter 1 EEE3001- 8013

    Module Leader: Dr Damian Giaouris - [email protected] 11/25

    Example:

    ( tu )2cos= k=1, x(0)=0.1:

    0.1

    X0

    Sine Wave1

    Scope1

    Product1

    Product

    eu

    MathFunction1

    eu

    MathFunction

    1s

    Integrator1

    1

    Gain3

    -1

    Gain2

    Clock1

    Clock

    0 2 4 6 8 10-0.2

    -0.15

    -0.1

    -0.05

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    TransientSteadystate Overall

    Exercise: Find the response for k=0.5, u=1 and u=-1, initial conditions: 0, 1,

    -1. Describe the systems behaviour.

    Autonomous1st order ODEs => Liner Time Invariant (LTI) systems

    )(xfdt

    dx= (not t on RHS).

    Analytic solution: Can be solved as before: Transient and steady state part.

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    12/25

    Chapter 1 EEE3001- 8013

    Second order ODEs: ),,'(2

    2

    txxfdt

    xd=

    Second order linear ODEs with constant coefficients: uBxAxx =++ '''

    u=0 => Homogeneous ODE; I need two representative solutions

    0''' =++ BxAxx , assume rtex = => rtrex =' & rterx 2'' = =>

    =++=++ 00''' 2 rtrtrt BeAreerBxAxx

    02

    =++ BArr ; Characteristic or Eigenvalue equation => Check its roots.

    2

    42

    BAAr

    = , these are the Characteristic values or Eigenvalues.

    Roots are real and unequal: r1 and r2 ( BA 42 > =>Overdamped system)

    trex 1

    1= and are solutions of the ODE =>trex 2

    2=

    trtreCeCxCxCx 21 212211 +=+= . If r1 and r2

    C1=-0.5, C2=3/2 =>tt eex

    +=2

    35.0 3 :

    Module Leader: Dr Damian Giaouris - [email protected] 12/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    13/25

    Chapter 1 EEE3001- 8013

    Numerical Solution:

    Check ICs

    Scope

    1s

    Integrator3

    1s

    Integrator2

    4

    Gain5

    3

    Gain1

    0 5 100

    0.2

    0.4

    0.6

    0.8

    1

    Module Leader: Dr Damian Giaouris - [email protected] 13/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    14/25

    Chapter 1 EEE3001- 8013

    Module Leader: Dr Damian Giaouris - [email protected] 14/25

    Analytical Solution:

    Scope3

    Scope2

    Scope1

    eu

    MathFunction1

    eu

    MathFunction

    3/2

    Gain6

    -1

    Gain4

    -0.5

    Gain3

    -3

    Gain2

    Clockt

    0 5 10-0.5

    0

    0.5

    1

    1.5

    OverallPart 2

    Part 1

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    15/25

    Chapter 1 EEE3001- 8013

    Roots are real and equal: r1=r2 ( BA 42 = Critically damped system)

    rtex =1 and =>

    rttex =2

    rtrtteCeCxCxCx 212211 +=+=

    Example:

    A=2, B=1, x(0)=1, x(0)=0 => c1=c2=1

    Numerical Solution

    Check ICs

    Scope

    1s

    Integrator3

    1s

    Integrator2

    2

    Gain5

    1

    Gain1

    Analytical Solution

    Scope1

    Product

    eu

    MathFunction

    1

    Gain6

    1

    Gain3

    -1

    Gain2

    Clock

    t*exp()

    t

    Module Leader: Dr Damian Giaouris - [email protected] 15/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    16/25

    Chapter 1 EEE3001- 8013

    0 2 4 6 8 100

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    e-t

    te-t

    overall

    Module Leader: Dr Damian Giaouris - [email protected] 16/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    17/25

    Chapter 1 EEE3001- 8013

    Module Leader: Dr Damian Giaouris - [email protected] 17/25

    Roots are complex: r=a+bj BA 42 <

    o Underdamped system 0A

    So( )

    ( ))sin()cos( btjbteeeeeexatjbtatbjtattbjart

    +=====

    ++

    =Re+jIm.

    Theorem: If x is a complex solution to a real ODE then Re(x) and Im(x) are

    the real solutions of the ODE:

    )sin(),cos( 21 btexbtexatat == =>

    ( ) =+=

    +=+=

    btGebtcbtcebtecbtecxcxcx

    atat

    atat

    cos)sin()cos()sin()cos(

    21

    212211

    ( )

    where

    =

    = 1

    21

    1

    21

    1 tan&,

    tancosc

    c

    cc

    cG

    A=1, B=1, x(0)=1, x(0)=0 => c1=1, c2=1/sqrt(3)

    Numerical Solution

    Check ICs

    Scope

    1s

    Integrator3

    1s

    Integrator2

    1

    Gain5

    1

    Gain1

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    18/25

    Chapter 1 EEE3001- 8013

    Analytical Solution

    sin

    TrigonometricFunction1

    cos

    TrigonometricFunction

    Scope1Product

    eu

    MathFunction

    1/sqrt(3)

    Gain6

    1

    Gain4

    sqrt(3)/2

    Gain3

    -0.5

    Gain2

    Clock

    bt

    t

    0 2 4 6 8 10-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    C1cos(bt)

    C2sin(bt)

    C1cos(bt)+C

    2sin(bt)

    0 2 4 6 8 10-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    C1cos(bt)+C

    2sin(bt)

    eat

    Overall

    Module Leader: Dr Damian Giaouris - [email protected] 18/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    19/25

    Chapter 1 EEE3001- 8013

    o Undamped system 0=A

    BrBeerBxxrtrt ==++=++ 22 0000'' => Imaginary roots (If Bjbr= ( )=+= btGbtcbtcx cos)sin()cos( 21

    A=0, B=1, x(0)=1, x(0)=0 =>c1=1, c2=0:

    Check ICs

    Scope

    1s

    Integrator3

    1s

    Integrator2

    0

    Gain5

    1

    Gain1

    sin

    TrigonometricFunction1

    cos

    TrigonometricFunction

    Scope1Product

    eu

    MathFunction

    0

    Gain6

    1

    Gain4

    1

    Gain3

    0

    Gain2

    Clockt

    bt

    Module Leader: Dr Damian Giaouris - [email protected] 19/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    20/25

    Chapter 1 EEE3001- 8013

    0 2 4 6 8 10-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    Overall

    In all previous cases if the real part is positive then the solution will diverge

    to infinity and the ODE (and hence the system) is called unstable.

    Module Leader: Dr Damian Giaouris - [email protected] 20/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    21/25

    Chapter 1 EEE3001- 8013

    Module Leader: Dr Damian Giaouris - [email protected] 21/25

    Root Space

    jb

    a

    jb

    a

    Name Oscillations? Components of solution

    Overdamped No Two exponentials:

    tktkee 21 , , 0, 21

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    22/25

    Chapter 1 EEE3001- 8013

    Module Leader: Dr Damian Giaouris - [email protected] 22/25

    Natural frequency, damping frequency, damping factor

    (NOT ASSESSED MATERIAL)

    2nd order systems very important with rich dynamic behaviour

    So =>2,2 nn BA == 0'2''2 =++ xxx nn

    is the damping factor and n is the natural frequency of the system.

    ( )

    2

    422

    2

    4222nnnBAA

    r

    =

    =

    222nnnr =

    1. Real and unequal 110

    2222 >>>>

    nn => Overdamped system

    implies that 1> ; 2222,1 nnnr = => replace at

    tr.

    treCeCx 21 21 +=

    2. Real and equal 1 => Critically damped12222 === nn

    system implies that 1= ; nr = =>tt nn teCeCx

    += 1 2 .

    3. Complex 110

    2222 Underdamped systems

    implies 1 ( ) = tGex dtn cos ; d is called damped

    frequency or pseudo-frequency.

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    23/25

    Chapter 1 EEE3001- 8013

    4. Imaginary roots 0= and therefore the solution is njr = =>

    ( ) ; so when there is no damping the frequency of the= tGx ncos

    oscillations = natural frequency. ( ) = tGx ncos

    5. In all the previous cases if 0> then the transient part tends to zero. If

    0

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    24/25

    Chapter 1 EEE3001- 8013

    NonHomogeneous (NH) differential equations

    uBxAxx =++ '''

    u=0 => Homogeneous => x1 & x2.

    Assume a particular solution of the nonhomogeneous ODE: xp

    o If u(t)=R=cosnt =>B

    RxP =

    Then all the solutions of the NHODE are 2211 xcxcxx P ++=

    So we have all the previous cases for under/over/un/critically damped

    systems plus a constant R/B.

    If complementary solution is stable then the particular solution is called

    steady state.

    Example:

    22''' ==++ Pxxxx

    ( ))sin()cos(22 212211 btcbtcexcxcxat ++=++=

    x(0)=1, x(0)=0 => c1=-1, c2=-1/sqrt(3)

    Module Leader: Dr Damian Giaouris - [email protected] 24/25

  • 8/7/2019 Chapter1 EEE3001 & EEE8013

    25/25

    Chapter 1 EEE3001- 8013

    cos

    Trigonometric

    Function1

    sin

    Trigonometric

    Function

    Scope

    1

    s

    Integrator1

    1

    s

    Integrator

    1

    Gain12

    Scope5

    Scope4

    Scope3

    Scope2

    Scope1

    Product

    eu

    Math

    Function

    -1/sqrt(3)

    Gain5

    sqrt(3)/2

    Gain4

    -1

    Gain3

    -0.5

    Gain2

    Constant

    Clockt

    bt sin(bt)

    cos(bt)

    exp(-at)

    Numerical Part

    0 2 4 6 8 10-1

    -0.5

    0

    0.5

    1

    1.5

    2

    2.5

    Overall

    Homo geneous solution

    Particular solution