IndustrialControlSystems.Applications.ProcessControl

Package that contains a list of control oriented applications

Information

  

Description

In this sub-package the library blocks are used to control true industrial processes.

Extends from IndustrialControlSystems.Icons.ExamplesPackage (Examples package icon).

Package Content

NameDescription
IndustrialControlSystems.Applications.ProcessControl.LevelControl LevelControl Level control with a PI controller
IndustrialControlSystems.Applications.ProcessControl.CascadeLevelControl CascadeLevelControl Cascade level control with PI controllers
IndustrialControlSystems.Applications.ProcessControl.VelocityDriveControl_AutoTuning VelocityDriveControl_AutoTuning Velocity control of an electric engine with Automatic Tuning

IndustrialControlSystems.Applications.ProcessControl.LevelControl IndustrialControlSystems.Applications.ProcessControl.LevelControl

Level control with a PI controller

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


Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
Process
PipeL Pipe length [m]
PipeD Pipe diameter [m]
Lstart Initial water level [m]
H Storage height [m]
A Cross section storage area [m2]
Tact Actuator dynamics
Controller
Ts Sampling time for the valve controller
Kp Proportional gain
Ti Integral time
AntiWindup Flag that enables the antiwindup feature
CSmin minimum value of the CS
CSmax maximum value of the CS
CS_start output initial value
Conversion
FixedPoint Use FP operations for level measurement operations
Nbit number of bit for FP operations
scaleF_div division scale factor
scaleF_sub subtraction scale factor

IndustrialControlSystems.Applications.ProcessControl.CascadeLevelControl IndustrialControlSystems.Applications.ProcessControl.CascadeLevelControl

Cascade level control with PI controllers

Information


  

Description

Level control with two PI controllers, connected with a cascade arrangement.
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 water mass flow rate flowing through the pipe. Such a mass flow rate becomes the set point reference for the second
PI that with its control action regulates the valve aperture
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


Set Point reference (the Control signal of the Level PI) and valve 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. Please refers to the previous example ( LevelControl ) for more information.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
Process
PipeL Pipe length [m]
PipeD Pipe diameter [m]
Lstart Initial water level [m]
H Storage height [m]
A Cross section storage area [m2]
Tact Actuator dynamics
Controller level
Ts_l Sampling time for the valve controller
Kp_l Proportional gain
Ti_l Integral time
AntiWindup_l Flag that enables the antiwindup feature
CSmin_l minimum value of the CS
CSmax_l maximum value of the CS
CS_start_l output initial value
Controller valve
Ts_v Sampling time for the valve controller
Kp_v Proportional gain
Ti_v Integral time
CSmin_v minimum value of the CS
CSmax_v maximum value of the CS
CS_start_v output initial value
Controller
AntiWindup_v Flag that enables the antiwindup feature
Conversion
FixedPoint Use FP operations for level measurement operations
Nbit number of bit for FP operations
scaleF_div division scale factor
scaleF_sub subtraction scale factor

IndustrialControlSystems.Applications.ProcessControl.VelocityDriveControl_AutoTuning IndustrialControlSystems.Applications.ProcessControl.VelocityDriveControl_AutoTuning

Velocity control of an electric engine with Automatic Tuning

Information


  

Description

Velocity control of an electric engine with a PI controller.



The PI controller regulates the voltage source of the electric engine, and measures its angular velocity (corrupted by noise). The aim of this example is to show how a controller with Automatic Tuning can be used in a real context.

In the following table are listed the controller parameters before and after the Automatic tuning
ParameterBeforeAfter AT
Kp0.20.5167
Ti0.50.1399


Automatic Tuning algorithm parameters
ParameterValue
slope5
PermOxPeriodPerc5
pm70
nOxMin3


The figure below show the velocity set point, the measured process variable and the control signal, that is limited between 0 and 24 V.

References

For more information please refers to the following paper:

Efficient hybrid simulation of autotuning PI controllers
Alberto Leva, Marco Bonvini
8th Modelica Conference, Dresden, Germany
march 20-22, 2011

Extends from Modelica.Icons.Example (Icon for runnable examples).

Automatically generated Mon May 21 13:34:17 2012.