Modeling a Process - Filling a Tank

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


The tank above is filled at a flow rate of Qin m3/sec which is the input to the system.  The output is the discharge flowrate, Qout m3/sec.  If Qin = Qout, the level, h, remains constant.  If Qin > Qout, the level, h, rises.  If Qin < Qout, the level, h, falls.  This much is obvious but what exactly is the relationship between the flow in, the flow out and the level.

 

The following equation is a mass balance that can be applied to any system:

 

In - Out = Accumulation

 

In this case, the accumulation manifests itself as an increase or a decrease in volume.  Accumulation is the change in volume with time.

 

Qin - Qout = DV/Dt

 

Volume, V = area x height = A x h.  The diameter, d, is a constant because the walls of the tank are vertical and parallel.  Therefore, h is the only variable which means that DV = Dh x A.  Writing the equation in differential form, we have:

 

Qin - Qout = A dh/dt

 

Next, consider the output flowrate, Qout.  The driving force for the discharge flow is the head of water in the tank which is given by rgh.  The restriction to the discharge flow is the presence of the valve (and to a lesser extent the pipe) and this can be represented by a resistance, R, i.e.

 

Qout = rgh/R

 

R has units of Newton seconds/metre5

 

Therefore, the above equation can be rewritten as follows:

 

 

Examination of this equation reveals that it has the following form:

 

 

i.e. it has the first order characteristic where the output, qo, is equivalent to height, h; the input, qi, is equivalent to the flow in, Qin, and the time constant and gain are as follows:

 

 

The value of the resistance, R, depends upon the position of the valve.  If the valve is almost closed, R is large and if the valve is fully open, R is small.  R can be determined if the area available for discharge is known.

 

The above equation describes the relationship between the input and the output of the system in the time domain.  Converting this equation to the frequency domain using a Laplace transform allows us to determine the transfer function for this system.  Once we know the transfer function we can include this process as one block in a block diagram model of a control loop.

 

The other benefit of determining the Laplace transform of the equation is that we can choose a particular input (e.g. a step change in the input) and multiply this by the transfer function to give the output in the frequency domain.  The equation is then converted back to the time domain and hey presto we now have an equation that describes the response of the output to a step change in the input.

 

Before continuing, understand the following:

 

·      What is a Laplace transform?

·      Transform a first order differential equation to the frequency domain

·      Determine the transfer function of the process in the frequency domain

·      Evaluate the Laplace transform of a unit step signal

·      Multiply the transfer function by a step input and transform the result back to the time domain

 

 

Applying the Laplace Transform to the Tank Filling System

 

The first order differential equation derived above that describes how the level in a tank changes with time for a given input is as follows:

 

 

where

 

 

Converting this equation to the frequency domain and rearranging in terms of the output over the input gives the following:

 

 

Think of a step change in the input, let qi(s) = a (=a/s in the frequency domain).  Substituting for qi(s) and rearranging we get:

 

 

Applying an inverse Laplace transform, we get that:

 

 

where the time constant and steady state gain are the same as above.