4 % Calculate the norm of the inverse Lyapunov
operator for the RB
5 % approximation. This can be done in several ways, depending on the field
6 % reduced_data.estim.gamma.mode which is directly copied from
9 % interpol: use an interpolation based calculation of the constant
10 % kernel_interpolation: kernel interpolation based approximation
11 % exponential_bound: use an exponential bound to calculate the constant
13 % Andreas Schmidt, 2015
14 if ~isfield(reduced_data.estim,
'gamma')
19 if strcmp(reduced_data.estim.gamma.mode, 'interpol')
20 gamma = reduced_data.estim.gamma.interpolant(get_mu(model)');
21 elseif strcmp(reduced_data.estim.gamma.mode, 'kernel_interpolation')
22 % Get the kernel weights and the kernel
23 alpha = reduced_data.estim.gamma.alpha;
24 k = riccati_kernel_functions(model, reduced_data.estim.gamma.kernel);
25 mus = reduced_data.estim.gamma.interpol_mus;
30 for j = 1:length(alpha)
31 gamma = gamma + alpha(j)*k(mu(:)', mus(j,:));
33 elseif strcmp(reduced_data.estim.gamma.mode, 'exponential_bound')
34 % TODO: Make me fast!!!
35 model_data = gen_model_data(model);
38 nu = eigs((A+A'), E, 1, 'sm')/2;
39 n = normest(E\(B*B'*reduced_data.RB*sim_data.PN*reduced_data.RB'*E));
41 gamma = -reduced_data.estim.normEInv^2/2/(nu+n);
44 warning('The gamma approximation mode is not known')
function gamma = riccati_rb_gamma(model, reduced_data, sim_data)
[gamma] = riccati_rb_gamma(model, reduced_data, sim_data)
function [ E , A , B , C , x0 ] = riccati_assemble_system_matrices(model, model_data)
model_data)