Top Banner

of 12

Ta Proj 1 Reportl

Apr 14, 2018

Download

Documents

shaheerdurrani
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/27/2019 Ta Proj 1 Reportl

    1/12

    ECSE 4440 Control System Engineering

    Project 1

    Controller Design of a Second Order System

    TA

    Contents

    1. Abstract

    2. Introduction3. Controller Design for a Single Pendulum

    4. Conclusion

  • 7/27/2019 Ta Proj 1 Reportl

    2/12

    2

    1. Abstract

    The purpose of this project is to design a controller for a second order system(themost common prototype control problem). A Proportional Integral derivative(PID)

    will be adopted for the give system. The study will be approached analytically and

    experimentally.

    2. IntroductionPractically, there are few systems that dont have any control system inside. More

    complicated become systems, more sophisticated controllers are needed. To design acontroller, several issues should be considered e.g., modeling, system performance,tuning gain and stability. For a simple second order system, those issues will be

    studied in this project.The given single pendulum system is a basic second order system to be controlled.

    The system will be modeled as a linear system. The poles and zeros of the systemwill be found to test the stability of the given system. The controller will be

    developed in the order of proportional(P) controller, proportional-derivative(PD)controller-proportional and proportional- integral-derivative(PID) controller. To meetthe given specifications and stability, the gains will be tuned.

    The controllers will be implemented in continuous time domain(S plane) and indiscrete time domain(Z plane), respectively. The analytical controller will be verified

    by simulation with simulink of Matlab.

    3. Controller Design for A Single Pendulum3.1 Linearization(Task 1)

    The analysis and control design are far easier for the linear than for nonlinear models.

    Linearization is the process of finding a linear mode that approximates a nonlinearone. Linearization process depends on the expanding the nonlinear state equation in

    to a Taylor series. In the given dynamic equation (1), two non- linear functions exist,

    e.g., sin),sgn(.

    .

    ( ) KvmglFFmlII gcvgm ==+++++ sin)sgn(....

    22(1)

    Parameter Name Value

    m Mass .048Kg

    I Link Inertia .000187 Kg m2

    mI Motor Inertia 2.2e-7 Kg m

    2

    gl Distance .051 m

    N Gear Ratio 70.35

    cF Coulomb Friction Coefficient .014 N-m

    vF Viscous Friction Coefficient .0034 N-m-sec

    K Torque Constant .01447

  • 7/27/2019 Ta Proj 1 Reportl

    3/12

    3

    )sgn(.

    can be set to be zero since at the equilibrium state, .0.

    = For sin , the firsttwo terms(linear terms) of the Taylor series expansion(2) are used.

    ( ) ( ) ++= 2sin5.cossinsin (2)

    The the linearized system becomes

    ( ) desgdesgvgm mglmglFmlINI sincos...

    22 =++++ (3)where ( )des =

    The Laplace transform of the equation is

    ( ) ( ) ( )ssmglsFs desgv =++ cos2

    (4)

    where22

    gm mlINI ++= and I(s) is the Laplace transform of desgmgl sin .

    Then, the transfer function of the system is

    desgv mglsFssIssH

    cos1

    )()()(

    2 ++==(5)

    From the transfer function, it has poles at

    2

    cos4

    2

    desgvvmglFF

    s

    = (6)

    and no zeros. For the system to be stable, every poles should be in left hand side of s-

    plane. In the equation (6), 0cos >des is the condition for the system to be stable. In

    other words,

    2

    2

    3

    2

    0

  • 7/27/2019 Ta Proj 1 Reportl

    4/12

    4

    Figure 1

    Figure 2

    With only the single pendulum system, the step response goes infinity in figure 3.

    Figure 3

    3.3 P Feed Back Controller(task 3)

  • 7/27/2019 Ta Proj 1 Reportl

    5/12

    5

    As a basic controller operation, the controller is simply an amplifier with a constant

    gain pK and a feedback loop, ( )despK = . Hence the output of P controller isrelated with the input of the controller by a proportional constant. Adding a Pcontroller to the given system results in changing the transfer function of overall

    system such as

    pdesgv

    des

    pdesgv KmglsFasd

    KmglsFss

    ++++

    +++=

    coscos 22(7)

    where disturbance desgmgld sin= .

    From (7), the location of the poles depends on the given parameters and pK . The

    poles are

    2

    cos4

    2

    pdesgvvKmglFF

    s

    +

    = (8)

    The locations of the poles are changing by varyingp

    K . Ifdesgp

    mglK cos

    >, the system

    becomes stable. With given parameters and pK = 5, the poles are located at

    i1194274.2 for =des and2

    =des such that the system is stable. The analytical

    result is verified by the simulation( pK =5, iK =0 and iK =0). In figure 4, the system is

    stable for both values.

    Figure 4

    3.4 PD Feed Back Controller(task 4)

    Even though the system with P controller is stable, the output has relatively high peakovershoot and is oscillating. The oscillation results from the excessive amount of

  • 7/27/2019 Ta Proj 1 Reportl

    6/12

    6

    torque and the lack of damping. Adding the derivative of the input makes the systemcritical damped. In the equation (9), the locations of poles are

    2

    cos4

    2

    pdesgdvdvKmglKFKF

    s

    +

    +

    +

    = (9)

    As it is shown in (9), tuning dK and pK make it possible for the system to meet the

    given specifications e.g., rise time (90%), settling time (2%) small overshoot(less 5%)

    and steady state error(less then 2%). Once the inside of the square root is negative,the damping depends on its magnitude.

    For fixed 1.=dK , the step responses are shown for various pK values in the figure 5.

    Figure 5

    The plots show increasing pK results in decreasing rise time( pK =1,10) but

    increasing overshoot( pK =10).

    For fixed pK =1 in the figure 6, the step responses are shown for various dK values.

  • 7/27/2019 Ta Proj 1 Reportl

    7/12

    7

    Figure 6In the figure, decreasing dK values leads to decrease the rise time. For the given

    specification, dK =.1 and pK =2 make the system meet the specifications very well in

    Figure 7.

    Figure 7From the given transfer function for the system with PD controller (10), steady state

    error can be calculated by setting .0=s

    ( ) ( ) pdesgdvdes

    pdesgdv KmglsKFas

    d

    KmglsKFs

    s

    +++++

    ++++=

    coscos 22

    where desgmgld sin= (10)

    Therefore the steady state error is the function of des in (11).

    pdesg

    desg

    ssKmgl

    mgle

    +

    =

    cos

    sin(11)

  • 7/27/2019 Ta Proj 1 Reportl

    8/12

    8

    With simulation with the parameters2

    =des , pK =1, the error in Figure 8 is almost

    same with .024 calculated by (11).

    Figure 8

    3.5 Washout Filter Design(task 5)

    In practice,.

    is not measured. In stead of that, one high pass filter which has onezero at the origin in feedback loop.

    t1

    t i m e

    s

    s+3

    T r a n s f e r F c n

    t h e t a

    T o W o r k s p a c e

    T e r m i n a t o r

    S u b S y s t e m

    S t e p

    In1

    t h e t a

    t het adot

    S i n g l e

    P e n d u l u m

    S i m u l a t o r

    S c o p e

    K p . s + K i

    s

    P I c o n t r o l

    K d

    G a i n

    C l o c k

    d ou ble d ou bl e

    d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    Figure 8-1

    The step response of the washout filter controller is oscillated at transient part and hasdamping. But the filter reduces the steady state error in Figure 8-2.

  • 7/27/2019 Ta Proj 1 Reportl

    9/12

    9

    Figure 8-2

    3.6 PD controller in sample data implementation(task 6)So far, the controller has been implemented in continuous time domain. The discrete

    implementation, however, becomes more popular by appearing computers and smalldigital microprocessors. In continuous domain, a differential equation can be

    approximated with a difference equation e.g., ( ) ( ) ( )( ) stkkk /1

    .

    With the approximation, the PD controller system is implemented in figure 9.

    Figure 9

    The simulation result is well approximated in sampled data implementation in figure10.

  • 7/27/2019 Ta Proj 1 Reportl

    10/12

    10

    Figure 10

    3.7 PID controller in continuous and sampled data implementation (task 7,8)To compensate the steady state error, the integral controller should be added. One

    obvious effect of the integral control is that it increases the type of the system by one;that is, if the steady-state error to a given input is constant, the integral controlreduces it to zeros. The transfer function of the PID controller system is

    ( ) ( ) ( ) ( )ddesgdv

    des

    ipdesgdv

    idd

    KsKmglsKFas

    ds

    KsKmglsKFs

    KsKsK

    ++++++

    +++++++

    =

    coscos 323

    2

    wheredesg

    mgld sin

    =(12)

    then0

    sdes

    goes to zero as 0S . In other word, the integral controllercompensates steady state error. The continuous and sampled data implemented PIDcontrollers are simulated and compared in figure 11 and figure 12.

    t1

    t i m e

    t h e t a

    T o W o r k s p a c e

    S u b S y s t e m

    S t e p

    I n 1

    t h e t a

    t h e t a d o t

    S i n g l e

    P e n d u l u m

    S i m u l a t o r

    S c o p e

    K p . s + K i

    s

    P I c o n t r o l

    K dG a i n

    C l o c k

    d o u b l e d o u b l e d o u b l e d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    d o u b l e

    Figure 11

  • 7/27/2019 Ta Proj 1 Reportl

    11/12

    11

    The performances of both controllers meet the given specifications in figure 12 andfigure 13.

    Figure 13

    Figure 14

    Parameter Continuous Controller Sampled ZOH controller

    =des 2/ =des =des 2/ =des Overshoot(%) 4.42 3.5 4.37 3.45

    pt (sec) .27 .354 .269 .368

    rt (sec) .079 .079 .079 .08

    st (sec) 1.113 1.053 1.113 1.056Steady error (%) 1.4e-4 1.5e-4 1.47e-4 1.57e-4

    3.8 Tracking(task 9)Up to now, the input has been a step function. But in real system, the input tends to be a

    time varying function such as a sinusoidal function. The given input ( ) ( )ttdes 4sin=

  • 7/27/2019 Ta Proj 1 Reportl

    12/12

    12

    increases the transfer function by 2 because the Laplace transform of the input is

    22

    2

    16

    4

    +s. The total system becomes (13).

    ( ) ( )

    ( ) ( ) iddesgdv

    ipdesgdv

    idd

    KsKmglsKFas

    ds

    sKsKmglsKFs

    KsKsK

    +++++

    ++

    +++++

    ++=

    cos

    16

    4

    cos

    3

    22

    2

    23

    2

    (13)

    As shown in (13), the system is a fifth order system. First of all, dominant second order

    system needs to be found which has the poles most close to imaginary axis. Then tuningthe poles of the second system to make the system meet the specifications.With the same gains with task 8, the output is shown in Figure 15.

    Figure 15

    3.9 Experimental

    4. ConclusionIn this project, the controller design of a second order system(a single pendulum) hasbeen studied. As a controller, PID controller has been adopted. Mathematical

    analysis of the transfer function has been used and simulation justify the analysis.Even though, a PID controller is simple, the robust of the controller has been

    experienced and justified.