了解 ss() 和 tf2ss() 函数及其区别
Understanding the ss() and tf2ss() functions and their differences
以下 this question, I am trying to comprehend the functionality of MATLAB's ss()
and tf2ss()
个函数及其区别。考虑以下代码:
Kf = 0.2;
J = 0.02;
h2 = tf(1, [J Kf]);
dcm1 = ss(h2);
dcm2 = tf2ss(h2.Numerator{1}, h2.Denominator{1});
部分复制自 here。现在我希望 dcm1
和 dcm2
相同,但这是我得到的:
>> dcm1
dcm1 =
A =
x1
x1 -10
B =
u1
x1 8
C =
x1
y1 6.25
D =
u1
y1 0
Continuous-time state-space model.
>> dcm2
dcm2 =
-10
如果您能帮助我理解为什么我会得到两个不同的结果,我将不胜感激?我如何使用 tf2ss()
函数获得相同的结果?换句话说,我想创建一个与 dcm1
相同但使用 tf2ss()
函数的 dcm2
。
ss
returns a state-space system
,类似于 tf
它们都是 return 在 ss
和tf
分别表示。
ss2tf
return 是将传递函数 tf
转换为 state-space 表示的结果的 A、B、C、D 矩阵。
但有一个警告,state-space 传递函数的表示不是唯一的。 Matlab
似乎对 ss
和 tf2ss
使用了两种不同的算法。您可以验证两个系统 return 相同的传递函数:
Kf = 0.2;
J = 0.02;
h2 = tf(1, [J Kf]);
dcm1 = ss(h2);
[A, B, C, D] = tf2ss(h2.Numerator{1}, h2.Denominator{1});
dcm1 =
A =
x1
x1 -10
B =
u1
x1 8
C =
x1
y1 6.25
D =
u1
y1 0
[甲、乙、丙、丁]
A = -10
B = 1
C = 50
D = 0
现在让我们比较传递函数:
[b, a] = ss2tf(A, B, C, D)
% yields
b = [0 50]
a = [1 10]
[b, a] = ss2tf(dcm1.a, dcm1.b, dcm1.c, dcm1.d)
% yields
b = [0 50]
a = [1 10]
以下 this question, I am trying to comprehend the functionality of MATLAB's ss()
and tf2ss()
个函数及其区别。考虑以下代码:
Kf = 0.2;
J = 0.02;
h2 = tf(1, [J Kf]);
dcm1 = ss(h2);
dcm2 = tf2ss(h2.Numerator{1}, h2.Denominator{1});
部分复制自 here。现在我希望 dcm1
和 dcm2
相同,但这是我得到的:
>> dcm1 dcm1 = A = x1 x1 -10 B = u1 x1 8 C = x1 y1 6.25 D = u1 y1 0 Continuous-time state-space model. >> dcm2 dcm2 = -10
如果您能帮助我理解为什么我会得到两个不同的结果,我将不胜感激?我如何使用 tf2ss()
函数获得相同的结果?换句话说,我想创建一个与 dcm1
相同但使用 tf2ss()
函数的 dcm2
。
ss
returns a state-space system
,类似于 tf
它们都是 return 在 ss
和tf
分别表示。
ss2tf
return 是将传递函数 tf
转换为 state-space 表示的结果的 A、B、C、D 矩阵。
但有一个警告,state-space 传递函数的表示不是唯一的。 Matlab
似乎对 ss
和 tf2ss
使用了两种不同的算法。您可以验证两个系统 return 相同的传递函数:
Kf = 0.2;
J = 0.02;
h2 = tf(1, [J Kf]);
dcm1 = ss(h2);
[A, B, C, D] = tf2ss(h2.Numerator{1}, h2.Denominator{1});
dcm1 =
A =
x1
x1 -10
B =
u1
x1 8
C =
x1
y1 6.25
D =
u1
y1 0
[甲、乙、丙、丁]
A = -10
B = 1
C = 50
D = 0
现在让我们比较传递函数:
[b, a] = ss2tf(A, B, C, D)
% yields
b = [0 50]
a = [1 10]
[b, a] = ss2tf(dcm1.a, dcm1.b, dcm1.c, dcm1.d)
% yields
b = [0 50]
a = [1 10]