blockPID_reset_lim
Extends from Modelica.Blocks.Interfaces.SVcontrol (Single-Variable continuous controller).
Information
New features
The PID controller is based on the MSL Model Modelica.Blocks.Continuous.LimPID. The changes are listed below:
Dead zone
Via parameter useDeadZone the dead zone block at the input of the integrator can be activated so that small changes in the input do not change the integrator state.
The dead zone value can be changed via parameter deadZoneValue.
Reset
As input, the model's states (I.x, D.x) can be reset. The following options are possible:
| reinitMethods value | Description |
|---|---|
zero |
Reset the state to zero. |
xi_start |
Reset the state to its initial value (xi_start). |
limit1 |
Reset the state to the current lower limit (sampled value). |
limit2 |
Reset the state to the current upper limit (sampled value). |
Variable limits
Via parameter useVariableLimits variable limits can be activated, so that during simulation the lower and upper limit can be changed. This is useful if the allowable actuator range changes dynamically, for example due to varying operating conditions, safety margins, or resource availability.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| .Modelica.Blocks.Types.SimpleController | controllerType | .Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | k | 1 | Gain of controller |
| Real | k_p | 1 | Gain of P |
| Modelica.Units.SI.Time | Ti | 0.5 | Time constant of Integrator block |
| Modelica.Units.SI.Time | Td | 0.1 | Time constant of Derivative block |
| Real | yMax | Upper limit of output | |
| Real | yMin | -yMax | Lower limit of output |
| Real | wp | 1 | Set-point weight for Proportional block (0..1) |
| Real | wd | 0 | Set-point weight for Derivative block (0..1) |
| Real | Ni | 0.9 | Ni*Ti is time constant of anti-windup compensation |
| Real | Nd | 10 | The higher Nd, the more ideal the derivative block |
| Boolean | withFeedForward | false | Use feed-forward input? |
| Real | kFF | 1 | Gain of feed-forward input |
| Boolean | useReset | true | use reset input (affects I and D) |
| Boolean | useVariableLimits | false | use variable limits (as model inputs) |
| Boolean | useDeadZone | false | use dead zone for control error input for I |
| Real | deadZoneValue | 0.5 | dead zone value |
| Modelica.Units.SI.Time | unitTime | 1 | |
| Initialization | |||
| Init | initType | Init.InitialState | Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output) |
| Real | xi_start | 0 | Initial or guess value for integrator output (= integrator state) |
| Types.reinitMethods | reinitMethod | Types.reinitMethods.zero | Source for new integrator state after reset |
| Real | xd_start | 0 | Initial or guess value for state of derivative block |
| Real | y_start | 0 | Initial value of output |
| Modelica.Blocks.Types.VariableLimiterHomotopy | homotopyType | Modelica.Blocks.Types.VariableLimiterHomotopy.Linear | Simplified model for homotopy-based initialization |
| Advanced | |||
| Boolean | strict | false | = true, if strict limits with noEvent(..) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u_s (from SVcontrol) | Connector of setpoint input signal | |
| RealInput | u_m (from SVcontrol) | Connector of measurement input signal | |
| RealOutput | y (from SVcontrol) | Connector of actuator output signal | |
| Modelica.Blocks.Interfaces.RealInput | u_ff | Optional connector of feed-forward input signal | |
| Modelica.Blocks.Interfaces.RealInput | limit1 | Connector of Real input signal used as maximum of input u | |
| Modelica.Blocks.Interfaces.RealInput | limit2 | Connector of Real input signal used as minimum of input u | |
| Modelica.Blocks.Interfaces.BooleanInput | reset |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | controlError | u_s - u_m | Control error (set point - measurement) |
| Modelica.Blocks.Math.Add | addP | ||
| Modelica.Blocks.Math.Add | addD | ||
| Modelica.Blocks.Math.Gain | P | ||
| Modelica.Blocks.Continuous.Integrator | I | ||
| DerivativeReset | D | ||
| Modelica.Blocks.Math.Gain | gainPID | ||
| Modelica.Blocks.Math.Add3 | addPID | ||
| Modelica.Blocks.Math.Add3 | addI | ||
| Modelica.Blocks.Math.Add | addSat | ||
| Modelica.Blocks.Math.Gain | gainTrack | ||
| Modelica.Blocks.Nonlinear.VariableLimiter | variableLimiter | ||
| Modelica.Blocks.Sources.Constant | Dzero | ||
| Modelica.Blocks.Sources.Constant | Izero | ||
| Modelica.Blocks.Sources.Constant | FFzero | ||
| Modelica.Blocks.Math.Add | addFF | ||
| Modelica.Blocks.Nonlinear.Limiter | D_limiter | ||
| Modelica.Blocks.Nonlinear.DeadZone | deadZone | ||
| Modelica.Blocks.Sources.Constant | constLimit2 | ||
| Modelica.Blocks.Sources.Constant | constLimit1 |
Contents
| Name | Description |
|---|---|
| Types |