3 % This model is the general model
for the riccati type
4 % models
for the linear dynamic system:
6 % E(mu) d/dt x = A(mu)x + B(mu)u
9 % The corresponding
ARE then reads as follows:
10 % A'PE + E'PA - E'PBB'PE + C'C = 0
12 % This function sets the following fields in the model
19 % Andreas Schmidt, 2015
23 % Set the
default fields
for the model:
26 model.set_mu = @set_mu_default;
27 model.get_mu = @get_mu_default;
29 % The decomp_mode flag is used as usual. All data functions should take
31 model.decomp_mode = 0;
36 model.plot_detailed_data = @riccati_plot_solution;
38 model.gen_detailed_data = @riccati_gen_detailed_data;
40 model.reduced_data_subset = @riccati_reduced_data_subset;
44 model.simulate = @riccati_simulate;
45 model.plot_sim_data = @riccati_plot_sim_data;
46 model.plot_handle = @(model,model_data,sim) error(
'Fill plot_handle with contents');
47 model.plot_controlled = 1;
49 % Define the matrices:
50 model.A = @(model,model_data) error(
'set the A(model,model_data) function');
51 model.B = @(model,model_data) error(
'set the B(model,model_data) function');
52 model.C = @(model,model_data) error(
'set the C(model,model_data) function');
56 % Default settings
for the basis building process:
57 model.RB_enable_estimator = 0;
58 model.RB_generation_mode =
'greedy_uniform_fixed';
59 model.RB_extension_mode =
'addmultiple';
60 model.RB_extension_max_per_step = 40;
61 model.RB_samplepoints = 300;
62 model.RB_gamma_mode =
'interpol';
63 model.RB_numintervals = 10;
64 model.RB_o_tol = 1e-6;
65 model.RB_i_tol = 1e-4;
67 %% Auxilliary functions:
68 % Set dummy values
for the E matrix, i.e. it is sparse identity by
default
69 function r = dummy_E(model, model_data)
70 E = @(model,model_data){speye(model.n)};
71 r = eval_affine_decomp(E, @(model) 1, model, model_data);
73 % The
default x0 is a normalized constant vector
74 function r = dummy_x0(model, model_data)
76 if model.decomp_mode < 2
80 r = eval_affine_decomp(@(m,md) {g}, @(model) 1, model, model_data);
function model = riccati_model_default()
This model is the general model for the riccati type models for the linear dynamic system: ...
function sim = riccati_rb_reconstruction(model, detailed_data, rb_sim_data)
Perform a reconstruction of the full dimensional solution.
function reduced_data = riccati_gen_reduced_data(model, detailed_data)
reduced_data = riccati_gen_reduced(model, detailed_data)
function model_data = riccati_gen_model_data(model)
RICCATI_GEN_MODEL_DATA.
function sim_data = riccati_rb_simulation(model, reduced_data)
sim_data = riccati_rb_simulation(model, reduced_data) This function performs a reduced basis simulati...
Implementation of the parametric algebraic Riccati equation.
function sim_data = riccati_detailed_simulation(model, model_data)
sim_data = riccati_detailed_simulation(model, model_data)