---
title: Zonotopic Recursive Least Squares
url: https://www.emergentmind.com/topics/zonotopic-recursive-least-squares
type: topic
---

# Zonotopic Recursive Least Squares

Zonotopic Recursive Least Squares (ZRLS) is a set-theoretic framework for recursive parameter estimation that maintains guaranteed, real-time uncertainty enclosures using zonotopes. Unlike classical recursive least squares (RLS), which propagates a point estimate and covariance, ZRLS produces at each time step a zonotope containing all parameters consistent with the observed data, prior assumptions, and bounded disturbances. ZRLS is particularly suited for online identification in safety-critical and data-driven control, offering robust uncertainty quantification for systems with time-varying and uncertain dynamics, even when only noisy or incomplete model information is available [2509.17058], [2304.01901].

## 1. Mathematical Foundations: Zonotopes and Affine Mapping

A vector zonotope in $\mathbb{R}^n$ is defined as the affine image of the unit $\ell_\infty$ ball:
$$
\mathcal{Z} = \{\, c + G\,\xi \mid \|\xi\|_\infty \leq 1\,\},
$$
where $c \in \mathbb{R}^n$ is the center, and $G \in \mathbb{R}^{n\times\gamma}$ the generator matrix. In the context of ZRLS, the current set-valued uncertainty for the unknown parameter $\theta_{tr,k}$ at time $k$ is represented by a zonotope $\Theta_k = \langle C_k, G_k \rangle$, ensuring $\theta_{tr,k} \in \Theta_k$ for all $k$ [2509.17058].

A crucial property of zonotopes is closure under affine transformation. For $Z = \langle c, G \rangle$ and affine map $x \mapsto Ax + b$, the image is again a zonotope: $A Z + b = \langle Ac + b, AG \rangle$. This property enables the recursive propagation of set-valued parameter enclosures through both continuous-time and discrete-time RLS dynamics [2304.01901].

## 2. Exponentially Forgetting ZRLS Algorithm

The Exponentially Forgetting Zonotopic Recursive Least Squares (EF-ZRLS) algorithm is formulated for a standard linear regression model with time-varying parameters under bounded, zonotopic noise and drift:
$$
y_k = \phi_k \theta_{tr,k} + v_k, \quad \theta_{tr,k} = \theta_{tr,k-1} + \delta\theta_{k-1},
$$
with $v_k$ and $\delta\theta_{k-1}$ modeled as known zonotopes. Key features of the EF-ZRLS workflow include:

**(a) Prediction (Time Update with Forgetting):**  
Existing generators are "aged" by scaling with $\lambda^{-1/2}$ (where $\lambda\in(0,1]$ is the forgetting factor), and the generator corresponding to model drift is appended:
$$
    C_{k|k-1} = (I - K_{k-1}\phi_{k-1}) C_{k-1},
$$
$$
    G_{k|k-1} = [\ \lambda^{-1/2}(I - K_{k-1}\phi_{k-1}) G_{k-1}\ \ |\ G_\theta\ ],
$$
where $G_\theta$ is the generator for parameter drift [2509.17058].

**(b) Correction (Measurement Update):**  
Upon data arrival, the center and generators are updated via:
$$
    C_k = (I - K_k \phi_k) C_{k|k-1} + K_k y_k,
$$
$$
    G_k = [ (I - K_k \phi_k) G_{k|k-1} \ |\ -K_k G_v ],
$$
where $G_v$ is the generator for measurement noise.

**(c) Gain Computation:**  
To minimize zonotope size as measured by the trace of a "covariance" proxy, $P_k = G_k G_k^\top$, the optimal gain $K_k$ is given by
$$
K_k = P_{k|k-1} \phi_k^\top [\phi_k P_{k|k-1} \phi_k^\top + \lambda Q]^{-1},
$$
with $Q = m\sigma_v^2 I$ and $P_{k|k-1} = G_{k|k-1} G_{k|k-1}^\top$.

A pseudocode summary is:

```python
# EF-ZRLS algorithm
for k in 0, 1, ...
    # Prediction
    G_pred = [lambda**(-0.5) * (I - K_prev * phi_prev) * G_prev | G_theta]
    C_pred = (I - K_prev * phi_prev) * C_prev

    # Gain
    P_pred = G_pred @ G_pred.T
    Lambda = phi_k @ P_pred @ phi_k.T + lambda * Q
    K_k = P_pred @ phi_k.T @ np.linalg.inv(Lambda)

    # Correction
    C_k = (I - K_k * phi_k) * C_pred + K_k * y_k
    G_k = [ (I - K_k * phi_k) * G_pred | -K_k * G_v ]

    # Order reduction (optional)
    G_k = zonotope_reduce(G_k, target_order)
```
[2509.17058]

## 3. Set-Membership Guarantees and Error Bounds

