Skip to content

Commit a5126f8

Browse files
committed
TRV: docstring updates
1 parent 4bba186 commit a5126f8

File tree

1 file changed

+35
-22
lines changed

1 file changed

+35
-22
lines changed

control/statefbk.py

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def place(A, B, p):
111111

112112
result = place_poles(A_mat, B_mat, placed_eigs, method='YT')
113113
K = result.gain_matrix
114+
115+
# TODO: add return type conversion
114116
return K
115117

116118

@@ -129,16 +131,17 @@ def place_varga(A, B, p, dtime=False, alpha=None):
129131
130132
Optional Parameters
131133
---------------
132-
dtime: False for continuous time pole placement or True for discrete time.
133-
The default is dtime=False.
134-
alpha: double scalar
135-
If DICO='C', then place_varga will leave the eigenvalues with real
136-
real part less than alpha untouched.
137-
If DICO='D', the place_varga will leave eigenvalues with modulus
138-
less than alpha untouched.
139-
140-
By default (alpha=None), place_varga computes alpha such that all
141-
poles will be placed.
134+
dtime : bool
135+
False for continuous time pole placement or True for discrete time.
136+
The default is dtime=False.
137+
alpha : double scalar
138+
If DICO='C', then place_varga will leave the eigenvalues with real
139+
real part less than alpha untouched.
140+
If DICO='D', the place_varga will leave eigenvalues with modulus
141+
less than alpha untouched.
142+
143+
By default (alpha=None), place_varga computes alpha such that all
144+
poles will be placed.
142145
143146
Returns
144147
-------
@@ -217,6 +220,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
217220
A_mat, B_mat, placed_eigs, DICO)
218221

219222
# Return the gain matrix, with MATLAB gain convention
223+
# TODO: add return type conversion
220224
return -F
221225

222226
# Contributed by Roberto Bucher <roberto.bucher@supsi.ch>
@@ -232,6 +236,9 @@ def acker(A, B, poles, return_type=None):
232236
State and input matrix of the system
233237
poles: 1-d list
234238
Desired eigenvalue locations
239+
return_type : ndarray subtype, optional
240+
Set the ndarray subtype for the return value. The default value can
241+
be set using the `~control.use_numpy_matrix` function.
235242
236243
Returns
237244
-------
@@ -367,22 +374,25 @@ def lqr(*args, **keywords):
367374
S = X;
368375
E = w[0:nstates];
369376

377+
# TODO: add return type conversion
370378
return K, S, E
371379

380+
372381
def ctrb(A, B, return_type=None):
373382
"""Controllabilty matrix
374383
375384
Parameters
376385
----------
377-
A, B: array_like or string
386+
A, B : array_like or string
378387
Dynamics and input matrix of the system
379388
380-
return_type: nparray subtype, optional (default = numpy.matrix)
381-
Set the ndarray subtype for the return value
389+
return_type : ndarray subtype, optional
390+
Set the ndarray subtype for the return value. The default value can
391+
be set using the `~control.use_numpy_matrix` function.
382392
383393
Returns
384394
-------
385-
C: matrix
395+
C : matrix
386396
Controllability matrix
387397
388398
Examples
@@ -408,15 +418,15 @@ def obsv(A, C, return_type=None):
408418
409419
Parameters
410420
----------
411-
A, C: array_like or string
421+
A, C : array_like or string
412422
Dynamics and output matrix of the system
413-
414-
return_type: nparray subtype, optional (default = numpy.matrix)
415-
Set the ndarray subtype for the return value
423+
return_type : ndarray subtype, optional
424+
Set the ndarray subtype for the return value. The default value can
425+
be set using the `~control.use_numpy_matrix` function.
416426
417427
Returns
418428
-------
419-
O: matrix
429+
O : matrix
420430
Observability matrix
421431
422432
Examples
@@ -442,17 +452,20 @@ def gram(sys, type, return_type=None):
442452
443453
Parameters
444454
----------
445-
sys: StateSpace
455+
sys : StateSpace
446456
State-space system to compute Gramian for
447-
type: String
457+
type : String
448458
Type of desired computation.
449459
`type` is either 'c' (controllability) or 'o' (observability). To
450460
compute the Cholesky factors of gramians use 'cf' (controllability) or
451461
'of' (observability)
462+
return_type : ndarray subtype, optional
463+
Set the ndarray subtype for the return value. The default value can
464+
be set using the `~control.use_numpy_matrix` function.
452465
453466
Returns
454467
-------
455-
gram: array
468+
gram : array
456469
Gramian of system
457470
458471
Raises

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy