modelPI_ContinuousVsDigital

Comparison between continuous time PID and its discrete time implementations

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

Information

Description

In this examples are compared three PID controllers:

  • Continuous time PID with two degrees of freedom (model PID (with Ts=0) ),
  • the discretised version of the continuous time PID with two degrees of freedom (model PID ),
  • and the digital implementation of the PID with two degrees of freedom in the incremental form (model PID_2dof ).

There controllers regulates a second order process with trasfer function
   Y(s)          (1+15s)
   ----  =  ----------------
   U(s)       (1+10s)(1+2s)
  

The following images show the SetPoint following and disturbance rejection without saturation

Set Point and Process Variables

Control Signals


To be noticed that the discretised version of the PID and the digital implementation of the incremental PID have the same behaviour.
The same is not valid when the saturation is introduced. If limiting the controller action between [0,2] the discrete time version and the digital one behave quite differently

Set Point and Process Variables

Control Signals



This difference is due to the nature of the digital implementation that is incremental, while the other two are positional.
This problem does not appear if the Set Point reference changes soothly, switching to a ramp Set Point signal, as shown in the following picture.

Process Variables and Control Signals with a ramp Set Point

Components

TypeNameDefaultDescription
LinearSystems.Continuous.TransferFunctionP_disc
Controllers.PIDR_disc
Modelica.Blocks.Sources.StepSetPointSTEP
Controllers.PIDR_cont
Modelica.Blocks.Math.Feedbacksum1
Modelica.Blocks.Math.Feedbacksum2
Modelica.Blocks.Sources.StepDisturb
Modelica.Blocks.Math.Feedbacksum3
Controllers.Digital.PID_2dofR_dig
LinearSystems.Continuous.TransferFunctionP_cont
LinearSystems.Continuous.TransferFunctionP_dig
Modelica.Blocks.Sources.RampSetPointRAMP
Modelica.Blocks.Logical.Switchswitch
Modelica.Blocks.Sources.BooleanConstantSelectSPif true the SP is a step, otherwise is a ramp

Revisions

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

  • 11 May 2012 (author: Marco Bonvini)

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.