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