COP2
COP2
tank cascade with chemical injection in the third tank and pH feedback. We’ll develop both the time‑domain differential equations and then de
domain (transfer function) representation. For clarity, we use the following notation:
We assume that under nominal conditions the process is linearized about pH 7 and that the dynamics in each tank are “first order” due to comp
1. Time‑Domain Model
𝑑𝑥𝑖 (𝑡) 𝐹
= [𝑥𝑖 − 1 (𝑡) − 𝑥𝑖 (𝑡)], for 𝑖 = 1, 2, 4.
𝑑𝑡 𝑉
𝑑𝑥3 (𝑡) 𝐹
= [𝑥2 (𝑡) − 𝑥3 (𝑡)] − 𝑘cl 𝑥3 (𝑡).
𝑑𝑡 𝑉
Notice that the net “loss” (or correction) term in Tank 3 is more aggressive because of chlorine. Equivalently, you could view the effective rate co
𝐹 1
𝑎3 = + 𝑘cl = + 𝑘cl.
𝑉 𝜏
1mm]
\textbf{Tank 4:} \quad \frac{dx_4(t)}{dt} &= \frac{1}{\tau}\Bigl[x_3(t)- x_4(t)\Bigr].
\end{aligned}
Copy
u(t)
│
▼
+-----------+
| Tank 1 | x₁(t)
+-----------+
│
▼
+-----------+
| Tank 2 | x₂(t)
+-----------+
│
▼
+------------------+
| Tank 3 | <-- Chlorine injection here (rate k_cl)
+------------------+ x₃(t)
│
▼
+-----------+
| Tank 4 | x₄(t) = y(t) <-- pH sensor monitors output
+-----------+
Tank 1:
Taking the Laplace transform of
𝑑𝑥1 1
= [𝑢(𝑡) − 𝑥1 (𝑡)],
𝑑𝑡 𝜏
we get:
1 1/𝜏
𝑠𝑋1 (𝑠) = [𝑈(𝑠) − 𝑋1 (𝑠)] ⟹ 𝑋1 (𝑠) = 𝑈(𝑠).
𝜏 𝑠 + 1/𝜏
𝑋1 (𝑠) 1/𝜏
𝐺1 (𝑠) = = .
𝑈(𝑠) 𝑠 + 1/𝜏
Tank 2:
Similarly,
𝑋2 (𝑠) 1/𝜏
𝐺2 (𝑠) = = .
𝑋1 (𝑠) 𝑠 + 1/𝜏
𝑑𝑥3 (𝑡) 1
= [𝑥2 (𝑡) − 𝑥3 (𝑡)] − 𝑘cl 𝑥3 (𝑡)
𝑑𝑡 𝜏
1 1
𝑠𝑋3 (𝑠) = 𝑋 (𝑠) − ( + 𝑘cl ) 𝑋3 (𝑠).
𝜏 2 𝜏
Thus,
1/𝜏
𝑋3 (𝑠) = 1 𝑋2 (𝑠)
𝑠 + 𝜏 + 𝑘cl
𝑋3 (𝑠) 1/𝜏
𝐺3 (𝑠) = = .
𝑋2 (𝑠) 𝑠 + 1/𝜏 + 𝑘cl
Tank 4:
𝑋4 (𝑠) 1/𝜏
𝐺4 (𝑠) = = .
𝑋3 (𝑠) 𝑠 + 1/𝜏
Overall Process Transfer Function
Because the tanks are cascaded, the overall transfer function from the manipulated input 𝑈(𝑠) (applied at Tank 1) to the output 𝑌(𝑠) = 𝑋4 (𝑠)
is the product:
1
𝐺𝑐 (𝑠) = 𝐾𝑐 ( 1 + + 𝑇𝑑 𝑠) ,
𝑇𝑖 𝑠
or equivalently,
𝐾𝑖
𝐺𝑐 (𝑠) = 𝐾𝑑 𝑠 + 𝐾𝑝 + .
𝑠
The controller processes 𝑒(𝑡) and outputs 𝑢(𝑡) (the manipulated input fed to Tank 1). With negative feedback, the closed-
loop transfer function relating the controller’s input setpoint—a signal representing the desired pH (zero deviation in our model)—
to the measured output 𝑌(𝑠) is:
𝐺𝑐 (𝑠) 𝐺process(𝑠)
𝑇(𝑠) = .
1 + 𝐺𝑐 (𝑠) 𝐺process(𝑠)
Final Summary
1. Time‑Domain Equations:
Tank 1:
𝑑𝑥1 1
= [𝑢(𝑡) − 𝑥1 (𝑡)]
𝑑𝑡 𝜏
Tank 2:
𝑑𝑥2 1
= [𝑥1 (𝑡) − 𝑥2 (𝑡)]
𝑑𝑡 𝜏
𝑑𝑥3 1
= [𝑥2 (𝑡) − 𝑥3 (𝑡)] − 𝑘cl 𝑥3 (𝑡)
𝑑𝑡 𝜏
Tank 4:
𝑑𝑥4 1
= [𝑥3 (𝑡) − 𝑥4 (𝑡)]
𝑑𝑡 𝜏
𝐺𝑐 (𝑠) 𝐺process(𝑠)
𝑇(𝑠) = ,
1 + 𝐺𝑐 (𝑠) 𝐺process(𝑠)
where
𝐾𝑖
𝐺𝑐 (𝑠) = 𝐾𝑝 + + 𝐾𝑑 𝑠.
𝑠
Further Considerations
Parameter Identification: In practice, you’ll need to assign numerical values to 𝜏 (related to tank volume and flow rate) and 𝑘cl
(reflecting how rapidly the added chlorine corrects the pH).
Tuning the PID: Simulation tools (such as MATLAB/Simulink or Python with control libraries) can help you tune 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑
for optimal performance.
Nonlinear Effects: Remember that pH is logarithmic in hydrogen ion concentration. For a broader range of operation, you might need to a
Disturbances and Robustness: In realistic scenarios, influent water quality may vary. Consider incorporating disturbance rejection analysis
This detailed model should help you simulate and analyze the control performance for your water purification system. If you’re interested in exp