rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
riccati_cost_functional.m
Go to the documentation of this file.
1 function [J, lQ] = riccati_cost_functional(model, model_data, sim)
2 %[J,lQ] = riccati_cost_functional(model, model_data, sim)
3 %
4 % Evaluate the cost functional for the model and for the feedback
5 % information stored in the simulation structure sim.
6 %
7 % This is done by solving a low rank Lyapunov equation:
8 % Y' X E + E' X Y = C' C + E' P B B' P E
9 % where Y = A - B B' P E.
10 %
11 % Andreas Schmidt, 2015
12 [E,A,B,C,x0] = riccati_assemble_system_matrices(model, model_data);
13 Z = sim.Z;
14 
15 Y = A - B*(B'*Z)*(Z'*E);
16 lG = [C; B'*Z*(Z'*E)];
17 lQ = lyap_sgn_fac(Y, lG, E);
18 J = (lQ*(E*x0))'*(lQ*(E*x0));
19 
20 end
function [ J , lQ ] = riccati_cost_functional(model, model_data, sim)
[J,lQ] = riccati_cost_functional(model, model_data, sim)
function [ E , A , B , C , x0 ] = riccati_assemble_system_matrices(model, model_data)
model_data)