MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: White Noise in Simulation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103615] Re: [mg103576] Re: White Noise in Simulation
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Wed, 30 Sep 2009 05:01:05 -0400 (EDT)
  • References: <h9p69i$vu$1@smc.vnet.net> <200909291136.HAA25463@smc.vnet.net>

SlipperyWeasel wrote:
> On Sep 27, 10:16 pm, SlipperyWeasel <slipperywea... at gmail.com> wrote:
>> I am trying to add random noise to a function inside an NDSolve
>> function.  Is there a good way to add a "noise function" in my model?
> 
> for example, my system is:  x'[t] == x[t] + Sin[t] + v
> where v is Gaussian white noise.
> 
> v has to be a continuous function of t in order to use NDSolve on the
> ODE, but it also should be uncorrelated.  How can I make this a
> continuous function while still making it uncorrelated?

Make v into a function that returns a random with normal distribution.

upper = 2;
(* reference example, no noise *)
nds1 = NDSolve[{x'[t] == x[t] + Sin[t], x[0] == 0},
    x[t], {t, 0, upper}];

v[0] = 0;
v[t_] := RandomReal[NormalDistribution[0, .2]]
nds2 = NDSolve[{x'[t] == x[t] + Sin[t] + v[t], x[0] == 0},
    x[t], {t, 0, upper}];

(* comparison plot *)
Plot[{x[t] /. First[nds1], x[t] /. First[nds2]}, {t, 0, upper}]

Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: Incorrect symbolic improper integral
  • Next by Date: Re: Incorrect symbolic improper integral
  • Previous by thread: Re: Re: White Noise in Simulation
  • Next by thread: Re: Re: White Noise in Simulation