Equations shape AWG waveforms
To test a circuit or a system, you can use equations to produce repeatable, predictable waveforms on an arbitrary waveform generator.
Martin Rowe, Senior Technical Editor -- Test & Measurement World, 5/1/2001
When testing just about any circuit, you often need to subject your UUT to well-defined stimuli. To test a circuit or system under known, calculated conditions, you can create your own waveforms through equations and play those waveforms on an arbitrary waveform generator (AWG).
AWGs let you create waveforms from equations in many ways. Some bench AWGs, for example, let you build equations right on the instrument. Others require PC software to write the equations. Equation-writing software ranges from manufacturer-supplied waveform builders to spreadsheets, math packages, and text editors. After you create an equation, you either download it into the AWG, which compiles it into waveform points and stores the points in the instrument’s memory, or you compile the waveform and download its points from a file.
|
| Figure 1. Test an antilock-brake subsystem with a waveform that increases in frequency and amplitude over time. Courtesy of PC Instruments. |
Suppose you wanted to generate a signal that tests an antilock-brake subsystem. The signal is a sine wave that linearly increases in both amplitude and frequency over time. Figure 1 shows the waveform that an AWG will produce from the equation below, which combines a swept-frequency sinewave with a ramp function.
for 0 < t < T0
where
and
A0 = 0.5 V
f0 = 250 Hz
T0 = 1 s
A bench AWG may have built-in equation functions and a compiler that creates voltages from equations. Built-in functions include sine, cosine, pulse width, and exponential decay or rise. See “Waveforms and equations" for examples. These AWGs typically let you define a variable in terms of math functions and operators. See “Examples of real AWGs” for descriptions of how two instruments create waveforms from equations.
Once you write the waveform equation, you need to download it into your AWG. Some bench AWGs let you download equation scripts directly from Matlab or Mathcad into the instrument’s hard drive or a disk. The AWG then compiles the equation scripts and stores the data they produce in its memory. When you start the instrument, it sends the waveform, point-by-point, to its ADC and output filters.
Not all bench AWGs incorporate waveform compilers. In fact, board-level AWGs include neither compilers nor disk drives. They rely on a host computer to compile equations into waveform points and store them in files. For AWGs without compilers, you can develop your waveform equations with a spreadsheet or math-software package. You can produce the waveform in Figure 1 by calculating each point with a spreadsheet, creating a text file indicating amplitude vs. sample, and loading the data into the AWG’s memory. In effect, you create an array that represents amplitude vs. samples. Depending on your AWG and your application, you may need to use your PC software to scale your signal’s amplitude into volts or your AWG may do that for you.
You must also specify the AWG’s sample clock rate or the waveform’s time duration. With some AWGs, you specify the sample clock rate. In others, you specify the waveform’s time duration, and the instrument calculates the clock rate based on the time and number of samples.
If your bench AWG doesn’t compile equation scripts or you’re using a card-based AWG, you can still use math software packages to create a waveform’s points. Agilent VEE, for example, integrates Matlab scripts into graphical programs. National Instruments’ LabView has a graphical math toolkit from which you can generate equations, store them in files or arrays, and download them into an AWG.
The program in Figure 2 downloads a test waveform into an AWG at the start of a test session. Tom Melle, hardware test engineer at IBM (Raleigh, NC), developed a test that uses an equation in Agilent VEE to produce a disturbance on an AC power waveform. The disturbance is a decayed 400.35-Hz sine wave riding on a 60-Hz signal. The program calculates the points on the waveform, stores them in an array, and downloads them into an AWG. The AWG repeats the 1024-point waveform 10 times at 3-s intervals. In between sending the disturbances, the AWG produces clean AC waveforms. The AWG’s output drives a programmable power source, which powers the UUT. T&MW
|
| Figure 2. You can program the points in a waveform through equations in a programming language. Courtesy of IBM. |
For more information
“Easy Waveform Creation using Math Entry on the 20xx Waveform Synthesizers,” Application Note AD-1048, Analogic, Peabody, MA, 1998. This note provides a math overview plus more than 30 waveform examples. It is available by contacting Analogic at 978-977-3000.
“G Math—A New Paradigm for Mathematics,” National Instruments, Austin, TX. zone.ni.com, (click on Resource Library, LabView, General, and look under Tutorials). The tutorial provides examples of how to use LabView’s G Math Toolkit to create equations graphically.
“Waveform Creation Made Easy,” LeCroy, Chestnut Ridge, NY. www.lecroy.com/tutorials/WaveformCreation/WaveformCreation.html. This tutorial shows you how to use equations in the LW 420 AWG and gives examples for using equations to create 33 waveforms.
Martin Rowe has a BSEE from Worcester Polytechnic Institute and an MBA from Bentley College. Before joining T&MW in 1992, he worked for 12 years as a design engineer for manufacturers of semiconductor process equipment and as an applications engineer for manufacturers of measurement and control equipment. E-mail: m.rowe@tmworld.com.
| Examples of real AWGs
Each AWG manufacturer uses a different method to create waveforms from equations. With a LeCroy LW 420, you use math functions and operators to create up to 16 equations. You assign each equation to a variable. To create the signal in Figure 1, you can set the entire equation equal to a single variable. You can also break the waveform’s equation into several variables and combine them in another equation. When you split an equation into variables that represent the equation’s components, you can use those components in other waveforms. You can individually test each variable. The Tektronix AWG610 uses a C-like scripting language that includes “for-next” loops and “if-then-else” decisions. Listing 1 gives an example of how to use the scripting language to create a spread-spectrum clock. Each portion of the complete script resides not just in a separate variable, but in a separate file. You can store the files on a disk drive or on the AWG’s internal drive and reuse the waveforms in other test applications.—Martin Rowe Listing 1 —Courtesy of Tektronix |


















