Function & Arbitrary Waveform Generator Guidebook

Introduction

Function and arbitrary waveform generators are among the most important and versatile pieces of electronic test equipment. In electronic design and troubleshooting, the circuit under scrutiny often requires a controllable signal to simulate its normal operation. The testing of physical systems and transducers often needs stable and reliable signals. The signal levels needed range from microvolts to tens of volts or more.

Modern DDS (direct digital synthesis) function generators are able to provide a wide variety of signals. Today's basic units are capable of sine, square, and triangle outputs from less than 1 Hz to at least 1 MHz, with variable amplitude and adjustable DC offset. Many generators include extra features, such as higher frequency capability, variable symmetry, frequency sweep, AM and FM operation, and gated burst mode. More advanced models offer a variety of additional waveforms and Arbitrary Waveform Generators can supply user-defined periodic waveforms.

Function generators are used where stable and repeatable stimulus signals are needed. Here are some common uses and users:

  • Research and development
  • Educational institutions
  • Electronic and electrical equipment repair businesses
  • Stimulus/response testing, frequency response characterization, and in-circuit signal injection
  • Electronic hobbyists

To use a function or arbitrary waveform generator to its best advantage, the user should have a basic understanding of the instrument's controls, features, and operating modes. This guidebook is useful to those with little knowledge of function generators, as well as the experienced technician or engineer who wishes to refresh his/her memory or explore new uses for function generators and more sophisticated arbitrary waveform generators.

First, we will explain the controls of a typical function generator. Next, we will look at the theory of how a DDS function generator works. The next section is on applications and contains the majority of the material in this guidebook. A final section discusses common questions. An appendix provides a glossary of terms related to function generators.

There are a variety of function generators on the market spanning the cost range from a few tens of dollars to tens of thousands of dollars. Some are dedicated instruments (the ones we will look at in more detail), some are black boxes with USB interfaces and an output terminal, some are plugged into computer or instrumentation buses, and some are software programs that run on a PC to generate waveforms on the parallel port or via a sound card. There are also inexpensive kits for hobbyists.

The software-only function generators tend to be the least expensive and can be attractive for students and hobbyists on a budget. They are also the most limited in frequency capabilities, often just spanning the audio range.

The black boxes are next in cost and have the advantage of portability and low power. They are often intended to operate with laptop computers.

Generators that plug into different buses (e.g., PC, VXI) are appropriate where space is at a premium and a custom measurement system needs to be put together for e.g. a dedicated purpose.

Dedicated benchtop generators are self-contained with the needed controls and display. The more expensive dedicated instruments add features and usually include one or more types of interface connections that allow computer control.

Function Generator Controls

The B&K Precision model 4040DDS function generator shown on the following page is a representative of modern DDS function generators. We will describe the numbered controls and their functions. Thefront panel of this instrument is 225 mm wide by 100 mm tall (8.85 inches by 3.94 inches). The instrument is about 245 mm (9.64 inches) deep and weighs about 2.5 kg (5.5 pounds).



Control

Function

Purpose

1

Power switch

Turns the instrument on and off.

2

Setting adjustment knob

Adjusts the parameter selected by the other buttons.

3

Sine wave selection

Selects sine wave output.

4

Counter/trigger input

Input terminal for frequency counting or external trigger signal. Note there is a maximum signal input rating.

5

Ramp wave selection

Selects ramp (triangle) wave output.

6

Modulation signal input

Input terminal for external modulation signal. Note there is a maximum signal input rating.

7

Square wave selection

Selects square wave output.

8

Synchronization signal output

Provides a signal (typically a square wave or pulse) that is in phase with the output signal; often at TTL levels.

9

Amplitude-offset adjustment

Knob to adjust either the signal amplitude or DC offset voltage.

10

Signal output

Output terminal for the function generator's signal. Usually has a 50 output impedance.

11

Set to counter mode

Enables the counter input and displays the frequency of the input signal on item 4.

12

Change utility settings

Adjust frequency sweep start frequency, sweep stop frequency, and display intensity.

13

Set DC offset

Enable the adjustment of the DC voltage added to the signal output (control 10).

14

Select modulation

Selects no modulation, internal AM modulation, external AM modulation, FM modulation deviation, and external FM modulation.

15

% Duty cycle

Adjusts the duty cycle or symmetry of the displayed waveform.

16

Sweep

Turns the frequency sweep mode on and off and allows selection of a linear sweep or logarithmic sweep.

17

Frequency

After pressing this button, the adjustment knob (control 2) will adjust the output signal's frequency.

18

Mode

Selects the type of operation: continuous output, trigger repetition rate (sets the interval between the internal trigger; each trigger signal causes the generator to output one period), external trigger, manual trigger (pressing the → button causes one cycle to be output), or external gated (waveform cycles are output while the gate signal is above a threshold).

19

Digit adjustment <

Moves the digit selection left.

20

Digit adjustment >

Moves the digit selection right.

21

Display

Shows the function generator's settings, such as frequency, amplitude, waveform selected, etc.

Typical waveforms

Two of the common waveforms generated by function generators are the sine and square waves. A graph of a sine wave is shown:


The mathematical representation of the sine wave is

where A is the amplitude in volts, t is time in seconds (the horizontal axis), V is the vertical axis in volts, and f is the frequency of the sine wave in Hz. is the phase of the sine wave (in the graph, the sine wave is shown with a phase of 0).

Two other measures of a sine wave's amplitude are often used: RMS and peak-to-peak voltage. The RMS (root mean square) value is used to measure the heating ability of a waveform. The RMS voltage value of a periodic waveform is the value of a DC voltage which would deliver the same effective power (or heating ability) to a load as does the periodic waveform. For a sine wave, the RMS amplitude is shown as VRMS in the figure. The relationship of the RMS amplitude to the amplitude of a sine wave is

It is important to note that RMS value is not the same for other types of waveforms. This relationship to the amplitude only applies to sine waves.

Another measure used for the amplitude is the peak-to-peak voltage

DDS function generators may have the ability to let the user set the amplitude using the peak-to-peak voltage or the RMS voltage. Some generators let the user set the amplitude in dBm, which represents a power of 1 mW. The voltage that this represents depends on the associated load resistance. You can calculate the RMS voltage VRMS for a given dBm value and resistance R in from the following equation:

For example, a 0 dBm signal into 50 represents an RMS voltage of 0.2236 volts, but represents 0.7746 volts into a 600 load. Modern equipment is usually referenced to 50 loads, but older equipment often used 600 loads.

A sine wave can also have a DC offset voltage:

The DC offset voltage Vdc moves the whole sinusoidal waveform up and down with respect to the horizontal axis.

A square wave is shown in the following figure:


The equation for this wave is

The frequency shown is 1 Hz with an amplitude of 1 V.

The RMS voltage for the square wave is the same (an easy way to see this is to take the negative-going portion and flip it about the horizontal axis; this is allowed as far as its heating ability is concerned). The peak-to-peak voltage is, again, twice the amplitude voltage and in this case equivalent to twice the RMS voltage.

If a square wave has a DC offset equal to its amplitude, it becomes a pulse waveform (and can be positive or negative).

DDS Theory of Operation

