# Adaptive step-size algorithm for stiff SDE solvers in StochasticDiffEq.jl

**URL:** <https://discourse.julialang.org/t/adaptive-step-size-algorithm-for-stiff-sde-solvers-in-stochasticdiffeq-jl/59785>\
**Category:** Modelling & Simulations\
**Tags:** sde, sciml\
**Created:** [April 22, 2021, 8:24am UTC](https://discourse.julialang.org/t/adaptive-step-size-algorithm-for-stiff-sde-solvers-in-stochasticdiffeq-jl/59785 "2021-04-22T08:24:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvestad10](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alvestad10](https://discourse.julialang.org/u/alvestad10)\
**Post date:** [April 22, 2021, 8:24am UTC](https://discourse.julialang.org/t/adaptive-step-size-algorithm-for-stiff-sde-solvers-in-stochasticdiffeq-jl/59785/1 "2021-04-22T08:24:13Z")

</div>

Could someone point me in the direction of where to find info on how the time-stepping method for stiff SDE solvers is implemented? I am mainly interested in how the ImplicitEM solver does the adaptive stepsize control, which is the scheme I use. The documentation says that it “Uses a 1.0/1.5 heuristic for adaptive time stepping” for the order 0.5 and 1.0 schemes. I guess this is related to the paper: 10.3934/dcdsb.2017133 by Rackauckas et al., which as a physicist not specialized in SDE solvers, cannot see how it can be applied to the ImplicitEM scheme.

I also want to thank the SciML organization and community for all the amazing tools created!!

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 22, 2021, 8:58am UTC](https://discourse.julialang.org/t/adaptive-step-size-algorithm-for-stiff-sde-solvers-in-stochasticdiffeq-jl/59785/2 "2021-04-22T08:58:33Z")

</div>

In [SDE Solvers · DifferentialEquations.jl](https://diffeq.sciml.ai/latest/solvers/sde_solve/), you have `SKenCarp`

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 29, 2021, 1:57pm UTC](https://discourse.julialang.org/t/adaptive-step-size-algorithm-for-stiff-sde-solvers-in-stochasticdiffeq-jl/59785/3 "2021-04-29T13:57:56Z")

</div>

It’s the same time stepping mechanism as the paper you link to, but using Lamba’s error estimator [[math/0601029] An Adaptive Euler-Maruyama Scheme For SDEs: Convergence and Stability](https://arxiv.org/abs/math/0601029) . That trivially extends to implicit EM, and then with rejection sampling with memory [ADAPTIVE METHODS FOR STOCHASTIC DIFFERENTIAL EQUATIONS VIA NATURAL EMBEDDINGS AND REJECTION SAMPLING WITH MEMORY - PMC](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5844583/) you have a full method.
