How can I draw a basic differential equation in Simulink?

In summary, the individual is seeking assistance in creating a basic differential equation in Simulink, specifically the equations shown in the provided image. They have attempted to use a similar ODE as an example but have encountered issues when trying to connect it to a XY Graph. They are unsure of what they are doing wrong and appreciate any help.
  • #1
GreenPrint
1,196
0

Homework Statement



Hi,

I was wondering if someone could help me create a basic differential equation in Simulink. I'm trying to create the following equations

http://imageshack.com/a/img197/1379/cic.PNG

I tried using this as an example http://blogs.mathworks.com/seth/2008/05/23/how-to-draw-odes-in-simulink/ ODE to help me solve this problem but it doesn't seem to help. The link above has a very similar ODE. When I create two of what is done in the example and try and connect it to a XY Graph I don't get anything so I'm doing something wrong but am not sure what. Thanks for any help.

Homework Equations





The Attempt at a Solution


 
Last edited by a moderator:
Physics news on Phys.org
  • #2
http://blogs.mathworks.com/seth/2008/05/23/how-to-draw-odes-in-simulink/%20ODE

Error - 404. Page not found.
 
Last edited by a moderator:

Related to How can I draw a basic differential equation in Simulink?

1. How do I draw an ODE in Simulink?

To draw an ODE in Simulink, you first need to open the Simulink Library Browser and select the "Continuous" library. Then, drag and drop the "Integrator" block onto the Simulink canvas. Next, select the "Sources" library and drag the "Function" block onto the canvas. Connect the output of the "Function" block to the input of the "Integrator" block. Finally, double-click on the "Function" block and enter your ODE equation in the "ydot" field. Your ODE is now drawn in Simulink.

2. How do I specify initial conditions for my ODE in Simulink?

To specify initial conditions for your ODE in Simulink, select the "Integrator" block and go to its parameters. Under the "Initial condition" tab, you can enter the initial values for your ODE variables. If you have multiple variables, you can enter them as a vector. Alternatively, you can use the "Initial condition" block and connect it to the input of the "Integrator" block to specify the initial conditions.

3. How do I change the solver for my ODE in Simulink?

To change the solver for your ODE in Simulink, select the "Configuration Parameters" option from the "Simulation" menu. In the "Solver" tab, you can select the desired solver from the drop-down menu. You can also change the solver settings such as step size, maximum step size, and tolerances in this tab.

4. How do I plot the results of my ODE simulation in Simulink?

To plot the results of your ODE simulation in Simulink, select the "Scope" block from the "Sinks" library and drag it onto the canvas. Connect the output of the "Integrator" block to the input of the "Scope" block. Then, run the simulation and the results will be displayed on the scope. You can also use the "To Workspace" block to save the results in a variable and plot them using the MATLAB plot function.

5. How do I add additional parameters to my ODE in Simulink?

To add additional parameters to your ODE in Simulink, you can use the "Constant" block from the "Sources" library. Connect the output of the "Constant" block to the input of the "Function" block, and enter the parameter value in the "Value" field. You can also use the "From Workspace" block to specify the parameter values from a MATLAB workspace. Alternatively, you can use the "Model Explorer" to add and edit parameters for your ODE.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
866
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
16
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
28
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Differential Equations
Replies
1
Views
2K
Back
Top