Most modern function generators use Direct Digital Synthesis (DDS) for generating their output waveforms. Older generators used analog methods, which greatly increased the part count (component count) and made them sensitive to component aging and thermal drift. This section describes how DDS technology works. We ignore the implementation details and just look at the principles.

There are two fundamental ideas of DDS technology:

  1. Generating an arbitrary periodic waveform from a periodic ramp signal.
  2. Generating a digital ramp.

Let's first look at generating an arbitrary periodic waveform from a periodic ramp signal. In the following, to keep things simple, we will only use times t 0.

We will call the repetitive ramp function R(t):


This ramp R(t) varies linearly between 0 and 1 with period T. Now, suppose we have any arbitrary function f(ξ) that is defined on the interval 0 ξ < 1. In mathematical terminology, the domain of the function is the half-closed interval [0, 1). Here's a graph of what f(ξ) might look like:


Suppose we want to generate a periodic waveform of period T with the shape of the function f(ξ). Here's the key idea:

To construct a periodic waveform of period T with shape f(ξ), r eplace the ramp's value R(t) at time t with the value of f(t/T - int(t/T)), where int means 'take the integer value'.

Note that t/T - int(t/T) winds up being a number in the interval [0, 1) -- i.e., within the domain of f(ξ).

This is such a simple and useful idea. Let's look at an example. Suppose we want to generate a 1 kHz sine wave. Let f(ξ) be the sine wave sin(2ξ) where 0 ξ < 1. We generate a 1 kHz ramp; it has a period of 1 ms. Here's how we generate the sine wave:

  1. Pick any time t0 0.
  2. Calculate ξ0 = t0/T. This will be a real number; chop off the integer part, leaving a decimal number between 0 and 1.
  3. Replace the ramp value R(t0) with the value sin(2ξ0).
  4. Repeat for all other times.

To proceed to the DDS method, all we have to do now is replace R(t) with a digital ramp r(t). In the following picture, we show two digital ramps. The first one in red has a period of one half of the second one in blue. Both ramps are made with the same digital sampling rate.


Figure 1


 

The utility of DDS comes from the fact that it is easy to generate digital ramps of different slopes using digital counting techniques. Here's the second fundamental idea of DDS:

To construct a digital ramp, increment a digital counter by on each clock signal.

Now, this statement won't be clear until we explain it. Suppose we have an N bit counter -- this counter counts from 0 to 2N - 1, then rolls over to zero again. Instead of incrementing this counter by 1 on every clock pulse, we increment it by where 1 < 2N. When used with a periodic clock signal with uniform period, this counter generates a digital ramp. Here's a picture that shows what's happening:


Each dot represents a counter value. The counter starts at 0, as indicated by the horizontal red vector. When a clock pulse is received, the counter is incremented by (you may read literature that calls the counter the "phase accumulator"). The counter's value is now shown by the second red vector at about 60°. If you imagine the second red vector is uniformly rotating counterclockwise in steps of , you can see that the rotating vector sweeps out the subsequent points of the ramp. For example, if we imagine that the vector rotated 60° counterclockwise with every clock pulse, then the digital ramp values would be:

0, 60/360, 120/360, 180/360, 240/360, 300/360, 360/360 (i.e., 0), etc. The decimal values are:

0, 0.17, 0.33, 0.50, 0.67, 0.83, 0, 0.17, ...

If you plotted these numbers, you'd see they formed a digital ramp. The digital ramps in Figure 1 iffer in slope because they were made with different values for .

In real DDS implementations, N, the number of bits in the counter, might be 48 -- meaning 2N is a large number, about 2.8×1014. The clock signal is then run at 1 MHz, 50 MHz, 100 MHz or faster. With a 48 bit counter clocked at 100 MHz, you can see the frequency resolution will be 100×106/248 = 3.5×10-7 Hz, or in the Hz range.

DDS is popular because this counting can be implemented in digital hardware that has low parts count (i.e., is simple, which implies better reliability and lower cost) and is fast.

The function f(ξ) is often a sine wave. Because of the symmetry of sinusoidal functions, only one-fourth of the waveform needs to be stored in memory (the portion from 0 to /2 radians). Because of Nyquist's sampling theorem, good sine waves approaching half the clock frequency can be made with a good low-pass filter following the function block. This leads to the rule of thumb that the clock frequency of the DDS generator will be about 2 to 2.5 times the maximum sine wave frequency.

The ramp generator's frequency can be calculated from

which shows that the ramp frequency is a fraction of the clock frequency, as /2N is a number between 0 and 1. Remember that is the counter increment value and N is the number of bits in the counter.

To summarize how a DDS function generator works:

A digital ramp is generated and the desired waveform's shape is substituted for the ramp as discussed above.

Let's look at the basic relationships between sample rate, period, and frequency for a DDS generator's waveform. Let

Then we have the equations

(1)

 

Advantages and disadvantages of DDS

Advantages:

  1. The frequency is tunable with sub-Hertz resolution.
  2. The phase is digitally adjustable.
  3. Conceptually simple design and low parts count (these help keep cost down).
  4. No drift due to temperature changes or aging of components (as long as the clock is stable).
  5. Addition of arbitrary waveform generation is not conceptually difficult.

Disadvantages

  1. Output frequency is 1/2 the clock frequency.
  2. Amplitude is fixed; need external circuitry to change.
  3. Sine wave is sampled and not spectrally pure; distortion is present.

With careful design, these disadvantages can be minimized.

DDS generator capabilities

A DDS generator's frequency is usually specified as the maximum sine wave output frequency. This is because the sine waves can be generated at nearly half the clock frequency. Generating a square wave from a sine wave is conceptually easy: a comparator outputs a "1" when the sine wave's amplitude is greater than 0 and a "-1" when the sine wave's amplitude is less than 0. However, maintaining the fidelity of a square wave is harder because of the rich harmonic content -- the post-processing circuitry (e.g., amplitude adjustment) needs to be of a higher bandwidth than for a single sine wave. Thus, it is not uncommon to see the square wave maximum frequency to be half or less of the sine wave maximum frequency. A similar comment applies for pulse generation, where the spectral requirements can be even more demanding.

Some function generators provide specialized waveforms as added features. These are additional functions f(ξ) that are stored in the generators read-only memory (ROM). They can be useful for specialized tasks. For example, a circuit designer working on a power supply filter can test with a full-wave rectified sine wave signal without needing a transformer and rectifier circuit. A geophysical researcher can input a low-level earthquake signal into a seismometer's circuit to test the system's response. A medical researcher can use the generator's cardiac signal as input to a circuit used for cardiac monitoring.

Since these specialized waveforms need to be generated accurately, their maximum output frequency will often be much less than the typical sine and square wave frequencies available from the generator.

Arbitrary waveform generation

With the counter and the function f(ξ) to turn the ramp into a desired waveform, it's not a large conceptual step to let the user define the function f(ξ). This results in an arbitrary waveform generator (AWG), although now the function f(ξ) needs to be stored in non-volatile writable memory rather than ROM.

 

Figure 2

Using the above formulas, we can generate the following graph for the relationships between the number of samples in the waveform, the sampling rate, and the maximum waveform frequency an arbitrary waveform generator can output:

