---
title: Quadratic Extended Kalman Filter
url: https://www.emergentmind.com/topics/quadratic-ekf-qekf
type: topic
---

# Quadratic Extended Kalman Filter

The Quadratic Extended Kalman Filter (QEKF) is a class of Gaussian state–space filtering algorithms that generalizes the classical Extended Kalman Filter by incorporating a quadratic, rather than merely linear, approximation of the conditional mean estimator. Utilizing second-order Taylor expansions of the measurement map, the QEKF retains the recursive, prediction-update structure of standard Kalman-type filters while systematically modeling curvature arising from nonlinear measurement functions. This results in a quadratic estimator of the minimum mean square error (MMSE) map from measurements to states, capturing features of the estimation problem overlooked by linear approximations [2506.06256].

## 1. Problem Formulation and Notation

Consider the discrete-time, nonlinear state-space model:
\[
\begin{align*}
x_k &= f(x_{k-1}) + w_{k-1}, & w_{k-1} \sim \mathcal{N}(0, Q_{k-1}) \\
z_k &= h(x_k) + v_k, & v_k \sim \mathcal{N}(0, R_k)
\end{align*}
\]
where \(x_k \in \mathbb{R}^n\) (state), \(z_k \in \mathbb{R}^m\) (measurement), \(w_{k-1}\), \(v_k\) are independent Gaussian noises with given covariances. Key notations include:
- \( x_{k|k-1} := \mathbb{E}[x_k | z_{1:k-1}] \)
- \( P_{k|k-1} := \mathrm{Cov}[x_k | z_{1:k-1}] \)
- \( x_{k|k} := \mathbb{E}[x_k | z_{1:k}] \)
- \( P_{k|k} := \mathrm{Cov}[x_k | z_{1:k}] \)
These quantities respectively represent the posterior and prior state means/covariances.

## 2. Second-Order Expansion and Quadratic Approximation

Standard EKF approaches linearize the measurement map \(h(x)\) at \(\mu := x_{k|k-1}\), but the QEKF carries the expansion to second order:
\[
h_r(x) \approx h_r(\mu) + H_r \delta x + \frac{1}{2} \delta x^\top H_r^{(2)} \delta x
\]
for each measurement component \(r=1,\dots,m\), where \(H_r = \nabla h_r(\mu)\) and \(H_r^{(2)}\) is the Hessian of \(h_r\) at \(\mu\). These are assembled into
- \( H \in \mathbb{R}^{m \times n} \), the Jacobian matrix,
- \( H^{(2)} \), a third-order tensor of Hessians.

The predicted measurement mean, carrying a Hessian-trace correction, is given by:
\[
\hat{z}_k \approx h(\mu) + \frac{1}{2} \mathrm{tr}[H^{(2)} P_{k|k-1}]
\]
This explicitly incorporates the local curvature of the measurement function, a key distinction from EKF.

## 3. QEKF Update: Innovations and Augmented Gain

The QEKF update generalizes the Kalman update by including both first- and second-order innovations and their cross-moments. The core steps are:

- **Innovation vectors**:
  - \( \delta z = z_k - \hat{z}_k \)
  - \( \delta z^{[2]} = \mathrm{vec}(\delta z \delta z^\top) \)
- **Central moments**:
  - Third-order state central moment \( S_{xxx} = \mathbb{E}[\delta x \otimes (\delta x \delta x^\top)] \)
  - Fourth-order kurtosis tensors for state and measurement noise

Augmented cross-covariances and measurement covariances are assembled:
\[
\begin{bmatrix}
P_{xz} & P_{xz^{[2]}}
\end{bmatrix}, \quad
\begin{bmatrix}
P_{zz} & P_{zz^{[2]}} \\
P_{z^{[2]}z} & P_{z^{[2]}z^{[2]}}
\end{bmatrix}
\]

