# What's the ideal FFT window for measuring a group of signals of differing amplitudes but close in frequency?

In my system, I need to measure the amplitudes and phases of four lasers, each of a different, known wavelength, chopped at a 50% duty cycle via TTL at frequencies spaced evenly (or not) around some fundamental frequency f0. The lasers are attenuated by some analyte medium, and the resulting laser power (which is measured by a single detector) tells me what I need to know about the medium.

The signals are recovered by performing I/Q demodulation. The application is similar to the one in this question. The signals' individual frequencies can be controlled by me, but should not be more than 6-7 Hz away from f0.

In single-signal applications of my setup, I've used the Exact Blackmann window, which is known to be good for single-frequency measurements, at least according to National Instruments. My question is, is there a more robust choice for recovering four extremely close signals?

Other details: sample rate is 8192 or 16384 Hz for two seconds, f0 is in the neighborhood of 1230 Hz. Typically I have the frequencies evenly spaced, at f0±6 and f0±2, so they're all 4 Hz apart. The input signal is demodulated and windowed four times, once at each of the frequencies of the lasers. Followup question: could spacing them unevenly help?

• What exactly do you need to measure and what do you know? Frequency, amplitude, phase, drift, jitter ? It seems tome that FFT is really the wrong tool for this type of problem. – Hilmar Dec 11 '20 at 18:03
• @Hilmar I need to measure the amplitudes and phases of the lasers. I know the frequencies and can control them. – Ben S. Dec 11 '20 at 18:06
• Are you are actually demodulating or just doing a carrier recovery / baseband translation. I agree that FFTs aren't what you want to do. It sounds like you would want to do some matched filtering. You want to design your signals so that they are orthogonal to each other. – IanJ Dec 11 '20 at 22:48
• @IanJ I'm doing I/Q demodulation as implemented in the linked question. Do you have a good starting point for where to investigate non-FFT routes? I'm not a DSP guy in general, I've only used the I/Q demodulation stuff in practice. – Ben S. Dec 11 '20 at 23:04
• @BenS. I highly doubt the line width of your lasers is less than 4 Hz to be able to distinguish tones spaced that close – Dan Boschen Dec 13 '20 at 12:57

As for ideal windows for FFT frequency resolution and dynamic range, many assume that the Gaussian window would be best since it has the minimum time-bandwidth product, and due to this it is the filter most often used in spectrum analyzers. However, this is only true when the time domain extends to infinity. For finite time durations the window that actually has the minimum time-bandwidth product is the Discrete Prolate Spheroidal Sequence (DPSS, or Slepian) window which maximizes the energy concentration of the main lobe. The Kaiser window very closely approaches this optimum and both have an controlling parameter to trade frequency resolution (ability to discern two closely spaced frequencies) and dynamic range (ability to discern two frequency tones of different amplitudes). For further details on the comparison of the two, see this link by Julius Smith: https://ccrma.stanford.edu/~jos/sasp/Kaiser_DPSS_Windows_Compared.html

That said, the signal after IQ demodulation could be windowed and then FFT'd to provide the phase and amplitude (relative to the demodulation signal used) of closely spaced modulation frequencies. For this application I would use a Kaiser window with Beta = 8 which provides 80 dB dynamic range of signals captured over a 2 second duration while being able to resolve two signals that are 4 Hz apart.

• I think the optimal window will depend on the Dynamic Range of data in the question. Though the choices you mentioned are very good in the case no such knowledge exist. – Mark Dec 12 '20 at 20:47
• @Mark for the choices I mentioned you can trade dynamic range with main lobe width so they should outperform any other windows for this application given the minimum time bandwidth product (they would give you the best selectivity all other things equal) – Dan Boschen Dec 12 '20 at 20:49
• Usually in this scenario it is better not to use windows at all and go to other method which will be able to discern the different frequencies. – Mark Dec 12 '20 at 20:51
• What other method? It’s possible the other method is equivalent to windowing with an FFT (which is identical to heterodyne approaches when you look at the underlying structure of the DFT) in the end the ability to discern closely spaced frequencies in noise is limited by the length of the captured sequence (hence time bandwidth parameters are of interest for any competing approaches) – Dan Boschen Dec 12 '20 at 20:53
• I'd be happy o see such equivalence. Do you have a link? Yet I was talking about methods form the Compressive Sensing world. – Mark Dec 12 '20 at 20:55

FFTs seems not the best way of doing it since you need very long time sequences to get enough frequency resolution and you have to deal with significant spectral leakage. Windowing will reduce spectral leakage put also reduce frequency resolution so it's a game of whack-a-mole.

If you only have a few known frequencies a heterodyne detector should work very well:

1. Build a local oscillator at the desired frequency
2. Multiply your input with the local oscillator (complex or cos & sin)
3. Lowpass filter the output

That will give a complex signal that represents the spectral amplitude over time. The bandwidth of the low pass filter determines the bandwidth of your spectral analysis.

If you don't know the frequency exactly or it can drift, you can wrap a PLL (Phase Locked Loop) around the local oscillator to track your spectral component.

If you are using 4 different lasers, are you free to select them at slightly different colors ($$\lambda$$)? If you could do this then you can make this a WDM type system. The receivers would have bandpass filters for each color, so you wouldn't be required to do any separation at frequencies near 1230Hz. The color spacing is something like 12.5GHz apart. Otherwise I would look at spread spectrum codes. It is for when the inputs are at exactly the same frequency but you send orthogonal signals so that they can be separated.