-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMRPI_Par.m
More file actions
35 lines (28 loc) · 990 Bytes
/
MRPI_Par.m
File metadata and controls
35 lines (28 loc) · 990 Bytes
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
%% Maximal RPI Set Computation for parametric uncertainty
% Monimoy Bujarbaruah
function P = MRPI_Par(mat_set, X, U, W)
% computation of a robust invariant set for given LTImodel.
maxIterations = 100;
X0 = X; % initial set constraint
for j = 1:maxIterations
% subtract noise
S = X0 - W;
for i = 1: size(mat_set,3) % for ALL models
model = LTISystem('A',mat_set(:,:,i));
% backward reachable set
Rm(i) = model.reachableSet('X', S, 'U', U,...
'direction', 'backward');
end
R = Rm(1);
for i = 2:size(mat_set,3)
R = intersect(R,Rm(i)); % take COMMON parts
end
% intersect with the state constraints
P = R.intersect(X0);
if P==X0
break
else
X0 = P;
end
end
end