interactive learning module pid ctrl

Upload: hazelena

Post on 29-Oct-2015

57 views

Category:

Documents


0 download

DESCRIPTION

PID control method, electronics, research

TRANSCRIPT

  • Interactive Learning Modules for PID ControlUsing Interactive Graphics to Learn PID Control and Develop IntuitionJOS LUIS GUZMAN, KARL JOHAN STRM, SEBASTIAN DORMIDO, TORE HGGLUND, MANUEL BERENGUEL, and YVES PIGUET

    L E C T U R E N O T E S

    118 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008 1066-033X/08/$25.002008IEEE

    Interactive tools can be used to complement books andlectures [1][4]. This article describes three interactivelearning modules that are designed to develop intuitionas well as a working knowledge of proportional-integral-derivative (PID) control. These three modules comprise apackage called interactive learning modules for PID (ILM-PID). By illustrating concepts such as tuning, robustness,loop shaping, and antiwindup, ILM-PID can be used fordemonstrations, exercises, and self-study.

    The main objective of the interactive modules is toexplain basic concepts of PID control without consideringimplementation aspects. Although most PID controllersare implemented as sampled-data control systems, analy-sis and design are traditionally performed in continuoustime assuming that the sampling rate for subsequent digi-tal implementation is sufficiently fast. Implementationissues, such as aliasing, selection of the sampling time, sig-nal prefiltering, influence of the discretization algorithms,and bumpless parameter changes, may be the aim of afuture interactive modules focused on implementationaspects for PID control.

    The modules of ILM-PID have menus for selectingprocess transfer functions and controller structures. Inaddition, parameters can be set, and results can be storedand loaded. A graphic display of time and frequencyresponses is a central part. The plots can be manipulateddirectly by dragging points and lines and by using sliders.Parameters that characterize performance and robustnessare displayed. Each module has two icons called Instruc-tions and Theory. Instructions provides access to a docu-ment that contains suggestions for exercises, while Theoryprovides access to relevant theory by means of the Inter-net. The modules are implemented in Sysquake [5], a Mat-lab-like language with fast execution and capabilities forinteractive graphics.

    The following sections describe three modules thatillustrate closed-loop fundamentals (PID Basics), loop-shaping design (PID Loop Shaping), and integratorwindup (PID Windup). Readers are encouraged to visitthe Web site [6] to experience the interactive features ofILM-PID. The modules are available for Windows, Mac,

    and Linux operating systems and can be freely down-loaded from the Sysquake Web site [7] as described inDownloading and Using ILM-PID.

    PID BASICSThe module PID Basics is designed to explore the proper-ties of a simple feedback loop by showing the time and fre-quency responses of a closed-loop system anddemonstrating how these responses are influenced by thechoice of controller parameters.

    A block diagram of a basic feedback loop is shown inFigure 1, where P and C are the process and controllertransfer functions, respectively, and F is the filter transferfunction for the setpoint. The system has three inputs rep-resenting the setpoint ysp, the load disturbance d, and themeasurement noise n. It is assumed that the load distur-bance acts at the process input and that the measurementnoise acts at the process output. The controller mustreduce the effect of the load disturbance and make theprocess variable x follow the setpoint ysp, while not inject-ing too much measurement noise. In addition, the closed-loop system must be insensitive to variations in theprocess dynamics.

    At least three signals are of interest, namely, the processoutput signal x, the measured output signal y, and the con-trol signal u. Tracing signals in the block diagram in Figure1 gives the relations

    X = PCF1 + PC Ysp +

    P1 + PC D

    PC1 + PC N

    = FTYsp + PSD TN, (1)

    Y = PCF1 + PC Ysp +

    P1 + PC D +

    11 + PC N

    = PCFYsp + PSD + SN, (2)

    U = CF1 + PC Ysp

    PC1 + PC D

    C1 + PC N

    = CFSYsp TD CSN, (3)

    where capital letters denote Laplace transforms of the cor-responding time functions, S = 1/(1 + PC) is the sensitivi-ty function, and T = PC/(1 + PC ) is the complementarysensitivity function. Notice that the input-output relationsare completely characterized by the six distinct transferDigital Object Identifier 10.1109/MCS.2008.927332

  • functions in (1)(3). These transfer functions are called thegang of six in [8]. To analyze the closed-loop system it isnecessary to consider all six transfer functions.

    The time responses of the six transfer functions areillustrated by showing the response of the process outputand control signals to a step in the setpoint, a step in theload disturbance, and wideband measurement noise, asillustrated in Figure 2. A mix of time and frequencyresponses can also be displayed.

    Process models in the form of rational transfer func-tions with a time delay can be chosen from a menu thatprovides a collection of transfer functions. An arbitrarytransfer function can also be entered using the standardMatlab format. The process gain and time delay can bechanged interactively using sliders. The PID controller hasthe structure

    U = K(

    bYsp Y + 1sTi(Ysp Y) sTd1 + sTd/Nd

    Y)

    ,

    where K is the proportional gain, Ti is the integral time, Tdis the derivative time, Nd is a parameter of the derivativeterm, and b is the setpoint weight.

    FIGURE 1 Basic feedback loop having two degrees of freedom. Pand C are the process and controller transfer functions, respective-ly, and F is the filter transfer function on the setpoint. The variableysp is the setpoint, e is the tracking error, u is the controller output, dis the load disturbance, x is the process variable, n is the measure-ment noise, y is the measured output signal, and v is the controlleroutput corrupted by the load disturbance d.

    uP CF

    xe yysp

    d n

    ProcessController1

    OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 119

    Downloading and Using ILM-PID

    Interactivity, which is the main feature of the tools described in this work, is difficult to explain in written text. The best way to appreciate thetools is to use them. We strongly recommend that the reader download and use them in parallel with reading this article. Executable ver-sions for PC, Mac, and Linux are freely available for download from the Calerga Web site [7]. No licenses are required, and the executablemodules can be freely distributed to students and colleagues.

  • 120 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

    The Interactive ToolThe main screen of the tool is shown in Figure 3. Theprocess is characterized by the parameter group locatedon the left-hand side of the screen, just below the icons(see Figure 3). The process is shown symbolically togetherwith several interactive elements for changing the repre-sentative parameters of the process. The transfer functionin Figure 3 is

    G(s) = Kp(s + 1)n ,

    where the gain Kp and order n are the interactive elements,with numerical values Kp = 1 and n = 4.

    When the user modifies any plant parameter, the sym-bolic representation of the process transfer function isimmediately updated, and its effect is reflected on theremaining graphic elements.

    Five buttons are available for selecting the desired con-troller. The buttons correspond to proportional (P), inte-gral (I), proportional-integral (PI), proportional-derivative(PD), and proportional-integral-derivative (PID). Severalsliders are available below the radio buttons for modifyingthe controller parameters. The number of sliders showndepends on the chosen controller. For instance, Figure 3shows five sliders since the PID controller is selected.

    Performance and Robustness InformationParameters that characterize performance and robustnessare also displayed on the screen. The performance criteriaare based on the setpoint response, the load disturbanceresponse, and the noise response. The setpoint response ischaracterized by the integral absolute error (IAE) and the

    overshoot (overshoot). The load disturbance response ischaracterized by the integral absolute error (IAE), the inte-gral gain ki = K/Ti (ki), the maximal error (emax), and thetime to reach the maximum (tmax). The integral absoluteerrors and the maximal error values are normalized to unitstep changes in setpoint and load disturbances. Theresponse to measurement noise is characterized by thestandard deviations of the process variable x (sigma_x),measured output y (sigma_y), and control signal u(sigma_u). The robustness measures are maximal sensitivi-ty (Ms), maximal complementary sensitivity (Mt), gainmargin (Gm), and phase margin (Pm). This informationcan be duplicated to compare two designs, as shownbelow. A more detailed description of these measures canbe found in [8].

    GraphicsTwo graphics are shown on the right-hand side of the tool(Figure 3). Three representation modes can be selectedfrom the Settings menu. These modes are time domain,frequency domain, and frequency/time domain.

    The time domain mode is shown in Figure 3, where thetime responses for the system output (Process Output) andinput (Controller Output) are displayed. The initial part ofthe plots (0 < t < 30) shows the response to a step changein the setpoint represented by the transfer functions FTand CFS in (1)(3). The middle portions of the plots(30 < t < 60) show the response to a step in the load dis-turbance represented by the transfer functions PS and T in(1)(3). The last portions of the plots (t > 60) show theresponse to wideband measurement noise, which is repre-sented by the transfer functions S and CS in (1)(3).

    Several elements on the graphics are available for inter-acting with the application. The vertical green line at time

    FIGURE 3 The user interface of the module PID Basics. The plotsshow the time response of the transfer functions in (1)(3) [8]. Sev-eral graphical elements, shown on the same screen, are used tointeractively analyze feedback fundamentals using PID control. Thisexample provides a comparison between PI (blue) and PID (red)controllers.

    FIGURE 2 Control system responses illustrating basic feedback sys-tem properties. To analyze the feedback loop, it is essential to con-sider six responses. These responses, which are referred to as thegang of six [8], are described by transfer functions in (1)(3). Oneway to present this information is to show the process output y andthe controller output u for step commands in setpoint and load distur-bances, as well as the response to sensor noise, as shown here.

    0 10 20 30 40 50 60

    0 10 20 30 40 50 60

    0

    0.5

    1

    1.5

    y

    0.50

    0.51

    1.52

    u

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 121

    t = 0 allows the setpoint amplitude to be modified. Thegreen and black vertical lines located in the middle of thegraphics allow setting the value and time instant for loaddisturbances and measurement noise, respectively. The ver-tical and horizontal scales can be changed using the blacktriangles (, ) available in the graphics. For instance, inFigure 3, the setpoint is set to one, the load disturbance isset to 0.9 at t = 32, and the measurement noise is set to 0.02at t = 60. It is also possible to find the value for the input oroutput signal at a specific time by placing the mouse overthe curve. Figure 3 shows an example in which, at the timeinstant t = 37.78, the output and input signals are 1.62 and0.38, respectively. All of these options are available in bothgraphics, that is, Process Output and Controller Output.

    The checkboxes save and delete above the ProcessOutput graphic provide the ability to store a simulation forcomparison. When the save button is selected, the currentdesign is frozen and displayed in blue, and a new designin red appears, allowing the two designs to be compared.Performance and robustness parameters are duplicated,displaying the values in blue and red colors associatedwith each design. The Process Output and ControllerOutput graphics indicate the values of the controller para-meters for both designs. Figure 3 presents an example that

    compares the response of PI (K = 0.43, Ti = 2.27, b = 0)and PID (K = 1.13, Ti = 3.36, Td = 1.21, b = 0.54, Nd = 10)controllers. Although the PID controller provides a betterresponse to load disturbances by reacting faster, the noisealso generates more control action. The delete option canbe selected to remove a design. If the transfer function ofthe process or an input signal such as a setpoint, load dis-turbance, and measurement noise are altered, both sets ofresults are affected simultaneously. Only two designs arestored to keep the user interface simple.

    Additional options for the time-domain mode areshown above the Controller Output graphic. These optionsshow the proportional (P), integral (I), and derivative (D)signals of the controller.

    The frequency domain mode is shown in Figure 4.When this mode is selected from the Settings menu, theleft side of the tool remains unchanged. However, in thiscase the time responses are replaced by the magnitude andphase plots Transfer Function Magnitude and TransferFunction Phase. The vertical and horizontal scales can beinteractively modified in the same way as in the timedomain. The magnitude and phase for a specific frequencycan be found by placing the mouse over the signals asshown in Figure 4(a).

    FIGURE 4 Time- and frequency-domain analysis using the interactive tool. (a) Frequency domain. The graphical part of PID Basics is shownfor the frequency-domain mode, where the Transfer Function Magnitude and the Transfer Function Phase graphics are displayed. In thismode the user can study the transfer functions in (1)(3) in the frequency domain using checkboxes placed above the Transfer FunctionMagnitude graphic. (b) Time and frequency responses, simultaneously. Above the graphics, the two buttons let the user choose betweenthe output or input for the time domain, and magnitude or phase for the frequency domain.

    y

    y

    10

    0.01

    200

    0

    200

    0.1

    Transfer Function Phase

    Sn(w) = 3.46

    10 Frequency

    0.1(a) (b)

    10 Frequency

    Transfer FunctionMagnitude S T PS CS FT FCS L

    STSdSnFT

    LFSn

    STSdSnFT

    LFSn

    y10

    0.01

    y

    1

    0

    0 20 40 60 Time

    0.1 10 Frequency

    Transfer FunctionMagnitude

    Process Output

    SPhase T PS CS FT FCS LMag

    Process InputProcess Output

    STSdSnFT

    LFSn

  • The frequency response for the gang of six transferfunctions and the open-loop transfer functionL(i) = P(i)C(i) can be shown in the graphics usingcheckboxes placed above the Transfer Function Magnitudegraphic. In Figure 4(a), all transfer functions are displayed.

    Time and frequency responses can be shown simulta-neously, as illustrated in Figure 4(b). The upper part rep-resents the time responses, while the lower part showsthe frequency responses. The default screen shows theoutput and the magnitude for the time and frequencydomains, respectively. Above the graphics, the two but-tons let the user choose between the output or input forthe time domain and magnitude or phase for the frequen-cy domain. This mode is useful since it is possible to viewthe effect of parameter modifications on both domainssimultaneously.

    Settings MenuThe Settings menu of PID Basics is divided into sixgroups. Arbitrary transfer functions can be selected usingthe first entry, Process Transfer Function. The numeratorand denominator are introduced using a Matlab form.

    Specific values for controller parameters can be enteredusing the Controller Parameters menu. Time and frequen-cy responses can be selected from the third entry,Time/Frequency Domain, which has the options TimeDomain, Frequency Domain, and Both Domains. Theresults can be stored and recalled using the Load/Savemenu, which has the options Save Design and LoadDesign. All data on the screen can be saved using theoption Save Report. From the menu selection Simulationthe user can modify the simulation time, change the maxi-mal time delay to avoid slow simulations, and activate theSweep option to show the results for several controllerparameters simultaneously. Parameters are swept betweenspecified limits. This option is available only in the time-domain mode. When active, new radio buttons appear inthe controller-parameters zone to permit the selection ofthe desired parameter to be swept. The last menu option,Examples Advanced PID Book, loads examples from [8],which the user can explore by modifying parameters.

    Analysis and Control Design for Load DisturbancesLoad disturbances are typically low-frequency signals thatdrive the system away from its desired behavior. The

    FIGURE 6 Frequency-domain interpretation of the load-disturbanceresponse. Figure 5 shows that high values of the integral gain kiprovide better response to load disturbances. Although this rule istrue, it must be used carefully. The frequency-domain responses ofGyd and S for two PI controllers with (a) ki = 0.85 and (b)ki = 0.30, respectively. As can be seen, large values of ki implylarge peaks of the sensitivity function S = 1/(1 + PC). Therefore, atradeoff occurs between load disturbance rejection and robustness.

    (a)S

    y

    y

    10

    Transfer Function Magnitude FCS L

    0.1

    0.1(b)

    10 Frequency

    10

    0.1

    0.1 10 Frequency

    FTCST PS

    STransfer Function Magnitude FCS LFTCST PSSSd

    SSd

    FIGURE 5 Load-disturbance response and influence of the integralgain ki . For a system with P(0) = 0 and a controller with integralaction, the low-frequency approximation is Gyd sP(0)/ki , whereki = K/Ti is the integral gain. For load disturbances with low-fre-quency content, the integral gain ki is a measure of load-distur-bance attenuation. The (a) process outputs and (b) control signalsto load disturbances, respectively, are shown for two PI controllerswith ki values of 0.36 (in red) and 0.30 (in blue). The controller withlarger integral gain provides a faster response to load disturbances.

    K =0.83 Ti=2.29 b=1K =0.6 Ti=2 b=1

    y

    0.5

    Process Output Graphics: Save Delete

    0

    0 20(a)

    40 Time

    u

    0

    Controller Output P I

    1

    0 20(b)

    40 Time

    K =0.83 Ti=2.29 b=1K =0.6 Ti=2 b=1

    122 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 123

    response to load disturbances is a key issue in process con-trol, since most controllers attempt to keep process vari-ables close to desired setpoints [9]. The following exampleshows the effects of load disturbances and the influence ofthe controller parameters. The setpoint and noise ampli-tudes are set to zero, and the load disturbance is set to 0.9at t = 0. The process transfer function is given byG(s) = (s + 1)4 . The response of theprocess variable to load disturbancesis given by the transfer function

    Gyd =P

    1 + PC = PS =TC

    .

    If P(0) = 0 and the controller hasintegral action, then the low-frequen-cy approximation is Gyd sP(0)/ki ,where ki = K/Ti is the integral gain.For load disturbances with low-fre-quency content, the integral gain ki isa measure of load-disturbance atten-uation. Figure 5 shows the load-disturbance responses for two PIcontrollers with ki given by 0.36 (inred) and 0.30 (in blue). Although thecontroller with larger integral gainprovides faster response and smallervalues for IAE and emax to load dis-turbances, the stability margins arereduced. Figure 6 shows the frequen-cy responses of Gyd and S for two PIcontrollers with large and small val-ues of ki (0.85 and 0.30, respectively).This figure reflects that large valuesof ki imply large peaks of the sensi-tivity function. Therefore, a tradeoffbecomes necessary between load-dis-turbance rejection and robustness.

    Some tuning methods allow atradeoff between robustness andload disturbance response. Theapproximate M-constrained integral-gain optimization (AMIGO) method[8], [10][12] maximizes integral gainunder a robustness constraint; seeAMIGO Design Method. Theresult of applying AMIGO to thisexample is shown in Figure 7. TheAMIGO-step method is used todesign a PI controller with K = 0.414and Ti = 2.66. The response to loaddisturbances is slower than theresults presented in Figure 5, but sta-bility margins result are improved,with Ms = 1.32 and Mt = 1.

    PID LOOP SHAPINGThis section briefly describes the main aspects of PID LoopShaping. The main screen of the tool is shown in Figure 8.

    ProcessThe process transfer function can be selected and modifieddepending on the option selected from the Settings menu.

    AMIGO Design Method

    A lthough load disturbances are often the major consideration in process control, robust-ness and measurement noise must also be considered. Requirements on setpointresponse can be dealt with separately by using a controller with two degrees of freedom.The Ziegler-Nichols rules for tuning PID controllers are especially influential. These rules,however, have severe drawbacks, since they use insufficient process information and canyield closed-loop systems with poor robustness [11]. Loop shaping [13] can also be usedfor PID control, which gives a flexible design method that allows a tradeoff between perfor-mance and robustness. The design approach maximizes the integral gain subject to con-straints on the maximum sensitivity. This method is called M-constrained integral gainoptimization (MIGO) [8], [11].

    AMIGO (approximate MIGO) design, which is a tuning method in the spirit of Zieglerand Nichols, is the result of finding simple tuning rules for the MIGO method. A largebatch of representative processes is selected, including a wide variety of systems withessentially monotone step responses that are typically encountered in process control.Controllers for each process in the batch are then obtained by applying the MIGOdesign. Having obtained the controller parameters, correlations with normalized processparameters are found by deriving the AMIGO tuning rules. Tables S1 and S2 showthese tuning rules for PI and PID controllers in the time and frequency domains. Analysisof these rules can be found in [8]. The main feature of this design method is that it facili-tates tradeoffs between robustness and performance. The method thus focuses on loaddisturbances by maximizing the integral gain and adding a robustness constraint.

    TABLE S1 Time-domain AMIGO tuning rules for first-order time delay (FOTD)models. L represents time delay, T is the time constant, and Kp is the staticgain of the process. K , Ti , and Td are proportional gain, integral time, andderivative time parameters of PID controllers.

    Controller K Ti TdPI 15Kp +

    (0.35 LT

    (L+T)2)

    TKpL 0.35L + 13LT

    2

    T2+12LT+7L2

    PID 1Kp(0.2 + 0.45 TL

    ) 0.4L+0.8TL+0.1T L

    0.5LT0.3L+T

    TABLE S2 Frequency-domain tuning rules. K180 is the process gain value atfrequency 180 , T180 = (2)/180 is the corresponding period, and = K180 /Kp is the gain ratio. K , Ti , and Td are proportional gain, integraltime, and derivative time parameters of PID controllers.

    Controller K Ti TdPI 0.16K180

    T1801+4.5

    PID (0.3 0.14)/K180 0.61+2 T180 0.15(1)10.95 T180

  • Several process models are available, and their parameterscan be modified using sliders as described in PID Basics.In addition, a free transfer function can be selected (menuoption Interactive TF), where poles and zeros can bedefined graphically as shown in Figure 8.

    ControllerThe Controller part of the tool shows the various parametersand properties of PID Loop Shaping to perform loop shap-ing. The design point of the process transfer function isdetermined at a specified frequency . The design point isshown by a green circle on the L-plane graphic. The corre-sponding point of the loop transfer function at the frequency is called the target point.

    The controller used in PID Loop Shaping is parame-terized as

    C(s) = k + kis

    + kds,

    which yields the loop transfer function

    L(s) = C(s)P(s) = kP(s) +(

    kis

    + kds)

    P(s).

    The point on the Nyquist curve of the loop transfer func-tion corresponding to the frequency is given by

    L(i) = kP(i) + i(

    ki

    + kd)

    P(i). (4)

    PID Loop Shaping provides three methods for tuningthe parameters to move the process transfer function fromthe design point to the target point. These methods arelisted in the Tuning zone as Free, Constrained PI, andConstrained PID. Free tuning allows an unconstrainedloop to be shaped by dragging on the control parameters.Constrained PI and Constrained PID permit the calcula-tion of the controller parameters based on some con-straints on the target point. That is, the focus can beplaced on how the loop transfer function changes whencontroller parameters are modified, which reveals theparameter values required to obtain a given shape of theloop transfer function. For PI and PD control the mappingis uniquely given by one point. For PID control it is alsopossible to obtain an arbitrary slope of the loop transferfunction at the target point. When the Free tuning optionis selected, sliders are used to modify the controller gainsk, ki, and kd, as shown in Figure 8. The controller gains canalso be changed by dragging arrows, as illustrated in thesame figure. From (4), the proportional gain changes L(i)in the direction of P(i), the integral gain ki changes L(i)in the direction of iP(i), and the derivative gain kdchanges L(i) in the direction of iP(i).

    For the Constrained PI and Constrained PID tuningoptions, the target point can be limited to move on theunit circle, the sensitivity circles, or the real axis. In this

    FIGURE 8 The user interface of the module PID Loop Shaping,showing both Free and Constrained PID tuning. The loop transferfunction is shown for two designs under the Free design option. Pro-portional, integral, and derivative action are manipulated directly bydrawing the arrows. In the Constrained PID, tuning the target pointis constrained to lie on the sensitivity circle.

    FIGURE 7 Load disturbance response for a PI controller using theapproximate M-constrained integral gain optimization (AMIGO)step method. This method enables the compromise described inFigure 6, focusing on load disturbances by maximizing integral gainand adding a robustness constraint. The (a) process output and (b)control signal to load disturbances, respectively, for a PI controllerdesigned using AMIGO and with K = 0.414 and Ti = 2.66. Theslow response compared with Figure 6 corresponds to increasedstability margins.

    y

    0.5

    Process Output Graphics: Save Delete

    0

    0 20(a)

    40 Time

    u

    0

    Controller Output P I

    1

    0 20(b)

    40 Time

    124 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 125

    way loop shaping is enabled with specifications on gainand phase margins or on the sensitivities. In the case ofConstrained PI it is necessary to find controller gains pro-viding the desired target point. Dividing (4) by P(i) andseparating the real and imaginary parts gives

    k = (

    L(i)P(i)

    ), (5)

    ki

    + kd = (

    L(i)P(i)

    )= A(). (6)

    With kd = 0, (5) and (6) yield the two parameters of the PIcontroller.

    An additional condition is required for the ConstrainedPID tuning option. Hence, it is observed that

    L (s) = C (s)P(s) + C(s)P (s)= C (s)P(s) + L(s)P

    (s)P(s)

    =(

    kis2

    + kd)

    P(s) + L(s)P(s)

    P(s). (7)

    The slope of the Nyquist curve is then given by

    iL(i) = i(

    ki2

    + kd)

    P(i) + iC(i)P (i). (8)

    The complex number represented by (8) has the phaseangle if

    (iL (i)ei) = 0. (9)

    Results (7)(9) imply that

    ki2

    + kd =

    (L(i)

    P (i)P(i)

    ei)

    (P(i)ei) = B(). (10)

    Combining (10) with (5)(6) gives the controller parameters

    ki = A() + 2B(), (11)kd =

    A()

    + B(), (12)

    where A() and B() are given by (6) and (10), respectively. The design frequency can be chosen using the slider

    wdesign or graphically by dragging the green circle on theprocess Nyquist curve (black curve in Figure 8). The targetpoint on the Nyquist plot and its slope can be draggedgraphically. The slope can also be changed using the sliderslope. Furthermore, it is possible to constrain the targetpoint using the Constraints radio buttons to the unit circle

    (Pm), the negative real axis (Gm), circles representing con-stant sensitivity (Ms), constant complementary sensitivity(Mt), or constant sensitivity combinations (M). When sensi-tivity constraints are active, the associated circles are drawnin the L-plane plot, and sliders can be used to modify theirvalues. The circles are defined in Table 1.

    Figure 8 illustrates designs for two PID controllers anda given sensitivity. The target point is moved to the sensi-tivity circle, and the slope is adjusted so that the Nyquistcurve is outside the sensitivity circle. The red designshows a PID controller using Free tuning, while the bluedesign shows a Constrained PID tuning. Specifications thatcannot be reached are indicated in the tool by giving theintegral or derivative gain negative values in these cases.

    Robustness and Performance ParametersRobustness and Performance parameters are displayed onthe screen below the controller parameters (Figure 8), andthese parameters characterize robustness and performancein the same manner as in PID Basics. The values are maxi-mal sensitivity (Ms), sensitivity-crossover frequency (Ws),maximal complementary sensitivity (Mt), complementarysensitivity-crossover frequency (Wt), gain margin (Gm),gain-crossover frequency (Wgc), phase margin (Pm), andphase-crossover frequency (Wpc).

    L-Plane GraphicThe L-plane graphic is given in the right-hand side of thePID Loop Shaping menu, as shown in Figure 8. This graphiccontains the Nyquist plots of the process transfer functionP(s) in black and the loop transfer functions L(s) = P(s)C(s)in red. Three different views can be shown depending onthe tuning options. Figure 9 shows two views, the left onefor Free tuning and the right one for Constrained PID tun-ing. A third view is shown in Figure 8, where two designsare shown simultaneously. The design and target points canbe modified interactively on this graphic. The design pointis shown in green on the Nyquist curve of the process. Thetarget point is represented in light green in the case of Freetuning and in black for constrained tuning, as shown in Fig-ure 8. The slope of the target point can also be changed

    TABLE 1 Sensitivity circles. This table describes the centerand radius of circles that define the loci for constantsensitivity Ms, constant complementary sensitivity Mt ,constant mixed sensitivity, and equal sensitivitiesM = Ms = Mt [8].

    Contour Center RadiusMs-circle 1 1/MsMt -circle M

    2t

    M2t 1Mt

    M2t 1

    M-circle x1+x22 x1x22x1 = max

    (Ms+1

    Ms ,Mt

    Mt 1)

    x2 = max(

    Ms1Ms ,

    MtMt +1

    )

  • 126 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

    interactively. For Free tuning, the controller gains areshown as arrows in the Nyquist plot. The controller gainscan be modified interactively by dragging the ends of thearrows. Figures 8 and 9 show examples of these arrows. Thescale of the graphic can be changed using the red trianglelocated at the bottom of the vertical axis.

    As noted above, it is possible to impose constraints on thetarget point. The graphical representation of the target pointis modified depending on the constraint selected, restricting

    its value based on its meaning. Options save and delete canbe found above the L-plane graphic. These options have thesame meaning as in PID Basics, making it possible to savedesigns to perform comparisons. Once the save option isactive, two pictures appear, one of which shows the currentdesign in red while the other shows the current design inblue (see Figure 8). Modifications of the controller parame-ters affect the current (active) design, which can be changedusing the options Design 1 and Design 2, which appear onthe top of the L-plane graphic. Once a design is chosen, theassociated curve is switched to red, and the controller zone ismodified based on that design. The controller gain valuescan be seen by moving the cursor on the curves.

    Settings MenuThe Settings menu, which is available in the main menu ofPID Loop Shaping, is divided into four groups, followingthe same structure as in PID Basics. The first entry, calledProcess Transfer Function, is used to choose between sev-eral predefined transfer functions or to include an user-specified transfer function through two options. The StringTF option allows a transfer function to be entered symboli-cally. For instance, P(s) = 1/ cosh s can be represented asP=1/cosh(sqrt(s)). Results can be stored and recalledusing the Load/Save menu. The option Save Report can beused to save all essential data in text format, which is use-ful for documenting results. Specific values for controlparameters can be entered with Parameters menu option.As in PID Basics , the last menu option (ExamplesAdvanced PID Book) allows loading examples from [8].

    ExamplesSome of the capabilities of PID Loop Shaping are illustratedby the following examples.

    Effect of Controller ParametersThe purpose of this example is to illustrate how theNyquist plot of the loop transfer function changes whenthe controller parameters are modified.

    Consider the process P(s) = 1/(s + 1)4 . When a P con-troller is used, the proportional gain changes the loop trans-fer function L(i) = kP(i) in the direction of P(i). Figure10(a) shows the effect of modifying L(i) using a P con-troller with gain k = 2 (blue curve) and k = 2.6 (red curve).These curves show how the proportional gain modifies theNyquist plot of the process (black curve) at the frequency (green circle on the black curve) in the direction of P(i).Figure 10(b) shows the same study for an I-controller withki = 1 (red curve) and ki = 0.6 (blue curve). It can be seenthat the integral gain ki changes L(i) in the directioniP(i). The derivative gain has the same effect in the direc-tion of iP(i). When a PI or PD controller is used, the com-pensated point at the frequency is calculated as the sum oftwo vectors, namely, the proportional vector and the inte-gral or derivative vector. Examples of this capability are

    FIGURE 9 The L-plane graphic. The Nyquist plots of the processtransfer function P(s) (black line) and the loop transfer functionL(s) = P(s)C(s) (red line) are shown. (a) An example of the Freetuning design. The controller gains can be changed by draggingarrows, the proportional gain changes L(i) in the direction ofP(i) (blue arrow), the integral gain ki changes L(i) in the direc-tion of i P(i) (cyan arrow), and the derivative gain kd changesL(i) in the direction of i P(i) (magenta arrow). (b) An example ofthe Constrained PID tuning design. In this case, once the usermoves the target point (black circle), the controller parameters arecalculated using (5)(12).

    1

    L-Plane Graphics: Save Delete

    0

    1

    2

    3

    2 0(a)

    2

    Graphics: Save Delete

    1

    L-Plane

    0

    1

    2

    3

    2 0(b)

    2

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 127

    shown in Figure 10(c) and (d), where the process is con-trolled by a PI controller (k = 2.3 and ki = 0.7) and a PDcontroller (k = 2.1 and kd = 3.35), respectively.

    Simple exercises can be used to provide training in loopshaping. For instance, with the above process, it is instruc-tive to calculate the gain for a proportional controller forwhich the closed-loop system changes from stable tounstable. Before using PID Loop Shaping, the result can becalculated analytically, which yields

    L(i) = C(i)P(i) = 180, k

    1(i + 1)4 = 180, = 1.

    |L(i)| = |C(i)P(i)| = | 1 + 0i| ,k 1(i + 1)4 = 1, k = 4.

    PID Loop Shaping can be used to verify the result inter-actively, as shown in Figure 11. This exercise challenges

    students and encourages them to make observations whilerelating theory to images to develop a broader and deeperunderstanding.

    On the other hand, free interactive designs can also beperformed to compare the results with other designmethods. For instance, PID Loop Shaping can be used todesign a PID controller interactively for the processP(s) = 1/(s + 1)4, where the maximal sensitivity value Msmust be less than 1.5. A PID controller that satisfies thisconstraint is obtained when k = 0.92, Ti = 1.8, ki = 0.5,Td = 1.03, and kd = 0.95. The AMIGO-frequency methodcan also be used for design, and the results can be com-pared. The resulting controller is given by k = 1.2,Ti = 2.48, ki = 0.48, Td = 0.93, and kd = 1.12. Figure 12shows the Nyquist plots and time responses using PIDBasics for both designs, in blue for the free PID con-troller and in red for the AMIGO method. The resultingvalues of Ms are 1.49 for free PID and 1.46 for theAMIGO method.

    FIGURE 10 Nyquist plot modifications depending on the controller type. (a) P controller, (b) I controller, (c) PI controller, and (d) PD con-troller. (a) The modification of L(i) in the direction of P(i) using a P controller with gain k = 2 (blue curve) and k = 2.6 (red curve). Thesame study for an I-controller is shown in (b) with ki = 1 (red curve) and ki = 0.6 (blue curve), where L(i) is modified in the directioni P(i). (c), (d) PI or PD controllers are used, respectively. In these cases, the compensated point at the frequency is calculated as thesum of two vectors, namely the proportional vector and the integral or derivative vector.

    (a) (b)

    (c) (d)

  • Effect of the Target PointThe target point on the Nyquist plot can be reached usingan unconstrained design by selecting the Free option. Thecontroller gains are interactively adjusted as shown in thefree tuning example. Another approach is to use (5)(12),where the controller gains are calculated after the targetpoint is defined. As discussed above, the target point canbe fixed or constrained in various ways, either at anypoint, to specific values for phase margin and gain margin,or to maximal values of the sensitivity functions. Figure 13shows an example in which the target point is set to thepoint 0.5 0.5i. Two constrained designs are shown forthe design frequency = 0.6 rad/s. The red curve repre-sents a system compensated by a constrained PID withk = 1.32, ki = 1.02, and kd = 2.15, while the blue curve rep-resents a constrained PI with k = 1.32 and ki = 0.15.Although both controllers reach the target point, betterresults are obtained for the PID controller because theslope can be freely adjusted (the value for this example is = 22). The PID controller provides better robustnessproperties with Ms = 1.45, ki = 1.02, Gm = 5.32, andPm = 40.15, versus a PI controller with Ms = 1.83,ki = 0.15, Gm = 2.69, and Pm = 75.77.

    Similar examples can be used to restrict the target pointfor phase margin, gain margin, or maximal values of thesensitivity functions. Figure 14(a) shows an example wherea combined sensitivity constraint is required for Ms 2and Mt 2. This constraint is fulfilled in two differentways, namely, by using Constrained PID (red curve) andConstrained PI (blue curve). Another example combiningsensitivity function and gain margin constraints is shownin Figure 14(b), with the specification that the gain marginbe equal to three and Ms 2. These specifications are

    established by maximizing the integral gain ki. Hence, theconstraint gain margin is chosen, and the target point islocated in such a way that Gm = 3. Then, a ConstrainedPID controller is selected, where the design point and theslope are modified until Ms 2 and the integral gain ismaximized. The final controller is given by k = 1.38,ki = 0.52, and kd = 0.54 for = 1.02 and = 32.

    FIGURE 11 Stability limit on the critical point 1 + 0i . A typicalexample for presenting loop shaping is to search for the lowest gainthat makes the system unstable. This task can be interactively per-formed with PID Loop Shaping as shown in this figure.

    FIGURE 12 Example of loop shaping with Ms < 1.5. PID Loop Shap-ing can be used to compare various designs. In this figure, (a)Nyquist plots and (b) time-domain responses generated with PIDBasics are shown to compare an unconstrained design (k = 0.92,Ti = 1.8, ki = 0.5, Td = 1.03, and kd = 0.95) with an alternativedesign developed using the AMIGO-frequency method (k = 1.2,Ti = 2.48, ki = 0.48, Td = 0.93, and kd = 1.12).

    y

    1

    Process Output Graphics: Save Delete

    0

    0 50 Time

    u

    1

    0

    Controller Output I D

    0 50(b)

    Time

    P

    K =1.2 Ti=2.51 Td=0.93 b=1 N=10K =0.92 Ti=1.79 Td=1.03 b=1 N=10

    K =1.2 Ti=2.51 Td=0.93 b=1 N=10K =0.92 Ti=1.79 Td=1.03 b=1 N =10

    1

    L-Plane

    Graphics:Design2 Save Delete

    0

    1

    2

    3

    2 0(a)

    2

    Design1

    128 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 129

    The Derivative CliffWe again consider the process transfer functionP(s) = 1/(s + 1)4 . It is desirable to maximize the integralgain ki subject to the robustness constraint Ms 1.4. Theresulting controller has the parameters k = 0.925, ki = 0.9,and kd = 2.86, where the Nyquist plot of the loop transferfunction is shown in red in Figure 15(a). It can be seen thatthe Nyquist curve has a loop, called a derivative cliff. Asexplained in [8], this feature, which is due to excessive con-troller phase lead, results from having a PID controller withcomplex poles, which occurs when Ti < 4Td. In this exam-ple the relation is Ti = 0.33Td. Figure 15(b) shows, in red,the time response of the controller, which yields oscillatoryoutputs. For comparison, the results for a controller withTi = 4Td are shown in blue in Figure 15(a) and (b) with thecontroller parameters k = 1.1, ki = 0.36, and kd = 0.9. Theresponses for this controller are improved, despite largerovershoot in response to load disturbances. This example isavailable in the Settings menu of PID Loop Shaping.

    PID WINDUPThe purpose of the PID Windup module is to facilitateunderstanding of integral windup and a method for com-pensating it [8]. For a control system with a wide range ofoperating conditions, it may happen that the control vari-able reaches the actuator limits. When this situation occursin loops using a controller with integral action, the feed-back loop is broken and the integral may reach large val-

    ues, maintaining the control signal saturated for a longtime, resulting in large overshoot, and undesirable tran-sients. This problem is known as windup phenomenon [8].

    Windup can be avoided in different ways. Back calcula-tion and tracking [8] is illustrated in the block diagram inFigure 16. The system remains unchanged when the satu-ration is not active. However, when saturation occurs, theintegral term in the controller is modified until the controlsignal is out of the saturation limit. This modification is notperformed instantaneously but dynamically with a timeconstant Tt called the tracking time constant [8].

    The module PID Windup shows process outputs andcontrol signals for unlimited control signals, limited

    FIGURE 14 Example of a constrained design with sensitivity andgain-margin constraints. These plots show an example where thetarget point is constrained to reach specified values for the (a) com-bined sensitivity functions with Ms 2 and Mt 2, and (b) gainmargin with limited sensitivity values with Gm = 3 and Ms 2.

    1

    L-Plane Graphics: Save Delete

    0

    1

    2

    3

    2 0(a)

    2

    1

    L-Plane

    0

    1

    2

    3

    2 0(b)

    2

    Graphics: Save Delete

    FIGURE 13 Example of a constrained design with a target point of0.5 0.5i . The target point can be constrained to reach arbitraryspecifications. Once a point is constrained, the controller parame-ters are automatically calculated. This plot shows PI (k = 1.32,ki = 0.15) and PID (k = 1.32, ki = 1.02, kd = 2.15) controllers, bothreaching the target point. The PID controller provides better resultsdue to the use of the slope as an allowable third degree of freedomas described in (11) and (12), where the slope takes the value 22.

    1

    L-Plane Graphics:Design2 Save Delete

    0

    1

    2

    3

    2 0 2

    Design1

  • 130 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

    control signals without antiwindup, and limited controlsignals with antiwindup. The user interface is shown inFigure 17. Process models and controller parameters canbe selected in the same way as in the other modules. Thesaturation limits of the control signal can be determinedeither by entering the values or by dragging the lines in thesaturation scheme.

    The Interactive ToolWe now describe the main aspects of PID Windup.

    ProcessThe Process area is similar to that described in PID Basicsand PID Loop Shaping. The time delay is modified using aslider instead of a text edit, so that the time delay effect onthe antiwindup mechanism can be analyzed.

    ControllerThe Controller area contains information about the con-troller parameters and actuator saturation. Three kinds of

    FIGURE 15 Derivative cliff example. (a) Nyquist plot and (b) time-domain responses. This example shows that optimization of ki ,which is aimed at fulfilling robustness specifications, can providecontrollers with excessive phase lead, as represented by the loop inthe red curve. This behavior is a consequence of the presence ofcomplex zeros due to Ti < 4Td . The same example is shown in bluefor Ti = 4Td , where this problem is avoided [8].

    y

    1

    Process Output Graphics: Save Delete

    0

    0 50 Time

    u

    1

    0

    Controller Output I D

    0 50(b)

    Time

    P

    K =0.93 Ti=1.03 Td=3.09 b=0.5 N=10K =1.1 Ti=3.05 Td=0.76 b=0.5 N=10

    K =0.93 Ti =1.03 Td=3.09 b=0.5 N=10K =1.1 Ti =3.05 Td=0.76 b=0.5 N=10

    1

    L-PlaneGraphics:Design2 Save Delete

    0

    1

    2

    3

    2 0(a)

    2

    Design1

    FIGURE 16 PID controller with antiwindup scheme, where K is thecontroller proportional gain, Ti is the controller integral time, Td isthe controller derivative time, ysp is the setpoint, y is the processoutput, e is the tracking error, v is the controller output, u is the sat-urated controller output, and es is the difference between the con-troller output v and the saturated controller output u. In this schemethe control signal remains unconstrained when the saturation is notactive. When saturation occurs, the integral control action is modi-fied until the control signal is out of the saturation limit. The modifi-cation of the integral element is performed dynamically by adjustingthe tracking time constant Tt [8].

    y

    e = ysp y

    K/Ti

    KTds

    1/s

    1/Ttes

    Kv u

    ActuatorModel Actuator

    +

    FIGURE 17 The user interface of the module PID Windup, showingthe windup phenomenon and application of the antiwindup tech-nique. Several graphical elements are used to interactively analyzetypical problems and solutions associated with windup. The exam-ple shown in the figure illustrates the windup phenomenon (in blue)and the result of applying the antiwindup technique (in green).

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 131

    controllers with integral action can be selected (I, PI, PID),where several sliders are available to change the controllerparameters, including the tracking time constant Tt. A sat-uration graphic is also available in this zone. The ActuatorSaturation graphic allows the saturation limits to be deter-mined by dragging the small red circle located on theupper saturation value. In this graphic, a symmetric satu-ration is selected for pedagogical purposes.

    GraphicsTime responses for process output, control signal, andintegral action are available in three graphics, namely,Process Output, Controller Output, and Integral Term. Inthe same way as in PID Basics, multiple interactive graph-ical elements can be used to change the setpoint, load dis-turbance, measurement noise, or horizontal and verticalscales (see Figure 17). These graphics can simultaneouslyrepresent the controlled system in linear, nonlinear withwindup, and nonlinear with antiwindup modes. Theserepresentations can be configured using the checkboxeslocated above the Process Output graphic. For instance,Figure 17 shows an example containing the nonlinear withwindup and nonlinear with antiwindup modes.

    The dotted pink vertical line in Figure 18 is helpful forcomparing the outputs of the different plots at the sametime instant. The saturation limits can be altered using the

    dotted blue horizontal lines available in the ControllerOutput graphic (see Figure 17).

    The notion of proportional band is useful for under-standing the windup effect, and is included in PIDWindup. The proportional band is defined as the range ofprocess outputs such that the controller output is in thelinear range [ymin, ymax]. For a PI controller, the propor-tional band is limited by

    ymin = bysp + I umaxK , (13)

    ymax = bysp + I uminK , (14)

    where I is the integral term of the controller, and umax andumin are the control signal limits.

    Expressions (13) and (14) hold for PID control when the pro-portional band is defined as the band where the predicted outputyp = y + Td(dy/dt) is in the proportional band [ymin, ymax].The proportional band has the width (umax umin)/K, and iscentered around bysp + I/K (umax + umin)/(2K).

    Two additional checkboxes called PB Windup and PBAntiwindup, appear near the top of plot Process Output. Theactivation of these options shows the proportional bands forthe windup and antiwindup cases in the Process Outputgraphic. The proportional bands are shown as dotted greenand blue curves, respectively, as shown in Figure 18.

    FIGURE 18 Example of the windup phenomenon with proportional band for (a) K = 1 and (b) K = 0.4. In [8] the notion of proportional bandis described as being a useful tool for understanding the effects of windup. The proportional band is an interval such that the actuator doesnot saturate when the instantaneous value of the process output or its predicted value is inside this band. These plots show two examplesdemonstrating how the control signal is saturated when the process output is inside the band shown in blue. The interactive pink line ofthe graphics can be used to test this idea.

    Process Output

    4

    2

    00 20 40 60 Time

    Controller Output

    Integral Term

    0.2

    0

    0.2u

    202

    I

    Linear Windup Antiwindup PB Windup PB Antiwindup Process Output Windup Antiwindup PB Windup PB Antiwindup

    0 20 40 60 Time

    0 20 40(a)

    60 Time

    4

    2

    00 20 40 60 Time

    Controller Output

    Integral Term

    0.2

    0

    0.2u

    202

    I

    0 20 40 60 Time

    0 20 40(b)

    60 Time

    WindupWindup

    WindupWindup

    WindupWindup

    Linear

  • 132 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

    Settings MenuThe Settings menu has the same structure as in PID Basicsand PID Loop Shaping. The process transfer function canbe chosen from the entry Process Transfer Functions, andnumerical values of the parameters can be introducedusing Controller Parameters. Essential data and results canbe saved and recalled using the Load/Save menu options.The menu selection Simulation makes it possible to choosethe simulation time and activate the Sweep option, whichcan be used to show the results for several values of thetracking time constant. Several examples from [8] can beloaded from the Examples entry.

    ExamplesThe following examples illustrate properties of the PIDWindup module.

    Understanding the Windup PhenomenonWindup can be studied using the first entry from theExamples option menu. This example from [8] uses thepure integrator process P(s) = 1/s controlled by a PI con-troller with parameters K = 1, Ti = 1.2, and b = 1, andwith the control signal limited to 0.2. Figure 17 shows thetime responses for this example. The control signal is satu-rated from t = 0. The process output and the integral termincrease while the control error is positive. Once the

    process output exceeds the setpoint, the control errorbecomes negative, however the control signal remains sat-urated due to the large value of the integral term. The timeresponses are shown in Figure 17.

    The proportional band can be drawn in this exampleusing the PB Windup checkbox shown in Figure 18(a).Using the vertical line, the user can see that the processoutput remains inside the band while the control signal isworking in linear mode and outside the proportional bandwhen the control signal is saturated. Large controller gainsprovide narrow proportional bands, with more energeticcontrol signals and therefore longer saturation times, whilesmall controller gains give wider proportional bands.Figure 18(b) illustrates this effect, where the proportionalcontroller gain is reduced to 0.4, producing a widerproportional band.

    AntiwindupThe process P(s) = 1/s is also useful for visualizing theantiwindup technique. The same controller parameters,namely, K = 1, Ti = 1.2, b = 1, are used, and the trackingtime constant is set to Tt = 1. Figure 19(a) shows theresponses for both cases control with and without anti-windup. The system with antiwindup remains in satura-tion for only a short period of time, with the magnitude ofthe integral term considerably reduced. The proportional

    FIGURE 19 Example of the effect of the tracking time constant Tt on in the antiwindup technique. (a) Antiwindup and (b) effect of Tt . Theseplots show the results of applying the antiwindup technique to the example shown in Figure 17. The integral signal is considerably reduced,allowing the control signal to remain in saturation during a shorter period of time. The proportional band for the antiwindup technique isshown in green. The process output remains inside the band most of the time.

    Process Output

    1

    00 20 40 60 Time

    Controller Output

    Integral Term

    0.2

    0

    0.2u

    202

    I

    Linear Windup Antiwindup PB Windup PB Antiwindup Process Output Linear Windup Antiwindup PB Windup PB Antiwindup

    0 20 40 60 Time

    0 20 40(a)

    60 Time

    1

    00 20 40 60 Time

    Controller Output

    Integral Term

    0.2

    0

    0.2u

    202

    I

    0 20 40 60 Time

    0 20 40(b)

    60 Time

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

  • OCTOBER 2008 IEEE CONTROL SYSTEMS MAGAZINE 133

    band for the PI controller with antiwindup is shown in thesame figure. It can be seen that the proportional band iswider than for PI without antiwindup [Figure 19(a)],where the process output remains most of the time. Theeffect of the tracking time constant is illustrated in Figure19(b) for Tt = 0.1, 10, 50. In this scenario, the Sweepmenu option is used. High values of Tt make the anti-windup too slow to be effective, while low values reset theintegral term quickly with improved results. It may thusseem advantageous to always have small values of Tt.However, the next example shows some situations wherethis choice is not advisable.

    The Tracking Time ConstantThe tracking time constant is an essential parameter becauseit determines the reset rate for the integral term of the con-troller. It may seem advantageous to have a small value forthis constant. However, measurement errors may acciden-tally reset the integral term when the tracking time constantis too small. The following example illustrates this phenom-enon, when a measurement error occurs in the form of ashort pulse. The transfer function of the process is

    P(s) = 1(0.5s + 1)2 ,

    and the controller is a PID controller with K = 3.5,Ti = 0.52, Td = 0.14, Nd = 10, b = 1, and Tt = 1.

    Figure 20(a) shows the control results. A large transientappears after the pulse, and the integral term is excessivelyreduced.

    Various rules are suggested in [8] for choosing thetracking time constant. One choice is Tt = (Ti + Td)/2. Fig-ure 20(b) shows an example with Tt = (Ti + Td)/2 = 0.33,where the response is considerably improved.

    CONCLUSIONSIn this work a set of interactive modules that compriseILM-PID is presented to support the teaching and learn-ing of basic automatic control concepts. These tools areintended mainly to include interactivity in the visual con-tent of [8]. The modules focus on PID control, studyingfeedback fundamentals from the standpoint of the timeand frequency domains, including robustness issues, mea-surement of noise filtering, load-disturbance rejection, andwindup phenomenon.

    The importance of interactivity in automatic controleducation has been shown in the context of teachingand learning. In the authors experience, interactivityoffers excellent support to education and learning byenhancing the motivation and participation of future

    FIGURE 20 Tuning the tracking time. (a) Reset by measurement noise and (b) tuning using rules. (a) illustrates the disadvantage of using ashort tracking time constant. The short pulse disturbance at time t = 10 results in excessive reduction of the integral term and a large distur-bance in the process output. In (b) the choice is Tt = (Ti + Td)/2.

    Process Output

    0

    1

    0 5 10 15 Time

    Controller Output

    Integral Term

    2

    0

    u

    505

    I

    Linear Windup Antiwindup PB Windup PB Antiwindup Process Output Linear Windup Antiwindup PB Windup PB Antiwindup

    0 5 10 15 Time

    0 5 10(a)

    15 Time

    0

    1

    0 5 10 15 Time

    Controller Output

    Integral Term

    2

    0

    u

    505

    I

    0 5 10 15 Time

    0 5 10(b)

    15 Time

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

    WindupAntiwindup

  • 134 IEEE CONTROL SYSTEMS MAGAZINE OCTOBER 2008

    engineers. The interactive learning modules developedin this work are freely available from the authors [7] totest these interactive features in control education andprofessional training.

    REFERENCES[1] M. Johansson, M. Gfvert, and K.J. strm, Interactive tools for educa-tion in automatic control, IEEE Contr. Syst. Mag., vol. 18, no. 3, pp. 3340,1998.

    [2] J.L. Guzmn, M. Berenguel, and S. Dormido, Interactive teaching of con-strained generalized predictive control, IEEE Contr. Syst. Mag., vol. 25, no.2, pp. 7985, 2005.

    [3] J. Snchez, S. Dormido, and F. Esquembre, The learning of controlconcepts using interactive tools, Comput. Appl. Eng. Educ., vol. 13, no. 1,pp. 8498, 2005.

    [4] J.L. Guzmn, Interactive control system design, Ph.D. dissertation, Uni-versity of Almera, Spain [Online]. Available: http://www.ual.es/~joguz-man/PhdThesisGuzman.pdf

    [5] Y. Piguet, SysQuake 3 User Manual. Lausanne, Switzerland: Calerga Srl,2004 [Online]. Available: http://www.calerga.com

    [6] J.L. Guzmn, K.J. strm, S. Dormido, T. Hgglund, and Y. Piguet,Interactive learning modules for PID control, in Proc. 7th IFAC Symp.Advances in Control Education, 2006, Madrid, Spain [Online]. Available:http://aer.ual.es/ilm/

    [7] ILM Web site, Interactive Learning Modules, 2005 [Online]. Available:http://www.calerga.com/contrib/1/index.html

    [8] K.J. strm and T. Hgglund, Advanced PID Control. Research TrianglePark, NC : Instrum. Soc. Amer. 2005.

    [9] F.G. Shinskey, Process-Control Systems. Application, Design, and Tuning.New York: McGraw Hill, 1996.

    [10] T. Hgglund and K.J. strm, Revisiting the Ziegler-Nichols tuningrules for PI control, Asian J. Contr., vol. 4, no. 4, pp. 364380, 2002.

    [11] T. Hgglund and K.J. strm, Revisiting the Ziegler-Nichols stepresponse method for PID control, J. Process Contr., vol. 14, no. 6, pp.635650, 2004.

    [12] T. Hgglund and K.J. strm, Revisiting the Ziegler-Nichols tuningrules for PI controlPart II, the frequency response method, Asian J. Contr.,vol. 6, no. 4, pp. 469482, 2004.

    [13] K.J. strm, H. Panagopoulos, and T. Hgglund, Design of PIcontrollers based on non-convex optimization, Automatica, vol. 34, no. 4,pp. 585601, 1998.

    AUTHOR INFORMATIONJos Luis Guzmn ([email protected]) earned a computerscience engineering degree in 2002 and a Ph.D. in 2006,both from the University of Almera, Spain, where he is anassistant professor and a researcher in the Automatic Con-trol, Electronics, and Robotics Group. Currently his inter-ests center on control education and robust modelpredictive control techniques, with applications to interac-tive tools, virtual and remote labs, and agriculturalprocesses. He can be contacted at the Universidad deAlmera, Dpto. de Lenguajes y Computacin, Ctra. Sacra-mento s/n, 04120, Almera, Spain.

    Karl Johan strm received his M.Sc. in engineeringphysics in 1957 and his Ph.D. in control and mathematicsin 1960 from the Royal Institute of Technology in Stock-holm, Sweden. After graduating, he worked for IBMResearch for five years. In 1965, he became professor atLund Institute of Technology/Lund University, where hefounded the Department of Automatic Control. He is nowemeritus at Lund University and a part-time visiting pro-fessor at the University of California at Santa Barbara. Heis a Life Fellow of the IEEE. He has broad interests in con-trol and its applications. He has received many awards,including the IEEE Medal of Honor and the Quazza medalfrom IFAC.

    Sebastin Dormido holds a degree in physics from theComplutense University in Madrid, Spain (1968) and aPh.D. from the University of the Basque Country, Spain(1971). In 1981 he was appointed professor of control engi-neering at the Universidad Nacional de Educacin a Dis-tancia. His activities include computer control ofindustrial processes, model-based predictive control,robust control, and model and simulation of continuousprocesses. He has authored and coauthored more than 150technical papers in international journals and conferences.From 2002 to 2006 he was president of the Spanish Associ-ation of Automatic Control CEA-IFAC.

    Tore Hgglund received his M.Sc. in engineeringphysics in 1978 and his Ph.D. in automatic control in1984, both from Lund Institute of Technology, Sweden,where he is currently a professor. Between 1985 and 1989he worked for Alfa Laval Automation (now ABB) on thedevelopment of industrial adaptive controllers. He is acoauthor of Advanced PID Control and Process Control inPractice. His current research interests are in the areas ofprocess control, tuning and adaptation, and supervisionand detection.

    Manuel Berenguel is a professor at the University ofAlmera, Spain. He earned an industrial engineeringdegree and Ph.D. from the University of Seville, Spain,where he has been a researcher and associate professorfor six years. His research interests are in predictive,adaptive, and robust control, with applications to solarenergy systems, agriculture, and biotechnology. He hasauthored and coauthored more than 100 technicalpapers in international journals and conferences and iscoauthor of the book Advanced Control of Solar Plants(Springer, 1997).

    Yves Piguet is CEO of Calerga Srl, a company he co-founded in 2001 to develop and commercialize scientif-ic software such as Sysquake, of which he is the maindeveloper. He received a diploma in microtechnics in1991 and a Ph.D. degree in control systems in 1997,both from EPFL, Lausanne, Switzerland. His researchinterests include robust control, real-time controllersand their use in mobile robotics, and interactive soft-ware and its applications.