Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
2 changes: 1 addition & 1 deletion control/iosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ def __init__(self, syslist, connections=[], inplist=[], outlist=[],

The InterconnectedSystem class is used to represent an input/output
system that consists of an interconnection between a set of subystems.
The outputs of each subsystem can be summed together to to provide
The outputs of each subsystem can be summed together to provide
inputs to other subsystems. The overall system inputs and outputs can
be any subset of subsystem inputs and outputs.

Expand Down
45 changes: 26 additions & 19 deletions control/statefbk.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,17 @@ def place_varga(A, B, p, dtime=False, alpha=None):

Optional Parameters
---------------
dtime: False for continuous time pole placement or True for discrete time.
The default is dtime=False.
alpha: double scalar
If DICO='C', then place_varga will leave the eigenvalues with real
real part less than alpha untouched.
If DICO='D', the place_varga will leave eigenvalues with modulus
less than alpha untouched.
dtime : bool
False for continuous time pole placement or True for discrete time.
The default is dtime=False.

By default (alpha=None), place_varga computes alpha such that all
poles will be placed.
alpha : double scalar
If DICO='C', then place_varga will leave the eigenvalues with real
part less than alpha untouched. If DICO='D', the place_varga will
leave eigenvalues with modulus less than alpha untouched.

By default (alpha=None), place_varga computes alpha such that all
poles will be placed.

Returns
-------
Expand All @@ -153,14 +154,13 @@ def place_varga(A, B, p, dtime=False, alpha=None):

Algorithm
---------
This function is a wrapper for the slycot function sb01bd, which
implements the pole placement algorithm of Varga [1]. In contrast to
the algorithm used by place(), the Varga algorithm can place
multiple poles at the same location. The placement, however, may not
be as robust.
This function is a wrapper for the slycot function sb01bd, which
implements the pole placement algorithm of Varga [1]. In contrast to the
algorithm used by place(), the Varga algorithm can place multiple poles at
the same location. The placement, however, may not be as robust.

[1] Varga A. "A Schur method for pole assignment."
IEEE Trans. Automatic Control, Vol. AC-26, pp. 517-519, 1981.
[1] Varga A. "A Schur method for pole assignment." IEEE Trans. Automatic
Control, Vol. AC-26, pp. 517-519, 1981.

Examples
--------
Expand All @@ -171,6 +171,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
See Also:
--------
place, acker

"""

# Make sure that SLICOT is installed
Expand Down Expand Up @@ -213,7 +214,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
# but does the trick
alpha = -2*abs(min(system_eigs.real))
elif dtime and alpha < 0.0:
raise ValueError("Need alpha > 0 when DICO='D'")
raise ValueError("Discrete time systems require alpha > 0")


# Call SLICOT routine to place the eigenvalues
Expand Down Expand Up @@ -373,9 +374,9 @@ def lqr(*args, **keywords):

Returns
-------
K: 2D array
K: 2D array (or matrix)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numpydoc:

Suggested change
K: 2D array (or matrix)
K : 2D array (or matrix)

Same for all the other functions in this file, which are a mix of numpydoc and non-numpydoc right now.

State feedback gains
S: 2D array
S: 2D array (or matrix)
Solution to Riccati equation
E: 1D array
Eigenvalues of the closed loop system
Expand All @@ -389,6 +390,12 @@ def lqr(*args, **keywords):
--------
lqe

Notes
-----
The return type for `K` and `S` depends on the default class set for
state space operations. By default, this is the Numpy `matrix`
class in this release, but this can be reconfigured using the
:func:`~control.use_numpy_matrix` function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also true for most of the other functions in this file. Maybe a general note referenced here and in those functions would be preferable. Cf. #439

"""

# Make sure that SLICOT is installed
Expand Down
11 changes: 6 additions & 5 deletions doc/flatsys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and we can write the solutions of the nonlinear system as functions of
.. math::
x &= \beta(z, \dot z, \dots, z^{(q)}) \\
u &= \gamma(z, \dot z, \dots, z^{(q)}).
:label: flat2state

For a differentially flat system, all of the feasible trajectories for
the system can be written as functions of a flat output :math:`z(\cdot)` and
Expand All @@ -52,7 +53,7 @@ and we see that the initial and final condition in the full state
space depends on just the output :math:`z` and its derivatives at the
initial and final times. Thus any trajectory for :math:`z` that satisfies
these boundary conditions will be a feasible trajectory for the
system, using equation~\eqref{eq:trajgen:flat2state} to determine the
system, using equation :eq:`flat2state` to determine the
full state space and input trajectories.

In particular, given initial and final conditions on :math:`z` and its
Expand Down Expand Up @@ -142,7 +143,7 @@ For more general systems, the `FlatSystem` object must be created manually
In addition to the flat system descriptionn, a set of basis functions
:math:`\phi_i(t)` must be chosen. The `FlatBasis` class is used to represent
the basis functions. A polynomial basis function of the form 1, :math:`t`,
:math:`t^2:, ... can be computed using the `PolyBasis` class, which is
:math:`t^2`, ... can be computed using the `PolyBasis` class, which is
initialized by passing the desired order of the polynomial basis set:

polybasis = control.flatsys.PolyBasis(N)
Expand Down Expand Up @@ -225,9 +226,9 @@ derived *Feedback Systems* by Astrom and Murray, Example 3.11.

To find a trajectory from an initial state :math:`x_0` to a final state
:math:`x_\text{f}` in time :math:`T_\text{f}` we solve a point-to-point
trajectory generation problem. We also set the initial and final inputs, whi
ch sets the vehicle velocity :math:`v` and steering wheel angle :math:`\delta`
at the endpoints.
trajectory generation problem. We also set the initial and final inputs, which
sets the vehicle velocity :math:`v` and steering wheel angle :math:`\delta` at
the endpoints.

.. code-block:: python

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
setup(
name='control',
version=version,
author='Richard Murray',
author_email='murray@cds.caltech.edu',
url='http://python-control.sourceforge.net',
description='Python control systems library',
author='Python Control Developers',
author_email='python-control-developers@lists.sourceforge.net',
url='http://python-control.org',
description='Python Control Systems Library',
long_description=long_description,
packages=find_packages(),
classifiers=[f for f in CLASSIFIERS.split('\n') if f],
Expand Down