Feedback Function Not enough input arguments error

조회 수: 15 (최근 30일)
Victor Jimenez Carrillo
Victor Jimenez Carrillo 2021년 11월 28일
댓글: Star Strider 2021년 11월 29일
So here is my code below when I run it it gives me a error which should not happen. Any suggestions as to what to do inorder to fix this small error? I own all of packages required. It should just work.
syms s
k=0.0223; theta=60; Tau=12.6;
kc=3.75; TauD=0; TauI=12.6;
G=(k*exp(-theta*s))/(Tau*s+1)
C=kc*(1+1/(TauI*s)+TauD*s)
sys = feedback(G*C,1);
step(sys)

채택된 답변

Star Strider
Star Strider 2021년 11월 29일
Please do not mix Symbolic Math Toolbox and Control System Toolbox commands.
It only confuses both of them!
k=0.0223; theta=60; Tau=12.6;
kc=3.75; TauD=0; TauI=12.6;
s = tf('s'); % ,— ADD THIS ASSIGNMENT
G=(k*exp(-theta*s))/(Tau*s+1)
G = 0.0223 exp(-60*s) * ---------- 12.6 s + 1 Continuous-time transfer function.
C=kc*(1+1/(TauI*s)+TauD*s)
C = 47.25 s + 3.75 -------------- 12.6 s Continuous-time transfer function.
sys = feedback(G*C,1);
step(sys)
.
  댓글 수: 2
Victor Jimenez Carrillo
Victor Jimenez Carrillo 2021년 11월 29일
This was very helpful. You are loved!!!
Star Strider
Star Strider 2021년 11월 29일
Thank you!
.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2021년 11월 29일
feedback() does not accept symbolic expressions.

카테고리

Help CenterFile Exchange에서 Stability Analysis에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by