mrac pid documentation

Upload: naga01013ee022

Post on 28-Feb-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Mrac Pid Documentation

    1/33

    AUTOMATIC TUNING OF PID CONTROLLER USING

    MODEL REFERENCE ADAPTIVE CONTROL

    The mini Project Report submitted in partial fulfillment of the requirements

    For the award of the Degree in Bachelor of Technology

    In

    (Electrical and Electronics Engineering

    By

    B.!" #$%F&'$($)* +.,-ID&&P #$%F&'$((*

    /.PR-+I #$%F&'$(01* 2.3RT"I3 #$%F&'$((4*

    5nder the esteemed 2uidance of

    Mr!G!R!S!Naga "#$ar% M!Tec&%

    ssistant Professor

    De'art$ent o Electrical and Electronics Engineering

    VIGNAN)S LARA INSTITUTE OF TEC*NOLOG+ , SCIENCE

    (Ailiated to -a.a&arlal Ne&r# Tec&nological Uni/ersit0% "a1inada

    Vadla$#di 2 344 456

    G#nt#r District% And&ra Prades&

    475584754!

  • 7/25/2019 Mrac Pid Documentation

    2/33

    VIGNAN)S LARA INSTITUTE OF TEC*NOLOG+ ,

    SCIENCE

    (Ailiated to -a.a&arlal Ne&r# Tec&nological Uni/ersit0% "a1inada

    Vadla$#di 2 344 456

    G#nt#r District% And&ra Prades&

    De'art$ent o Electrical and Electronics Engineering

    C E R T I F I C A T E

    This is to certify that this dissertation entitled as 6AUTOMATICTUNING OF PID CONTROLLER USING MODEL REFERENCE ADAPTIVE

    CONTROL9is the bonafide wor7 of8 B.sha8 /.Prana9i8 +.,anideep8 2.3arthi7 submitted to

    the Department of &lectrical and &lectronics &ngineering8 VIGNAN9S LARA INSTITUTE

    OF TEC*NOLOG+ AND SCIENCE in partial fulfillment of the requirements for the

    award of the Degree in Bachelor of Technology in &lectrical and &lectronics &ngineering.

    Project 2uide "ead of the Department

    2.R.!.-aga 3umar8 sst.Prof. &lectrical and &lectronics &ngineering

  • 7/25/2019 Mrac Pid Documentation

    3/33

    D E C L A R A T I O N

    :e8 the students of +ignan;s

  • 7/25/2019 Mrac Pid Documentation

    4/33

    AC"NO;LEDGEMENT

    :e would li7e to e=press our deep gratitude to our belo9ed director

    V!MAD*USUD*ANA RAO% for his cooperation in completing our project.

    :e found immense pleasure in e=pressing our gratitude and hearty things to

    A!N!VEN"ATES;ARLU%"ead of &lectrical and &lectronics &ngineering department for

    his timely help throughout the project schedule and the course of study.

    :e wouldli7e to e=press our sincere than7s to ourbelo9ed guide G!R!S!Naga

    "#$ar. for his acti9e participation and e=cellent guidance at e9ery stage and for highdynamic and moti9ate encouragement in successfully completing this project.

    Finally8 we e=press our sincere than7s to all the faculty and staff members and

    also another man who are directly or indirectly in9ol9ed and support in completing our

    project.

    B. !"

    /. PR-+I

    +. ,-ID&&P

    2. 3RT"I3

  • 7/25/2019 Mrac Pid Documentation

    5/33

    I-D&>

    bstract

  • 7/25/2019 Mrac Pid Documentation

    6/33

    0.(.( Auter loop

    0.0 ?omponents

    0.0.' Reference model

    0.0.( ?ontroller

    0.0.0 dapti9e mechanism

    0.4 ?onclusion

    ?"PT&R @ 4 PID ?A-TRA

  • 7/25/2019 Mrac Pid Documentation

    7/33

    1.1.' ,athematical analysis of D? motor

    1.C ?onclusion

    ?"PT&R @ C !I,5

  • 7/25/2019 Mrac Pid Documentation

    8/33

  • 7/25/2019 Mrac Pid Documentation

    9/33

  • 7/25/2019 Mrac Pid Documentation

    10/33

    B!TR?T

    This project discusses the application of ,odel Reference dapti9e ?ontrol concepts

    to the automatic tuning of PID controllers. The effecti9eness of the proposed method is

    shown through simulated applications. ,odel Reference dapti9e ?ontrol algorithm is

    proposed. This algorithm preser9es all the best features of ,R? such as

  • 7/25/2019 Mrac Pid Documentation

    11/33

  • 7/25/2019 Mrac Pid Documentation

    12/33

    n autotuning method is proposed using ,odel Reference dapti9e

    ?ontrol #,R?* concepts and the ,IT rule. ,any adapti9e control techniques can be used

    to pro9ide automatic tuning. In such applications the adaptation loop is simply switched for a

    period of time when tuning is required. Perturbation signals are normally added to impro9e

    parameter estimation. The adapti9e controller is run until the performance is satisfactoryH then

    the adaptation loop is disconnected8 and the system is left running with fi=ed controller

    parameters.

    '.1 ?A-?

  • 7/25/2019 Mrac Pid Documentation

    13/33

    I!TI-2 !K!T&,E

    The timeEhonoredGieglerE-ichols tuning rule #"Z-N rule"*8 as introduced in

    the '4$s8 had a large impact in ma7ing PID feedbac7 controls acceptable to controlengineers. PID was 7nown8 but applied only reluctantly because of stability concerns. :ith

    the GieglerE-ichols rule8 engineers finally had a practical and systematic way of tuning PID

    loops for impro9ed performance.

    (.0 DI!D+-T2&! AF &>I!TI-2 !K!T&,E

    The disad9antages of e=isting GieglerE-ichols method are as follows.

    http://www.mstarlabs.com/control/znrule.html#Ref2http://www.mstarlabs.com/control/znrule.html#Ref2http://www.mstarlabs.com/control/znrule.html#Ref2
  • 7/25/2019 Mrac Pid Documentation

    14/33

    '. Further fine tuning is needed.

    (. ?ontroller settings are aggressi9e8 resulting in large o9ershoot and oscillatory responses.

    0. Poor performance for processes with a dominant delay.

    4. ?losed loop 9ery sensiti9e to parameter 9ariations.

    1. Parameters of the step response may be hard to determine due to measurement noise

    (.4 PRAPA!&D !K!T&,E

    The adapti9e control process is one that continuously and automatically

    measures the dynamic beha9ior of plant8 compares it with the desired output and uses the

    difference to 9ary adjustable system parameters or to generate an actuating signal in such a

    way so that optimal performance can be maintained regardless of the system changes. The

    nature of the adaption mechanism for controlling the system performance is greatly affected

    by the 9alue of adaption gain. s compared to the fi=ed gain controllers8 the adapti9e

    controllers are 9ery effecti9e to handle the situations where the parameter 9ariations and

    en9ironmental changes are frequent.

    (.1 ?A-?

  • 7/25/2019 Mrac Pid Documentation

    15/33

    B

  • 7/25/2019 Mrac Pid Documentation

    16/33

    Controller

    ReferenceModel Adjustment

    MechanismPlant

    ControllerParam

    eters

    y

    m

    od

    el

    u y

    p

    l

    a

    n

    t

    u

    c

    Fig 0.' bloc7 diagram of ,R?

    0.0 ?A,PA-&-T!

    The 9arious bloc7s in the ,odel Reference dapti9e ?ontroller are

    '. Reference model

    (. ?ontroller

    0. daption mechanism

    0.0.'. Reference modelE

    It is used to specify the ideal response of the adapti9e control system to

    e=ternal command. It should reflect the performance specifications in control tas7s. The ideal

    beha9ior specified by the reference model should be achie9able for the adapti9e control

    system.

    0.0.(. ?ontrollerE

    It is usually parameteried by a number of adjustable parameters. The control

    law is linear in terms of the adjustable parameters #linear parameteriation*. dapti9e

    controller design normally requires linear parameteriation in order to obtain adaptation

    mechanism with guaranteed stability and trac7ing con9ergence. The 9alues of these control

    parameters are mainly dependent on adaptation gain which in turn changes the control

    algorithm of adaptation mechanism.

  • 7/25/2019 Mrac Pid Documentation

    17/33

    0.0.0 daptation mechanismE

    dapti9e control in9ol9es modifying the control law used by the controller tocope with the fact that the parameters of the system being controlled change drastically due to

    change in en9ironmental conditions or in system itself. This technique is based on the

    fundamental characteristic of adaptation of li9ing organism. The adapti9e control process is

    one that continuously and automatically measures the dynamic beha9ior of plant8 compares it

    with the desired output and uses the difference to 9ary adjustable system parameters or to

    generate an actuating signal in such a way so that optimal performance can be maintained

    regardless of system changes. -ature of adaptation mechanism for controlling the system

    performance is greatly affected by the 9alue of adaptation gain. It is obser9ed that for the

    lower order system wide range of adaptation gain can be used to study the performance of the

    system. s the order of the system increases the applicable range of adaptation gain becomes

    narrow. The rule which is used for this application is ,IT rule. !imulation is done in

    ,T

  • 7/25/2019 Mrac Pid Documentation

    18/33

    ?"PT&R E 4

    PID ?A-TRA

  • 7/25/2019 Mrac Pid Documentation

    19/33

    The integral term accelerates the mo9ement of the process towards setpoint and eliminates

    the residual steadyEstate error that occurs with a pure proportional controller. "owe9er8 since

    the integral term responds to accumulated errors from the past8 it can cause the present 9alue

    to o9ershootthe setpoint 9alue

    4.4 D&RI+TI+&

    The deri9ati9eof the process error is calculated by determining the slope of

    the error o9er time and multiplying this rate of change by the deri9ati9e gain Kd. The

    magnitude of the contribution of the deri9ati9e term to the o9erall control action is termed the

    deri9ati9e gain8Kd. The deri9ati9e term is gi9en by

    The deri9ati9e term slows the rate of change of the controller output. Deri9ati9e control

    is used to reduce the magnitude of the o9ershoot produced by the integral component and

    impro9e the combined controllerEprocess stability. "owe9er8 the deri9ati9e term slows

    the transient responseof the controller. lso8 differentiation of a signal amplifies noise

    and thus this term in the controller is highly sensiti9e to noise in the error term8 and can

    cause a process to become unstable if the noise and the deri9ati9e gain are sufficientlylarge.

    4.1 PID ?A-TRA

  • 7/25/2019 Mrac Pid Documentation

    20/33

    change. The weighted sum of these three actions is used to adjust the process 9ia a control

    element such as the position of acontrol 9al9e8 or the power supplied to a heating element.

    Fig 4.' bloc7 diagram of PID controller

    The mathematical equation for the PID controller is gi9en is

    u ( t)=Kpep ( t)+Ki ei (T) dT+Kd(ded ( t)

    dt )In the absence of 7nowledge of the underlying process8 a PID controller is the best controller.

    By tuning the three parameters in the PID controller algorithm8 the controller can pro9ide

    control action designed for specific process requirements. The response of the controller can

    be described in terms of the responsi9eness of the controller to an error8 the degree to which

    the controller o9ershootsthe setpoint and the degree of system oscillation.

    4.C ?A-?

  • 7/25/2019 Mrac Pid Documentation

    21/33

    !P&&D ?A-TRA< AF D? ,ATAR

    1.' I-TRAD5?TIA-

    This chapter gi9es the information about the mathematical analysis of the ,IT

    rule8 tuning of the PID controller and the modeling of the D? motor

    1.( ,T"&,TI?< -K!I!E

    The idea behind the ,odel Reference dapti9e ?ontrol is to create a closed

    loop controller with parameters that can be updated to change the response of the system to

    match a desired model. There are many different methods for designing such a controller.

    :hen designing an ,R? using the ,IT rule8 the designer chooses

    The reference model8 the controller structure and the tuning gains for the

    adjustment mechanism.

    1.(.' ,IT ruleE

    modelplant yye =

    ,R? begins by defining the trac7ing error8 e. This is

    simply the difference between the plant output and the reference model output.

    ,athematically it is defined as

    :here e M trac7ing error8

    yplant M output of the plant

    ymodelM output of the model

    *#(

    '*# ( eJ =

    From this error a cost function of theta #/#theta** can be formed. / is gi9en as a

    function of theta8 with theta being the parameter that will be adapted inside the controller. The

  • 7/25/2019 Mrac Pid Documentation

    22/33

    choice of cost function will later determine how the parameters are updated. Below8 a typical

    cost function is ta7en.

    To find out how to update the parameter theta8 an equation needs to be formed for the change

    in theta. If the goal is to minimie the cost related to error8 it is sensible to mo9e in the

    direction of the negati9e gradient of /. The change in / is assumed to be proportional to the

    change in theta. Thus8 the deri9ati9e of theta is equal to the negati9e change in /. The result

    for the cost function chosen abo9e is gi9en as

  • 7/25/2019 Mrac Pid Documentation

    23/33

    :here u#t*M input of the plant

    7p M proportional constant

    7i M integral constant

    7dM deri9ati9e constant

    uc M input to the controller

    The transfer function of the closed loop plant along with the controller is gi9en by

    The transfer function of the reference plant is gi9en by

    The error is the difference between the plant output and the reference model output which is

    defined mathematically as

    :here e M error

    y M output of the plant

    ymM output of the model

    The parameters of the controller which are to be tuned are

    1.4 DPTI+& ,&?"-I!,E

    The ,IT rule is a gradient scheme that aims to minimie the squared error e (

    The updated PID controller parameters

  • 7/25/2019 Mrac Pid Documentation

    24/33

    1.1 ,AD&

  • 7/25/2019 Mrac Pid Documentation

    25/33

    +aM input 9oltage in 9olts

    &bM bac7 emf in 9olts

    T M torque in -Em

    If M field current in amperes

    / M moment of inertia in

    b M damping friction

    1.1.' ,athematical nalysisE

    For normal operation8 the de9eloped torque must be equal to the friction and the inertia. Theequation for the de9eloped torque is gi9en by

    The armature circuit8

    The bac7 emf is gi9en by

    The torque de9eloped by the motor is

  • 7/25/2019 Mrac Pid Documentation

    26/33

    The 9arious parameters and their 9alues of the gi9en D? motor is as follows.

    Parameter !ymbol +alue

    rmature Resistance Ra $.C

    rmature Inductance

  • 7/25/2019 Mrac Pid Documentation

    27/33

    ?"PT&R E C

    !I,5

  • 7/25/2019 Mrac Pid Documentation

    28/33

    Fig C.' !imulation diagram of PID controller

    C.0 R&!5

  • 7/25/2019 Mrac Pid Documentation

    29/33

    0 50 100 150 200 250 300 350 400

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    TIME (Sec)

    Amplitude

    MRAC PID CONTROLLER FOR SQUARE INPUT

    Plant output

    Referene output

    Fig C.( Autput of PID controller for square wa9e input

    The 9ariation of the different parameters #3p8 3i8 3d* for the square wa9e input is gi9en as

  • 7/25/2019 Mrac Pid Documentation

    30/33

    0 100 200 300 400 500 600 700 800 900 1000-1

    -0.5

    0

    0.5

    Kp

    Parameter variations of Square wave input

    0 100 200 300 400 500 600 700 800 900 1000-2

    -1

    0

    Ki

    Kp

    0 100 200 300 400 500 600 700 800 900 1000-5

    0

    5x 10

    -3

    Time (sec)

    Kd

    Kd

    Ki

    Fig C.0 Autput of 9arious parameters#7p8 7i8 7d*

  • 7/25/2019 Mrac Pid Documentation

    31/33

    The 9ariation of different parameters for the sinusoidal input is gi9en by

    0 10 20 30 40 50 60 70 80 90 100-1

    -0.8

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    MRAC PID Controller for Sinusoidal Input

    Time (Sec)

    Amplitude

    Reference Output

    Plant output

    Fig 6.4 Out put of PID controller for sine a!e input

  • 7/25/2019 Mrac Pid Documentation

    32/33

    "he !ariation of di#erent parameters for s$uare a!e input is gi!en as%

    0 10 20 30 40 50 60 70 80 90 100-1

    0

    1

    Parameter variations for sinusoidal input

    Kp

    0 10 20 30 40 50 60 70 80 90 100-2

    -1

    0

    Ki

    0 10 20 30 40 50 60 70 80 90 100-5

    0

    5x 10

    -3

    Time (Sec)

    Kd

    Kp

    Ki

    Kd

    Fig 6.& Autput of 9arious parameters#7p8 7i8 7d*

    6.4 CO'C()*IO'%+

    In this chapter the simulation diagram and the results for 9arious parameters

    are shown.

    C,AP"-R /

    CO'C()*IO'

  • 7/25/2019 Mrac Pid Documentation

    33/33

    The automatic tuning of PID controllers has been in9estigated using

    ,odel Reference dapti9e ?ontrol concepts and the ,IT rule. !imple adaptation laws for the

    controller parameters ha9e been presented assuming that the process under control can be

    appro=imated by a first order transfer function. The de9eloped adaptation rules ha9e been

    applied to a first order system with a second order reference model. Furthermore8 the

    proposed technique has been applied to a simulated D? motor8 which has nonElinear

    dynamics. The results obtained show the effecti9eness of the technique. The resulting

    performance could be impro9ed by a better choice of the length of the adaptation period. The

    ,IT rule is 7nown to ha9e its disad9antages. First8 the speed of adaptation depends on the

    9alues of the command signal. This problem is often dealt with by using a normalied

    adaptation rule. !econd8 the ,IT rule does not guarantee the stability of the nominal system.

    The