Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

创建同时具有固定参数和可调参数的状态空间模型

此示例说明如何创建同时具有固定参数和可调参数的状态空间 genss 模型。

A=[1a+b0ab],B=[-3.01.5],C=[0.30],D=0,

其中 ab 是可调参数,其初始值分别为 -13

使用 realp 创建可调参数。

a = realp('a',-1);
b = realp('b',3);

使用 ab 的代数表达式定义一个广义矩阵。

A = [1 a+b;0 a*b];

A 是一个广义矩阵,其 Blocks 属性包含 abA 的初始值是 [1 2;0 -3],来自 ab 的初始值。

创建固定值状态空间矩阵。

B = [-3.0;1.5];
C = [0.3 0];
D = 0;

使用 ss 创建状态空间模型。

sys = ss(A,B,C,D)
Generalized continuous-time state-space model with 1 outputs, 1 inputs, 2 states, and the following blocks:
  a: Scalar parameter, 2 occurrences.
  b: Scalar parameter, 2 occurrences.

Type "ss(sys)" to see the current value and "sys.Blocks" to interact with the blocks.

sys 是一个广义 LTI 模型 (genss),具有可调参数 ab

相关主题