diff options
Diffstat (limited to 'templates/MPC_TUBE_script.m')
-rw-r--r-- | templates/MPC_TUBE_script.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/MPC_TUBE_script.m b/templates/MPC_TUBE_script.m new file mode 100644 index 0000000..a021cd0 --- /dev/null +++ b/templates/MPC_TUBE_script.m @@ -0,0 +1,15 @@ +p = [0.05, 0.1]; +params = generate_params(); +params = generate_params_z(params); +K_tube = compute_tube_controller(p,params); +[H_tube, h_tube, n_iter] = compute_minRPI(K_tube, params); +params = compute_tightening(K_tube, H_tube, h_tube, params); + +Q = diag([300,0.1]);R = 1;N = 50; +[H_N, h_N] = lqr_maxPI(Q, R, params); + +% MPC_TUBE_obj = MPC_TUBE(Q,R,N,H_N,h_N,H_tube,h_tube,K_tube,params); +matfile = struct("p", p, "K_tube", K_tube, "H_tube", H_tube, "h_tube", h_tube,... + "H_N", H_N, "h_N", h_N, "params_z_tube", params); +save("MPC_TUBE_params.mat", "-struct", "matfile"); + |