You can use this graph to relate how much temporal "detail" you can put into an arbitrary waveform and the highest frequency the generator will be able to repetitively output the waveform. As an example, with a 100 MSa/s sampling rate, 100 kHz is the fastest you'll be able to play back a waveform with 1000 points in it.

Some digital electronics users also use the term AWG to refer to a device that can output arbitrary streams of digital information. Another name for these devices is pattern generator. However, a pattern generator is typically used in conjunction with a logic analyzer. A pattern generator may output digital information over 8, 16, or more parallel digital lines at once. They are often used in applying a known sequence of digital words to a digital system.

The ability to define and generate custom waveforms is so useful that we will take a closer look at a typical arbitrary waveform generator (AWG) and some of its features in the next section.

Arbitrary Waveform Generators

Modern DDS function generators often come with the ability to generate arbitrary waveforms (the reason why is explained in the DDS Theory of Operations section on page 6).

A function generator with the ability to generate arbitrary waveforms is the B&K 4078, as shown in the picture below. This is a generator with two independent output channels, which is a nice feature for stimulating two systems simultaneously. In this model, the two channels share a 4×105 byte memory for defining the arbitrary waveforms. Amplitude resolution is 14 bits. This means the amplitude of the arbitrary waveforms vary between -(213-1) to +(213-1) or -8191 to 8191 (other AWGs require the programmed amplitude to be between -1.0 and 1.0). Amplitude resolution for the built-in waveforms is three digits (1000 counts). The generator is capable of 10 volts peak to peak output into 50 and ±5 volts of DC offset (the amount allowed depends on the amplitude setting).


This generator can generate 1 Hz to 25 MHz sine and square waves, 1 Hz to 5 MHz triangle and ramp waveforms, and 1 mHz to 10 MHz pulses. AM, FM, and FSK modulation are available (AM modulation can also be done on the arbitrary waveforms). The instrument comes with a serial port and an optional IEEE-488 GPIB port.

A handy feature on an AWG is a display screen that shows you an approximate picture of the arbitrary waveform. This can help protect against mistakes such as selecting the wrong waveform from memory. The display only shows an approximation of the waveform, as it typically doesn't have enough resolution to show all of the points in the waveform.

The only thing that gives you a clue that this instrument is different from a function generator (besides the title) is the ARB button (see red arrow in the above figure). This is used to access the AWG features through menus controlled by the F1-F4 keys.

A user can typically get the instrument's memory loaded with an arbitrary waveform in one of three ways (we refer to the utility program for constructing waveforms included with the instrument as the "AWG application software"):

  1. Define it with the AWG application software and then use it to download the waveform to the generator. This is probably the most commonly-used method. The software gives you a variety of methods to construct the desired waveform, such as point-to-point drawing with the mouse, line drawing, etc.
  2. Create the waveform without using the AWG application software included with the instrument. This covers using custom-written programs and scripts to generate an appropriate data file. The waveform data can then be loaded with the AWG application software or can be directly downloaded to the instrument over the interface using the instrument's software commands.
  3. Create and edit the waveform in the instrument's memory using the front panel controls of the instrument.

Once the desired waveform is loaded into the instrument's memory, it can be used to generate an output waveform by selecting the arbitrary mode. The desired arbitrary waveform is designated (there are various methods depending on the generator), the frequency, amplitude, and DC offset are set, and the waveform is generated. The user may then have the usual tools of triggering, gating, bursts, modulation, etc. with which to control the output (the features can vary -- check the instruction manual).

Applications

Response testing with function generators

Stimulus-response testing is widely used to characterize behavior. Because many physical phenomena can be converted to and from electrical signals, a function generator is a good general-purpose stimulus source.

Frequency response measurement

A function generator can be used to characterize the frequency response of a system. This can be done manually, but it is labor-intensive and prone to errors. The operator sets the frequency, then measures the system's response. The results can be plotted with frequency on the horizontal axis and the response on the vertical axis. If the phase response can also be measured, a Bode plot of the system's response can be made.

Modern function generators often have the ability to sweep the frequency of the output signal. This is a fast way to characterize frequency-dependent behavior because it's easy to set up and display on an oscilloscope. We will briefly discuss how this can be done with older analog equipment, and then look at how it's done with modern DDS generators and digital oscilloscopes.

Using analog equipment

Older function generators often have an output terminal for a DC voltage that is proportional to the frequency. This can be used to drive the oscilloscope's horizontal axis (the scope needs to be put into the x-y display mode). If such a terminal is not available, you'll need to acquire or fabricate a frequency to voltage converter. Example integrated circuits that can be used for this task are the Analog Devices AD650, the National LM2907, or the Microchip TC9400. If you wish the horizontal axis to be logarithmic, you'll also need a logarithmic amplifier. While these techniques can be used, in practice they can be time consuming.

Depending on the sweep rate, you may need a storage scope or one with variable persistence. Very low sweep rates can benefit from an x-y recorder or chart recorder.

An alternate technique is to set the function generator's sweep time to a value that is the same as one of the calibrated timebase settings of the oscilloscope and use the normal timebase of the oscilloscope instead of making an x-y plot. This technique is discussed in the next section.

Using DDS generators and digital oscilloscopes

Since the sweep time of the generator can be set to a specific value, it is easiest to set it to a calibrated timebase setting of the oscilloscope. Then the scope is swept normally and the system's response is input to the scope's vertical channel. Here's a procedure to generate a frequency response plot on an oscilloscope:

  1. Set the function generator's amplitude to a minimum.
  2. Connect the function generator to the system to be tested.
  3. Set the function generator to the waveform you wish to sweep with (a sine wave is commonly used). Ensure the amplitude is appropriate for all the frequencies you will be sweeping over.
  4. Set the sweep start frequency, stop frequency, and sweep time. Choose a sweep time that is the same as one available on the oscilloscope.
  5. Connect the output of the system to a vertical channel of the oscilloscope.
  6. You may be able to use the sync signal from the generator to trigger the scope, as it should occur at the beginning of the sweep. You will have to check this, as not all function generators operate this way. If not, the function generator can be manually triggered for one sweep and the oscilloscope set up to capture this single sweep.
  7. Increase the amplitude of the function generator's output signal until you get an adequate frequency response plot on the oscilloscope. You may have to slightly adjust the scope's timebase or horizontal position to get an acceptable display.

With a little practice, this should be quick to set up and get a frequency response plot. The plot can be saved to document your work.

The following scope trace shows the frequency response of an RC low-pass filter where R = 3 k and C = 95 nF (calculated 3 dB point is ). The start frequency was 100 Hz and the stop frequency was 2 kHz.

Scope trace shows the frequency response of an RC low-pass filter where R = 3 k and C = 95 nF

 

System response testing with square wave

A square wave contains only odd harmonics of the fundamental frequency. The harmonics' amplitudes fall off as 1/n, where n is the multiple of the fundamental frequency. Thus, a fast rise time square wave is a wide bandwidth signal and can be quickly used to characterize a system's behavior, for instance that of an amplifier. The interpretations given here assume the system under test is linear, time-invariant, and not a narrow-band system. Testing a system that isn't linear and time-invariant with square waves can of course still be done, but the interpretation of the output waveforms may be different than given here.

