I created a signal with lets say $\omega_1$ that is fixed at 1 bin in the FFT: $$A_1\cos(\omega_1t)$$

I was asked to find the closest $\omega_2$ to $\omega_1$ so that the signals $A_1\cos(\omega_1t)$ and $A_2\cos(\omega_2t)$ are separable.

I only know the ratio $A_1/A_2$ in dB and the $\omega_1$ that I chose.


Now my questions are:

  1. What is the minimum window length?
  2. Number of points for the DFT?
  3. What is the relationship (if any exists) between the ratio $\frac{A_1}{A_2}$ and the DFT points?
  • $\begingroup$ Just to clarify. You have two sinusoids of different amplitude whose relation in dB is known, and you know the angular frequency for one of them, $\omega_1$. You want to know which is the closest frequency $\omega_2$ to $\omega_1$ such that they can be distinguishable from each other via DFT and the minimum length of the window to achieve this. Is this correct? $\endgroup$
    – Tendero
    Jan 6 '18 at 15:04
  • $\begingroup$ Yes, let say A1/A2 equals to 20db for example... $\endgroup$
    – Rookiematb
    Jan 6 '18 at 15:39
  • $\begingroup$ You should also specify the sampling frequency $f_s$ and what window you want to use (I guess you are talking about a rectangular one, but you should confirm that). $\endgroup$
    – Tendero
    Jan 6 '18 at 16:14
  • 2
    $\begingroup$ You need to define what constitutes separable first. $\endgroup$ Jan 6 '18 at 17:15
  • 1
    $\begingroup$ There is not a universal definition of resolution. Some applications use 3(dB) width of the main lobe, some might use the peak-to-null width. Furthermore, algorithms such as MUSIC could be used to try to get even finer resolution. If you are talking about what you can see, then you will have to cycle through various possible window lengths and stop when you see the two peaks. Someone with better/worse vision will get a different answer. You could also define separability by the second sinusoid being N(dB) above the sidelobes of the first one. What definition are you using? $\endgroup$ Jan 6 '18 at 17:54

I don't know if you can have a formula in terms of window length, number of DFT points and difference between two angular frequencies you are trying to resolve. But you can do some experiments with different types of the windows and determine this in MATLAB. Note you need to consider the following.

  1. For a DFT of size N you get two frequency bins separated by $\frac{2*\pi}{N}$. So you should have N large enough resolve $\omega_2 - \omega_1$

  2. Note that before you take DFT, when you window it the frequency response will be convolution of two frequency response - frequency response of the window and the frequency response of the signal which in your case pretty much a pair of delta function.

Now Hanning window will have a wide main lobe and suppressed side lobes. So if the second signal's frequency falls within the main lobe then you won't be able to detect it unless amplitude of the second signal is large enough compared to the smeared component of the first signal at the location of the second signal. Or if the second signal falls in some of the side lobe location and second signal's amplitude is large enough compared to the first signal's component in side lobe region you should be able to detect it.

If you chose a rectangular window the main lobe will be substantially shorter compared to rectangular window. But the side lobes will be substantially larger compared to the Hanning window case.

There exist the trade-off between using different window sizes.

  • $\begingroup$ You’re mixing up your windows here. The rectangular window has the smallest main lobe but the highest side lobe level. The hamming window has a wider main lobe but a lower side lobe level. $\endgroup$
    – user883521
    Jan 8 '18 at 5:12
  • $\begingroup$ Thanks for pointing this out. Somehow I mixed it up. Now I corrected it. $\endgroup$
    – py2016
    Jan 8 '18 at 8:21
  • $\begingroup$ Ok got it, thanks! I chose my w1 to be at a random bin for my experiment (7th bin for example) and a sampling frequency big enough to resolve the normalized w2 for random window. I found the correct number of dft points and took my window's length to be half of it. $\endgroup$
    – Rookiematb
    Jan 8 '18 at 16:54

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.