Revision 1249, 0.5 kB
(checked in by zimamiro, 14 years ago)
|
|
Line | |
---|
1 | function realization=generate_realization(apriori,H0,H_tilde,C,regulator_parameters,system) |
---|
2 | |
---|
3 | H=add_Hc_tilde0(H0,apriori,regulator_parameters); % nehlidam pozitivni definitnost ! |
---|
4 | realization=0; |
---|
5 | system.S=zeros(1,3); |
---|
6 | for o=1:regulator_parameters.horizont_simulace |
---|
7 | [best_control system]=simple_control(system,H(:,1)); |
---|
8 | best_control=best_control+interpol(H,H_tilde,C); |
---|
9 | x=H(:,1)+sqrt(diag(H(:,2:5))).*randn(4,1); |
---|
10 | x=get_next(system,x,best_control); |
---|
11 | H=kalman(H,best_control); |
---|
12 | realization=realization+(system.x_opt(3)-)^2; |
---|
13 | end |
---|
14 | end |
---|