PII:
Chemical Engineering Science, Vol. 53, No. 5, pp. 995—1007, 1998 ( 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain S0009–2509(97)00411–9 0009—2509/98 $19.00#0.00
Dynamic modelling of a biogas tower reactor M. Pahl and J. Lunze* Institute of Control Engineering, Technical University of Hamburg Harburg, D-21071 Hamburg, Federal Republic of Germany (Received 6 June 1997; in revised form 6 October 1997) Abstract—The dynamic model of a biogas tower reactor for anaerobic waste water treatment is developed by theoretical process analysis. The modelling method is characterised by a decomposition of the model into interacting submodels and by a stepwise introduction of simplifying assumptions on different decomposition levels. Hence, this method can also be applied to similar processes and it allows to adapt the model to changes in the reactor configuration and to different types of waste water. The model accuracy obtained is illustrated by a comparison of simulated and experimental data. Based on the reactor model presented in this paper, a process control strategy was developed and successfully tested at a pilot plant. ( 1998 Elsevier Science Ltd. All rights reserved. Keywords: Biogas reactor; waste water treatment; dynamic modelling; process control.
INTRODUCTION
An analytical model of a new type of biogas reactor for anaerobic waste water treatment is presented. The model describes the dynamics of the complex process and is used for the controller design and for modelbased process control. This paper describes the different modelling steps in which the partial knowledge of the relevant process and reactor phenomena are combined to an overall reactor model. The comparison of experimental and simulated data shows a good model accuracy which justifies the assumptions made during the modelling process and shows the efficiency of the modelling method used. The new reactor principle which is described in more detail in the next section, was developed at the Department of Bioprocess and Biochemical Engineering at the Technical University of Hamburg-Harburg, Germany (Ma¨rkl and Reinhold, 1994). Expert knowledge from similar industrial plants is not available. Therefore, the model is developed by theoretical process analysis whereas the parameters are identified by laboratory and pilot reactor experiments. Until now, different reactor phenomena such as the liquid-phase mixing between neighbouring modules and the liquid—gas mass transfer have been investigated (Reinhold et al., 1996; Friedmann and Ma¨rkl, 1994). The existing models are used for the reactor design (e.g. for scale-up prediction) and for the selection of reasonable operating points. Hence, these models primarily describe the steady-state behaviour.
* Corresponding author. Fax: 0040 77182112.
In contrast to that, a dynamic model is described in this paper, which makes a prediction of the dynamical reactor behaviour possible. The model considers all the relevant phenomena including the mixing behaviour, the biochemical reactions and the liquid—gas mass transfer. The paper is organized as follows: The first section describes the working principle of the Biogas Tower Reactor and the modelling objectives. The modelling problem needs to be solved under a number of restrictions that are given in the next section. The model structure and the mass balance equations are given in the third section. In the last section, simulation results are compared with experimental data. The paper does not only describe the dynamic model obtained but presents the modelling method, which can also be applied to other reactors. The consideration of all important reactor phenomena leads to a high model complexity which is managed by the decomposition of the model into submodels and by the stepwise introduction of simplifying assumptions on different decomposition levels. Due to large parameter uncertainties and an incomplete process knowledge, an interaction-oriented model representation is chosen to achieve the necessary model transparency for model validation and analysis. THE BIOGAS TOWER REACTOR
The Biogas Tower Reactor in pilot scale (Ma¨rkl and Reinhold, 1994) is shown in Fig. 1. Biogas (CH , 4 CO ) is produced by mesophilic anaerobic biochemi2 cal conversion of the organic feed compounds. Waste
995
996
M. Pahl and J. Lunze
Fig. 1. Biogas Tower Reactor in pilot scale with its internal installations (height 20 m, diameter 1 m, volume 15 m3).
water from baker’s yeast production is treated where hydrogen sulphide (H S) is a by-product of the bio2 chemical conversion. Hydrogen sulphide inhibits the activity of the methane-forming microorganisms. The reactor in pilot scale has almost the height of a fullscale plant (20 m) but with its diameter of 1 m it is smaller (Reinhold and Ma¨rkl, 1997). Reactor principle The reactor consists of 4 identical modules. At the top, a settler for effective biomass retention is
installed. For better mixing conditions the feed can be split up into separate streams f (i"1, 2 , 4) for &%%$,i each model. To avoid gas accumulation in the upper zones of the reactor, the gas is drawn off from the reactor (g ) by gas collecting devices that are inte065,i grated into the modules. For better liquid—gas mass transfer the biogas can be recirculated into the bottom of the reactor (g ). To avoid accumulation of inhibi3%# ting hydrogen sulphide in the liquid phase, only CH 4 and CO are recirculated whereas H S is removed 2 2 chemically.
Modelling of a biogas tower reactor
997
Fig. 2. Single module of the reactor.
As shown in Fig. 2 a baffle plate divides each module into two parts. As the gas concentrations of both parts differ, a hydrostatic pressure exists which causes a fluid circulation along the baffles similar to that found in airliftloop reactors (Bailey and Ollis, 1986). The fluid circulation brings about a well-mixed system within one module. A part of the gas rises from one module to the next and causes an exchange mass flow in the liquid phase between two neighbouring modules that works in both directions (Reinhold, 1996). Measurements The flow rates of the liquid and the gas phase ffeed,i , g and g , the pH-values pH and the biogas 065,i 3%#,i i compounds in the collecting devices can be measured on-line in each module. Off-line measurements of concentrations of liquid-phase compounds c (such as *,i acetic acid, propionic acid, etc.), the TOC (total organic carbon) c and the biomass concentration TOC,i cbiomass,i are also available. Modelling objectives The modelling aim is to set up a dynamic model that can be used for the design of feedback controllers to stabilize the operating point, to estimate process variables that cannot be measured on-line, and to find suitable start-up control algorithms which bring the reactor quickly into a given operating point. Such a model must describe all dynamical phenomena that influence the reaction rates. Contrary to this modelling aim, the existing reactor models were elaborated to understand isolated phenomena such as the hydrodynamics of the coupled modules, the influence of the hydrostatic pressure and the recirculated flow rate on the removal rates of organic matter as well as the liquid—gas mass transfer in dependence upon different operating conditions (Friedmann and Ma¨rkl, 1994). Based on experimental and simulated data, design criteria were found (Reinhold, 1996), such as optimal module dimensions as well as proper operating points. Predictions about the scale-up have also
been made, e.g. about the maximum reactor height (Friedmann and Ma¨rkl, 1994). The following sections show how the dynamical model can be set up. RESTRICTIONS
The modelling problem has to be solved under the following severe restrictions which effect the modelling process and the kind of models used: 1. Most of the available on-line measurements concern accumulated variables. That is, most of these data depend simultaneously on many different compounds, for example pH, gas flow rates and feed rates. 2. The main control variables such as liquid phase and sludge concentrations are not measurable on-line. That is, the sample rate attainable with the available measurement equipment is too small to obtain dynamic information about these variables. 3. The reactor does never reach a ‘real’ steady state. The main time constants are about 5—20 h. Temporal changes concerning the growth of biomass are even an order of magnitude slower. Compared with these time constants, the waste water input is rapidly changing for several reasons. For example, since the fermentation of baker’s yeast as well as many other processes in the food industry are batch processes, the composition of the waste water changes periodically. 4. The available experimentation time is restricted. Compared with the main time constants, the reactor is available for experiments only for a very short time which restricts the kind and number of experiments. INTERACTION-ORIENTED MODEL STRUCTURE
For efficient modelling of complex processes the available structural process knowledge should be used for decomposing the system to the greatest
998
M. Pahl and J. Lunze
Fig. 3. Interaction-oriented decomposition of the model into a submodel for each module and into internal submodels.
possible extent. Due to the modular reactor concept the structure of the overall model shown in Fig. 3 has been chosen. The model consists of 4 submodels. Each submodel represents one module of the reactor. The submodels are of the same type and differ only in parameter values and in the active couplings. The modules are numbered beginning with the bottom module. The index i denotes the module number. It is omitted for brevity in the description of a single module. The vectors
AB A ffeed,i
u " gN out,i i grec,i
volumetric influent rate of liquid phase
"
setpoint of biogas flow rate drawn off
B
volumetric flow rate of recirculated biogas
(1)
A B A pH i gout,i
y" i qc,H S,i 2
qc,CO
2
,i
pH-value
B
volumetric biogas flow rate draw off
"
hydrogen sulphide fraction of biogas carbon dioxide fraction of biogas
puts z . This interaction-oriented representation has i been shown to be useful because it makes clear which subsystems comprise the whole system and which interactions exist among these subsystems (Lunze, 1992). The formal definition of coupling signals s and z is useful for the modelling of complex processes in general because it enables the structured implementation of the model equations into the simulator and offers a good starting point for the model analysis and for the model reduction. It is obvious that the submodels are strongly coupled, i.e. neighbouring submodels influence each other in both directions due to the exchange mass flows in the liquid phase. Unidirectionally couplings also occur due to the mass flow from the lower into the upper module caused by the accumulated feed rates and the rising gas. Furthermore, all submodels are interconnected by the recirculated gas flow (Fig. 1). Each module has an internal state described by the vector x , whose elements are concentrations of comi pounds in the liquid phase, the gas hold-up of module i (volume of the bubbles), and the concentrations of carbon dioxide and hydrogen sulphide in the rising gas and in the collecting devices. This choice of the state variables results from the assumptions concerning the biochemical reactions and the mass transfer from the liquid into the gas phase described in the next section. We assume that the differential equations derived from mass balancing have a unique solution. Then, the term ‘state’ as commonly used in systems theory has an important consequence: If x(t) is known at time t"0 then the future behaviour y(t), t*0 is uniquely defined by the future input u(t), t*0. Structure of submodels The submodels can be further decomposed. Similar to the general approach proposed in (Breuel et al., 1995), the submodels consist of balance areas for the liquid and the gas phase as shown in Fig. 3. Neglecting changes of the small solid phase volume the balanced volume of the liquid phase and the gas collecting device are constant because they are determined by the dimensions of the reactor. The gas bubble volume in each module changes in dependence upon the amount of produced and recirculated gas. Experiments at the Biogas Tower Reactor showed, that the dynamics of the biomass concentration are much slower than the dynamics of gas- and liquid-phase concentrations. For a prediction horizon of about 200 h only small changes of biomass concentration occur which leads to the following assumption:
(2)
Assumption 1: The biomass concentration in each module is treated as a constant parameter.
describe the manipulated variables and the measurable variables, respectively, of the ith module. The couplings between neighbouring modules are represented by coupling inputs s and coupling outi
Hence, the biomass concentration does not appear as entry in the state vector x (t). Note, that this assumption is important for the selection of experimental
Modelling of a biogas tower reactor
data for the model validation, whereas the system behaviour for longer time intervals may be investigated also for trajectories of changing influent concentrations given as additional model inputs. REACTIONS
Figure 4 gives an overview over the relevant biochemical reactions. The biochemical pathways for reducing organic matter in the liquid phase are complex and not well known (Meyer-Jens, 1994). Because of the large number of waste water compounds, the total concentration of organic matter is characterised by the TOC-value (total organic carbon). Assumption 2: The reduction of organic matter is considered by the accumulated biochemical pathway r
r
TOC $*44 TOC &" AC &" AC
r
6/$*44
AC &" (2!K) ) CH 4
#K ) CO . (3) 2 TOC is mainly converted into several weak acids AC with the accumulated reaction rate r . Weak acids TOC dissociate in dependence upon the pH-value with rate r . Only the undissociated fraction ACundiss is con$*44 verted with rate r into methane (CH ) and carbon AC 4 dioxide (CO ). The parameter K reflects the different 2 mole fractions CH and CO that are produced. This 4 2 parameter depends on the composition of weak acids. If only acetic acid is converted K"1 holds. Then 1 mol AC is reduced to 1 mol CH and 1 mol CO . 4 2 For the waste water from baker’s yeast production considered here, acetic acid and propionic acid are the main fractions of weak acids. Experimental results show that the dynamic properties of the process are determined mainly by the reaction rate r (Friedmann and Ma¨rkl, AC 1993): Assumption 3: The reactions via r and r in TOC $*44 eq. (3) act without time delay: r "R, r "R. TOC $*44
999
The biochemical pathways for reducing inorganic matter (sulphuric acid) have been investigated also in (Friedmann and Ma¨rkl, 1993). The main path is the biochemical transformation of sulphur ions SO2~ 4 into hydrogen sulphide H S: 2 r
r
r
$*44 SO2~ &" SO4 H S &" $*44 H S H SO &" . (4) 2 4 4 2 2 6/$*44 This reaction is included in the model because undissociated hydrogen sulphide H Sundiss strongly inhibits 2 the biochemical removal of ACundiss :
Assumption 4: The reduction of organic matter is inhibited only by H S according to eq. (4). 2 Similar to Assumption 3, the dissociation rates r in $*44 eq. (4) are considered as infinite. Methane is least soluble in the liquid phase (Mather, 1986): Assumption 5: Methane is not soluble in the liquid phase, i.e. it directly reaches the gas phase. From Assumptions 1—5, the following state vector of the liquid phase results:
A BA B
x (t) c (t) 1 AC x (t) cH SO (t) . x (t)" 2 " 2 4 &x (t) cH S (t) 2 3 x (t) cCO (t) 2 4
(5)
Assumption 6: The influent concentrations are constant. Similar to Assumption 1 this assumption is related to the desired prediction horizon. It is a reasonable assumption if only small concentration changes occur during the prediction interval. This assumption is important for the selection of experimental data for the model validation. The system behaviour may be investigated also for trajectories of changing influent concentrations given as additional model inputs. MASS BALANCE OF THE LIQUID PHASE
According to the circulating flow patterns, the liquid phase can be regarded as a well-mixed system in the operating range relevant for process control (Reinhold, 1996): Assumption 7: The reactor modules are described by lumped parameters.
Fig. 4. Phenomena occurring within each module: biochemical reactions, dissociation of educts and products, and mass transfer.
This assumption is made for the concentrations of all reactor compounds, for the temperatures and the hydrostatic pressure. Hence, the mass balance yields ordinary differential equations. By using all assumptions made until now the mass balance of a single
1000
M. Pahl and J. Lunze
reactor module is given by
A
The biomass concentration is approximately proportional to the biomass activity (Reinhold, 1996).
B
1 x5 " C (t) f (t)!x (t) + f (t) */ */ &*/, j &- » &j
A B
Assumption 10: The maximum reaction rates are proportional to the biomass concentration:
!r (t) AC
!rSO (t)
#
4
(6)
m (t) rSO (t)! 53,HÈS 4 » m &- (t) K rAC (t)! 53,COÈ » &where » is the volume of the liquid phase, C (t) the &*/ matrix of influent concentrations, f (t) the vector of */ volumetric inflow rates, f (t) the volumetric inflow */,j rate j, r (t) the reaction rate of compound* and mtr, * (t) * the mass transfer flow rate of compound*. The term in the left parentheses describes the difference between mass inflow and mass outflow rates. The right vector contains the source and sink terms. Several mass inflows and outflows have to be taken into account because of the coupling mass flows occurring between neighbouring modules. In eq. (6) the mass inflows are summarized in the vector f and the */ matrix C . Since the liquid-phase volume is constant, */ the volumetric outflow rate equals the sum of all influent rates f (t), j"1, 2, 3. The several mass in*/,j flows are given in Interconnections of the submodels section. Reaction rates In the following, the modelling steps concerning the reaction rates r and r are described. AC SO4 Assumption 8: The reduction rate of SO2~ is de4 scribed by the Monod equation cSO2~ (t) 4 r (t)"r .!9,SO4 cSO2~ (t)#KS, SO . SO4 4
(7)
4
The reaction rate r (t) increases with increasing conSO4 centration cSO2~ (t) to a maximum value rmax,SO . 4 4 The parameter KS,SO determines the saturation char4 acteristics. Assumption 9: The reaction rate of ACundiss is described by a Monod-type equation, but includes a second term for the inhibition by hydrogen sulphide: cAC,undiss (t) KI,H S 2 r (t)"r ) . AC .!9,AC KS,AC#cAC,undiss (t) KI, H S#cH S, undiss (t) 2
2
(8) The reaction rate r (t) increases with an increasing AC concentration of undissociated weak acids cAC,undiss (t) to a maximum value r and decreases with in.!9,AC creasing concentration of undissociated hydrogen sulphide cH S, undiss (t). The saturation and inhibition char2 acteristics are determined by K and KI, H S . 2 S,AC
r "f c biomass .!9,AC 1 "f c biomass r 2 .!9,SO4 with the constant parameters f and f . 1 2
(9) (10)
The yield parameters f and f have to be estimated 1 2 on the basis of reactor experiments. ¸iquid—gas mass transfer As the gaseous compounds are produced in the liquid phase, the liquid—gas mass transfer has to be taken into consideration. Assumption 11: The liquid—gas mass transfer of carbon dioxide and hydrogen sulphide is described by (t)"» k¸ * e(t) [c*,undiss (t)!He* p qb, * (t)] (11) 53, * &where m * (t) is the mass transfer flow rate liquid—gas 53, of the compound *, » the volume of the liquid phase, &k¸, * the mass transfer coefficient of the compound *, e(t) the volumetric gas hold-up, c*,undiss (t) the concentration of the undissociated fraction of compound * in the liquid phase, He the Henry coefficient of * the compound *, p the hydrostatic pressure and qb, * (t) the mole fraction of the compound * in the gas bubbles. The volumetric gas hold-up is defined as m
» (t) bubble volume " b . (12) e(t)" » volume of liquid phase &The mass transfer is proportional to the concentration difference between the gas and the liquid phase where according to Henry’s law the correlation between the partial pressure p qb, * (t) and the concentration c*,undiss (t) is given by the Henry coefficient He* . Without sinks and sources, the mass transfer decreases to zero in steady state where the equilibrium between gas and liquid phase is reached. With Assumptions 4 and 5 mtr, CH (t)"» (2!K)r (t) 4 &AC
(13)
holds. Equilibrium of dissociation As both the dissociated and the undissociated fraction of the compounds take part in the biochemical reactions and in the mass transfer, cf. eqs (7), (8) and (11), the equilibrium of dissociation has to be considered for all compounds. The dissociated and undissociated fractions are calculated from the total concentrations and the pH-value by the law of mass action. The relevant equations are given in the appendix. Theoretically, the pH-value, which is determined
Modelling of a biogas tower reactor
1001
by all waste water ions, can be calculated from a charge balance of the general type F (pH)#F (pH)c #2#F (pH) c #2 0 1 1 i i #F (pH)c #c "0 (14) n n 0 where F (pH), (i"0, 2 , n) are nonlinear functions, i c , (i"0, 2 , n) are the total concentrations of weak i acids or bases and c is the sum of those ion concen0 trations that are independent of the pH-value. However, the pH-value cannot be calculated exactly by means of eq. (14) because n is too large and the concentrations c of several waste water compounds i are unknown (Meyer-Jens, 1994). An appropriate approximation can be obtained as follows. The current pH-value is described around an operating point value pH by 0 pH(t)"pH #*pH(t). 0 The derivation *pH depends on the concentration of all compounds, particularly on those included in the state vector (5). Changes of cH S and cH SO in the 2 2 4 relevant concentration range showed a very weak influence on the pH-value compared to cAC and cCO and, therefore, can be neglected.
Fig. 5. Nonlinear dependence of the pH-value on c and AC c for the relevant concentration intervals. CO2
2
Assumption 12: In the relevant concentration range, the pH-value depends linearly on c and c : AC CO2 (15) pH(t)"pH !l c (t)!l c (t). 0 1 AC 2 CO2 The parameters pH , l and l have to be estimated by 0 1 2 experiments. Although, in general, the strong nonlinear dissociation characteristics cannot be approximated with sufficient accuracy by a linear relation, the approximation quality of eq. (15) can be shown as follows. Equation (14) is approximated by F (pH1 )#F (pH1 )cN #2#F (pH1 ) cN #2 0 1 1 i i #F (pH1 )cN #c "0 (16) m m 0 considering available measurements cN , 2 , cN , m(n 1 m and pH1 of some relevant operating points. For given pairs of concentrations cN and pH1 , the parameter c is * 0 estimated. In the next step the influence of varying state variables (5) on the pH-value is investigated by solving eq. (16) numerically. Fig. 5 shows for a typical operating point that a linear approximation is suitable for the relevant interval of pH"6.827.5. For other operating points the graph depicted in Fig. 5 changes its vertical position but does not change its shape. MASS BALANCE OF THE GAS BUBBLE VOLUME AND THE GAS COLLECTING DEVICE
The balance equation of the bubble volume in the liquid phase (cf. Fig. 6) yields
C
D
1 R¹ eR " m (t)#g (t)!v A e(t) (17) */ b &» p 53,505 &where e(t) is the volumetric gas hold-up defined by eq. (13), » the volume of the liquid phase, R the gas &-
Fig. 6. Balance of bubble volume.
constant, ¹ the temperature, p the hydrostatic pressure, m (t) the sum of mass transfer flow rates 53,505 (CH , CO and H S), g (t) the volumetric gas 4 2 2 */ inflow rate from lower module, v the average bubble b rising velocity and A the reactor cross-sectional &area. Neglecting the water vapour of about 3%, the sum of the biogas fractions methane, carbon dioxide and hydrogen sulphide equals one: q
CH4
(t)"1!q (t)!q (t). H2S CO2
(18)
1002
M. Pahl and J. Lunze
The mass balance of the carbon dioxide and hydrogen sulphide mole fractions yields
A B
CA B A BD A B A B
qR b, H S g (t) q q 2 */,H2S ! b,H2S " */ qR b,CO q q e(t)» 2 &*/,CO2 b,CO2 R¹ m (t) 53,H2S # pe (t)» m (t) &53,CO2 R¹ q (t) ! m (t) b,H2S (19) q pe (t)» 53,505 (t) &b,CO2 regarding the mass inflows from the liquid—gas transfer m (t) and the inflows from the lower module 53,* g (t)q (t). The mass balance of the gas collecting */ */,* device
A B
C
D
qR g (t) q (t)!q (t) c,H2S " c b,H2S c,H2S (20) qR » q (t)!q (t) c c,CO2 c,CO2 b,CO2 with g (t)"v A e(t) completes the submodel (cf. c b &Fig. 6). From eqs (17)—(20) the gas phase state is given by
ABA B x
5
q (t) b,H2S qb,CO (t)
AB
x x 2 6 b x " x " qc,H S (t) " x . 2 c 7 '!4 x x qc,CO (t) 2 9 8 x e(t) 9
Accumulated flow rate In addition to the direct feed f an accumulated &%%$,i flow from the lower modules has to be considered:
G
f (t)" !##,i
+ i~1 f
q/1 &%%$,i~q 0
A B
x x " &-,i (22) i x '!4,i where x and x are given by eqs (5) and (21). &-,i '!4,i Hence, each submodel has nine state variables. INTERCONNECTIONS OF THE SUBMODELS
In the following part we explain the terms in the mass balances (6) that arise because of the couplings and the resulting interaction-oriented nonlinear statespace model is given. Exchange flow rate On the basis of experimental data given in (Reinhold, 1996) the exchange flow rate is described by
G
4 g
065,i p i i/1 +
(t)
(24)
g (t) g (t) q (t)" 3%# q (t)# 130$ q (t) c,i 3%# 130$ p p 3%# s (25)
where p , p and p denote the hydrostatic pressure in i 3%# s module i, the hydrostatic pressure at the compressor output and the atmospheric pressure. As shown in Fig.1, the recirculation flow rate g can be adjusted 3%# by controlling the recirculating compressor. Due to eq. (25) the mole fractions q depend on the biogas 130$ fractions in all gas collecting devices q and on all c,i volumetric flow rates g . The biogas fractions in the 065,i recirculation flow are given by
A B
i 0 q " q 3%# 0 1 130$ where the chemical removement of hydrogen sulphide is considered by the constant parameter i which denotes the reduction degree. Equations (23)—(25) completely describe the inputs of the internal submodel shown in Fig. 3:
A
B
f &%%$,i #f , C "(c x x ) f "f !##,i~1 %9,i~1 */,i &%%$,i i~1 i`1 */,i f %9,i
G
g for i"1 3%# g " */,i v A x !g else b &- 9,i~1 065,i~1 q for i"1 3%# q " */,i q else. c,i~1 The matrix C consists of the influent concentration */,i vector and the vectors of lower and upper module concentrations. Note, that for i'1 the flow rate
m (g (t)!g (t)) m (v A e(t)!g (t)) %9 c,i 065,i 065,i " %9 b &for i"1, 2, 3 (g (t)!g (t))#l (v A e(t)!g (t))#l f (t)" c,i 065,i %9 b &065,i %9 %9,i 0 for i"4
with constant parameters m and l . Similar to %9 %9 a Monod-type nonlinearity, the parameter m means %9 a proportional factor and the parameter l deter%9 mines the saturation characteristics. According to eq. (23) the exchange flow rate depends nonlinearly on the gas flow rate from the lower into the upper module. This nonlinear approach describes the phenomenon of saturation with increasing gas flow rate.
for i"1.
Recirculated gas flow The sum of mass flows drawn off from the gas collecting devices equals the sum of the recirculated gas flow and the gas flow of produced biogas:
(21)
Summarising the states in the liquid and gas phase the submodel i has the state vector:
(t) for i"2, 3, 4
G
(23)
g is the difference between the flow rate into the gas */,i collecting device of module i!1 and the flow rate drawn off g . 065,i~1 INTERACTION–ORIENTED STATE SPACE MODEL
All the given equations of the reactor represent a nonlinear interaction-oriented state space model of the overall system. The interaction structure is shown
Modelling of a biogas tower reactor
in Fig. 7. With the module states
and the coupling outputs
AB x
ABA B ABA B A B
z x 1i &z f 2i !##,i f z" z " , i"1, 2, 3 3,i %9,i i z g !g 4,i c,i 065,i z x 5,i c,i
&-,i x x " b,i i x c,i x 9,i the inputs
1003
ABA B ABA B
u f 11 &%%$,1 u " u " gN , 21 065,1 1 u g 31 3%#
z x 14 &-,4 z 0 24 z " z " 0 4 34 z v A x 4,4 b &- 9,4 z x 5,4 c,4
u f 1i &%%$,i u " u " gN , i"2, 3, 4 i 2i 065,i 0 0
the equations for module i
!k G 5 1 !G 2 u k (k !x )#G (s !x )#k (s #s )(s !x )# 1 22 1 &6 2 &22 3 4 1 &G !x (k G !k x ) 2 9 19 3 20 5 k G !x (k G !k x ) 27 1 9 17 4 18 6 x5 "
A
B
A
B
B
k (s #u ) k G k 0 k G 22 5 3 (s !x )#k 23 3 !k 20 x !k (k G !k x #k G !k x # 21 1 x 6 b 22 k G 25 0 k b 25 19 3 20 5 17 4 18 6 b x x 9 24 4 18 9 k x (x !x ) 26 9 b c
A
B
k G k G !k x #k G !k x # 21 1 #k (s #u !k x ) k 20 5 17 4 18 6 22 5 3 4 9 25 19 3 x 9 (26)
A BA
ABA B ABA B ABA B 0
0 x 21 &-,2 0 0 s " " , 1 0 0 0 0 s q 61 3%# s
A B x &-
s #u 3 1 k (k x !u ) 2 4 9 2 z" k #(k x !u ) 3 4 9 2 k x !minMu , k x N 4 9 2 4 9 x 7 x 8
s x 14 &-,3 0 0 s f !##,3 s " 34 " 4 s f 44 %9,3 s g !g 54 c,3 065,3 s x 64 c,3
s x 1i &-,i~1 s x 2i &-,i`1 s f !##,i~1 s " 3i " , i s f 4i %9,i~1 s g !g 5i c,i~1 065,i~1 s x 6i c,i~1
B
pH k !k x !k x 28 29 1 30 4 g minMu , k x N 2 4 9 , y" 065 " q x c,H2S 7 x q c,CO2 8
the coupling inputs
(27)
AB
hold with the abbreviations
x 1 G " 1 k x 8 3 (x #k 10G5#k ) 1# 1 6 7 k 102G5#k 10G5#1 9 10 k x 11 2 G " 2 x #k 10~2G5#k 10~G5#k 2 12 13 14 x 3 G " 3 k 102G5#k 10G5#1 9 10
A
i"2, 3
B
1004
M. Pahl and J. Lunze
Fig. 7. Block diagram of the overall model.
x 4 G " 4 k 102G5#k 10G5#1 15 16 G "(k !k x !k x ) 5 28 29 1 30 4 k k (k x !u ) 2 22 4 9 2 i"1, 2, 3 k #(k x !u ) 4 9 2 G " 3 6 0 i"4
G
(28)
and with the parameters shown in Table 1. Equations (26)—(28) represent an interaction-oriented nonlinear state-space model of module i, which has the general form x5 "f (x , u , s ), x (0)"x i i i i i i 0 y "g (x , u , s ) i i i i i z "h (x , u , s ). i i i i i Note, that for simplicity of notation the index i was omitted in eqs (26)—(28) and Table 1. By this model representation the behaviour of an isolated module can be analysed directly by neglecting the interactions between the modules (s "0). The interconnection of i four reactor modules yields the overall model of the pilot reactor. The model was implemented in Matlab/Simulink for simulation purposes where the model structure shown in Fig. 3 had been transferred directly into the block-oriented representation of the simulator (Pahl et al., 1996). MODEL VALIDATION
Figure 8 shows the simulated and measured trajectories of the biogas tower reactor for stepwise changing feed rates into Modules 1—3 and typical operating conditions. After t"66 [h], the feed rates are given as output of a pH-multivariable controller. The overview shows that the correspondence of all measured and simulated quantities is quite good, considering the incomplete process knowledge and the large number of simplifying assumptions that were necessary for the reduction of the model complexity.
The step-down of feed rates leads to a decreasing biogas production in which the model describes both the static and the dynamic behaviour with a sufficient accuracy. The measured biogas production following the strongly increasing feed rates at t"66 [h] is larger than the simulated values. This might be an overshooting effect or a steady-state error caused by time-varying parameters. The biogas fractions were measured by on-line mass spectrometry. A good measurement accuracy is reached by a cyclic automatic calibration (Lennemann et al., 1997). The steady state and the dynamics of the carbon dioxide fractions in the biogas show a good correspondence apart from a small overshoot following the pH-controlled operation for t'66 [h]. The hydrogen sulphide trajectories have small static and dynamic errors, particularly in case of increasing feed rates. Concentration differences in the four gascollecting devices are also reflected by the model, which confirms the assumptions concerning the liquid—gas mass transfer and the liquid-phase mixing behaviour. After the step-down of feed rates, the pH-values increase, mainly because the conentrations of organic weak acids decrease. This phenomenon is, in principle, reflected by the model but the transition is faster and the static reinforcement larger. The step-up response is better reproduced. Note that the model accuracy has to be evaluated under considerable measurement errors due to the pHsensor drift. As shown in Fig. 8, a calibration step of 0.1 might occur even if the sensors are calibrated every two days. In this case the measurements are considerably disturbed by these error signals. The trajectories of the simulated educt and product concentrations in the liquid phase are shown in Fig. 9. A validation of their dynamics was not possible but available off-line measurements confirm that the simulated values are within a reasonable range (Meyer-Jens et al., 1995).
Modelling of a biogas tower reactor
1005
Table 1. Parameters of the model (27)—(29)
A B
cAC, feed cH2SO4 , feed k " 1 cH2S, feed cCO , feed
k "m 2 %9
k "l 3 %9
k "v A 4 b &-
k "rAC, max 5
k "K 7 S,AC
1 k " 8 KI, H S
K K k " S,AC D,AC 6 c 1 K K 2S D2,H2S D1,H k " 9 c 2 c KS,SO4 2 k " 12 KD1,H SO KD2,H SO 2 4 2 4
2
K k " D1,H2S 10 c 1 KS,SO4 c 2 k " 13 KD2, H SO c 2 4 1 K k " D1,CO2 16 c 1 k "k 19 L,H2S 1 k " 22 » &R¹ k " 25 p» &k "pH 28 0
2
k "rSO4, max 11 k "KS,SO4 14
K K k " D1,CO2 D2,CO2 15 c 2
k "k 17 L,CO2
k "k He p 18 L,CO2 CO2
k "k He p 20 L,H2S H2S k¸, H2S R¹ k " 23 p
k "(2!K)» rAC,max 21 &k R¹ 2 L,CO k " 24 p
v A k " b &26 » c k "l 29 1
k "Kr AC,max 27 k "l 30 2
Fig. 8. Validation of the overall model by comparing simulations with measurements at the pilot plant.
1006
M. Pahl and J. Lunze
described in (Lunze and Pahl, 1996; Ilchmann and Pahl, 1996). A model-based controller for the waste removal is described in (Lunze and Pahl, 1997). In (Lennemann et al., 1997), the experimental results of model-based control of the total organic carbon effluent concentration are shown and a method for the model-based on-line monitoring of hydrogen sulphide is given. Acknowledgements The authors gratefully acknowledge the financial support of the Deutsche Forschungsgemeinschaft and express their gratitude to the Department of Bioprocess Engineering (Prof. Ma¨rkl) of the Technical University of Hamburg-Harburg, Germany and Deutsche Hefewerke Hamburg for good cooperation. NOTATION
Fig. 9. Simulated liquid-phase concentrations of the Biogas Tower Reactor.
The rising carbon dioxide concentration following the step-down of the feed rates can be explained by the model as follows. The liquid—gas transfer rate decreases because of rising pH-values and decreasing gas hold-up [cf. eq. (12)]. Although the carbon dioxide production rate is decreased by reducing the feed rates, the changes of the liquid—gas transfer rate dominate. The hydrogen sulphide concentrations behave in the opposite way. Off-line measured sulphuric acid concentrations are below the detection limit (10~3 mol/l), which confirms the total removal simulated by the model. CONCLUSIONS
The model describes the dynamic and the steady state behaviour of the Biogas Tower Reactor with sufficient accuracy. The structural modelling method described here yields a transparent model that can be adapted to similar reactor types and to other waste water processes. Since the reactors mixing behaviour and the biochemical reactions are separately represented in the model, the model can be adapted to different waste water types simply by changing the reaction rate equations. As the model parameters have a clear physical meaning the model can be adapted to changing reactor parameters as well. The interaction-oriented representation is a good starting point for model analysis and model reduction. For example a linear state-space model of the overall model can be derived by linearizing eqs (27)—(29) around an operating point and calculating the overall model from the submodel and the interconnection relation (Lunze, 1992). The model was used as a ‘reference’ for models of reduced complexity for the controller design. A linear and a nonlinear multivariable pH-controller were designed and successfully tested at the pilot plant as
A c f F g i K m p pH q r R s t ¹ u v » x y z
area concentration of compound in liquid phase volumetric liquid flow rate nonlinear function volumetric gas flow rate module number reaction rate parameter mass flow rate pressure pH-value mol fraction of biogas compound reaction rate gas constant coupling input time temperature input signal gas bubble velocity volume state variable output coupling output
Greek letters c activity coefficient e volumetric gas hold-up f biomass parameter Subscripts a accumulated b bubbles c collecting device diss dissociated ex exchange feed waste water inflow fl fluid i module number in inflow out outflow rec recirculated tr transfer liquid—gas undiss undissociated
Modelling of a biogas tower reactor REFERENCES
Bailey, J. E. and Ollis, D. F. (1986) Biochemical Engineering Fundamentals, McGraw-Hill Publishing Company, New York, U.S.A. Breuel, G., Gilles, E. D. and Kremling, A. (1995) A systematic approach to structured biological models. Proceedings of the 6th Conference on Computer Applications in Biotechnology, DECHEMA, pp. 199—204. Friedmann, H., Ma¨rkl, H. (1993) Der Einflu{ von erho¨htem hydrostatischen Druck auf die Biogasproduktion. gwf Wasser Abwasser, 134 Nr. 12, 689—698. Friedmann, H., Ma¨rkl, H. (1994) Der Einflu{ der Produktgase auf die mikrobiologische Methanbildung. gwf Wasser Abwasser, 135 Nr. 6, 302—311. Ilchmann, A. and Pahl, M. (1996) Adaptive multivariable pH-regulation of a Biogas Tower Reactor. European Journal of Control, submitted. Lennemann, F., Pahl, M., Lunze, J. and Matz, G. (1997) Massenspektrometrisches Proze{gasMonitoring zur modellgestu¨tzten Regelung eines Biogas-Turmreaktors, tm ¹echnisches Messen 7/8. Lunze, J. (1992) Feedback Control of ¸arge-Scale Systems. Prentice-Hall, London, U.K. Lunze, J., Pahl, M. (1997) pH—Wert—Regelung eines Biogas-Turmreaktors zur anaeroben Abwasserreinigung, at—Automatisierungstechnik 5 (1997), S.226—235. Ma¨rkl, H. and Reinhold, G. (1994) Der Biogas-Turmreaktor, ein neues Konzept fu¨r die anaerobe Abwasserreinigung. Chem. Ing. ¹ech. 66 (4) S.534—536. Mather, M. (1986) Mathematische Modellierung der Methanga¨ rung. VDI-Fortschrittsberichte, Reihe 14, No. 28, VDI-Verlag, Du¨sseldorf. Meyer—Jens, T. (1994) Reaktionstechnische ºntersuchungen der Methanga¨ rung am Beispiel der »erga¨ rung von Abwasser aus der Hefeindustrie. Dissertation, TU Hamburg-Harburg. Meyer—Jens, T., Matz, G., Ma¨rkl, H. (1995) On-line measurement of dissolved and gaseous hydrogen sulphide in anaerobic biogas reactors. Appl. Microbiol. Biotechnol. 43, 341—345. Pahl, M., Reinhold, G., Lunze, J. and Ma¨rkl, H. (1996) Modelling and simulation of complex biochemical processes, taking the Biogas Tower Reactor as an example. In Proceedings of Scientific Computing in Chemical Engineering, eds., Springer, Berlin, Germany. Reinhold, G., Merrath, S., Lennemann, F. and Ma¨rkl, H. (1996) Modelling the hydrodynamics and the fluid mixing behaviour of a Biogas Tower Reactor, Chem. Engng Sci. 51, 4065—4073.
1007
Reinhold, G. (1996) Ma}stabsvergro¨ }erung eines Biogas-¹urmreaktors zur anaeroben Abwasserreinigung. VDI-Fortschrittsberichte, Reihe 3, No. 471, VDI-Verlag, Du¨sseldorf. Reinhold, G., Ma¨rkl, H. (1997) Model-based scale-up and performance of the Biogas Tower Reactor for anaerobic waste water treatment. Water Research 31 (8), 2057—2065. APPENDIX
The dissociated and undissociated compounds are calculated from the total concentrations and the pH-value as follows. Since the total concentration of all ions in the liquid phase cannot be neglected, the equilibrium of dissociation is calculated from their activities. The activity is given by a "c c for single charged ions *,1 1 *,1 a "c c for double charged ions *,2 2 *,1 (Friedmann, 1992). The parameters c , c are the activity 1 2 coefficients. They determine the ‘active’ fraction of the compound * that takes part in the dissociation. The activity coefficients can be considered as constant for the ion concentration range of this process. For the hydrogen ion concentration c ` H 1 cH`" 10~1H (A1) c 1 holds. For weak acids * with one proton (acetic acid, propionic acid etc.), (A2) c "c undiss#c diss *, * *, c2 cH` 1 c undiss" c (A3) *, K #c2 cH` * D, * 1 hold. For compounds * with two protons that dissociate in two steps (hydrogen sulphide, sulphuric acid, carbon dioxide, etc.), c "c undiss#c diss#c diss (A4) * *, *1, *2, K K D1,* D2,* c (A5) c diss" *2, K K #K c c #c2c c2 ` * D1,* D2,* D1,* 2 H` 1 2 H K c c D1,* 2 H` c diss" c (A6) *1, K K #K c c #c2c c2 ` * D1,* D2,* D1,* 2 H` 1 2 H c2 c c2 ` 1 2 H c undiss" c (A7) *, K K #K c c #c2c c2 ` * D1,* D2,* D1,* 2 H` 1 2 H hold. K , K ,K are the dissociation constants. D,* D1,* D2,*