|
| tuple[np.ndarray, np.ndarray] | _normalise (np.ndarray H, np.ndarray g) |
| |
| Polygon|None | polygon_from_halfspaces (np.ndarray H, np.ndarray g) |
| |
| Polygon | polygon_from_points (np.ndarray points) |
| |
| Polygon|None | intersect (Polygon p, Polygon q) |
| |
| tuple[float, float] | input_interval (np.ndarray A, np.ndarray B, np.ndarray x, Polygon P, float u_lo, float u_hi) |
| |
| Polygon | pre_set (np.ndarray A, np.ndarray B, Polygon P, float u_lo, float u_hi) |
| |
| Polygon|None | max_control_invariant (np.ndarray A, np.ndarray B, Polygon region, float u_lo, float u_hi, int max_iter=500) |
| |
| None | verify_invariant (np.ndarray A, np.ndarray B, Polygon P, float u_lo, float u_hi, float tol=1e-7) |
| |
| dict[str, AxisBlock] | axis_blocks (DiscreteLinearModel model, dict[str, tuple[tuple[int, int], int]] spec, float tol=1e-10) |
| |
| TerminalSet | patrol_terminal_set (DiscreteLinearModel model, dict[str, AxisBlock] blocks, tuple[str, str] plane, float c_out, np.ndarray x_lo, np.ndarray x_hi, np.ndarray u_lo, np.ndarray u_hi, dict[str, int] position_index) |
| |
Verified terminal sets (persistently feasible sets) for the NAHS patrol formulas.
Construction (NAHS Prop. 6 with Prop. 8's "commit to one disjunct"): ``S^c`` is the union of
four half-planes (faces) ``px >= c``, ``px <= -c``, ``py >= c``, ``py <= -c``. For each face
``f`` a set ``Q_f`` is built that is **control invariant for the nominal dynamics** under
the tightened state/input constraints and lies inside the face. A plan whose last ``b``
nominal states lie in one ``Q_f`` can be extended forever by the terminal controller
without leaving ``Q_f``; for theta (``b = 1``) and phi (``b = hG + 1``) every later window
then contains the outside samples it needs (see ``rl_stl.stl.nahs.PatrolTask.terminal_block``).
Decomposition. All synthesis models used here are, at the linearisation point, a product of
decoupled 2-state axis blocks driven by one input each (double integrator ``(p, v)`` per
axis; the blimp's ``(v, p)`` lateral, vertical and yaw blocks, whose inputs also excite
roll/pitch states that feed back into nothing). With a box input set the product of
per-axis control invariant polygons is control invariant for the full model. Every block's
decoupling is checked numerically (:func:`axis_blocks`).
Per axis the maximal control invariant subset of a polygon is computed by the standard
iteration ``Omega <- Omega cap Pre(Omega)`` and **verified** afterwards: every vertex of the
result has an admissible input mapping it back into the set (sufficient for convex sets).