10.1.1.20.9673

Embed Size (px)

Citation preview

  • 7/28/2019 10.1.1.20.9673

    1/6

    Model Based Control of a Four-Tank System

    Edward P. Gatzke, Edward S. Meadows, Chung Wang, Francis J. Doyle III

    Department of Chemical EngineeringUniversity of Delaware

    Newark, DE 19716

    Abstract

    A multi-disciplinary laboratory for control education hasbeen developed at the University of Delaware to exposestudents to realistic process system applications and ad-vanced control methods. One of the experiments is levelcontrol of a four-tank system. This paper describes twomodel-based methods students can implement for control

    of this interacting four-tank system. Sub-space identifica-tion is used to develop an empirical state space model ofthe experimental apparatus. This model is then used formodel based control using Internal Model Control (IMC).This represents an application of inner-outer factorizationfor non-minimum phase multivariable IMC design. Mod-eling is also performed using step tests and Aspen soft-ware for use with Dynamic Matrix Control (DMC).

    Keywords: Predictive Control, Internal Model Con-trol, Process Control Education, Experimental Apparatus

    Introduction

    Process control courses for chemical engineers oftenemphasize complex theoretical and mathematical issueswhile devoting limited time to implementation of applica-tion of control methods. In order to reinforce and demon-strate the concepts presented in a lecture, practical labora-tory applications can be developed for students. The ex-perience of working on a laboratory experiment in an aca-demic setting exposes students to realistic industrial prob-lems. Laboratory work can expose students to processdetails that are often neglected in computer simulation,including measurement noise, measurement bias, process

    nonlinearity, equipment failure, actuator constraints, andexternal disturbances.A multi-disciplinary process control laboratory has

    been developed at the University of Delaware. Experi-ments currently include: an inverted pendulum, an elec-tric servo motor, a gyroscope, a distillation column, a

    Author to whom correspondence should be addressed:[email protected]

    Tank 3 Tank 4

    Tank 1 Tank 2

    Pump 1 Pump 2

    Figure 1: Schematic of the interacting four-tank process.The two manipulated variables are the pump speeds. Thetwo controlled variables are the levels of tanks one andtwo. Unmeasured flow disturbances can affect tanks threeand four.

    spring mass damper system, a virtual boiler, and a four-tank system. The undergraduate experimental controlcourse is offered every year in the Spring semester. Stu-dents from mechanical, electrical, and chemical engineer-ing disciplines participate in this class. The students aregrouped with students from other majors. This multi-disciplinary group facilitates peer learning in that studentsfamiliar with the principles of a given experiment musthelp other group members. The students enrolled in theprocess control laboratory have all taken the basic pro-cess control course taught in their individual departments.The basic knowledge of process control allows the exper-

    imental laboratory course to cover advanced applicationsof process control.

    A four-tank level control system has been constructedfor use in the control laboratory. This paper details the useof model identification and model-based control methodsfor control of this interacting four-tank system. The four-tank system is based on the system presented by Johans-son and Nunes [2]. A schematic of the process is shown in

    1

  • 7/28/2019 10.1.1.20.9673

    2/6

    Figure 1. The experiment has two inputs (pump speeds)which can be manipulated to control the two outputs (tanklevels). The system exhibits interacting multivariable dy-namics because each of the pumps affects both of the out-puts. The system has an adjustable multivariablezero thatcan be set to a right-half or left-half plane value by chang-ing the valve settings of the experiment. Unmeasured dis-turbances can be applied by pumping water out of the top

    tanks and into the lower reservoir. This exposes studentsto disturbance rejection as well as reference tracking.

    -

    -

    -

    -

    Table 1: Nonlinear model equations for the four-tank sys-tem.

    A full nonlinear mass balance model of the system is

    given in Table 1. Here, Bernoullis law is used for flowsout of the tanks,

    is the level of water in tank ,

    and

    are the manipulated inputs (pump speeds), and

    and

    are external disturbances representing flow out of tanksthree and four. The linearized model is given in Table 2and the estimated model parameters for the experimentalsetup are given in Table 3.

    is the area of Tank and

    is the area of the pipe flowing out of tank . The ratioof water diverted to tank one rather than tank three is -

    and -

    is the corresponding ratio diverted from tank twoto tank four. It can be shown that for the linear system,a multivariable right half plane zero will be present when-

    -

    .

    -

    -

    -

    -

    Table 2: Linearized model equations for the four-tank sys-tem.

    Sub-space identification is used to develop an empiri-cal linear state space model of the experimental apparatus.This model is then used for formulationand application ofmodel-based control methods. The identified state-space

    -

    -

    Table 3: Model parameters of the experimental four-tanksystem.

    model is used explicitly in the control algorithms. Themethods considered in this work include multivariable In-ternal Model Control (IMC) and Dynamic Matrix Control(DMC). Non-minimum phase behavior of the system re-quires that inner-outer factorization be used for the multi-variable IMC design. The right-half plane pole also cre-ates performance limitations for the closed-loop system.

    Because the system has an adjustable zero, the systemcan be adjusted to exhibit minimum phase behavior anddemonstrate improved control response.

    The physical system is constructed so that it appearsto emulate elements of an industrial unit operation. Fourfive-gallon tanks are used in the simulation. The addi-tion of submersible pumps in the tanks can simulate aleak disturbance in the tanks. An industrial DistributedControl System (DCS) from ABB-Bailey is used for con-trol of the system using the Freelance software package.The operator interface relies on a PC communicating withthe Bailey ProcessStation using TCP/IP on a private LAN.An interface has been developed using Dynamic DataExchange (DDE) that allows controllers developed usingMATLAB and Simulink to be used for simulation runs.The apparatus has the flavor of an industrial system whileretaining the flexibility needed to quickly implement andtest advanced control strategies.

    Sub-Space Process Modeling

    Most advanced process control methodologies require thedevelopment of accurate models of the system. For iden-tification, the process is typically forced by known in-puts and the resulting output responses are used for de-

    velopment of a linear model relating system inputs to out-puts. Some process data should be used for validation ofnew process models. In industrial applications, one mustconsider tradeoffs between the need for accurate processmodels, the disadvantage of large excursions from normaloperating conditions during modeling, the problem of ex-tended periods of process down time, and the desire for"plant friendly" input sequences.

    2

  • 7/28/2019 10.1.1.20.9673

    3/6

    To effectively balance the process modeling tradeoffs,one may employ a Pseudo-Binary Random Binary Se-quence (PRBS) of inputs. This type of input sequence caneffectively excite a multivariable process for use in iden-tification and provide an accurate process model whileavoiding large process excursions and periods of off spec-ification production. The PRBS of inputs can also be con-sidered a "plant friendly" sequence because only two dif-

    ferent levels of input are used.The resulting input and output data are used to create

    the linear model. For this task, a sub-space identificationprocedure is used. This procedure is described in [5]. Themethod develops an empirical linear state space modelfrom input and output data. For this type of modeling,no prior process knowledge is used; no assumptions aremade about the state relationships or number of processstates. Only the number of states used in the resultingprocess model must be determined.

    It should be noted again that the sub-space identifica-tion method is an empirical method. In many cases, amodel based on fundamental process knowledge (first-principles modeling) may be more desirable. This maybe true for a process with significant nonlinear charac-teristics and varied operating regimes. For process thatoperate around a single steady state or have little nonlin-ear character, empirical linear modeling can effectively beused for process control.

    0 500 1000 1500 2000 25000

    10

    20

    30

    Tank1level,cm

    0 500 1000 1500 2000 25000

    10

    20

    30

    Ta

    nk2level,cm

    0 500 1000 1500 2000 25005

    0

    5

    ResidualError,cm

    0 500 1000 1500 2000 2500

    40

    60

    80

    InputMoves,

    %

    ActualModel

    ActualModel

    Tank 1 errorTank 2 error

    u1u2

    Figure 2: Model validation for sub-space identification onthe four-tank system.

    Although there are fundamental models available for

    the four-tank system, the sub-space identification methodwas used to show that empirical modeling can effectivelybe applied to real systems. Sub-space identification of afour-tank process has been demonstrated in [2]. For thecurrent study, the normal input levels were 60% for bothpumps. A binary sequence was used that switched be-tween levels of 40% and 80%. Switching could occurevery 35 seconds. The resulting output levels never ex-

    ceeded +8 cm or -10 cm in relation to the nominal operat-ing point. The N4SID algorithm from the Matlab Identi-fication Toolbox was used to calculate the linear models.Four states are needed to effectively capture the processcharacter. This result agrees with knowledge of the pro-cess and the existing fundamental model. Figure 2 showsa comparison of the process and the model, as well as pro-cess residuals.

    Internal Model Control

    Internal Model Control (IMC) is a very effective methodof utilizing a process model for feedback control. IMCdirectly uses the process model and requires very limitedon-line computation. For a full discussion of IMC, seethe monograph by Morari and Zafiriou [4]. IMC uses aprocess model and "inverts" parts of the model for useas a controller for the process. Some portions of a linearprocess model cannot be inverted. These non-invertiblefactors include time delays and Right-Half-Plane (RHP)

    zeros. In addition, a process model that is not semi-propercannot be inverted. A linear filter can be added to makethe process model invertible. The filter parameters thenare available for adjusting the aggressiveness of the IMCcontroller.

    The following inner-outer factorization for the stableprocess follows the procedure described in [4]. Thelinear process transfer function can be written:

    where and are stable. Additionally,

    . The non-invertible portion of theprocess, , is given by:

    For , the state space matrices are given as:

    The invertible part of the process, , is:

    For , the state space matrices are given as:

    The following relation is given for and :

    3

  • 7/28/2019 10.1.1.20.9673

    4/6

    For this example, the orthogonal matrix is selectedas identity. To make the process semi-proper, is set to , with . For the factorization method, iscalculated as

    where is the solution of the algebraic Riccati equation:

    Process

    G(s) = N(s)M(s)

    Process Model

    -1

    M(s)N(0) F(s)

    Controller

    -1 u yr

    +-

    +

    -

    Figure 3: Internal Model Control (IMC) block diagramshowing Inner-Outer factorization of plant into

    the invertible portion

    and the non-invertible por-tion . is a filter used to adjust the aggressive-ness of the control loop.

    The controller for the IMC formulation is the inverseof the invertible portion of the process model. For off-set free steady state reference tracking in all channels,the product of the controller inverse gain and the pro-cess model gain must be identity. The current processmodel factorization does not guarantee this. It can con-veniently be achieved by scaling the non-invertible por-tion of the plant by Now, the noninvertible pro-cess model is and the invertible process

    model is

    . The IMC controller becomes

    . SISO IMC systems incorporate a scalarfilter for strictly-proper process models so that the result-ing controller is semi-proper. In this multivariable case,the process model is already semi-proper. Each of the er-ror signals sent to the MIMO 2x2 IMC controller can befiltered with a first-order linear filter,

    . Thisfilter allows for adjustment of the closed-loop dynamics.

    Figure 4 shows closed-loop performance of the IMCsystem for reference changes. In this example,

    are se-lected to .

    The process has zeros at values of and .The input direction corresponding to the RHP (as de-

    scribed in [6]) is:

    and the output direc-tion is . Multivariable performance lim-itations related to RHP systems are described in [3]. In thenominal case, the process is identical to the process modeland the filter time constants are set to 0. The comple-mentary sensitivity function, , for the nominal IMCsystem reduces to . Ideally, is identityat all frequencies. The presence of a RHP zero creates a

    0 100 200 300 400 500 60015

    16

    17

    18

    19

    TankLevels,cm

    0 100 200 300 400 500 60030

    40

    50

    60

    70

    80

    90

    100

    PumpInputs

    ,%

    Time, s

    Tank 1Tank 2

    Pump 1Pump 2

    Figure 4: Closed-loop reference tracking using IMC con-troller with .

    performance limitation for the system. In [4], it is shownthat for a nonminimum phase system with a singlezero can be arbitrarily selected so that only a single rowdeviates from identity. This implies that the performance

    degradation caused by the RHP zero can be driven intoa single output channel. The complementary sensitivityfunction for the 2x2 tank system with ideal performancein the first measurement is:

    and the complementary sensitivity function for the systemwith ideal performance in the second measurement is:

    where

    and

    are functions of the terms in the output

    zero direction. Significant interaction can occur when thevalues of

    are large. For the given system,

    is

    and

    is . This implies that choosing either input forideal tracking in the nominal case will have essentially thesame amount of interaction. This result is expected due tothe symmetric nature of the system. For the developedcontroller formulation, a first-order realization of isgiven as:

    This also demonstrates that the system and controller

    formulation is symmetric. Both output channels shoulddemonstrate equal performance limitations and interac-tions.

    Dynamic Matrix Control

    Dynamic Matrix Control (DMC) refers to the commercialimplementation of model predictive control (MPC) pro-

    4

  • 7/28/2019 10.1.1.20.9673

    5/6

    vided by Aspen Technology. Aspen is a member of theUniversity of Delaware Process Monitoring and ControlConsortium and has provided DMCPlus for student usein University of Delaware teaching laboratories.

    Figure 5: Screen shot of the DMC four-tank system mod-eling interface.

    Like other MPC algorithms, DMC uses an optimiza-tion criterion to choose control moves. Using an explicitprocess model for prediction of process outputs, DMCchooses an optimal sequences of control moves based ona trade-off between speed of setpoint tracking and avoid-ance of rapid changes in control inputs. Some specificfeatures of the DMC algorithm include the following:

    Applicability to multivariable and non-square sys-tems

    A step response model

    A quadratic optimization criterion

    Explicit tradeoff between setpoint tracking and ag-gressive of control action through an input suppres-sion factor

    Continuous adjustment of setpoints via linear pro-gramming to target the most profitable steady-stateoperating condition

    DMC has been presented for control of a similar pro-cess [1]. In the DMCPlus implementation presented here,students in the control teaching laboratory learn an ad-vanced multivariable control package that is not only in-dustrially relevant, but is identical to that found in indus-try. Figure 5 shows the DMCPlus modeling interface.Figure 6 shows a screen shot of the DMCPlus interfaceto the four-tank system. The DMCPlus system permitsstudents to explore several interesting aspects of the four-tank system:

    Controller Tuning: Aggressive tuning of a DMC orother MPC controller has the effect of computing a

    controller that is the inverse of the process. Sincethe four-tank system can be adjusted to have a righthalf-planezero, aggressive controller tuning can leadto a controller that has a right half-plane pole andis therefore unstable. Investigations on the lim-its of controller tuning and ability to track setpointchanges offer interesting opportunities for studentexperiments.

    Process Identification: One of the first steps in im-plementing a DMC controller is the identification ofa step response model for the process. The associ-ated software tools can be used to store and imple-ment different process models for differentoperatingconditions. In this way, students can also investigatethe effects of model mismatch on closed-loop perfor-mance

    Gain scheduled DMC: DMCPlus contains featuresto permit process gains to vary with operating condi-tions, thereby incorporating a particular form of non-

    linear model into the DMC algorithm. In the four-tank system, this permits models to be used over awider operating range, and students can compare thedifferences between gain-scheduled DMC to single-model DMC.

    Figure 6: Screen shot of the four-tank system DMC inter-face showing a closed-loop run.

    Implementation Details DMC implementation on thefour-tank system has some significant differences fromtypical industrial implementations:

    An industrial implementation of DMC is imple-mented in a cascade configuration that is built upona system of well-tuned, single-input/single-output

    5

  • 7/28/2019 10.1.1.20.9673

    6/6

    (SISO) regulatory controllers. Industrial DMC thenchooses setpoints to be implemented in these reg-ulatory controllers to effect process outputs. Withthe simpler experimental process, it is not possibleto implement DMC in a cascade formulation sincethe necessary instruments to measure flow are notpresent. Therefore, the DMC controller directly ma-nipulates pump speed to achieve optimal dynamic

    performance.

    Industrial implementation of DMC depend uponeconomic criteria to determine steady state setpoints,based upon prices of input and output streams in aprocess. Since the laboratory system has no eco-nomic criteria assigned to its operations, we haveto substitute equivalent criteria as DMC tuning pa-rameters. In these experiments, we assigned a neg-ative value (a cost) to pump speed and asked forthe DMC controller to choose operating points thatwould maximize profits (minimize costs) subject toa minimum-level constraint on measured tank levels.

    This is equivalent to achieving a setpoint for tank lev-els with minimum steady-state control action.

    Conclusions

    This paper has described advanced modeling and controltechniques that can be used by students in a hands-on ex-perimental control laboratory. The students will be intro-duced to sub-space identification for plant-friendly pro-cess identification. IMC is applied to the nonminimumphase process by mathematically factoring the model intoinvertible and non-invertible sections. DMC is used to

    control the system and explicitly implement process con-straints. Students are introduced to advanced modelingand control techniques in an application based environ-ment. They are able to connect classroom theory withconcrete laboratory experiences.

    The first offering of the laboratory class used the four-tank system for SISO and multivariable decoupling. Theadvanced identification and control methods presented inthis paper are being developedfor use in upcoming courseofferings. The 15 students from the first offering of thelaboratory class were asked to evaluate the laboratorycourse. These students were asked to rate the overall edu-cational value as well as the practical value of each labo-

    ratory experiment on a scale of 1 to 5, 5 being the highest.Table 4 shows the quantitative ratings of the separate ex-perimentsused in the first offeringof thecourse. Note thatthe four-tank system received the highest rating of the fiveexperiments. The students were also asked to give a freeresponse evaluation of each experiment. Some represen-tative student quotes from the free response section of thefour-tank evaluation include:

    Very good lab, extremely educational.

    This was the most intuitive control problem for

    me, very easy to see the direct physical results

    of our control action. My personal favorite.

    Real problem using industrial interfaces. Ex-

    cellent practical problem, but it takes too long

    due to the time constant.

    Q1 Q1 Q2 Q2Avg. St. Dev. Avg. St. Dev.

    Four-Tank 4.0 0.93 4.4 0.91Spring Mass 3.5 0.92 3.3 1.1

    Pendulum 2.9 1.3 3.2 1.1Servo Motor 2.9 0.99 3.2 1.1Virtual Boiler 2.4 1.2 3.1 1.3

    Table 4: Student evaluations of the multi-disciplinary lab-oratory experiments. There were 15 students taking theclass. Question 1 was: Rate the overall educational

    value of each experiment using a scale of 1-5 (1=poor,5= excellent). Question 2 was: Rate the practical valueof each experiment using a scale of 1-5 (1=poor, 5= ex-

    cellent).

    References

    [1] L. Dai and K. J. strm. Dynamic Matrix Control ofa Quadruple Tank Process. In Proceedings of the 14thIFAC, pages 295300, Beijing, China, 1999.

    [2] K. H. Johansson and J. L. R. Nunes. A MultivariableLaboratory Process with an Adjustable Zero. In Proc.American Control Conf., pages 20452049, Philadel-phia, PA, 1998.

    [3] K. H. Johansson and A. Rantzer. Multi-Loop Con-trol of Minimum Phase Systems. In Proc. AmericanControl Conf., pages 33853389, Albuquerque, NM,1997.

    [4] M. Morari and E. Zafiriou. Robust Process Control.Prentice-Hall, Englewood Cliffs, NJ, 1989.

    [5] P. Van Overshee and B. De Moor. N4SID: Sub-

    space Algorithms for the Identification of Com-bined Deterministic-Stochastic Systems. Automatica,30(1):7593, 1994.

    [6] S. Skogestad and I. Postlethwaite. MultivariableFeedback Control. John Wiley & Sons, New York,NY, 1996.

    6