WOLFRAM SYSTEM MODELER
PIDDiscrete-time PID controller |
SystemModel["Modelica_Synchronous.WorkInProgress.Incubate.PID"]
This block defines a text-book version of a discrete-time PID controller by the formula:
// Transfer function form: G(z) = (b0*z^2 + b1*z + b2) / (z^2 - z); b0 = k*(1 + T/Ti + Td/T) b1 = -k*(1 + 2*Td/T) b2 = k*Td/T
where k is the gain of the controller, Ti is the time constant of the integrative part, Td is the time constant of the derivative part, and T is the sample period.
This discrete-time form has been derived from the continuous-time form of a PID controller by using the backward rectangular approximation (also called backward euler method or right-hand approximation) between the s- and z- domain:
s = (z - 1)/(h*z)
k |
Value: 1 Type: Real Description: Gain of PID controller |
---|---|
Ti |
Value: 0.5 Type: Real Description: Time constant of integrator part |
Td |
Value: 0.1 Type: Real Description: Time constant of derivative part |
y_start |
Value: 0 Type: Real Description: Initial value of output |
u |
Type: RealInput Description: Connector of clocked, Real input signal |
|
---|---|---|
y |
Type: RealOutput Description: Connector of clocked, Real output signal |
Modelica_Synchronous.WorkInProgress.Incubate |