Copyrighl © IFAC IIlIi, Triennial \l'orld Congress. Munich , FRG. IlIK7
WATER FLOW CONTROL OF A NATURAL STREAM: A CASE STUDY M. Papageorgiou and A. Messmer Dursc/i Co//slllt ICII//JH, PO Bux 2102-13, D-80()() ,\lii// c/il'll 21, FRG
Abstract. Design rules for control of water flow systems are applied to a particular control problem for a natural stream. Long distances between regulator gate and meas urement location are consid ered. Appl icati on of PI cont rol, a Smith predictor, and a nonlinear switching regulator are investigated. Comparison of control r esults is per formed by use of a simulation model based on a simplified form of the St. Venant equations. Keywords. Hater resources; water pollution; flow cont rol; PID control; time lag systems; Smith predictor.
I.
INTRODUCTION
where g is the gravity constant and ~ takes values in the region 0 . 55 ~ ~ ~ 0.6 monotonically increasing for hU > 2a. If h ~ a and hU > 2a , we have the slight~y simplified , but still nonlinear relationship (Bretschneider, Lecher , and Schmidt, 1982)
Wate r flow and wate r level control problems arise in several water resources systems, water distribu tion networks, and sewer control systems.
Papageorgiou and Messmer (1985) suggested some easily applicable design rules for a fairly broad class of water flow and water level control problems. Their results are extended in this paper to consi der flow control problems with long distances between regulator gate and measurement location. In addition, application of a Smith predictor and a nonlinear (switching) regulator to treat long time delays is investigated.
qout = Co • B • a • ~
(2)
5
with c 1.8 [mO. /s]. The gate can be openedoo r close d with a constant speed l¥, i. e.
The developed control methods are applied to a particular regulation pr oblem for a natural stream, in which flow time between regulator gate and measurement location is about 4 hours. A simulation model, used for testing efficiency of dif fe r ent controllers , is briefly presented and vali dated by use of real process data.
where u represents the control signa l taking ghe values I, 0, -I for opening, halting , or closing the gate respectively . In the case of discrete - time or quasi - continuous control, the control
variable u can be assumed to take any value between +1 and - I. Setting u = y , -I ~ Y ~ I, is then equivalent to
Section 2 presents some general mode ling aspects and section 3 describes the particular case study including the simulat i on model. Section 4 is con cerned with design of a PI-regulator, a Smith pr edictor, and a nonlinear (switching) control l er fo r the water flow process. Section 5 presents s imulati on r esults and compares regulators ' per-
u
o
sign (y)
°<
~
°
/y/
T <
/y/ t
T (4) ~ T
whe r e T is the sample time interval. Equation (4) represents a kind of pulsewidth modulation fo r the regulator gate velocity . Having (4) in mind, we can consider
formance .
2 . 110DELING ASPECTS The main subprocesses included in the control problem co nsidered in this paper are the regulator gate, the natural flow stretch, and the pipe flow .
a
=
t¥ • u ,
/u/
~
I
(5 )
The Regulator Gate
instead of (3) for controller design (Papageorgiou and Hessmer, 1985).
We consider a rectangular orifice with controllable height and denote q the outfl ow through the orifice, B the orifice,~utconstant width, a the contro l lable orifice's height and hU (h ) the waD ter level upstream (downstream) . q is given by the nonlinear relati onship (Pre~Mtand Schroder, 1966)
Wate r flow in channels , sewe r s , and natural streams can be described by the well - known St . Venant equations (Verworn, 1980), the first of which is a simple conservation equation
Nat ural Stream Flow
(I)
° %:i
(6)
M. Papageorgiou and A. !\[essmer where h is the water level of flow, F(h) the flow profile area, and t, x the time and space arguments respectively. The second St. Venant equation is given in simplified form by ah = I - IF ax S
(7)
with IS . the geometrical slope and IF the friction slope g1ven by • I 1/2 R(h)2/3 F(h)
(8)
S
where R(h) = F(h)/P(h) is the hydraulic radius, P(h) is the wetted perimeter of the profile, and c is a constant of the order of 30 for natural s~reams of the kind discussed here. For control purposes, the transfer function of a stretch of a natural stream can be approximated by a (variable) time dela y , if the stretch is sufficiently short and/or steep (Papageorgiou and Messmer, 1985) otherwise by a (variable) time d elay and a first orde r system (see e.g. Henderson, 1966), see also section 3. Pipe Flow If the re gul ato r gate is installed at the end of a pipe with circular profile, h in (I), (2) s hould be reduced by the quanti~y (Press and Schroder, 1966) 1f
2
(9)
Control Task
3
The usual reference value of q is q 1 = 10.7 m /s permitting a maximum treatment planE outflow of 3.3 m3 /s which is sufficiently high during dry weather. In case of rainfall, the reference value of q is increased to q 2 = 16 m3 /s to permit full utilization of the trelitment plant. For reasons not mentioned here, it is required that the water amount taken from the reservoir be limited to what is necessary for a reasonable operation of the treatment plant. Given these facts, the control task can oe specified as follows: (i) Flow q is the control variable to be regulated by use of the regulator gate. Reference values may ~witch from qrl to qr2' qr2 > qrl' and :1ce.versa. . . (ii) In case of sW1tch1ng q 1 ... q 2' 1t 1S r r important for q to reach the new reference value qr2 as Soon as possible in order to facilitate full utilization of treatment plant capacity. Short term overshooting is allowed if it leads to shorter regulation time. (iii) In case of switching qr2 ... qrl' rapidity of reachIng the new reference value is less important but q should not become less than qrl during the regulation period (no undershooting). (iv) Measurements of qd should be utilized in order to reduce sensitivity of control w.r.t. inflows qd (spilling). Sensitivity w.r.t. slow variations of qD (neighbouring streams) should be investigated. Simulation Model
where Land dare ltngth and diameter of the pipe r esp ., and A is a contant parameter depending upon friction characte ristics and Reynolds' number.
3. A CASE STUDY Pro cess Description
A sketch of the main part of the process considered in thi s paper i s shown in Fig. 11). The length of the natural stream stretch between regulator gate and control flow q is 16.4 km. This r es ults in flow times of approximately 4 hours. Water inflows to this stretch are: (i) Co ntroll able outflow q of the regulat or gate subject to the cog~Erai nt s (10)
(i i)
(iii)
The gate is installed at the end of a pipe with L = 1000 m, d = 2,5 m. Noncont r ollable but measurable inflow qd. qd represents spilling from th e reservoir upstream,which means that its usual value is ze ro, but that it can take very high values (50 m3 /s and more) durin g relativ ely s hort periods of time. Noncon tr ollable and nonmeas urable but just slowly time-varying inflows frof,' neighbouring small st reams in the order of 8 m3 /s, in total. The sum of these inflows is denoted by qD.
Water level of the reservoir upstream is practically constant . The outflow of a treatment plant reaches the river immediately after the measurement location for q. The treatment plant has a capacity of 5 m3 /s. In order to keep water quality of the natural stream within certain limits, outflow of the treatment plant is restricted to be less than 0.31 times q.
I)The real process being more complicated, only those parts which are essential for the main control task are presented in this paper.
The river flow has been simulated by applying space and time discretization to (6), (7), (8) with 6x = 200 m and 6t = 2s, assuming a trapezoidal flow pr ofile . For the r egulator gate, (I), (3), (4) have been utilized considering (9) for pipe friction. The simulation model has been validated by adjusting the parameters (mainly the width) of the trapezoidal profile so as to fit real measurement data. This was necessary because the r eal profile of the river i s rather irregular and besides, there are several weirs along the river flow which have not been included in the simulation model explicite ly. Figure 2 depicts simulation results and measurements at two sites of the riv e r s tretch fo r two inflow events. The measurements have been taken by use of provisorily installed instruments which do not correspond to the ones of Fig. I. The inflow in Fi g . 2 corresponds to qd' the gate outflow q being zero. qD had a composed constant value out of appr~ximately 8 m3 /s and has been s ubtracted in the curves of Fig. 2. Simulation results are shown to match quite well with real measurements. In particular, the nonlinear dependance of time delay on the level of flow is reproduced with high accuracy by the simulation model which can even tuall y se rve as a useful tool for design and testing of water flow controllers. The simulation model has been developed on a personal computer. The rate of computation time to real time is I : 15. Input Step Responses The simulation model has been used to derive both positive and negative input step responses of the flow process in the river stretch using q as . out 1nput and q as output. For qd = 0 , an d q = 8.8 m3 /s throughout the simulation, q was iRstantaneously in c reased from 0 to out 7.2 m3 /s at time zero, and was decreased back to o m3 /s at t = 7h, after q had reached a steady-
Water Flo\\' CO ll tro l of a Natllr,d Stream state . The step resp onses are shown in Fig. 3 . Imposing a linear first order, time delay transfer function (PTOT I ) for each step resp onse , we get f rom Fig. 3 (in min) +
TO
-
+
= 210, TO = 183, T = 75, T = 132
where TO are time delays , T are time constants of a f1rst order system, + an d - indi cati ng positive and negative step response re s pectively. The results lead t o the following observations: (i) TD » T+, TO » T-, i.e. both for the positive and for the negative step response, time dela ys a re by far longer than time constan t s. Thi s means that the pr ocess behaviour is dominate d by the flow durati on , as expected (see section 2) . (ii) T~ > T;, i.e . time delay is longer for the positive s t ep response. This is pr obab l y not because of the sign of the input s tep but because of the value of the initi a l steady-state being lowe r at t = 0 than at t = 7h. It is well-known that flow dur a ti on increases monotonically with decreasi ng f l ow val ues. (iii) T+ < T-, i . e. time constan t is shorter fo r the positive ste p response, but this time the reason is probably connec t ed to the sign of the input step. In summary, imposing a PToTI-behaviour to the flow process, we en d up wit h moderate time - delay variations depending upon the flow state and stronger time constan t variations depending up on the sign of flow level change . 4. REGULATOR OESIGN
reached in exactly one time interval, prov ided u does not reach its bounds, otherwise the reference value qR is r eac hed with an a~co rd ing delay . Since water level upstre am 1S pra c t1 cally constant, no dynamic compensation for time variations of hU is provided. Outer Loop Regulator Design PI-~egulato~.
Assuming the pr ocess behaviour to be PTOTI according to the input step responses of Fig . 3, a PI-r egulat or with Laplace tr ansfe r function
can be use d for process cont r ol . Setting TR = T, the pr ocesses first ord er system is compensa ted and the re s ulting open-loop transfer function becomes ITo which can be treated by use of the rul es given in Papageorgiou and Messmer (1985) to lead to minimum settling times and 5 % overshooting . In the case of negativ cha nges of t he r eference value, however, underShooting i s not permitt e d for this case st ud y (see section 3) and hence a lower value for KR should be emp l oyed. Thus, on-line switching between two values, K~, K~, has been adopted fo r this part i cula r application acco rdin g to the sign of the r efe r ence value change. +
The values of K , KR have been spec ified on the R basis of the maximum expected TO- va lu e , i.e . T; of section 3, in ord er to guarantee stabi lit y under all circ umstances. Sensitivity of th e con trol results with r espect to TR can be shown to be low . Hence , the non linear va ri at i ons of the process time constant T which have been obse rved in sect ion 3 , have an insignificant impact on cont r ol r es ult s , if TR = 0.5 (T+ + T-) is chosen .
Control System Oecomposition Regulator gate signal u is the input signal, whereas q t r epresents a cont r ollable inflow to be utiliz g~ as an interim variable for q-regulati on (Fig . I ) . But since qout is measurable without time delay, its r egulat i on using input u can be performed almost instantaneously compa red to the expecte d l ong r egulati on time requir ed fo r q-regulation. The ove r all cont r ol system can thus be decomposed int o two cascaded con trol loops (Fig . 4) : (i) i ~ ne ~ loop : qout-regulat1on u~ing input u w1th ref erenc e values qR pr ov1 de d by the outer cont rol l oop oute~ loop : q-regulation using input qR and (ii) assuming the transfer funct i on of the inner loop to be unity. Microcomputer based con tr ol is applied to both l oops , the sample time interval being 60 s. Design of the "rapid" inner-loop is performed in a dis crete-time environment , whereas the "slow !! out e r loop can be considered to be qu asi - continu ous and is analysed in con tinu ous-time terms. Inner Loop Regulator Oesign In view of (2), (5), th e z-transfe r function of th e inner pro cess is given by qout (z) / u( z)
= Kp . T / (z-I)
( I 1)
where K = Co 0/ B /hu max' with hU max th e maximum expecte§ water level ' up s trea' (see Papageorgiou and ~lessmer, 1985). Ap pl y i ng a simp le P-regulator
Switching
~egulato~ (SR ) . Sin ce short -term overshooting i s allowed and the main disturbances of the process are ei t her meas urable or s l owly varying, open - loop control can be ap plied in case of positive r efe r ence value changes , e . g .
( 14 ) where qo i s a r ough estimate of qo' and ~ > 0 gua r antees that q (the new r eference value) w111 be exceeded by ap~ li ca t ion of (14). Swi tch ing to PI-regulation (with KR) i s p erfo r~ed when q ~ qr has been reached, and PI-contrails kept act1ve until a new hi gher reference value is ord e red . This switching r egulator leads to t he minimum possible time (ie equa l to the flow time) required to r each (and to exceed , however) the new reference value in case of a positive change . In the steady- sta t e and for negative reference value changes , PI-control is appl i ed acco rdin g to the switching st rat egy described above . Ouring application of openloop cont r ol ( 14) , PI-calculations are cont inu ed using actual values of input qR as initial condition fo r integration, as suggested by Parrish and Brosilow (1985). In this way, switching from open - loop to closed-l oo p control will be bumpless. A rough estimation qo for qo is ach i eved by
where r is sufficiently sma ll to lead to a s low adaptive behaviour compared to the process dynamics.
u
( 12) p~edicto~ (SP) . It i s well-known that the Smith predictor (Fig . 5) compensates the impact of time delay in the closed-loop system in case
Smi th I /(T • Kp)' the ref e rence value qR is
M. Papageorgioll and A. Mcssmcr
368
of perfect matching of the process by the model. This leads to substantially shorter regulation times compared to PI-control. On the other hand, SP is known to be very sensitive with respect to model mismatching if a perfect compensation of time delay is assumed for parameter design. However, Palmor (1980),and Parrish and Brosilow (1985) have shown that sensitivity can be reduced to a desired level by sufficient decrease of KR (Fig. 5) for the payoff of an according increase of regulation time.
A sensitivity investigation has been performed computationally by Ioannides (1979) for the case of SP application t o a first order system with time delay. A similar investigation has been performed for the problem considered here, taking into account the possible variations for TD and T resulting from the input step responses of section 3 . As a result, suitable va lues for KR, T, TD have been specified, which represent a trade-uff of robu st ness vs. regulation time . All regulator types pr esen ted lead to zero steadystate error in case of an input or disturbance step. In case of a disturban ce ramp with slope Y PIcontrol leads to a steady-state error Y/K~t, whereas SP-control leads to a s teady-state error y(T DR + I/K~P), as can be easily s hown . Since K~P has been cnosen 3 1/2 times higher than K~I, the steady-state error for SP is abo ut 20 % l owe r than for PI-control. A more comprehensive comparison of the three regulators is provided in section 5, after pre sen tati on of the simulation result s . Dynamic Disturbance Compensation Dynamic compensation using qd - measurements (Fig. I ) is presented here for the PI - regulator . Compensati on can be accomplished simpl y by substracting qd from qR' whicn results from (13) . Since qR is sub ject to the bounds (10), a slight modification of this compensation scheme has been introduced as shown in Fig. 6. The modification leads to positive rather than negative cont r o l errors (as required in section 3) in the case of sudden and st rong qd- changes as can be easily deduced from Fig. 6.
rather insensitive w.r.t. T , only KR will have R to be adjusted in case of application of PI or SR . Application of SP (Fig. 5) implies experimental adjusting of three parame ters K , Ta' T . Since DR R the i~pact of increasing or decreas1ng each one of these parameter is no t c l ear l y provided by the theory, a lengthly experimentation period is expec ted. In view of this fact and recalling that for this case study short regulation times are more important than small overshooting areas, SR has been finally selected for app li cation in real life. Dynamic disturbance compensation Dynamic disturbance compensa tion (Fig. 6) has been tested by assuming a rapid and strong change of qd' as shown in Fig. 8 . Control results both for 1ncreasing and fo r decreasing of qd are in acco rdance with th e desired priority of control subgoa l s , Fig. 8.
6. CONCLUSIONS Water flow regulat ors are designed and tested for a natural stream of 16.4 km in length. Applying a cascade d cont r ol structure , the nonlinea r dynamic behaviour of the outer control loop is shown to be dominated by a long variable time delay. Impo sing a linear PT1TD-transfer f ur.ction, the region of variations of the linear system parameters is established . A PI-regulator, a Smith predictor, providing minimum rp.gulation time for prescribed robustness, and a switching regulator, a re designed and tested by simulation . The mathematical model used for simulation tests and step response generation is based on the St. Venan t equations and is shown to reproduce real measurement data with s ufficient accuracy. The switching regulator is found to be most suitable for th e pa rti cu lar applicat io n considered .
REFERENCES 5. SIMULATION RESULTS Step Changes of Reference Value qr Performance of the proposed contro l system is te sted using the simulation model of section 3. We ass ume an initial steady state with q = 10. 7, q = 1.9, qd = 0, qD = 8 . 8. At t = 0, the r2¥~rence value is in c r eased to 16 and at t = 12 h, q is reduced back to 10.7. Fig. 7 depicts behavi6ur of PI, SR, SP control. Let us first notice that inner loop control leads to almost identi cal curves for qR an~ qout (Fig: 7) wh~ch confirms the cascaded scheme 1ntroduced 1n sect10n 4. Comparison of PI, SR, SP Control For a positive step qrl + qr2' qr2 is reache~ in 4.6 h, 6.7 h, 8.9 h by SR, SP, PI respect1vel y, as shown in Fig. 7. Overshooting area is biggest for SR followed by PI and SP . For a negative s tep q 2 + q I' all regulator s lead to the desired a~ymptor1cal behaviour, SP being quicker than PI and SR. In real life, application of the control system will require a preliminary experimentation phase including final adjusting of regulator parameters. Since PI-control (see (13» has been found to be
Bretschneider, H., Lecher, K., and Schmidt, M. ( 1982). Taschenl:uch del" p!assel"v.il"tschaft. Verlag Paul Parey, Hamburg. llenderson, F.N. (1965). Open chan' el flow, Nacmillan Publ. Co. - Collier Macmillan Publ., New-York - London. Ioannides, A. D., Rogers, G.J. and Latham, V. (1979) . Stability limits of a Smith cont roller in simple systems containing a time delay. Int . J . COi:tl"ol , 2. 9, 557-563 Palmor, Z. (1980). Stability properties of Smith dead-time compensator contro llers. Int . J. Coi'tl"o l , 32, 937-949 Papageorgiou, M. , and Messmer, A. (1985). Continuous -time and discrete-time design of water flow and water level regulators. Automatica , 21 , 649-661. Pacrish, J.R., and Brosilow, C.B. (1985). Inferential Control applications. A~tomatica , 21 , 527 538 . Press, H., and Schroder, R. (1966) . nydl"omechanik im f!assel"mu. Verlag Wi lhelm Ernst & Sohn, Berlin-MUnchen. Verworn, l,l. (1980). Hydrodynamische Kanalnetzberechnung und die Auswirkungen von Vereinfachungen der Berechnungsgle i chungen . .::i ttei lunge;, des Im tituts ful" Wassel"l.,il"tsc1aft , C>Jdl"ologie ulld landuril"ts c;zaftlicheYl flass el"mu del" Univem itdt liannovel", 47, 177-326.
Water Flow COlltro l o f a
~atllral
St ream
outflow of treomen t plant
A sketch of the main part of the process conside red
Fig. I
simulatio n measure ments
o
lD
oN o
0
280
o
flow 177 km downstre am
lD
E u
-0
<1l" ~
o
u::: o N
1.0
280
21.0
120 Time (min)
the river stretch for two inflow even t s Simulat ion results and measure ments a t two sites of
Fig . 2
- -TO + --~-+--
~--
16 +---~---+-~~---~----~
~
g 8
:Jo
Time (h) Fig. 3
Step respons es of the river flow process
M. Papageorgiou and A. Messmer
370
r----------., Smith Predictor
I
process
I
I I
q,
I
I
L ____________ ., I I I
Fig. 4.
Decomposition of the overa ll con tr ol system into inner and ou t er control loop
I I
L_________________________ JI Fig. 5.
A Smith Predictor for a first ord er sys t em with time delay
q
Fig. 6.
Dynamic compensation of qd
16+-----f.-+-...;::z:s:=r===~
_ 12
'"E u
'"~
8
IT:
O+O--~--~5~--~--~10--~--~~15~--.-~2~O--.---Time (h)
'ig . 7.
Reference val ue step fo r PI, SR, SP control
32
_24 ~
E
~
'"~161+--4--~~~----~--------~============------------
IT:
\
\
\
, ' ..... _-
8
I
I
qR
---------------------
I
I
r..J
Ti me (h)
Fig. 8. Results of dynamic compensa ti on of qd