在MATLAB/SIMULINK中求解二阶ODE [英] solve second order ODE in MATLAB/SIMULINK

查看:151
本文介绍了在MATLAB/SIMULINK中求解二阶ODE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何在SIMULINK中求解此二阶ODE:

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

我将其重写为一阶ODE系统:

I rewrote it to the system of first order ODEs:

然后

给予

我的SIMULINK块在这里:

My SIMULINK blocks are here:

给出此范围:

这是来自dsolve的符号解的图:

This is the plot of symbolic solution from dsolve:

符号和SIMULINK的功能(图)似乎不太相似.

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

推荐答案

该解决方案由 Phil Goddard 找到.他在评论中的回答:

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

在Simulink中,您正在绘制y_dot,而符号解是对y的绘制.

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

所以问题是Scope正在绘制y'. Scope的正确位置在这里:

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

给出了正确的y图:

在符号解图中可以看到:

as you can see in the plot of symbolic solution:

这篇关于在MATLAB/SIMULINK中求解二阶ODE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