## Data structuresThe PAHS Control toolbox uses a few basic datastructures. The data structures describe: Affine system on a polytope/simplex Hybrid game automata (non-deterministic PAHS) Discrete Equivalents of affine systems Discrete game abstractions of HGA Requirements and specifications for PAHS and discrete games Control catalogue implementing a winning strategy
Polytope with affine system
% s is the polytope s.dim=N % The dimension of the statespace s.vertices={} % Lists the vertices of the polytope % are vectors denominating the vertices of the state space polytope s.facet{}.vertices={} % Specifying the facets as a function of the vertices % denotes a facet and are indices into the list of vertices, % indicating the vertices of facet s.facet{}.opposit= %A vertex opposit the facet % #$j_{o}$ is a vertex opposit facet $j$ i.e. any vertex of s not in % s.facet{}. s.input % A substructure describing the polytopic input space for s s.input.dim=m % The dimension of the input space s.input.vertices={,ldots } % The vertices of the input space % are vectors denoting the vertices of the input space s.input.facet{}.vertices={}; % A facet of the input space s.input.facet{}.opposit= % A vertex not in facet j s.dynamics % Sub structure describing the dynamics acting on s % Dynamics are on the form s.dynamics.A= % The autonomous dynamics s.dynamics.B= % The input dynamics s.dynamics.C= % The affine dynamics Piecewise-Affine Hybrid System
%PAHS is a Piecewise-Affine Hybrid System %A PAHS consists of a number of modes pahs.mode{}= % The mode of the PAHS % Each mode has a number of substructures mode.dynamics=dyn %Mode wide dynamics (not mandatory) % Common dynamics shared between all polytopes of the mode mode.input=input %Mode wide input (not mandatory) % Common input shared between all polytopes of the mode %Cell Array of locations mode.loc{}= % is the location of the mode %each location, $q_{i,j}$ (loc) is described as: loc{}.s % an affine system on a polytope loc{}.bord=[] % is an array of indices, one for each facet of loc.s, % denoting neigboring locations to that facet. % If empty there is no defined neighbor to the facet. mode.trans{} % Cell array of transitions starting from this mode % Each transitions is described by its destination and controllability trans{}.dest= %Destination mode of the transition trans{}.ctrb= % Boolean describing the controllability of the transition, if true the transition is controllable. pahs.samepart %Boolean hint set to true if identical partitions is used in all modes The discrete equivalent data structure
% de is the discrete equivalent de.blockset= % The blockable set % is a vector of facet indices de.exits= % Possible exit facet vector % is a vector of facet indices de.exit{j}.testVec= % The test vector used for facet j de.block.testVec= % Test vector used for the case of all facets blocked The discrete abstraction data structure
% dgabs is a discrete game abstraction dgabs.maxfacet= % this is the maximum number of facets of in any of the modes mode.trans{} % Cell array of transitions starting from this mode % Each transitions is described by its destination and controllability trans{}.dest= %Destination mode of the transition trans{}.ctrb= % Boolean describing the controllability of the transition, if true the transition is controllable. dgabs.mode{}= %is the abstraction of mode mode.da{}= % is the abstraction of location in mode . da{}.des{}=de % is a cell array of discrete equivalents of the location da{}.numfacets= % is the number of facets of the location da{}.bord=[] %bordering locations identical to the pahs definition % is an array of indices, one for each facet of loc.s, % denoting neigboring locations to that facet. % If empty there is no defined neighbor to the facet. da{}.trans{}=[] % is a cell array of arrays (one for each ) % The array contains indices $l_k$ specifying which locations in the destination mode of % can be reached by from the discrete abstraction of . Specifications can be generated from requirements using Requirements and Specifications
%req is a requirement specification and are polytopes. %initial set req.init{} % Cell array of initial set polytopes. Each cell contains a polytope init{}.poly= % Polytope describing an initial set init{}.modes=[] % An array of modes the polytope is valid in %goal set req.goal{} % Cell array of goal set polytopes. Each cell contains a polytope goal{}.poly= % Polytope describing a goal set goal{}.modes=[] % An array of modes the polytope is valid in %avoid set req.avoid{} % Cell array of avoid set polytopes. Each cell contains a polytope avoid{}.poly= % Polytope describing an avoid set avoid{}.modes=[] % An array of modes the polytope is valid in %The specification on the dgabs is very similar to the requirements %Here only the initial set specification is shown. %Initial set req.init{} % Cell array of inital sets init{}.loc= % An initial location init{}.modes=[] % An array of modes for the initial location %NB: Having more than one mode in the array mostly makes sense for problems where the %modes share a partition. |