solve second order ODE in MATLAB/SIMULINK

自闭症网瘾萝莉.ら 提交于 2019-12-12 21:37:50

问题


I don't know how to solve this second order ODE in SIMULINK:

I rewrote it to the system of first order ODEs:

then

giving

My SIMULINK blocks are here:

giving this Scope:

This is the plot of symbolic solution from dsolve:

It looks like the functions (plots) from symbolic and SIMULINK are little similar.


回答1:


The solution was found by Phil Goddard. His answer in comments:

In Simulink you are plotting y_dot, while the symbolic solution is a plot of y.

So the problem was that Scope was plotting the y'. The correct position of Scope is here:

giving the correct plot of y:

as you can see in the plot of symbolic solution:



来源:https://stackoverflow.com/questions/30143973/solve-second-order-ode-in-matlab-simulink

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!