This is a simple amplitude modulation experiment. Both waves are sinusoids of the type

cos(2 x pi x f x t).

The base signal has a frequency 100Hz, and the carrier wave frequency is 1000Hz. The three figures below are the modulated signal in time and frequency domain for three different sampling periods.

For sampling frequency, Ts = 3000Hz enter image description here

For sampling frequency, Ts = 4000Hz enter image description here

For sampling frequency, Ts = 10000Hz enter image description here

I expected both frequency components at 900Hz and 1100Hz to be of the same height. Except for the case when sampling frequency is 4000Hz, in the other cases this is not so. Why?

  • $\begingroup$ try to sum the area under each peak, they must be equal. $\endgroup$
    – Mohammad M
    Sep 6, 2017 at 12:21
  • $\begingroup$ What FFT size are you using? You might be experiencing scalloping loss because the locations of the peaks don't line up exactly with your FFT bin centers. $\endgroup$
    – Jason R
    Sep 6, 2017 at 12:31

1 Answer 1


The reason is because of spectral leakage. Your frequencies do not fall exactly on the FFT bins- this causes the energy to appear in nearby adjacent FFT bins as sidelobes. The most spectral leakage occurs when the frequency of a signal falls exactly between two FFT bins. Another way to think of it, is that the signal is not periodic w.r.t. the length of the FFT you are using.

Your two frequencies are appearing at two different positions with respect to the adjacent FFT bins - so they are suffering different amount of leakage. Thus, the peaks have different magnitudes. In the case where the frequencies have the same magnitude, they are located the same distance away from the closest FFT bin.

You can try adjusting your sampling rate and FFT size so that the resulting frequencies will fall exactly on an FFT bin. With the 3000 Hz sampling rate use a 3000 point FFT - corresponding to FFT bins every 1 Hz. With the 4000 Hz sampling rate use a 4000 point FFT - again, corresponding to FFT bins every 1 Hz.

In your 4000 Hz case, you are probably using a 4196 point FFT. The FFT bins are close to being every 1 Hz, so the frequencies at 900 Hz and 1100 Hz are almost exactly on a FFT bin and thus have almost equal amplitude.

  • $\begingroup$ When your frequency is between two bins in Fourier space is not the reason of frequency leak and they're two different things. $\endgroup$
    – Mohammad M
    Sep 6, 2017 at 20:53
  • $\begingroup$ 1024 actually. Buy I think the same applies. $\endgroup$
    – kchak
    Sep 7, 2017 at 2:15
  • $\begingroup$ @MohammadMohammadi Actually it is. I'd suggest you re-read the Harris paper on Windows. From Sect III pg 2 "An intuitive approach to leakage is the understanding that signals with frequencies other than those of the basis set are not periodic in the observation window" This lead to discontinuities which are responsible for spectral contributions (or leakage) over the entire basis set. $\endgroup$
    – David
    Sep 7, 2017 at 2:20
  • $\begingroup$ @David I attached a picture from Oppenheim's book to my answer, which explain what happens when frequency of signal match exactly with one bin of FFT. When this happens, bins of FFT place over the zeros of spectrum which is merely an artifact. I suggest you to read Oppenheim's book. $\endgroup$
    – Mohammad M
    Sep 7, 2017 at 8:40
  • $\begingroup$ @MohammadMohammadi I'd hardly call it merely an artifact - it happens when the signal is distinctly composed of one of the Discrete Fourier basis vectors. You can obtain plots like yours by windowing or by have a pure sinusoid which is between the FFT frequency bins - in both cases the signal no longer consists of a single basis vector or even two - it spreads out over the whole domain. Plot the frequency spectrum for a sinusoid that isn't exactly on an FFT bin with no windowing and where the signal length = the FFT length (no zero padding). $\endgroup$
    – David
    Sep 7, 2017 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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