Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update docstrings and user documentation
  • Loading branch information
murrayrm committed Jun 10, 2023
commit 77a75a64971a9bfbda15701eb1b7b93b05cb4265
1 change: 0 additions & 1 deletion control/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ def use_matlab_defaults():
The following conventions are used:
* Bode plots plot gain in dB, phase in degrees, frequency in
rad/sec, with grids
* State space class and functions use Numpy matrix objects

Examples
--------
Expand Down
2 changes: 0 additions & 2 deletions control/iosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -2227,8 +2227,6 @@ def ss(*args, **kwargs):
y[k] &= C x[k] + D u[k]

The matrices can be given as *array like* data types or strings.
Everything that the constructor of :class:`numpy.matrix` accepts is
permissible here too.

``ss(args, inputs=['u1', ..., 'up'], outputs=['y1', ..., 'yq'], states=['x1', ..., 'xn'])``
Create a system with named input, output, and state signals.
Expand Down
9 changes: 2 additions & 7 deletions control/statesp.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,6 @@ def _remove_useless_states(self):
"""

# Search for useless states and get indices of these states.
#
# Note: shape from np.where depends on whether we are storing state
# space objects as np.matrix or np.array. Code below will work
# correctly in either case.
ax1_A = np.where(~self.A.any(axis=1))[0]
ax1_B = np.where(~self.B.any(axis=1))[0]
ax0_A = np.where(~self.A.any(axis=0))[-1]
Expand Down Expand Up @@ -488,12 +484,11 @@ def __str__(self):
return string

# represent to implement a re-loadable version
# TODO: remove the conversion to array when matrix is no longer used
def __repr__(self):
"""Print state-space system in loadable form."""
return "StateSpace({A}, {B}, {C}, {D}{dt})".format(
A=asarray(self.A).__repr__(), B=asarray(self.B).__repr__(),
C=asarray(self.C).__repr__(), D=asarray(self.D).__repr__(),
A=self.A.__repr__(), B=self.B.__repr__(),
C=self.C.__repr__(), D=self.D.__repr__(),
dt=(isdtime(self, strict=True) and ", {}".format(self.dt)) or '')

def _latex_partitioned_stateless(self):
Expand Down
8 changes: 4 additions & 4 deletions control/stochsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def lqe(*args, **kwargs):

Returns
-------
L : 2D array (or matrix)
L : 2D array
Kalman estimator gain
P : 2D array (or matrix)
P : 2D array
Solution to Riccati equation

.. math::
Expand Down Expand Up @@ -221,9 +221,9 @@ def dlqe(*args, **kwargs):

Returns
-------
L : 2D array (or matrix)
L : 2D array
Kalman estimator gain
P : 2D array (or matrix)
P : 2D array
Solution to Riccati equation

.. math::
Expand Down
1 change: 0 additions & 1 deletion doc/control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,5 @@ Utility functions and conversions
unwrap
use_fbs_defaults
use_matlab_defaults
use_numpy_matrix


4 changes: 0 additions & 4 deletions doc/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,6 @@ Selected variables that can be configured, along with their default values:
* freqplot.feature_periphery_decade (1.0): How many decades to include in
the frequency range on both sides of features (poles, zeros).

* statesp.use_numpy_matrix (True): set the return type for state space
matrices to `numpy.matrix` (verus numpy.ndarray)

* statesp.default_dt and xferfcn.default_dt (None): set the default value
of dt when constructing new LTI systems

Expand All @@ -322,5 +319,4 @@ Functions that can be used to set standard configurations:
reset_defaults
use_fbs_defaults
use_matlab_defaults
use_numpy_matrix
use_legacy_defaults