ss2tf error. The TF does not match.

조회 수: 5 (최근 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
.

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

Help CenterFile Exchange에서 Control System Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by