How to simplify transfer function?
Mostrar comentarios más antiguos
Hi guys
I have used the function
s=tf('s')
to ceate a transfer function, but I find that Matlab do not simplify the tf at all.
for example.
s=tf('s');
A=1/(1+s);B=A/(1+A);
the result is 1+s/(s^2+3*s+2)
What I want is 1/(2+s)
Anyone know that how to simplify the tf in Matlab?
Thank you!
1 comentario
s=tf('s');
A=1/(1+s); %B=A/(1+A);
B = feedback(A,1)
Respuesta aceptada
Más respuestas (1)
Artur Araujo
el 14 de Nov. de 2016
1 voto
You could try H = zpk(G(2,2))
2 comentarios
Zuhair Abduljabbar
el 31 de En. de 2021
Thanks
In addition to this, you can set the DisplayFormat of the zpk model to 'timeconstant' which would show it in the format needed when displayed in the Command Window.
s = tf('s');
G = (1.422e-5*s + 4.696e-6)/(s^2 + 21.76*s + 1.216);
G_zpk = zpk(G);
G_zpk.DisplayFormat = 'timeconstant';
disp(G_zpk);
If you want to store the time constants in variables, you can use zpkdata to first extract the zeros and poles and the compute it using those.
[z,p,k] = zpkdata(G_zpk,'v');
tau_z = -1./z
tau_p = -1./p
Note that for a general approach you will have to account for complex poles and zeros.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!