The augmented Kalman gain and state update become:
\[
\begin{align*}
K &= P_{x\mathcal{Y}} P_{\mathcal{YY}}^{-1} \\
x_{k|k} &= x_{k|k-1} + K \begin{bmatrix} \delta z \\ \delta z^{[2]} - \mathrm{vec}(P_{zz}) \end{bmatrix} \\
P_{k|k} &= P_{k|k-1} - K P_{\mathcal{YY}} K^\top
\end{align*}
\]
where all “measurement-related” terms now account for both expectation and covariance up to quadratic order.

## 4. Relation to the Ordinary EKF

The EKF is recovered as the special case where only first-order (Jacobian-based) terms are retained:
- Predicted mean: \( \hat{z}_k^{(\mathrm{EKF})} = h(\mu) \)
- Innovation covariance: \( S^{(\mathrm{EKF})} = H P H^\top + R \)
- Kalman gain: \( K^{(\mathrm{EKF})} = P H^\top [ HPH^\top + R ]^{-1} \)

In contrast, the QEKF adds:
- A trace correction \( \frac{1}{2} \mathrm{tr}[H^{(2)} P] \) in predicted mean,
- State–measurement cross-covariances involving higher-order terms,
- Quadratic innovation \( \delta z^{[2]} \),
- Contributions from third/fourth central moments.

This enables the QEKF to approximate the true conditional mean \( \mathbb{E}[x|z] \) with a parabolic estimator, reducing bias especially for regimes where \(h\) is strongly nonlinear or the noise is non-Gaussian.

## 5. Algorithmic Realization

A stepwise outline for the QEKF update is as follows:

| Step | Action |
|------|--------|
| 1 | **Prediction**: \( \hat{x}_{k|k-1} = f(\hat{x}_{k-1|k-1}) \), \( F = \partial f/\partial x \), \( P_{k|k-1} = F P_{k-1|k-1} F^\top + Q \) |
| 2 | **Linearization and Hessians**: \( \mu = \hat{x}_{k|k-1} \), \( H = \partial h/\partial x \), Hessians \( H_r^{(2)} \) for all \( r \) |
| 3 | **Predicted measurement**: \( \hat{z}_k = h(\mu) + \frac{1}{2} \mathrm{tr}[H^{(2)} P_{k|k-1}] \) |
| 4 | **Innovations**: \( \delta z = z_k - \hat{z}_k \), \( \delta z^{[2]} = \mathrm{vec}(\delta z \delta z^\top) \) |
| 5 | **High-order moments**: Compute \( S_{xxx} \), \( K_{xxxx} \) as needed |
| 6 | **Augmented covariances**: Form all required cross- and self-covariance blocks |
| 7 | **Kalman gain and update**: Compute \( K \), update \( \hat{x}_{k|k} \), \( P_{k|k} \) |

Numerical studies demonstrate that the QEKF achieves markedly lower estimation error under nonlinear measurement mappings and/or non-Gaussian noise [2506.06256].

## 6. Benefits, Limitations, and Generalizations

### Benefits
- The QEKF yields a quadratic estimator for the MMSE map, rather than a linear one.
- Incorporating Hessian-trace terms and higher-order cross-moments systematically reduces bias in the state estimates, especially when \(h\) is strongly nonlinear or noise is non-Gaussian.

### Limitations
- Second derivatives of \(h\) and third/fourth central moments are required, increasing coding and computational complexity.
- If the prior is strictly Gaussian (vanishing skewness), the QEKF reduces to the EKF, since the quadratic gain vanishes.

### Generalizations
- The quadratic update can be generalized to other Gaussian-based filters. For the Quadratic Unscented Kalman Filter (QUKF), steps for linearization and moment calculation are replaced by sigma-point evaluation.
- The framework extends to cubic and higher-order polynomial estimators by propagating even higher derivatives and moments, at increased computational cost.

## 7. Summary and Outlook

The QEKF extends the EKF by embedding second-order curvature information into every measurement-related term, thereby effectuating a higher-fidelity, parabolic mapping from measurement to state. Its structure facilitates systematic bias reduction in high-curvature regimes, retains the familiar Kalman recursion, and offers a template for further higher-order estimator development. These features suggest its relevance for advanced nonlinear filtering applications where the limitations of linear estimators are significant [2506.06256].

Source: https://www.emergentmind.com/topics/quadratic-ekf-qekf