rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
riccati_validity_bound.m
Go to the documentation of this file.
1 function [bound,valid] = riccati_validity_bound(model, reduced_data, rbsim)
2 %function [bound,valid] = riccati_estim_validity_bound(model, reduced_data,
3 % rbsim)
4 %
5 % This function performs a check, whether the validity bound for the
6 % application of the error estimator is valid.
7 %
8 % This is done by checking the inequality
9 %
10 % 8 gamma^2 \|E\|^2 \|B\|^2 \| R \| <= 1
11 %
12 % This function also takes care of performance improvements, when the
13 % matrices E,B are not parameter dependent.
14 %
15 % Andreas Schmidt, 2015
16 %
17 
18 if ~isfield(rbsim.estim, 'gamma')
19  error('The field rbsim.gamma must be present!')
20 end
21 if ~isfield(rbsim, 'P_residual')
22  error('The field rbsim.P_residual must be present')
23 end
24 
25 model.decomp_mode = 2;
26 Ecoeff = model.E(model, reduced_data);
27 if length(Ecoeff) > 1
28  error('Q_E > 1 currently not implemented.');
29 end
30 normE2 = (reduced_data.estim.normE*Ecoeff(1))^2;
31 
32 Bcoeff = model.B(model, reduced_data);
33 if reduced_data.estim.normBBT_use2norm
34  normBBT = (reduced_data.estim.normBBT*abs(Bcoeff(1)))^2;
35 else
36  normBBT = 0;
37  for i = 1:length(Bcoeff)
38  for j = 1:length(Bcoeff)
39  for k = 1:length(Bcoeff)
40  for l = 1:length(Bcoeff)
41  normBBT = normBBT + Bcoeff(i)*Bcoeff(j)*Bcoeff(k)* ...
42  Bcoeff(l)*reduced_data.estim.normBBT{i,j,k,l};
43  end
44  end
45  end
46  end
47 end
48 
49 bound = 8*rbsim.estim.gamma^2*rbsim.P_residual*normE2*normBBT;
50 valid = bound <= 1;
51 end
function [ bound , valid ] = riccati_validity_bound(model, reduced_data, rbsim)
rbsim)