Predictive controller design for non-linear chemical processes - NOPR

0 downloads 0 Views 1MB Size Report
This paper focusses on the design of Dynamic Matrix Control (DMC) for non-linear systems in real time using ..... is run in real time at sampling rate of 10 s.
Indian Journal of Chemical Technology Vol. 14, July 2007, pp. 341-349

Predictive controller design for non-linear chemical processes N Sivakumaran & T K Radhakrishnan* Process Control Laboratory, Department of Chemical Engineering, National Institute of Technology, Tiruchirappalli 620 015, India Email: [email protected] Received 27 June 2006; revised received 15 March 2007; accepted 20 April 2007 This paper focusses on the design of Dynamic Matrix Control (DMC) for non-linear systems in real time using Matlab and dSPACE interfacing card. A pH neutralization and quadruple tank process are considered here for predictive control, based on the system matrix formulation using data obtained from real time, for which, linear optimization based constrained controller design is performed. The controller effort weighing (λ) and number of predictions steps (P) are tuned for the systems in real time. The systems are analyzed for reference tracking and disturbance rejection behaviour. Keywords: Dynamic matrix control, Interfacing and optimization IPC Code(s): B01

Most chemical processes are non-linear and exhibit complex dynamics like input and output multiplicities, inverse response, multi model behaviour, and changes in the directionality of process parameters. Thus, there is no way fixed controllers like PID, be effective in control of these processes. They result in ON-OFF type controllers, which frequently switch causing large oscillations, poor control and wastage of resources. Model predictive control (MPC) is an important control methodology, which can overpower the drawbacks of a PID controller. MPC can handle process characteristics such as time delays, model uncertainty, constraints on input and output, multivariable interactions and non-minimum phase behaviour. These capabilities of MPC, contribute to their high rate of success in control applications. Due to their explicit handling of constraints and easy extendibility to multi-input multi-output (MIMO) systems with delay and inverse responses, they have been widely used in industries. It incorporates a class of control algorithms where a dynamic model is used to predict the process for a given horizon called prediction horizon and optimizes the process performance over a control horizon. The essence of MPC is to optimize the process objective function, over the manipulated input, which forecasts the process behaviour. The

forecasting is accomplished with the help of predictive model and therefore the model is the essential element of the MPC controller. The step or impulse response coefficients are used in design of MPC controllers for chemical systems. These coefficients are used to form a dynamic representation of the process. Using such a model, a control law can be formulated in which the parameters involved are controller effort weighing, predictions steps and control horizon. The control law is typically the solution of a least-squares optimization problem with a quadratic performance objective (cost function). The sampling time of the process also plays a crucial part in real time processes, as the objective function has to be solved within the sampling time. Most of the linear systems can be discussed in state space form. Hence, it is not surprising that state space models are predominately used in formulating MPC. However optimization over inputs and constraints on them leads to non-linear control1. For non-linear systems, better the model of the system, better will be the process forecasting. Non-linear plants having static and dynamic components can be represented as block-oriented models like Weiner, Hammerstein and Volterra. The pH neutralization typically falls into Weiner class of models. This discrete model can be incorporated in

342

INDIAN J. CHEM. TECHNOL., JULY 2007

the MPC framework to get the control strategy. They can be still augmented for superior performance by inception of constraints in the models and including uncertainty to guard against model error2. State space models too can be employed to depict non-linear systems. These non-linear state space models can be bifurcated into linear and non-linear subsystems. However, these discrete systems require non-linear optimization within the specified sampling time, which is tedious in real time. To overcome such a problem one can linearize the non-linear block along a reference trajectory within the prediction horizon. Such a technique reduces the optimization into a quadratic problem, which is more practical to implement3. Non-linear systems once controlled through state feedback using input output linearization can be adopted into MPC for greater dynamic performance and robust against disturbances and model/plant mismatch4. The closed loop stability of the such discrete system can be ensured by imposing a final state equality constraint or by extending the prediction horizon to infinity. Such stability constrained MPC is essential for unstable systems. But such a constrained MPC scheme requires state estimators when the values are not fully measurable5. The linear MPC can be modified for non-linear systems. The dynamic matrix or the system response matrix (A) is the function of magnitude of input signal used for generating it. For non-linear case the system matrix is chosen as a first order Taylor series linear approximation based on the available non-linear process model. This linearization is carried out at every current operating point and response matrix is updated at every sampling instant. Also, by developing a system matrix that is a function of both operating point and magnitude of input signal the non-linearity can be better represented6. A system exhibiting multi model behaviour, designing multi linear controllers at specific level of operation can control a type of non-linearity. The final output forwarded to the controller is an interpolation of the individual controller outputs weighted based on the current value of the measured process variable7. The performance analysis of the resulting controller is crucial. The model performance is to be tested based on the statistical criterion and the servo and regulatory response of the plant can be ascertained on the basis

