spaceteams.SC_Compute_Server.math.optimal
¶
SDROutputs
¶
Ad
property
¶
Ad: Annotated[NDArray[float64], '[m, n]']
Discrete state-to-state transformation matrix
Bd
property
¶
Bd: Annotated[NDArray[float64], '[m, n]']
Discrete control-to-state transformation matrix
E
property
¶
E: Annotated[NDArray[complex128], '[m, 1]']
Eigenvectors of A-B*K (for stability analysis)
SQPInputs
¶
SQPInputs()
H_u
property
writable
¶
H_u: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, 1]']]
Gradient of the Hamiltonian (or Lagrangian) with respect to the control
H_uu
property
writable
¶
H_uu: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Hessian of the Hamiltonian (or Lagrangian) with respect to the control
H_x
property
writable
¶
H_x: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, 1]']]
Gradient of the Hamiltonian (or Lagrangian) with respect to the state
H_xu
property
writable
¶
H_xu: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Hessian of the Hamiltonian (or Lagrangian) with respect to the state and control
H_xx
property
writable
¶
H_xx: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Hessian of the Hamiltonian (or Lagrangian) with respect to the state
cost
property
writable
¶
cost: Callable[[Sequence[Annotated[ArrayLike, float64, '[m, 1]']], Sequence[Annotated[ArrayLike, float64, '[m, 1]']]], float]
Cost function (performance index), with args (x_k, u_k) for k = 0,...,N-1, and x_k goes one more to k = N
costateEOM
property
writable
¶
costateEOM: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, 1]']]
Difference equation for λ: λ_k = f(x_k, u_k, λ_k+1)
f_u
property
writable
¶
f_u: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Gradient of the (nonlinear) state equation with respect to the control
f_x
property
writable
¶
f_x: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Gradient of the (nonlinear) state equation with respect to the state
phi_x
property
writable
¶
phi_x: Callable[[Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, 1]']]
Gradient of the terminal state cost w.r.t. the terminal state
phi_xx
property
writable
¶
phi_xx: Callable[[Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, n]']]
Hessian of the terminal state cost w.r.t. the terminal state
sqp_type
property
writable
¶
sqp_type: SQPType
Type of problem: SQP (full Hamiltonian) or iLQR (Lagrangian-only)
stateEOM
property
writable
¶
stateEOM: Callable[[Annotated[ArrayLike, float64, '[m, 1]'], Annotated[ArrayLike, float64, '[m, 1]']], Annotated[NDArray[float64], '[m, 1]']]
Difference equation for x: x_k+1 = f(x_k, u_k)
u_k_ref_0
property
writable
¶
u_k_ref_0: list[Annotated[NDArray[float64], '[m, 1]']]
Reference control time series
SQPOutputs
¶
iterations
property
¶
iterations: int
Number of iterations to converge (or max iterations if no convergence)
SQPType
¶
SQPType(value: SupportsInt)
SDR
¶
SDR(A: Annotated[ArrayLike, float64, '[m, n]'], B: Annotated[ArrayLike, float64, '[m, n]'], Q: Annotated[ArrayLike, float64, '[m, n]'], R: Annotated[ArrayLike, float64, '[m, n]'], Ts: SupportsFloat, epsilon: SupportsFloat = 1e-06) -> SDROutputs
Calculates the optimal gains for a Sampled Data Regulator (SDR), the discrete-time version of the Linear Quadratic Regulator (LQR)
SDR_Impulsive
¶
SDR_Impulsive(A: Annotated[ArrayLike, float64, '[m, n]'], B: Annotated[ArrayLike, float64, '[m, n]'], Q: Annotated[ArrayLike, float64, '[m, n]'], R: Annotated[ArrayLike, float64, '[m, n]'], Ts: SupportsFloat, epsilon: SupportsFloat = 1e-06) -> SDROutputs
Calculates the optimal gains for an impulsive Sampled Data Regulator (SDR)
SQP
¶
SQP(inputs: SQPInputs) -> SQPOutputs
Given an initial trajectory, calculates an optimal trajectory and control history using Sequential Quadratic Programming (SQP)