The connections for square wave testing are as follows:



The following waveform shapes give you clues about the system behavior:


 

Arbitrary waveform generator examples

Exact stimulation

A common use of an arbitrary waveform generator is to stimulate a system with a complex waveform. These complex waveforms can be calculated ("exact") or be digitized signals from e.g. an oscilloscope. In this section, we will look at generating an exact waveform; the next section shows the use of a digitized waveform. Fine adjustments can be made to the waveform's shape, and the system designer can see the effects of incremental changes.

The example we will use here is a normal sine wave with a spike on each peak. The AWG used was the B&K 4078 and the oscilloscope used was the B&K 2534 60 MHz digital storage oscilloscope.

It would be time consuming to develop an analog or digital circuit to generate this sine + spike waveform, but is almost trivial with an arbitrary waveform generator. While the software application that accompanies the AWG can be used to generate the waveform, the author prefers using a script or program because it gives exact control over all parts of the wave. Here's a python script (you can freely get python from http://www.python.org/) that prints the desired waveform to standard out, which can then be downloaded to the AWG:

from __future__ import division
from math import pi

num_points = 1000
amplitude = 4000
peak_amplitude = 8000
print "4075" # First line needed to identify generator

# Flags to allow peaks only one point wide
positive_done = False
negative_done = False
threshold = 1e-4

for i in range(num_points + 1):
x = i/num_points # Fraction along X axis
y = int(amplitude*sin(2*pi*x))
if not positive_done and abs(x - 1/4) < threshold:
positive_done = True
y = peak_amplitude
if not negative_done and abs(x - 3/4) < threshold:
negative_done = True
y = -peak_amplitude
print str(y)

This script was run in a console as python sine_spike.py >sine_spike.txt. The file sine_spike.txt was opened in the AWG's software program and downloaded to the generator. The following figure shows what the waveform looks like when plotted on the computer.



The following picture shows what the waveform looked like on the oscilloscope when the frequency on the 4078 generator was set to 60 Hz and the amplitude was set to 1 volt.


 

Measurement cursors on the oscilloscope showed that the voltage between the top of the positive spike and bottom of the negative spike was 1.01 volts, which confirms the desired output (the AWG's output was terminated into 50 at the scope's input). The scope showed that the width of the pulse at the peak was 16.7 s. This was correct, as the AWG stated that the time per point was 16.66 s. Changing the frequency of the waveform to 1 kHz, the AWG stated the time per point was 1.00 s and it was measured on the scope at the same value. The AWG was able to display this waveform up to 99.6 kHz before stating there was a setting conflict, meaning the asked-for waveform was beyond the generator's sampling frequency. This is equal to the 100 kHz predicted by Figure 2 because the number of points in the waveform was 1000.

This sine + spike waveform only consumed 0.025% of the AWG's waveform memory, so much more detail could have been shown in a waveform. Alternately, fewer than 1000 points could have been used -- this would have allowed the sine + spike to be displayed at a higher frequency than 99.6 kHz, although the spike width would have been larger because the sampling rate of the generator is fixed at 100 MSa/s.

An advantage of using a script to generate the waveform is that it is straightforward to modify the waveform and download it to the function generator.

Combined with an amplifier that would increase this signal's amplitude to line voltage and power levels, one can see that this is a powerful tool for measuring the effects of power line noise. Other scripts could be used to generate other types of noise and build a library of distorted power line voltages.

Many AWGs have screens that will allow you to examine the downloaded waveform. This is a valuable feature, as you can verify the waveform selected for output. Be aware, however, that displaying the short transients shown on the waveform example we are using here may or may not be displayed on the AWG's screen because of limited display resolution.

The marker output terminal on the back of the AWG was used to get a TTL trigger pulse occurring at a specific point on the sine + spike curve. The marker was set to trigger at point 250 of the waveform (this is one point before the spike) and the pulse width was set to 10 sample points wide; see the following figure. This made the rising edge of the marker pulse occur 1.0 s before the spike. This could be useful in triggering an oscilloscope to examine a system's behavior right when the spike occurs. (Note: in the following figure, the waveform was being displayed at 1 kHz.)


 

Since the position of the marker is controlled from the AWG's control panel, immediate and fine control can be had over the marker's position and width. This makes the availability of the marker signal very useful.

There are two important points to be made here about using AWGs. First, it is best if you define your waveform so that there are no discontinuities created when the waveform is repeated by the AWG. A discontinuity is created if the last point of the waveform is not the same as the first. If such a discontinuity is created, the frequency content of the generated wave may be much larger than you intended.

The second important point is that you should use, if possible, all of the generator's vertical resolution when defining a waveform. In the simulated bouncing switch in the next section, only half of the vertical range was used (the positive half). For a more realistic simulation, the full range would have been used. However, to duplicate the 0 to 1 volt signal seen on the real switch, a DC offset of half the peak-to-peak amplitude would have to be added to the waveform.

Generating noise signals

In real life applications, noise is inherent in nature and exists in electronic devices. For this reason, it is often important to have a noise signal inject into a device under test (DUT) to test its behavior in a more realistic simulated scenario. There are various types of noises, and two of the most common types are white noise and pink noise. With the capabilities of an AWG, these noise can be approximately simulated at the output of the generator. White noise has a flat power spectrum and equal power per unit frequency, while pink noise has equal power per octave. If you choose to test an audio system using noise, use pink noise, as you might put too much energy into the tweeters if you use white noise. Pink noise in an audio system is useful because if you listen carefully and hear sounds that don't sound like noise, you may have found an imperfection in the audio system's response.

One simple way to create a white noise signal is to use a B&K Precision model 4075. This AWG comes with a built-in function to generate random noise, in addition to giving user custom controls to scale as well as define the resolution or length of the signal.

Generating long delayed signals

Many function generators often have a time range that allows you to create a pulse or a signal with a time delay. Often the limits are confined to a certain amount of seconds. For some applications that require an extended delay, often the user must have a function generator that can be programmable with software to control the delay. A better alternative would be to use AWGs, as they become very useful for such applications. For example, the 4076 have arbitrary waveform memory that allows waveform creation up to 4 million points. With the vast amount of memory, an extended delay can be created without the need for software control. The user can create their desired waveform and configure their delay time based on a set number of points, which can be quickly setup from the front panel of the instrument. With its large memory, the 4076 can create a signal with a delay of over a year or more!

Captured waveform stimulation

Transient events are all around us and can be hard to duplicate, yet we may need to reliably and repeatedly duplicate them for testing purposes. Capturing a transient on a scope, downloading it to an arbitrary waveform generator, then using the AWG to generate the transient makes this duplication almost a simple task.

We will use the simple example of contact bounce of a mechanical switch. The following figure shows a trace captured of contact bounce (a microswitch connected to a DC power supply set to 1 volt) over a period of 3 ms:


 

The circuit used was

 

 

 

The B&K 2534 oscilloscope captured this waveform with 4000 data points (shown below are a few of the values at the beginning and end of the file):

These data were downloaded to the AWG and a single trace was obtained from manually triggering the AWG:


 