of Integral of Square Errors (ISE). The ISE values can serve as performance indices for comparing two or more responses. The MIMO dynamic matrix formulation has been designed8, discussing the methods of extending the prediction horizon beyond one step for MIMO processes and stability issues of the DMC under the Lyapunov criterion has been discussed9. In this work, the controller tuning is based on optimization of prediction horizon and the controller effort weighing. The corresponding responses are obtained. A real time DMC is implemented for pH process (SISO) and Quadruple (MIMO) process using Matlab and dSPACE interfacing card. DMC formulation

Consider a 2×2 MIMO system. The outputs of this system using its step response model can be represented by the following equations: N

y1(k) =∑ai∆u1(k −i) +aN+1u1(k − N −1) + i=1

N

∑bi∆u2(k −i) +bN+1u2(k − N −1) +d1(k)

…(1)

i=1 N

y2(k) =∑ci∆u1(k −i) +cN+1u1(k − N −1) + i=1

N

∑di∆u2(k −i) +dN+1u2(k − N −1) +d2(k)

…(2)

i=1

where ui(k) and ∆ui(k) are the ith input and its variation ui(k)-ui(k-1) in sample time k respectively. ai ,bi ,ci and di are the step response coefficients at the sample time i. N is the sample time at which the step response reaches its steady state. Any difference between the measured (output) and the one predicted by the model is represented by d1 (k ) = y1meas (k ) - y1model (k )

…(3)

d 2 (k ) = y2meas ( k ) - y2model ( k )

…(4)

These errors account for model/system mismatches and external disturbances. The future predictions of the system outputs for the prediction horizon P, are given in the following matrix-vector relation

SIVAKUMARAN & RADHAKRISHNAN: PREDICTIVE CONTROLLER DESIGN

[ y1 (k + 1)....

y1 (k + P )

 a1 a  2    aM    aP c  1  c2    cM    cP 

0. a1

... 0

b1 b2

a M −1 ...

a1

bM

a p −1 ... 0...

a P − M +1 0

bp d1

c1 ....

0

d2

c M −1 ....

c1

dM

c P −1 ....

c P − M +1

dp

T

y2 (k + 1).... y2 (k + P )] =     ∆ u1 ( k )   bM −1 ... b1   ∆ u1 ( k + 1)      :   bP −1 ... bP − M +1   ∆ u1 ( k + M − 1)   0..... 0  ∆u 2 ( k )   d1 .... 0   ∆ u 2 ( k + 1)    :   d M −1 .... d1   ∆ u1 ( k + M − 1)    d p −1 ..... d P − M +1  .0.. b1

0 0

343

The control moves, ∆u is determined according to the solution of the following optimization problem.

Min( y sp - ylin )ΓT Γ( y sp - ylin ) + ∆uT ΛT Λ∆u ∆u

…(8)

where ysp is the desired output trajectory.

∆u = ( AT ΓT ΓA + ΛT Λ)- 1 AT ΓT Γ( ysp - y past - d )

...(9)

Solving the problem, results in the following relation for the input variation for Γ =I and Λ = λI.

∆u = ( AT A + λ2 I ) −1 AT ( y sp − y past − d )

...(10)

Case study 1: pH neutralization é a2 ê ê a3 ê + êê : ê êaP+ 1 êc ê 2 ê ê c3 ê ê : ê ëêcP + 1

a3 a4 : ... c3 c4 : ...

...

aN + 1 0

b2 b3

: 0

:

aN + 1 ...

cN + 1

cN + 1

0 : 0

