@@ -111,6 +111,8 @@ def place(A, B, p):
111
111
112
112
result = place_poles (A_mat , B_mat , placed_eigs , method = 'YT' )
113
113
K = result .gain_matrix
114
+
115
+ # TODO: add return type conversion
114
116
return K
115
117
116
118
@@ -129,16 +131,17 @@ def place_varga(A, B, p, dtime=False, alpha=None):
129
131
130
132
Optional Parameters
131
133
---------------
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.
142
145
143
146
Returns
144
147
-------
@@ -217,6 +220,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
217
220
A_mat , B_mat , placed_eigs , DICO )
218
221
219
222
# Return the gain matrix, with MATLAB gain convention
223
+ # TODO: add return type conversion
220
224
return - F
221
225
222
226
# Contributed by Roberto Bucher <roberto.bucher@supsi.ch>
@@ -232,6 +236,9 @@ def acker(A, B, poles, return_type=None):
232
236
State and input matrix of the system
233
237
poles: 1-d list
234
238
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.
235
242
236
243
Returns
237
244
-------
@@ -367,22 +374,25 @@ def lqr(*args, **keywords):
367
374
S = X ;
368
375
E = w [0 :nstates ];
369
376
377
+ # TODO: add return type conversion
370
378
return K , S , E
371
379
380
+
372
381
def ctrb (A , B , return_type = None ):
373
382
"""Controllabilty matrix
374
383
375
384
Parameters
376
385
----------
377
- A, B: array_like or string
386
+ A, B : array_like or string
378
387
Dynamics and input matrix of the system
379
388
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.
382
392
383
393
Returns
384
394
-------
385
- C: matrix
395
+ C : matrix
386
396
Controllability matrix
387
397
388
398
Examples
@@ -408,15 +418,15 @@ def obsv(A, C, return_type=None):
408
418
409
419
Parameters
410
420
----------
411
- A, C: array_like or string
421
+ A, C : array_like or string
412
422
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.
416
426
417
427
Returns
418
428
-------
419
- O: matrix
429
+ O : matrix
420
430
Observability matrix
421
431
422
432
Examples
@@ -442,17 +452,20 @@ def gram(sys, type, return_type=None):
442
452
443
453
Parameters
444
454
----------
445
- sys: StateSpace
455
+ sys : StateSpace
446
456
State-space system to compute Gramian for
447
- type: String
457
+ type : String
448
458
Type of desired computation.
449
459
`type` is either 'c' (controllability) or 'o' (observability). To
450
460
compute the Cholesky factors of gramians use 'cf' (controllability) or
451
461
'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.
452
465
453
466
Returns
454
467
-------
455
- gram: array
468
+ gram : array
456
469
Gramian of system
457
470
458
471
Raises
0 commit comments