Question:
How do you generate Multiple Tone Waveforms for the E1445 Arb? Answer: Multiple-tone signals can deliver major contributions to
effective electronic test strategies. One application is
high-volume manufacturing, where fulfilling a test specification
simultaneously at several frequencies can save significant time
and cost. Another area of interest is telecommunications, where
signals for system control and test are often composites or
sequences of several tone frequencies.
Because of their exceptional versatility, Arbitrary Waveform
Generators are leading candidates for these applications. This
note illustrates typical situations and discusses pertinent
topics such as memory usage, sample rate, and output filtering.
Introduction
An Arbitrary Waveform Generator ("Arb") can replace
special-purpose signal sources in many applications, making test
systems more supportable and adaptable.
Of course, a prerequisite is that the Arb can generate the needed
signals. For simple waveforms this evaluation is easy: An Arb is
essentially a source of digital data driving a digital-to-analog
converter (DAC) at a chosen sample rate. Sometimes it's possible
to compute data samples in real time, but usually (for speed
reasons) these must be precomputed, and stored in a memory which
feeds the DAC. Arbs normally provide a selection of clock rates,
plus a way of allocating memory for several waveforms. Newer Arbs
offer features such as larger memories (sometimes able to store
waveforms in compressed form), waveform sequencing, and agile
timebases. As communications and product test applications
proliferate, and pressures build for faster test times, these
features gain increasing importance.
A Simple Case: Burst Signals
Generating very short bursts of a signal may require nothing more
than storing each burst as a one-shot waveform. Feasibility is
limited only by available memory. An Arb that can store several
waveforms can supply a corresponding variety of burst signals.
This solution is obvious, simple, and effective. When feasible,
it avoids many of the memory issues discussed below. However, the
considerations on sample rate and filtering still apply.
Introduction to More Difficult Cases
Often, memory constraints prohibit the one-shot approach. This is
because:
1. The duration of output signals is too long or indeterminate;
2. The required sample rate is too high;
3. The waveform durations are short, but the number of different
waveforms to be stored is too high.
Most difficulties succumb to one basic strategy: Exploit
repetitive waveform content, as shown in the examples below.
Basic Sampling Theory
Basic Fourier theory will help in understanding the sample rate
and filtering discussions to follow.
The signal to be generated ideally contains one sinusoidal
component for each desired tone. Each component has some definite
frequency and amplitude. The sampling process runs at some rate,
f(sample) samples/sec (Sa/s), which must be at least twice the
highest desired component frequency.
An ideal DAC would instantly output each sample's correct value,
then hold that voltage until the next sample. The resulting
output follows the desired waveform, but it has a "stairstep"
appearance. This is hardly the desired result, which should
smoothly vary with time.
The stairsteps in the output are associated with infinitely many
spurious frequency components, which sum in a precise way to
generate major deviations from the desired signal, including the
stairsteps. Usually, the most troublesome spurious component is
the one lowest in frequency, at
f(spurious) = f(sample) - (highest frequency of a desired component)
For adequately-high values of f(sample), this component's
frequency always lies above the highest desired tone frequency.
Thus, together with higher spurious frequencies, it can be
attenuated by a low-pass filter. While most Arbs contain two or
three internal filters, these represent a compromise for
mainstream requirements. Particular specifications for signal
components and spurious suppression can dictate an
application-specific filter. This may be added externally, or
sometimes the Arb manufacturer can supply a suitable product
configuration.
Besides causing the spurious frequencies, the sampling process
affects the original desired tones. Each component amplitude is
changed by the factor
(sin(x))/x , where x = (pi x f(component))/(f(sample))
This factor is less than unity, so the actual amplitude of
f(component) is less than the ideal value. This scaling is called
the "sin(x)/x" relation. At low values of f(component) it
approaches 1, and it falls to 0 at f(sample). Its effect in dB is
20 log ( sin(x)/x ). This effect can be anticipated, and
corrected for, by predistorting each tone's amplitude as it is
summed into a waveform. This factor also applies to spurious
components, and is helpful in attenuating them.
Example 1: A Five-Tone Signal
This example illustrates the basic considerations involved:
choice of stored waveform pattern length
choice of sample rate
actual vs. ideal output signal
whether an external filter is needed
memory consumption
Task:
For a mass-market audio product, minimize test time and
production cost of checking frequency response and distortion. 60
dB dynamic range is adequate. Specified test frequencies are 80,
360, 1240, 4480, and 15600 Hz. The required test duration has not
yet been specified.
Solution:
Maximize speed by testing simultaneously at all five frequencies
using the E1445A to generate a suitable composite signal. If the
waveform contains all five tones with equal amplitude, the output
of the device under test (DUT) can be digitized and analyzed for
flatness, harmonics, and other distortion products. The E1445A's
audio performance is compatible with the 0 dB requirement.
Because the test duration is undetermined, only a segment of the
5-tone signal can be stored in memory. By looping a programmable
number of times, the duration will be selected later. For looping
to cause no discontinuities, the segment must be defined with
care.
The Greatest Common Divisor (GCD) of { 80, 360, 1240, 4480, and
15600 } is 40, so the composite signal's true periodic rate is 40
repetitions per second (period=0.025 sec). A memory segment with
0.025 second's worth of data will therefore contain an integral
number of cycles for each tone, and an appropriate sample rate
will be a multiple of 40 Sa/s. By Nyquist theory, e rate must
also be at least twice the highest desired component, i.e. 2 x
15600 = 31200 Sa/s. The smallest conceivable memory usage is
0.025 sec x 31200 Sa/s = 780 locations.
Insufficient Oversampling
Unfortunately, sample rates near the Nyquist minimum create a
difficult filtering problem. Suppose a sample rate is chosen near
the theoretical minimum of 31200 Sa/s, say 36000 Sa/s. With the
desired signal having a component at 15600 Hz, the troublesome
spurious signal identified above occurs only 30% higher in
frequency, at 36000 - 15600 = 20400 Hz. For purposes of
filtering, the frequency separation is small. A suitable filter
must remove 20400 Hz and higher frequencies, yet provide (after
compensation for sin(x)/x) a flat response for all five desired
tones. These specifications would require an application-
specific filter.
A Practical Sample Rate
A faster sample rate ("oversampling") greatly simplifies
filtering. At 15600 = 984400 Hz, where the E1445A's built-in 250
kHz filter has more than 30 dB of rejection. The sin(x)/x
relation provides 36 dB more, for a total greater than 66 dB. An
external filter is not necessary. For the desired 15600 Hz, the
ideal flat frequency response is negligibly degraded -- by less
than 0.008 dB from the filter, and less than 0.004 dB from the
sin(x)/x effect. Therefore, 1,000,000 Sa/s is a good choice.
Memory Requirement
Storing .025 seconds of data at 1000000 Samples/sec requires
25,000 points -- more than 30 times the bare minimum value of 780
points. Such memory consumption is the price of oversampling,
which allowed the built-in filter to suffice. The E1445A's total
memory is 256K samples, so 90% of it still remains for other test
needs.
Program Code for Example 1
The waveform data will be a list of 25000 voltage samples,
generated in the host by an algorithm which will look something
like (depending on the host language):
for k=0 to 24999 v(k)= sin(80 * 2 * Pi * k / 1000000)
+ sin(360 * 2 * Pi * k / 1000000)
+ sin(1240 * 2 * Pi * k / 1000000)
+ sin(4480 * 2 * Pi * k / 1000000)
+ sin(15600 * 2 * Pi * k / 1000000)
In 25000 locations this defines 2, 9, 31, 112, and 390 cycles of
80, 360, 1240, 4480, and 15600 Hz respectively. This will be
stored into a single memory segment, named "My_seg", which in
turn will be the only segment in a "sequence" called "Tones". (A
waveform in the E1445A is always called a "sequence", even when
it contains only one segment.)
*RST;*CLS Reset Clear Status
SOURce:FREQuency 1000000 For arb waveforms, FREQ is sample rate.
SOURce:FUNCtion USER Arb waveform mode.
SOURce:VOLTage 5 Scales gain; corresponds to 5 V peak output.
OUTPut:FILTer:LPASs:FREQuency 250kHz Chooses one of the filters
Ss:STATe ON
ARM:STARt:LAYer1:COUNt INF Waveform repeat 37 times.
Ready to define waveform.
SOURce:LIST1:SSEQuence:DELete:ALL Clear waveform from memory
SOURce:LIST1:SEGMent:DELete:ALL
SOURce:LIST1:SEGMent:SELect My_seg Select a name for the new segment
SOURce:LIST1:SEGMent:DEFine 25000 Allocate 25000 locations for it
SOURce:LIST1:SEGMent:VOLTage
|