From 092b76cdd71dab97c2598d0e20d41e60b59996fd Mon Sep 17 00:00:00 2001 From: bnavigator Date: Wed, 30 Dec 2020 00:12:21 +0100 Subject: [PATCH 1/2] fix statefbk docstring and input array type --- control/statefbk.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/control/statefbk.py b/control/statefbk.py index c08c645e9..35192d7f4 100644 --- a/control/statefbk.py +++ b/control/statefbk.py @@ -120,7 +120,7 @@ def place(A, B, p): raise ControlDimension(err_str) # Convert desired poles to numpy array - placed_eigs = np.array(p) + placed_eigs = np.atleast_1d(np.squeeze(np.asarray(p))) result = place_poles(A_mat, B_mat, placed_eigs, method='YT') K = result.gain_matrix @@ -201,7 +201,7 @@ def place_varga(A, B, p, dtime=False, alpha=None): # Compute the system eigenvalues and convert poles to numpy array system_eigs = np.linalg.eig(A_mat)[0] - placed_eigs = np.array(p) + placed_eigs = np.atleast_1d(np.squeeze(np.asarray(p))) # Need a character parameter for SB01BD if dtime: @@ -292,8 +292,8 @@ def lqe(A, G, C, QN, RN, NN=None): Examples -------- - >>> K, P, E = lqe(A, G, C, QN, RN) - >>> K, P, E = lqe(A, G, C, QN, RN, NN) + >>> L, P, E = lqe(A, G, C, QN, RN) + >>> L, P, E = lqe(A, G, C, QN, RN, NN) See Also -------- From 5a9e4332bab0e59f721ef86b1eb36c0049e09a10 Mon Sep 17 00:00:00 2001 From: bnavigator Date: Wed, 30 Dec 2020 01:32:33 +0100 Subject: [PATCH 2/2] update docstring for statefbk inputs --- control/statefbk.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/control/statefbk.py b/control/statefbk.py index 35192d7f4..1d51cfc61 100644 --- a/control/statefbk.py +++ b/control/statefbk.py @@ -41,7 +41,7 @@ # External packages and modules import numpy as np -import scipy as sp + from . import statesp from .mateqn import care from .statesp import _ssmatrix @@ -59,11 +59,11 @@ def place(A, B, p): Parameters ---------- - A : 2D array + A : 2D array_like Dynamics matrix - B : 2D array + B : 2D array_like Input matrix - p : 1D list + p : 1D array_like Desired eigenvalue locations Returns @@ -133,11 +133,11 @@ def place_varga(A, B, p, dtime=False, alpha=None): Required Parameters ---------- - A : 2D array + A : 2D array_like Dynamics matrix - B : 2D array + B : 2D array_like Input matrix - p : 1D list + p : 1D array_like Desired eigenvalue locations Optional Parameters @@ -264,9 +264,9 @@ def lqe(A, G, C, QN, RN, NN=None): Parameters ---------- - A, G : 2D array + A, G : 2D array_like Dynamics and noise input matrices - QN, RN : 2D array + QN, RN : 2D array_like Process and sensor noise covariance matrices NN : 2D array, optional Cross covariance matrix @@ -324,9 +324,9 @@ def acker(A, B, poles): Parameters ---------- - A, B : 2D arrays + A, B : 2D array_like State and input matrix of the system - poles : 1D list + poles : 1D array_like Desired eigenvalue locations Returns 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