If you compare this figure to the previous figure, you'll see that they are substantially the same waveforms. However, the present figure was generated with the generator set to a frequency of 1 Hz, so the horizontal duration on the screen is 1.2 s. This showcases another feature of the AWG: These arbitrary waveforms can be generated over wide frequency ranges.

Function Generator Questions and Tips

Why isn't the output voltage correct?

Many function generators are designed with a 50 Ω output impedance. This is because the common RF connection cables (e.g., RG-58/U) have characteristic impedances of 50 ohms. Some generators have adjustable output impedance. The amplitude of these generators is correct when the generator's output is terminated in a load that matches the output impedance. Thus, if you first terminate the output with the proper feed-through terminator, you'll measure the same voltage as the generator's setting. If you operate a 50 Ω impedance generator into a high impedance input, such as an oscilloscope with a 1 MΩ input impedance, you'll see approximately twice the stated generator output. A quick test is to put a non-reactive resistor (e.g., a carbon film resistor) across the output terminals of the suspected output impedance of the generator and check the voltage output across the termination resistor. Be careful not to exceed the resistor's power rating.

There's a lot of ringing on my pulses/square waves.

You probably have an impedance mismatch. Another symptom is that the measured amplitude on the scope won't match the generator's setting (see the previous question).

When you input a signal using coaxial cable into an oscilloscope with a high input impedance, you should terminate the coaxial cable with a 50 Ω feedthrough termination at the oscilloscope's input. If you omit the termination or put it on the output of the generator, you will have an impedance mismatch at the other end of the cable (where it connects to the scope) and you will see ringing on fast rise time edges.

If you don't have a 50 Ω BNC feedthrough termination, a 50 ohm carbon film resistor will work fine; don't exceed the power rating of the resistor.

How do I get pulses using my function generator?

Some DDS function generators supply pulses as a standard feature. These generators often let you control the pulse width, pulse repetition rate, and rise and fall times. Some older analog function generators have pulse capabilities; a symmetry adjust knob would change the pulse duty cycle.

If your generator has arbitrary waveform generation capabilities, you can program it with the pulse shape you want. While this is more work than the other methods presented here, it gives you flexibility to get (nearly) exactly the pulse shape you want.

If your generator doesn't have a pulse capability built-in, you can use a DC offset with square waves. For example, a 5 volt peak-to-peak square wave with a +2.5 volt DC offset will give you a TTL compatible square wave. If the function generator has a symmetry adjustment, you can use this to generate pulse trains with different duty cycles, usually between 20% and 80%.

If you need lower duty cycle pulses, the following approach might work. You can set the pulse width by setting up a square wave with a frequency of 1/(2τ), where τ is the pulse width in seconds, and the appropriate DC offset to make it a pulse with the desired polarity. Then change to external triggering and trigger the generator with another generator at the desired pulse repetition rate. A handy, low-cost secondary generator for triggering the pulses is the B&K 3003 hand-held generator shown in the following figure, which can generate sine and square waves from 0.1 Hz to 10 MHz. You may need to operate the function generator in burst mode for this to work.

Model 3003 Signal Generator

Example: We want a TTL-compatible 125 s wide pulse with a pulse repetition frequency of 1 kHz. Set the function generator to a square wave at 1/(2*125 μs) or 4 kHz. Set the amplitude to 5 volts and the DC offset to +2.5 volts. Externally trigger the function generator with another signal at 1 kHz.

How do I get a burst of pulses?

This is easy if your generator supports burst operation, as you just set the number of waveform cycles in the burst and trigger either internally, manually, or externally. It's a little more work if your generator doesn't support burst mode, but supports gated operation.

With gated operation, apply a periodic wave of proper duration as the gate signal to get the proper number of pulses out. Analog function generators allow you to adjust the trigger level which, when used with a sine wave for the gating signal, allows you to adjust the number of cycles in the burst. More modern function generators may require a TTL-level signal to "open" and "close" the gate.

As mentioned in the question for generating pulses, you can also use the arbitrary waveform generation capabilities if your generator supports them. It's more work to create the waveform, but it can include special features like short glitches or rounded edges.

How do I lock my generator to another generator?

Some function generators supply an input (usually on the back panel) that can take a reference frequency (often a 10 MHz signal). These generators can also output the 10 MHz signal and thus be the frequency reference to a group of other generators. Once these generators are locked to a reference signal, their output phase can usually be adjusted with respect to the reference frequency. Some laboratories supply a laboratory-wide 10 MHz reference signal.

If you have to lock two or more generators together that don't have the ability to input a common reference signal, it still can be done: you can trigger one or more generators from one reference generator. However, this technique may take a bit of care, as improper triggering can lead to improper output, such as unintentionally gated signals or a signal with a small but noticeable distortion. There may also be no way to control the relative phase between the signals. If you do use this method, it is recommended that you check the output of each generator with an oscilloscope to verify you're getting the correct signals. You may also want to build some circuitry for shaping and distributing the triggering signal.

How do I get more complex sweeping?

For generators that provide a sweep feature, the usual types of sweep are linear and logarithmic, which express how the frequency changes as a function of time. More complicated sweeping can be done using the frequency modulation capability. For example, if you want a sweep that completes faster than the built-in sweep capability (often around 10 ms at the fastest), you can use a faster ramp to frequency modulate the signal. You'll have to remain within the FM modulation frequency specification (usually around 10 to 20 kHz), but even at 1000 Hz, you will complete the frequency sweep in one millisecond.

A ramp voltage will give a linear sweep, but arbitrarily complex sweep profiles are possible. Complicated frequency hopping can be done using an arbitrary waveform generator and a custom waveform.

Tell me a little more about frequency modulation.

Don't confuse the frequency specification for frequency modulation to mean that is the maximum frequency deviation you can get from the nominal generator frequency. Rather, it specifies the maximum frequency of signal you can input on the modulation input. The modulation voltage is usually specified to be up to ±5 volts. A voltage of +5 volts on the modulation input may increase the output frequency from a factor of 2 to 5 times, depending on the generator. A negative voltage will decrease the output frequency, usually by about the same ratios. A quick check with your generator, a DC power supply, and an oscilloscope will tell you what these ratios are.

Suppose the ±5 volts causes output ratios of f/4 to 4f, where f is the nominal frequency setting. Assume f = 40 kHz. This means -5 volts causes an output of 10 kHz and +5 volts causes 160 kHz. If you used a -5 volt to +5 volt ramp for sweeping, then the stop frequency is 16 times the start frequency.

I need a special waveform.

This is what arbitrary waveform generators (AWG) are made for. See the examples beginning on page 15.

A number of modern DDS generators include built-in complex waveforms as part of their repertoire. For example, the following diagram shows some of the special waveforms available in the B&K Precision 408X generator series: Although DDS generator models 4084-4087 do not provide a user programmable arbitrarily waveform memory, it provides users with the ability to output complex waveforms which is typically the domain of AWGs.

 


 

The numbers correspond to the number of the waveform in the generator's selection menu; they are:

12

Staircase (10 voltage levels in the steps)

13

Coded pulse

14

Full-wave rectified signal

15

Half-wave rectified signal

16

Clipped sine wave

17

Vertically-cut sine wave (represents, for example, a waveform from a lamp dimmer)

