.IndustrialControlSystems.Applications.ProcessControl.LevelControl

Information

Description

Level control with a PI regulator.
The considered system is a tank filled with water. The water level is the process variable to be controlled.
The system (see the figure below) is composed by a tank and one pipe connected to a linear valve that discharges the water in the atmosphere. The valve actuator is represented by a first order filter.
The control system is composed by the measurement part and the controller. The pressure sensor measures the absolute pressure
on the bottom of the tank.

The measured pressure is subtracted from the atmospheric pressure and then divided by the
gravity acceleration and the water density in order to obtain the water level.

  level = (p - p0)/(rho*g)
  
The PI controller, given the level measurement and the set point reference compute the control action. Such a control
action is the desidered valve position

The tank is 2 m height, and the water level at t=0 is L = 1 m.
In the first phase the controller is asked to maintain the level at the initial value (SP = 1 m), at t = 1200 s the level set point
decrease as a step (SP = 0.5 m). The controller has to act on the valve in order to decrease the water level to the desired value.
A disturb represented by a water mass flow rate entering the tank, becomes different from zero at time t = 3600 s.

Set Point reference, water level and valve position command

The simulation can be perfomed at an initial stage assuming that the controller is a continuous time one (Ts = 0) , that the math
operations are in double precision (FixedPoint = false). In such a phase it is possible to concentrate on the controller design.

Further stages

Once the controller has been designed and the parameters assigned, one should introduce more details in order to simulate a more realistic system. At first it is possible to introduce the time discretisation and investigate the effect of the sampling time.
Here follows the results for a sapling time Ts = 5.


An additional level of detail can be the introduction of the fixed point math operation in the level measurement process. In this case has been choosen a number of bit Nbit = 24 this means that the integer number that can be represented are comprises between MIN = -8388609 and MAX = 8388608. At the first stage, the measured pressure have to be subtracted of the ambient one. In the wors case, the higher pressure value that can be read as input from the math operation block is

  101325 + 1000*9.81*2 = 120945
  
that is more or less two order of magnitude less that the higher integer number MAX. This means that the input numbers can be multiplied by a scale factor comprises between 10 and 50. In this case the scale factor that has been choosen is sFactor = 20. In a similat way the scale factor of the division can be choosen. In this case sFactor = 500.
N.B. A large amount of bit is requireb because the pressure variation is small with respect to its absolute value. Using such a modelling approach it is possible to estimate the amount of bits required and test directly the correctness of the design strategy. In the following image the numerical errors due to a wrong design are visible on the Control Signal


Revisions

Industrial Control Systems (v 1.0.0) : April-May 2012
List of revisions:

Main Authors:
Marco Bonvini; <bonvini@elet.polimi.it>
Alberto Leva <leva@elet.polimi.it>
Politecnico di Milano
Dipartimento di Elettronica e Informazione
Via Ponzio 34/5
20133 Milano - ITALIA -
Copyright:
Copyright © 2010-2012, Marco Bonvini and Alberto Leva.
The IndustrialControlSystems package is free software; it can be redistributed and/or modified under the terms of the Modelica license.

Generated at 2024-11-21T19:25:40Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos