41
41
42
42
# External packages and modules
43
43
import numpy as np
44
- import scipy as sp
44
+
45
45
from . import statesp
46
46
from .mateqn import care
47
47
from .statesp import _ssmatrix
@@ -59,11 +59,11 @@ def place(A, B, p):
59
59
60
60
Parameters
61
61
----------
62
- A : 2D array
62
+ A : 2D array_like
63
63
Dynamics matrix
64
- B : 2D array
64
+ B : 2D array_like
65
65
Input matrix
66
- p : 1D list
66
+ p : 1D array_like
67
67
Desired eigenvalue locations
68
68
69
69
Returns
@@ -120,7 +120,7 @@ def place(A, B, p):
120
120
raise ControlDimension (err_str )
121
121
122
122
# Convert desired poles to numpy array
123
- placed_eigs = np .array ( p )
123
+ placed_eigs = np .atleast_1d ( np . squeeze ( np . asarray ( p )) )
124
124
125
125
result = place_poles (A_mat , B_mat , placed_eigs , method = 'YT' )
126
126
K = result .gain_matrix
@@ -133,11 +133,11 @@ def place_varga(A, B, p, dtime=False, alpha=None):
133
133
134
134
Required Parameters
135
135
----------
136
- A : 2D array
136
+ A : 2D array_like
137
137
Dynamics matrix
138
- B : 2D array
138
+ B : 2D array_like
139
139
Input matrix
140
- p : 1D list
140
+ p : 1D array_like
141
141
Desired eigenvalue locations
142
142
143
143
Optional Parameters
@@ -201,7 +201,7 @@ def place_varga(A, B, p, dtime=False, alpha=None):
201
201
202
202
# Compute the system eigenvalues and convert poles to numpy array
203
203
system_eigs = np .linalg .eig (A_mat )[0 ]
204
- placed_eigs = np .array ( p )
204
+ placed_eigs = np .atleast_1d ( np . squeeze ( np . asarray ( p )) )
205
205
206
206
# Need a character parameter for SB01BD
207
207
if dtime :
@@ -264,9 +264,9 @@ def lqe(A, G, C, QN, RN, NN=None):
264
264
265
265
Parameters
266
266
----------
267
- A, G : 2D array
267
+ A, G : 2D array_like
268
268
Dynamics and noise input matrices
269
- QN, RN : 2D array
269
+ QN, RN : 2D array_like
270
270
Process and sensor noise covariance matrices
271
271
NN : 2D array, optional
272
272
Cross covariance matrix
@@ -292,8 +292,8 @@ def lqe(A, G, C, QN, RN, NN=None):
292
292
293
293
Examples
294
294
--------
295
- >>> K , P, E = lqe(A, G, C, QN, RN)
296
- >>> K , P, E = lqe(A, G, C, QN, RN, NN)
295
+ >>> L , P, E = lqe(A, G, C, QN, RN)
296
+ >>> L , P, E = lqe(A, G, C, QN, RN, NN)
297
297
298
298
See Also
299
299
--------
@@ -324,9 +324,9 @@ def acker(A, B, poles):
324
324
325
325
Parameters
326
326
----------
327
- A, B : 2D arrays
327
+ A, B : 2D array_like
328
328
State and input matrix of the system
329
- poles : 1D list
329
+ poles : 1D array_like
330
330
Desired eigenvalue locations
331
331
332
332
Returns
0 commit comments