LQRController
constructor(A: Matrix<States, States>, B: Matrix<States, Inputs>, Q: Matrix<States, States>, R: Matrix<Inputs, Inputs>, dt: Double = 0.05)(source)
Parameters
A
The state matrix.
B
The input matrix.
Q
The state cost matrix.
R
The control cost matrix.
dt
The time step for the discrete-time model (your loop time)
constructor(A: Matrix<States, States>, B: Matrix<States, Inputs>, Qelems: Vector<States>, Relems: Vector<Inputs>, dt: Double = 0.05)(source)
Constructs a controller with the given coefficient matrices.
Parameters
A
the state matrix
B
the input matrix
Qelems
the maximum state error for each state dimension
Relems
the maximum control effort for each control input dimension
dt
the time step for the discrete-time model (your loop time)
constructor(plant: LinearModel<States, Inputs, Outputs>, Qelems: Vector<States>, Relems: Vector<Inputs>, dt: Double = 0.05)(source)
Constructs a controller with the given plant model and cost matrices.
Parameters
plant
the plant model
Qelems
the maximum state error for each state dimension
Relems
the maximum control effort for each control input dimension
dt
the time step for the discrete-time model (your loop time)