主要内容

PI Controller with Integral Anti-Windup (Discrete or Continuous)

R2026b

Discrete-time or continuous-time PI control with integral anti-windup

  • PI Controller with Integral Anti-Windup (Discrete or Continuous) block

Libraries:
Simscape / Electrical / Control / General Control

Description

The PI Controller with Integral Anti-Windup (Discrete or Continuous) block implements discrete-time or continuous-time PI control with internal anti-windup. This figure shows the equivalent circuit for the controller with internal anti-windup.

Equivalent circuit for the controller with internal anti-windup

Equations

The block calculates the control signal using the backward Euler discretization method:

u(k)=sat(Kpe(k)+sat(KiTszz−1e(k),A,B),A,B),

 sat(x,A,B)=min(max(x,A),B),

where:

  • u is the control signal.

  • Kp is the proportional gain coefficient.

  • e is the error signal.

  • Ki is the integral gain coefficient.

  • Ts is the sampling period.

  • A is the lower limit for saturation.

  • B is the upper limit for saturation.

Examples

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

External reset (rising edge) signal for the integrator.

Use the External reset parameter to specify the reset strategy. (since R2026b)

Data Types: single | double

Output

expand all

Control signal, u(k).

Data Types: single | double

Parameters

expand all

Since R2026b

Option to specify the external reset strategy for the integrator:

  • rising — Reset the state when the reset signal rises from a nonpositive value to a positive value.

  • falling — Reset the state when the reset signal falls from a positive value to a nonpositive value.

  • either — Reset the state when:

    • The reset signal changes from zero to a nonzero value.

    • The reset signal changes from a nonzero to zero.

    • The reset signal changes sign.

  • level — Reset the state when the reset signal is nonzero at the current time step or changes from nonzero at the previous time step to zero at the current time step.

Proportional gain, Kp, of the PI controller.

Integral gain, Ki, of the PI controller.

Upper limit, B, of the output for the PI controller.

Lower limit, A, of the output for the PI controller.

Value of the integrator at simulation start time.

Time between consecutive block executions. During execution, the block produces outputs and, if appropriate, updates its internal state. For more information, see What Is Sample Time? and Specify Sample Time.

For inherited discrete-time operation, set this parameter to -1. For discrete-time operation, set this parameter to a positive scalar. For continuous-time operation, set this parameter to 0.

If this block is in a masked subsystem or a variant subsystem that supports switching between continuous operation and discrete operation, promote this parameter to ensure correct switching between the continuous and discrete implementations of the block. For more information, see Promote Block Parameters to a Mask.

References

[1] IEEE Recommended Practice for Excitation System Models for Power System Stability Studies. IEEE Std 421.5/D39. Piscataway, NJ: IEEE-SA, 2015.

Extended Capabilities

expand all

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

Version History

Introduced in R2017b

expand all