You are on page 1of 2

Computational Process Simulation and Control

Dr. H Bock

Tutorial 5
In this tutorial we want to move on to dilution, a problem that is different from an engineering perspective,
but mathematically completely analogous to the previous problems.
The substance to be diluted is fed into a tank as a high-concentration solution (stream 1). Dilution is
achieved with a second stream that consists of pure solvent (stream 2). The diluted solution leaves the tank
via an overflow.

The system can be described by the differential equation

dn(t )
dt

C1 (t )V1 (t )

n(t )
[V1 (t ) V2 (t )]
V

where n(t ) is the amount of solute in the tank at time t, C1 (t )


is the concentration of the solute in stream, V1 (t ) and V2 (t )
are the flow rates of streams 1 and 2, respectively and V is the
volume of liquid in the tank. V is constant because of the
overflow.

1) Dilution Steady State


Develop a program that solves the dilution problem. Chose some starting conditions and check that the
steady-state conditions predicted by the simulation coincide with the analytical steady-state solution of the
differential equation. Generate plots for all the interesting quantities using the subplot function.

2) Dilution Response to Step Change in the Concentration


Generate a step change in the concentration of stream 1 after the system has reached steady state and
observe the response.
Just for fun: If you have already learned how to obtain the response using Laplace transforms, compare the
simulation to the result of the Laplace transform.

3) Dilution Feedback Control


Implement and test a method to control the flow rate of the pure-solvent stream with the goal of maintaining
a constant concentration of the effluent stream. Include a maximal flow rate of that stream and make sure
that it cant be negative.
Test other disturbances and the possibility of controlling the flow rate of the solute steam instead of the
solvent stream.

4) Dilution Explicit
A dilution tank with overflow has a capacity of 1m3. It is fed with a 5M aqueous solution of NaOH at 5 litres
per second. NaOH should be diluted to 3M using a second stream of pure water.
What should be the flow rate of the water stream?
How long does it take until the system has reached 99% of the target concentration if initially the
concentration in the tank was 2M?
o First use a graph to get an estimate.
o Then amend your code so it gives you the answer directly. The fprintf function is
useful to do this. Try the following code in the command window to learn how this works:

A=5.6789
fprintf('The area A is

%f m^2.\n',A);

Can you lower the response time?


What do you observe when you keep trying to lower the response time?

Now add feedback control to maintain constant (target) concentration of the effluent stream. The maximum
flow rate of this stream is 4 litres per second and it can not be negative.
Has the time to steady state changed?
How close can you get to the target concentration? Calculate and plot the relative deviation of the
actual concentration from the target concentration.
Change your control algorithm and see what that does to the systems response.

Once the system has reached steady state there is a sudden 20% increase in the concentration of the
NaOH stream. (You can have Matlab check for steady state, but it is sufficient to choose an appropriate time
point manually.)
How long does your the control system need to compensate?

You might also like