Z transfer fcn under simulink and cmd line

조회 수: 1 (최근 30일)
Bruce
Bruce 2023년 4월 5일
댓글: Jon 2023년 4월 6일
I create a simple cmd from S to Z domain as below, and the result is matched with my understanding;
clear
rth1=0.0268;
tau1=1066.6;
Ts=0.05;
tf1=tf(rth1,[tau1 1])
dtf1=c2d(tf1,Ts)
figure;
step(tf1);
figure
step(dtf1);
but when i create this under simulink, the result is not matched, as you can see the Z transfer fcn output is quite different with the S transfer fcn.
Is there anyone can help me?
  댓글 수: 2
Jon
Jon 2023년 4월 5일
Please attach you Simulink model and any scripts or other functions needed to run your example - thanks
Jon
Jon 2023년 4월 5일
Please see my answer below, I was able to work out what the issue was without your code, so no need to attach it now

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

채택된 답변

Jon
Jon 2023년 4월 5일
This appears to be due to a round off error in the denominator of the discrete transfer function input to Simulink.
Try for example with the denominator set to
[1 -0.999949]
instead of
[1 -1]
and you will see that the step response of the continuous and discrete approximation are now much closer
  댓글 수: 5
Bruce
Bruce 2023년 4월 6일
Thanks a lot, Jon. Your answer and explaination is quite clear, thanks again!
Jon
Jon 2023년 4월 6일
Your welcome, it was an interesting problem

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by