How to design Differential Equation (2nd Order) in Simulink – MATLAB?

This video shows the steps to design a differential equation 2nd order in Simulink using basic blocks in Matlab 2017b.

Differential Equation in Simulink

2 x” + 2 x’ + 3 𝑦’ + π‘₯ + 2𝑦 = 0,

𝑦” + π‘₯’ + 2 𝑦’ + 2𝑦 = sin(πœ‹π‘‘)

Initial Conditions

𝑦'( 0 )= βˆ’1

y( 0 )= 1

x”  = -1/2 ( 2 x’ + 3 𝑦’ + π‘₯ + 2𝑦)

𝑦” =  sin(πœ‹π‘‘) –  π‘₯’ – 2 𝑦’ – 2𝑦

SL_Diff_Eq
SL_Diff_Eq_Plot.png

We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com

Top posts/ comments from YouTube channel:

The maximum height β€˜h’ achieved by an object thrown with a speed β€˜v’ at an angle β€˜theta’ is given by h=v(sqr)*sin(theta)(sqr)/2g . Create a table showing the maximum height for the following values of v and theta. v=10 20, in steps of 2 and in steps of 10. Use suitable interpolation function to find β€˜h’ corresponds to v=13 & 15 and theta = 55 to 65

You can watch my this video: https://youtu.be/LPc-OsU8gb4
I have shown the steps to interpolate using the interp1 function of matlab.
How do you take care of the initial conditions ?

Initial conditions can be given in Integration Block. Open the integrator block parameter window by double clicking the block and there you will get the option to enter initial condition.

I think I have shown this step in my “spring mass damping” video. You can refer to that video by using below link :

Leave a Reply

%d bloggers like this: