0% found this document useful (0 votes)
18 views4 pages

COP2

The document presents a comprehensive model for a 4-tank cascade system with chemical injection in the third tank and pH feedback. It includes time-domain differential equations for each tank, a Laplace domain transfer function representation, and a closed-loop control system using a PID controller. Key equations and transfer functions are provided to facilitate simulation and analysis of the water purification system's control performance.

Uploaded by

sena.mokonin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

COP2

The document presents a comprehensive model for a 4-tank cascade system with chemical injection in the third tank and pH feedback. It includes time-domain differential equations for each tank, a Laplace domain transfer function representation, and a closed-loop control system using a PID controller. Key equations and transfer functions are provided to facilitate simulation and analysis of the water purification system's control performance.

Uploaded by

sena.mokonin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Let's dive deeper into a comprehensive model for your 4‐

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:

𝐹: Constant flow rate through each tank (L/s)


𝑉: Volume of each tank (L)
𝑉
𝜏 = : Residence (time constant) of each tank
𝐹
𝑥𝑖 (𝑡): “State” of Tank 𝑖
; in our case, it represents the deviation of the water’s pH (or, more broadly, its quality index related to pH) from the target level (with
𝑥𝑖 (𝑡) = 0 corresponding to pH 7)
𝑢(𝑡): Manipulated input at Tank 1 (for example, the corrective chemical addition or adjustment in the influent pH)
𝑘cl: Additional effective reaction rate in Tank 3 due to chlorine (or similar chemical) injection
𝑦(𝑡) = 𝑥4 (𝑡): Process output measured by the pH sensor, located in Tank 4

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

Tanks 1, 2, and 4 (No Extra Chemical Action)


For these tanks, the change in state is just the difference between what comes in and what leaves:

𝑑𝑥𝑖 (𝑡) 𝐹
= [𝑥𝑖 − 1 (𝑡) − 𝑥𝑖 (𝑡)], for 𝑖 = 1, 2, 4.
𝑑𝑡 𝑉

where for Tank 1 we let 𝑥0 (𝑡) ≡ 𝑢(𝑡).

Tank 3 (With Chlorine Injection)


Here the chlorine acts to correct the water’s pH by effectively “accelerating” the reaction that drives the state toward zero. We model this additi

𝑑𝑥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.
𝑉 𝜏

Summary of Differential Equations


\[ \begin{aligned} \textbf{Tank 1:} \quad \frac{dx_1(t)}{dt} &= \frac{1}{\tau}\Bigl[u(t) - x_1(t)\Bigr], \
\[1mm] \textbf{Tank 2:} \quad \frac{dx_2(t)}{dt} &= \frac{1}{\tau}\Bigl[x_1(t)- x_2(t)\Bigr], \
\[1mm] \textbf{Tank 3:} \quad \frac{dx_3(t)}{dt} &= \frac{1}{\tau}\Bigl[x_2(t) - x_3(t)\Bigr] - k_{\text{cl}}\, x_3(t), \

1mm]
\textbf{Tank 4:} \quad \frac{dx_4(t)}{dt} &= \frac{1}{\tau}\Bigl[x_3(t)- x_4(t)\Bigr].
\end{aligned}

An ASCII schematic of the process is:

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
+-----------+

2. Laplace (Transfer Function) Model


Let’s move into the Laplace domain (assuming zero initial conditions). Define 𝑋𝑖 (𝑠) = 𝐿{𝑥𝑖 (𝑡)}, and 𝑈(𝑠) = 𝐿{𝑢(𝑡)}.

Tank 1:
Taking the Laplace transform of

𝑑𝑥1 1
= [𝑢(𝑡) − 𝑥1 (𝑡)],
𝑑𝑡 𝜏

we get:

1 1/𝜏
𝑠𝑋1 (𝑠) = [𝑈(𝑠) − 𝑋1 (𝑠)] ⟹ 𝑋1 (𝑠) = 𝑈(𝑠).
𝜏 𝑠 + 1/𝜏

