主要内容

Time Delays in Linear Systems

使用以下模型属性表示线性系统中的时间延迟。

  • InputDelay,OutputDelay— Time delays at system inputs or outputs

  • ioDelay,InternalDelay— Time delays that are internal to the system

在离散时间模型中,这些属性被约束在代表样品时间整数倍数表示延迟的整数值中。要近似延迟的离散时间模型,该模型是样本时间的分数倍数,请使用thiran

First Order Plus Dead Time Model

This example shows how to create a first order plus dead time model using theInputDelay或者OutputDelay属性tf

要以2.1 s的时间延迟创建以下一阶传输函数:

G ( s ) = e 2.1 s 1 s + 10 ,

enter:

G = tf(1,[1 10],'InputDelay',2.1)

whereInputDelayspecifies the delay at the input of the transfer function.

Tip

您可以使用InputDelaywithZPK与与之相同的方式tf:

G = zpk([],-10,1,'InputDelay',2.1)

For SISO transfer functions, a delay at the input is equivalent to a delay at the output. Therefore, the following command creates the same transfer function:

G = tf(1,[1 10],'OutputDelay',2.1)

利用dot notation to examine or change the value of a time delay. For example, change the time delay to 3.2 as follows:

G.OutputDelay = 3.2;

To see the current value, enter:

G.Outputdelay ans = 3.2000

Tip

An alternative way to create a model with a time delay is to specify the transfer function with the delay as an expression ins:

  1. Create a transfer function model for the variables

    s = tf('s');
  2. SpecifyG(s)作为表达式s

    G = exp(-2.1*s)/(s+10);

州空间模型的输入和输出延迟

此示例显示了如何使用输入和输出的延迟创建状态空间模型InputDelay或者OutputDelay属性ss

创建一个描述以下一输入两输出系统的状态空间模型:

d x ( t ) d t = 2 x ( t ) + 3 u ( t 1.5 ) y ( t ) = [ x ( t 0.7 ) x ( t ) ]

该系统的输入延迟为1.5。第一个输出的输出延迟为0.7,第二个输出不会延迟。

Note

In contrast to SISO transfer functions, input delays are not equivalent to output delays for state-space models. Shifting a delay from input to output in a state-space model requires introducing a time shift in the model states. For example, in the model of this example, definingT=t– 1.5X(T) =x(T+ 1.5)results in the following equivalent system:

d X ( T ) d T = 2 X ( T ) + 3 u ( T ) y ( T ) = [ X ( T 2.2 ) X ( T 1.5 ) ]

All of the time delays are on the outputs, but the new state variableXis time-shifted relative to the original state variablex。因此,如果您的状态具有物理意义,或者您已经知道状态初始条件,请在转移输入和输出之间的时间延迟之前仔细考虑。

To create this system:

  1. Define the state-space matrices.

    A = -2; B = 3; C = [1;-1]; D = 0;
  2. Create the model.

    g = ss(a,b,c,d,'inputdelay',1.5,'oppoteDelay',[0.7; 0])

Gis ass模型。

Tip

利用delayssto create state-space models with more general combinations of input, output, and state delays, of the form:

d x d t = A x ( t ) + B u ( t ) + j = 1 N ( A j x ( t t j ) + B j u ( t t j ) ) y ( t ) = C x ( t ) + D u ( t ) + j = 1 N ( C j x ( t t j ) + D j u ( t t j ) )

MIMO转移功能的运输延迟

此示例显示了如何为每个输入输出(I/O)对创建具有不同传输延迟的MIMO传输函数。

Create the MIMO transfer function:

H ( s ) = [ e 0.1 2 s e 0.3 s + 1 s + 10 10 e 0.2 s 1 s + 5 ]

Time delays in MIMO systems can be specific to each I/O pair, as in this example. You cannot useInputDelayOutputDelayto model I/O-specific transport delays. Instead, useioDelayto specify the transport delay across each I/O pair.

To create this MIMO transfer function:

  1. Create a transfer function model for the variables

    s = tf('s');
  2. 利用the variables指定的传输功能Hwithout the time delays.

    H = [2/s (s+1)/(s+10); 10 (s-1)/(s+5)];
  3. 指定ioDelayproperty ofHas an array of values corresponding to the transport delay for each I/O pair.

    H.IODelay = [0.1 0.3; 0 0.2];

His a two-input, two-outputtf模型。每个I/O对H有时间延迟由相应的条目指定tau

离散时间传输功能随时间延迟

This example shows how to create a discrete-time transfer function with a time delay.

在离散时间模型,一个采集的延迟ng period corresponds to a factor of z - 1 in the transfer function. For example, the following transfer function represents a discrete-time SISO system with a delay of 25 sampling periods.

H ( z ) = z - 2 5 2 z - 0 9 5

要代表MATLAB中离散时间系统中的整数延迟,请设置'InputDelay'模型对象的属性为整数值。例如,以下命令创建一个tfmodel representing H ( z ) with a sampling time of 0.1 s.

h = tf(2,[1 -0.95],0.1,,'InputDelay',25)
H = 2 z^(-25) * -------- z - 0.95 Sample time: 0.1 seconds Discrete-time transfer function.

如果系统的时间延迟不是采样时间的整数倍数,则可以使用thirancommand to approximate the fractional portion of the time delay with an all-pass filter. SeeTime-Delay Approximation

Related Examples

More About