Pplane 8

0 views
Skip to first unread message

Colleen Bramham

unread,
Aug 4, 2024, 6:40:29 PM8/4/24
to tingchiromo
dfieldand pplane

dfield (direction field) and pplane (phase plane) are software programs for the interactive analysis of ordinary differential equations (ODE). The software is described in detail in the manual Ordinary Differential Equations using MATLAB. Additionaly, several textbooks on differential equations refer to and usedfield and pplane. Among them are DifferentialEquations and Differential Equations with Boundary Value Problemsby John Polking, Albert Boggess, and David Arnold.


dfield and pplane are copyrighted in the name of John C. Polking, Department of Mathematics, Rice University. They are not in the public domain. However, they are being made available free for use in educational institutions. This offer does not extend to any application that is made for profit. Users who have such applications in mind should contact John C. Polking. The Java versions were written by Joel Castellanos in collaboration with John C. Polking.


dfield (Direction Field) Java Software Download:

dfield.jarClick to download and save dfield.jar. After downloading, find the directory where you saved dfield.jar and double-click on the downloaded file. Alternatively, run dfield from the commend line with the command: java -jar dfield.jar. Note: running this software requires the Java Runtime Environment 1.6 or newer.


pplane (Phase Plane) Java Software Download:

pplane.jarClick to download and save pplane.jar. After downloading, find the directory where you saved pplane.jar and double-click on the downloaded file. Alternatively, run pplane from the commend line with the command: java -jar pplane.jar Note: running this software requires the Java Runtime Environment 1.6 or newer.


To run this, you will need to have Java installed on your machine. This is probably the case, but if not then go to , from where you can both check whether you have Java (and whether your Java is up to date) and download Java. Be careful during the installation of Java: the install might try to change your web homepage and search engine to Yahoo!


You should then be able to run PPLANE by double-clicking on the pplane.jar file you downloaded. Your computer might complain about running code from an unknown developer. You will need to give the necessary approval to run the program: this might involve bringing up your security preferences.


PPLANE was developed by John C. Polking, who is at the Department of Mathematics, Rice University. Here is a link to his PPLANE page (page currently not working), which has more information, including terms and conditions for using his software (free to use at educational institutions).


The software pplane allows the user to utilize a graphical interface to plot direction fields for differential equations. Instead of going through the hassle of defining array vectors of all points in the range of the desired differential equation graph, a user can simply enter their equations in the software, determine the desired range to graph, as well as the shape of the arrow.


To run the software, download the followingfile pplane8.m. It has beentested to run on matlabR2019. After downloading the file, place it in a special folder, double click to open the .m file on matlab R2019, then press run.


pplane is a great program that makes it very easy to tackle nonlinear time-invariant differential equations of two states. Not only can you generate the field, but you can plot a phase portrait with trajectories of your choice and can then plot each of those state trajectories against time to see how the system actually evolves in finite time. It's a nice front-end to lots of other matlab utilities that makes it easy to get through your first course in nonlinear systems.


I don't know much about the software since my class just started using it, but I basically need it for plotting nullclines and trajectories, as well as finding fixed points and their stability. PPLANE can basically do all of this through a nice GUI without having to write any code.


