Developing an Innovative, Scalable Audio Test System Using LabVIEW and NI DAQ Hardware

  Read in   |   Print Print

"Previously, we used text-based mathematical tools with weak hardware support. Using LabVIEW saved us countless man-hours on algorithm development and actual product optimization."

- Pär Gunnars Risberg, Opalum

The Challenge:
Creating a scalable sound optimization system to test sound quality, which is increasingly constrained by smaller, thinner devices and strict power consumption requirements.

The Solution:
Combining NI LabVIEW software, NI DAQ hardware, our model-specific enhancement of constrained audio systems, and semi-automated characterization to take audio tuning to the next level.

Author(s):
Pär Gunnars Risberg - Opalum

Opalum was founded in 2007 as a spin-off from Linköping University in Sweden. By combining cutting-edge research from a variety of fields like digital signal processing, human hearing, and mechatronics, we take a radical approach to audio architecture design. The strength of our unique approach to audio reproduction is creating big, clear sound from highly constrained devices. This has become a huge, rapidly growing market thanks to the mobile device industry.

We develop product lines of ultra-flat speakers for supreme audio in designer homes. At the 2012 CEDIA (Custom Electronic Design & Installation Association) home technology expo, the Opalum Flow.4810 wireless speaker system was awarded Most Exciting Product. We sell consumer products in more than 12 countries and counting.

Why LabVIEW?

We build technologies around model-specific optimization with carefully characterized mechanical and acoustic properties of each system. To build this into a scalable business model, we needed a toolkit for customers that promoted using our technologies on new projects. Therefore, the toolkit needed  a graphical, self-explanatory design, but without compromised accuracy and precision underneath the graphical user interface. For that reason, we selected the versatile LabVIEW platform to quickly test new features on state-of-the-art lab hardware while maintaining an appealing graphical user interface to control the algorithms.

Previously, we used text-based mathematical tools with weak hardware support. Using LabVIEW saved us countless man-hours on algorithm development and product optimization.

Technology Walkthrough

Our audio algorithms are based on time-domain optimization for improved imaging, transient response, and psychoacoustic phenomena, with improved frequency response as a natural result of accurate timing. Subjective listening tests show that time-domain processing is superior for sound quality compared with the corresponding processing in the frequency domain. However, generating an optimization target in the time domain is tricky and most audio engineers would use the familiar frequency domain with equalizers and other frequency-based algorithms.

We wanted to create an audio toolkit facilitating this process by combining the following features, many of which are supported by LabVIEW:

  • Reliable, reproducible free-field measurements of audio
  • Impulse response, frequency response on- and off-axis, cumulative spectrum decay (CSD or waterfall) plot, and support for averaging over production distributions 
  • Plots with cursors and easy data access that can be magnified
  • Ability to be optimized with tools familiar to audio engineers
  • Automatic generation of time-domain target from frequency domain visualizations
  • Convenient graphical input using knobs and movable cursors
  • Listening tests that use real-time processing through DAQ hardware
  • Laser head input for precise excursion control of speaker membranes
  • Version and license management tied to e-commerce system
  • Cloud-based calculation of algorithm parameters to avoid reverse engineering
  • Data export to Excel and other generic file formats
  • Ability to deploy to most common audio platforms, including Android, Microsoft Windows, CSR BlueCore, Qualcomm Snapdragon, Analog Devices SigmaDSP, Texas Instruments, Xilinx Spartan-6
  • Automatic PDF report generation for quality assurance

Toolkit Based on LabVIEW

Figure 1 shows the main measurement and characterization view with time-domain behavior on the left and the frequency visualization on the right.

The thick, light-blue curve in the right plot is the user-defined target behavior that our algorithms translate into the time domain and automatically optimize toward. The three knobs above the plot are a typical parametric equalizer with gain, center frequency, and Q-value for each added adjustment band. We can add any number of parametric bands without adding computational complexity in the algorithm because it is all transferred into a single time-domain optimization target.

Once the target behavior is defined, a visual setup of a multiband compressor/limiter structure increases the sound pressure of highly constrained devices. This is commonly referred to as dynamic range control (DRC).

