Prof.watanabe July28 APSS2010

Embed Size (px)

Citation preview

  • 8/20/2019 Prof.watanabe July28 APSS2010

    1/11

    2010/8/9

    1

    Introduction of Control Competition& Lecture on PID Control

    Asia-Pacific Summer School on Smart Structure Technology

    Toru WatanabeNihon University, JPN

    Overview

    Control object and tool for CompetitionIntroduction of DCMCT unit and QICii software

    Introduction to classical control

    Dynamical modelingTransfer FunctionBlock Diagram and FeedbackPoles and Zeros

    Introduction to PID control

    Control Object and Tools forCompetition

    Control Object

    DCMCT (DC Motor Control Trainer unit)Equipped with DC motor with flywheel, amplifier,microchip controller and digital/analog interface

    QICii Interactive interface software Interactive modeling, feedback controller design andevaluation can be carried out

    Able to upload controller to DCMCT / download timehistory

    Outlook of DCMCT Unit

    1. DC Motor 2. Flywheel3. Amp.4. Encoder 7. Analo I/O 9. Microchip10. USB port11. CTL Reset12. Interrupt SW15. Power port

    Controller on 9 drives 1 through 3 based on signal from 4

    Block diagram of the DCMCT

    Schematic view of open loop

    Controlcommand

    DrivingCurrent

    Error of angleor angular

    l i Angle

    FrictionTorque

    Angle

    Ampli-fier

    Micro-chip

    l iMo-tor Torque

    Fly-wheel

    En-coder

    Controller is downloaded fromPC by using QICii

  • 8/20/2019 Prof.watanabe July28 APSS2010

    2/11

    2010/8/9

    2

    Window of QICii

    Universal Interface for the operation of DCMCT

    Tasks in “Control Lab & Competition ”

    Educational LabsIdentify parameters in the control objectStudy basic properties of P, I, and D controls

    Supervisors add extra weights to flywheelDesign PID controller to above perturbed systemInvestigate robustness and evaluate performance

    Why DCMCT & QICii?

    Electromagnetic motor is commonly used instructural control to drive mechanisms such asmass dampers

    ,design procedure and characteristics of gains

    are essentially identical over any dynamicalsystemsThey are so well-organized that fair competitioncan be done within such limited time

    Introduction to ClassicalControl

    What is “Classical Control ”?

    In the field of “Control Engineering,” thereare two major stream of formulation

    “State space equation” – essentially in time domain“Transfer function” – essentially in frequency domain

    Both formulations are importantState space model is widely used in modern (or LQ)control, while transfer function is the basis ofclassical control.Post modern control (e.g. H-infinity) uses both.

    State-Space vs. Transfer Function (1)

    Example of State Space Formulationmx(t) cx(t) kx(t) u(t)

    y(t) x(t)

    Disp. x(t)

    T

    Springk

    Dampingc

    x v

    0 1 0x(t) x(t)u(t)k c 1

    v(t) v(t)m m m

    x(t)y(t) 1 0

    v(t)

    u

  • 8/20/2019 Prof.watanabe July28 APSS2010

    3/11

    2010/8/9

    3

    State-Space vs. Transfer Function (2)

    Example of transfer function formulationmx(t) cx(t) kx(t) u(t)

    Replacing “derivative” and “time”“ ”

    Mass m

    Springk

    Disp. x(t)

    Dampingc

    2ms X(s) csX(s) kX(s) U(s)

    2

    X(s) 1G(s)

    U(s) ms cs k

    Take output/input ratio

    u

    Framework of “Classical Control ”

    ModelingUtilizing transfer functions to describe thedynamics of control objects

    Anal sisMainly in frequency domain – “s” domain

    Controller DesignGenerally for single-input single-output systemManual calculation based design (practically bytry-and-error approach)

    Advantage of “Classical Control ”

    AdvantageSimple

    Analysis and controller design can be done withoutcomputer, nor “MATLAB” – of course they are helpfulSimple controller such as “PID controller” is easy to tunemanually, and easy to understand intuitively

    DisadvantageHard to deal with MIMO (multi-input multi-output) systemThe optimality of controller is not guaranteed

    Introduction to Laplace Transform

    Laplace Transform

    Identification -st0

    F s = f t e dt = L f t

    Laplace transform of f t ( ) (0)d

    L sF s f er ve unc on t

    Laplace transform ofintegrated function 0 1f ( ) L d F ss

    Neglecting initial value … f t ( ) L sF s

    Laplace Transform and DifferentialEquation

    Differential equation in time domain1

    0 1 11

    ( ) ( ) ( )( )

    n n

    n nn n

    d x t d x t dx t u t

    dt dt dt

    1

    1 11

    ( ) ( )( )

    n

    n nn

    d x t dx t y t

    dt dt

    Transformed differential equation

    10 1 1

    11 1

    X U( )

    Y( ) X

    n nn n

    nn n

    s s s s s

    s s s s

    Transformed equation is no longer differential, but algebraic

  • 8/20/2019 Prof.watanabe July28 APSS2010

    4/11

    2010/8/9

    4

    Laplace Transform to Solve DifferentialEquation – “Operator Method ”

    DifferentialEquation

    t-domainsolution

    (t-function)

    Tough to solve

    s -domain AlgebraicEquation

    Algebraicsolution

    (s-function)

    Laplace transform Inverse transform

    Easy to solve

    Laplace Transform and Fourier Transform

    Identification of Fourier Transform

    -= ( ) j t F j f t e dt Infinite function (e.g.unit step function)cannot be transformed

    Introduce “convergence factor”

    - -= ( ) j t t F j f t e e dt Replacing “ +j ” with “s,” Laplace transform

    - -= ( ) = ( ) j t st F j f t e dt f t e dt F s

    Infinite function (e.g.unit step function) canbe transformed!

    Representing Operator “s”

    In Fourier transform, operator “j ” can besimply understood as “frequency ”

    Therefore, the transformed function must becomplex to denote damping as Real/Imaginal ratio

    In Laplace transform, operator “s” can be

    understood as “frequency and damping ”Therefore, the transformed function simplybecame rational function because the existence ofdamping is already taken into consideration as “s”

    Modeling of DynamicalSystems as Transfer Function

    Modeling Dynamical System (1)

    First, identify all elements concerning dynamicsof control object

    Electric Circuit includin DC motor

    Flywheel including rotor

    Moment ofElectromotivecoefficient Kml i i i i l i

    VoltageVm(t)

    Resistance Rm

    Current Im(t)

    Inductance Lm Armature (rotor)rotation speed

    m(t)

    Motortorque

    Tm(t)

    Inertia J eq(t)

    Friction Torque Td(t)

    Modeling Dynamical System (2)

    Describe all elements as differential equationsEach element is supposed to possess single input andsingle output

    Electric Circuit includin DC motor

    m m m m m m mV (t) R I (t) L I (t) K (t)t

    l i i i i l i

    Flywheeleq m m m d J (t) K I (t) T (t)t

    m m m be m mT (t) K I (t), V (t) K (t) Electromotive / Backelectromotive Force

  • 8/20/2019 Prof.watanabe July28 APSS2010

    5/11

    2010/8/9

    5

    Modeling Dynamical System (3)

    Transform all equations into “s” domain

    m m m m m m mV (s) R I (s) L sI (s) K (s) Electric Circuit including DC motor

    Flywheel

    eq m m m d J s (s) K I (s) T (s)

    Modeling Dynamical System (4)

    Erase non-essential variables

    m m m m m mR L s I (s) V (s) K (s) Electric Circuit including DC motor

    Flywheel

    eq m m m d J s (s) K I (s) T (s)

    m

    m m mm m m m

    1 K I (s) V (s) (s)

    R L s R L s

    Substituted in …

    Modeling Dynamical System (4)

    Transform the equation into transfer function

    2m m

    eq m m m d K K

    J s (s) V (s) (s) T (s)

    Flywheel & Electric Circuit with motor

    m m m m

    Here, Td(s)is neglected

    2m m

    eq m m d m m m m

    K K J s (s) V (s) T (s)R L s R L s

    m m2

    m mm m eq

    m m

    (s) K V (s) K

    R L s J sR L s

    TransferFunction

    Transfer Function & State Equation (1)

    You may be able to obtain transfer functionfrom state equation

    m m m m m m mV (t) R I (t) L I (t) K (t)t

    eq m m m d J (t) K I (t) T (t)t

    m m

    m mm m

    m

    eq

    R K 1

    L L I(t) I(t)I(t)L V (t) , y(t)= 0 1

    K (t) (t)(t) 0 0J

    Here, Td(s)is neglected

    Transfer Function & State Equation (2)

    Matrix equation can be dealt with as … ,t t t t t X AX Bu y = CX

    Transform all equations into “s” domain

    ,s s s s s s X AX Bu y = CX

    1 1( ), G s( )

    ss s s s

    s

    yy = C I - A Bu C I - A Bu

    Transpose terms,

    m m

    2m eq m m m

    (s) K V (s) J s R L s K

    TransferFunction

    NOTE: Denominator is reduced and compound fraction is turned to simple

    Transfer Function andFrequency Response Function

  • 8/20/2019 Prof.watanabe July28 APSS2010

    6/11

    2010/8/9

    6

    Analogy: Frequency Response Function

    Transfer Function is quite similar to“Frequency Response Function”

    mx(t) cx(t) kx(t) u(t) Externalforce u

    Suppose

    2

    X( ) 1G( )

    U( ) m cj k

    and take output/input ratio

    t

    j t

    u(t ) U( )e

    x(t ) X( )e

    Mass m

    Springk

    sp. x

    Dampingc

    Difference between TF and FRF

    As shown, operator “s” is a complex variables j

    ,transform (basis of FRF) is quite similar toLaplace transform (basis of TF).FRF can be obtained by simply replacing “s”of TF to “j ”

    Laplace Transform and FrequencyResponse Function

    Systemt-domain Frequency ResponseFunction ( -function)

    Tough to derive

    s -domain System

    (s -function)

    Transfer Function

    (s-function)

    Laplace transform Replace “s” with “j ”

    Easy to derive

    Block Diagram andConnection

    Block Diagram – Graphical Description

    Each block denotes transfer function

    Transfer functionInput Output

    Addition

    Subtraction

    Input A

    Input BOutputC=A-B

    Distribution

    Input A Output B

    Output C A=B=C

    ,

    Parallel Connection = Addition orSubtraction

    In parallel connection, total transfer function isequal to the sum or difference of two functions

    G(s)=G1(s) - G2(s)

    InputInput

    2(s)

    OutputOut-put

  • 8/20/2019 Prof.watanabe July28 APSS2010

    7/11

    2010/8/9

    7

    Cascade Connection = Multiplication

    In cascade connection, total transfer function isequal to the product of two functions

    Input Output

    G(s)=G1(s)G2(s)Input Output

    Feedback Connection = FractionalFunction

    Feedback connection makes fractional function

    G1(s)Input u Output ysignal e

    2(s)

    G(s)=G1(s)/{1+G1(s)G2(s)}Input Output

    signal c

    Why Feedback Connection makesFractional Function?

    G1(s)Input u

    Output ysignal e

    signal c

    Proof y = G1(s) e = G1(s) { u – c } = G1(s) { u – G2(s) y }{ 1+G1(s) G2(s) } y = G1(s) uTherefore, y / u = G1(s) / {1+G1(s) G2(s) }

    s

    DCMCT ’s Block Diagram

    Element-by-element block diagram

    1 Vm Km

    Im

    1 1

    Tdm

    m

    m m mm m m m

    1 K I (s) V (s) (s)

    R L s R L s

    Tm

    Km

    eq m m m d J s (s) K I (s) T (s) =Tm

    DCMCT ’s Transfer Function accordingto Block Diagram

    Ignore TdLet G1(s)= Km / { S Jeq (S Lm +Rm)}

    = According to “Feedback Connection,” G(s) =G1(s) / { 1+G1(s)G2(s) }, Then

    m m

    2m eq m m m

    (s) K V (s) J s R L s K

    TransferFunction

    Feedback Compensation andCascade Compensation

  • 8/20/2019 Prof.watanabe July28 APSS2010

    8/11

    2010/8/9

    8

    Where to Put Controller?

    Feedback compensation (common in modern control)

    Control ObjectInput u

    Output y

    Controller

    u

    yError eControl ObjectController

    Cascade compensation (common in classical control)

    Difference in Transfer Function

    Suppose control object as G1(s), whilecontroller as G2(s)Feedback Compensation

    =

    Cascade CompensationG(s) = G1(s) G2(s) / { 1+G1(s)G2(s) }

    Looks not a big difference – just in numerator

    No, it is a big difference – “zeros” are different!

    Poles and Zeros

    Definition – Poles and Zeros

    Suppose G(s) = N(s)/D(s)N(s): Numerator polynomialD(s): Denominator polynomial

    = “ ” = On poles, G(s) possess “infinite transmission”

    Zeros (Zi) = Operator “s” that gives N(s)=0On zeros, G(s) possess “zero transmission”

    Poles and Eigenvalues

    Poles in classical control is identical to eigenvaluesin modern control

    According to transfer function, poles of DCMCT aregiven by solving the following equation

    2

    According to state equation, eigenvalues of DCMCTare given by solving the following equation

    eq m m ms s

    2

    det det 0

    m m

    mm m m

    m m eq m

    eq

    R K s

    L L R K s s s

    K L J Ls J

    I A

    Poles and Behavior of System

    Poles denotes the behavior of the systemIf any Re(Pi) > 0, the system possesses instableMagnitude of Pi (=Re (Pi)* Re (Pi) + Im(Pi)*Im(Pi))is identical to “natural frequency”

    Angle of Pi ( = arctan(Re (Pi)/Magnitude of Pi) ) isidentical to “damping ratio”

    See Prof. R. Christenson’s slide No. 30-34.

  • 8/20/2019 Prof.watanabe July28 APSS2010

    9/11

    2010/8/9

    9

    Zeros and Root Loci

    We know that the position of poles of the system ischanged according to controller gain.The map that shows the trace of poles according tothe increase of gain is called “Root Loci”

    to zeros or toward infinite as the gain is increasedto infinity.Therefore, position or location of zeros matters tothe characteristics of control systems

    Introduction to PID Control

    Concept of PID Controller

    Prefix the structure of controller as combinationof Proportional-Integral-Derivative gains

    ControlObject

    (target)

    K p

    K I

    1s

    errorou pu

    Why PID? How PID used?

    Advantage of PID controller Simple – only three gains are required to tuneEasy to understand – roles of each gains can berepresented intuitivelyPractically useful –PID controller generally

    satisfies requirements.

    Application Any simple control problem (e.g., AMD for SDOF)Local feedback for actuator (e.g., servomotor)

    The Role of P, I and D gains (1)

    Proportional gain – equivalent to “spring”

    Output = displacement

    If the feedback gain isproportional to displacement

    to "Spring"ControlForce

    F kx

    The Role of P, I and D gains (2)

    Derivative gain – equivalent to “damper”

    E uivalent

    Output = displacementDerivative = velocity

    If the feedback gain isproportional to velocity

    to "Damper"ControlForce F cx

  • 8/20/2019 Prof.watanabe July28 APSS2010

    10/11

    2010/8/9

    10

    The Role of P, I and D gains (3)

    Integral gain – “Stationary disturbance canceller”

    Output = displacementIntegral = sum of drift

    If the feedback gain isproportional to integral

    Suppose stationaryforce is subjected

    ControlForce

    D gain does not work.P gain reduces drift, butnot perfectly cancel it.

    Control force isgradually increased

    until drift is converged

    F I xdt

    Aim of PID Controller

    To let the output (rotational angle or speed)follow the target

    Output Y(s)

    Command

    DCMCT

    R(s)

    K p

    K I

    1s

    rrorEm(s)

    m m (s))

    m s

    Transfer Function of DCMCT and PID

    DCMCT’s transfer function

    m m

    2m eq m m m

    (s) K V (s) J s R L s K

    Y(s) = m(s)

    Output : rotational speed

    2m P I D

    P I Dm

    V (s) 1 sK K s K K K sK

    E (s) s s

    PID controller’s transfer function

    Y(s) = m (s)

    m m2

    m eq m m m

    (s) K V (s) s J s R L s K

    Output : rotational angle

    Transfer Function of DCMCT with PID

    Cascade CompensationG(s) = G1(s) G2(s) / { 1+G1(s)G2(s) }

    Y(s) = (s)

    m P I D

    2 2

    eq m m m m P I D

    K sK K s K G(s)

    s J s R L s K K sK K s K

    Y(s) = (s)

    2m P I D

    22 2eq m m m m P I D

    K sK K s K G(s)

    s J s R L s K K sK K s K

    Effect of PID on DCMCT (1)

    Y(s) = (s) case, No controlLm is neglected for brevity

    2m mK K G s s

    eq meq m m J R J R s K

    Effect of PID on DCMCT (2)

    Y(s) = (s) case – Lm is neglected for brevity

    2m P I D

    2 2eq m m m P I D

    K sK K s K G(s)

    s J sR K K sK K s K

    m P I D

    22D m eq m m m P m I

    22 2m m P m m P D m eq m m I

    D m eq m

    K sK K s K

    K K J R s K K K s K K

    K K K K K K 4 K K J R K K s

    2 K K J R

    Poles become complex by introducing PID feedback

  • 8/20/2019 Prof.watanabe July28 APSS2010

    11/11

    2010/8/9

    11

    How to Design PID gains?

    Each gains possess their own “trade offs” Any excessive gain makes system unstableP gain as increased

    as er u v ra ng response

    D gain as increasedmore damping but too sensitive to noise and error

    I gain as increasedresistant to drift, but slower response

    Design “ Theories ” for PID Controller

    Several design procedures for PID controllerare already presented

    Ziegler-NicholsCritical sensitivitStep response

    All these methods are “procedures,” not“theories” because they do not guarantee theoptimality