blockLimPID
P, PI, PD, and PID controller with limited output, anti-windup compensation and delayed, smooth activation (if wanted)
Information
1. Purpose of model
This model is a LimPID controller which was copied from ClaRa.Components.Utilities.Blocks.LimPID and the following was changed:
- The reset ability can be turned off. In some situations, the reset of the controller at activation prohibits the controller from reacting correctly: If the control error decreases directly after activation, the controller will not do anything even if there is still a control error > 0.
- The amount of states was reduced by exchanging the first order blocks by TransiEnt.Basics.Blocks.FirstOrderTransiEnt and exchanging the equations for the reset values. This improves the speed.
2. Level of detail, physical effects considered, and physical insight
(Description)
3. Limits of validity
(Description)
4. Interfaces
u_s: input for set value
u_m: input for measured value
activateInput: input to turn on the controller
y: output
5. Nomenclature
(no elements)
6. Governing Equations
(no equations)
7. Remarks for Usage
(none)
8. Validation
(no validation or testing necessary)
9. References
(none)
10. Version History
Model created by Carsten Bode (c.bode@tuhh.de), Nov 2018
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| General Design of Controller | |||
| Modelica.Blocks.Types.SimpleController | controllerType | Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | sign | 1 | set to 1 if a positive control error leads to a positive control output, else -1 |
| Normalisation of I/O Signals | |||
| Boolean | perUnitConversion | true | True, if input and output values should be normalised with respect to reference values |
| Real | u_ref | 1 | Reference value for controlled variable |
| Real | y_ref | 1 | Reference value for actuated variable |
| Limiter for Controller Output | |||
| Real | y_max | 1 | Upper limit of output |
| Real | y_min | -y_max | Lower limit of output |
| Time Response of the Controller | |||
| Real | k | 1 | Gain of Proportional block |
| Modelica.Units.SI.Time | Tau_i | 0.5 | 1/Ti is gain of integrator block |
| Modelica.Units.SI.Time | Tau_d | 0.1 | Gain of derivative block |
| Anti-Windup Compensation | |||
| Modelica.Units.SI.Time | Ni | 0.9 | 1/Ni is gain of anti-windup compensation |
| Derivative Filtering | |||
| Real | Nd | 1 | The smaller Nd, the more ideal the derivative block, setting Nd=0 introduces ideal derivative |
| Controller activation | |||
| Boolean | use_activateInput | false | Provide Boolean input to switch controller on/off. |
| ClaRa.Basics.Units.Time | t_activation | 0.0 | Time when controller is switched on. For use_activateInput==true the controller is switched on if (time>t_activation AND activateController=true). |
| ClaRa.Basics.Units.Time | Tau_lag_I | 0.0 | Time lag for activation of integral part AFTER controller is being switched on |
| Real | y_inactive | 1 | Controller output if controller is not active |
| Boolean | use_reset | use_activateInput or t_activation > 0 | Use reset ability |
| I/O Filters | |||
| Real | Tau_in | 0 | Time constant for input smoothening, Tau_in=0 refers to signal no smoothening |
| Real | Tau_out | 0 | time constant for output smoothening, Tau_out=0 refers to signal no smoothening |
| Initialisation | |||
| Integer | initOption | 501 | Initialisation option |
| Boolean | limitsAtInit | true | = false, if limits are ignored during initializiation |
| Real | xi_start | 0 | Initial or guess value value for integrator output (= integrator state) |
| Real | y_start | 0 | Initial value of output |
| Expert Settings › DAE Index Reduction | |||
| Real | Tau_add | 0 | Set to >0 for additional state after add block in controller, if DAE-index reduction fails. |
| Expert Settings › Obsolete Settings | |||
| Real | xd_start | 0 | Initial or guess value for state of derivative block |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | u_s | Connector of setpoint input signal | |
| Modelica.Blocks.Interfaces.RealInput | u_m | Connector of measurement input signal | |
| Modelica.Blocks.Interfaces.BooleanInput | activateInput | true, if controller is on | |
| Modelica.Blocks.Interfaces.RealOutput | y | Connector of actuator output signal |
Components
Revisions
- 15.04.09 First revision, Boris Michaelsen, XRG Simulation GmbH
- 25.11.09 Update to independently set the gain and time constants of the PID, added a new parameter "sign" for case dependent control error evaluation, Friedrich Gottelt, XRG Simulation GmbH