blockPID

Limited PID controller

Extends from Interfaces.PartialConverters.Policy_SO (Policy Block (Decision Making/Controller)).

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

This element makes use of the →LimPID element in the Modelica Standard Library. The controller is a very flexible component which allows to model P, PI, PD, PID controllers as needed.

A PID controller continually calculates the error e(t) = u_desiredValue(t) - u_currentValuet(t) and then applies a correction based upon proportional (P), integral (I), and derivatice (D) terms as indicated in the standard form

y(t) = ...

The parameter k here denotes the total gain for the controller's output, i.e., the sum of the respective error terms. Ti can be thought of as the time span to correct the total accumulated error, while Td is the time to forecast the error into the future, i.e., the current rate of change for the error times Td.

See also

PID_Control

Parameters

TypeNameDefaultDescription
GainTypek1Gain of controller [GainType]
TimeTi0.5Time constant of integrator (i.e., gain for integrator = 1/Ti)
TimeTd0.1Derivative gain (i.e., time span for error prediction)
OutputTypeyMaxinfUpper limit of output
OutputTypeyMin-yMaxLower limit of output
Fractionwp1Set-point weight for Proportional block (0..1)
Fractionwd0Set-point weight for Derivative block (0..1)
DimensionlessNi0.9Ni*Ti is time constant of anti-windup compensation
DimensionlessNd10The higher Nd, the more ideal the derivative block
DimensionlesskFF1Gain of feed-forward input
Structural Parameters
SimpleControllercontrollerTypeSimpleController.PIDType of controller
BooleanhasFeedForwardfalseUse feed-forward input?
Initialization
InitinitTypeInit.NoInitType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Unspecifiedxi_start0Initial or guess value for integrator output (= integrator state)
Unspecifiedxd_start0Initial or guess value for state of derivative block
OutputTypey_start0Initial value of output
LimiterHomotopyhomotopyTypeLimiterHomotopy.LinearSimplified model for homotopy-based initialization
Advanced
Booleanstrictfalse= true, if strict limits with noEvent(..)
Dummy
BooleanlimitsAtInittrueHas no longer an effect and is only kept for backwards compatibility (the implementation uses now the homotopy operator)

Connectors

TypeNameDefaultDescription
Interfaces.Connectors.RealInputu_desiredValueThe goal to meet (setpoint)
Interfaces.Connectors.RealInputu_currentValueThe measured state of the system under control
Interfaces.Connectors.RealInputu_feedForwardAn optional feedforward input

Components

TypeNameDefaultDescription
RealOutputy (from Policy_SO)Policy output signal

Contents

NameDescription
GainTypeprotected

Revisions

  • Updated type definitions and documentation in v2.0.0.

  • Class adapted as to be compliant with MSL 4.0.0 in v2.2.