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