0
$\begingroup$

I have a signal composed of 3 waves oscillating at a high frequency (~10^15 Hz) separated in frequency by 10MHz. I want to simulate the resulting beat wave spectrum. I am expecting a two-peak spectrum, one at 10Mhz and the other one at 20Mhz, due to the beating. Using this code:

\[Omega] = 437653.22*10^9;
A = 1;
\[CapitalOmega] = 10*10^6;
\[Beta] = 0.1;
E0[t_] := 
  A*(Exp[I*\[Omega]*t] + \[Beta]*
      Exp[I*(\[CapitalOmega] + \[Omega])*t]/2 - \[Beta]*
      Exp[I*(\[CapitalOmega] - \[Omega])*t]/2);
data = Table[{t, E0[t]}, {t, 0, 1*10^-6, 1*10^-9}];
ListLinePlot[
 Re[data[[All, 2]]],
 AspectRatio -> 1/4,
 Mesh -> All,
 MeshStyle -> Directive[PointSize[Small], Red],
 Frame -> True
 ]

Periodogram[
 data[[All, 2]],
 SampleRate -> 50*10^6,
 Frame -> True,
 GridLinesStyle -> Directive[Red, Dashed],
 AspectRatio -> 1/4,
 PlotRange -> All
 ]

Mathematica graphics

Mathematica graphics

I managed to get a two-peak spectrum, but the peaks are in the wrong positions. How can I fix that?

$\endgroup$
3
$\begingroup$

Here is code for a similar calculation:

(* Choose frequencies closer together to avoid a large data set *)

f1 = 1100; f2 = 1000; f3 = 900;

(* Use a sample rate much greater than Nyquist to avoid aliasing *)

sampleRate = 10 f1;

(* Two-frequency modulation produces the sum and difference *)

TrigReduce[Cos[F1] Cos[F2]]

(* 1/2 (Cos[F1-F2]+Cos[F1+F2]) *)

TrigReduce[Cos[f1] Cos[f2]]

(* 1/2 (Cos[100]+Cos[2100]) *)

(* data generation uses radian frequencies *)

data1 = Table[
   Cos[2 Pi f1 t] Cos[2 Pi f2 t], {t, 0, 1000/f1, 1/sampleRate}];

(* and we see the expected frequencies *)

Periodogram[data1, SampleRate -> sampleRate]

enter image description here

(* Three-frequency modulation produces four frequencies *)

TrigReduce[Cos[F1] Cos[F2] Cos[F3]]

(* 1/4 (Cos[F1-F2-F3]+Cos[F1+F2-F3]+Cos[F1-F2+F3]+Cos[F1+F2+F3]) *)

TrigReduce[Cos[f1] Cos[f2] Cos[f3]]

(* 1/4 (Cos[800]+Cos[1000]+Cos[1200]+Cos[3000]) *)

data2 = Table[
   Cos[2 Pi f1 t] Cos[2 Pi f2 t] Cos[2 Pi f3 t], {t, 0, 1000/f1, 
    1/sampleRate}];

Periodogram[data2, SampleRate -> sampleRate]

enter image description here

$\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.