18

Sinusoidally modulated square wave

19

Logarithmic

20

Exponential

21

Rounded-half

22

sin(x)/x (i.e., the sinc function)

23

Square root

24

Tangent

25

Cardiac signal

26

Earthquake signal

27

Combination signal (10 voltage levels in the steps)

 

Note: The names in the above table don't necessarily correspond with what the generator uses for the waveform's name.

Realize that the generator may limit the output frequency of these special waveforms. This is necessary to maintain signal fidelity (the reason should be clear if you read the DDS Theory of Operation section above). Some users might think that a function generator with the frequency 50 MHz on the front panel means that all waveforms are available at this frequency. This maximum frequency is usually limited to sine waves and perhaps square waves. The other waveforms that the generator can supply are at reduced frequencies.

These special waveforms can be quite useful in stimulus-response testing. For example, in testing a logarithmic amplifier, the exponential function can be input and a ramp waveform output would be expected. Deviations from linearity of the ramp would tell you how well the amplifier is working.

What should I look for when buying an arbitrary waveform generator?

This can be a complex question and is, of course, driven by your needs. Looking over all the specifications on a datasheet can be intimidating, especially if you are unsure of what the specifications are. Since most function generators and AWGs are purchased for general-purpose use, here are some of the things you may want to think about:

Amplitude

The output amplitude is usually specified into a 50 Ω impedance and common specifications are 10 to 20 (for open circuit) volts peak-to-peak. For output into a high impedance, the voltage will be approximately double this value. Since a 10 volt peak-to-peak sine wave has an RMS voltage ofyou can see that the generator will be able to supply about of RMS current at peak output. If you need higher output voltage or current, you'll either need a suitable amplifier or a specialized function generator.

If you're doing frequency response testing, amplitude flatness may be of interest to you. This is a specification that defines how much the amplitude varies as the frequency of the generator is changed.

Frequency

The frequency put on the instrument is almost always the highest sine wave frequency the instrument is capable of delivering. Most DDS function generators will have lower maximum frequency specifications for other waveforms.

You may also want to pay attention to the low frequency end of the specification. Specialized applications may need very low frequency variations, so frequencies to 1 mHz or lower may be required. DDS technology works well for generating low frequencies -- it is not uncommon for DDS generators to have 1 Hz frequency resolution.

Frequency stability may be important to you if you need the generator to provide a stable signal. You may have to infer the capabilities from specifications such as timebase accuracy or frequency accuracy.

Distortion

If signal purity is important to you, you will want to understand the generator's distortion specifications. DDS signal generation is not known for generating high purity sine waves, so you may want to choose a different technology if very low distortion is needed. The distortion specification will also vary over the frequency range, generally being higher for higher frequencies.

Rise/fall times

For pulses and square waves, having fast rise and fall times may be important to you. The faster these are, the higher the frequency content of the waveform. Some function generators provide you with the ability to set the slope of the rising and falling portions of a pulse.

Sample rate

This fundamentally controls the raw capabilities of the generator. It is usually given in samples per second (Sa/s). This controls the maximum frequency output that the generator is capable of.

Number of points in waveform

This may be specified for the built-in waveforms, but is usually of interest when discussing AWGs. A larger waveform storage allows more complex waveforms to be stored or more individual waveforms to be stored. You may also want to look at how quickly the waveforms can be downloaded to the instrument.

DC Offset

If you plan to use the generator for troubleshooting electronic equipment, it can be very useful to have a DC offset capability in the generator. This capability can also be used to turn square waves into unipolar pulses.

Floating output

Some function generators are supplied with BNC output terminals that are isolated from ground. This lets the generator be floating with respect to ground (read the manual for the maximum allowed voltage or contact the manufacturer). This can be useful for providing a DC offset larger than the internal controls the generator allows.

Controlling the output

It may be convenient in your application to be able to turn the generator's output on and off without affecting any other settings. Look for a generator that has an output switch dedicated to this task (it can be either a dedicated key or a soft key).

If such a key isn't available, you may still be able to accomplish the same thing by controlling the instrument via software and toggling the amplitude between zero and the desired value (or using other control commands).

If neither are available, a small box with BNC terminals can be made that has a switch to turn the output on and off. If the BNC output terminal is floating, make sure to use a double pole switch. The switch's contact bounce may or may not be important in your application.

If you are in the market for a function generator or AWG, reading specifications can only take you so far. It is valuable to get your hands on the instrument you're considering and try it out in your environment. If you feel you will use the AWG software a lot for working with arbitrary waveforms, you will want to also try out the software.

References

M. Schwartz, Information Transmission, Modulation, and Noise, 2nd ed., McGraw-Hill, 1970, ISBN 07-055761-6.

W. Beyer, CRC Standard Mathematical Tables, 26th ed., CRC Press, 1981.

Wikipedia. Web. 22 Mar. 2010. <http://www.wikipedia.org>.

B&K Precision. Web. 22 Mar. 2010. <http://www.bkprecision.com>.

Appendix 1: Glossary

Note: the following terms are defined in the context of function generators. Some may have additional meanings in other areas of electronics.

AM

Amplitude modulation. The process of varying the amplitude of one signal in accordance with the amplitude of another. Typically, the signal being varied is a continuous sine wave, modulated by a lower frequency signal.

Amplitude

Magnitude of a waveform. Common amplitude are measured in volts peak-to-peak (Vp-p) or volts RMS (Vrms) (root mean square).

Amplitude resolution

The minimal change or digits of precision in the amplitude of a waveform that can be made.

Analog function generator

Before digital function generators became popular and economical, analog electronics were used to generate signals. The number of components tended to be much higher than digital generators and the analog electronics suffered from thermal drift and component aging much more so than digital generators do. It also lacks the ability to control the waveform's parameters with higher precision.

Arbitrary function generator

A function generator that allows the user to create or upload custom waveforms to the generator and provide them at user-defined frequencies. These generators will often include capabilities to provide common function generator waveforms such as sine, square, and triangle waves.

Attenuation

A reduction in signal amplitude, usually expressed in decibels (dB). If given in dB, you will have to know whether it's referring to power, voltage, current, etc.

AWG

See arbitrary function generator. (Also an abbreviation for American Wire Gauge.)

BNC

