SYSTEMS_AND_CONTROL.PDF

Embed Size (px)

Citation preview

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    1/14

    1

    1540 Introduction To Mechatronics: Slide 1Stefan Williams

    Introduction to MechatronicsMech-1540

    Systems and Control

    1540 Introduction To Mechatronics: Slide 2Stefan Williams

    Systems and Control

    A System is a device or process that takes a

    given input and produces some output:

    A DC motor takes as input a voltage and producesas output rotary motion

    A chemical plant takes in raw chemicals andproduces a required chemical product

    SystemInput Output

    1540 Introduction To Mechatronics: Slide 3Stefan Williams

    What is a Control System

    A Process that needs to be controlled:

    To achieve a desired output

    By regulating inputs

    A Controller: a mechanism, circuit or algorithm Provides required input

    For a desired output

    Required

    Input

    Desired

    OutputProcess

    Output

    Controller

    1540 Introduction To Mechatronics: Slide 4Stefan Williams

    Closed Loop Control

    Closed-loop control takes account of actualoutput and compares this to desired output

    Measurement

    DesiredOutput

    +-

    Process

    Dynamics

    Controller/

    Amplifier

    OutputInput

    Open-loop control is blind to actual output

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    2/14

    2

    1540 Introduction To Mechatronics: Slide 5Stefan Williams

    Feed-Back Control

    A Measurement of actual output is taken A comparison between measured and desired

    output is made

    A controller uses this comparison to provideinput to the process

    The input is designed to make desired andmeasured values the same

    Called a Feedback Controller

    1540 Introduction To Mechatronics: Slide 6Stefan Williams

    What is a Control System ?

    A process to be controlled

    A measurement of process output

    A comparison between desired and actual output

    A controllerthat generates inputs from comparison

    Measurement

    + -

    ProcessController OutputDesiredOutput

    Comparison

    1540 Introduction To Mechatronics: Slide 7Stefan Williams

    Example: DC Motor Speed Control

    Desired speed d Actual speed Tachometer measurements plus noise

    Control signal is a voltage Variations in Load Torque

    Actual Speed Measurement

    +

    -Load Torque

    Power

    AmplifierController

    Motor

    Tacho

    d

    1540 Introduction To Mechatronics: Slide 8Stefan Williams

    Example: DC Motor Speed Control

    Feedback provides insurance against:

    Motor Non-linearities

    Changes in Load Torque

    Actual Speed Measurement

    +

    -Load Torque

    Power

    AmplifierController

    Motor

    Tacho

    d

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    3/14

    3

    1540 Introduction To Mechatronics: Slide 9Stefan Williams

    Example: Batch Reactor

    Temperature Control

    Goal: Keep Temperature at desired value Td

    If T is too large, exothermic reaction may cause explosion

    If T is too low, poor productivity may result

    Feedback is essential because process dynamics are notwell known

    ControllerSteam

    Water

    Measured Temperature

    Coolant

    ReactantsDesired

    Temperature

    1540 Introduction To Mechatronics: Slide 10Stefan Williams

    Example: Aircraft Autopilot

    Standard components in modern aircraft

    Goal: Keep aircraft on desired path

    Disturbances due to wind gust, air density, etc.

    Feedback used to reject disturbances

    GPS/Inertial

    Path controller

    RudderElevons

    Measured pathRoute

    SensorsActuators

    Disturbances

    1540 Introduction To Mechatronics: Slide 11Stefan Williams

    Block Diagrams

    Formalise control systems as pictures

    Ascribes mathematical models to systemcomponents

    Components can be combined to produce an

    overall mathematical description of systems

    Interaction between elements is well defined

    1540 Introduction To Mechatronics: Slide 12Stefan Williams

    Block Diagrams: Summation

    Ideal, no delay or dynamics

    Two inputs: ( ) ( ) ( )z t d t y t=

    Three ormore: ( ) ( ) ( ) ( )z t f t g t y t= +

    ( )z t( )z t

    ( )y t( )y t

    ( )d t( )f t

    ( )g t+

    ++

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    4/14

    4

    1540 Introduction To Mechatronics: Slide 13Stefan Williams

    Block Diagrams: Transfer

    Functions

    Transfers input to output:

    ( )y t( )x t G

    .y G x=

    A constant gain (K)

    A differential equation

    A look-up table

    1540 Introduction To Mechatronics: Slide 14Stefan Williams

    Time Out: The Laplace Transform

    In this course, the Laplace operator or

    Laplace variable is a useful notation:

    ds

    dt

    22

    2

    ds

    dt etc

    And logically: 1.dts

    1540 Introduction To Mechatronics: Slide 15Stefan Williams

    For Example I

    ( ) ( ) ( ) ( ) ( )p pdy

    mc y t u t sY s mc Y s U sdt

    + = + =

    pm c

    ( )Q u t=&

    ( )T y t=

    Physical model

    ( ) ( ) ( )

    ( ) ( ) ( )

    1( ) ( )

    p

    p

    p

    sY s mc Y s U s

    s mc Y s U s

    Y s U ss mc

    + =+ =

    =

    +

    1540 Introduction To Mechatronics: Slide 16Stefan Williams

    For Example I

    ( ) ( ) ( ) ( ) ( )p pdy

    mc y t u t sY s mc Y s U sdt

    + = + =

    pm c

    ( )Q u t=&

    ( )T y t=

    Physical model

    1

    ps mc+( )U s ( )Y s

    Block Diagram

    model

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    5/14

    5

    1540 Introduction To Mechatronics: Slide 17Stefan Williams

    For Example I

    ( ) ( ) ( ) ( ) ( )p pdy

    mc y t u t sY s mc Y s U s

    dt

    + = + =

    pm c

    ( )Q u t=&

    ( )T y t=

    Physical model

    ( )G s( )U s ( )Y s

    Transfer Function

    1( )

    p

    G ss mc

    =+

    1540 Introduction To Mechatronics: Slide 18Stefan Williams

    For Example II

    ( )x t

    ( )u tM

    C

    K

    2

    2[ ( ) ( )]

    d x dxM C K x t u t

    dt dt + =

    22 2

    22 ( ) ( )

    d x dxx t u t

    dt dt + + =

    2 C

    M=

    2 K

    M =

    K

    M=

    2

    C

    KM=

    1540 Introduction To Mechatronics: Slide 19Stefan Williams

    For Example II

    ( )2 2 22 ( ) ( )s s X s U s + + =

    22 2

    22 ( ) ( )

    d x dxx t u t

    dt dt + + =

    2 2 2. ( ) 2 . ( ) . ( ) ( )s X s s X s X s U s + + =

    Laplace Transform

    2

    2 2( ) ( )

    2X s U s

    s s

    = + +

    1540 Introduction To Mechatronics: Slide 20Stefan Williams

    For Example II

    2

    2 22s s

    + +

    ( )X s( )U s

    ( )x t

    ( )u tM

    C

    K

    Physical Model

    Block Diagram model

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    6/14

    6

    1540 Introduction To Mechatronics: Slide 21Stefan Williams

    Block Diagrams:

    Transfer Functions

    Transfer FunctionG(s) describes system

    component

    An operatorthat transfers input to output

    Described as a Laplace transform because

    ( )Y s( )X s ( )G s

    ( ) ( ) ( )Y s G s U s= ( ) ( ) ( )y t g t u t

    1540 Introduction To Mechatronics: Slide 22Stefan Williams

    Single-Loop Feedback System

    DesiredValue

    Output

    Transducer

    +-

    Feedback

    Signal

    error

    Controller Plant

    ControlSignal

    ( )C s ( )G s

    K

    ( )d t ( )e t ( )u t ( )y t

    ( )f t

    Error Signal

    The goal of the Controller C(s) is:To produce a control signal u(t)

    Which drives the error e(t) to zero

    ( ) ( ) ( ) ( ) ( )e t d t f t d t Ky t = =

    1540 Introduction To Mechatronics: Slide 23Stefan Williams

    Controller Objectives

    Controller cannot drive error to zero

    instantaneouslyas the plantG(s) has dynamics

    Clearly a large control signal will move the plant

    more quickly The gain of the controller should be large so that

    even small values of e(t) will produce largevalues of u(t)

    However, large values of gain will causeinstability

    1540 Introduction To Mechatronics: Slide 24Stefan Williams

    Why Use Feedback ?

    Perfect feed-forward controller: Gn

    ( )y t( )d tG1/ nG

    ( )l t

    +

    Output and error: nGy d GlG

    =

    1n

    Ge d y d Gl

    G

    = = +

    Only zero when:n

    G G=

    0l=

    (Perfect Knowledge)

    (No load or disturbance)

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    7/147

    1540 Introduction To Mechatronics: Slide 25Stefan Williams

    Why Use Feedback ?

    1540 Introduction To Mechatronics: Slide 26Stefan Williams

    Why Use Feedback ?

    ud yl

    e++

    K G

    unity feedback

    controller plant

    demand output

    A sensor

    load

    , ( ),e d y y G u l u Ke= = =

    No dynamics

    Here !

    ( ) ( )e d y d G u l d G Ke l = = =

    So:

    1540 Introduction To Mechatronics: Slide 27Stefan Williams

    Closed Loop Equations

    e d GKe Gl = +

    ( )1 KG e d Gl + = +Collect terms:

    1

    1 1

    Ge d l

    KG KG= +

    + +Or:

    Demand to Error

    Transfer Function

    Load to Error

    Transfer Function

    1540 Introduction To Mechatronics: Slide 28Stefan Williams

    Closed Loop Equations

    1

    G

    KG+K

    dl

    y+

    +

    Equivalent Open Loop Block Diagram

    1 1

    GK Gd l

    KG KG= +

    + +Similarly

    Demand to Output

    Transfer Function

    Load to Output

    Transfer Function

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    8/148

    1540 Introduction To Mechatronics: Slide 29Stefan Williams

    Rejection of Loads and

    Disturbances

    1

    Gy l

    KG= +

    Load to OutputTransfer Function

    If Kis big: 1KG>>

    10

    Gy l l

    KG K =

    If Kis big:

    Perfect Disturbance Rejection

    Independent of knowing G

    Regardless of l

    1540 Introduction To Mechatronics: Slide 30Stefan Williams

    Tracking Performance

    1

    GKy d

    KG= +

    Demand to OutputTransfer Function

    If Kis big: 1KG>>

    GKy d d

    KG =

    IfKis big:

    Perfect Tracking of Demand

    Independent of knowing G

    Regardless of l

    1540 Introduction To Mechatronics: Slide 31Stefan Williams

    Two Key Problems

    ud yl

    e++

    K G

    ( )u K d y= Power: LargeKrequires largeactuator power u

    1540 Introduction To Mechatronics: Slide 32Stefan Williams

    Two Key Problems

    ud yl

    e++

    K G

    ( )u K d y n= +Noise:

    LargeKamplifies

    sensor noiseu Kd

    In practise a Compromise K is required

    +n

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    9/149

    1540 Introduction To Mechatronics: Slide 33Stefan Williams

    Control Criteria

    Speed of Response

    Robustness to unknownplant and load

    Stability

    1540 Introduction To Mechatronics: Slide 34Stefan Williams

    Response of a First-Order

    System

    1( ) ( ) ( ) ( )

    dyay t x t Y s X s

    dt s a+ = =

    +

    0 1 2 3 4 5 6 70

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    Time

    Output

    Response of First Order Lag to Impulse Input

    0( ) aty t y e

    =

    General Solution:

    1540 Introduction To Mechatronics: Slide 35Stefan Williams

    Step Response

    0 1 2 3 4 5 6 70

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    Output

    Time

    Response of First Order Lag to Step Input

    ( ) (1 )at

    fy t y e=

    1540 Introduction To Mechatronics: Slide 36Stefan Williams

    Speed of Response

    ux ye+

    K1

    s a+

    , ( )dy

    ay u u K x ydt

    + = = Equations:

    ( )dy

    ay K x ydt

    + = ( )dy

    a K y Kxdt

    + + =

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    10/141 0

    1540 Introduction To Mechatronics: Slide 37Stefan Williams

    System Descriptions

    ( ) ( )( )

    KY s X ss a K= + +

    ( )

    K

    s a K+ +( )X s ( )Y s

    ( )dy a K y Kxdt + + =

    ( )

    0( ) a k ty t y e +=

    1540 Introduction To Mechatronics: Slide 38Stefan Williams

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    Time (s)

    Output

    Speed of Response

    ( )

    0( ) a k ty t y e +=

    0( ) aty t y e=

    Increasing K increases Speed of Response

    1540 Introduction To Mechatronics: Slide 39Stefan Williams

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    Output

    Time (s)

    Speed of Response to Step

    ( )( )0( ) 1 a k t

    y t y e +=

    0( ) (1 )at

    y t y e=

    Increasing K increases Speed of Response

    1540 Introduction To Mechatronics: Slide 40Stefan Williams

    The Time Constant of a System

    The time constant of a system is defined as the

    time taken to reach 1/e of the final value

    ( )

    0( ) a k ty t y e +=

    0( ) at

    y t y e

    =

    1dyy x

    dt T+ = The time-constant of a system

    characterises its speed of response

    Reach 1/e when

    1t T

    a K=

    + @

    1

    t Ta= @

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    11/141 1

    1540 Introduction To Mechatronics: Slide 41Stefan Williams

    Tracking Response

    A system with dynamics takes time to respond

    (like e-at for example)

    If the demand also changes, the output will lag.

    For example a ramp demand:

    1540 Introduction To Mechatronics: Slide 42Stefan Williams

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

    0.5

    1

    1.5

    2

    2.5

    3

    3.5

    4

    4.5

    5

    Time (s)

    Tracking Error

    Steady-State Error

    Initial Response

    Input

    Output

    1540 Introduction To Mechatronics: Slide 43Stefan Williams

    Characterising

    Tracking Errors

    Tracking Errors are characterised byconsidering the response of the system to

    sine waves of different frequencies

    1540 Introduction To Mechatronics: Slide 44Stefan Williams

    Low Frequency Response

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    Time (s)

    Input/Output

    Input

    Output

    Lag

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    12/141 2

    1540 Introduction To Mechatronics: Slide 45Stefan Williams

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    Input/Output

    Time (s)

    High Frequency Response

    Input

    Output

    Lag

    Bigger lag

    Diminished

    Amplitude

    1540 Introduction To Mechatronics: Slide 46Stefan Williams

    Frequency Response

    For most physical systems:

    When input varies slowly, output tracks inputclosely (small lag, similar amplitude)

    When input varies quickly, output does not trackinput well (large lag, reduced amplitude)

    The speed of input changes that can be trackedis a universal measure of system performance

    1540 Introduction To Mechatronics: Slide 47Stefan Williams

    Example I

    sindy

    ay tdt

    + = 1( ) sin( )y t ta

    = ++

    1tana

    =

    Plot amplitude of output

    Against input frequency

    Plot phase lag of output

    Against input frequency

    1540 Introduction To Mechatronics: Slide 48Stefan Williams

    10-2

    10-1

    100

    101

    10-2

    10-1

    100

    Frequency (rad/s)

    Amplitude

    Amplitude

    Amplitude Falls by half

    Bandwidth

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    13/141 3

    1540 Introduction To Mechatronics: Slide 49Stefan Williams

    Bandwidth Calculation

    Definition of Bandwidth:

    Frequency at which input

    Amplitude is half DC value

    1A

    a=

    +

    0=

    a=

    1A

    a=

    1

    2A

    a=

    Bandwidth here is

    a rads/second

    1540 Introduction To Mechatronics: Slide 50Stefan Williams

    Phase Lag

    10-2

    10-1

    100

    101

    -1.5

    -1

    -0.5

    0

    Phase(rads)

    Frequency (rad/s)

    1540 Introduction To Mechatronics: Slide 51Stefan Williams

    Increased Gain Increases

    Bandwidth

    10-2

    10-1

    100

    101

    10-2

    10-1

    100

    Bandwidth

    is (a+k)

    1540 Introduction To Mechatronics: Slide 52Stefan Williams

    Bandwidth and Time-constants

    The Bandwidth and Time -constant of a

    system are the inverse of each other:

    1 1

    bw

    Ta

    = = 1bw

    aT

    = =

    1bw a K

    T = + =

    1 1

    bw

    Ta K

    = =+

  • 7/27/2019 SYSTEMS_AND_CONTROL.PDF

    14/141 4

    1540 Introduction To Mechatronics: Slide 53Stefan Williams

    A Word About Stability

    0 1 0 20 30 4 0 5 0 6 0

    -1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    0 1 0 20 30 4 0 5 0 60

    -1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    Start here G 180ophaseinversion

    0 1 0 20 30 4 0 5 0 60

    -1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    Bigger hereKAnother phase inversion

    If G is such that input is phase reversed

    (180o out of phase) for any frequency,

    then input will be back in phase

    If loop gain >1 then

    system will be unstable

    BANG !

    If System is unstable for one input,

    it will be unstable for all inputs