Jupyter notebook phase-portrait-stable.ipynb
Sketching a Phase Portrait
CEIC3000 Process Modelling & Analysis
In this notebook, we'll explore what a phase portrait tells us about a model and how to go about making phase portraits. It is possible to make accurate phase portraits numerically using an ODE solver and also to provide a rough sketch of a phase portrait just by analysing the matrix from the linear form of the model.
Some of the code below will be really easy to follow and will help you make phase portraits in your upcoming tutorials and assignments. Some of the code is rather complicated to help make interactive demonstrations and is beyond what you need to be able to produce in this course. It's good to see some of the possibilities though!
NB following the big SageMathCloud upgrade last weekend, you need to click the "Classical Notebook" button on the toolbar to be able to use the interactive widgets.
Model
We'll look at a simple model in zero-input form. That is, we have
We already know how solve a model like this using an ODE solver.
Understanding the big picture
We want to develop a big picture understanding of the system of DEs.
What starting points will lead back to the steady state ?
What initial conditions will lead to going through a maximum like pictured above?
How do the values of and compare during the solution?
Let's plot vs to see what the solution looks like.
Adding more trajectories
We have a plot of vs with one particular solution shown on it. We're not restricted to showing only one solution at a time though. Let's add some more to the same set of axes.
Procedure for sketching phase portrait
We've seen how we might go about calculating a phase portrait for a simple ODE. How do we sketch the phase portrait without using the ODE solver?
Find equilibrium point(s):
Classify: is it stable?
Eigenvectors (directions)
Eigenvalues (speeds)
Sketch trajectories
Both are less than 0, so we know the feature is stable.
For reference, these are and .
First, mark the steady state on the axes and plot the eigenvectors:
Next, we add some arrows that indicate fast vs slow directions. The motion is fastest in the fast direction each time. Mark a couple of arrows in near each eigenvector, using the length of the arrow to indicate fast or slow.
Away from the eigenvectors, the trajectory is a combination of the two motions.