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

TypeNameDefaultDescription
.Modelica.Blocks.Types.SimpleControllercontrollerType.Modelica.Blocks.Types.SimpleController.PIDType of controller
Realk1Gain of controller
SI.TimeTi0.5Time constant of Integrator block
SI.TimeTd0.1Time constant of Derivative block
RealyMaxUpper limit of output
RealyMin-yMaxLower limit of output
Realwp1Set-point weight for Proportional block (0..1)
Realwd0Set-point weight for Derivative block (0..1)
RealNi0.9Ni*Ti is time constant of anti-windup compensation
RealNd10The higher Nd, the more ideal the derivative block
PWM Parameters
SI.Frequencyfrequency1000Frequency of PWM
Initialization
BooleanlimitsAtInittrue= false, if limits are ignored during initialization
Realxi_start0Initial or guess value value for integrator output (= integrator state)
Realxd_start0Initial or guess value for state of derivative block
Realy_start0Initial value of output
Advanced
Booleanstrictfalse= true, if strict limits with noEvent(..)

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputreference
Modelica.Blocks.Interfaces.RealInputfeedback
Modelica.Blocks.Interfaces.BooleanOutputpwm
Modelica.Blocks.Interfaces.BooleanOutputdirection

Components

TypeNameDefaultDescription
Servomechanisms.Electrical.IdealPWMidealpwm1
Servomechanisms.Control.PIDControllerDirectionpidcontrollerdirection1