Compurers chcm. Engng Vol. 22, Suppl., pp. S459-S466, 1998 0 1998 Rtblisbed by Elsevier Science Ltd. All rights reserved Printed in Great Britain 0098-1354/98 $19.00 + 0.00 PII: SOO98-1354(98)00088-X
&Optimal Regulation of a pH Control Plant Fernando Tadeo Departamento de Autom&.ica, Facultad de Ciencias, Universidad de Valladolid, 470 11 Valladolid, Spain E-mail:
[email protected] Fax: +34 83 423161. Tlf.: +34 83 423566
Anthony Holohan Department of Electronic Engineering, Dublin City University, Glasnevin, Dublin 9, Ireland E-mail:
[email protected] Fax: +353 1 7045508
Pastora Vega Departamento de lnfornratica y Autom$ica, Fact&ad de Ciencias, Plaza de la Merced S/N, Universidad de Salamanca, 37008 Salamanca, Spain. E-mail:
[email protected] Fax: +34 23 294584
Abstract
This paper presents an innovative approach to controller design, and applies it to the pH-control problem. The proposed approach uses a robust controller implemented with a full two-degree-of-freedom (2-DoF) structure. The first or “feedback” DoF was designed using a standard p-synthesis approach. A procedure based on a novel variation of I]-optimal control theory is applied to design the second or “open loop” DoF. This design may be carried out completely independently of the first DoF, provided an appropriate factorization of the feedback controller is used. The approach is illustrated by the design and evaluation of a control system for a laboratory scale pH-control plant. The resulting controller was implemented and tested on the physical plant. It was found that it gave good performance over widely varying conditions. Specifically, the open loop properties of the psynthesis feedback controller acting on its own, were improved significantly by the use of a certain class of IIoptimal second DoF controller block. We conclude that the tradeoff between good command tracking and reasonable plant inputs given by a feedback controller can be improved by the use of the proposed approach, a novel variation on /l-optimization applied to the second DoF controller block. 0 1998 Published by Elsevier Science Ltd. All rights reserved. Keywords: Robust Control, Process control, Hinlini/Ll INTRODUCTION
controllers with good stability margins (Maciejowski, 1989). Given the problem of plant variation over a wide range of operating conditions, the method of psynthesis seems especially appropriate, because of its ability to treat real parameter uncertainties. Thus, it is possible to ensure mathematically that the controlled system is going to be stable, despite fairly wide parameter variations.
The objective of this work is the design of a control system for a pH-control plant. Of course, many different approaches to pH control have previously been applied, including Linear Adaptive, Model Based, Nonlinear Adaptive and Neural Network Controllers (see Gustafsson and Waller, 1992, Loh et al, 1995 and the references therein). Unfortunately, as noted by these authors, there are some weaknesses in these solutions: the control structures are quite complex, so they are difBcult to implement in distributed control systems, and there is a lack of robustness. A key difficulty seems to be the wide range of operating conditions over which good control is required, and the extent to which the dynamics vary as a consequence. In view of these difficulties, robust control design methods seem especially appropriate, since they give rational
The specific plant used for the present study had previously been controlled using classical PID controllers. However, the quality of control obtained was unsatisfactory, due to wide variations in the plant parameters at different operating points and to a general lack of robustness. Consequently, the well known design method of p-synthesis was employed (Zhou, Doyle y Glover, 1996), as reported in Tadeo and Vega (1996). This design gave adequate robustness and stability properties, although the s459
S460
European Symposium on Computer Aided Process Engineering--X
response to command changes was not good. To improve this poor response to command changes, a 2DoF control structure is appropriate. Thus, the psynthesis controller was retained as the feedback controller, but it needed to be augmented with a second DoF controller block. This paper emphasizes more the design of the second or “open loop” DoF controller block. The use of a 2-DoF structure has long been the practice in industry. Notwithstanding this, it is only recently that control theorists have fully and properly understood the advantage of separating open and closed loop design in an optimization framework (Pemebo, 1981). Youla and Bongiomo (1985) and Grimble (1988) solved this problem in the LQG case, Yaesh and Shaked (1991) and Edmunds (1994) in the H, case. This paper presents a design method for the second or “open loop” DoF controller block, based on a novel variation on optimal 11 control theory. It is argued that the approach has distinct advantages. At present, II-optimal control theory is now quite mature on the theoretical side. (See Dahleh and DiazBobillo (1995) for a comprehensive treatment.) However, there are disappointingly few reports on its use in applications, certainly at implementation level on real-life plants. Also, the authors know of no previous literature on the study and application of IIoptimization to full 2-DoF control. The paper is organized as follows: Firstly, the pHcontrol laboratory plant is described, and a corresponding non-linear model is obtained. The theory used to design the 2nd DoF II-optimal controller is developed briefly in the next two sections. Then the proposed approach is applied to this plant, the designed control system is evaluated using simulations, its implementation is outlined briefly, and the results of real-time experiments are discussed. Finally, the conclusions are presented.
SYSTEM DESCRIPTION
Liqnid Pump
j Mhing Tank
cwhlnk
Figure 1: Laboratory Plant
Plant Model Although the modeling of pH-control processes is well studied (Gustafsson and Waller, 1966), in this case it is only necessary to have a simplified model, based on first principles. Assuming the input liquid is pure water, that the HCl has constant concentration, and there is perfect solution, mixing, and no buffering, the following model can be obtained (Perez et al., 1995) dNd _ qoNd qaNd qaN, --__-_---+dt M M M
pH = -lOlog Here, r is the measurement time constant, M the mass of liquid in the tank, qa is the acid mass flow, q. is the liquid mass flow, Nd is the acid concentration in the tank, Ni is the measured concentration and N, is the input acid concentration. The objective of the control system is to control the pH of the liquid in the tank (y), using the acid mass flow (u) as the control variable. The model parameters were estimated using measured data.
The Laboratory Plant THEORY OF 2-DoF CONTROLLERS This pH-control plant consists of a stirred tank where a solution of high concentration of HCl is mixed with water to obtain a liquid of controlled pH, which ranges from 2.0 to 4.0. The mixture’s pH is measured using a pH-meter (Kent EIL9143), which presents appreciable inertia. The water is fed from a tank using a pump, which produces a variable flow depending on the level of liquid in the tank. (Figure 1).
Two-Degrees-of-Freedom Structure This paper presents the design of 2-DoF controllers by application of 11 norm optimization. The 2-DoF controller structure which is proposed includes two terms: a feedback compensator K, which is used to obtain good closed-loop properties noise rejection, (disturbance and measurement sensitivity reduction, robust stability, etc.), and a command filter R, which is used to attain good openloop properties (set-point tracking with small control
European Symposium
on Computer+Aided
effort). The proposed control stmctmeisobtainedby factoring the feedback controller K into two blocks: the error filter Fl, which contains all the unstable poles of K, and the output filter F2, which contains all the unstable zeros of K. The resulting control structure is shown in Figure 2, where (2) K = F,Fz u = F, (Rc--Fzy ) (3)
S461
Process Engineering-8
Then the set of all controllers that stabilize the feedback system is given by: K = (Y - QD)(X - NQ)-’ = @ - Qsrl
(? - QD)
@)
Where Q is any stable transfer function (Vidyasagar, 1985). In other words, a transfer function K stabilizes the system if and only if it can be written in this form for some stable Q.
Separation principle
It is now shown that by using a particular factorization of the feedback controller K, the command filter R can be designed independently of the feedback controller K. Let T,, and Tyc denote, Ffedback~mpema+r L ___-_-_I
Figure 2: 2DoF structure Compared with other proposed 2-DoF (Youla and Bongiomo, 1985; Grimble, 1998; Yaesh and Shaked, 1991; Edmunds, 1994) this particular structure presents the following advantages: .
??
??
??
It can successfully treat controller poles which are unstable or on the stability boundary, by including them in Fl . It can consider controller with zeros unstable or on the stability boundary, by including them in F2. The open-loop and closed-loop properties can be completely separated by factorizing K as shown in lemma 1. Thus, the design of the command filter can be done completely independently of the feedback compensator. It can be readily implemented in most distributed control systems.
To prove these properties, first it is necessary to describe the set of stabilizing compensators of any plant. This can be done by using the Youla Parametrization, which is now presented.
respectively, the transfer functions from command input c to the control signal (plant input) u and to the plant output y. The problems of designing each DoF are decoupled and separated.
Lemma I (Separation Principle) Let G be a linear and time-invariant system, expressed as a stable right coprime factorization G = ND-‘. Let K be a stabilizing feedback compensator, with left coprime factorization K= %‘?
and which obeys the Bezout identity
%D-?N=I. For the 2-DoF structure given by u = F, (Rc - F2y), (and shown in Figure 2). ry K is factored as K = FIF2, where F, = Xi-’ and Fz =P then TEc = NR and T,,, = DR Proof Computing T,, and Tyc Tyc = ND-‘Y-lRb + Y-%ID-‘~I T,, = Y-lR(I +Y-IXND-‘r’ After a little algebra and using the stated factorization gives the result directly (Vidyasagar, 1985)
Youla Parametri@ion
Any (matrix) transfer function G can be written as the product of two (matrix) transfer functions: G = ND-’ (right factorization) or G = D-‘G (left factorization). The factorization is called a stable coprime factorization if N ( g ) and D ( D ) are stable and have no common unstable zeros in the closed unit circle, in the discrete time case. Given such a stable coprime factorization, it is always possible to find X, Y, g and Y stable and with no common unstable zeros such that (Bezout identity)
THEORY OF II-OPTIMIZATION II-optimizafion
In many practical situations disturbances and measurement noises act continuously on the system, so it is not adequate to model these inputs as bounded-energy signals, as in & design method. In spite of this, the maximum amplitude of these signals is usually known, so it is possible to describe them as bounded-amplitude which can be s&r=& mathematically described as lldllb I 1, where ~~&, (4) is the peak-norm, which is equal to the maximum
S462
European Symposium on Computer Aided Process Engineering--X
amplitude of the signal: I(uI[, = max/u(t)l Moreover the commands
control mainly easily. always
that are usually applied to a
system are usually well known: they consist of step or ramp inputs which can be bounded For instance, if the input is a step there is a maximum possible value /c/l,0 _
the command input is a ramp, its slope is bounded: I)(1-2-l )c/l, I smaX, where z-l
is the unit delay
function z-‘u(t) = u(t -1). A similar approach can be followed to other signals and performance specifications (Dahleh and Diaz-Bobillo, 1995).
quantity is not a well-formed optimization problem. For strictly proper plants, there is always a delay of m>O sampling intervals between command and output. This is equal to one if the continuous model of the plant is strictly proper, and is greater than one if there is a delay in the continuous plant (that is the case in many process control problems). Thus, the tracking error can not be smaller than /c(O)/ (with null initial conditions), as illustrated in figure 3. This consequence of the initial value theorem shows that the error is necessarily 100% at the first sample time. Hence, this problem formulation must be modified.
A typical 11 control system specification is to find the stabilizing controller K which minimizes the maximum amplitude of the outputs of the system for every possible (bounded) input. If the relationship between these inputs and outputs is given by a transfer function M, which depends on the feedback controller K, this optimal control can be stated as K = arg iin,, y:, I(M(K)ull m (6) U
I
It can be shown (Vidyasagar 1986) that this is equivalent to K = ag Mm& IIM(K)/, .> where
0
10
I
Figure 3 : Tracking error for strictly proper plants denotes II 111
the
11-norm:
llHlll = zlhil
) being Firstly, we propose to take the tracking error to be
{hi}the impulse response of the system H. This is the 1I-optimization problem, which has been thoroughly studied in the literature (Dahleh and DiazBobillo, 1995 and the references therein). The IIoptimization problem can be transformed to a semiinfinite linear programming problem, which can be solved using any of the available techniques, which are based on approximating this primal problem or its dual. In this paper the following methods are applied: The FMV (Finitely Many Variables) method, which is based on truncating the primal problem, obtaining an upper bound; and the FME (Finitely Many Equations), which approximates the dual problem, obtaining a lower bound.
Optimal design of the commandfirter
(one-block)
The main objective of the control design problem is to ensure the best possible tracking properties: the outputs should follow the corresponding command inputs as closely as possible. This objective can be expressed mathematically as choosing R to minimize the maximum size of the tracking error (difference between output and command signal) for every possible command: ir$ Ip sui J” - ~11~. However, ossi ec
choosing the command filter R to minimize this
so the objective function to be optimized is
(7) Secondly, it is appropriate to consider carefully which kind of commands can be expected in a real system. The set of commands that are usually applied to a real system is usually quite limited. Considering as command inputs the whole set of amplitude bounded but otherwise arbitrary signals (as in the standard 11 approach) would lead to extremely conservative designs. So the direct application of the standard 11 theory to the second DoF is not appropriate, because the sets of signals treated is far too large for commands. Now, most of the commands applied to real systems have a limited magnitude and slope. This paper proposes to describe the commands set as the set of signals with bounded slope, as it is a more realistic characterization. The optimal synthesis problem then becomes: (8) inf y - CZ-m jl I/m R &(k)?$-l)lss By application of the separation principle and the definition of induced norm this problem can be transformed to the one-block 11 optimization problem: (9)
S463
European Symposium on Computer Aided Process Engineering-8
WDR 1
Optimal design of the commandfilter
(two-blocks)
Minimizing the tracking error alone (Eq. 8) can sometimes lead to unreasonable large control effort, exceeding the range of the actuators. To overcome this shortfall, it is necessary to consider also the effect of the prefilter R over T,, That is, it is desirable to keep T,, small in a given frequency range. This can be carried out by including in the optimization of Eq. 9 the minimization of llWTucII, , where W is a certain weighting which shapes the response of the plant input u to commands. Usually a high pass filter is used to reduce high frequency components in u.
This minimization problem must be constrained by the fact the R should not cancel the unstable zeros of N, D or W. These conditions correspond to the interpolation constraints:
Q2h)=”
(D2(Oi)= 0 Moreover, it is necessary to add the feasibility constraints which relate both blocks of the minimization: st. (l-z-+-l+ - GND-‘W-‘@, = -sz-m
The design problem may now be written as inf f%)(T~c(R)-z-mI) Ret, (I l-z
W,(R)
//
(1o)
1
which is an 11 two-block optimization problem. The design method is presented in Theorem 1:
Theorem 1:
Let G be a linear and time-invariant system, with right coprime factorization G = ND-‘. Let K be a stabilizing compensator factored as K = FIFz according to Lemma 1. Suppose that the control law is u = Ft (Rc - FZy) (Fig.2). Under these conditions, the set of commands is V C = &(k)-c(k-l)l ,8,$;:0] then the optimal command filter R which minimizes the 2-block problem
is given by: R =
N--l
@I
+
zvrnI
1
(11)
where @l is the solution of the 11 minimization problem:
@L,.“,2 LII@‘1*2ll, St. (1- z-l 1Q, - sND-‘w-i@,
= 4z-m1
(12)
It is possible to see that the feasibility constraints include the interpolation constraints, by evahrating the feasibility constraints at zi, pi and Oi. Then, the interpolation constraints are redundant, and can be dropped. Finally, to obtain the command filter it is only necessary to undo the substitution in any of the blocks. lf this is done in the first block,
R=N-’
-1 h---l -’ @~+z-~I 6
DESIGN OF TEE COMMAND FILTER FOR THE pEI-CONTROL PLANT The first step of the proposed design method is the design of the feedback controller, which can be designed using any of the available techniques. Here, for the pH-control plant, there is a previous usynthesis controller K, which was found to gives adequate feedback properties, so it was decided to use it as the feedback controller. This K was factorized as needed by the separation principle. This is necessary to allow the command filter to be designed independently of the output and error filters, i.e. of the feedback controller.
Proof (Tadeo and Holohan, 1995)
Applying the separation principle (Lemma 1) to the selected control structure, it is possible to substitute T with NR, and T,, with DR, obtaining the 11 n%imization problem:
Weight selection
The command filter was designed using Theorem 1. With the assumptions previously discussed the plant delay (including the zero-order hold) is equal to one, so, in this case, m=l_ There are two design
S464
European Symposium on Computer Aided Process Engineering-8
parameters that must be selected from the information available about the plant: ??
The optimal filter was calculated from the optimal solution of CD1, as shown in Equation Il. Expressed as a FIR filter, it is:
6 is the maximum expected slope of the command signal. In the pH-cont.rol plant the extreme command variation corresponds to a change from pH=2.0 to pH=4.0, which means a concentration change from 0.0 1 to 0.0001, so the maximum slope is 6=0.0 1
R(z-‘)=0.01578+0.04194z-‘+0.07463z-~+0.11110z-3+0.12993~-~ +0.12284~-~ +0.05070~-‘~
+0,02897z-”
+0.10941z-‘+0.09191z-8 +O.O149h-”
0.12749L4 +0.071952.’
+0.00648z-‘~--0.001X8~-~4
EVALUATION OF THE FINAL DESIGN ??
The weight W shapes the control effort. To reduce the control signal at frequencies greater than 0.0 1 it was chosen to be a 1st order FIR high pass filter, with cut-off frequency of about 0.01. , the transfer function selected was k
,
where k was selected to be k = 10e6. This value was obtained from the steady-state expected value. The frequency response is shown in Figure 4. 1o_5Amplitude ,
. . . ..I
Control weigth I
Comparison with the one-degree-of-freedom structure
The effect of the command filter on the reference, control and output signals was studied. As this is a real system, it is not possible to reproduce the experiments exactly. So first the advantages of using the 2DoF structure will be shown in simulation. To do this the linearized system was simulated, and a command input composed of a ramp input with slope equal to the maximum expected slope (O.Ol), followed by a constant command.
I o-6
1.
W81
10-A
10-l
IO”
1
IO’
frecuency (fadhec)
Figure 4: Control weight for the pH control plant
Reference: Firstly, the filtered command r corresponding to the above command was calculated. The result is shown in Figure 5, where it is possible to see that the command has been adequately filtered, giving a softer command, without overshoot, and with a time constant smaller than 8 seconds. This reference is better than the original command, because it can be considered more realistic as a desired output signal. Cornand
Falter
II-optimization of the conmtandfilter To solve the minimization problem stated in Theorem 1, a set of routines was written using Matlab. Starting from the plant right coprime factorization N and D and the chosen design parameters Gand W, the required sequence of linear programming problems corresponding to Equation 12 were set up. These were then solved using the linear programming routine in Matlab’s optimization toolbox. From the methods available to transform the 11 optimization problem into a finite-dimensional linear programming problem, for simplicity reasons, the FME method was selected. Initially the truncation index of the impulse response (n), was a small value (of n=8), and then the optimization problem was solved for increasing values of n until the difference between consecutive optimal values was sufficiently small. Satisfactory convergence was obtained when n=l8, corresponding to an optimal value of 0.089038. The first term contributed with 0.061576, and the second with 0.02746 1.
Figure 5: Filtered command 2. Control signal: Figure 6 shows that the shape of the control signal, with the command filter R included, is adequate.
European Symposium on Computer Aided Process Engineering-8
S465
for the plant to operate over a wide range of pH values, with neither oscillations nor steady-state error. The prefilter, designed using H-optimization techniques improves the response to command changes The speed of response to command changes and the shape of the control effort of the overall system are adequate.
lZ5 10
8
CONCLUSIONS 00
IO
20
30~l~40 5o a ‘O Figure 6: Control signal when the command is filtered
3. Output variable: Finally, the dynamics of command tracking was checked. The simulation of the output signal is shown in Figure 7. Note that the output tracks the command faithfully, without steady-state error, overshoot or oscillations. The ramp tracking delay is small (about 14 seconds). The figure also shows the response obtained when the Znd-DoF controller block is omitted. It is clearly less satisfactory.
wthout
_ -i____ I’,
command filter
,_-- -- -.- .._. --. -.
..
/
,’ f
’
/’ ’ / ,/
wth
command filter
,,J’/
0
f&f--!
3u 4” >” SamplcJ Figure 7: Output Variable L”
w
Controlling the real plant
The control of the plant was carried out using RBGULA, a real-time control software package developed at the University of Valladolid. It runs on personal computers and is able to control plants with up to 10 control loops providing different advanced control techniques (adaptive, optimal, robust etc.) (See Acebes et al., 1995). The command filter was implemented in WGULA as a FIR filter with direct implementation; the error and signal filters were implemented as IlR cascade filters. The control system was tested on the real plant. The results obtained are shown in Figure 8, which shows that good control performance was achieved. The previously design feedback controller makes possible
This paper has presented the improvement of a pHcontrol process by using a full twodegrees-offreedom (2-DoF) controller structure. The first DoF or feedback controller was designed using the psynthesis approach. The second DoF controller block, the command filter, was designed using a novel variation on Ii-optimal control theory. This optimization was chosen because it is reasonable in practice to bound the derivative of the command. This permits optimizing the maximum amplitude of the tracking error, which leads to au Zl-opumimtion problem. As far as the authors know there has been no previous study of II-optimization with full 2-DoF stmcture, possibly because of the necessity of modifying the standard theory before a well-formed mathematical optimization problem can be obtained. The resulting controller was tested in real-time by using the control software package called RBGULA. The system controlled with the 2-DoF controller allowed the plant to operate in a wide range of pH values, in spite of wide variations of the plant parameters. The performance at the desired working points is satisfactory. The system is stable in the desired range of parameter variations, with a good response to command changes The idea of 2-DoF Ii-optimization has been shown to be promising. The theory presented in this paper can be applied to other chemical process which are difficult to control with previous techniques, it being only necessary to evaluate a bound on the derivative of the command tracking error and a weight on the control effort. The proposed approach has been shown to improve the response to commands, without changing the feedback properties of the system.
REFERENCES Acebes, L.F., Achirica, J., Garcia. M., Prada, C., 1995, A simulator to train plant operators of a beetsugar factory, System Analysis Modelling and Simulation, Vol. 18-19, pp. 659662 Dahleh, M.A., Diaz-Bobillo, I.J, 1995, Control of Uncertain Systems: a Linear Programming Approach, Prentice Hall
S466
European
Symposium
on Computer
Aided
Process Engineering-8
Edmunds, J.M., 1994, Output Response Taming of One- and Two-Degree-of Freedom Controllers using an H, approach. ht. Journal of Control. 59, pp. 1119-1126
Tadeo, F., Holohan, A.M., 1995, Two Degrees of Freedom L1 and 11 Optimization. Internal Report DCU/EE/AMH/97/1 Dublin City University. Rep of Ireland. To be submitted.
Grimble, M.J., 1988, Two-degrees of Freedom Feedback and Feedforward Optimal Control of Multivariable Stochastic Systems. Automatica, 24, pp 809-817
Tadeo, F., Vega., P., 1996, ,&$timal Control of a Laboratory Plant, IEE Automatic Control Conference. Exeter, UK
Gustaf..son, T.K., Waller, K.V., 1992, Nonlinear and Adaptive Control of pH, Ind. Eng. Chem. Res., 31, 2681-2693 Gustafsson, T.K et al., 1995, Modeling of pH for Control, Ind. Eng. Chem. Res., 34, 820-827 Loh, A.P., Looi, K.O., Fong, K.F., 1995, Neural Netwok modelling and control strategies for a pH process, J. Proc. Control, 6, 355-362 Perez, O., Tadeo, F., Vega, P., 1995, Robust Control of a pH Control Plant, IEEE CCA’95, Albany Pemebo, L., 198 1, An algebraic Theory for the Design of Controllers for Linear Multivariable Systems. Parts I and II, IEEE Trans. On Auto. Control, 26
lee
contml
Vidyasagar, M., 1985, Control Systems Synthesis: A Factorization Approach, MIT Press Vidyasagar, M., 1986, Optimal rejection of persistent bounded disturbances. IEEE Trans. On Auto. Control, 31 Yaesh, I., Shaked, U., 1991, 2-DoF H,-Optimization of Multivariable Feedback Systems, IEEE Trans. On Auto. Control, 36. Youla, D.C., Bongiomo, J.J., 1985, A Feedback Theory of 2-DoF Optimal Wiener-Hopf Design. IEEE Trans. On Auto. Cokrol, 30 Zhou, K., Doyle, J.C., Glover, K., 1996, Robust and Optimal Control, Prentice Hall
SIgnsI
60
Figure 8: Control signal (top) and pH (bottom)