ss2tf error. The TF does not match.

6 ビュー (過去 30 日間)
Álvaro Morales Muñoz
Álvaro Morales Muñoz 2021 年 3 月 23 日
編集済み: Star Strider 2021 年 3 月 23 日
Dear all,
I am working in State-Sapce (SS) representation, so, when I want to obtain a Transfer Function (TF) in order to create a bode, the bode does not match with the expected frequency response. The A matrix in SS is 13x13. I tried with a simple example that I know what is its TF, and I do not obtain the expected resoult. How could I solve it? I think the problem is in the way that the determinant is calculated. It is not a problem to wait more time to obtain a more precise TF.
Thank you very much fot your time.
  2 件のコメント
Siddharth Jawahar
Siddharth Jawahar 2021 年 3 月 23 日
Hi Alvaro,
Can you share an example of how you are doing this conversion?
Best,
Sid
Álvaro Morales Muñoz
Álvaro Morales Muñoz 2021 年 3 月 23 日
This is the code:
format long
A = [
0 1 0 0 0 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0 0 0 0;
0 0 0 1 0 0 0 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0 0 0 0;
0 0 0 0 0 0 1 0 0 0 0 0 0;
0 0 0 0 0 0 0 1 0 0 0 0 0;
0 0 0 0 0 0 0 0 1 0 0 0 0;
0 0 0 0 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 0 0 0 1 0 0;
0 0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 0 0 0 1;
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1];
B = [1 0 0 0 0 0 0 0 0 0 0 0 0]';
C = [1 0 0 0 0 0 0 0 0 0 0 0 0];
D = 0;
[num, den] = ss2tf(A,B,C,D)
% The denominator should be [1 1 1 1 1 1 1 1 1 1 1 1 1], but I obtain in
% den =
% Columns 1 through 7
% 1.000000000000000 1.000000000000009 1.000000000000009 1.000000000000008 1.000000000000004 0.999999999999994 0.999999999999990
% Columns 8 through 14
% 0.999999999999994 1.000000000000001 1.000000000000004 1.000000000000001 0.999999999999996 0.999999999999999 0.999999999999999

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2021 年 3 月 23 日
編集済み: Star Strider 2021 年 3 月 23 日
The bode function accepts state space models as input. See the sys documentation section for an extended discussion.
EDIT — (23 Mar 2021 at 15:50)
Try this:
sys = ss(A,B,C,D);
figure
bode(sys)
grid
.

コミュニティ

カテゴリ

Help Center および File ExchangeControl System Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by