Repository navigation
Documentation update #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Documentation update #476
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
802b47b
DOC: fix typos, equation numbering in doc/flatsys.rst
murrayrm 7b9d1a9
small updates to statefbk.py docstrings
murrayrm 4f49094
update setup.py contract info
murrayrm 17c1840
small fixes to iosys docstrings (from samlaf)
murrayrm 97c4a65
TRV: fix indentation in docstring
murrayrm 3e6347f
update lqr() return type documentation (addresses #418)
murrayrm 6ff59f0
Added 2D array/matrix note to all functions using _ssmatrix + numpydo…
murrayrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| ------- | ||
|
|
@@ -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 | ||
| -------- | ||
|
|
@@ -171,6 +171,7 @@ def place_varga(A, B, p, dtime=False, alpha=None): | |
| See Also: | ||
| -------- | ||
| place, acker | ||
|
|
||
| """ | ||
|
|
||
| # Make sure that SLICOT is installed | ||
|
|
@@ -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 | ||
|
|
@@ -373,9 +374,9 @@ def lqr(*args, **keywords): | |
|
|
||
| Returns | ||
| ------- | ||
| K: 2D array | ||
| K: 2D array (or matrix) | ||
| State feedback gains | ||
| S: 2D array | ||
| S: 2D array (or matrix) | ||
| Solution to Riccati equation | ||
| E: 1D array | ||
| Eigenvalues of the closed loop system | ||
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numpydoc:
Same for all the other functions in this file, which are a mix of numpydoc and non-numpydoc right now.