At line [gnum4,gde​n4]=series​(gnum3,gde​n3,numK,de​nK); I have an error called transfer function not proper and I can not figure out why this error is occuring

6 ビュー (過去 30 日間)
Kaan Güryuva
Kaan Güryuva 2023 年 5 月 17 日
回答済み: cdawg 2023 年 6 月 29 日
for kd = 0:1:10;
for kp = 0:1:10;
m = 0.01;
g = 9.81;
k = 1;
mu = 0.05;
mum = 0.2;
J = 100;
gnum1 = [m*g];
gden1 = [m mu mum];
gnum2 = [k];
gden2 = [J 0 0];
numK=[kd kp];
denK=1;
[gnum3,gden3]=series(gnum1,gden1,gnum2,gden2);
[gnum4,gden4]=series(gnum3,gden3,numK,denK);
[numcl,dencl]=feedback(gnum4,gden4,1,1,-1);
sys = tf(dencl, numcl)
rlocus(sys);
hold on
pause(0.5)
end
end
Error using tfchk
Transfer function not proper.

Error in series (line 66)
[num2,den2] = tfchk(c1,d1);

回答 (1 件)

cdawg
cdawg 2023 年 6 月 29 日
This is happening because your numerator numK has more degrees than your denominator denK, making it not proper. I think you may have these variables switched. You can also check if your system is proper by using isproper.
Also, I'm not sure if you're doing this on purpose, but tf takes the inputs tf(numerator, denominator). Right now, you have tf(den,num).

カテゴリ

Help Center および File ExchangeSimulink Supported Hardware についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by