Documentation

Lead-Lag (Discrete or Continuous)

Discrete-time or continuous-time lead-lag compensator

  • Library:
  • Simscape / Power Systems / Simscape Components / Control / General Controls

Description

The Lead-Lag (Discrete or Continuous) block implements a lead-lag compensator in conformance with IEEE 421.5-2016[1].

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

Equations

Continuous

To configure the compensator for continuous time, set the Sample time property to 0. This representation is equivalent to the continuous transfer function:

G(s)=T1s+1T2s+1,

where:

  • T1 is the lead time constant.

  • T2 is the lag time constant.

From the preceeding transfer function, the compensator defining equations are:

{x˙(t)=1T2(u(t)x(t))y(t)=T1T2u(t)+(1T1T2)x(t)y(0)=x(0)=u0,

where:

  • u is the block input.

  • x is the block state.

  • y is the block output.

  • t is the simulation time.

  • u0 is the initial input to the block.

Discrete

To configure the compensator 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:

T1z+(TsT1)T2z+(TsT2),

where:

  • T1 is the lead time constant.

  • T2 is the lag time constant.

  • Ts is the compensator sample time.

From the discrete transfer function, the compensator equations are defined using the forward Euler method:

{x(n+1)=(1TsT2)x(n)+(TsT2)u(n)y(n)=(1T1T2)x(n)+(T1T2)u(n)y(0)=x(0)=u0,

where:

  • u is the block input.

  • x is the state.

  • y is the block output.

  • n is the simulation time step.

  • u0 is the initial input to the block.

Initial Conditions

The block sets the state and output initial conditions to the initial input.

Limiting the Integral

Set the Upper saturation limit and Lower saturation limit parameters to use the anti-windup saturation method.

The anti-windup method limits the compensator state between the lower saturation limit A and upper saturation limit B:

A<=x<=B.

Because the state is limited, the output can respond immediately to a reversal of the input sign when the integral is saturated.

This block does not provide a windup saturation method. To use the windup saturation method, set the Upper saturation limit parameter to inf, the Lower saturation limit parameter to -inf, and attach a Saturation block to the output.

Bypass Compensator Dynamics

Set the lag time constant to zero or to a value equal to that of the lead time constant to ignore the dynamics of the compensator. When bypassed, the block feeds the input directly to the output:

T1=0T2=0T1=T2}y=u.

In the continuous case, both the sample time and at least one time constant must be zero.

Ports

Input

expand all

Lead-lag compensator input signal. The block uses the input initial value to determine the state initial value.

Data Types: single | double

Output

expand all

Lead-lag compensator output.

Data Types: single | double

Parameters

expand all

Compensator lead time constant. To bypass the dynamics of the compensator. set this value to 0 or to the value of the Lag time constant, T2 parameter.

Compensator lag time constant. To bypass the dynamics of the compensator. set this value to 0 or to the value of the Lead time constant, T1 parameter.

Compensator upper state limit. Set this to inf for an unsaturated upper limit, or to a finite value to prevent upper windup of the system's integrator.

Compensator lower state limit. Set this to -inf for an unsaturated lower limit, or to a finite value to prevent lower windup of the system's integrator.

Compensator sample time. Set this to 0 to implement a continuous lead-lag compensator. Set this to -1 or a positive number to implement a discrete lead-lag compensator.

References

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

Introduced in R2017b

Was this topic helpful?