Mixing Tank Example
From ControlTheoryPro.com

Contents
1 Introduction to the Mixing Tank Example
This article was contributed by Asim Vodencarevic (see the forum topic). I've
There is one mixing tank and two inlet valves. Control valves can control input flow of hot and cold water. There is one outlet pump. The objective is to control both temperature and level.
2 Model of the Mixing Tank
We need to write differential equations which describe the dynamics of the system.
2.1 Water Level
The differential equation for level is a matter of mass balance.
where
 is the tank crosssectional area and
 is the tank level.
where
 is the Pump Capacity,
 is the fraction of full capacity (can be getween [0 1]), and
 is tank output.
Finally this can be reduced to
Eqn. 1 
2.2 Water Temperature
There is only one fluid (water), so density and specific heat are the same in all terms. Now if we combine the last equation with the level equation (Eqn. 1)
This yields
Eqn. 2 
3 Simulink Model
Eqn. 1 
Eqn. 3 
Parameters  Value  Units 


0.0042 


0.4 
N/A 

0.5 
N/A 

1 
m 

40 
deg C 

0.00378 


1 

3.1 Simulink Model Results
Eqn. 1 
Eqn. 3 