AP - The Recognized Standard In Audio Test

  • US/UK English
  • UK English
  • Deutsche
  • Korean
  • Spanish
  • Login / Register
  • Contact
  • Products
    • Products Home
    • 2700 Series
    • APx525 Family
    • APx585 Family
    • APx515
    • APx511
    • ATS-2
    • ATS-1
    • Accessories
  • Solutions
    • Solutions Home
    • Intro to Audio Test
  • Downloads
    • Downloads Home
    • 2700 Series
    • APx525 Family
    • APx585 Family
    • APx515
    • ATS-1
    • Accessories
  • Service & Support
    • Service & Support Home
    • Service & Support Offerings
    • About Calibration
    • Schedule Service / Request RMA
    • European Service
    • Knowledge Base
    • Audio.TST Back Issues
  • Sales
  • News & Events
    • News & Events Home
    • Press Releases
    • Analyzer Reviews & Contributed Articles
    • Seminar Schedule
  • About
  • Service & Support
  • Overview
  • Knowledge Base
  • Training
  • Solutions Partners
  • Service Offerings
  • Schedule Service
  • Calibration
  • Shipping Instructions
  • Downloads
  • AP Warranty terms and conditions
  • AP Calibration Services Datasheet

Print this page Save as PDF

Knowledge BaseHOME/SERVICE & SUPPORT/KNOWLEDGE BASE

Audio.TST July 2012: Splice Utility, Reusing Clocks

Created 30 Jul 2012

AP logo
Audio.TST July 2012

 

Notes from the Test Bench
Output: Re-purposed Clocks and Digital Audio Measurements
Sound Advice: Combining low and high frequency measurements with the Splice utility
Test Results: AP News and Events

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.

Bruce

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:

12mhz-48khz conversion

USB timing

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.

USB with audio

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.

DSIO Tx

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:

19.2M to 48k

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.

PDM Menu

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.

Example:

Speed of sound

100Hz

2khz

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.

Splice

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.

Splice Example

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.

Speaker

This yields the following graphical result:

HL Results

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:

HF Impulse

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:

HF results

Finally, the Splice CLI utility combines these intermediate results into a final, smoothed frequency response that is normalized to 1 kHz:

Combined

The APx Splice utility is a convenient and cost-effective means of obtaining valid acoustic response measurements under less than ideal conditions.

Installing Splice

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 C:\Program Files (x86)\Audio Precision\CLI Apps\Splice\Samples. Two different projects are provided, one for APx515/525 and the other for APx585. The only difference between these projects is the assignment of analyzer channels. The project files come preloaded with sample data so that you can see how results will appear.

Open Project

Using Splice

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.

Splice Navigator

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.

  1. Right click the "Spliced LF & HF Response" measurement and choose to Edit Prompts and Properties:

Splice Right Click

In the Sequence Step Properties dialog that appears, you will see the individual sub-steps of this measurement:

Splice Properties

2. Double click the sub-step "Splice Frequency Response Data" to edit it and adjust parameters:

Parameters

  1. Command - provides the default path to the Splice executable (note: if Splice is installed in a non-default location, this must be edited to match)
  2. Arguments - names of CSV files and channels to be used in results
  3. Working Folder - path where Splice will look for files listed in Arguments

By default, the working folder is set to C:\. You may change this to suit your needs, but make sure that the folder you designate already exists; Splice will not create one. You must also alter the paths in the other sequences that generate the CSV files to match the settings made in this dialog.

The arguments for APxSplice.exe are as follows:

Usage: {path}APxSplice LFInputFile LFChannel HFInputFile HFChannel OutputFile

Argument   Definition
LFInputFile   Path & File Name (No Spaces) created by APx Export .csv text file of Low Frequency response results data.
LFChannel   Channel Number of Low Frequency results.
HFInputFile   Path & File Name (No Spaces) created by APx Export .csv text file of High Frequency response results data.
HFChannel   Channel Number of High Frequency results.
OutputFile   Path & File Name (No Spaces) of resulting APx Import .csv text file showing complete Frequency response.

Note: The Path for argument files is not needed if the system working folder is defined.

Example: :\ApxSplice.exe LFR.csv 1 HFR.csv 2 Result.csv

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.

Numbered navigator

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.

Stepped

Sequence set for Stepped Low Frequency sweep stimulus (1a)

Chirp

Sequence set for Chirp Low Frequency stimulus (1b)

1a: Low Frequency Near Field Stepped Frequency Sweep This measurement employs a standard stepped sweep stimulus.

LF Stepped

The steps are:

  • Provide a prompt dialog to tell the operator what to do with microphones, etc.
  • Run measurement
  • Export results

You may double-click sub-steps to edit them, as shown below:

Mic Position Prompt:

You can choose what this will tell an operator.

Mic Prompt

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:

Generator Settings

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 LF_APxResultData.csv.

LF Export

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.

Impulse

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.

Gen settings

Results acquired are exported to the file HF_APxResultData.csv, as shown in the sequence step below:

HF Export

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. APxSplice.exe processes the CSV files created by the low- and high-frequency results and creates a third CSV file, APxSpliceResult.csv.

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.

Final Splice

This last CSV file is then imported and displayed as a graphical result, as shown in the example above.

Downloads / Resources

  • APx Splice Utility
Test Results: AP News & Events

Events:

Bluetooth  

Bluetooth Automotive Test Event
August 21-23, Auburn Hills, MI. USA

AES  

AES Conference on Automotive Audio
September 21-23, Munich, Germany

AES  

AES USA
October 27-29, San Francisco, CA, USA

Bluetooth   Bluetooth Unplugged Fest (UPF)
October 8-12, Barcelona, Spain
Electronica 2012   AP will be at Electronica 2012 in Munich, Germany, November 13-16

back to top >

© 2012 Audio Precision, Inc.


Return to Knowledge Base home
Back To Top

Accredited by A2LA

Browse Products View Solutions Schedule a Demo Get Service Register

Audio Precision

Copyright © 2012 Audio Precision Inc. All Rights Reserved.   |   Privacy Policy