diff options
author | YanzhenXiangRobotics <xyz000327@gmail.com> | 2023-05-14 11:26:52 +0200 |
---|---|---|
committer | YanzhenXiangRobotics <xyz000327@gmail.com> | 2023-05-14 11:26:52 +0200 |
commit | 91681a67b41ca76ae1b6622722ef900a18f767da (patch) | |
tree | 331896099240a831c6dcf423a636e924ab902d4c | |
parent | ADD: (diff) | |
download | mpc_pe-91681a67b41ca76ae1b6622722ef900a18f767da.tar.gz mpc_pe-91681a67b41ca76ae1b6622722ef900a18f767da.zip |
ADD: pass 28 29
Diffstat (limited to '')
-rw-r--r-- | templates/compute_minRPI.m | 3 | ||||
-rw-r--r-- | templates/compute_tightening.m | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/templates/compute_minRPI.m b/templates/compute_minRPI.m index 37a6dbb..19df517 100644 --- a/templates/compute_minRPI.m +++ b/templates/compute_minRPI.m @@ -18,6 +18,7 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params) n_iter = 0; Hw = params.constraints.DisturbanceMatrix; hw = params.constraints.DisturbanceRHS; + W = Polyhedron('A',Hw,'b',hw); while true omega_last = copy(omega); % display(n_iter) @@ -25,7 +26,7 @@ function [H_tube,h_tube,n_iter] = compute_minRPI(K_tube,params) % b_last = omega.b; display(n_iter); display(omega.b) - omega = omega.plus(Polyhedron('A',Hw*inv(A^(n_iter+1)),'b',hw)); + omega = omega.plus(A^(n_iter)*W); if eq(omega.minHRep(),omega_last.minHRep()) % if eq(omega,omega_last) diff --git a/templates/compute_tightening.m b/templates/compute_tightening.m index 2bf06a4..7095f9c 100644 --- a/templates/compute_tightening.m +++ b/templates/compute_tightening.m @@ -21,8 +21,9 @@ function params = compute_tightening(K_tube,H_tube,h_tube,params) 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(Polyhedron('A',H_tube*K_tube,'b',h_tube)); + + 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 |