How to simplify transfer function?
显示 更早的评论
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 个评论
s=tf('s');
A=1/(1+s); %B=A/(1+A);
B = feedback(A,1)
采纳的回答
更多回答(1 个)
Artur Araujo
2016-11-14
1 个投票
You could try H = zpk(G(2,2))
2 个评论
Zuhair Abduljabbar
2021-1-31
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.
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!