Thus, the transfer function is:

𝑋1 (𝑠) 1/𝜏
𝐺1 (𝑠) = = .
𝑈(𝑠) 𝑠 + 1/𝜏

Tank 2:
Similarly,

𝑋2 (𝑠) 1/𝜏
𝐺2 (𝑠) = = .
𝑋1 (𝑠) 𝑠 + 1/𝜏

Tank 3 (with chlorine correction):


For Tank 3,

𝑑𝑥3 (𝑡) 1
= [𝑥2 (𝑡) − 𝑥3 (𝑡)] − 𝑘cl 𝑥3 (𝑡)
𝑑𝑡 𝜏

which in Laplace becomes:

1 1
𝑠𝑋3 (𝑠) = 𝑋 (𝑠) − ( + 𝑘cl ) 𝑋3 (𝑠).
𝜏 2 𝜏

Thus,

1/𝜏
𝑋3 (𝑠) = 1 𝑋2 (𝑠)
𝑠 + 𝜏 + 𝑘cl

and the transfer function is:

𝑋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:

𝐺process(𝑠) = 𝐺1 (𝑠) ⋅ 𝐺2 (𝑠) ⋅ 𝐺3 (𝑠) ⋅ 𝐺4 (𝑠).

Substituting our expressions, we obtain:

1/𝜏 1/𝜏 1/𝜏 1/𝜏


𝐺process(𝑠) = ⋅ ⋅ ⋅ .
𝑠 + 1/𝜏 𝑠 + 1/𝜏 𝑠 + 1/𝜏 + 𝑘cl 𝑠 + 1/𝜏

Or, more compactly:


\[ G_{\text{process}}(s)= \frac{\left(\frac{1}{\tau}\right)4}{(s+1/\tau)3 \,\Bigl[s+ \left(\frac{1}{\tau}+ k_{\text{cl}}\right)\Bigr]}. \]

3. Closed-Loop Control with pH Feedback


Because your target is pH 7—that is, a zero deviation—we define the error signal:

𝑒(𝑡) = (𝑝𝐻target − 𝑝𝐻measured ) or, in our linearized model, 𝑒(𝑡) = − 𝑥4 (𝑡).

A PID controller acting on this error typically has a transfer function:

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(𝑠)

Substituting the process transfer function, we have:


\[ T(s)= \frac{G_c(s)\, \dfrac{\left(\frac{1}{\tau}\right)4}{(s+1/\tau)3 \,\left[s+ \left(\frac{1}{\tau}+ k_{\text{cl}}\right)\right]}}
{1 + G_c(s)\, \dfrac{\left(\frac{1}{\tau}\right)4}{(s+1/\tau)3 \,\left[s+ \left(\frac{1}{\tau}+ k_{\text{cl}}\right)\right]}}. \]
This is the complete closed-loop transfer function of your purification system.

Final Summary
1. Time‑Domain Equations:
Tank 1:

𝑑𝑥1 1
= [𝑢(𝑡) − 𝑥1 (𝑡)]
𝑑𝑡 𝜏

Tank 2:

𝑑𝑥2 1
= [𝑥1 (𝑡) − 𝑥2 (𝑡)]
𝑑𝑡 𝜏

Tank 3 (with chlorine):

𝑑𝑥3 1
= [𝑥2 (𝑡) − 𝑥3 (𝑡)] − 𝑘cl 𝑥3 (𝑡)
𝑑𝑡 𝜏

Tank 4:
𝑑𝑥4 1
= [𝑥3 (𝑡) − 𝑥4 (𝑡)]
𝑑𝑡 𝜏

2. Process Transfer Function:


\[ G_{\text{process}}(s)= \frac{\left(\frac{1}{\tau}\right)4}{(s+1/\tau)3\,\Bigl[s+ \Bigl(\frac{1}{\tau}+ k_{\text{cl}}\Bigr)\Bigr]}. \]
3. Closed‑Loop (with PID) Transfer Function:

𝐺𝑐 (𝑠) 𝐺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

You might also like