Different time response of same trasfer function in matlab and simulink

조회 수: 2 (최근 30일)
I am modeling the mechanical component of an accelerometer and tf is MechCmp =
4.313e-09
---------------------------------
4.313e-09 s^2 + 0.05545 s + 149.9
when i use step(MechCmp) i get this response
but when i give step ip to its Simulink tf block of the exact same values it takes much time and gives a straight line as o/p. I also tried LTI block and state space model of the same tf but problem is same.i found answers saying that simulink uses ode solvers instead of fixed sample time, can anyone explain to me how to do disable ode solvers or use fixed sample time in simulink. or anyother suggestion

채택된 답변

Dimitris Kalogiros
Dimitris Kalogiros 2018년 8월 9일
At simulink, you have to go to Model Configuration Parameters
Then you can change your solver:
I suggest " variable-step discrete " solver
  댓글 수: 1
Mehran
Mehran 2018년 8월 10일
thank you for your response, i did this but i got this error "The "VariableStepDiscrete" solver cannot be used to simulate block diagram 'step' because it contains continuous states", I have tried different sample times for step ip but same error

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

추가 답변 (1개)

Ameer Hamza
Ameer Hamza 2018년 8월 9일
The Simulink is giving the same plot as MATLAB, the problem in the display is happening because The system step response has a very small magnitude (approx 2.9e-11) and the settling time is also very small (approx 2e-3 seconds). You need to scale the scope axis properly, to see the same graph. Change the Simulation Stop time to 0.01 seconds and scale the axis using the button shown in the red box
  댓글 수: 2
Mehran
Mehran 2018년 8월 10일
thank you for your response which version of matlab you are using i have 2015 and i have this kind of interface
</matlabcentral/answers/uploaded_files/128444/Untd.png> and when i autoscale it i get the response in attached picture
Ameer Hamza
Ameer Hamza 2018년 8월 10일
편집: Ameer Hamza 2018년 8월 10일
I am using R2018a. Please try to run the attached file to see if it work correctly.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by