Computing a Controller Catalogue

When a winning strategy has been found to a discrete game, the solution needs to be refined to control laws of the form u=Kx+g. One control law is computed for each polytope using linear optimisation.

Computing controllers
%Find a winning strategy
pahs=demopahs2();
dgabs=finddiscgame(pahs);
req=demoreq2();
spec=req2spec(pahs,req);
[win,sol]=finddgsol(dgabs,spec);

%Check if a winning strategy was found
if(win)
   disp('Winning')
   %Compute the controller catalogue
   ctcat=sol2ctrl(pahs,dgabs,sol);
else
   disp('Loosing')
end