Audio tuning is an iterative and highly subjective process, so we need listening capabilities we can use to test different processing settings against each other. This is traditionally implemented with manual testing in the target device, but to reduce time to market, this toolkit has an equivalent DLL file for identical real-time processing through the connected DAQ hardware for quick and easy listening tests. This way, measurements, listening, and tuning are carried out in the same software—a completely novel approach to audio optimization. To maintain a responsive user interface, we can use the multicore processing capabilities of LabVIEW for this kind of processor-intensive feature.

Furthermore, when the operator is satisfied with the listening tests, other fundamental audio properties should be verified, such as total harmonic distortion (THD), impedance behavior, and sound pressure level (SPL). These features are built into the tool using LabVIEW building blocks, which saved many man-hours and increased the accuracy of the results coming directly from NI software and hardware.

Excursion Control

The main reason for warranty returns due to hardware failure in a mobile device is faulty acoustics. As the only moving mechanical parts of the entire assembly, loudspeakers need better protection for the developer to push them closer to, without exceeding, the limit.

Excessive excursion of the loudspeaker membrane is the foremost reason for speaker failure, but once we measure over-excursion, it is too late and the speaker is often damaged. We needed a way to predict excessive excursion before it happened. Our system identification and automatic control algorithms handled this prediction, but our customers needed a toolkit to identify or set up the parameters for each speaker model. The identification system and excursion testing capabilities were integrated for unprecedented consistency where tuning and protection algorithms worked together rather than against each other.

System Hardware

For maximum market penetration of this toolkit, we needed to build it around an affordable yet scalable and reliable hardware platform. Therefore, we made it compatible with generic soundcards for low-cost testing and low-budget projects with NI DAQ hardware. The following is our recommended hardware setup:

  • Half-inch, prepolarized microphone
    Suggestions:
    782121-02 GRAS or B&K 4189-A-021—combined microphone and preamplifier; powered by IEPE current supply; transducer electronic data sheet (TEDS) support with calibration data for entire unit readable through coaxial cable
  • DAQ hardware
    Suggestion:
    NI USB-4431—102.4 kS/s at 24 bit/sample inputs; software selectable IEPE conditioning; TEDS support; NIST-tracable calibration
  • Optional laser head (for excursion control)
    +/- 10 V analog output for direct connection to DAQ device; resolution and sampling rate depending on speaker types to measure

The hardware support expands to state-of-the-art measurement systems based on the PXI platform from NI and third-party hardware with LabVIEW drivers.

Report Generation

The last stage of the typical workflow in this tool is automatic report generation. A major issue with audio-capable devices is when a customer has complaints a year after production and it is difficult to prove if the audio properties have changed because audio is subjective. It is tricky, but important to reproduce the exact measurement, even if the person who made that particular product has left the company. Therefore, the entire tool-chain use is logged to a report generated as a PDF and signed by the operator and the customer representative when product optimization is complete. The report contains the following data with minimal manual operator influence to avoid typos:

  • Microphone serial and model number (acquired through TEDS)
  • Pretest calibrator result (typically 94 dB at 1 kHz)
  • Microphone distance (acquired by acoustic pulse delay measurement)
  • DAQ device serial number
  • Laser head serial number
  • Temperature and humidity
  • License number
  • Customer project name
  • Operator name
  • Laboratory name and location
  • All measurement graphs and relevant data
  • All sound optimization settings such as target curve and dynamic range compression settings
  • Excursion model identification results and model parameters
  • Result of measured versus predicted excursion
  • Device numbers of the tested and averaged units in selected distribution
  • Operators comments on each step

Summary

Developing our toolkits on the LabVIEW platform has enabled us to drastically reduce time-to-market while at the same time reaching a very high level of versatility and scalability. It has also enabled us to take advantage of the highly trusted NI hardware platform already integrated with LabVIEW. That way our full focus has been on the best possible functionality and user experience instead of hardware design.

Author Information:
Pär Gunnars Risberg
Opalum
Sweden
par@opalum.com

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI