2

Is there an easy/general way to calculate this? For instance, the rectangular window has a maximum scalloping loss of 0.3634, which can be derived in frequency domain from a normalized sinc(0.5).

The only way, given a precomputed window function, I can think of, is to apply the window function to a signal whose period is 2pi*(k + 0.5)/N and amplitude A, calculate a N FFT and measure the bin k. Bin k should have a magnitude of A * N * f, where f is a factor giving the worst-case scalloping loss, irrespective of N/sampling size, right?

Shaggi
  • 225
  • 2
  • 11

1 Answers1

2

Harris defines the scalloping loss as the ratio of coherent gain for a tone located half a bin from a DFT sample to the coherent gain at a sample (see the paper for the definitions) $$ \mathrm{SL} = \frac{\left\lvert \sum_n w(nT)e^{-j\frac{\pi}{N}n} \right\rvert}{\sum_n w(nT)} = \frac{W\left(\omega_{1/2}\right)}{W(0)} $$ Where $w$ is the window and $W$ is the window DFT

$$ \omega_{1/2} =\frac{\pi}{NT} $$

Guess the value you are after is really $1-SL$

EDIT: I believe the left hand side of the equation is enough to answer @Shaggi's question, but to clarify a bit the notation of the rest, Harris defines DFTs as functions of $\omega_k$, so

\begin{align} W(\omega_k) & = W\left(\frac{2\pi k}{NT}\right) = \\ & = \sum_n w(nT) e^{-j\omega_k nT}\\ & = \sum_n w(nT) e^{-j 2\pi kn/N}\\ W(\omega_{1/2}) & = \sum_n w(nT) e^{-j \pi n/N}\\ W(0) &= \sum_n w(nT) \end{align}

F. J. Harris - On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform

filippo
  • 176
  • 2
  • 8
  • Thanks, that was helpful (after the edit, spend some time looking at dirichlet kernels, wondering what I missed)! – Shaggi Jan 25 '16 at 18:53
  • Sorry, I should definitely avoid answering questions before taking my morning coffee – filippo Jan 25 '16 at 19:25
  • I'm having a bit of trouble understanding the w1/2 term; 1) why is the sampling rate included? Shouldn't it be normalized in terms of N anyway? 2) No matter how I calculate w1/2 it ends up being a real number, which is kind of weird when indexing a DFT.. – Shaggi Jan 25 '16 at 19:59
  • Let me check the article again, I quoted the right hand side for completeness, probably ended up confusing you. The left hand side is enough to compute the scalloping loss given a sampled window. It's the sample frequency, not "sampling", amazing how sometimes a little typo can completely change the meaning of a phrase. Fixed it now. – filippo Jan 25 '16 at 20:16
  • @Shaggi see my last edit, I think I removed the confusing part, actually the RHS of the equation only adds confusion because of the unusual notation, I could/should remove it altogether. – filippo Jan 25 '16 at 21:27
  • Okay, I think i understand now - so basically it is the ratio of the bin 0.5 over bin 0 (the DC component) of the DFT of the window. This should be computable directly (without functions or interpolations) by using a 2x sized zero-padded FFT, such that twice the bins are available? – Shaggi Jan 25 '16 at 21:33
  • Isn't it easier to just compute the $\mathrm{SL}$ sums from the sampled window in time domain? – filippo Jan 25 '16 at 21:38
  • Yes, perhaps. I was hoping to have a solution invariant of N, but it seems (while they both work) they converge at the same rate to the correct answer as N approaches infinity. – Shaggi Jan 25 '16 at 21:59
  • Exactly. I don't know, maybe you can get a closed form, depending on the window, like you do with the rectangular one (see the edited away dirichlet kernel thing). But for a generic window I believe you're left with an approximation that gets better with growing $N$. – filippo Jan 25 '16 at 22:05