function [ztrata omega]=jednoduche_rizeni(system,apriori)
horizont=system.horizont_rizeni;
x_hat=zeros(1,4);
omega=zeros(2,horizont);
ztrata=0;
H=apriori.H;

for i=1:horizont
    u=-simple_control(system,x_hat);
    system.x=get_next(system,system.x,u);
    H=kalman_filter(H,u,system);
    x_hat=H(:,1);
    omega(1,i)=system.x(3);
    omega(2,i)=x_hat(3);
    ztrata= ztrata+u'*system.gamma*u+(system.x-system.x_opt)'*system.ksi*(system.x-system.x_opt);
end
plot()

end