3 % Class that defines the assemble method which is used by both, the
4 % DetailedModel and the ReducedModel.
6 % Andreas Schmidt, 2016
9 enable_error_estimator =
false;
12 % Additional fields
for basis generation:
13 RB_gamma_mode =
'Kernel';
15 RB_gamma_settings = {};
17 % The number of measurement outputs
19 % The number of control inputs and measurements
28 A = A_comp(this,model_data);
29 B = B_comp(this,model_data);
32 methods(Access=public)
34 function [E,A,B,C,Q,R] = assemble(this, md)
35 % ASSEMBLE Assembles all the data matrices.
36 % This function works for both, the reduced and the
39 A = lincomb_sequence(md.A_comp, this.A_coeff());
40 B = lincomb_sequence(md.B_comp, this.B_coeff());
41 C = lincomb_sequence(md.C_comp, this.C_coeff());
42 E = lincomb_sequence(md.E_comp, this.E_coeff());
43 R = lincomb_sequence(md.R_comp, this.R_coeff());
44 Q = lincomb_sequence(md.Q_comp, this.Q_coeff());
47 function E = mass_matrix(this, md)
48 % MASS_MATRIX Get the mass matrix of the problem
49 % This function is used by the LRFG algorithm for the
50 % orthogonalization procedure
51 Ecoeff = this.E_coeff();
52 E = lincomb_sequence(md.E_comp, Ecoeff);
55 function g = gamma(this, model_data, dsim)
57 % Calculate the value of gamma. This is used by applying
58 % the Lyapunov equation method.
60 calculator =
ARE.GammaCalculation.Lyapunov();
61 g = calculator.gamma(this, model_data, dsim);
64 function R = R_coeff(this)
67 function Q = Q_coeff(this)
70 function E = E_coeff(this)
73 function C = C_coeff(this)
76 function B = B_coeff(this)
80 function R = R_comp(this, model_data)
81 if isempty(this.m), error('Please define the m property'), end
84 function Q = Q_comp(
this, model_data)
85 if isempty(this.p), error('Please define the p property'), end
88 function E = E_comp(
this, model_data)
89 if isempty(this.n), error('Please define the dimension n property'), end
92 function C = C_comp(
this, model_data)
93 C = cellfun(@transpose, this.C_comp());
96 function [T,y,x] = simulate(this, model_data, dsim)
97 % SIMULATE This function simulates the underlying LTI model
98 % If you provide dsim, the closed-loop simulation will be
Abstract OOP model implementation interface.
MODEL Abstract model class.
Implementation of the parametric algebraic Riccati equation.
Customizable implementation of an abstract greedy algorithm.