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

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 baseten 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
steadystate nominal point (denoted with an asterisk)
𝑉 𝑑
𝑑𝑑 {𝐢(𝑑)} + π‘žβˆ—πΆ(𝑑) = π‘žπ΄(𝑑)(𝐢𝐴
βˆ— βˆ’ πΆβˆ—) + π‘žπ΅(𝑑)(𝐢𝐡
βˆ— βˆ’ πΆβˆ—)
* is used to denote steadystate 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 closedloop 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 steadystate 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)