Ramp response for transfer function using symbolic function

조회 수: 13 (최근 30일)
Ian Thean
Ian Thean 2020년 11월 6일
편집: Ian Thean 2020년 11월 12일
syms s k
a = 1
b = -5/s
K = a + b;
G = 6*s + 12/s^3 + 8*s^2 + 19*s + 12;
F = 1;
R = 1/s^2;
Error = (K*G/(1+K*G*F));
ssE = limit(s*Error,s,0);
I trying to churn a ramp response figure with this code. I remove R from Error eqn as to find feedback response. I type in " figure(1);step(Error/s) " to create figure but error keeps prompting "not enough input arguements".
Could use some advice on this?
Thnk!

채택된 답변

Raunak Gupta
Raunak Gupta 2020년 11월 9일
Hi,
The step function that is used only accepts Dynamic System Models as input. One example is tf which you are trying to use. Replacing the syms s k with s = tf(‘s’) in your code clear out the error. But again limit function is only valid for symbolic expression. So, you may choose what you prefer to do.
This works fine if you want to use step.
s = tf('s');
a = 1;
b = -5/s;
K = a + b;
G = 6*s + 12/s^3 + 8*s^2 + 19*s + 12;
F = 1;
Error = (K*G/(1+K*G*F));
step(Error);
If you want to use limit, then the code given in the question works fine.
  댓글 수: 1
Ian Thean
Ian Thean 2020년 11월 12일
편집: Ian Thean 2020년 11월 12일
I see! Thanks a lot! Now I understand the difference between the two.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by