Examples
Information
Extends from IndustrialControlSystems.Icons.ExamplesPackage (Examples package icon).
Package Content
Name | Description |
TestP_bias
| Test of the Proportional controller with bias |
TestI_bias
| Test of the Integral controller with bias |
TestD_bias
| Test of the Derivative controller with bias |
TestPI_bias
| Test of the Proportional + Integral controller with bias |
TestPD_bias
| Test of the Proportional + Derivative controller with bias |
TestPID_bias
| Test of the Proportional + Integral + Derivative controller with bias |
TestP_tracking
| Test of the Proportional controller -- Tracking mode |
TestI_tracking
| Test of the Integral controller -- Tracking mode |
TestD_tracking
| Test of the Derivative controller -- Tracking mode |
TestPI_tracking
| Test of the Proportional+Integral controller -- Tracking mode |
TestPD_tracking
| Test of the Proportional + Derivative controller -- Tracking mode |
TestPID_tracking
| Test of the Proportional + Integral + Derivative controller -- Tracking mode |
Test of the Proportional controller with bias
Information
Description
In this example have been tested the proportional controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are three processes:
- without controller,
- with a P controller,
- and a P controller with bias signal

The output signal of the process without control is the red line. Of course the system performs poorly
especially when an external disturb is applied.
In the closed loop system, the proportional controller tries to follow the SP with a steady state error that can
be reduced by increasing its parameter Kp. The disturbance can be rejected using the bias signal of the controller (pink line).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Integral controller with bias
Information
Description
In this example have been tested the Integral controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are three processes:
- without controller,
- with a I controller,
- and a I controller with bias signal

The output signal of the process without control is the red line. Of course the system performs poorly,
in particular when an external disturb is applied.
In the closed loop system, the integral controller reach the SP with a null steady state error.
The disturbance can be rejected using the bias signal of the controller (pink line).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Derivative controller with bias
Information
Description
In this example have been tested the Derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) s(1+10s)(1+2s)
There are three processes:
- without controller,
- with a D controller,
- and a D controller with bias signal

The output signal of the process without control diverges (due to the presence of an integrator) and is not reported.
In the closed loop system, the derivative controller cannot reach the SP reference, but it remains in a neighborhood of it.
The disturb (pink signal) can be rejected using the bias signal of the controller (green line), otherwise the action
does not reach a satisfactory performance (the Process Variable move away from the Set Point reference).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional + Integral controller with bias
Information
Description
In this example have been tested the Proportional + Integral controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are three processes:
- without controller,
- with a PI controller,
- and a PI controller with bias signal

The output signal of the process without control is the red line. Of course the system performs poorly,
in particular when an external disturb is applied.
In the closed loop system, the proportional + integral controller reach the SP with a null steady state error.
The disturbance can be rejected using the bias signal of the controller (pink line).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional + Derivative controller with bias
Information
Description
In this example have been tested the proportional + Derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) s(1+10s)(1+2s)
There are three processes:
- without controller,
- with a PD controller,
- and a PD controller with bias signal

The output signal of the process without control diverges (due to the presence of an integrator) and is not reported.
In the closed loop system, the proportional + derivative controller cannot reach the SP reference, but it remains in a neighborhood of it.
In this case theparameter Kp can reduce the amplitude of such a neighborhood. The disturb (red signal) can be rejected using the bias signal
of the controller (pink line), otherwise the action does not reach a satisfactory performance (the Process Variable move away from the Set Point reference).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional + Integral + Derivative controller with bias
Information
Description
In this example have been tested the Proportional + Integral + Derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are three processes:
- without controller,
- with a PID controller,
- and a PID controller with bias signal

The output signal of the process without control is the red line. Of course the system performs poorly,
in particular when an external disturb is applied.
In the closed loop system, the proportional + integral + derivative controller reach the SP with a null steady state error.
The disturbance can be rejected using the bias signal of the controller (pink line).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
examples
Ts = 0.01 s and method = BE

Ts = 0.05 s and method = BE

Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the proportional controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are two processes:
- with a P controller,
- and a P controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Integral controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the integral controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are two processes:
- with a I controller,
- and a I controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Derivative controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) s(1+10s)(1+2s)
There are two processes:
- with a D controller,
- and a D controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode. The signal moves away from the SP because of the integrator
in the process. The derivative controller, cannot act in order to move the PV closer to the SP.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional+Integral controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the proportional + integral controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are two processes:
- with a PI controller,
- and a PI controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Bumpless transition
If the Track Reference signal moves the Process Variable at the Set Point reference value, once the Tracking mode
is disabled there should be a bumpless transition. The images below show a bumpless transition.


The integrative effect, represented by the first order filter in the feedback path of the PID controller
(see the PI block diagram here), is forced to follow
the tracking reference (FBout signal in the last figure). In the same figure there is a small variation of the CS
when the automatic mode start again, because the PV is not exactly at the SP value and thus the proportional
action introduce a little displacement (the blue line at t = 100).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional + Derivative controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the proportional + derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) s(1+10s)(1+2s)
There are two processes:
- with a PD controller,
- and a PD controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode. The signal moves away from the SP because of the integrator
in the process. The derivative controller, cannot act in order to move the PV closer to the SP.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Test of the Proportional + Integral + Derivative controller -- Tracking mode
Information
Description
In this example have been tested the tracking mode of the proportional + integral + derivative controller.
The process to be controlled has the following transfer function
Y(s) (1+15s)
---- = ----------------
U(s) (1+10s)(1+2s)
There are two processes:
- with a PID controller,
- and a PID controller with tracking mode
The output signal of the process controlled without tracking is the red line, while the green line is the
output of the process controlled with the tracking mode.

The CS of the controller becomes equal to the track reference signal TR when the Track Switch signal becomes true.

Bumpless transition
If the Track Reference signal moves the Process Variable at the Set Point reference value, once the Tracking mode
is disabled there should be a bumpless transition. The images below show a bumpless transition.


The integrative effect, represented by the integrator in the feedback path of the PID controller
(see the PID block diagram here), is forced to follow
the tracking reference (Iaction signal in the last figure). In the same figure there is a small variation of the CS
when the automatic mode start again, because the PV is not exactly at the SP value and thus the proportional
action introduce a little displacement (the blue line at t = 100).
Discrete time
If the model parameter Ts is >=0 the continuous time controllers are
replaced by their discrete time versions.
The effect of various discretisation method can be studied.
examples
Ts = 0.01 s and method = BE

Ts = 0.05 s and method = BE

Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Name | Description |
Sampling time |
Ts | if Ts>=0 then discrete time controller, otherwise continuous time |
Automatically generated Mon May 21 13:34:16 2012.