bP + 1 d2

b3 b4

....

... d3

bN + 1 ....

d3 d 4 : d P + 1 .... d N + 1

bN + 1 ùé ∆u1 ( k - 1) ù úê ú 0 úê ∆u1 ( k - 2) ú úê ú ú : úúêê : ú ú ê 0 úê∆u1 ( k - N + 1)úú d N + 1 úúêê ∆u2 ( k - 1) úú úê ú 0 úê ∆u2 ( k - 2) ú úê ú : úê ú úê ú 0 ûúêë∆u1 ( k - N + 1)úû

aN +1u1 (k − N ) + bN +1u2 (k − N )    d1 (k )     d (k + 1)  ( 1) ( 1) a u k − N + + b u k − N + N +1 1 N +1 2   1     :    +  aN +1u1 (k − N + P − 1) + bN +1u2 (k − N + P − 1)   d1 (k + P − 1)     d2 (k )  cN +1u1 (k − N ) + d N +1u2 (k − N )    cN +1u1 (k − N + 1) + d N +1u2 (k − N + 1)    d2 (k )     :    cN +1u1 (k − N + P − 1) + d N +1u2 (k − N + P − 1)   d 2 (k + P − 1) 

…(5) which can be written equivalently in the vector form as

y lin = A∆u + y past + d

...(6)

P and M are the prediction and moving (control) horizons respectively. ypast denotes the effect of the past inputs on the predicted outputs. The matrix A consists of the step response coefficients and is called the dynamic matrix of the process. Since future estimates of the mismatches and external disturbances are not available, it is customary to assume, d j (k + i) = d j (k ), i = 1, 2,...P; j = 1,2.

…(7)

Process description

An acid base pH neutralization process is a nonlinear system. The pH value has a logarithmic relationship with the reagent flow. The process has a varying gain, which is larger at neutrality areas and smaller at other zones. The pH system under this study constitutes a continuous stirred tank reactor (CSTR) in which the reaction between 0.1 N sodium hydroxide and 0.2 N acetic acid takes place. The reacted stream coming out of the CSTR is let out such that the hold-up in the vessel is 7.4 L. The experimental set-up is shown in Fig. 1. The set-up also constitutes storage tanks for the reactants. The output variable is the hydrogen ions in the effluent stream measured as pH. It is measured using a glass electrode based pH sensor (Meredian II make) in combination with a pH transmitter (Honeywell make) of output range 4 to 20 mA. The experimental parameters are shown in Table 1. The flow rate of the acid and base streams are manipulated using variable speed dosing pumps (Fluid Metering Inc. V-200) with input current range of 4 to 20 mA. The flow operating range of the pumps is 0 to 0.8 L/min. Simulink and Matlab are the software used for designing the control system and creating object codes. The object codes are downloaded into DS1104 controller board in the dSPACE card, which is 16-bit card fixed in PCI slot of PC motherboard. This card has an IBM power PC processor with speed of 250 MHz and 32 MB flash RAM. The external interface board has A/D and D/A channels. The real time monitoring and acquisition of the plant is done using Control Desk. The control scheme in this study uses acid flow rate as manipulated variable. The base flow rate is maintained at constant rate of 0.4 L/min.

INDIAN J. CHEM. TECHNOL., JULY 2007

344

Fig. 1 — Schematic of the experimental set-up for pH control. Table 1 — Experimental parameters of neutralization process Variable V FA FB CA CB

Meaning

Initial setting

Volume of the tank Flow rate of CH3COOH Flow rate of NaOH Concentration of CH3COOH Concentration of NaOH

7.4 L 0 - 0.5 L/min 0.4 L/min 0.2 mol/L 0.1 mol/L

Dynamic matrix for pH neutralization process

The continuously stirred tank reactor is one of the widely adopted mixing tank in industries and hence taken up as the mixing vessel. It has two input streams, one containing sodium hydroxide (NaOH) and the other acetic acid (CH3COOH). The acid and base are stored in acid and base tank respectively. Perfect mixing is provided using stirrer to maintain uniform concentration throughout the reactor. In this work, base flow rate is kept constant (0.4 L/min) and only the acid flow rate is varying (0 to 0.5 L/min). Figure 2 represents this titration curve and shows the four zones used in the process. The dynamic matrix for the four zones is operated using step tests in each zone and switched automatically depending on set point. The theoretical curve is generated from the process model10. The step response coefficient matrix

