필터 지우기
필터 지우기

Discrepancy between MATLAB and Simulink closed loop response?

조회 수: 1 (최근 30일)
Ryan Rizzo
Ryan Rizzo 2019년 1월 7일
댓글: Ryan Rizzo 2019년 1월 7일
I have a closed loop system which I am testing in MALTAB and Simulink, expecting the same output.
**MATLAB**
num_plant = [0.0001 10];
den_plant = [0.005 5 0.6616 61.01 2.11 20];
G1 = tf(num_plant, den_plant)
num_controller = [46615 6526 5.722e05 2.389e04 2.001e05]
den_controller = [1 404 41605 162000 200000]
C2 = tf(num_controller, den_controller)
G2=G1*C2; %G1 is same 5th order TF as Simulink
new2 = feedback(G2, 1);
step(new2)
Note:
G1 =
0.0001 s + 10
--------------------------------------------------------
0.005 s^5 + 5 s^4 + 0.6616 s^3 + 61.01 s^2 + 2.11 s + 20
C2 =
46615 s^4 + 6526 s^3 + 572200 s^2 + 23890 s + 200100
----------------------------------------------------
s^4 + 404 s^3 + 41605 s^2 + 162000 s + 200000
2.png
**SIMULINK**
1.png
----------
According to the official documentation, feedback should be doing what I am presenting with blocks in Simulink. Surely I am missing something. I checked the code and everything should be the same in both cases. What is the reason for this discrepancy?
  댓글 수: 2
Aquatris
Aquatris 2019년 1월 7일
What version of Matlab are you using?
I used the script (coppied your code without change other than adding grid on) in Matlab 2013a and the result looks identical to your simulink results.
untitled.jpg
Ryan Rizzo
Ryan Rizzo 2019년 1월 7일
Thanks for trying this out! I am using MATLAB R2018a. I cannot understand why our results differ so much! Any suggestions on what I should do? Could it be that I'm using a different solver or something of the sort?

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by