|
| WaveWarp 2.0 Example DrawingBoard

PolyphaseVersusDirectResamplingEducationalExample2
Description
Polyphase versus direct implementation of a downsampler followed by an upsampler: polyphase case
This is an elaboration of "PolyphaseVersusDirectDownsamplingEducationalExample2.dwb" whereby the signal is
downsampled by a factor of 4 with an anti-aliasing filter then upsampled by a factor of 4 with an anti-imaging filter. The key
point is that both the filters are implemented in their polyphase forms, consisting of 4 "branches" ("phases") each. The
filters in each set of branches (imported from off-line designs created using the MATLAB code in the script-file
"wwxmpl12.m" located in the wwmatlab directory) comprise the exact polyphase representations of the corresponding
"direct" low-pass filters (demonstrated in the companion ExampleDrawingBoard
"PolyphaseVersusDirectResamplingEducationalExample1.dwb").
The net result is a low-pass filtering of the original signal. A key message of the DrawingBoard is to demonstrate the
"duality" between polyphase downsampling, and polyphase upsampling. Play the DrawingBoard with the sinusoidal test
signal (from the Combo Wave Generator) and observe the output on the oscilloscope. You will see that the ouput is a
restored sinusoidal signal, almost identical to the input for signal frequencies below (approx) 5512 Hz, the low-pass filter
cut-off frequency. Now gradually increase the signal frequency. As it approaches and exceeds 5512, the ouput amplitude is
suppressed due to the action of the low-pass filtering.
Now compare the output of this DrawingBoard with that of the "direct" implementation (from
"PolyphaseVersusDirectResamplingEducationalExample1.dwb"). You will observe that the ouputs are identical for the
two implementations (this is most easily appreciated by temporarily connecting up the ASCII input /output files -- which are
included in both DrawingBoards. The ASCII files can be opened with a text editor and allow convenient and accurate
comparison since they offer direct access to the exact numerical input /output data without the scaling inherent to the
WAV I/O interface).
The most important point about the polyphase structures is that all the filters (both in the downsampler and in the upsampler)
are executed at the low sample rate. This implementation is therefore considerably more efficient than the direct
implementation where the filters are executed at the high sample rate. Even with the overhead associated with the extra
components in the polyphase implementation, you will observe (e.g. from a CPU resource monitor) a considerable
performance gain (speed improvement) over the direct method. This is the entire motivation for using the polyphase method.
Moreover, when the polyphase structure is implemented in the most efficient manner (i.e. without separate multiple
components, but coded together within a single component), drastic improvements in efficiency can be achieved. Such a
"self-contained" internal polyphase architecture is the basis of many of the pre-built down- (up-) samplers in the mutirate
category of the Component Library.
For a thorough discussion on polyphase filtering, see "Wavelets and Filter Banks" by Gilbert Strang and Truong Nguyen,
Wellesley-Cambridge Press, 1996, and "Multirate Digital Signal Processing" by Ronald E Crochiere and Lawrence R
Rabiner, Prentice Hall, 1983.
This DrawingBoard nicely illustrates the power and versatility of WaveWarp's sample-by-sample multirate audio engine.
Components used:

|
|