Borrar filtros
Borrar filtros

ss2tf error. The TF does not match.

3 visualizaciones (últimos 30 días)
Álvaro Morales Muñoz
Álvaro Morales Muñoz el 23 de Mzo. de 2021
Editada: Star Strider el 23 de Mzo. de 2021
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 comentarios
Siddharth Jawahar
Siddharth Jawahar el 23 de Mzo. de 2021
Hi Alvaro,
Can you share an example of how you are doing this conversion?
Best,
Sid
Álvaro Morales Muñoz
Álvaro Morales Muñoz el 23 de Mzo. de 2021
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

Iniciar sesión para comentar.

Respuestas (1)

Star Strider
Star Strider el 23 de Mzo. de 2021
Editada: Star Strider el 23 de Mzo. de 2021
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
.

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by