Class modelling a simple PID controller.
- Author
- Karl-Johan Reite
- Date
- 13.08.2013 KJR: Initial version.
- Todo:
- Complete description of conf. params, and check example file.
Example configuration excerpt
<Lib
LibName = "fishery"
SimObject = "Trawl/PIDController"
Name = "PID"
InitOutput = "0"
ProportionalGain = "1"
IntegratorGain = "0"
DerivativeGain = "0"
MinOut = "-1e10"
MaxOut = "1e10"
MaxDerivativePart = "1e10"
MaxIntegratorPart = "1e10"
/>
- Todo:
- Add config details
Input Ports
Name | Width | Description |
Measurement | 1 | The measured value. |
Reference | 1 | The desired value.
|
Output Ports
Name | Width | Description |
Out | 1 | The output from the PID controller. |
Configuration parameters
Name | Width | Description |
InitOutput | 1 | Description here. |
ProportionalGain | 1 | Proportional gain. |
IntegratorGain | 1 | Integral gain. |
DerivativeGain | 1 | Derivative gain. |
MinOut | 1 | Minimum out value. |
MaxOut | 1 | Maximum out value. |
MaxDerivativePart | 1 | Maximum derivative part. |
MaxIntegratorPart | 1 | Maximum integrator part. |
Initial conditions
This simObject does not have initial conditions.
Full example file
<Contents>
<OBJECTS>
<Lib
LibName = "fishery"
SimObject = "Trawl/PIDController"
Name = "PID"
InitOutput = "0"
ProportionalGain = "1"
IntegratorGain = "0"
DerivativeGain = "0"
MinOut = "-1e10"
MaxOut = "1e10"
MaxDerivativePart = "1e10"
MaxIntegratorPart = "1e10"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
PID.Measurement = "3"
PID.Reference = "4"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod = "2"
NumCores = "1"
TOutput = "0, 1, 30"
LogStates = "1"
stepsize = "0"
HMax = "0.002"
HMin = "0.00000001"
AbsTol = "1e-3"
RelTol = "1e-3"
UseRSSNormInsteadOfInfNorm = "0"
FileOutput = "objects:all"
/>
</INTEGRATION>
</Contents>
This SimObject is referred to as Trawl/PIDController