Can you tell me what's wrong with the script I wrote for a Transfer function for a closed-loop feedback system with disturbances? Thank you.

2 ビュー (過去 30 日間)
This is the script I wrote for the transfer function for in the picture.
clear all;
figure;
for K = [5,10,50]
Tnum=[K K 0];
Tden=[1 16 21.5+K K+97.5];
T=tf(Tnum,Tden);
t=[0:0.1:10];
[y,t]=step(T,t);
plot(t,y);
hold on;
end
title('Unit Step Response for K= 5,10,50');
xlabel('Time(sec)'),ylabel('Step Response');
grid on;
grid minor;
I Know it is not correct because the output is not the same as the solution in the book. What am I doing wrong?

採用された回答

Madhu Govindarajan
Madhu Govindarajan 2015 年 9 月 29 日
If you look at your T it is a second order transfer function.
I think your Tnum should be [K K] and not [K K 0]
  1 件のコメント
Ashkhen Aristakessian
Ashkhen Aristakessian 2015 年 9 月 30 日
Thank you Madhu. It is interesting because originally I did have [K K], but I kept getting an error message that the matrices were not matching... It works now...beats me. thanks a lot.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStability Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by