# Adding white noise to a signal of two variables

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.

• Anna, not seeing a process with your f[k1,k2]. Where does t fit in? – MikeY Mar 4 '19 at 16:39
• 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. – MikeY Mar 4 '19 at 16:40
• 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? – bill s Mar 4 '19 at 17:10
• 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. – Matt Stein Mar 4 '19 at 19:13
• 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 – Anna Veselovska Mar 5 '19 at 18:02

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.

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. 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}] It looks like some kind of pattern is emerging....

Interesting! 