A common bayonet connector used on test equipment (the last two initials stand for the developer's names: Bayonet Neill-Concelman).

BPSK

Binary phase shift keying. The phase of a signal is switched between two values.

Bode plot

A graphical representation of a system's magnitude and phase response.

Burst

See Gated Burst.

Burst count

The number of pulses in a gated burst.

Carrier frequency

The basic signal to be modulated. It is frequently a sine wave.

Carrier waveform

The shape of the waveform to be modulated.

Complex waveforms

Some function generators provide a library of more complex waveforms than the usual sine, square, and triangle waveforms. For example, the B&K 408X series of function generators provide complex waveforms such as a cardiac, earthquake, half-wave rectified, etc.

Counter

A digital frequency counter is an optional feature to some function generators.

Coupling

For a digital frequency counter included with a function generator, it describes whether the signal is coupled to the input amplifier directly (DC coupling) or through a capacitor (AC coupling), which filters out any DC signal.

CSV

Comma-separated values. This is a type of data file format. Digital storage scopes often can write their output in CSV form, primarily because spreadsheet programs can read them for signal analysis.

dBc

Decibels of signal power with respect to the power of a carrier signal. Can also be used to quantify total harmonic distortion.

dBm

Decibels of signal power referenced to 1 mW. For example, the thermal radiation power emitted by the human body is about 50 dBm, or 100 W.

DC offset

An adjustable DC voltage added to the signal output. Used to match the DC voltage at point of signal injection or for other special applications.

DDS

Direct digital synthesis, a modern method of generating waveforms for function generators. Refer to the theory section for more details.

Direct entry

Setting a function generator's value (e.g., frequency, amplitude) by typing a number in with a keypad.

Distortion

A measurement of a waveform's departure from a perfect signal. Most often used for sine waves and usually called total harmonic distortion (THD). Function generators typically have less than 0.5% distortion at frequencies up to 100 kHz. Probably the most common definition is the ratio of the sum of the non-fundamental powers to the power of the fundamental:

Here, P1 is the power of the fundamental and P2, P3, etc. are the powers of the harmonics. THD is usually expressed as a percentage or as dBc. Unfortunately, THD is also sometimes expressed as a ratio of voltages instead of powers and the numbers will be different if expressed as a percentage of the fundamental. This isn't a problem if the THD is expressed in dBc. The formula for distortion in dBc is

There are different definitions of distortion, so you need to know which definition is being used. For example, the numerator in the above definition can be larger than the denominator. Another definition, which uses the RMS voltage of the frequency components, cannot have the numerator greater than the denominator:

where VRMS is the RMS voltage of the whole signal and V1 is the RMS voltage of the fundamental. This definition will always result in number between 0 and 1, but for low distortion situations, suffers from round-off error, so the measurements need to be made to sufficient significant figures.

DTMF

Dual tone multi-frequency. An encoding method using the mixing of more than one frequency of signal. Commonly used in tone dialing for telephones.

Duty cycle

Percentage of a cycle during which the waveform is at a high level (usually the more positive portion of a square wave or pulse waveform). For a repetitive pulse waveform, it is the pulse width in time units divided by the waveform's period in the same time units. The duty cycle of a perfect square wave is 50%. The duty cycle of a waveform with a pulse width of 10 ms and a pulse repetition period of 100 ms is 10%.

External trigger

An external signal applied to the function generator to cause (trigger) it to output a waveform.

Fall time

A measurement of how long it takes a signal (usually a pulse or square wave) to descend from 90% to 10% of its trailing edge height. (These are commonly-used percentages, but others may be used.)

FM

Frequency modulation. The process of varying the frequency of one signal in accordance with the amplitude of another. Typically, the signal being varied is a continuous sine wave, modulated by a lower frequency signal. The modulated signal generally varies around some mean frequency; the amount of frequency variation is known as the frequency deviation.

Frequency

A measure of how fast a repetitive signal repeats per unit time; commonly measured in Hz (cycles per second).

Frequency accuracy

A measure of the accuracy of the output frequency of a function generator.

Frequency resolution

The minimal frequency change available for a function generator's signal.

FSK

Frequency shift keying, a modulation technique that shifts between discrete frequencies (contrast to FM).

Function

A relationship between voltage (or current, power, etc.) and time, typically periodic, such that for any specific instant in time, the value of the voltage can be determined. Common functions are sine, triangle and square waves, pulse trains and ramps.

Gate

A control voltage, typically TTL level, used to turn the output of a function generator on and off.

Gate time

For an optional counter included with a function generator, it is the amount of time that the "gate" is open to count the signal. The frequency is derived from knowing how many times the signal crossed zero during this gate time.

Gated burst

(tone burst)

A signal being gated (turned on and off) by another signal. It is so named because the resulting output is usually a burst of many cycles followed by an off period of arbitrary duration. However, a burst may consist of as few as one or two cycles. Although the term tone burst is sometimes used, the frequency of the gated signal need not be limited to the audio range.

Harmonic distortion

A measure of the deviation of a signal from a sine wave. It is typically the sum of the powers of all the frequencies above the fundamental frequency divided by the power of the fundamental frequency, but other measures may be used. See distortion.

Haversine

A sinusoidal wave with a DC offset such that its negative peak rides on the zero-volts base line. Mathematically, it is

Internal trigger

A periodic signal internal to the function generator used to trigger the output signal.

Keyboard/Keypad

A device used to adjust a signal parameter on a function generator by entering the value directly (may or may not be present).

Knob

A device used to adjust a signal parameter on a function generator (may or may not be present).

Linear sweep

Term used to describe one type of frequency sweep in which the rate of frequency change is constant throughout the sweep.

Linearity

(triangle wave)

A measurement of the slope straightness of a triangle waveform. Measured as a percentage, where 100% is perfect.

Logarithmic sweep

Term used to describe one type of frequency sweep in which the time period for each decade of frequency change (i.e. 20 Hz to 200 Hz, 200 Hz to 2 kHz, etc.) is equal. This produces a slow rate of frequency change at the low end of the sweep, changing to a much faster rate at the high end.

Modulation

The use of another signal to change the amplitude, frequency, or phase of the signal generator's output.

Modulation depth

A measure of how much the modulating signal affects the amplitude of the carrier.

Modulation in

A connector on the function generator to provide an external modulation signal.

Modulation out

A connector on the function generator to output its internal modulating signal.

Modulation source

Where the modulating signal comes from; is usually described as internal or external to the function generator.

Modulation, internal

The modulating signal is generated internally in the function generator.

Modulation, external

The modulating signal is provided to the function generator from an external source.

Noise

Unwanted, spurious signal(s) on the output of the function generator. Some function generators can provide white, pink, or Gaussian noise.

Offset

See DC offset

Output impedance

The impedance of the function generator "measuring into" the output connector. Also referred to as source impedance.

Peak frequency deviation

In an FM modulation scenario, the maximum that the modulated signal varies in frequency from the carrier signal.

Peak-to-peak

A method of expressing the amplitude of a sine, triangle or square wave. The peak-to-peak voltage represents the voltage difference between the maximum and minimum value of the waveform.

Period

The time for one cycle of a repetitive signal. It is the inverse of frequency ()

Periodic

Occurring in repeated cycles or periods.

Power-on state

The state the generator is in after the AC power has been turned off, then back on. Modern generators typically let you choose if you want the generator to power up in a default state or the last state it was in before being powered down. Some even allow custom states to be recalled on power up.

PSK

Phase shift keying, a type of phase modulation where the carrier is varied between discrete phases.

Pulse

A signal with two levels, low and high.

Pulse repetition period

The time between two successive leading (or trailing) edges of a pulse train.

Pulse repetition rate

The frequency of a pulse train, usually expressed in hertz.

Pulse width

The period of time that the pulse is at its peak amplitude.

Ramp waveform

A triangle wave whose excursions between minimum and maximum have been altered so as to be unequal in time. For example, the positive-to-negative portion may constitute 70% of the period, while the negative-to-positive cycle uses 30%. A ramp with one transition almost vertical is often called a sawtooth.

Rise time

A measurement of how long it takes a signal (usually a pulse or square wave) to ascend from 10% to 90% of its rising edge height. (These are commonly-used percentages, but others may be used.)

RMS (root-mean-square)

A method of expressing the amplitude of a periodic waveform. The RMS voltage of a periodic waveform is the value of a DC voltage which would deliver the same effective power to a load as does the periodic waveform.

Sample rate

In a DDS function generator, this is the rate at which the digital clock is run and determines the highest frequency that the generator can output. Note: to be technically correct, it is the count rate of the phase accumulator when is set to 1. This may or may not be the same as the clock rate of the digital electronics.

Sawtooth

A ramp waveform in which one of the transitions between minimum and maximum (either the positive-going or negative-going) is nearly vertical. The name comes from the similarity to the profile of a saw's teeth.

Sensitivity (counter)

For a function generator with a counter, the minimum signal amplitude that can be counted.

Sine wave

A waveform, available on most function generators, which satisfies the equation y = A*sin(t), where y is the output voltage, t is the time, and A is the amplitude of the sine wave. The wave shape varies gradually and periodically between a minimum and maximum value, with the steepest slope at the zero crossings and zero slope at the peaks. The peak-to-peak amplitude of this sine wave is 2*A; the RMS amplitude is

Slewed sine

A sine wave whose excursions between minimum and maximum have been altered so as to be unequal in length. For example, the positive-to-negative portion may constitute 70% of the period, while the negative-to-positive cycle uses 30%. Such variation corresponds to adjustment of symmetry and/or the inclusion of a DC offset.

Square wave

A periodic waveform that alternately assumes one of two fixed amplitudes, usually for equal lengths of time. When these times are not equal, the waveform becomes a pulse (train). The transition times (rise/fall times) are negligible in comparison to both the times spent at either of the fixed amplitudes. The term square wave is usually interpreted to mean a sign where the positive excursions have the same magnitude as the negative excursions. If the minimum or maximum value of the square wave is zero, then the waveform is usually considered a pulse waveform. The RMS amplitude is simply the amplitude (A) in itself.

SSB

Single sideband. In an amplitude modulated signal, this is extracted by filtering out one of the sidebands and the carrier signal.

Stability

Amount of amplitude change (amplitude stability) or frequency change (frequency stability) over a specified period of time after a function generator is thermally stable.

Start frequency

In a frequency sweep, the frequency at which the sweep starts.

Stop frequency

In a frequency sweep, the frequency at which the sweep stops.

Sweep

A repetitive variation of the output frequency of a function generator between the start and stop frequencies. Frequency control is commonly accomplished by a linear ramp or saw-tooth waveform, although logarithmic or other functions may be used. Some older function generators have inputs (labeled "VCG" or "VCO") that let you control the frequency with a voltage. Modern function generators usually term this frequency modulation.

Sweep mode

A function generator with sweep capability being set to have the sweep enabled.

Sweep rate

Reciprocal of sweep time; number of sweeps in a given period of time.

Sweep time

The period of time required to complete one full cycle of sweep. It is variable on most generators.

Sweep width

The difference between the stop and start frequency of a frequency sweep. Some function generators let you set the sweep width and the sweep center frequency instead of the start and stop frequencies.

Symmetry

A measurement of the equality of the time periods of both halves of a square wave cycle. This measure is also applied to e.g. sine waves and triangle waves. A square wave's symmetry is 50% when the pulse width of the low amplitude part of the square wave is equal to the pulse width of the high amplitude part.

Tone burst

See gated burst.

Totalize capacity

In a function generator with a digital counter, the maximum number of counts that can be displayed.

Totalize mode

In a function generator with a digital counter, the counter is counting the number of triggers it receives.

Triangle wave

A waveform that varies periodically between a minimum and maximum value, in similar fashion to a sine wave. However, its positive-going and negative-going sections are straight lines. For a triangle wave, these excursions are of equal length (thus, the symmetry is 50%); if not, the waveform becomes a ramp.

Triggered mode

An operating mode in which a function generator provides one cycle of output each time it is externally triggered. The output can thus be synchronized to an external source.

TTL

Transistor-Transistor Logic. An integrated circuit family which normally operates from a +5 V supply and has low and high logic thresholds of +0.8 V and +2.4 V, respectively.

Variable duty cycle

See variable symmetry.

Variable symmetry

A function generator feature which allows adjustment of the waveform's symmetry. This changes the duty cycle of square waves and changes triangle waves into ramp waveforms. Turning this feature off provides equal symmetry (50%) waveforms.

VCG input

("Voltage Controlled Generator") An input which allows the generator's output frequency to be controlled by an externally-applied signal. Modern generators typically call this feature frequency modulation.

VCO input

("Voltage Controlled Oscillator") An input which allows the generator's output frequency to be controlled by an externally-applied signal. Modern generators typically call this feature frequency modulation.

VFD

Vacuum fluorescent display, a popular technology for instrumentation displays.

Voltage controlled frequency (VCF)

Same as voltage controlled generator.

Voltage controlled generator (VCG)

A generator that changes its output frequency with a change in the applied voltage. Modern generators typically call this feature frequency modulation.

Vpp or VPP

Symbol for volts peak-to-peak.

Vrms or VRMS

Symbol for volts RMS.

Waveform

The output of a function generator; the term usually applies to a graphical representation of that output on an oscilloscope screen.

Appendix 2: DDS Simulation

We can simulate a DDS system as described in the theory section in software. Here's a python (http://www.python.org/) script that simulates a small DDS system generating a sine wave. The counter has 10 bits (2n = 1024) and , the counter increment value, is 32. (Note: changing n won't change the output, as delta changes accordingly.)

 

