# Stochastic filtration problem

**URL:** https://discourse.julialang.org/t/stochastic-filtration-problem/134713
**Category:** Numerics
**Tags:** quantum, diffeq, sde, sciml, differentialequation
**Created:** [December 23, 2025, 7:06pm UTC](https://discourse.julialang.org/t/stochastic-filtration-problem/134713 "2025-12-23T19:06:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ymuv1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ymuv1/32/216814_2.png) [@ymuv1](https://discourse.julialang.org/u/ymuv1)
#### Post date: [December 23, 2025, 7:06pm UTC](https://discourse.julialang.org/t/stochastic-filtration-problem/134713/1 "2025-12-23T19:06:48Z")

</div>

Hi all,

I’m working with a physical system whose state u(t) follows an SDE  
du=f(u,t)dt+g(u,t)dW\_t

The system produces a measured signal Y\_t given by  
dY\_t = h(u,t)dt+dW\_t  
where dW\_t is the same Wiener increment in both equations.

In my experiment I know the initial state u\_0 and I measure Y\_t at discrete times. Using the observation equation, I can formally substitute dW\_t = dY\_t - h(u,t)dt into the equation, giving  
du = f(u,t)dt + g(u,t)\bigl(dY\_t - h(u,t)dt\bigr) = (f(u,t) - g(u,t)h(u,t))dt + g(u,t)dY\_t.

My goal: to numerically propagate u(t) using the measured signal Y(t), ideally with something better than fixed-step Euler–Maruyama.  
Trying to improve the integration method, I ran into two problems:

1. dY\_t is sampled at discrete timesteps. To derive it midstep, we would need to interpolate Y\_t. This may require corrections due to Itô vs. Stratonovich interpretations, which I’m not sure how to derive.
2. I’m not sure how to implement the numerical integration. ODE methods seem inappropriate because dY\_t scales like \sqrt{dt}, not dt. For SDE methods, I need to somehow substitute the innovation term dW\_t = dY\_t - h(u,t)dt as the noise process. I considered defining a custom `AbstractNoiseProcess` that stores the timeseries of Y and derives dW\_t based on that. However, these methods typically require a pseudoprocess dZ which I’m not sure if and how I can similarly emulate.

Any help would be greatly appreciated.

p.s. Extra structure in my equations: f and h are linear in u, while g is quadratic.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [December 23, 2025, 7:13pm UTC](https://discourse.julialang.org/t/stochastic-filtration-problem/134713/2 "2025-12-23T19:13:46Z")

</div>

Have you considered using something like an extended or unscented Kalman filter that supports correlation between process and measurement noise to do this?

If you want to be particular, you could linearize f and g at each time step and sample the covariance matrix \nabla g (\nabla g)^T assuming the linearized dynamics (implemented in [`ControlSystemsBase.c2d`](https://baggepinnen.github.io/LowLevelParticleFilters.jl/dev/discretization/#Covariance-matrices))

Here’s a tutorial that shows how to use one particular filtering package with correlated process and measurement noise

> **[Cross-covariance between dynamics and measurement · LowLevelParticleFilters...](https://baggepinnen.github.io/LowLevelParticleFilters.jl/dev/cross_covariance/)**
>
> Documentation for LowLevelParticleFilters Documentation.
