Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Ads

Chapters

Chapter Contents:

Search Spectral Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Zero-Phase Zero Padding

The previous zero-padding example used the causal Hamming window, and the appended zeros all went to the right of the window in the FFT input buffer (see Fig.4.2a). When using zero-phase FFT windows (usually the best choice), the zero-padding goes in the middle of the FFT buffer, as we now illustrate.

We look at zero-phase zero-padding using a Blackman window3.3.1) which has good, though suboptimal, characteristics for audio work.5.4

Figure 4.4a shows a windowed segment of some sinusoidal data, with the window also shown as an envelope. Figure 4.4b shows the same data loaded into an FFT input buffer with a factor of 2 zero-phase zero padding. Note that all time is ``modulo $ N$'' for a length $ N$ FFT. As a result, negative times $ -n$ map to $ N-n$ in the FFT input buffer.

Figure 4.4: (a) Blackman window overlaid with windowed data. b) Zero-padded windowed data loaded into the FFT input buffer.
\includegraphics[width=\textwidth]{eps/zpblackmanT}

Figure 4.5a shows the result of performing an FFT on the data of Fig.4.4b. Since frequency indices are also modulo $ N$, the negative-frequency bins appear in the right half of the buffer. Figure 4.4b shows the same data ``rotated'' so that bin number is in order of physical frequency from $ -f_s/2$ to $ f_s/2$. If $ k$ is the bin number, then the frequency in Hz is given by $ k
f_s/N$, where $ f_s$ denotes the sampling rate and $ N$ is the FFT size.

Figure 4.5: (a) FFT magnitude data, as returned by the FFT. (b) FFT magnitude spectrum ``rotated'' to a more ``physical'' frequency axis in bin numbers.
\includegraphics[width=\textwidth]{eps/zpblackmanF}

The Matlab script for creating Figures 4.4 and 4.5 is listed in in §F.1.1.



Subsections

Order a Hardcopy of Spectral Audio Signal Processing

Previous: Zero-Padding for Interpolating Spectral Peaks
Next: Matlab/Octave fftshift utility

written by Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )