|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Go to the source code of this file.
Namespaces | |
| namespace | lqr_motor |
Variables | |
| float | lqr_motor.R = 1.0 |
| float | lqr_motor.L = 0.5 |
| float | lqr_motor.Ke = 0.01 |
| float | lqr_motor.Kt = 0.01 |
| float | lqr_motor.J = 0.01 |
| float | lqr_motor.B = 0.1 |
| lqr_motor.A = np.array([[-R / L, -Ke / L, 0], [Kt / J, -B / J, 0], [0, 1, 0]]) | |
| lqr_motor.C = np.array([[0, 0, 1]]) | |
| lqr_motor.Q = np.diag([10, 1, 100]) | |
| lqr_motor.R_mat = np.array([[0.01]]) | |
| lqr_motor.P = solve_continuous_are(A, B, Q, R_mat) | |
| float | lqr_motor.K = np.linalg.inv(R_mat) @ B.T @ P |
| float | lqr_motor.dt = 0.001 |
| float | lqr_motor.T = 5.0 |
| lqr_motor.N = int(T / dt) | |
| lqr_motor.t = np.linspace(0, T, N) | |
| lqr_motor.x = np.zeros((3, 1)) | |
| float | lqr_motor.r = 1.0 |
| lqr_motor.x_hist = np.array(x_hist) | |
| lqr_motor.u_hist = np.array(u_hist) | |
| float | lqr_motor.u = -K @ x + K[0, 2] * r |
| float | lqr_motor.dx = A @ x + B * u |
| lqr_motor.figsize | |
| lqr_motor.label | |
| lqr_motor.color | |
| lqr_motor.linestyle | |