Position-Velocity phase plane portrait in MATLAB?

  • Context: MATLAB 
  • Thread starter Thread starter currently
  • Start date Start date
  • Tags Tags
    Matlab Phase Plane
Click For Summary

Discussion Overview

The discussion revolves around how to graph a Position-Velocity phase portrait for a nodal sink or spiral sink using MATLAB, specifically addressing the differential equation mx'' = -cx' - kx + βx^3. The scope includes numerical integration techniques and potential use of Simulink.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant inquires about the method to graph a Position-Velocity phase portrait for specific types of sinks, indicating the need for numerical integration.
  • Another participant suggests using numerical integration methods like rk4 or similar techniques in MATLAB to achieve the graph.
  • Links to examples of using rk4 (ode45) for integrating differential equations are provided by multiple participants.
  • A suggestion is made to create the system within Simulink and link it to an interactive MATLAB script, outlining steps to define variables, run simulations, and plot data.

Areas of Agreement / Disagreement

Participants generally agree on the need for numerical integration methods to graph the phase portrait, but there are multiple approaches suggested, including direct MATLAB coding and using Simulink, indicating a lack of consensus on the preferred method.

Contextual Notes

Participants mention additional steps required for graphing and the potential need for further definitions within Simulink, but these aspects remain unresolved.

currently
Messages
21
Reaction score
5
TL;DR
How to graph a Position-Velocity phase plane portrait?
For example, how would I graph a Position-Velocity phase portrait of a nodal sink or spiral sink?
Given form of mx'' = -cx' - kx + βx^3.
 
Physics news on Phys.org
To get a plot you’ll have to numerically integrate it using MATLAB using rk4 or something similar.

If you look online at the Matlab site or do a google search you should be able to find examples to base your solution on.
 
currently said:
Summary:: How to graph a Position-Velocity phase plane portrait?

For example, how would I graph a Position-Velocity phase portrait of a nodal sink or spiral sink?
Given form of mx'' = -cx' - kx + βx^3.

You could also create the system within Simulink and link it to an interactive live Matlab script.

For example, here is a 2nd-order system with some damping (you could also include some extra blocks for your other term)
Screen Shot 2020-01-08 at 5.50.50 PM.png


Then we link it to the Matlab script:
1. Define our variables
2. Run the simulation and extract the data
3. Plot the data

1.
Screen Shot 2020-01-08 at 5.52.07 PM.png


2.
Screen Shot 2020-01-08 at 5.52.26 PM.png


3.
Screen Shot 2020-01-08 at 5.52.34 PM.png


Hope that is of some help.

Note: there will be a few more things to define within Simulink, but a youtube introductory video should show you how to use the blocks
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K