Better I/O systems support for phase plots by murrayrm · Pull Request #1001 · python-control/python-control
As an example of the changes, here is the code to produce a phase portrait for the inverted pendulum example in FBS2e, Figure 5.4:
from math import pi
import control as ct
def invpend_update(t, x, u, params):
m, l, b, g = params['m'], params['l'], params['b'], params['g']
return [x[1], -b/m * x[1] + (g * l / m) * np.sin(x[0])]
invpend = ct.nlsys(
invpend_update, states=2, inputs=0, name='invpend',
params={'m': 1, 'l': 1, 'b': 0.2, 'g': 1})
ct.phase_plane_plot(invpend, [-2*pi - 1, 2*pi + 1, -2, 2], 10)
The changes are not major, but if you look at the number and spacing of arrows along the streamlines, you'll see examples of the changes there (some streamlines have no arrows in "before" plot). Also note the change in location of the title.