2
votes

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

enter image description here

I rewrote it to the system of first order ODEs:

enter image description here

then

enter image description here

giving

enter image description here

My SIMULINK blocks are here:

SIMULINK blocks

giving this Scope:

enter image description here

This is the plot of symbolic solution from dsolve:

enter image description here

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

1
In Simulink you are plotting y_dot, while the symbolic solution is a plot of y. - Phil Goddard
@PhilGoddard Of course! That was the mistake. Thank you :) - jirinovo

1 Answers

0
votes

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:

enter image description here

giving the correct plot of y:

enter image description here

as you can see in the plot of symbolic solution:

enter image description here