Skip to content

Commit

Permalink
Merge pull request #980 from murrayrm/phaseplots_01Jan2024
Browse files Browse the repository at this point in the history
Reimplementation of 2D phase plots
  • Loading branch information
murrayrm committed Mar 31, 2024
2 parents 62d88c9 + 748e36a commit 8983e39
Show file tree
Hide file tree
Showing 19 changed files with 1,553 additions and 319 deletions.
5 changes: 5 additions & 0 deletions control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
* :mod:`~control.flatsys`: Differentially flat systems
* :mod:`~control.matlab`: MATLAB compatibility module
* :mod:`~control.optimal`: Optimization-based control
* :mod:`~control.phaseplot`: 2D phase plane diagrams
"""

Expand Down Expand Up @@ -103,6 +104,10 @@
from .passivity import *
from .sysnorm import *

# Allow access to phase_plane functions as ct.phaseplot.fcn or ct.pp.fcn
from . import phaseplot
from . import phaseplot as pp

# Exceptions
from .exception import *

Expand Down
3 changes: 3 additions & 0 deletions control/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def reset_defaults():
from .timeplot import _timeplot_defaults
defaults.update(_timeplot_defaults)

from .phaseplot import _phaseplot_defaults
defaults.update(_phaseplot_defaults)


def _get_param(module, param, argval=None, defval=None, pop=False, last=False):
"""Return the default value for a configuration option.
Expand Down
6 changes: 4 additions & 2 deletions control/flatsys/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
# Author: Richard M. Murray
# Date: 1 Jul 2019

r"""The :mod:`control.flatsys` package contains a set of classes and functions
that can be used to compute trajectories for differentially flat systems.
r"""Differentially flat systems sub-package.
The :mod:`control.flatsys` sub-package contains a set of classes and
functions to compute trajectories for differentially flat systems.
A differentially flat system is defined by creating an object using the
:class:`~control.flatsys.FlatSystem` class, which has member functions for
Expand Down
2 changes: 1 addition & 1 deletion control/freqplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def gen_zero_centered_series(val_min, val_max, period):
_nyquist_defaults = {
'nyquist.primary_style': ['-', '-.'], # style for primary curve
'nyquist.mirror_style': ['--', ':'], # style for mirror curve
'nyquist.arrows': 2, # number of arrors around curve
'nyquist.arrows': 2, # number of arrows around curve
'nyquist.arrow_size': 8, # pixel size for arrows
'nyquist.encirclement_threshold': 0.05, # warning threshold
'nyquist.indent_radius': 1e-4, # indentation radius
Expand Down

0 comments on commit 8983e39

Please sign in to comment.