IndustrialControlSystems.Controllers.Digital.Examples

Examples

Information

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

Package Content

NameDescription
IndustrialControlSystems.Controllers.Digital.Examples.TestPID TestPID Test of the 2DoF digital PID controller
IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDO TestPID_TDO Test of the 2DoF digital PID controller with Time Division Output (TDO)
IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe TestPID_TDOe Test of the 2DoF digital PID controller with event based Time Division Output (TDO)

IndustrialControlSystems.Controllers.Digital.Examples.TestPID IndustrialControlSystems.Controllers.Digital.Examples.TestPID

Test of the 2DoF digital PID controller

Information

  

Description

In this example have been tested the functionalities of the 2DoF incremental PID.
The PID has to control the process with transfer function

   Y(s)             5*s +1
   ----  =  -----------------------
   U(s)        20*s^2 + 12*s + 1
  
The image compares the outputs of the process y with and without the controller action.

Functionalities

In the following figure are shown the functionalities of the block. At the beginning the process variable
does not grows because the Finc signal that forbid the CS increment is true.
At t = 15 it becomes false and the PID start to act on the process, leading the PV to the Set Point desidered value.

At t = 40 the TS signal becomes true and it is maintained until t = 130. In such a period the
Control signal follows the TR one (the green one). To note that at the end the transition between Tracking and Automatic mode
is bumpless.
Between t = 200 and t = 300, the PID manual mode is enabled. In this phase the Control Signal varies according to the CSinc signal (see figure below).

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

IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDO IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDO

Test of the 2DoF digital PID controller with Time Division Output (TDO)

Information

  

Description

In this example have been compared the 2DoF incremental PID, with its Time Division Output implementation.
The PIDs have to control the process with transfer function

   Y(s)             5*s +1
   ----  =  -----------------------
   U(s)        20*s^2 + 12*s + 1
  
The image compares the outputs of the process y with and without the controllers action.

The following image compares the CS computed by the TDO controller (before its conversion), and the CS comuted by the
controller without TDO.

Basic implementation

The basic implementation of the digital incremental PID with TDO, introduces an high number of time events, thus the time spent
for simulating the model is high. Here follows the simulation results for the considere examples

     
  Integration started at T = 0 using integration method DASSL
  (DAE multi-step solver (dassl/dasslrt of Petzold modified by Dynasim))
  Integration terminated successfully at T = 70
    WARNING: You have many time events. This is probably due to fast sampling.
    Enable logging of event in Simulation/Setup/Debug/Events during simulation
     CPU-time for integration      : 5.68 seconds
     CPU-time for one GRID interval: 11.4 milli-seconds
     Number of result points       : 70000
     Number of GRID   points       : 501
     Number of (successful) steps  : 350000
     Number of F-evaluations       : 1295000
     Number of Jacobian-evaluations: 315000
     Number of (model) time events : 35000
     Number of (U) time events     : 0
     Number of state    events     : 0
     Number of step     events     : 0
     Minimum integration stepsize  : 2e-06
     Maximum integration stepsize  : 0.000978
     Maximum integration order     : 2
  

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

IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe

Test of the 2DoF digital PID controller with event based Time Division Output (TDO)

Information

  

Description

In this example have been compared the 2DoF incremental PID, with its Time Division Output implementation.
The PIDs have to control the process with transfer function

   Y(s)             5*s +1
   ----  =  -----------------------
   U(s)        20*s^2 + 12*s + 1
  
The image compares the outputs of the process y with and without the controllers action.

The following image compares the CS computed by the TDO controller (before its conversion), and the CS comuted by the
controller without TDO.

Event Based implementation

The event based implementation of the digital incremental PID with TDO, reduces the time spent for simulating the model. Here follows the simulation results for the considere examples

  Integration started at T = 0 using integration method DASSL
  (DAE multi-step solver (dassl/dasslrt of Petzold modified by Dynasim))
  Integration terminated successfully at T = 70
     CPU-time for integration      : 0.12 seconds
     CPU-time for one GRID interval: 0.24 milli-seconds
     Number of result points       : 1748
     Number of GRID   points       : 501
     Number of (successful) steps  : 7200
     Number of F-evaluations       : 26592
     Number of Jacobian-evaluations: 6373
     Number of (model) time events : 649
     Number of (U) time events     : 0
     Number of state    events     : 0
     Number of step     events     : 0
     Minimum integration stepsize  : 2.09e-06
     Maximum integration stepsize  : 0.0993
     Maximum integration order     : 2
  

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

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