Microprocessing and Microprogramming ELSEVIER
Mieroprocessing and Microprogramming 40 (1994) 867-870
Computer modelling of single sludge systems for the computer aided design and control of activated sludge processes D.A. Sanders", A.D. Hudson ", H. Cawte", O Fenskeb, G.A. Polan@, and G.E. Tewkesbury". "Department of Mechanical & Manufacturing Engineering, University of Portsmouth, Anglesea Road, Portsmouth, Hampshire, POI 3DJ, United Kingdom. bDepartment of Electrical & Electronic Engineering, University of Portsmouth, Anglesea Road, Portsmouth, Hampshire, POI 3D J, United Kingdom.
The initial work for the creation of a new automatic CAD system tor advanced effluent treatment processes is presented. The creation of a computer model |or a completely mixed aerator is described. The computer model consisted of two interacting non-linear differential equations, which were linearised to give an approximate computer model. Optimal control theory was applied to the design of a controller for this system and a series of experiments examined the system performance using both the new computer model and the new controller.
1. I N T R O D U C T I O N Control and simulation methods are described in the literature includin~~-3j. The computer model presented in this paper was used in a simulation program for the dynamic analysis of a single sludge system. The integration process within the package used the fourth order Runge Kutta method. The results were validated using results fi'om a published analog computer simulation141. The model was iinearised and proved to be a good approximation to the nonlinear system tbr small disturbances. A controller was designed for the linearised system which employed the Newton and Gauss elimination methods to determine gains for the controller. A second simulation program was then created and experiments conducted to provide a better understanding of the relationships between the state and control variables.
where: X = concentration of microorganisms, S = concentration of substrate, p. = growth rate, Y = Yield coefficient, and t = time. The yield coefficient was a function of the type of substrate, the microorganisms present, and the environmental conditions. It was assumed to be constant tbr a given process. The yield coefficient was determined experimentally and expressed as mass of organisms produced per lnass of substrate consulned. A simplified tbrm of general activated sludge system was used TM and this is shown in a diagram inI¢'1. In this form the system was considered as an aeration tank and a claritier. For the computer model, the system was considered as being completely mixed, that is, the influent mixed [idly with the organisms. An aeration tank was modelled by establishing material balance equations at steady state. The general mass balance equation was Accumulation = Input - Output - Conversion.
2. T H E C O M P U T E R MODEL The rate of substrate utilization was obtained by combining an expression lot organism yield with the organism constant growth rate equation to give dS/dt
=
The single sludge system consisted of an aeration tank without sludge recycle and this is also shown in a diagram in Fenske l('l. By considering a completely mixed reactor the material balance equations were similar to those used to model the aerator in the
- #.X/Y
The authors would like to thank EffTech Ltd, ~f Farnham, United Kingdom, llw their support during the project. 0165-6074/94/$07.00 © 1994 - Elsevier Science B.V. All rights reserved. SSDI 0165-6074(94)00070-0
868
D.4. Sanders et al. / Microprocessing and Microprogramming 40 (1994) 867-870
activated sludge process. These eqtmtions were: tot the substrate mass balance, Accumulation = Inflow - Outflow - Utilization V.dS/dt = QSo - QS - V . ( # ~ J Y ) . ( S . X / S + K,) where: ~ = maximum specific growth rate, and K~ = saturation constant. Introducing the hydraulic retention time of fluid in the aerator
dimensionless mean holding time was obtained by multiplying maximum growth rate by the retention time of the fluid at steady state, so that z = l~,,t~m~. Finally, the dimensionless time was defined by 0 = t/t:, = qJq, w h e r e t = V/q; ts = V / ~ , w h e r e q., is the steady state influent flow rate. The flow rate was used as a control and disturbance variable. The material balance equations were normalized and the substitution made tbr dimensionless time: Considering the substrate mass balance, ds/dO = (so -s).q/q, - r.(s.x/(s + k~))
dS/dt = (So - S)/t - #,,~,.(X/Y).(S/S + K,) and tbr the organism mass balance: Accumulation
= I n f l o w - O u t f l o w + Growth
For steady state the dimensionless influent concentration, So, equalled 1. This could change by applying influent disturbances to the system. Considering the organism mass balance:
- Endogenous decay dx/dO = (x0-x).q/q,- r.(s.x/(s + k~)) V . d X / d t = Q X o - Q X + V.~tm~,.(S.X/(S + K~))-V.Kd. X
where lq = endogenous decay coefficient Introducing the hydraulic residence time, d X / d t = (Xo - X ) / t - t~,,,~.(S.X/(S + I ~ )
Values tbr normalizing the equations were taken from Fan t~l and the differential equations were solved using the fourth order Runge Kutta method. This was implemented in a simulation program.
-Kd.X 2 . 2 . Experiments
The substrate and organism mass balance equations interacted because the biological processes produced new organisms using the substrate. Dynamic analysis was applied to the mathematical model derived for the single sludge system. Suitable data was selected in order to normalize the mathematical model and to give generic results. Values for the parameters were extracted from work by Fan t4j described in Fenske 161which used an analog computer. Thus, approximate results in terms of graphs were available to validate the results of the computer simulations described in this paper. 2.1 Normaliz~ttion of the system m o d e l The normalization was achieved as tbllows: s = S/So, x = X/Y.So, kj = KJSo. The substrate concentration, S, the saturation constant, K,, and the organism concentration, X, were normalized to the in fluent substrate concentration, So. The endogenous decay coefficient, Kd, was normalized to the maximum growth rate, ~t..... so that k= = K~/#,,,~. The
A step change was applied to the steady state influent flow rate, qs. The initial conditions of substrate, s, and organism, x, concentration were: s = 1 (influent substrate concentration), x = 0.00012 (inocuhnn of the system organisms). Four different flow rates were modelled. The results of the simulation suggested that tbr low flow rates the organism concentration had a single overshoot before it reached its steady state. At a high flow rate, wash out occurred, where no biological processes took place because all microorganisms were washed out of the aerator. These results were validated by the graphs of the analog computer simulationt41. The same steady states were achieved with a slightly different behaviour of the system during the transient period. A second experilnent dealt with step deviations in the influent flow rate, Aq, about the steady state flow rate, qs. The steady state conditions were valid tor this experiment. Graphs obtained ti'om the analog computer simulationE41 were used to confirm the numerical evaluation of the system by flow rate deviations. A flow rate increase caused a substrate increase and an organism decrease. Very high
D.A. Sanders et al. I Microprocessing and Microprogramming 40 (1994) 867-870
deviations caused a 'wash-out', where no biological action took place. The opposite effect was attained by flow rate reduction. Substrate and organism concentration decreased and increased respectively. Deviations of the influent substrate concentration were examined. The steady state values were the same as tbr the second experiment. Graphs from Fan 141 were adopted to validate the obtained values. A positive influent substrate step deviation ,,So increased the substrate concentrations. This returned to the steady state value once the organism concentration had increased to remove the input disturbance. A negative deviation had the opposite effect. This is shown graphically in tel
3. L I N E A R 1 S E D S Y S T E M A N A L Y S I S T w o filrther experiments were perforlned in order to provide results tbr a comparison of the behaviour o f the linearised system compared to the non-linear system. Comparable results were provided using the graphs from 14]. Solution of the nonlinear normalized single sludge system equations derived in section 2 gave two states, which were the substrate concentration s, and the organism concentration x. A linear state model was developed and the state equations linearised about the operating point(x0,th~) by expansion into Taylors series. For substrate mass balance,
d(s-So)/dO=
- {q/q~ + r.(K~.x/(K~ +s)'-)}.,~.As t . ( s / ( K , + s))~:nx + ((s0-s)/q~)~:Aq + (q/q~)~.~s0
869
equations of the Taylor series expansion. As a result, the deviations of the substrate concentration, As, and organism concentration, ,,x, were the state variables in the linearised system. The flow rate, ~xq, was the control variable and disturbances were caused by the substrate influent concentration, ~xx0. The linear system represented the nonlinear system at steady state for small deviations. 3.1 V a r i a t i o n s of the i n f l u e n t flow rate. A small flow rate deviation was applied to the nonlinear and linear systems. The values of the flow rate deviations were t,q= 10, ,,q= -10 lh ~ These results were also validated with graphs from Fan I~1. The difference between the nonlinear and the linear system response was larger for a positive flow rate step. A negative step resulted in a good approximation to the nonlinear system. The curves from the analog computer sinmlation confirmed the results, although there was a slight difference in the organism concentration curves. 3.2 Variations in s u h s t r a t e c o n c e n t r a t i o n . A small step deviation of the influent suhstrate concentration, ,,s0, was applied to both systems. The value of the deviation was aso = 25 mg V. The linear system provided a good approximation to the nonlinear system in terms of variations in the influent substrate concentration, Aso.
4. O P T I M A L F E E D B A C K C O N T R O L
-
where the subscript ~ denotes steady state. and for organism mass balance: d(x-s~/dO=
{ t . ( K , . x / ( K l + s))}~.,,s { q / q ~ - r.(s.x/(K, + s) - k,)}~.Ax + ((x 0 - x)/q~)~:,~q + (q/q,)~.AXo -
-
For the state model description the deviation variables were defined as follows: x l = (s-s~)= As, x~ =
(x-x~)
=
Ax, u :
(q-%)
=
zxq,
dl = (% -sc~) = As0.~, d: = (x~l - X~,~) = t~0 The coefficients for the A-matrix, B-matrix and disturbance vector were the respective coefficients related to the deviation variables f i o m the
Optimal feedback control (Dynalnic Progrannning) was applied to the linearised model of the single sludge system. A computer simulation provided the determination of an optimal state ieedback controller innnediately after user definition of the periormance index. System disturbances were applied in terms of influent suhstrate deviations, zs0 over a time, 0e 4.1 Step deviation in s u b s t r a t e c o n c e n t r a t i o n . This experiment simulated a step deviation of the infinent suhstrate concentration. The step value was set as A% = 25 lngl -~. Due to the opportunity to define finite steps, a sufficiently long duration time could be selected and the weighting coefficients tl~ ~ and el2~ were varied to define new performance indices fl)r the system. In the first
870
D.4. Sanders et al. I Microprocessing and Microprogramming 40 (1994) 867--870
part of the experiment the weighting coefficient qH tbr the substrate concentration, ~s, was varied while the weighting coefficient fbr the organism concentration, ~xx, remained equal to 1000. In the second part the opposite case was considered. In order to confirm the results and thus the method of determining the optimal feedback controller, a comparison was again made with results from 141. The results suggested that the more the substrate concentration, As, was weighted by its performance index coefficient, q~, the closer it could be maintained to the steady state value. It implied an increase of the organism concentration, ,~x, by comparing it with the response of the uncontrolled system. By weighting the organism concentration, Ax, through qz:, the value was also held close to the desired value at the expense of the substrate concentration, zxs. It increased its value compared to the controlled system. 4.2 Step of influent substrate concentration. This was similar, but with a finite step deviation. The perIbrmance index coefficients q~ and tb.2 were varied in the same way. The values fbr substrate influent concentration and dimensionless time were: ,,.so = 25 mg 1"; 0r = 2. By weighting the state variables, the flow rate controlled the substrate concentrations Ds and the organism concentration x so that they remained close to their steady state values. The other state variable had a deteriorated value compared with the uncontrolled system response. The controller was capable of lnaintaining one state almost unaffected, while the other state increased its value compared to the usual response. As long as this was within limits, the controlled system improved the behaviour of the system and made it resistant to disturbances of finite duration.
5. DISCUSSION AND CONCLUSIONS The biological process was modelled successfidly on a microcomputer. The process was modelled as a single sludge process. Future work will consider other process units, such as the clarifier. The process control parameters were difficult to measure and tbr this reason open-loop control is widely used in the industry. Future work will
investigate neural networks. The initial computer models for the activated slud-e= process were obtained from Busby TM and were generally for completely mixed aerators. Plug flow models were rare due to the difficulties in establishment and evaluation. Models of an activated sludge process with a suitable assumption tot the clarifier can be implemented using the simulation programs in order to investigate the importance of the interactions between the components of the process. The validation may also be achieved by comparing the results with those from other research papers. Future work will investigate alterations in the parameters of the programs to predict the fliture values and to provide information on how the system can then be controlled. The algorithms describing the biological processes will now be included in a larger automatic CAD system which will automatically design advanced effluent treatment systems.
REFERENCES
1.
2.
3.
4.
5.
6.
R.F. Lech, Automatic control of the activated slud,,e process. Water Research, 2, pp 81-90, (1978) D.1. Angelbeck, Shnulation studies on opthmzation of the activated sludge process, Journal WPFC pp 31-39, (1978) J.F. Andrews, Dynamic models and control strategies for waste water treat,nent processes, Water Research, pp 261-289, (1974) L.T. Fan, Dynamic analysis and optimal feedback control applied to biological waste treatment, Water Research, Vol 7,pp 1609-1641, (1973) J.B. Busby, Dynamic modelling and control strategies for the activated sludge process, Journal WPFC, Vol 47, pp 1055-1080, (1978) O Fenske, Investigation of waste water treatment processes, University of Portsmouth Project report, 117 pages. (1993)