Main Content

absorbDelay

Replace time delays by poles at z = 0 or phase shift

Description

Use absorbDelay to eliminate time delays and model them into additional system dynamics or frequency response data.

  • For discrete-time models (other than frequency response data models), the function replaces a delay of k sampling periods with k poles at z = 0. For continuous-time models (other than frequency response data models), time delays have no exact representation with a finite number of poles and zeros. Therefore, use pade (Control System Toolbox) to compute a rational approximation of the time delay.

  • For frequency response data models in both continuous and discrete time, absorbDelay absorbs all time delays into the frequency response data as a phase shift.

sysnd = absorbDelay(sysd) absorbs all time delays of the dynamic system model sysd into the system dynamics or the frequency response data.Absorb Time Delay into System Dynamics (Control System Toolbox)

sysnd = absorbDelay(sysd,scope) specifies which delay groups to absorb. (since R2024a)

example

[sysnd,G] = absorbDelay(___) returns the matrix G that maps the initial states of the ss (Control System Toolbox) model sysd to the initial states of the sysnd.

Examples

collapse all

Create a discrete-time transfer function that has a time delay.

z = tf('z',-1);
sysd = (-0.4*z -0.1)/(z^2 + 1.05*z + 0.08);
sysd.InputDelay = 3
sysd =
 
              -0.4 z - 0.1
  z^(-3) * -------------------
           z^2 + 1.05 z + 0.08
 
Sample time: unspecified
Discrete-time transfer function.

The display of sysd represents the InputDelay as a factor of z^(-3), separate from the system poles that appear in the transfer function denominator.

Absorb the time delay into the system dynamics as poles at z= 0.

sysnd = absorbDelay(sysd)
sysnd =
 
        -0.4 z - 0.1
  -------------------------
  z^5 + 1.05 z^4 + 0.08 z^3
 
Sample time: unspecified
Discrete-time transfer function.

The display of sysnd shows that the factor of z^(-3) has been absorbed as additional poles in the denominator.

Verify that sysnd has no input delay.

sysnd.InputDelay
ans = 
0

Create a discrete-time polynomial model.

m = idpoly(1,[0 0 0 2 3]);

Convert m to a transfer function model.

sys = tf(m)
sys =
 
  z^(-2) * (2 z^-1 + 3 z^-2)
 
Sample time: unspecified
Discrete-time transfer function.

The numerator of the transfer function, sys, is [0 2 3] and the transport delay, sys.IODelay, is 2. This is because the value of the B polynomial, m.B, has 3 leading zeros. The first fixed zero shows lack of feedthrough in the model. The two zeros after that are treated as input-output delays.

Use absorbDelay to treat the leading zeros as regular B coefficients.

m2 = absorbDelay(m);
sys2 = tf(m2)
sys2 =
 
  2 z^-3 + 3 z^-4
 
Sample time: unspecified
Discrete-time transfer function.

The numerator of sys2 is [0 0 0 2 3] and transport delay is 0. The model m2 treats the leading zeros as regular coefficients by freeing their values. m2.Structure.B.Free(2:3) is TRUE while m.Structure.B.Free(2:3) is FALSE.

Since R2024a

This example shows how to absorb a specific delay type using the absorbDelay function.

Consider a MIMO model containing delays in input and output channels and between I/O pairs.

rng(0)
sys = drss(3,2,3);
sys.InputDelay = [1 0 4];
sys.OutputDelay = [3 1];
sys.IODelay = [0 1 2;3 0 1];

Absorb the delays in output channel and between I/O pairs.

sysnd = absorbDelay(sys,["output","io"]);

Verify has system only has delays in the input channel.

sysnd.InputDelay
ans = 3×1

     1
     0
     4

sysnd.OutputDelay
ans = 2×1

     0
     0

sysnd.IODelay
ans = 2×3

     0     0     0
     0     0     0

Despite absorbing the delays, the responses of sys exactly match those of sysnd.

step(sys,sysnd,'r--')

MATLAB figure

Input Arguments

collapse all

Dynamic system with time delay, specified as a SISO or MIMO dynamic system model (Control System Toolbox). Dynamic systems that you can use include:

  • Discrete-time LTI models, such as tf, zpk (Control System Toolbox), and ss (Control System Toolbox) models.

  • Discrete-time sparse models, such as sparss (Control System Toolbox) and mechss (Control System Toolbox) models.

  • Discrete-time generalized or uncertain LTI models such as genss (Control System Toolbox) or uss (Robust Control Toolbox) models. (Using uncertain models requires a Robust Control Toolbox™ license.)

    The resulting model assumes

    • Current values of the tunable components for tunable control design blocks

    • Nominal model values for uncertain control design blocks

  • Frequency response models.

For continuous-time parametric models, use pade (Control System Toolbox).

Since R2024a

Type of delay to absorb, specified as one of these values.

  • "input" — Only absorb input delays and leave other delays unchanged.

  • "output" — Only absorb output delays and leave other delays unchanged.

  • "internal" — Only absorb internal delays and leave other delays unchanged.

  • "io" — Only absorb I/O channel delays (MIMO models) and leave other delays unchanged.

  • Array — Only absorb the combination of specified delays in the array and leave other delays unchanged. For example, to only absorb output and internal delays, use an array ["output","io"].

Output Arguments

collapse all

Dynamic system model without delay, returned as a model of same type as sysd.

Mapping of the states x0 of the state-space model sysd to the initial states of sysnd, returned as a matrix. The initial condition of sysnd is G*x0.

Version History

Introduced in R2012a

expand all

See Also

| (Control System Toolbox) |