You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »


In this example we will solve a 2.order differential equation with simulink. The method described in this example may be used to solve higher order ODEs simply by adding equally many integrator components (3.order would need 3 integrators). 

The spesific equation for this example is: One could easily change the constants or the right hand side of the equation to solve an infinite amount of equations. To solve the equation we rearrange the equation so the highest order of derivative is alone on L.H.S

The problem at hand is a 2.order ODE an following it makes sense that you need to integrate twice to get a equation for y.

  • Add two integrator boxes by pressing the button above tab and start typing "integrator". Repeat to add the second one
  • By clicking the boxes we can edit them. Here you may change the initial condition for the equation. In our case y(0) and y'(0) is both zero so there is no need to edit the integrator

The standard library for Simulink contains boxes for most ordinary mathematical operations. Gain is for multiplication and sum is for addition/subtraction. 

  • Add a sum box either by using the library or searching like previously described.
  • Double click the sum box to configure inputs. Since the 
Page content



  • No labels