Fig. 2 — Titration curve

is formed for different predictions of 12, 15 and 20. The control law (10) requires a additional parameter called move suppression coefficient (λ). A proper choice of this parameter is required to effectively control the system and this parameter is strongly coupled with the predictions steps (P) and sampling time of the process. The process as evident from the titration curve exhibits variation in the process gains, which is maximal at the neutrality zone. The process is run in real time at sampling rate of 10 s. The tools

SIVAKUMARAN & RADHAKRISHNAN: PREDICTIVE CONTROLLER DESIGN

345

Fig. 3 — Multivariable process

used for real time implementation are dSPACE card for interfacing with sensor and dosing pumps, control system development, object code generation are done using Matlab-Simulink RTI blocks and data acquisition is done using dSPACE control desk. Case study 2: Four-tank system

The experimental set-up is as follows. Two diaphragm pumps capable of handling any type of fluid, are used to discharge water from a reservoir into four overhead tanks. The two tanks at the upper level drain through adjustable restriction valves into the two tanks at the bottom. The liquid levels in the bottom two tanks are measured using capacitive transmitters. The piping system is such that each pump affects the liquid levels of both measured tanks. A portion of the flow from one pump is directed into one of the lower level tanks (where the level is monitored). The rest of the flow is directed to the overhead tank that drains into the other lower level tank through an adjustable restriction, which is a modification from that Gatze et al.11 experimental set-up. By adjusting the bypass valves of the system, the amount of interaction between the inputs and the outputs can be varied. The experimental set-up is shown in Fig. 3. Additional flow disturbances can be introduced into the upper level tanks. These external unmeasured disturbance flows can fill the top tanks for which a high precision external Fluid Metering

Table 2 — Experimental parameters of quadruple tank process Symbol State/Parameters h0

ν0 ai Ai γ1 γ2 kj G

Nominal levels Nominal pump settings Area of the drain in tank i Areas of the tanks Ratio of flow in tank 1 to flow in tank 4 Ratio of flow in tank 2 to flow in tank 3 Pump proportionality constants Gravitation constant

Value [11.65; 9.6; 8.6; 5.6] cm [60; 60] % [0.236; 0.1985; 0.159; 0.173] cm2 65.755 cm2 0.453 0.307 [5.5143; 4.9728] cm3/(Vs) 980 cm/s2

Inc., dozer pump is used. The nominal operating conditions are shown in Table 2. Two diaphragm pumps are used in controlling the flow to the tanks. The levels in tanks 1 and 2 are the process variables considered. Dynamic matrix formulation

The main three parameters on selection considered here are prediction horizon P, control horizon M and the weighing function on control effort, λ. The appropriate choice of these parameters are strongly dependant on sampling time and the nature of the process.

346

INDIAN J. CHEM. TECHNOL., JULY 2007

The two pumps are operated at their steady state values and the steady state levels are noted. One of the pumps is excited and the corresponding flow rate from the pump to the tanks change, affecting the levels in each tank. These changes in the two tanks for a change in one of the inputs are shown in the Fig. 4. The same procedure is repeated for the other pump and the reaction curve for the unit change in each input is shown in it. From the above responses, the single dynamic matrix formulated since the process is only mildly non-linear. This is used in obtaining the controller settings with the number of predictions chosen at 5, 10, 20 and with the control effort weighed at 0.1, 0.5 and 0.7 respectively.

Fig. 4 — Unit step responses

Results and Discussion The adjustable parameters that affect the closed loop performance of DMC are prediction horizon, P, control horizon, M, sampling time, T and controller weighing function, λ. The parameters considered for tuning in this work are P and λ. The quantitative change in the system performance in closed loop is studied by changing the prediction horizon P at λ values of 0.1, 0.5 and 0.7. The prediction horizon selection is based on the process open loop settling time such that it includes the steady state effect of all the past inputs. The control horizon tuning can be avoided in the presence of λ tuning. A single value of time constant with T (10 seconds-pH neutralization process, 5 seconds-Quadruple tank process) is chosen for all the tests. Thereby, in this work the required closed loop performance is brought by tuning P and λ. In neutralization process, the set point tracking and change in manipulated input for the plant is shown in the Fig. 5(a) and (b) at different predictions levels for λ = 0.1. As the prediction step is increased from 12 to 15 the system response is faster and less oscillatory. Further increase in predictions step causes more oscillation. Hence the effectiveness of the controller is

