Control of a Cold and Hot Water Constant-Volume Mixer
Authors: Housam Binous and Ahmed Bellagi
Control of a Cold and Hot Water Constant-Volume Mixer
Authors: Housam Binous and Ahmed Bellagi
Authors: Housam Binous and Ahmed Bellagi
Figure below shows a sketch of a mixer.Material balance is :Energy balance is :The problem is a MIMO. However, if we assume =0 (i.e. h is constant) then =+ and we recover a SISO problem.Here, we propose to control the temperature of the mixer outlet stream, , by manipulating the flow rate of the hot stream: .=+e(t)+e(t)twithe(t)=-TGiven: A=2 m2, =0.25 l/min, =0.5 l/min, V = 6 m3, =25°Cand =75°C. We find h=3 m, the outlet steady-state temperature T=58.33 °C and =0.75l/min.We suppose that the temperature of the cold water stream rises to 40 °C at t=100 min.For each one of the scenarios below, we plot the outlet temperature and flow rate versus time.1. there is no control action.2. A P-controller is used to control the outlet water temperature. Controller gain is Kc = 0.1. =58.33°C.3. A PI-controller is used to control the outlet water temperature. Controller gain is Kc = 0.1 and the reset time is τI = 1 min. 4. The cold water temperature is kept equal to 25 °C and the set point is fixed equal to 65 °C at t=100 min. A PI-controller is used to control the outlet water temperature. Controller gain is Kc = 0.1 and the reset time is τI = 1 min.References:[1] Modelling of the Mixing Tank: Chemical Process Modelling and Simulation : https://www.youtube.com/watch?v=jP3P9psQkKA
A=+-
h
t
Cold
F
in
Hot
F
in
F
out
Ah=(-T)+(-T)
T
t
Cold
F
in
T
Cold
Hot
F
in
T
Hot
h
t
F
out
Cold
F
in
Hot
F
in
T
Hot
Hot
F
in
Hot
F
in
F
n
K
c
1
τ
I
T
sp
Cold
F
in
F
n
T
Cold
T
Hot
F
out
T
sp
In[]:=
A=2;FinCold=0.25;FinHot=0.5;Fn=0.5;THot=75;TCold=25;
In[]:=
ss=NSolve[{0FinCold(TCold-Ts)+FinHot(THot-Ts)},Ts]
Out[]=
{{Ts58.3333}}
In[]:=
h=V/A;V=6;Fn=0.5;
Open loop response or no control action
In[]:=
TCold=If[t<100,25,40]
Out[]=
If[t<100,25,40]
In[]:=
sol=NDSolve[{AhT'[t]FinCold(TCold-T[t])+FinHot(THot-T[t]),T[0]First@(Ts/.ss)},T,{t,0,500}]
Out[]=
TInterpolatingFunction
In[]:=
Plot[T[t]/.sol,{t,0,200},FrameTrue,GridLinesAutomatic,PlotStyle{Thick,Darker@Blue},AspectRatio1,ImageSize400{1,1},FrameLabel{Style["time (min)",16,Italic],Style["temperature (°C)",16,Italic]}]
Out[]=
Closed loop response - proportional only control action
In[]:=
Kc=0.1;Tsp=58.33;
In[]:=
FinHot=Fn+Kc(Tsp-T[t])
Out[]=
0.5+0.1(58.33-T[t])
In[]:=
sol=NDSolve[{AhT'[t]FinCold(TCold-T[t])+FinHot(THot-T[t]),T[0]First@(Ts/.ss)},T,{t,0,500}]
Out[]=
TInterpolatingFunction
In[]:=
Plot[T[t]/.sol,{t,0,200},FrameTrue,GridLinesAutomatic,PlotStyle{Thick,Darker@Red},AspectRatio1,ImageSize400{1,1},FrameLabel{Style["time (min)",16,Italic],Style["temperature (°C)",16,Italic]}]
Out[]=
In[]:=
offset=Abs[Tsp-First[T[t]/.sol/.t200]]
Out[]=
1.6676
Closed loop response - proportional-integral control action
In[]:=
Kc=0.1;Tsp=58.33;tauI=1;
In[]:=
FinHot=Fn+Kc(Tsp-T[t])+Kc/tauIIntErr[t]
Out[]=
0.5+0.1IntErr[t]+0.1(58.33-T[t])
In[]:=
sol=NDSolve[{AhT'[t]FinCold(TCold-T[t])+FinHot(THot-T[t]),IntErr'[t]Tsp-T[t],IntErr[0]0,T[0]First@(Ts/.ss)},{T,IntErr},{t,0,200}]
Closed loop response - proportional-integral control action - response to a set point change
