2006_PID_ACE06

Embed Size (px)

Citation preview

  • 8/7/2019 2006_PID_ACE06

    1/6

    PID CONTROL DESIGN WITH GUARANTEED STABILITY

    F. Morilla+, F. Vzquez*, R. Hernndez+

    + Dpto de Informtica y Automtica, UNED, C/. Juan del Rosal 16, 28040 Madrid,

    Spain. Phone:34-91-3987156. E-mails: [email protected], [email protected]

    * Dept. de Informtica y Anlisis Numrico, Universidad de Crdoba, Campus de

    Rabanales, 14071 Crdoba, Spain. Phone:34-957-218729. E-mail: [email protected]

    Abstract: This paper presents a Matlab GUI to design PID controllers with guaranteedstability. The GUI shows the stability region in the respective parameter plane KP-KI orKP-KD and the boundary curves for frequency response requirements (phase margin,gain margin, maximum sensitivity and maximum complementary sensitivity).Combining several requirements the tool splits the stability region into zones and theuser can explore them in order to tune the controller satisfying those requirements. TheGUI can be also used in lectures about stability, robust PID control, PID design in thefrequency domain, PID Loop Shaping, and it can be very useful for students to get

    insight into tuning PID controllers. Copyright 2006 IFAC.

    Keywords: computer aided design, PID control, robust control.

    1. INTRODUCTION

    In the last years some special design methods for PIDcontrollers based on loop shaping have been

    proposed. They can be used for any arbitrary orderirrational or non-minimun phase transfer functionswith dead-time (strm and Hgglund, 2005; echand Schlegel, 2005; Dormido and Morilla, 2004;Morilla and Dormido, 2000). These methods userobustness conditions, expressed in terms ofmaximum sensitivity Ms and maximumcomplementary sensitivity Mt, or stability marginsexpressed in terms of phase margin m and gainmargin Am. These requirements involve that theNyquist curve of the loop transfer function shouldavoid the respective Ms or Mt circle, it shouldintersect the third or fourth quadrant of the unit circle

    or it should intersect the negative real axis far awayfrom the critical point -1, as Figure 1 shows.

    Imag

    Real

    -1

    sM

    1

    mA

    1

    L(j)

    cp

    cgs

    mt

    Unit circle

    Ms circle

    Mt circle

    1-M

    M-

    2t

    2t

    1-M

    M2t

    t

    Fig. 1. Example of Nyquist plot of the loop transferfunction L(s) and its features.

  • 8/7/2019 2006_PID_ACE06

    2/6

    These requirements give a set of admissible values ofthe controller parameters, describing the boundariesof robustness region in the parameter plane KP-KI orKP-KD of the PID controller (Shafiei and Shenton,1997; Schlegel and Mertl, 2004). Most of thesemethods consider only positive control gains andcannot guarantee the stability of the closed loop

    system. Neither they cannot assure that the frequencyresponse have the requirements specified.

    The main aim of this paper is to show how the PIDcontroller can be designed based on frequencyresponse requirements assuring stability of the closedloop system. In Section 2, the stability regions forfive types of PID controllers are presented. Theboundary curves for frequency response requirementsare given in Section 3. The PID graphic userinterface that put in practice these methodologies isdescribed in Section 4. Conclusions are presented inSection 5.

    2. STABILITY REGIONS

    As it is well known, stability is a primaryrequirement on a feedback system. Therefore,dealing with PID control it is important to know theset of controller parameters (it will be called thestability region) so that given a point of this regionthe closed loop system is stable. Moreover, it turnsout that much insight into PID control can beobtained by analyzing the stability regions (strmand Hgglund, 2000).

    Consider the feedback control system shown inFigure 2, in which the process to be controlled isdescribed by the transfer function

    A(s)

    B(s)P(s) = (1)

    Let the controller C(s) of the PID type:

    sKs

    KKC(s) D

    IP ++= (2)

    where KP, KI, KD, are the proportional, integral andderivative gains of the controller, respectively. The

    characteristic equation of the closed-loop system isgiven by

    f(s; KP, KI, KD) = s A(s) + s2 KD B(s) +

    + s KP B(s) + KI B(s) = 0 (3)

    C(s) P(s)

    R(s) U(s) Y(s)

    +-

    +

    +

    D(s)

    E(s)

    Fig. 2. Feedback control system.

    The stability region of this family is a subset of R3because there are three parameters. When A(s) andB(s) are polynomials the characteristic equation (3) isa family of polynomials called polytope ofpolynomials (Barmish, 1988) and, as it is wellknown, it can be formed by several disjoint sets.

    In order to obtain stability regions for polytopessome results can be found. The most relevant anduseful was shown by Ackermann (Ackermann,1980). This result allows obtain the stability region interms of the parametric space, so that necessary andsufficient conditions can be established and thestability region can be calculated in the plane with alow computational cost. With three parameters, asweeping along one of them is necessary, growingthe computational cost.

    However, there are many other applications. So, itcan be used to calculate the maximum stability boxor the stability region for predictive controllers with

    two parameters (Maoso, 1996).

    In order to design PID controllers with guaranteedstability this paper considers the five R2 (plane)particular cases, shown in Table 1 joint with theircharacteristic equation:

    PI, when KD = 0.

    PD, when KI = 0.

    PID, when the ratio between the derivative andintegral time constants =TD/ TI is fixed, Note

    that this is equivalent to fixI

    2P

    D

    K

    KK =

    PIDKD, when KD is fixed.

    PIDKI, when KI is fixed.

    Table 1: Stability regions on the parameter plane

    Control Plane Characteristic equationPI KP-KI fPI(s; KP, KI) = s A(s) + s KP B(s)

    + KI B(s) = 0

    PD KP-KD fPD(s; KP, KD) = A(s) + s KD B(s)+ KP B(s) = 0

    PID KP-KI f(s; KP, KI) = s KI A(s) + s2

    KP2

    B(s) + s KP KI B(s) + KI2 B(s)

    = 0

    PIDKD KP-KI fKD(s; KP, KI) = s AD(s) + s KPBD(s) + KI BD(s) = 0

    PIDKI KP-KD fKI(s; KP, KD) = AI(s) + s KD BI(s)+ KP BI(s) = 0

    where:AD(s) = A(s) + s KD B(s) and BD(s) = B(s)AI(s) = s A(s) + KI B(s) and BI(s) = s B(s)

    The notation used in Table 1 allows that the PIDKDcontrol includes the PI control as a particular casewhen KD=0, and the PIDKI control includes the PD

    control as a particular case when KI=0. In order to dothis, it must be noted that the contribution of the

  • 8/7/2019 2006_PID_ACE06

    3/6

    control parameters, KD and KI respectively, areinvolved into the process transfer function.

    Figure 3 shows two examples of stability regions fora non minimum phase process describe by thetransfer function

    ( )( )( )( ) 50s65s16s20s10-

    10s5s1s

    2s10-P(s) 23 +++

    +=+++

    = (4)

    Fig. 3. Stability region of the non minimum phaseprocess (4). (a) With PI control. (b) With PIDcontrol, using the ratio proposed by Ziegler andNichols =0.25.

    The process transfer function in equation (1) does notinclude dead-time in order to determine the stabilityregions accurately.

    3. BOUNDARY CURVES

    In this paper, the four requirements depicted inFigure 1 are considered. As it is well known, theseperformances could be reached by loop shaping,doing that the target point B lies on the Nyquist plotL(j)=C(j)P(j) (strm and Hgglund, 2005;Dormido and Morilla, 2004). Table 2 gives the targetpoints B corresponding to the four requirements,where rB and B are the magnitude and the phase ofpoint B with respect to the origin and to the negativereal axis. R and c are the centre and the radius of the

    respective circle. is the angle where the Nyquistplot contacts the respective circle.

    These requirements give a subset of R3, all possibletrios of gains (KP, KI, KD) verifying the expressions

    ( )( )r

    )(-cosrK BBP

    = (5)

    ( )( )r )(-sinrK-KBBI

    D = (6)

    where r() and () are the magnitude and the phaseof P(j) with respect to the origin and to the negativereal axis. Thus, one point A (r(d),(d)) of theprocess Nyquist plot

    ( ) ( ) ( ) erjP 180)-(j = (7)

    is mapping to the target point B (rB ,B) of the loopNyquist plot

    ( ) ( ) ( )

    ( )jPKj

    KjK

    jPjCjL

    DI

    P

    +=

    ==(8)

    where d is called the design frequency.

    Table 2 : Target points for the four requirements

    Requirement Target point

    PM (m) 1r; BmB ==

    GM (Am)m

    BB A1r;0 ==

    Ms (Ms,)

    c = -1

    sM

    1R=

    cosR-c-

    sinRatanB =

    Mt (Mt,)

    1-M

    M-c

    2t

    2t=

    1-M

    MR

    2t

    t=

    BB sen

    sinRr

    =

    The expressions (5) and (6) have been particularizedin Table 3 when additional conditions, mentioned insection 2 are imposed to the controller gains. In thisway a subset of admissible values of the controllerparameters can be shown as a boundary curve, in therespective parameter plane KP-KI or KP-KD,. Thesecond row of Table 2 includes the PI control as

    particular case when KD=0, and the third rowincludes the PD control as particular case when KI=0.

    KP-3 -2 -1 0 1 2 3 4 5 6 7

    0

    1

    2

    3

    4

    5

    6

    7

    8

    9

    KI

    -3 -2 -1 0 1 2 3 4 5 6 70

    1

    2

    3

    4

    5

    6

    7

    8

    9

    KP

    KI

  • 8/7/2019 2006_PID_ACE06

    4/6

    Even using a reduced range of frequencies, it is usualthat only a bit of the boundary curve lies inside thecorresponding stability region. Only this bit of theboundary curve is interesting for find the controlparameters. The Figure 4 shows an example ofboundary curve obtained for the phase marginm=60. This curve splits the stability region into two

    zones: I (m > 60) and II (m < 60).

    With these information is easy to tune the controller.A point of the boundary curve could be select to getm=60, a point of the zone I to get m>60 or a pointof the zone II to get m4) and II (Am

  • 8/7/2019 2006_PID_ACE06

    5/6

    When the requirements Ms and Mt are used, it issuitable to determine the boundary curve for a rangeof , for example between 5 and 45, instead of asingle value. Moreover the tangent condition in thetarget point must be verified (Dormido and Morilla,2004). This condition is summarized in the following

    expression:

    ( ) ( ) ( )( ) 0sinrcosrcrr B'BBB'B'BB =+ (9)

    where rB() and B() represent the value of thederivative of the magnitude and phase of L(j) inthe point B respectively.

    Therefore obtaining the boundary curves for Ms andMt need more calculations than the curves form andAm. The Figure 7 is an example where two boundarycurves for maxima of sensitivity split the stabilityregion into three zones:

    I - Ms 1.8 Mt 1.6II - Ms 1.8 Mt 1.6III - Ms 1.8 Mt 1.6

    Fig. 8. Stability region and boundary curves for PIDcontrol of the non minimum phase process (4). With=0.1, Ms=1.8, and Mt=1.6.

    4. THE PID GUI

    A PID graphic user interface (GUI) has beendeveloped in Matlab. The main window is shown inFigure 9. It is designed to provide simultaneouslyenough information (the stability region, theboundary curves, the time and frequency responses)and to update it quickly when the user makes changesin the interface.

    The transfer function without dead-time (numeratorand denominator) describing the process is on theupper left corner. A pop-up menu with the five kindsof designs (PI, PD, PID, PIDKD and PIDKI) is onthe upper left corner. The radio-buttons for select the

    design requirements are on the middle. Therequirements are given by single values or by rangebetween two values in four edit fields.

    The most valuable information is shown in theparameter plane, KP-KI or KP-KD depending on thechosen design. The set of yellow lines delimit thestability region, the user can to hide it or to display itusing the radio-button on top of the parameter plane.The red, blue, green and cyan points representboundary curves for phase margin, gain margin,

    maximum sensitivity and maximum complementarysensitivity respectively. To hide or to display thesecurves the user must use the requirements radio-buttons.

    A black point can be dragged with the mouse insidethe parameter plane in order to test different controlgains. When this point is released; the three editfields show the control gains (KP, KI and KD), theNyquist plot and the frequency response features areupdated. A new simulation is also performed and thenew time closed loop response is added to thegraphics.

    In Figure 9 a PID controller with =0.1 has beentuned for the non minimum phase process (4). Fourboundary curves has been calculated for single valuesof the specifications (m = 60, Am = 3, Ms = 1.8, Mt= 1.6) and five values of between 10 and 40. Theblack point has been dragged to the zone where m