主要内容

lsimplot

模拟动态系统对任意输入的响应,并返回绘图句柄

语法

h = lsimplot(系统)
lsimplot (sys1 sys2,…)
lsimplot (sys, u, t)
lsimplot (sys, u, t, x0)
lsimplot (sys1 sys2…,u, t, x0)
lsimplot (AX,…)
lsimplot(…,plotoptions)
lsimplot (sys, u, t, x0, zoh)
lsimplot (sys, u, t, x0,“呸”)

描述

h = lsimplot(系统)的线性模拟工具动态系统模型sys,可以交互指定驾驶输入、时间矢量和初始状态。它还返回绘图句柄hgetoptionssetoption命令。类型

帮助timeoptions

获取可用的绘图选项列表。

lsimplot (sys1 sys2,…)打开多个模型的线性模拟工具sys1,sys2,……驱动输入对所有指定的系统都是通用的,但可以分别为每个系统指定初始条件。

lsimplot (sys, u, t)绘制模型的时间响应sys对输入信号所描述的ut。向量的时间t由有规律间隔的时间样本(以系统时间为单位,在TimeUnit的属性sys)。MIMO系统,u一个矩阵的列数和输入的列数一样多,是谁的第一行指定了时刻的输入值t(我)。输出系统u可以指定为行向量或列向量。例如,

t = 0:0.01:5;u =罪(t);lsimplot (sys, u, t)

模拟单输入模型的响应sys输入u (t) =罪(t)在5秒。

对于离散时间模型,u应该以相同的速率取样sys(t是冗余的,可以省略或设置为空矩阵)。

对于连续时间模型,选择采样周期t (2) - t (1)小到可以准确地描述输入ulsim在以下情况发出警告u是欠采样的,可能会发生隐藏的振荡。

lsimplot (sys, u, t, x0)指定初始状态向量x0在时间t (1)(仅用于状态空间模型)。x0在省略时设置为零。

lsimplot (sys1 sys2…,u, t, x0)模拟了多个LTI模型的响应sys1,sys2,……在一个地块上。初始条件x0是可选的。还可以为每个系统指定颜色、线条样式和标记,如

sys2 lsimplot (sys1‘r’,y,, sys3, gx, u, t)

lsimplot (AX,…)用手柄绘制成坐标轴斧头

lsimplot(…,plotoptions)中指定的选项绘制初始条件响应plotoptions。类型

帮助timeoptions

更多的细节。

对于连续时间模型,lsimplot (sys, u, t, x0, zoh)lsimplot (sys, u, t, x0,“呸”)显式指定如何在样本之间插入输入值(零阶保持器或线性插值)。默认情况下,lsimplot根据信号的平滑度自动选择插值方法u

另请参阅

||

之前介绍过的R2006a