ZRLS ensures that the true parameter $\theta_{tr,k}$ always remains within the current zonotope enclosure, provided initial and assumed uncertainty sets are correct. The update
$$
\theta_{tr,k} \in \Theta_k
\implies
\theta_{tr,k+1} \in (I - K_k\phi_k)\Theta_k \oplus K_k\{y_k\} \oplus (-K_k)\langle 0,G_v \rangle \oplus \langle 0,G_\theta \rangle
$$
is justified by set-propagation through affine maps and Minkowski sums. Proposition 3.1 (in [2509.17058]) details the algebraic bounding steps ensuring coverage. The forgetting factor $\lambda$ is chosen to prevent "holes" in generator space, guaranteeing completeness of the enclosure.

## 4. Complexity and Generator Management

A primary computational cost arises as, at each iteration, new generators corresponding to noise and drift are appended, leading to linear growth in zonotope order with the time index. To maintain tractability, a zonotope order-reduction operator $\downarrow_q$ is used, ensuring that
$$
\langle C, G \rangle \subseteq \langle C, \tilde G \rangle,
$$
where $\tilde G$ has a fixed, reduced number of columns $q$. Practical reduction strategies include greedy or principal-component-based merging of small-norm generators (Proposition 4.4 of [2509.17058]). This reduction is essential for embedding ZRLS in real-time safety-critical systems.

## 5. Extensions to Linear Time-Varying and Nonlinear Systems

ZRLS generalizes to discrete-time linear time-varying (LTV) models,
$$
x_{k+1} = A_{tr,k}x_k + B_{tr,k}u_k + w_k,
$$
by stacking $A$ and $B$ into the parameter vector and running EF-ZRLS. The reachable set at each step is then a zonotope
$$
\hat{\mathcal{R}}_{k+1} = \mathcal{A}_k(\hat{\mathcal{R}}_k \times \mathcal{U}_k) \oplus \mathcal{Z}_w \oplus \mathcal{Z}_\epsilon,
$$
where $\mathcal{Z}_w$ and $\mathcal{Z}_\epsilon$ denote process and model mismatch uncertainties [2509.17058].

For nonlinear, Lipschitz systems,
$$
x_{k+1} = f(x_k, u_k) + w_k, \quad f \text{ Lipschitz,}
$$
a local linearization plus zonotopic modeling of the Taylor remainder yields a reachability update similar in spirit, with extra zonotopes capturing modeling error and the global Lipschitz bound.

## 6. Continuous-Time Zonotopic RLS Perspective

An alternative approach considers continuous-time RLS, as in [2304.01901]. Here, the parameter estimate evolves according to:
$$
\dot{\hat\theta}(t) = \Gamma(t) \Phi(t)^\top [Y(t) - \Phi(t) \hat\theta(t)],
$$
$$
\dot{\Gamma}(t) = \beta \Gamma(t) - \Gamma(t) \Phi(t)^\top \Phi(t) \Gamma(t),
$$
where $\Gamma(t)$ evolves as a "quantity of uncertainty." The affine form
$$
\hat\theta(t) = A(t) \hat\theta(0) + b(t)
$$
and the property that
$$
Z_t = \langle \hat\theta(t), \Gamma(t) \rangle
$$
immediately guarantee zonotopic enclosures for the true parameter, without the need for iterative generator stacking.

In continuous and discrete settings, computational cost per update is $O(p^2)$, and the generator count remains fixed.

## 7. Practical Considerations, Insights, and Limitations

- Convergence is guaranteed under a persistent excitation (PE) condition on regressors and for $\lambda$ close to 1, with the zonotope radius reflecting only inevitable drift and noise [2509.17058].
- Proper tuning of $\lambda$ is critical: $\lambda=1$ for static systems, $0.95 < \lambda < 1$ for slow drift. Too small $\lambda$ risks unbounded covariance growth.
- When regressors are uncertain, their uncertainty can be incorporated as an additional generator [2509.17058].
- Benefits over classical set-membership RLS include online operation, efficient order reduction tools, and explicit reachability analysis in presence of both modeling and measurement uncertainties.
- Limitations include potential under-approximation if initial zonotope does not contain the true parameter, the need for manual drift/noise tuning, and the cost of generator management in high-dimensional regimes [2304.01901].

## Summary Table: Comparison of Key ZRLS Attributes

| Attribute                          | EF-ZRLS (2509.17058)                                        | Continuous-Time ZRLS (2304.01901)                       |
|-------------------------------------|-------------------------------------------------------------|---------------------------------------------------------|
| Generator Growth                    | Linear in $k$, requires order reduction                     | Fixed ($q = p$), no growth                             |
| Flexibility (Time-Varying/Nonlinear)| Supports LTV and nonlinear Lipschitz via local linearization| Focused on constant-$\theta$, affine in initial value   |
| Computational Cost                  | $O(p^2)$ per update, plus reduction overhead                | $O(p^2)$ per update                                     |
| Coverage Guarantee                  | Holds if noise/drift assumptions and initial zonotope correct| Holds if initial zonotope contains $\theta$             |
| Direct Reachability Integration     | Yes                                                         | Yes                                                    |

ZRLS, particularly EF-ZRLS, forms the foundation for online, data-driven reachability and robust safety analysis for uncertain and adaptive control systems, marrying classical recursive estimation with modern set-theoretic techniques [2509.17058], [2304.01901].

Source: https://www.emergentmind.com/topics/zonotopic-recursive-least-squares