Notes from the Test Bench
By Bruce Hofer, Chairman & Co-Founder, Audio Precision
Hello AP Friends and Users,
AP is busy with several new products under development, and have just released updates to several existing products and features. We continue to refine the capabilities of our APx family of analyzers, expanding possibilities for engineers working under real-world constraints. We've got some good examples here this month, illustrating how digital designers often must often find clever ways to utilize non-audio system clocks for audio, and how recent enhancements to APx500 software allow them to make accurate and insightful audio measurements under these conditions.
As always, Audio Precision is committed to helping you ensure that your products work in the real world. We look forward to hearing how you use AP audio analyzers in your work.
Output: Re-purposed Clocks and Digital Audio Measurements
Measurement challenges with re-purposed clocks
While digital audio has long been standardized upon a handful of well-known sample rates (44.1 kHz, 48 kHz, 96 kHz,etc.) these rates cannot easily be derived from clocks used for other purposes in digital systems. Rather than incurring additional costs to add clocks purely for audio, designers have for years found clever ways to re-purpose clocks from other areas of a digital system for use with standard audio sample rates.
APx DSIO Option and USB Audio
Many audio devices today incorporate USB connectivity for various uses. USB chipsets commonly employ 12 MHz bitclocks for both host and receiver; clocks on connected devices are kept synchronized via a digital PLL (phase-locked loop).
Synthesizing a useful 48kHz clock for audio purposes can be complex and expensive. Assuming a 32-bit audio word, 48 kHz x 32 bits x 2 (stereo) = 3.072 MHz, which is not related to 12 MHz in any convenient manner, and would require the use of a DDS (Direct Digital Synthesizer) or other clock generator in order to be realized.
Designers of many USB audio products have realized a far simpler and less expensive method that allows for direct use of the existing 12 MHz bit clock. The relationship between a 12 MHz bitclock and a 48 kHz sample rate is easily expressed as:
Each half-cycle of the Frame Clock (FClk) is represented by 125 cycles of the bitclock; as with I2S and other formats, FClk states are used to signal the two different channels. Thus we effectively have created a system that delivers 125-bit words at 48 kHz. Actual audio data with word length n is transmitted in the first n bitclock cycles, and the remaining (125-n) samples of the word are padded with zeros.
The APx DSIO option supports this common method of USB audio transport by allowing engineers to independently specify data words up to 128 bits in length with any smaller size of audio bit depth (e.g., 24 bits). The DSIO option also supports common variations of audio words, including the location of the MSB (most significant bit, first or last), left- or right-justification, and the location of the frame pulse.
The APx DSIO option automatically calculates certain related items, such as Master Clock rate based upon the MClk/FClk ratio. Additionally, the frame clock (our 48kHz audio data rate) may be defined with a specified pulse width of 50% (instead of 1 sample) and may be inverted to exchange rising and falling edges.
With these flexible options, designers can use the APx DSIO option to test designs that use a wide variety of schemes to accommodate the re-use of existing system clocks.
PDM 50x Oversampling in Cellular Devices
PDM (Pulse Density Modulation) is widely used in DACs and with MEMS microphones in mobile devices. PDM employs a 1-bit datastream with oversampling in order to provide a cost-effective means of transporting digital audio. The APx PDM Option allows designers to connect PDM receivers and transmitters directly to the audio analyzer, avoiding additional conversions and outboard gear.
In most audio applications, the commonly accepted oversampling rate is 64x; hence if one desires to convert 48 kHz PCM data to PDM, the data must be sampled at 64 x 48 kHz = 3.072 MHz. However, in many cellular devices we see 50x oversampling used. Why is this?
The answer once more lies in the re-use of existing clocks. While cellular systems use several different clock rates, a common denominator is 19.2 MHz. This frequency is used as a 3G reference clock, due to it being a least common multiple of W-CDMA chip rate 3.84 MHz (5x) and 200 kHz channel raster (96x), and it is commonly available as TCXO and OCXO on W-CDMA chipsets. It is also used as a reference clock for some consumer GPS receivers and in some Bluetooth systems.
From here, the math is simple:
Hence a simple 8x divider can provide an oversampling frequency of 2.4 MHz, which neatly divides by 48 kHz with a factor of 50. In response to this need, the APx PDM option will support 50x oversampling and a host of other additional ratios that can support additional clocks in the upcoming v3.1 release of APx500 measurement software.
The AP family of audio analyzers incorporate tools and settings that allow designers to take advantage of these cost-saving measures by providing measurement capabilities that align with the special requirements of frequently used clock schemes.
Sound Advice: Combining low and high frequency measurements with the Splice utility
Challenges in loudspeaker testing
While many audio engineers have to test the acoustic response of a loudspeaker – whether in a car audio system, a portable media player, or home theater system - very few are fortunate enough to have an anechoic chamber on hand whenever they want it. An ordinary room is usually inappropriate for acoustic testing due to the large quantity and amplitude of reflections from the walls, floor and ceiling.
Fortunately, advanced measurement techniques are available in the best audio analyzers that allow you to overcome these limitations and produce highly accurate loudspeaker measurements, even under less than ideal conditions. Log-swept chirp (also known as continuous sweep) is the best quasi-anechoic acoustic testing method available today, providing the ability to exclude room reflections and give comprehensive and accurate results.
Challenges nonetheless exist, as multiple chirp tests are required to measure accurately the full frequency range of a driver, and these chirps must be run independently. This is due to the fact that audio frequencies cover a range of wavelengths that overlap typical dimensions of rooms, tables and other objects around us, making low frequency conditions (wavelengths near room dimensions) very different from higher frequencies. A good measurement technique for one is not good for the other.
The wavelength at 100 Hz is comparable to the distance from a loudspeaker to room walls and hence coincides with the first reflections from room boundaries, making it very difficult to obtain an accurate measurement of low frequency output if the microphone is placed at any significant distance from the loudspeaker. In contrast, the wavelength at 2 kHz is quite small, meaning that the distances to room walls are likely to be many multiples of this value, allowing us to easily distinguish between the original signal and reflected sound.
Combining Near and Far Field Measurements
The APx Acoustic Response Measurement (available as part of the APx500 Measurement Software) gives you the ability to easily visualize and create "time windows" that remove unwanted reflections from results. The placement of microphones that are optimal for low and high frequencies is different due to the interactions of the wavelengths produced with the environment. In general, low frequencies must be measured with a microphone very close to the source in order to overwhelm the effects of room loading and reflection via proximity, as the long periods of low frequencies are in the same range of time as reflections arriving at the measurement microphone. High frequencies, with their short wavelengths, can be measured as a greater distance in order to capture output from multiple drivers using our regular Acoustic Response measurement with a time window.
Because such a technique involves two measurements, our challenge is to properly match and align the low and high frequency data into a single result that is trustworthy and accurate. We have developed a utility that does this for APx instruments.
The Splice utility is an executable that can be integrated into an APx project sequence. Splice combines the data from 2 acoustic measurements at a designated "crossover frequency" into a single graphical result that represents both low and high frequency measurements. This enables you to produce a single trace of the full frequency response.
Using the single-microphone sequence (details to follow), a small bookshelf loudspeaker is configured with a measurement microphone placed very near the low-frequency driver, and measured using the Low Frequency Near Field Acoustic Response part of the sequence.
This yields the following graphical result:
Note that while the stimulus extends to 1 kHz, the project only displays results up to 250 Hz.
Next, a quasi-anechoic measurement of high frequencies is made. This measurement employs the APx Impulse Response, limiting data to a user-definable "time window" in order to eliminate room reflections:
In this example, a value of 6 feet was used in order to limit impulse response results to only valid, non-reflected data. The result in the frequency domain appears as follows:
Finally, the Splice CLI utility combines these intermediate results into a final, smoothed frequency response that is normalized to 1 kHz:
The APx Splice utility is a convenient and cost-effective means of obtaining valid acoustic response measurements under less than ideal conditions.
The Splice utility is installed by downloading the archive file attached to this article, unzipping it and running the contained executable SPLICE_SETUP.EXE. This will install the CLI (Command Line Interface) utility and create project files that can be opened by APx500 v3.0 software.
Once the Splice utility has been installed, the project files may be opened from within APx500. By default, these project files are located in the path
Upon opening the appropriate project file, you will see Signal Paths for both one- and two-microphone configurations, with a series of measurements for each one. Note that input channel assignments are pre-selected for each of the two sequences; you may of course edit the Signal Path Setup to change this.
Setting Splice Parameters
The Splice utility makes use of temporary .CSV files used for calculation. You may configure the location of these files to suit your needs. Note: if you install Splice into a non-default directory, you must adjust these parameters.
In the Sequence Step Properties dialog that appears, you will see the individual sub-steps of this measurement:
2. Double click the sub-step "Splice Frequency Response Data" to edit it and adjust parameters:
By default, the working folder is set to
The arguments for
Note: The Path for argument files is not needed if the system working folder is defined.
Running the Spliced Acoustic Response Project
The project provided with the Splice utility is specifically intended for loudspeaker measurements, but the Splice utility itself can be used to join together low- and high-frequency data that is captured from other sources as well.
In the Spliced Acoustic Response Project you need to select only one of the two provided Signal Paths, as they are designed for different physical situations. Let's examine one Signal Path sequence to see how it works and how to customize it to suit your needs. The illustration below provides numeric labels for the measurements contained in a single Signal Path.
Note: Two methods of low frequency data acquisition (1a and 1b, above) are provided to suit your environment. Low frequencies may be measured using a stepped sweep stimulus or a chirp, depending upon preference. Use one or the other during a sequence by activating the checkbox for the desired method.
Sequence set for Stepped Low Frequency sweep stimulus (1a)
Sequence set for Chirp Low Frequency stimulus (1b)
1a: Low Frequency Near Field Stepped Frequency Sweep This measurement employs a standard stepped sweep stimulus.
The steps are:
You may double-click sub-steps to edit them, as shown below:
Mic Position Prompt:
You can choose what this will tell an operator.
Measure Low Frequency Near Field Stepped Frequency Sweep:
The measurement itself is adjusted in the main configuration and display pane as per any other APx measurement:
In this case, we wish to measure near field low frequencies up to 250 Hz, as shown. These values may be edited to suit your needs. Note that this result is normalized at a reference frequency, as we wish to display results in dB. APx500 will automatically adjust this frequency to be in the range that you designate.
Export Result Data:
This final step exports the result of the measurement to a CSV file as shown below. Note: if you wish to change the location of these intermediate files, you may edit this area. Keep in mind that you must edit other steps in order to allow the Splice utility to locate and assemble the files for the final result (see above, Setting Splice Parameters). By default, the low frequency data is written to
1b: Low Frequency Near Field Acoustic Response
This is the alternative method of acquiring low frequency data. It uses a log-sweep "chirp" as stimulus, but provides the same capabilities as the stepped stimulus. The measurement step properties in this measurement are identical to that of the Low Frequency Near Field Stepped Frequency Sweep, and this measurement exports results to the same temporary .CSV file.
A note about chirp measurements: APx chirp measurements require that the stop frequency is at least 1 kHz. While this value is higher than most low frequency measurements, this data will be correctly truncated when spliced with high frequency results.
2. High Frequency Quasi-Anechoic Acoustic Response
This measurement uses a chirp stimulus, and thus requires that a Time Window be set that is sufficiently small to avoid early room reflections. In the Impulse Response result shown below, we have set a default value of 6 ft. (5.3 ms) as a reasonable starting point.
Important: The Start Frequency of the High Frequency result will determine the point at which low- and high-frequency data are spliced together, regardless of low frequency data above that point. In the default shown below, the Start Frequency is 250 Hz. Splice will disregard data acquired from the low frequency acquisition steps that is above this frequency.
Results acquired are exported to the file
As with all other steps in this project, you may edit the details (such as path, etc.) by right-clicking on the Measurement and selecting Edit Prompts and Properties.
3. Spliced LF & HF Response
The purpose of this final measurement is to create and display derived results from the files exported in the previous steps.
The starting frequency of the High Frequency Quasi-Anechoic Acoustic Response measurement made earlier is automatically used as the splice point. Any data from the Low Frequency Near Field measurements above this frequency is discarded in the derived results. By default, the Splice project normalizes these results around 1 kHz and displays them using smoothing.
This last CSV file is then imported and displayed as a graphical result, as shown in the example above.
Downloads / Resources
Test Results: AP News & Events
© 2012 Audio Precision, Inc.