Fig. 5 — (a) Set point tracking response for λ = 0.5; (b) Set point tracking for change in manipulated input

SIVAKUMARAN & RADHAKRISHNAN: PREDICTIVE CONTROLLER DESIGN

for λ = 0.1 is up to P=15. The λ value is then increased to control the aggressiveness of the controller and is found to improve the performance at value of 0.5 and the ISE values are shown in Table 3. Further rise in the λ value causes a rise in the ISE values for all the set points except for set point of 7. This has to be compensated by reducing the prediction step to 12 from 15 as shown in Fig. 5(a). In all the three cases, prediction step of 20 does not performs satisfactory irrespective of the λ values. In addition to the set point tacking capability the control system must withstand any disturbances. A disturbance is created as a step increase in the base flow rate from 0. 4 to 0.48 L/min. The disturbance rejection capability of the controllers with settings of λ = 0.1, P=15, λ = 0.5, P=15 and λ = 0.7, P =12 is tested. The ISE values are calculated for these responses are shown in Table 4. The disturbances rejection and change in manipulated input for the plant are shown in Fig. 6 (a) and (b). The disturbance rejection shows the better performance for settings of λ = 0.5 and P=15. The disturbance rejection is also smooth without any overshoot. The quadruple tank is subject to set point tracking in both the two levels. The magnitude of change is placed at ±5 cm. The set point tracking and change in manipulated input for tank 1 and tank 2 is shown in the Fig. 7(a), (b), (c) and (d). The changes induced are opposite in direction, exposing the non-minimal nature of the process. The corresponding response of the controller under each prediction horizon P at 5, 10, 20 and controller effort weighing λ at 0.1, 0.5 and 0.7 are obtained between each possible combination of the two. The ISE for each case for a value of P=20,

347

for both positive and negative changes in the reference, is obtained and is tabulated in Table 5. From the corresponding responses along with ISE values, the best settings for the controller are selected. The process is subject to an external disturbance (10% of nominal flow rate), after the level reached steady state. For the corresponding input, the change in the process variable and also the response of the controller, its action to reject the disturbances are obtained. The procedure is repeated for both the tanks using the settings obtained from the reference tracking. The disturbances rejection and change in manipulated input for tank 1 and tank 2 are shown in Fig. 8 (a), (b), (c) and (d). It is clearly seen that with an increase in the number of steps of prediction, the controller has more information to make a decision in control. Therefore the predictions as they increase, give a better control. On the other hand, controller effort weighing becomes important at lesser prediction horizons. This is because, with the reduction in the number of steps, the controller

Table 3 — ISE values for set point tracking Set point

λ = 0.1 Cumulative value of N

λ = 0.5 Cumulative value of N

λ = 0.7 Cumulative value of N

5 7 9 11

52.6 51.3 98.7 48.4

35.87 34.5 42.8 36.6

33.6 23.207 32.4 24.3

Table 4 — ISE values for load changes Set point

Load change in base flow rate

λ =0.1 N=15

λ =0.5 N=15

λ =0.7 N=12

11 9 7

0.4 to 0.48 LPM 0.4 to 0.48 LPM 0.4 to 0.48 LPM

5.00 11.32 6.755

4.37 7.75 14.82

4.9 10.8 17.27

Fig. 6 — (a) Disturbances rejection response (a) at set point of 9; (b) Disturbances rejection for change in manipulated input

348

INDIAN J. CHEM. TECHNOL., JULY 2007

Fig. 7 — Set point tracking; (a) Reference tracking tank 1; (b) Reference tracking tank 2; (c) Change in manipulated input for tank 1; (d) Change in manipulated input for tank 2

Fig. 8 — Disturbance rejection for λ=0.7, P=20; (a) Disturbance rejection for tank 1; (b) Disturbance rejection for tank 2; (c) Change in manipulated input for tank 1; (d) Change in manipulated input for tank 2

