DSPRelated.com
Forums

Question about Matlab's implementation of Welch PSD when window size is larger than NFFT

Started by Unknown November 25, 2013
On Tuesday, December 3, 2013 4:04:45 PM UTC-8, Siyi wrote:
> ...
The following lines perform the calculation of a generalized DFT of nFFT basis functions on nWIN samples. This is often explained as blocking the data into groups of nFFT samples and applying the basis functions efficiently with the fft and then summing the fft outputs from all blocks. Since the fft and the summation are both linear processes, their order can be reversed to require the calculation of the fft only once as this code does.
> % datawrap it. > oneFrameWindowedWrapped = sum(buffer(oneFrameWindowed,nFFT),2); > % compute periodogram for one frame.... etc. > psdOneFrame = fft(oneFrameWindowedWrapped,nFFT);
Since the fft outputs are being combined -within- a generalized DFT, the products should be combined as they are within any DFT which is by addition, so sum not mean. How could you reasonably expect anyone to figure out you description when you hide the fact that some of your snippets are from outside a loop and some are from inside an undisclosed loop? Dale B. Dalrymple
Thanks for the explanation.

On Wednesday, December 4, 2013 12:32:43 AM UTC-8, dbd wrote:
> On Tuesday, December 3, 2013 4:04:45 PM UTC-8, Siyi wrote: > > > ... > > > > The following lines perform the calculation of a generalized DFT of nFFT basis functions on nWIN samples. This is often explained as blocking the data into groups of nFFT samples and applying the basis functions efficiently with the fft and then summing the fft outputs from all blocks. Since the fft and the summation are both linear processes, their order can be reversed to require the calculation of the fft only once as this code does. > > > > > % datawrap it. > > > oneFrameWindowedWrapped = sum(buffer(oneFrameWindowed,nFFT),2); > > > % compute periodogram for one frame.... etc. > > > psdOneFrame = fft(oneFrameWindowedWrapped,nFFT); > > > > Since the fft outputs are being combined -within- a generalized DFT, the products should be combined as they are within any DFT which is by addition, so sum not mean. > > > > How could you reasonably expect anyone to figure out you description when you hide the fact that some of your snippets are from outside a loop and some are from inside an undisclosed loop? > > > > Dale B. Dalrymple