blockController
Controller
Extends from Modelica.Icons.Package (Icon for standard packages), Servomechanisms.Utilities.box.
Information
General
This block describes the controller of a feedback (selectable PID) system for velocity and position control using PWM and direction.
Implementation
With the error signal the direction is established and the control signal with the Servomechanisms.Control.PIDControllerDirection block, this are boolean PWM and direction outputs.Notes
- The user must use a reference signal value and a feedback signal (real values).
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| .Modelica.Blocks.Types.SimpleController | controllerType | .Modelica.Blocks.Types.SimpleController.PID | Type of controller |
| Real | k | 1 | Gain of controller |
| SI.Time | Ti | 0.5 | Time constant of Integrator block |
| 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 |
| PWM Parameters | |||
| SI.Frequency | frequency | 1000 | Frequency of PWM |
| Initialization | |||
| Boolean | limitsAtInit | true | = false, if limits are ignored during initialization |
| Real | xi_start | 0 | Initial or guess value value for integrator output (= integrator state) |
| Real | xd_start | 0 | Initial or guess value for state of derivative block |
| Real | y_start | 0 | Initial value of output |
| Advanced | |||
| Boolean | strict | false | = true, if strict limits with noEvent(..) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | reference | ||
| Modelica.Blocks.Interfaces.RealInput | feedback | ||
| Modelica.Blocks.Interfaces.BooleanOutput | pwm | ||
| Modelica.Blocks.Interfaces.BooleanOutput | direction |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Servomechanisms.Electrical.IdealPWM | idealpwm1 | ||
| Servomechanisms.Control.PIDControllerDirection | pidcontrollerdirection1 |