Skip to content
Prev Previous commit
Next Next commit
small updates to statefbk.py docstrings
  • Loading branch information
murrayrm committed Dec 22, 2020
commit 7b9d1a9d080559abdcca90977fec8d1e753ad5a5
35 changes: 18 additions & 17 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 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