---
title: 'Deterministic Sampling in MPC: dsMPPI/dsCEM'
url: https://www.emergentmind.com/topics/deterministic-sampling-dsmppi-dscem
type: topic
---

# Deterministic Sampling in MPC: dsMPPI/dsCEM

Deterministic sampling refers to a class of sampling-based optimal control and trajectory optimization methods in which the stochastic exploration step—typically involving Monte Carlo draws from a distribution—is replaced entirely by a fixed set of optimally chosen, low-discrepancy samples. In modern model predictive control (MPC) frameworks such as Model Predictive Path Integral (MPPI) and the Cross-Entropy Method for MPC (CEM-MPC), deterministic sampling gives rise to algorithms such as deterministic-sampling CEM (dsCEM) and deterministic-sampling MPPI (dsMPPI). These approaches achieve variance reduction, improved sample efficiency, and substantially smoother control policies compared to their randomly sampled counterparts, especially in nonlinear, time-correlated, or low-sample regimes [2601.03893][2510.05706].

## 1. Foundations and Motivation

Standard sampling-based MPC approaches such as MPPI and CEM-MPC estimate optimal control actions by simulating $N$ trajectories through the application of i.i.d. Gaussian noise to a nominal control sequence. However, random sampling exhibits several limitations:

- **Poor support coverage:** Random samples tend to cluster and leave gaps, requiring large N for accurate expectation estimates ("low-discrepancy" is only achieved asymptotically).
- **Chattering and non-smoothness:** Lack of temporal correlation between samples induces jerky control signals, which are undesirable in physical systems.
- **High computational burden:** Large numbers of rollouts are necessary for reliable optimization, challenging real-time applications or embedded deployments [2510.05706].

Deterministic sampling addresses these limitations by precomputing a set of quadrature-like “optimal Dirac points”—called LCD samples (from Localized Cumulative Distributions)—which span the proposal distribution in a uniform, low-discrepancy manner. These samples are then systematically transformed at run-time into the current proposal distribution, enabling more reliable estimation and efficient use of computational resources [2510.05706][2601.03893].

## 2. Deterministic Sampling Construction and Transformation

The deterministic sample design process involves:

- **LCD Construction:** For a reference density $f(x)$ (typically $N(0,I)$), the localized cumulative distribution (LCD) is defined by:
  \[
  F_f(m, b) = \int_{\mathbb{R}^d} K(x; m, b)f(x)dx, \qquad K(x; m, b) = \exp\left(-\frac{\|x-m\|^2}{2b^2}\right)
  \]
  A finite set of $K$ sample points $\{\tilde u_i\}$ is chosen to minimize a Cramér–von Mises–type discrepancy between $f$ and its Dirac mixture approximation $\hat f(x) = \frac{1}{K}\sum_{i=1}^K \delta(x - \tilde u_i)$.

- **Offline Optimization:** These points are solved for by offline gradient-based minimization of the integrated squared difference between $F_f$ and $F_{\hat f}$, producing a deterministic, identity-covariance set with superior uniformity [2510.05706].

- **Runtime Linear Transformation:** The sample set is mapped on-the-fly into the current proposal $\mathcal{N}(\mu^{(t)}, \Sigma^{(t)})$ by $u_i^{(t)} = \mu^{(t)} + L^{(t)} \tilde u_i$. Here, $L^{(t)}$ is the Cholesky factor of $\Sigma^{(t)}$. This step ensures sample points populate the high-probability region of the current search space [2510.05706][2601.03893].

- **Temporal Smoothness:** To induce smooth time evolution in control sequences, a colored-noise prior is used by embedding a Toeplitz correlation matrix $C_\rho$ from a $1/f^\beta$ power spectrum; the sample transformation becomes $\epsilon^{(i)} = \operatorname{diag}(\sigma)A_\rho z^{(i)}_{\text{SN}}$ with colored base samples [2601.03893].

## 3. Detailing dsCEM and dsMPPI Algorithms

### Deterministic Cross-Entropy Method (dsCEM)

In dsCEM, the sample replacement occurs within the iterative CEM-MPC loop:

- **Deterministic sample generation:** $u_i = \mu + L \tilde u_i$ for $i=1,\dots,K$
- **Cost evaluation:** $J_i = \text{simulate\_and\_cost}(x_k, u_i)$
- **Elite selection and update:** next mean and covariance $\mu^{(t+1)}$, $\Sigma^{(t+1)}$ are computed over the $N_e$ lowest-cost samples (elites). Weighted updates or uniform weights are standard.
- **Momentum/adaptive schemes:** Optional momentum averaging and two alternatives for covariance adaptation: fixed temporal correlation with adaptive marginal variances, or full covariance adaptation [2510.05706].

### Deterministic Sampling MPPI (dsMPPI)

dsMPPI integrates these deterministic samples into the path integral (MPPI) framework using exponential soft weights rather than the CEM hard-threshold elite set:

- **Sample transformation:** $\epsilon_j^{(i)} = L_j z_{\text{SN}}^{(i)}$, $u_j^{(i)} = \bar u_j + \epsilon_j^{(i)}$
- **Trajectory simulation and cost:** Each rollout is propagated, computing $S_j^{(i)}$
- **Exponential weighting:** $w_j^{(i)} = \exp[-(S_j^{(i)} - \rho_j)/\lambda_j]$
- **Soft averaging for parameter updates:** The mean and diagonal variance are updated by exponentially weighted averages.
- **Momentum smoothing:** Update $\bar u_{j+1}$ and $\Sigma_{j+1}$ via $\alpha$-weighted smoothing to prevent premature collapse and improve exploration/exploitation trade-offs.
- **Adaptive temperature:** $\lambda_{j+1}$ is adapted based on an effective sample size metric ($\eta_j$) so as to keep importance ratios well-behaved [2601.03893].

