How to simplify transfer function?
Mostra commenti meno recenti
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 Commento
s=tf('s');
A=1/(1+s); %B=A/(1+A);
B = feedback(A,1)
Risposta accettata
Più risposte (1)
Artur Araujo
il 14 Nov 2016
1 voto
You could try H = zpk(G(2,2))
2 Commenti
Zuhair Abduljabbar
il 31 Gen 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.
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!