LIRRA  1.0.0
Loading...
Searching...
No Matches
rl_stl.synthesis.tube Namespace Reference

Classes

class  Tube
 

Functions

Tube disturbance_tube (np.ndarray A, np.ndarray B, np.ndarray K, np.ndarray G, np.ndarray w_bar, int n_max=200, float tail_tol=1e-10)
 
Tube constant_tube (int n, int m, np.ndarray eps_state, int n_max=200)
 
Tube zero_tube (int n, int m, int n_max=200)
 

Detailed Description

Error tubes for nominal tube MPC and interval-STL margins.

The vehicle flies ``u = u_hat_i + K (x - x_hat_i)`` around a nominal plan ``(x_hat, u_hat)``
of ``x+ = A x + B u + G w`` with ``w in W = [-w_bar, w_bar]``. The error
``e = x - x_hat`` then obeys ``e+ = A_K e + G w`` (``A_K = A + B K``) and, starting from
``e_0 = 0``, lies in

    Z(i) = sum_{l < i} A_K^l G W.

Only the interval hull is needed (NAHS Sec. 7.1, ``[x]_{t+i} = x_{t+i} + [Z](i)``):

    hull Z(i) = [-z(i), z(i)],   z(i) = sum_{l < i} |A_K^l G| w_bar,

and for an affine predicate ``a^T y - b`` with ``y = C x`` the interval lower bound is
``a^T C x_hat - b - |a^T C| z(i)``. Inputs are tightened by ``|K A_K^l G| w_bar`` summed the
same way. ``z(i)`` is monotone and, for Schur ``A_K``, converges; :attr:`Tube.z_inf` is an
outer bound of the limit (the geometric tail is added explicitly).

Hulls compose as ``z(a + b) = z(b) + |A_K^b| z(a)`` only as an outer bound; the code
always uses the exact sum ``z(offset + i)``, which is what a plan rooted at a nominal
state whose error tube already has age ``offset`` needs.

:class:`ConstantTube` is the NAHS hardware choice: a constant empirical box ``eps`` on the
output (no ``K``, no ``W``), stated as an assumption on the tracking error.

Function Documentation

◆ constant_tube()

Tube rl_stl.synthesis.tube.constant_tube ( int  n,
int  m,
np.ndarray  eps_state,
int   n_max = 200 
)
NAHS-style constant error box ``eps_state`` for every predicted step ``i >= 1``.

``i = 0`` (the plan root) has zero error. No input tightening (``K`` unknown).

◆ disturbance_tube()

Tube rl_stl.synthesis.tube.disturbance_tube ( np.ndarray  A,
np.ndarray  B,
np.ndarray  K,
np.ndarray  G,
np.ndarray  w_bar,
int   n_max = 200,
float   tail_tol = 1e-10 
)
Tube of ``e+ = (A + B K) e + G w`` for ``|w| <= w_bar`` (componentwise).

◆ zero_tube()

Tube rl_stl.synthesis.tube.zero_tube ( int  n,
int  m,
int   n_max = 200 
)