rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
Lyapunov.m
2 % LYAPUNOV
3 % Calculate the value of the inverse operator by solving the Lyapunov
4 % equation
5 %
6 % E^T H E + A_X^T H A_X = I_n
7 %
8 % Then gamma = || H ||.
9 %
10 % Andreas Schmidt, 2016
11  methods
12  function data = gen_detailed_data(this, model, model_data, detailed_data)
13  % Store some additional data for the online calculation
14  % Actually, we need nothing!
15  data = {'empty'};
16  end
17 
18  function fn = gen_reduced_data(rmodel, model_data, ...
19  detailed_data, reduced_data)
20  fn = @(rmodel, reduced_data, rbsim) -1;
21  end
22 
23  function gamma = calculate(this, model, model_data, dsim)
24  [E,A,B,~,~,R] = model.assemble(model_data);
25  Y = A - B*inv(R+B'*dsim.Z*dsim.Z'*B)*B'*dsim.Z*dsim.Z'*A;
26  gamma = normest(dlyap( Y', -eye(model.n), [], -E'));
27  end
28 
29  end
30 end
BASE Basis class for the preparation and calculation of gamma Any subclass should also overwrite the...
Implementation of the parametric algebraic Riccati equation.