1 classdef ReducedData < handle
24 model_data = gen_model_data(model);
26 % Get reduced basis matrices
27 V = detailed_data.RB_V;
28 W = detailed_data.RB_W;
32 rd.RB_size = size(W,2);
35 % Computing the components
for the reduced system matrices
36 for k = 1:length(model_data.A_comp)
37 rd.A_comp{k} = W
'*model_data.A_comp{k}*V;
40 for k = 1:length(model_data.B_comp)
41 rd.B_comp{k} = W'*model_data.B_comp{k};
44 for k = 1:length(model_data.C_comp)
45 rd.C_comp{k} = model_data.C_comp{k}*V;
48 for k = 1:length(model_data.E_comp)
49 rd.E_comp{k} = W
'*model_data.E_comp{k}*V;
52 rd.R_comp = model_data.R_comp;
53 rd.Q_comp = model_data.Q_comp;
55 % Computation of components for the matrix B'*B which is
56 % necessary
for checking the stability criterion
59 for i=1:length(model_data.B_comp)
60 for j=1:length(model_data.B_comp)
61 estim.BTB{i,j} = (model_data.B_comp{i})
'*(model_data.B_comp{j});
66 % Components of the parameter separable matrices for the
67 % residual calculation
70 for i = 1:length(model_data.C_comp)
71 for j = 1:length(model_data.C_comp)
72 estim.CCT{i,j} = model_data.C_comp{i}*model_data.C_comp{j}';
77 for i = 1:length(model_data.E_comp)
78 for j = 1:length(model_data.A_comp)
79 estim.WTEATW{i,j} = W
'*model_data.E_comp{i}*model_data.A_comp{j}'*W;
84 for i = 1:length(model_data.E_comp)
85 for j = 1:length(model_data.E_comp)
86 estim.WTEETW{i,j} = W
'*model_data.E_comp{i}*model_data.E_comp{j}'*W;
91 for i = 1:length(model_data.C_comp)
92 for j = 1:length(model_data.A_comp)
93 estim.CATW{i,j} = model_data.C_comp{i}*model_data.A_comp{j}
'*W;
98 for i = 1:length(model_data.A_comp)
99 for j = 1:length(model_data.A_comp)
100 estim.WTAATW{i,j} = W'*model_data.A_comp{i}*model_data.A_comp{j}
'*W;
105 for i = 1:length(model_data.E_comp)
106 for j = 1:length(model_data.C_comp)
107 estim.WTECT{i,j} = W'*model_data.E_comp{i}*model_data.C_comp{j}
';
112 % Components for the matrices which arise when computing the
113 % norm of the closed-loop matrix A_X
116 for i = 1:length(model_data.A_comp)
117 for j = 1:length(model_data.A_comp)
118 estim.traceATA{i,j} = trace(model_data.A_comp{i}'*model_data.A_comp{j});
122 for i = 1:length(model_data.B_comp)
123 for j = 1:length(model_data.A_comp)
124 for k = 1:length(model_data.A_comp)
125 estim.BTAATW{i,j,k} = model_data.B_comp{i}
'*model_data.A_comp{j}*model_data.A_comp{k}'*W;
130 % Frobenius norm of E
for the efficiency bound
132 for i = 1:length(model_data.E_comp)
133 for j =1:length(model_data.E_comp)
134 estim.traceETE{i,j} = trace(model_data.E_comp{i}
'*model_data.E_comp{j});
139 if ~isempty(detailed_data.gamma)
140 rd.gamma_function = detailed_data.gamma_calculation.gen_reduced_data(model, detailed_data, rd);
142 rd.gamma_mode = detailed_data.gamma_mode;
144 if model.RB_closed_loop_norm == 2 | ...
145 strcmp(model.RB_closed_loop_norm, '2
') | ...
146 model.RB_closed_loop_stable == true
147 rd.estim.model_data = model_data;
Implementation of the parametric algebraic Riccati equation.