blockController
Output relay signals for tuning PID controllers
Information
This block generates a relay output yDif = (u_m - u_s)/r, where
u_m is the measurement,
u_s is the setpoint and
r is the typical range of control error.
This block also generates the control output y,
and a boolean relay switch output yOn using the following
procedure.
Step 1: Calculate control error,
-
If the parameter
reverseActing = true, set the control errorerr = (u_s - u_m)/r, else seterr = (u_m - u_s)/r.
Step 2: Calculate y and yOn,
-
If
err > deaBanandtrigger = true, theny = yHigandyOn = true, -
else if
err < -deaBanandtrigger = true, theny = yLowandyOn = false, -
else,
yandyOnare kept as the initial values.
where deaBan is a dead band, yHig and yLow
are the higher value and the lower value of the output y, respectively.
References
J. Berner (2017). "Automatic Controller Tuning using Relay-based Model Identification." Department of Automatic Control, Lund University.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | r | 1 | Typical range of control error, used for scaling the control error |
| Real | yHig | Higher value for the relay output | |
| Real | yLow | Lower value for the relay output | |
| Real | deaBan | Deadband for holding the relay output | |
| Boolean | reverseActing | true | Set to true for reverse acting, or false for direct acting control action |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u_s | Setpoint input signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u_m | Measurement input signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | trigger | Connector for enabling the relay controller | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y | Control output | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | yOn | Relay switch output, true when control output switches to the higher value | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | yDif | Input difference, measurement - setpoint |
Revisions
-
March 8, 2024, by Michael Wetter:
Changed deadband to be consistent within the package. -
March 8, 2024, by Michael Wetter:
Propagated range of control errorrto relay controller. -
December 1, 2023, by Sen Huang:
Add a parameterreverseActing
-
June 1, 2022, by Sen Huang:
First implementation.