# White noise for 'SDEs with diagonal noise'

**URL:** <https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695>\
**Category:** Modelling & Simulations\
**Tags:** sde\
**Created:** [April 20, 2021, 9:19pm UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695 "2021-04-20T21:19:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 20, 2021, 9:19pm UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/1 "2021-04-20T21:19:18Z")

</div>

dear all,  
I have a SDEs with a stochastic part as a white noise k\*N(0,1).  
Time step is ‘dt’  
Following explanations [here](https://diffeq.sciml.ai/stable/tutorials/sde_example/#Example-2:-Systems-of-SDEs-with-Diagonal-Noise) I don’t get why the white noise is N(0,dt) and not N(0,1/dt), which seems consitent with my results as when using in the sde code k\*dt my outputs make more sense than using k\*1/dt … where am I wrong ??  
Thx !  
Frédéric

---

<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 20, 2021, 10:00pm UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/2 "2021-04-20T22:00:51Z")

</div>

> [@Frederic\_Gilt](#):
>
> Following explanations [here](https://diffeq.sciml.ai/stable/tutorials/sde_example/#Example-2:-Systems-of-SDEs-with-Diagonal-Noise) I don’t get why the white noise is N(0,dt) and not N(0,1/dt), which seems consitent with my results as when using in the sde code k_dt my outputs make more sense than using k_1/dt … where am I wrong ??

What do you mean? It’s just using the standard definition.

---

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 21, 2021, 9:46am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/3 "2021-04-21T09:46:30Z")

</div>

I am trying to represent seismic excitation as input for my SDEs.  
To simplify, this excitation can be represented as a white noise with an intensity of So (m2/s3), the only parameter I know  
For a given time step, the SDE concerned with this white noise is something like  
Mx.. + Cx. + Kx = sqrt(So/dt)\*N(0,1)  
Right part is then, according to explanations for SDEs with Diagonal Noise something like  
du[1] = sqrt(S0/dt)\*N(0,dt)/dt  
results are then unconsitent with experiments, while  
du[1] = sqrt(S0/dt)\*N(0,dt)\*dt  
are !  
Is there something I have missed 🤔 ??  
Thx for the help !  
Frédéric

---

<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 21, 2021, 9:52am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/4 "2021-04-21T09:52:59Z")

</div>

This doesn’t make sense. `Mx.. + Cx. + Kx = sqrt(So/dt)*N(0,1)` that’s not a well-defined equation. What is the behavior as `dt->0`? That diverges to infinite variance in infinitesimal steps!

---

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 21, 2021, 9:56am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/5 "2021-04-21T09:56:07Z")

</div>

dt is fixed in my case, (exactly 10^-2s) 🙂

---

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [April 21, 2021, 9:57am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/6 "2021-04-21T09:57:37Z")

</div>

> [@Frederic\_Gilt](#):
>
> white noise with an intensity of So (m2/s3)

For starters, is this the variance or the standard deviation of the white noise in a step?

---

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 21, 2021, 10:03am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/7 "2021-04-21T10:03:51Z")

</div>

it’s the constant part (intensity) of the spectral density function representing the seismic excitation  
for exemple described in [this paper](https://onlinelibrary.wiley.com/doi/abs/10.1002/eqe.4290241006)  
(I am trying the easiest model, not yet Clough-Penzien )

… so the variance inside a step 🙂

---

<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 21, 2021, 10:11am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/8 "2021-04-21T10:11:54Z")

</div>

But continuous equations don’t have steps, so you can’t define the equation by what happens in a “step”. This is wild.

---

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 21, 2021, 10:16am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/9 "2021-04-21T10:16:40Z")

</div>

yes of course, I was just writing the equation that way for someone to understand the sqrt(So/dt) part as it is the homogenous with an acceleration  
the continuous equation in that case is  
Mx.. + Cx. + Kx = W, with W Gaussian White Noise Process

---

<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 21, 2021, 10:22am UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/10 "2021-04-21T10:22:29Z")

</div>

Then W ~ N(0,dt) or sqrt(dt)\*N(0,1). It seems like what you’re really saying is that your equation is:

```julia
Mx.. + Cx. + Kx = sqrt(S0/1e-4)*W

```

?

---

<div class="post-metadata">

**Author:** ![Frederic\_Gilt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frederic_gilt/32/13807_2.png) [@Frederic\_Gilt](https://discourse.julialang.org/u/Frederic_Gilt)\
**Post date:** [April 21, 2021, 12:55pm UTC](https://discourse.julialang.org/t/white-noise-for-sdes-with-diagonal-noise/59695/11 "2021-04-21T12:55:02Z")

</div>

ok I get it now 😅  
as W~N(0,dt) → sqrt(dt)\*N(0,1) it is clear now why  
sqrt(S0/dt)\*W → sqrt(S0/dt)\*sqrt(dt)\*N(0,1) is working well, and NOT sqrt(S0/dt)\*N(0,1)/sqrt(dt)  
very sorry for this basic question and thx a lot for the help !
