Message Boards Message Boards

Estimating frequency after square law detection using FFT

Posted 8 years ago
A = 1; mi = 2; [Omega]1 = 10; [Omega]m = 1; [Tau] = 0.5; NL = 99; 
    R = 1; C1 = 2;
    Plot[{(A*Sin[\[Omega]1*t + mi*Cos[\[Omega]m*t]] - 
        A*Sin[\[Omega]1*(t - \[Tau]) + 
           mi*Cos[\[Omega]m*(t - \[Tau])]])^2}, {t, 0, NL}, 
     PlotRange -> {{0, 30}, {0, 4}}, AxesLabel -> {"Time", " Amplitude"}, 
     GridLines -> Automatic, AxesStyle -> Directive[Black, 13], 
     PlotStyle -> Directive[Black, 13]]
    data = Table[(A*Sin[\[Omega]1*t + mi*Cos[\[Omega]m*t]] - 
         A*Sin[\[Omega]1*(t - \[Tau]) + 
            mi*Cos[\[Omega]m*(t - \[Tau])]])^2, {t, 0, NL, 0.01}];
    ListLinePlot[Abs[Fourier[data]], PlotRange -> {{0, 500}, {0, 50}}, 
     GridLines -> Automatic, AxesLabel -> {"Frequency", "Amplitude"}, 
     PlotStyle -> Directive[Blue, 13], AxesStyle -> Directive[Black, 13]]

The problem that I am facing while I run this code is: the frequencies that are calculated using Fourier command shows peak of the spectrum near 17 Hz and some other redundant peaks. Now if I filter this signal using a low pass filter, it is expected that the result will be [Omega]m , i.e., N[1/(2*[Pi])]=0.159155 Hz. So, the spectrum that I obtained is not correct. I am using Mathematica 10.0. Please help me. Thanks.

The code for filtering the signal :

ListLinePlot[Abs[Fourier[LowpassFilter[data, 0.01]]], PlotRange -> {{0, 200}, {0, 20}}, GridLines -> Automatic, AxesLabel -> {"Frequency", "Amplitude"}, PlotStyle -> Directive[Blue, 13], AxesStyle -> Directive[Black, 13]]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract