Notes from the Test Bench
By Bruce Hofer, Chairman & Co-Founder, Audio Precision
Well, I think everyone can agree on one thing: that no matter how you measure the results, that was one tough year.
It helped that R&D must go on regardless of economic conditions, and that we lead the industry with new tools for new challenges. Issues with HDMI or emerging digital audio formats and protocols simply can't be solved with a distortion analyzer, no matter how determined the engineer.
October marked our 25th anniversary, and since then there is every indication that our customers' ongoing R&D investment will pay off, as production lines come online in 2010. It's a welcome trend to observe.
So on behalf of us all here at AP, I wish you the best of the season, and here’s to a prosperous new year for everyone.
Output: APx API Wrapper for VEE and MATLAB
AP's new API Wrapper resolves .NET limitations in VEE and MATLAB, allowing them to access the complete APx API for automation and systems integration.
The APx API (Application Programming Interface) supports the .NET framework, allowing extensive automation and data exchange using any .NET compatible programming language. Two of the popular languages that work with APx are VEE from Agilent, and MATLAB from The Mathworks. VEE is a graphical language designed to utilize interconnected hardware for measurement and analysis. MATLAB is optimized for computationally intensive tasks and has advanced graphing capabilities.
The APx API makes extensive use of .NET interfaces. In programming terms, an interface contains no functional code, but serves as a bridge between a program and the outside world. Although VEE and MATLAB can see these interfaces, their .NET implementation only enumerates a small subset of the properties and methods that are contained in them, leaving the others inaccessible.
To overcome this problem, AP software engineers have created a class wrapper—a dynamic link library (DLL) that wraps the APx API interfaces in classes, so that all the API objects become visible from within VEE and MATLAB. The wrapper is available as a separate download for APx 2.4, but starting with APx 2.5, it will be installed along with the APx application. We aren’t currently aware of any other programming languages that need the wrapper, but if any arise, the wrapper should accommodate them as well.
Accessing the API directly vs. using the API wrapper.
Using the wrapper imparts no performance penalty, and it is essentially transparent—all you have to do is reference it at the beginning of your code. In a default installation, you would reference the API wrapper at:
where x.x is the version of APx500 you are running.
Using the APx API Wrapper with VEE
To use the wrapper in a VEE program, proceed as follows:
1) Open VEE and add references to both the standard and wrapper APx API .dll files.
Adding references to the APx500 API and API wrapper to the VEE program.
2) Create an instance of the "APx500_Application" object. This is the API object contained in the new DLL. To do so, select a Constructor for the APx500_Application object under AudioPrecision.API2 in the Function and Object Browser.
Creating an instance of the APx500_Application object.
3) Once the instance of the APx500_Application object has been added, you can build your APx500 program by adding a series of .NET operation builders.
Adding a .NET operation to the VEE program.
A simple sample program written in VEE is shown below. It does the following:
Using the APx API Wrapper with MATLAB
Our MATLAB code accomplishes the same tasks as the VEE example above. The first three lines reference the API wrapper.
The API wrapper now gives VEE and MATLAB complete access to the APx API. That, along with our existing .NET connectivity and the APx LabView driver, makes it possible to integrate APx into virtually any test and measurement environment.
Sound Advice: AP Knowledge Base
Measuring PSRR (Power Supply Rejection Ratio) with APx
The new APx PSRR Measurement Utility joins our existing FM MPX-RDS, Damping Factor, and Speaker Impedance Measurement Utilities to further extend APx's flexibility and ease of use. This article is an excerpt from our new Technote 106 (available for download), which explores measuring PSRR in further depth.
by Joe Begin, Audio Precision's Director of Technical Support
Figure 1. APx PSRR Measurement Utility (see larger version).
Power Supply Rejection Ratio (PSRR) is a measure of a device’s ability to reject noise from the supply used to power it. It is defined as the ratio of the change in supply voltage to the corresponding change in output voltage of the device. PSRR is often expressed in dB (equation 1), where ΔVin is the change in voltage input and ΔVout is the change in voltage output. However, due to lack of standardization, the ratio is sometimes inverted, and the value in dB is sometimes expressed as a negative number.
PSRR measurements are typically made for ICs and other functional assemblies. To measure such a device’s power supply rejection, we need to insert an AC signal (ΔVin) in series with the DC voltage from the supply and examine the device’s output (ΔVout) for the presence of the signal. It is often desirable to measure PSRR over a range of frequencies and to produce a spectrum plot of PSRR versus test signal frequency.
The problem with conducting a PSRR test with a DC supply is that most signal generators (the generator in an AP audio analyzer included) cannot be connected directly in series with a DC power supply. First, the DC current drawn from the power supply to the device must flow through the signal generator, and this current could be substantial. In addition, the output impedance of most signal generators is likely to cause an excessive voltage drop, and very few signal generators can be floated to typical DC voltages.
There are three possible solutions to these problems:
Methods 1 and 2 are described below in further detail.
1) Transformer Circuit
By attaching a signal generator to a transformer primary, and running DC through the secondary, we can couple an AC voltage onto the DC supply. The test configuration is shown below.
Figure 2. Connections for testing a DUT using the PSRR transformer test fixture (see larger version).
For convenience, we built the transformer circuit into a project box with appropriate connectors on the input and output side.
Figure 3. Completed PSRR test fixture.
The primary windings have been connected in series, to provide an input impedance of approximately 600 Ω. The secondary windings can be connected in series for a 1:1 voltage ratio, or we can connect one for a 2:1 step-down.
Figure 4. Schematic of the PSRR test fixture.
We selected a Jensen JT-123-BLCF transformer, due to its low distortion, flat frequency response, and split winding flexibility. One of the pitfalls of using a transformer for this application is that excessive DC current can saturates the core, causing the AC signal to distort. To determine its current capacity, we measured the distortion of a 20 Hz sine wave coupled to a DC voltage at a number of different current levels. As seen in Figure 5, the distortion begins to rise sharply as the current exceeds about 500 mA DC.
Figure 5. Transformer saturation test results.
2) Power Supply with DC and AC Output Capability
A special power supply with the ability to add an AC signal to its DC output is used. One example in this category is the Kepco BOP series, a high-powered operational amplifier / power supply with outputs capable of both sustained DC and arbitrary AC waveforms. Additionally, the outputs can operate as a sink as well as a voltage and current source.
Figure 6. Connections for testing a DUT using the DC + AC Power Supply (see larger version).
After selecting the required DC voltage, we connect the signal generator output of an audio analyzer to the Voltage Programming Input on the front panel of the power supply. The input has a fixed gain of 2.0 to 20.0, depending on the model. This gain must be considered when selecting the audio analyzer generator voltage.
This article continues in Technote 106. Download Technote 106 for complete instructions in using the utility, examples, and a comparison of results between the two methods.
Other Recent Knowledge Base Articles:
©2009 Audio Precision Inc.