from math import sin, pi

n = 10 # Number of bits in counter
delta = 2**(n-4) # Count increment

def f(x):
    
return sin(2*pi*x)

def main():

N = 2**n
clock = 0
counter = 0
while True:
    phase = counter % N # Also called the phase accumulator
    t = counter/float(N) # Makes t a floating point number
    if t > 1: break # We're done after one cycle
    y = f(phase/float(N))
    print "Time = %.2f Sine sample = %5.2f" % (t, y)
    clock += 1 # Increment the clock
    counter += delta # Increment the counter

main()

When this script is run, it produces the output

Time = 0.00 Sine sample = 0.00
Time = 0.06 Sine sample = 0.38
Time = 0.13 Sine sample = 0.71
Time = 0.19 Sine sample = 0.92
Time = 0.25 Sine sample = 1.00
Time = 0.31 Sine sample = 0.92
Time = 0.38 Sine sample = 0.71
Time = 0.44 Sine sample = 0.38
Time = 0.50 Sine sample = 0.00
Time = 0.56 Sine sample = -0.38
Time = 0.63 Sine sample = -0.71
Time = 0.69 Sine sample = -0.92
Time = 0.75 Sine sample = -1.00
Time = 0.81 Sine sample = -0.92
Time = 0.88 Sine sample = -0.71
Time = 0.94 Sine sample = -0.38
Time = 1.00 Sine sample = 0.00

Here's what this information looks like on a graph:


This would be an excellent representation of a sine wave in combination with a proper low-pass filter to get rid of the harmonics.