Skip to content

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)

K property

K: Annotated[NDArray[float64], '[m, n]']

Optimal (Kalman) gain matrix

M property

M: Annotated[NDArray[float64], '[m, n]']

Discrete cross-weighting matrix

Q_hat property

Q_hat: Annotated[NDArray[float64], '[m, n]']

Discrete state weighting matrix

R_hat property

R_hat: Annotated[NDArray[float64], '[m, n]']

Discrete control weighting matrix

S property

S: Annotated[NDArray[float64], '[m, n]']

Steady-state Riccati matrix

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

N property writable

N: int

Number of time steps

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

m property writable

m: int

Number of controls

maxIterations property writable

maxIterations: int

Maximum number of algorithm iterations

n property writable

n: int

Number of states

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)

tolerance property writable

tolerance: float

Absolute tolerance

u_k_ref_0 property writable

u_k_ref_0: list[Annotated[NDArray[float64], '[m, 1]']]

Reference control time series

x0 property writable

x0: Annotated[NDArray[float64], '[m, 1]']

Initial state

SQPOutputs

J property

J: float

Optimal cost

iterations property

iterations: int

Number of iterations to converge (or max iterations if no convergence)

lambda_ property

lambda_: list[Annotated[NDArray[float64], '[m, 1]']]

Optimal costate history

u property

u: list[Annotated[NDArray[float64], '[m, 1]']]

Optimal control history

x property

x: list[Annotated[NDArray[float64], '[m, 1]']]

Optimal state history

SQPType

SQPType(value: SupportsInt)

Members:

iLQR :

SQP :

SQP class-attribute

SQP: SQPType

iLQR class-attribute

iLQR: SQPType

name property

name: str

value property

value: int

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)