diff options
author | Nao Pross <np@0hm.ch> | 2023-05-24 16:50:06 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2023-05-24 17:03:43 +0200 |
commit | 1f12e47e6d1fe8b365806aa0b42de237970d53bf (patch) | |
tree | ba9c739eb170397a7b7a9303e3ea7d1a03a94844 /templates/compute_tightening.m | |
parent | Take deliverables for soft contraints from yuanxu (diff) | |
download | mpc_pe-1f12e47e6d1fe8b365806aa0b42de237970d53bf.tar.gz mpc_pe-1f12e47e6d1fe8b365806aa0b42de237970d53bf.zip |
Take deliverables for Robust MPC from yanzhen
According to table 12
- generate_disturbances
- simulate_uncertain
- compute_tube_contorller
- compute_minRPI
- compute_tightening
- MPC_TUBE
- MPC_TUBE/eval (contained in MPC_TUBE.m)
- MPC_TUBE_script (and its output MPC_TUBE_params.mat)
Diffstat (limited to '')
-rw-r--r-- | templates/compute_tightening.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/compute_tightening.m b/templates/compute_tightening.m index 8919d12..7095f9c 100644 --- a/templates/compute_tightening.m +++ b/templates/compute_tightening.m @@ -8,4 +8,22 @@ function params = compute_tightening(K_tube,H_tube,h_tube,params) % YOUR CODE HERE + Hx = params.constraints.StateMatrix; + hx = params.constraints.StateRHS; + + Hu = params.constraints.InputMatrix; + hu = params.constraints.InputRHS; + + Pxz = Polyhedron('A',Hx,'b',hx); + Puz = Polyhedron('A',Hu,'b',hu); + % Ptube = Polyhedron('A',H_tube,'b',h_tube); + + Px_tube = Pxz.minus(Polyhedron('A',H_tube,'b',h_tube)); + params.constraints.StateMatrix = Px_tube.A; + params.constraints.StateRHS = Px_tube.b; + + Pu_tube = Puz.minus(K_tube*Polyhedron('A',H_tube,'b',h_tube)) +% Pu_tube = Puz.minus(Polyhedron('A',H_tube*K_tube,'b',h_tube)); + params.constraints.InputMatrix = Pu_tube.A; + params.constraints.InputRHS = Pu_tube.b; end
\ No newline at end of file |