Derivation of model
According to the Arrhenius theory of acids and bases, when an acid is added to water, it
contributes an π»+ ion to water to form the molar concentration of hydronium ion
π»3π+ (often represented by π»+ ). The higher the concentration of π»3π+ (or π»+ ) in a
solution, the more acidic the solution is. An Arrhenius base is a substance that generates
hydroxide ions, ππ»β, in water. The higher the concentration of ππ»β in a solution, the more
basic the solution is, i.e.
π»2π β π»+ + ππ»β
pH is defined as the negative of the base–ten logarithm of the molar concentration of
hydronium ions present in the solution. The unit for the concentration of hydrogen ions
is Moles/Liter. ππ» can be determined as follows:
ππ» = βlog(π»+)
Consider the wastewater system outlined in Figure 1 that contains one single tank with
volume π. Let πΆπ»(π‘) (Moles/Liter) and πΆππ»(π‘) (Moles/Liter) denote the concentration of
π»+ and ππ»β ions, respectively. π(π‘) denotes flow rate. Let further subscript π΄ denote
acid, subscript π΅ denote base and no subscript denote the outlet stream. Material
balances for π»+ and ππ»βyields
π π
ππ‘ {πΆπ»(π‘)} = ππ΄(π‘)πΆπ»,π΄ + ππ΅(π‘)πΆπ»,π΅ β π(π‘)πΆπ» + ππ
π π
ππ‘ {πΆππ» (π‘)} = ππ΄(π‘)πΆππ»,π΄ + ππ΅(π‘)πΆππ»,π΅ β π(π‘)πΆππ» + ππ
where π(moles/second . m3) is the rate for the reaction π»2π β π»+ + ππ»β which for
completely dissociated (“strong”) acids and bases is the only reaction in which π»+ and
ππ»β participate. We may eliminate π from the equations by taking the difference to get a
differential equation in terms of the excess of acid
πΆ(π‘) = πΆπ»(π‘) β πΆππ» (π‘)
Page 6 of 12
Hence
π π
ππ‘ {πΆ(π‘)} = ππ΄(π‘)πΆπ΄ + ππ΅(π‘)πΆπ΅ β π(π‘)πΆ(π‘) (1)
where
πΆπ΄ = πΆπ»,π΄ β πΆππ»,π΄ and πΆπ΅ = πΆπ»,π΅ β πΆππ»,π΅
This is the material balance for mixing tank without reaction. The overall model is bilinear
due to the product of flow rate and concentration π(π‘)πΆ(π‘). Note that πΆ(π‘) will take on
negative values when pH is above 7. The acid and base feed concentrations πΆπ΄ and πΆπ΅
for both π»+ and ππ»β are assumed to be constants. Linearising equation (1) around a
steady–state nominal point (denoted with an asterisk)
π π
ππ‘ {πΆ(π‘)} + πβπΆ(π‘) = ππ΄(π‘)(πΆπ΄
β β πΆβ) + ππ΅(π‘)(πΆπ΅
β β πΆβ)
* is used to denote steady–state values, and
πβ = πΆπ΄
β + πΆπ΅
β πΆβ = 10βππ» β 10β14+ππ»
πΆπ΄
β = πΆπ»,π΄ β πΆππ»,π΄ πππ πΆπ΅
β = πΆπ»,π΅ β πΆππ»,π΅
Scaled variables for the input are introduced for the input, output and the disturbance as
follows
π¦(π‘) = πΆ(π‘)
πΆπππ₯
; π(π‘) = ππ΄(π‘)
ππ΄πππ₯
; π’(π‘) = ππ΅(π‘)
ππ΅πππ₯
Tasks
1) Explain how the performance of pH level control system can be compliant with
environmental regulations and the treatment of wastewater. Provide two
examples to explain the importance of a stable pH and its role in minimizing
pollution in our ecosystem. [5 Marks]
2) For a neutral pH = 7 , using Laplace transforms and assuming zero initial
conditions, show that
π¦Μ
(π ) = 1
π π + 1 [πΆπ΄
β β πΆβ
πβ β ππ΄πππ₯
πΆπππ₯
πΜ
(π ) + πΆπ΅
β β πΆβ
πβ β ππ΅πππ₯
πΆπππ₯
π’Μ
(π )]
where the time constant is π = π/πβ
. [7 Marks]
Page 7 of 12
3) Construct a block diagram depicting an open loop arrangement for the signals
and transfer functions defined in 2). [3 Marks]
4) Assume zero initial conditions and a step input with magnitudes πΌ and π½ for each
of πΜ
(π ) and π’Μ
(π ) respectively. Find the concentration output π¦(π‘). [10 marks]
5) Using MATLAB, produce a unit step response for the output π¦(π‘) and verify the
result by comparing it with the analytical result derived in 4). Select the time scales
so that both the transients and the steady state output are visible. [10 marks]
6) Assuming πΜ
(π ) = 0, specify the parameter values that needs to be changed for
the speed of the response to increase. Explain and justify your reasoning using
appropriate mathematical functions and step response plots? [5 marks]
7) Assuming a unity negative feedback loop, derive the following transfer functions
a. πΊππ¦(π )
b. πΊππ¦(π )
c. πΊππ(π )
d. πΊππ(π )
[8 marks]
8) Verify that the closed–loop system is stable by graphically computing the poles
and zeros. [4 marks]
9) Analytically calculate the steady state error due to the disturbance and the
reference signal. What can you infer from the values obtained? [7 marks]
10) Prove that the output π¦(π‘) will only track steady–state targets if there is an
integrator in either a feedforward controller πΆ(π ) or the plant πΊ(π ). What other
condition is required? In addition, using a mathematical derivation, specify the
requirement for disturbance signals to be totally rejected, that is to have no steady–
state impact on the output? [12 marks]
11) Use MATLAB to investigate how offset and performance varies as you change the
scalar controller gain πΎπ. Give some generic conclusions based upon what you
observe. [7 marks]
12) Design two different feedforward controllers using MATLAB/SIMULINK to Page 8 of 12
β’ Reduce the steady state error as much as possible.
β’ Raise damping π to an optimum.
β’ Minimize the response time to reach the steady state value.
Youβll find that a compromise between these multiple goals will be necessary, and
in some cases, you may not be able to meet all goals. Document your design
choices and explain how you arrived at your final design.
The controllers may consist of any combination of P, PI, PD and PID. Design is not
merely for the specified overshoot, but also ensures that the steady state error is
as small as possible. Start with the proportional controller first. You can combine
several compensators but remember that the number of compensator zeros must
never exceed the number of compensator poles (proper system)