forked from PreCyseGroup/Data-Driven-ST-MPC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomputeRPI.m
37 lines (28 loc) · 813 Bytes
/
computeRPI.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function T0 = computeRPI(Acl,alpha,W)
% Written: 27-Feb-2023
% Last update:
% Last revision:---
% This function computes RCI set using model parameters based on the
% proposed method in 'Invariant approximations of the minimal robust
% positively invariant set' by Rokovic
%------------- BEGIN CODE --------------
Wa = alpha*W ;
%%calculate the RPI region for polytopes, by fixing alpha, we find the 's'
%%that satisfies the equation (4) in the paper.
for s=1:100
Ws =(Acl^s)*W ;
tf = Wa.contains(Ws);
if tf==1
break
end
end
Fs=W;
for i=1:s-1
Fi = (Acl^i)*W;
Fs = plus(Fs,Fi);
end
%%Refering to equation (5) of the paper, the RPI terminal region is:
al= 1/(1-alpha);
T0 = al *Fs;
end
%------------- END CODE --------------