Discrete-time or continuous-time integrator

**Library:**Simscape / Power Systems / Simscape Components / Control / General Control

The Integrator (Discrete or Continuous) block
implements a simple integrator in conformance with IEEE 421.5-2016^{[1]}.

You can switch between continuous and discrete implementations of the integrator using
the **Sample time** parameter.

To configure the integrator for continuous time, set the **Sample
time** property to `0`

. This representation is
equivalent to the continuous transfer function:

$$G(s)=\frac{1}{s}.$$

$$\{\begin{array}{c}\dot{x}(t)=u(t)\\ y(t)=x(t)\end{array}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x(0)={x}_{0},$$

*u*is the integrator input.*x*is the integrator state.*y*is the integrator output.*t*is the simulation time.*x*is the initial state of the integrator._{0}

To configure the integrator for discrete time, set the **Sample
time** property to a positive, nonzero value, or to
`-1`

to inherit the sample time from an upstream block. The
discrete representation is equivalent to the transfer function:

$$G(z)=\frac{{T}_{s}}{z-1},$$

$$\{\begin{array}{c}x(n+1)=x(n)+{T}_{s}u(n)\\ y(n)=x(n)\end{array}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x(0)={x}_{0},$$

*u*is the integrator input.*x*is the integrator state.*y*is the integrator output.*n*is the simulation time step.*x*is the initial state of the integrator._{0}

You can define the state initial conditions using the input port
**x0**. The integrator state reverts to the initial condition
any time it is reset.

You can limit the integral output using one of two methods:

Set

**Limit type**to`Anti-windup`

to use the anti-windup saturation method.The anti-windup method limits the integrator state

*x*between the lower saturation limit*A*and upper saturation limit*B*:Because the state is limited, the output can respond immediately to a reversal of the input sign when the integral is saturated.$$A<=x<=B\text{\hspace{0.17em}}.$$

Set

**Limit type**to`Windup`

to use the windup saturation method.The windup method limits the integrator output

*y*between the lower saturation limit*A*and upper saturation limit*B*:Because the output is limited, the state can continue to grow when the integrator is saturated. As a result, the output cannot respond to a reversal of the input sign until the state has reached the limiting saturation point.$$A<=y<=B\text{\hspace{0.17em}}.$$

You can reset the state of the integrator by passing a nonzero signal to the
**Reset** port of the block.

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

Was this topic helpful?