Time Delays in Linear Systems
使用以下模型属性表示线性系统中的时间延迟。
InputDelay
,OutputDelay
— Time delays at system inputs or outputsioDelay
,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的时间延迟创建以下一阶传输函数:
enter:
G = tf(1,[1 10],'InputDelay',2.1)
whereInputDelay
specifies the delay at the input of the transfer function.
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:
Create a transfer function model for the variables。
s = tf('s');
SpecifyG(s)作为表达式s。
G = exp(-2.1*s)/(s+10);
州空间模型的输入和输出延迟
此示例显示了如何使用输入和输出的延迟创建状态空间模型InputDelay
或者OutputDelay
属性ss
。
创建一个描述以下一输入两输出系统的状态空间模型:
该系统的输入延迟为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.5和X(T) =x(T+ 1.5)results in the following equivalent system:
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:
Define the state-space matrices.
A = -2; B = 3; C = [1;-1]; D = 0;
Create the model.
g = ss(a,b,c,d,'inputdelay',1.5,'oppoteDelay',[0.7; 0])
G
is ass
模型。
Tip
利用delayss
to create state-space models with more general combinations of input, output, and state delays, of the form:
MIMO转移功能的运输延迟
此示例显示了如何为每个输入输出(I/O)对创建具有不同传输延迟的MIMO传输函数。
Create the MIMO transfer function:
Time delays in MIMO systems can be specific to each I/O pair, as in this example. You cannot useInputDelay
和OutputDelay
to model I/O-specific transport delays. Instead, useioDelay
to specify the transport delay across each I/O pair.
To create this MIMO transfer function:
Create a transfer function model for the variable
s
。s = tf('s');
利用the variable
s
指定的传输功能H
without the time delays.H = [2/s (s+1)/(s+10); 10 (s-1)/(s+5)];
指定
ioDelay
property ofH
as an array of values corresponding to the transport delay for each I/O pair.H.IODelay = [0.1 0.3; 0 0.2];
H
is 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 in the transfer function. For example, the following transfer function represents a discrete-time SISO system with a delay of 25 sampling periods.
要代表MATLAB中离散时间系统中的整数延迟,请设置'InputDelay'
模型对象的属性为整数值。例如,以下命令创建一个tf
model representing
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.
如果系统的时间延迟不是采样时间的整数倍数,则可以使用thiran
command to approximate the fractional portion of the time delay with an all-pass filter. SeeTime-Delay Approximation。