SIVAKUMARAN & RADHAKRISHNAN: PREDICTIVE CONTROLLER DESIGN

Table 5 — ISE values for set point tracking Set point

Controller effort weighing (λ) 0.1

+5 cm -5 cm

453.76 693.05

+5 cm -5 cm

450.96 1385.17

Controller effort weighing (λ) 0.5 Tank 1 436 551.82 Tank 2 412 1292

Controller effort weighing (λ) 0.7 419.76 415.62 398.2 1268

becomes aggressive and oscillatory. Therefore, now the need is to change the effort weighing of the controller. Hence, a very satisfactory result will be obtained with a large prediction horizon and a very low controller effort weighing as shown by their ISE values which is tabulated in Table 5. Conclusions An experimental tuning methodology is attempted for SISO and MIMO systems. The systems are nonlinear in nature. The MIMO system exhibits inverse response and is interacting. Both the systems are open loop stable. The pH neutralization process has a dynamic matrix for a process, which is formed for various predictions steps. Based on quadratic objective cost function, a MPC controller is designed. The performance of the controller is studied for prediction steps of 12, 15 and 20 with λ values at 0.1, 0.5 and 0.7. The designed controllers are tested for set point tracking and disturbances rejection behaviour of the non-linear system. As the prediction steps are increased the controller performs better and becomes aggressive at higher predictions. The λ values are then used to control the aggression and the rise in λ values slows down the process response. The responses are quantitatively analyzed based on ISE values for both set point tracking and disturbance rejection. Based on the ISE values, acceptable oscillations, response time and modest control effort the prediction horizon with 15 steps and λ=0.5 is found to work well for the given SISO system. Thus the SISO DMC tuning is done using move suppression coefficient and predictions

349

steps independent of the process gains which play a crucial part in designing PID controllers. The quadruple tank process has been modelled. The system’s dynamic matrix has been obtained from the corresponding step response coefficients. The controller design, based on prediction horizon and the controller effort weighing, is performed, and for each controller setting, the corresponding responses are obtained. Based on the ISE values of the responses, the best settings are selected. Using the settings, the process is subjected to a 10% load disturbance and the controller performance is obtained. From the ISE values and the oscillations, rise time and settling time, the prediction horizon (P) of 20 steps, control horizon (M) of 5 step and a controller effort weighing (λ) of 0.1 has the best performance and may be used in control of the quadruple tank multivariable process. References 1 2

3 4

5

6 7

8

9

10 11

Rawlings B J, IEEE Trans Cont Sys Tech, 5 (2003) 38. Norquay J S, Palazoglu A & Romagnoli A J, Application of Weiner Model Predictive Control to a pH Neutralization Experiment, IEEE Transactions on Control Systems Tech, 7 (1999) 437. Rau M & Schroder D, Model Predictive Control with Nonlinear State Space Models, IEEE AMC, 7 (2002) 136. Yugeng X, Hao S & Zhongjun Z, Model Predictive Control for a class of Non-linear Systems, paper presented at International conference IEEE TENCON, 19 (1993) 428. Cheng X & Krogh B, Stability Constrained Model Predictive Control for Non-linear Systems, paper presented at the IEEE Conference on decision and control, 1997. Mutha K R, Cluett R W & Penlidis A, Automatica, 34 (1998) 1823. Dougherty D, Arbogast J & Cooper D J, A Multiple Model Adaptive Strategy for DMC, paper presented at the IEEE Proceedings of American control conference, June 2003. Haeri M & Beik Z M, Extension of Non-linear DMC for MIMO Systems, paper presented at the IEEE Proceedings of American control conference, June 2000. Han P, Lee Y, Liu H J & Wag D F, A New Dynamic Matrix Control Algorithm with Lyapunov Stability, paper presented at International conference on control, Automation, Robotics and Vision, Dec. 2004. McAvoy T J, Hsu E & Lowenthal S, Ind Eng Chem Res, 11 (1972) 68. Gatzke E P, Doyle F J & Vadigepalli R, Ind Eng Chem Res, 40 (2001) 1503.

Suggest Documents