Both dsCEM and dsMPPI support alternative variation schemes, such as multi-iteration subsetting (drawing a subset from a larger pool across iterations) and coordinate permutation to increase effective exploration without reintroducing randomness [2601.03893].

## 4. Theoretical Insights and Computational Complexity

Deterministic sampling for MPC confers distinct theoretical benefits:

- **Variance reduction:** Deterministic LCD samples uniformly tile the underlying distribution, minimizing quadrature error relative to i.i.d. sampling. For a fixed computational budget, deterministic methods achieve lower estimation variance and hence require fewer trajectories for equivalent accuracy [2510.05706][2601.03893].
- **Convergence and bias-variance tradeoff:** Momentum-smoothing ($\alpha$) and adaptive temperature tuning ($\lambda$) regulate the update magnitude and ensure stability. dsCEM provides exact moment matching for quadratic costs and linear dynamics [2601.03893].
- **Complexity:** Both dsCEM and dsMPPI maintain $O(j_{\max}NT)$ total runtime per control step, with batch trajectory simulation being predominant. Deterministic sample generation and linear-algebraic updates are negligible relative to forward simulation costs [2601.03893][2510.05706].

## 5. Key Hyperparameters and Tuning Practices

Critical hyperparameters and empirically effective ranges for dsCEM and dsMPPI include [2601.03893]:

| Parameter | Typical Range   | Significance                            |
|-----------|----------------|-----------------------------------------|
| $N$       | 50–300         | # deterministic samples per iteration   |
| $T$       | 10–50          | Horizon length (problem dependent)      |
| $j_{\max}$ | 2–5 (usually 3) | CEM/MPPI inner iterations             |
| $\lambda$ | $\sim$cost   | Inverse temperature; adapt via $\eta$   |
| $\alpha$  | 0.9–0.99       | Momentum for mean/covariance updates    |
| $\beta$   | 0.5–1.5        | Colored-noise exponent for smoothness   |
| $N_{\text{buf}}$ | 1–5     | Buffer size (tracking best rollouts)    |

A frequent guideline: start with $N=100$, $j_{\max}=3$, $\alpha=0.9$, and tune $\lambda$ so that exponential weights are neither too diffuse nor collapsed, monitoring effective sample size $\eta$. For smoothing, set $\beta\in[0.5,1.5]$ [2601.03893].

## 6. Empirical Performance and Comparison

Empirical evaluation on canonical nonlinear control tasks (e.g., cart-pole swing-up, truck backer-upper) demonstrates:

- **Smoother trajectories:** dsMPPI yields ≈30% smoother controls (quantified by cumulative $\sum (\Delta u)^2$) compared to dsCEM and ≈60% compared to classic MPPI. On the cart-pole, smoothness improves from $1.12\times 10^5$ (random MPPI) to $0.42\times 10^5$ (dsMPPI) [2601.03893].
- **Sample efficiency:** dsCEM achieves comparable or lower cumulative cost than iCEM using $N\ll 1000$; e.g., on the mountain car, dsCEM achieves 40% lower cost and 50% smoother inputs at $N=50$ [2510.05706].
- **Computational parity:** These deterministic-sampling methods do not incur extra asymptotic online costs relative to their random-sampling equivalents [2601.03893][2510.05706].

| Method        | Cart-pole Cost | Smoothness  | Truck Cost | Smoothness    |
|---------------|---------------:|------------:|-----------:|--------------:|
| MPPI          |  245.3 ± 12.1  | 1.12e5 ± .10e5 | 162.8 ± 8.4  | 0.48e5 ± .05e5 |
| Iterative MPPI|  198.7 ±  9.3  | 0.83e5 ± .08e5 | 140.2 ± 6.7  | 0.39e5 ± .04e5 |
| dsCEM         |  185.5 ±  8.7  | 0.61e5 ± .05e5 | 131.9 ± 5.4  | 0.31e5 ± .03e5 |
| dsMPPI        |  188.2 ±  9.0  | 0.42e5 ± .03e5 | 133.4 ± 5.9  | 0.28e5 ± .02e5 |

Key findings: dsMPPI and dsCEM match or outperform random-sampling variants both in control cost and input smoothness, with the largest gains in demanding low-sample regimes [2601.03893][2510.05706].

## 7. Extensions, Generalizations, and Limitations

The deterministic-sampling principle is generic and can be transferred between MPPI and CEM approaches, as well as other stochastic sampling-based optimizers. LCD design can also incorporate task-specific priors (e.g. anisotropic variances, stronger colored-noise correlations) [2510.05706][2601.03893].

Known limitations include:

- **Scalability of LCD construction:** The offline computation of the optimal Dirac mixture becomes challenging for high-dimensional spaces, and transforming LCD samples using non-isotropic covariances may degrade optimality.
- **Extension to other sampling schemes:** In the context of direct policy optimization, deterministic sigma-point collocation achieves exact recovery of the LQR solution for linear–quadratic–Gaussian systems and reduces variance for mildly nonlinear cases [2010.08506].

A plausible implication is that direct deterministic-sampling frameworks may further benefit from adaptive Dirac-point generation and online adaptation when operating in high-dimensional or time-varying uncertainty regimes.

---

**References:**
- [2601.03893] Smooth Sampling-Based Model Predictive Control Using Deterministic Samples
- [2510.05706] Sample-Efficient and Smooth Cross-Entropy Method Model Predictive Control Using Deterministic Samples
- [2010.08506] Direct Policy Optimization using Deterministic Sampling and Collocation

Source: https://www.emergentmind.com/topics/deterministic-sampling-dsmppi-dscem