0
$\begingroup$

When a signal depends on two variables, e.g.,

f[k1_, k2_] := 
  Exp[I 0.75 (k1 + 0.3 k2)] + 1.5 Exp[I (0.2 k1 + 0.3 k2)] + Exp[I (0.2 k1 + 0.4 k2)];

where k1, k2 are integers.

  1. How can I add or simulate white noise here?
  2. How can I do this just for integers?

In the documentation, I found that to add withe noise to a signal one should do the following:

TransformedProcess[
    Cos[t/8] + noise[t], 
    noise \[Distributed] WhiteNoiseProcess[UniformDistribution[{-1/5, 1/5}]],
    t];

But I can't make it work with my function f.

$\endgroup$
  • 1
    $\begingroup$ Anna, not seeing a process with your f[k1,k2]. Where does t fit in? $\endgroup$ – MikeY Mar 4 at 16:39
  • 1
    $\begingroup$ In general, white noise just means there is no correlation between each instant in time, so easy to generate it. Just need some more info from you on your problem. $\endgroup$ – MikeY Mar 4 at 16:40
  • 1
    $\begingroup$ Does f[k1_, k2_] := Exp[I*(k1*0.75 + 0.3*k2)] + 1.5*Exp[I*(k1*0.2 + 0.3*k2)] + Exp[I*(k1*0.7 + 0.4*k2)] + RandomVariate[NormalDistribution[]] do what you are looking for? $\endgroup$ – bill s Mar 4 at 17:10
  • $\begingroup$ Specifically, we need to know if you are trying to add noise to the function f[k1,k2] or to a random choice of k1 and k2. $\endgroup$ – Matt Stein Mar 4 at 19:13
  • $\begingroup$ For calculations I need to use just discrete samples of f[k1,k2] , and they do not depend on time, therefore I don't know jet, how I should do white noise simulation properly..., and if just adding RandomVariate[NormalDistribution[]] is correct in this case. @AnnaVeselovska $\endgroup$ – Anna Veselovska Mar 5 at 18:02
2
$\begingroup$

I have a quick and dirty white noise function I use sometimes:

whitenoise[d_, t_] := d RandomReal[{-1, 1}]/Sqrt[t]

d being the delta, the larger d is, the larger your noise 'amplitude' will become, as can be seen in the following image, and t is your discrete delta t.

In this case, whitenoise is additive, and can be simply added to your signal.

Manipulate[
 Plot[{Sin[t 5]/2.5 + whitenoise[b, 0.1]}, {t, 0, \[Pi]/4}, 
  ImageSize -> Large], {b, 0.001, 1}]

As you can see it can turn a Sin[t] pretty noisy. Click the image if it doesn't animate. noisy

This also works quite well on making noisy real numbers for your variables.

Taking your function and making some data and plotting:

data1 = Table[{Re[f[i, i + 0.1]], Im[f[i, i + 0.1]]}, {i, 0, 5000}];
datanoisy = Table[{Re[f[i, i + 0.1]] + whitenoise[0.01, 0.1], 
    Im[f[i, i + 0.1]] + whitenoise[0.01, 0.1]}, {i, 0, 5000}];

ListPlot[{data1, datanoisy}]

plot2

It looks like some kind of pattern is emerging....

Interesting!

other

Hope this is helpful!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.