blockPID_reset_lim

MSL PID block enhanced by variable limits, dead zone and reset function

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

TypeNameDefaultDescription
.Modelica.Blocks.Types.SimpleControllercontrollerType.Modelica.Blocks.Types.SimpleController.PIDType of controller
Realk1Gain of controller
Realk_p1Gain of P
Modelica.Units.SI.TimeTi0.5Time constant of Integrator block
Modelica.Units.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
BooleanwithFeedForwardfalseUse feed-forward input?
RealkFF1Gain of feed-forward input
BooleanuseResettrueuse reset input (affects I and D)
BooleanuseVariableLimitsfalseuse variable limits (as model inputs)
BooleanuseDeadZonefalseuse dead zone for control error input for I
RealdeadZoneValue0.5dead zone value
Modelica.Units.SI.TimeunitTime1
Initialization
InitinitTypeInit.InitialStateType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Realxi_start0Initial or guess value for integrator output (= integrator state)
Types.reinitMethodsreinitMethodTypes.reinitMethods.zeroSource for new integrator state after reset
Realxd_start0Initial or guess value for state of derivative block
Realy_start0Initial value of output
Modelica.Blocks.Types.VariableLimiterHomotopyhomotopyTypeModelica.Blocks.Types.VariableLimiterHomotopy.LinearSimplified model for homotopy-based initialization
Advanced
Booleanstrictfalse= true, if strict limits with noEvent(..)

Connectors

TypeNameDefaultDescription
RealInputu_s (from SVcontrol)Connector of setpoint input signal
RealInputu_m (from SVcontrol)Connector of measurement input signal
RealOutputy (from SVcontrol)Connector of actuator output signal
Modelica.Blocks.Interfaces.RealInputu_ffOptional connector of feed-forward input signal
Modelica.Blocks.Interfaces.RealInputlimit1Connector of Real input signal used as maximum of input u
Modelica.Blocks.Interfaces.RealInputlimit2Connector of Real input signal used as minimum of input u
Modelica.Blocks.Interfaces.BooleanInputreset

Components

TypeNameDefaultDescription
RealcontrolErroru_s - u_mControl error (set point - measurement)
Modelica.Blocks.Math.AddaddP
Modelica.Blocks.Math.AddaddD
Modelica.Blocks.Math.GainP
Modelica.Blocks.Continuous.IntegratorI
DerivativeResetD
Modelica.Blocks.Math.GaingainPID
Modelica.Blocks.Math.Add3addPID
Modelica.Blocks.Math.Add3addI
Modelica.Blocks.Math.AddaddSat
Modelica.Blocks.Math.GaingainTrack
Modelica.Blocks.Nonlinear.VariableLimitervariableLimiter
Modelica.Blocks.Sources.ConstantDzero
Modelica.Blocks.Sources.ConstantIzero
Modelica.Blocks.Sources.ConstantFFzero
Modelica.Blocks.Math.AddaddFF
Modelica.Blocks.Nonlinear.LimiterD_limiter
Modelica.Blocks.Nonlinear.DeadZonedeadZone
Modelica.Blocks.Sources.ConstantconstLimit2
Modelica.Blocks.Sources.ConstantconstLimit1

Contents

NameDescription
Types