Main Content

Discrete PI Controller

Discrete-time PI controller with external anti-windup input

  • 库:
  • Simscape / Electrical / Control / General Control

  • Discrete PI Controller block

Description

TheDiscrete PI Controllerblock implements discrete PI control with external anti-windup input.

This diagram is the equivalent circuit for the controller with external anti-windup input.

Equations

TheDiscrete PI Controllerblock calculates the control signal using the backward Euler discretization method:

u ( k ) = [ K p + ( K i + d u ( k ) K a w ) T s z z 1 ] e ( k ) ,

where

  • uis the control signal.

  • Kpis the proportional gain coefficient.

  • Kiis the integral gain coefficient.

  • Kawis the anti-windup gain coefficient.

  • Tsis the sampling period.

  • eis the error signal.

To prevent excessive overshoot, the block can use back calculation to implement an external anti-windup mechanism. It inputsdu(k), the difference between the saturated control signal,usat(k), and the calculated unsaturated control signal,u(k). It then multiplies the difference by the anti-windup coefficient and adds the amplified signal from the integral gain.

Ports

Input

expand all

Error signal,e(k), obtained as the difference between the reference,r(k), and measurement,y(k), signals.

Data Types:single|double

Difference,du(k), between the saturatedu^sat(k)and the unsaturated control signals,u(k). Ifdu(k)is zero, the anti-windup is disabled.

Description

Data Types:single|double

External reset (rising edge) signal for the integrator.

Data Types:single|double

Output

expand all

Control signal,u(k).

Data Types:single|double

Parameters

expand all

Proportional gain,Kp, of the PI controller.

积分增益,Ki, of the PI controller.

Anti-windup gain,Kaw, of the PI controller.

Value of the integrator at simulation start time.

Time interval between samples. If the block is inside a triggered subsystem, inherit the sample time by setting this parameter to-1. If this block is in a continuous variable-step model, specify the sample time explicitly. For more information, seeWhat Is Sample Time?andSpecify Sample Time.

Model Examples

References

[1] Åström, K. and T. Hägglund.Advanced PID Control.Research Triangle Park, NC: ISA, 2005.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2017b