However, i don't think an alternative is strictly necessary.Firstly, even if you don't know how to write Matlab code, you should be able to figure out the GUI.Secondly, The app -Teaching-Resources/Phase-Plane-and-Slope-Field is the latest version of pplane and is written as a Matlab app, so it should be possible to run it without Matlab installed (if you can't get it working without a license, you can maybe ask your TA to help you create an executable).


I do not really know how much this can help you, but maybe you can use this code for rough sketches of the dynamics of planar vector fields. I know that it does not have the functionality that you may really wish for, but it may come in handy to guide the analysis in the right direction.


These programs were originally copyrighted by John Polking between 1995 and 2003. The textbook Ordinary Differential Equations Using MATLAB, 3rd edition, contains a manual for the programs, but they are pretty self-explanatory.


The codes were last properly updated in 2003 for MATLAB 6.5. The MATLAB File Exchange contains many submissions that got the codes running again on some release or other, but none that systematically attempted to fix all the broken components.


Acknowledgments: The current codes are based on revisions by Nathanael Kazmierczak (pplane) and Giampiero Campa (dfield). I gratefully acknowledge their efforts and those of others who posted fixes MATLAB File Exchange. Several other people sent me partially working codes including Mac Hyman, Hil Meijer, Joceline Lega, Ross Parker, and Bjorn Sanstede. I got lots of help by posting questions to MATLAB Answers. These were usually answered (within minutes) by Walter Roberson, of the Mathworks. Div Tiwari, also of the Mathworks, provided additional useful suggestions.


In this lab, we'll be using the software pplane to visualize autonomous systems in the phase plane. The official site for pplane is here, but I've also provided an alternative download location here just in case the official link doesn't work. pplane is distributed as a Java JAR file, which is treated as an executable on most modern operating systems (provided they have Java installed). In most cases (including on Windows), you should be able to just double-click the JAR file to run it. You may be warned about the potential dangers of running downloaded software on your computer. I can't make that decision for you. But assuming you do choose to run the program, you'll see several windows pop up.


The window that pops up in the center is an informational dialog box that tells you about the application. You need to click the "Ok" button before you can use pplane. The other windows are fairly self-explanatory. The window on the top left will report various messages from pplane. For this lab we'll be ignoring that one. The window on the bottom left defines the system of ODEs to be visualized. It's also the main window in the sense that this is the window that you close to shut down the program. The window on the right is very clearly the phase plane visualization of the system.


To get started, let's consider the pendulum equation. Written as a second-order ODE, the equation for an unforced pendulum (with optional damping) is $$ m\fracd^2\thetadt^2 + \fracc\ell\fracd\thetadt + \fracmg\ell\sin\theta = 0. $$


If you click the mouse at a few points in the phase plane, you'll notice that each time you click the software draws a small blue circle where you clicked along with a blue curve passing through the circle. That blue curve is the trajectory of the solution to the ODE system that satisfies the initial conditions $$(\theta(0),\omega(0))=\text the point you clicked.$$ By default, pplane plots the solution forward and backward in time. You can tell which is which by looking at the directions of the green arrows in the phase plane.


If your phase plane gets too crowded with solution curves, you can get rid of them. Let's do that now. From the Edit menu in the PPLANE Phase Plane window, select Delete All Orbits. (Remember that orbit and trajectory are synonyms in the phase plane.)


Hint: Until you get used to the phase plane, visualizing solutions from their trajectories can be tricky sometimes. If you can't see what's happening in the phase plane, here's a trick. Open the Graph menu at the top of the PPLANE Phase Plane window and click "x vs. t". A red bar will appear just below the menu asking you to select a solution curve. Move the mouse pointer over the trajectory you want to understand better and click. You'll get a new window with a plot of how $\theta$ changes with time for that trajectory. On the right of that menu, you can also select to view $\omega$ as a function of time, or view them both together. When you're finished with that window, just click the "Go away" button and you can go back to looking at the phase plane.


The pendulum system has an equilibrium at the point $(\pi,0)$. Physically, this corresponds to the state in which the pendulum bob is balanced exactly above the support point and the velocity is $0$. Intuitively, it is clear why this must be an unstable equilibrium: the slightest nudge in either direction will cause the bob to fall off toward the side and begin to swing all the way down through $\theta=0$ before continuing on. To get a sense of what the phase portrait looks like near this unstable equilibrium point, clear all orbits and then click on several points that are a bit away from $(\pi,0)$ in different directions. Your plot should look something like this.


Now hold down the Shift key on your keyboard and click as close as possible to the point $(\pi,0)$. This will cause the software to zoom in 2x at the point you clicked. Zoom in like this two more times and you'll see a plot that looks something like this.


Notice that trajectories that pass near the unstable equilibrium appear to be following an X shape formed by lines crossing in two particular directions. Our goal in this lab is to better understand the origin and nature of these special directions. We'll come back to the nonlinear pendulum equation at the end of the lab, but for now we're going to shift gears and look at linear first-order systems.

3a8082e126
Reply all
Reply to author
Forward
0 new messages