创建同时具有固定参数和可调参数的状态空间模型
此示例说明如何创建同时具有固定参数和可调参数的状态空间 genss
模型。
其中 a 和 b 是可调参数,其初始值分别为 -1
和 3
。
使用 realp
创建可调参数。
a = realp('a',-1); b = realp('b',3);
使用 a
和 b
的代数表达式定义一个广义矩阵。
A = [1 a+b;0 a*b];
A
是一个广义矩阵,其 Blocks
属性包含 a
和 b
。A
的初始值是 [1 2;0 -3]
,来自 a
和 b
的初始值。
创建固定值状态空间矩阵。
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
),具有可调参数 a
和 b
。