control_scheme_DLI_freestate: Discrete Linear Time-Invariant Free Final State Classic...

Description Usage Arguments Value References Examples

View source: R/control_traj.R

Description

Given a system dynamics A, control input matrix B, final state weighting matrix S, intermediate state weighting matrix sequence Q_seq, and cost matrix sequence R_seq, calculates the Kalman gain sequence to minimize the LQR by time t_max. See section 2.2 of \insertCitelewisOptimalControl2012netcontrol for details.

Usage

1
control_scheme_DLI_freestate(t_max, A, B, S, Q_seq, R_seq)

Arguments

t_max

Required. An integer total number of time points to determine the trajectory over

A

Required. A p x p matrix of system coefficients

B

Required. A p x q matrix of control weights

S

A p x p final state weighting matrix

Q_seq

A list of t p x p intermediate state weighting matrices or a single p x p intermediate state weighting matrix

R_seq

A list of t q x q intermediate cost matrices or a single q x q cost matrix

Value

A list containing an entry labeled gain_seq containing either 1 or t_max - 1 Kalman gain matrices and an entry labeled cost_func which contains a LQR function.

References

\insertRef

lewisOptimalControl2012netcontrol

Examples

1
2
3
4
5
6
7
8
A = matrix(c(0,-3,-2,2,-2,1,-1,2,-1), 3,3)

#Normalize rows to sum to 1
A = solve(diag(rowSums(A))) %*% A

B = S = Q_seq = R_seq = diag(3)

CS = control_scheme_DLI_freestate(100, A, B, S, Q_seq, R_seq)

netcontrol documentation built on March 26, 2020, 7:25 p.m.