Function Generators
Function generators are versatile electronic instruments that produce multiple waveform types from a single device, making them indispensable tools for electronics testing, circuit development, and educational purposes. Unlike oscillators designed to produce a single waveform type with maximum purity, function generators prioritize flexibility, offering sine, square, triangle, and often arbitrary waveforms with adjustable frequency, amplitude, and modulation capabilities.
The evolution of function generators reflects broader advances in electronics technology. Early analog function generators used clever circuit topologies to derive multiple waveforms from a single oscillator core. Modern instruments incorporate direct digital synthesis (DDS) and arbitrary waveform generation (AWG), enabling waveform complexity and precision that analog techniques cannot match. Understanding both approaches provides insight into the fundamental trade-offs between analog simplicity and digital flexibility.
Sine Wave Generation
Sine wave generation forms the foundation of most function generators, as it represents the purest form of periodic signal and serves as the basis from which other waveforms can be derived or to which they can be compared. Function generators employ various techniques to produce sine waves, each offering different trade-offs between distortion, frequency range, and circuit complexity.
Triangle-to-Sine Conversion
Many analog function generators produce sine waves by shaping a triangle wave through nonlinear circuits. Since a triangle wave contains only odd harmonics with amplitudes decreasing as the square of the harmonic number, converting it to a sine requires progressively attenuating these harmonics while preserving the fundamental.
The simplest approach uses diode shaping networks. As the triangle wave amplitude increases, successive diode pairs conduct, progressively reducing the gain of the circuit. With careful selection of resistor values and diode characteristics, this piecewise-linear approximation produces acceptable sine waves with total harmonic distortion (THD) in the 1% to 3% range.
More sophisticated shaping circuits use transistor differential pairs biased to produce a hyperbolic tangent transfer function, which naturally approximates sinusoidal shaping when driven with a triangle wave of appropriate amplitude. This approach can achieve THD below 1% with careful design, adequate for many test applications though not suitable for low-distortion audio or precision measurement.
The primary advantage of triangle-to-sine conversion is that all waveforms derive from a single oscillator core, ensuring precise frequency and phase alignment between outputs. Switching between waveforms requires only output selection, with no frequency discontinuities or settling time.
Direct Sinusoidal Oscillators
Some function generators incorporate dedicated sinusoidal oscillators, such as Wien bridge or state-variable designs, to achieve lower distortion than shaping methods permit. This approach sacrifices some of the inherent frequency matching of single-core designs but provides sine wave quality suitable for more demanding applications.
State-variable oscillators are particularly well suited to function generator applications because their two-integrator loop produces sine and cosine outputs simultaneously. The frequency can be varied over wide ranges using matched dual potentiometers or voltage-controlled resistors, and the multiple outputs enable quadrature signal generation for advanced modulation schemes.
When using dedicated sine oscillators, the function generator must synchronize the sine output with the triangle/square generator when phase-coherent outputs are required. This synchronization adds complexity but allows optimization of each generation method for its specific waveform.
Digital Sine Generation
Direct digital synthesis revolutionized sine wave generation in function generators by computing waveform samples mathematically and converting them to analog signals. A DDS sine generator uses a phase accumulator to address a lookup table containing one cycle of sine values, with the output digital-to-analog converter producing the analog waveform.
The phase accumulator adds a frequency tuning word to its contents on each clock cycle, with the accumulator overflow rate determining the output frequency. This architecture provides extraordinary frequency resolution (millihertz or better) and instantaneous frequency changes, capabilities impossible with analog oscillators.
DDS sine wave quality depends on the lookup table size (affecting quantization of the phase), the DAC resolution (affecting amplitude quantization), and the output filtering (removing clock feedthrough and aliasing products). High-quality DDS generators achieve audio-band THD below 0.1%, far better than triangle shaping, though still well short of dedicated low-distortion audio oscillators, and the spurious signals that quantization produces require attention in sensitive applications.
Square Wave Generation
Square wave generation is typically the simplest function in a function generator, often achieved through direct limiting or comparison of other waveforms. The quality of square wave output depends on rise time, fall time, symmetry (duty cycle), and freedom from overshoot and ringing.
Comparator-Based Generation
The most common analog method generates square waves by passing a triangle or sine wave through a comparator with its threshold set at the waveform's midpoint. The comparator output switches between its high and low states as the input crosses the threshold, producing a square wave with the same frequency as the input.
Comparator selection significantly affects square wave quality. High-speed comparators with propagation delays of a few nanoseconds produce fast edges suitable for megahertz-range operation, but may exhibit output ringing without careful circuit design. Slower comparators produce cleaner outputs but limit the useful frequency range.
Symmetry (duty cycle) of the square wave can be adjusted by varying the comparator threshold voltage. Moving the threshold above the triangle wave midpoint produces duty cycles below 50%, while lowering the threshold increases the duty cycle. This simple adjustment provides the pulse width modulation capability found in most function generators.
Rise and Fall Time Considerations
Square wave rise and fall times determine the signal's useful bandwidth. The usual estimate relates the 10 to 90 percent rise time tr to bandwidth:
BW ≈ 0.35 / tr
A square wave with 10 ns edges therefore contains significant harmonic content to approximately 35 MHz, while 1 microsecond edges limit useful content to about 350 kHz.
Fast edges impose demanding requirements on output amplifiers and cables. A common screening rule treats a cable as a transmission line once its one-way delay exceeds about one-sixth of the rise time; at roughly 1.5 ns per foot for ordinary polyethylene-dielectric coaxial cable, a 10 ns edge reaches that threshold with about a foot of cable. Impedance mismatches cause reflections that appear as overshoot, ringing, or edge distortion, artifacts that may be mistaken for problems in the device under test.
Many function generators include selectable edge rate limiting to produce cleaner square waves when maximum speed is not required. Slower edges reduce overshoot and ringing, minimize EMI, and relax cable and termination requirements at the expense of bandwidth.
TTL and CMOS Compatible Outputs
Function generators intended for digital circuit testing often provide outputs compatible with common logic families. TTL-compatible outputs swing between approximately 0 V and 3 V to 5 V with drive capability matching TTL input requirements. CMOS-compatible outputs may swing rail-to-rail at the selected supply voltage.
These dedicated logic outputs typically bypass the main output amplifier, providing faster edges and more precise voltage levels than the general-purpose output can achieve. However, they usually lack the amplitude and offset adjustment available on the main output, limiting their flexibility for non-digital applications.
Triangle Wave Generation
Triangle waves serve as both useful outputs and internal building blocks within function generators. The triangle wave's linear ramps make it ideal for testing linearity, generating time-proportional voltages, and serving as the basis for sine wave shaping. Triangle generation circuits range from simple integrator-based approaches to precision designs with carefully controlled linearity and symmetry.
Integrator-Based Generation
The classic triangle wave generator consists of an integrator and a comparator in a feedback loop. The comparator output alternates between two voltage levels, driving the integrator input. The integrator output ramps linearly until it reaches a threshold that triggers the comparator to switch states, reversing the ramp direction.
The oscillation frequency depends on the integrator time constant, the square-wave drive amplitude, and the comparator threshold voltages:
f = Vsq / (4 × R × C × Vpeak)
where Vsq is the amplitude of the square wave that drives the integrator (the comparator output swing), RC is the integrator time constant, and Vpeak is the triangle-wave peak amplitude, which equals the comparator switching threshold. Because the triangle peaks at the threshold, raising the drive amplitude relative to the threshold raises the frequency, while a larger RC product lowers it. The relation follows from the ramp itself: the integrator output slews at Vsq/RC, so each ramp from −Vpeak to +Vpeak takes 2RCVpeak/Vsq, and a full period comprises two ramps. When the threshold is set by a resistive divider around the comparator, Vpeak is a fixed fraction of Vsq and the expression reduces to the resistor-ratio form given for the integrator-comparator generator in Relaxation Oscillators.
Frequency adjustment is achieved by varying either the integrator time constant (typically through switchable capacitors and a variable resistor) or the integrating current (enabling voltage-controlled oscillation). Wide frequency ranges of 1000:1 or more are readily achievable with careful design.
Linearity and Symmetry Control
Triangle wave linearity depends on maintaining constant integrating current throughout each ramp. Finite op-amp gain, input bias currents, and supply voltage variations all degrade linearity, particularly at low frequencies where small errors accumulate over longer integration times.
Precision triangle generators charge the timing capacitor from current sources rather than through a resistor from the comparator output, so the ramp rate no longer depends on the comparator's output levels, whose positive and negative magnitudes are rarely equal. Matched current sources for positive and negative ramps ensure equal slopes in both directions, critical for generating symmetrical sine waves through subsequent shaping.
Symmetry adjustment varies the ratio of positive to negative integrating currents. A symmetry control potentiometer can produce duty cycles from 10% to 90% or wider, with the triangle wave becoming a sawtooth at the extremes. This variable symmetry provides sawtooth wave capability without dedicated generation circuits.
Current-Mode Triangle Generators
Current-mode triangle generators charge and discharge a capacitor with constant current sources, switching between sources at voltage thresholds detected by comparators. This approach inherently provides excellent linearity since capacitor voltage is directly proportional to integrated current, independent of the voltage developed.
A capacitor charged through a resistor follows an exponential curve and stays nearly linear only over a small part of its swing; constant-current charging ramps linearly over the full swing. Because the ramp rate is proportional to the charging current, the output frequency is a linear function of a control current, which makes current-mode generators particularly suited to voltage-controlled oscillator applications where linear frequency control is essential.
Integrated circuit implementations of current-mode triangle generators, such as the classic XR-2206, provide complete function generator cores with minimum external components. These devices include the current sources, comparators, and switching logic required for triangle generation, along with sine shaping circuits and amplitude control.
Arbitrary Waveform Synthesis
Arbitrary waveform generators (AWGs) extend function generator capability beyond standard waveforms to produce any waveform that can be defined mathematically or captured from real-world signals. This capability enables simulation of complex signals, creation of test waveforms for specific applications, and generation of signals that would be impossible to produce with analog techniques.
Waveform Memory Architecture
Arbitrary waveforms are stored in memory as a sequence of amplitude samples defining one or more cycles of the desired waveform. The memory depth determines the number of points available to define the waveform, directly affecting the resolution with which complex features can be reproduced.
Memory depth spans several orders of magnitude. Basic instruments hold a few thousand to a few tens of thousands of points per waveform, adequate for moderately complex shapes with smooth transitions. Mid-range bench generators provide one to several million samples as standard, and high-end AWGs store hundreds of millions of samples or more, enabling playback of long, complex signals including communication protocols, biomedical waveforms, and transient events.
Memory organization varies among instruments. Some use a single linear memory space, while others provide multiple segments that can be sequenced to create longer waveforms or switched to output different waveforms in response to triggers. Sequencing uses memory efficiently: a segment that repeats is stored once and looped, so a long pattern with repeated sections occupies a fraction of the memory its full length would need.
Sample Rate and Bandwidth
The sample rate at which memory contents are converted to analog signals bounds the AWG's bandwidth and frequency range. The Nyquist sampling theorem places the ceiling at half the sample rate, but no practical instrument reaches it. The DAC holds each sample until the next, and this zero-order hold imposes a sin(x)/x response that is already 3.9 dB down at half the sample rate; the reconstruction filter also needs a transition band between the highest wanted frequency f and its first image at fs − f, where fs is the sample rate.
How much of the theoretical bandwidth an instrument uses depends on its filtering. High-end AWGs with digital interpolation and steep reconstruction filters specify analog bandwidths approaching 40 percent of their sample rate, about 2.5 samples per cycle at the top frequency. General-purpose instruments use a smaller fraction: Keysight, for example, specifies the arbitrary-waveform bandwidth of its 33500B series as 0.27 times the sample rate with its sharpest filter and 0.13 times with a filter chosen for clean steps, roughly four and eight samples per cycle. Waveforms with sharp features need more samples still, because an edge or a narrow pulse must span several sample points to be reproduced faithfully.
High-end AWGs achieve sample rates of tens of gigasamples per second, enabling direct synthesis of signals to many gigahertz. Bench function and arbitrary waveform generators typically sample at a few hundred megasamples to about a gigasample per second and serve audio, ultrasonic, and lower-frequency RF applications adequately.
The sample rate and memory depth together determine the frequency resolution and minimum output frequency. When one cycle of a waveform occupies the whole memory, its frequency is the sample rate divided by the number of points, so with fixed memory depth, higher sample rates increase the minimum frequency, while deeper memory enables lower frequencies at any sample rate.
Instruments step through waveform memory in one of two ways. A DDS-style generator clocks its DAC at a fixed rate and addresses the memory with a phase accumulator, so changing frequency changes how many points are skipped or repeated on each cycle; frequency resolution is excellent, but at high frequencies short features can be skipped entirely, and the output carries timing jitter of up to one sample period. A variable-clock generator, often called a true arbitrary waveform generator, outputs every point exactly once per cycle and sets the frequency by changing the sample clock, which preserves every feature at the cost of slower frequency changes and more complex clock synthesis.
Waveform Creation Methods
AWGs accept waveform data through several methods depending on the application and required precision:
- Mathematical Definition: Many AWGs include built-in equations for creating waveforms from mathematical expressions. Users specify functions of time, and the instrument computes and stores the sample values. This approach works well for signals that can be expressed analytically, such as modulated carriers, sum of sines, or exponential transients.
- Graphical Editing: Software interfaces allow drawing or editing waveforms visually, with the display showing the actual sample points that will be output. This intuitive approach suits creation of stylized signals, manual smoothing of captured data, or educational exploration of waveform properties.
- External Data Import: Waveform data can be transferred from oscilloscopes, simulation software, or signal analysis programs. Standard file formats (CSV, binary, or instrument-specific) enable workflow integration with design and test tools. This capability is essential for reproducing captured real-world signals or generating waveforms computed in external software.
- Algorithmic Generation: Advanced AWGs include programming interfaces (SCPI, Python, LabVIEW) for algorithmic waveform creation. Complex sequences, adaptive waveforms, or automated test patterns can be generated programmatically and loaded into the instrument.
Reconstruction Filtering
The output of a digital-to-analog converter consists of discrete steps at the sample rate, requiring filtering to remove images at multiples of the sample frequency and smooth the output into a continuous waveform. AWG reconstruction filters balance several conflicting requirements:
Sharp cutoff filters provide maximum usable bandwidth by maintaining flat response to near the Nyquist frequency before attenuating strongly. However, sharp filters exhibit significant phase nonlinearity and group delay variation, distorting transient signals.
Gentle rolloff filters preserve the shape of pulses and steps at the expense of bandwidth. Bessel-characteristic filters provide maximally flat group delay, making them suitable for transient-rich signals where time-domain accuracy is paramount.
Many AWGs offer selectable reconstruction filters optimized for different applications: sharp filters for maximum bandwidth with sinusoidal signals, gentle filters for pulse and transient work, or no filtering for specialized applications where the step response is acceptable or externally filtered.
Direct Digital Synthesis Basics
Direct digital synthesis (DDS) has become the dominant technology for modern function generators, providing extraordinary frequency resolution, phase-continuous frequency changes, and straightforward generation of complex modulations. Understanding DDS principles illuminates both its capabilities and limitations.
Phase Accumulator Architecture
The heart of a DDS system is the phase accumulator, a digital register that represents instantaneous phase within a signal cycle. On each clock cycle, a frequency tuning word is added to the accumulator, advancing the phase by an amount proportional to the desired output frequency.
When the accumulator overflows (wraps from maximum value to zero), one complete cycle of the output waveform has been generated. The overflow rate, and hence the output frequency, is:
fout = (fclk × M) / 2N
where fclk is the system clock frequency, M is the frequency tuning word, and N is the accumulator width in bits.
The frequency resolution is fclk/2N. A 32-bit accumulator operating at 100 MHz provides frequency resolution of approximately 0.023 Hz, far finer than any practical analog oscillator can achieve. To produce 1 kHz from that clock, the tuning word would ideally be 1,000 × 232 / 108 = 42,949.67; rounded to the integer 42,950, it yields 1,000.0076 Hz, an error within half of one resolution step. The 48-bit accumulators of some DDS devices push the resolution to the microhertz range or finer.
The highest usable output frequency is set not by the accumulator but by reconstruction. Although the sampling theorem permits outputs up to fclk/2, the output filter must separate the wanted signal at fout from its first image at fclk − fout, so practical designs stop at roughly 40 percent of the clock frequency.
Waveform Lookup and DAC
The phase accumulator output addresses a lookup table containing one cycle of the desired waveform. For sine wave generation, the table contains sine values sampled at uniform phase intervals. The lookup table output represents the instantaneous amplitude corresponding to the current phase.
The table need not store a complete cycle due to sine wave symmetry. A quarter-cycle table with appropriate address manipulation (complementing addresses in different quadrants) reduces memory requirements by a factor of four with no loss of precision.
The digital-to-analog converter converts the lookup table output to an analog signal. DAC resolution (typically 10 to 16 bits for function generators) determines amplitude quantization, while DAC speed limits the maximum sample rate and hence output bandwidth.
DAC performance specifications critical for DDS quality include integral nonlinearity (affecting harmonic distortion), differential nonlinearity (affecting small-signal fidelity), and glitch energy (affecting spurious content during code transitions).
Spurious Response Characteristics
DDS systems produce spurious outputs (spurs) arising from the digital nature of waveform generation. Understanding these spurs is essential for applying DDS function generators appropriately.
- Phase Truncation Spurs: When the full phase accumulator width exceeds the lookup table address width, the lower-order accumulator bits are discarded (truncated). This phase quantization produces spurs whose worst-case level is approximately −6.02 dBc times the number of phase bits used to address the lookup table. Retaining more phase bits (equivalently, a larger table) pushes these spurs lower: a 12-bit phase address limits the worst spur to roughly −72 dBc, whereas a 16-bit address reaches about −96 dBc.
- Amplitude Quantization Spurs: Finite DAC resolution quantizes the output amplitude, producing harmonics of the output frequency. These spurs decrease by approximately 6 dB per additional bit of DAC resolution.
- Clock Feedthrough: The system clock and its harmonics may couple to the output through supply lines, substrate coupling, or output buffer imperfections. Careful layout and filtering minimize but cannot eliminate clock-related spurs.
- DAC Nonlinearity Spurs: Integral and differential nonlinearity in the DAC produce harmonics and intermodulation products. Harmonics appear even with a single tone, whereas intermodulation products appear only when the output contains two or more tones, so single-tone testing does not reveal them.
- Aliased Harmonics: Because the DAC output is sampled, a harmonic above half the clock frequency folds back into the output band. With a 100 MHz clock and a 30 MHz output, the second harmonic at 60 MHz appears at 40 MHz and the third harmonic at 90 MHz appears at 10 MHz, below the fundamental, where no lowpass reconstruction filter can remove it.
Frequency and Phase Agility
A key DDS advantage is instantaneous, phase-continuous frequency changes. Changing the frequency tuning word immediately alters the phase accumulation rate without discontinuities or settling time. This capability enables:
- Frequency Hopping: Rapid switching between frequencies for spread-spectrum applications, radar simulation, or communication system testing.
- Linear Frequency Sweeps: Phase-continuous chirp signals with precisely controlled sweep rates, essential for radar and ultrasonic testing.
- Frequency Modulation: Adding a modulation value to the tuning word produces FM with precisely controlled deviation and instantaneous response.
Phase control is equally straightforward: adding an offset to the accumulator output before table lookup shifts the output phase by the corresponding amount. This enables phase modulation, phase-coherent channel matching, and I/Q signal generation.
Frequency Sweep Generators
Frequency sweep (chirp) capability enables function generators to produce signals that vary in frequency over time, essential for testing frequency-dependent systems, measuring frequency response, and simulating radar and sonar signals.
Linear and Logarithmic Sweeps
Linear sweeps change frequency at a constant rate (Hz per second), producing uniform frequency spacing throughout the sweep. This mode suits applications where absolute frequency differences matter, such as measuring filter bandwidth in hertz or generating linear-FM radar chirps.
Logarithmic (exponential) sweeps change frequency at a constant rate in octaves or decades per second, producing uniform frequency spacing on a logarithmic scale. This mode matches human perception of frequency (where an octave sounds like a consistent interval regardless of absolute frequency) and provides equal measurement time per decade in frequency response testing.
The sweep rate selection significantly affects measurement results. Fast sweeps may not allow adequate settling time for high-Q circuits, while slow sweeps increase test time and may miss transient responses. A response of bandwidth B needs roughly 1/B seconds to settle, so the frequency must change by much less than B in that time, which keeps the sweep rate well below B2 hertz per second. A filter with a 100 Hz bandwidth, for example, calls for a sweep through its passband well under 10 kHz per second; faster sweeps shift and smear the measured response in the direction of the sweep.
Triggered and Gated Sweeps
Triggered sweep modes initiate a sweep on receiving an external trigger signal, enabling synchronization with other test equipment or system events. Single-shot triggers produce one sweep per trigger, while continuous triggered modes restart the sweep after each trigger.
Gated sweep modes output the swept signal only while a gate signal is active. This capability enables selective testing of portions of the frequency range or synchronization with system windows where the device under test is in a particular state.
Marker outputs indicate when the sweep passes through specified frequencies, enabling oscilloscopes or analyzers to trigger at points of interest. Multiple markers can identify several frequencies within a single sweep for comparison measurements.
Sweep Synchronization Outputs
Function generators typically provide synchronization outputs to coordinate sweep measurements with other instruments:
- Sweep Trigger Output: A pulse or edge coinciding with sweep start, enabling oscilloscope triggering at the beginning of each sweep for time-domain observation of the frequency response.
- Ramp Output: A voltage proportional to the instantaneous sweep frequency, suitable for driving the X-axis of an oscilloscope or X-Y recorder to produce frequency-response plots directly.
- Marker Outputs: Pulses at preset frequencies within the sweep, enabling identification of specific frequencies on time-domain displays or triggering of additional measurements.
These outputs enable construction of simple network analyzers using the function generator and an oscilloscope, adequate for many development and troubleshooting tasks that do not require the precision of dedicated analyzers.
Modulation Capabilities
Modern function generators include comprehensive modulation capabilities, enabling them to simulate communication signals, test demodulators, and generate complex stimulus waveforms without requiring dedicated modulation sources.
Amplitude Modulation
Amplitude modulation (AM) varies the output amplitude in response to a modulating signal. Function generators typically provide internal modulation sources (sine, square, triangle, or arbitrary waveforms) and accept external modulation inputs.
Modulation depth specifies the ratio of amplitude variation to the unmodulated carrier amplitude, expressed as a percentage. At 100% modulation depth, the output varies from zero to twice the unmodulated amplitude. Some generators permit modulation depths exceeding 100%, producing carrier phase reversals useful for testing AM demodulators and automatic gain control circuits.
Double-sideband suppressed carrier (DSB-SC) modulation, where no carrier power is output in the absence of modulation, is available on some function generators. This mode is useful for testing product detectors and synchronous demodulators.
Frequency Modulation
Frequency modulation (FM) varies the output frequency in response to a modulating signal. The frequency deviation specifies the maximum frequency excursion from the carrier frequency at peak modulation.
DDS-based function generators excel at FM generation because frequency changes are inherently phase-continuous. The modulating signal simply adds to (or replaces) the base frequency tuning word, with the phase accumulator seamlessly tracking the varying frequency.
The modulation bandwidth of the DDS core itself is limited only by the rate at which the frequency tuning word can be updated, which can be a sizable fraction of the clock rate. In a complete instrument the modulation path usually sets the limit instead, and an external modulation input is typically the narrowest, often around 100 kHz. Wide deviation remains available regardless: bench generators offer peak deviations of megahertz, enough for testing receivers, phase-locked loops, and communication systems.
Phase Modulation
Phase modulation (PM) varies the output phase in response to a modulating signal. In DDS systems, phase modulation adds an offset to the phase accumulator output before the lookup table, shifting the output phase without affecting frequency.
Phase deviation specifies the maximum phase excursion at peak modulation, typically specified in degrees. Because phase is the integral of frequency, frequency modulation by a signal m(t) is equivalent to phase modulation by the integral of m(t), and phase modulation by m(t) is equivalent to frequency modulation by its derivative, dm(t)/dt. Producing PM through a frequency modulator therefore requires differentiating the modulating signal, which suppresses its low-frequency content and cannot produce a static phase offset at all; the direct phase control of a DDS system avoids that limitation.
Binary phase shift keying (BPSK) and quadrature phase shift keying (QPSK) are special cases of phase modulation commonly used in digital communications. Function generators with arbitrary modulation capability can generate these and more complex phase modulation formats.
Pulse Width Modulation
Pulse width modulation (PWM) varies the duty cycle of a pulse or square wave in response to a modulating signal. This modulation type is essential for testing switch-mode power supplies, motor controllers, and digital audio systems.
Analog function generators typically derive PWM by varying the comparator threshold that converts a triangle wave to a square wave. The modulating signal adds to or replaces the fixed threshold, directly controlling the duty cycle.
DDS-based generators can produce PWM through several mechanisms: comparing a ramp waveform against a modulated threshold, using arbitrary waveform capability to directly synthesize the modulated pulse train, or employing dedicated PWM hardware. Each approach offers different trade-offs between resolution, bandwidth, and complexity.
External Modulation Inputs
External modulation inputs accept signals from other sources to control the generator's modulation. Key specifications include:
- Input Sensitivity: The relationship between input voltage and modulation depth or deviation. The input is usually scaled so that a full-scale voltage, commonly ±1 V or ±5 V, produces the programmed depth or deviation, with some generators providing a selectable range.
- Input Bandwidth: The frequency range over which modulation is accurately reproduced. Audio function generators may specify bandwidth to 50 kHz or 100 kHz, while RF generators extend to megahertz for wideband modulation testing.
- Input Impedance: Typically a few kilohms or more for general-purpose use, high enough not to load an ordinary signal source, though some generators offer 50-ohm inputs for RF modulation sources.
- Summing Capability: Some generators sum internal and external modulation, enabling complex composite modulation waveforms. Others switch between internal and external sources.
Pulse and Ramp Generators
Pulse and ramp generation capabilities extend function generators beyond periodic waveforms to include the transient signals essential for digital circuit testing, time-domain analysis, and control system evaluation.
Pulse Parameter Definitions
Precise pulse characterization requires standardized parameter definitions:
- Pulse Width: The duration from 50% of rising edge amplitude to 50% of falling edge amplitude. Also called pulse duration.
- Rise Time: The time for the leading edge to transition from 10% to 90% of full amplitude. Fall time is defined similarly for the trailing edge.
- Duty Cycle: The ratio of pulse width to period, expressed as a percentage. A 1 microsecond pulse at 100 kHz has a 10% duty cycle.
- Period and Frequency: The interval between corresponding points on successive pulses, and its reciprocal.
- Overshoot and Preshoot: Overshoot is an excursion beyond the final level immediately after a transition; preshoot is an excursion in the opposite direction immediately before it. Both are usually expressed as a percentage of the pulse amplitude.
- Ringing: Damped oscillation following edges, typically caused by inductance and capacitance interactions in the pulse circuit.
Variable Rise and Fall Times
Function generators with adjustable rise and fall times enable matching the stimulus to the requirements of the device under test. Very fast edges stress circuits at high frequencies and may reveal bandwidth limitations, while slower edges reduce ringing and permit evaluation of lower-bandwidth response.
Edge rate limiting is typically implemented by lowpass filtering the pulse output or by controlling the slew rate of the pulse-forming stage. Filtering rounds the edges into an exponential or Gaussian-like shape, whereas slew-rate control, such as charging a capacitor with a programmable current, produces linear, trapezoidal edges whose 10 to 90 percent time can be set precisely. Either way, slow edges constrain the shortest pulse: a pulse narrower than roughly its own edge time never reaches full amplitude, so instruments limit the edge time that can be set for a given pulse width.
Independent control of rise and fall times is available on some generators, enabling simulation of asymmetric driving circuits or testing of circuits with different responses to positive and negative transitions.
Ramp and Sawtooth Generation
Ramp waveforms (sawtooth waves) consist of a linear voltage change followed by a rapid return to the starting voltage. These waveforms are essential for testing sweep circuits, generating time bases, and evaluating integrator linearity.
Analog function generators derive ramps by adjusting triangle wave symmetry to extremes. A triangle with 99% positive-going duty cycle approximates a positive ramp; 1% duty cycle produces a negative ramp. The "flyback" time (the rapid return transition) is limited by the oscillator's ability to change direction quickly. DDS generators have no such limit on the waveform itself: the ramp is computed, so symmetry can be set anywhere from 0 percent (a falling ramp) through 50 percent (a triangle) to 100 percent (a rising ramp), and only the output bandwidth rounds the reset.
Dedicated ramp generators can produce faster flyback times and more linear ramps than triangle-based approaches. Current-source charging of a capacitor followed by transistor discharge provides excellent linearity with flyback times limited only by the discharge circuit bandwidth.
Pulse Train Generation
Generating specific pulse patterns extends beyond single-pulse capability to encompass pulse bursts, pulse trains with varying parameters, and complex sequences. This capability serves digital communication testing, stimulus-response experiments, and automated test systems.
- Burst Mode: Outputs a specified number of cycles in response to a trigger, then stops until retriggered. Burst count may range from 1 to millions of cycles depending on the generator.
- Gated Mode: Outputs continuous waveform while a gate signal is active, stopping when the gate goes inactive. Gate response may be immediate (potentially producing partial cycles) or cycle-synchronized (completing the current cycle before stopping).
- Pattern Generation: Advanced function generators and arbitrary waveform generators can output pre-defined bit patterns, enabling generation of serial data streams, pseudo-random sequences, or protocol-specific patterns.
White and Pink Noise Sources
Noise generation capability enables function generators to produce random signals for testing system bandwidth, measuring noise figure, evaluating audio equipment response, and performing statistical characterization of circuits.
White Noise Generation
White noise has constant power spectral density across all frequencies within the system bandwidth, analogous to white light containing all visible frequencies equally. Each frequency band of a given width contains equal noise power, making white noise useful as a uniform-spectrum test signal.
Analog white noise sources typically use the avalanche noise of a reverse-biased junction in breakdown (a noise diode or Zener diode), the shot noise of a forward-biased junction, or the thermal noise of a resistor, amplified to useful levels. These physical noise sources produce true random noise with Gaussian amplitude distribution and flat spectrum to the bandwidth limits of the amplification chain.
Digital white noise generation uses pseudo-random number generators to produce sequences that approximate true randomness. Linear feedback shift registers (LFSRs) generate long sequences efficiently. A maximal-length LFSR of N bits repeats with period 2N − 1 clock cycles, and for sequences longer than the observation time this repetition is inconsequential. Its output is a two-level bit stream, not a Gaussian signal: the spectrum is nearly flat well below the clock rate, with an envelope that follows the square of sin(x)/x and is 3 dB down at about 0.44 times the clock frequency, but the amplitude takes only two values. Summing many such bits or lowpass filtering the stream yields a distribution that tends toward Gaussian by the central limit theorem; many current digital generators instead compute Gaussian samples directly and pass them to the DAC.
Because a true Gaussian distribution has no upper bound, a digital noise generator truncates its peaks and specifies the crest factor, the ratio of peak to RMS value, at which it does so. It also specifies the repetition period of its sequence, which in current bench instruments runs to decades.
Pink Noise Generation
Pink noise has power spectral density inversely proportional to frequency (1/f characteristic), with each octave or decade containing equal noise power. This property matches human perception of frequency and makes pink noise standard for audio system testing.
Pink noise generation from white noise requires filtering with a response that falls 3 dB per octave (10 dB per decade). This fractional-order filtering cannot be achieved with simple RC filters but is approximated using multiple cascaded filter stages with carefully chosen corner frequencies.
A common approach uses a network of alternating poles and zeros spaced logarithmically across the band of interest, or equivalently a weighted sum of several first-order lowpass sections. The resulting staircase response averages to the 1/f characteristic, typically within about 1 dB across the audio range. More sophisticated implementations use active filters or digital signal processing for closer approximations.
Digital pink noise generation can filter white pseudo-random sequences using digital filters with 1/f characteristics. The Voss algorithm and its variants efficiently generate pink noise through combination of random sequences at different update rates, avoiding the computational cost of high-order digital filters.
Noise Applications
- Frequency Response Testing: Applying noise to a system and measuring the output spectrum reveals the frequency response. This approach tests all frequencies simultaneously, speeding measurements compared to swept-frequency techniques, though the random excitation requires averaging over many records to give a smooth estimate.
- Noise Figure Measurement: The Y-factor method compares system output power with a calibrated noise source switched between two known noise temperatures, hot and cold, or on and off. A function generator's noise output is not calibrated in excess noise ratio, the figure the method depends on, so it cannot replace a dedicated noise source for noise figure measurement.
- Audio Equipment Testing: Pink noise provides subjectively uniform spectral content for testing loudspeakers, room acoustics, and audio processors. White noise serves for bandwidth measurements and filter characterization.
- Environmental Simulation: Adding noise to test signals simulates real-world signal degradation. Controlled noise injection enables measurement of signal-to-noise ratio sensitivity and error rate versus noise level.
Precision Frequency References
Function generator frequency accuracy and stability depend on the quality of the internal frequency reference. Understanding reference specifications enables selection of appropriate generators for frequency-critical applications and proper interpretation of measurement uncertainties.
Internal Reference Oscillators
Function generators use a crystal oscillator as their internal frequency reference, typically at 10 MHz, and derive the synthesizer clock from it. Uncompensated crystal oscillators hold ±10 to 50 parts per million (ppm) and age by a few ppm per year, adequate for most general-purpose testing.
Temperature-compensated crystal oscillators (TCXOs) reduce the variation over the operating temperature range to about ±0.5 to 2.5 ppm, improving frequency accuracy in varying environmental conditions. Many current bench generators use a reference of this grade as standard and specify their one-year frequency accuracy at about ±1 to 2 ppm.
Oven-controlled crystal oscillators (OCXOs) provide the highest stability in self-contained generators. Holding the crystal at a constant elevated temperature keeps the variation over the operating range below 0.1 ppm, and 0.01 ppm or better in good units. After an initial stabilization period, an OCXO typically ages by about one part per billion per day, with the best units below 0.1 part per billion per day. An oven option typically improves a generator's one-year accuracy by an order of magnitude, to about ±0.1 ppm, good enough for the generator to serve as the frequency reference for other bench instruments.
External Reference Inputs
Most professional function generators accept external 10 MHz reference signals, enabling synchronization to laboratory frequency standards, GPS-disciplined oscillators, or other instruments. This capability eliminates the internal reference's accuracy limitations, providing frequency accuracy equal to the external reference.
External reference input specifications include:
- Input Frequency: Typically 10 MHz, the standard laboratory reference frequency, though some generators accept 5 MHz or other frequencies.
- Input Level: Usually specified as a range, for example a few hundred millivolts to 5 V peak-to-peak, into 50 ohms or a higher impedance.
- Lock Range: The offset from the nominal frequency over which the generator can lock to the reference. It is often narrow: Keysight, for example, specifies 10 MHz ±20 Hz (±2 ppm) for its 33500B series, or ±1 Hz with the oven-controlled option. The external reference must therefore itself be close to its nominal frequency.
- Lock Indicator: Visual or electronic indication that the generator has successfully locked to the external reference.
Reference Output Distribution
Function generators with reference outputs can serve as frequency references for other instruments, enabling system-wide synchronization. The reference output specifications should match or exceed the internal reference quality to avoid degrading the distributed signal.
Key reference output parameters include output level (a 10 MHz signal of the order of 0 dBm, which is 632 mV peak-to-peak into 50 ohms), phase noise, and drive capability (the number of instruments that can be connected without signal degradation). Phase noise matters because a downstream synthesizer that multiplies the reference by N raises its phase noise by 20 log10(N) dB: multiplying 10 MHz to 1 GHz adds 40 dB.
For systems requiring multiple synchronized function generators, sharing one reference, whether daisy-chained through reference input and output connections or distributed in a star, locks the generators' frequencies together so that their relative phase stays constant. It does not align the phases themselves: each generator's output starts from an arbitrary phase, so phase alignment requires a phase adjustment or a synchronization command, and differences in cable delay add fixed offsets among channels.
GPS-Disciplined Operation
GPS-disciplined oscillators (GPSDOs) steer a local quartz or rubidium oscillator to the atomic time scale broadcast by the GPS satellites, which is itself steered to Coordinated Universal Time (UTC). Averaged over a day, a locked GPSDO typically holds its frequency within about 1 part in 1012 of the UTC rate or better, while over seconds its stability is that of the local oscillator. GPSDOs deliver this at modest cost, and connecting one to a function generator's external reference input provides laboratory-quality frequency accuracy for field testing or installations without access to traditional frequency standards.
GPSDO specifications relevant to function generator use include time-to-lock (minutes to hours for initial acquisition), holdover performance (frequency drift when GPS signal is lost), and phase noise (which may be worse than a high-quality internal reference at some offset frequencies).
For the most demanding applications, calibration laboratories keep atomic frequency standards. A cesium-beam standard realizes the SI second directly, because the second is defined by fixing the cesium-133 hyperfine transition frequency at exactly 9,192,631,770 Hz; commercial instruments reach an accuracy of about 1 part in 1012 with no deterministic drift. A rubidium standard is a secondary standard: it offers excellent short-term stability at lower cost and size, but its frequency ages by parts in 1011 per month, so it must be calibrated periodically against cesium or GPS. Either, connected to a generator's external reference input, gives the generator the standard's frequency accuracy, far beyond that of any free-running crystal oscillator.
Output Characteristics and Specifications
Understanding function generator output specifications enables proper connection to devices under test and interpretation of observed behavior. Output characteristics affect signal fidelity, maximum power delivery, and compatibility with measurement systems.
Output Impedance and Termination
Most function generators have 50-ohm output impedance, matching standard coaxial cable and RF instrument input impedances. When terminated in 50 ohms, half the open-circuit voltage appears across the load, and maximum power transfers.
Displayed amplitude readings typically assume 50-ohm termination. When driving high-impedance loads (such as oscilloscope 1 megohm inputs), the actual voltage is twice the displayed value. Some generators offer selectable display modes for terminated versus unterminated operation to avoid confusion.
Impedance matching matters most for fast edges and high frequencies, where cable reflections cause overshoot, ringing, and waveform distortion. At low frequencies and for slowly varying signals, where the cable is electrically short, impedance mismatches cause only amplitude errors, not waveform degradation.
Amplitude Range and Resolution
Function generator amplitude range specifications include maximum output (typically 10 V to 20 V peak-to-peak into high impedance, half that into 50 ohms) and minimum output (millivolts or below for testing sensitive circuits).
Amplitude resolution determines the smallest adjustable step. Digitally controlled instruments typically set amplitude to three or four significant digits, while older analog generators use a continuously variable control read from a dial or meter. Fine amplitude resolution enables precise level matching and small-signal testing.
Amplitude accuracy specification indicates how closely the actual output matches the displayed setting, typically ±1% to 3% of the setting plus a fixed term of about a millivolt, specified at a reference frequency such as 1 kHz. Accuracy degrades at frequency extremes and with maximum attenuation settings.
DC Offset and Compliance
DC offset capability adds a constant voltage to the AC waveform, enabling generation of unipolar signals, simulation of biased conditions, and testing of AC-coupled versus DC-coupled responses.
Offset and AC swing share the output's voltage range. The output can reach only a maximum peak voltage, so the magnitude of the offset plus the AC peak must stay within it:
|Voffset| + Vpeak ≤ Vmax
where Vpeak is the AC peak, half the peak-to-peak amplitude, and Vmax is the maximum peak output voltage into the load in use. An instrument rated at 10 V peak-to-peak into 50 ohms, for example, has Vmax = 5 V into that load, so a 2 V peak-to-peak signal can be offset by up to 4 V in either direction. Within that limit, an offset larger than the AC peak produces a signal that swings entirely above or below ground.
Offset accuracy and stability affect the quality of DC-sensitive measurements. Offset accuracy is typically specified as a percentage of the offset setting plus a fraction of the AC amplitude and a fixed term of a few millivolts, and temperature drift of the offset matters for precision applications.
Flatness and Frequency Response
Output flatness specifies the amplitude variation with frequency across the generator's range, relative to a reference frequency such as 1 kHz, typically ±0.5 dB to 1 dB for general-purpose instruments and ±0.1 dB to 0.25 dB for precision generators.
Flatness degrades at frequency extremes due to output amplifier bandwidth limitations at high frequencies and coupling capacitor effects at low frequencies. The specified flatness range indicates frequencies over which measurements can be made without significant amplitude correction.
For precision frequency response measurements, characterizing the generator's own frequency response and applying corrections yields more accurate results than relying on flatness specifications alone. Many generators include calibration data or flatness correction capabilities.
Applications and Best Practices
Effective use of function generators requires understanding their capabilities and limitations in the context of specific applications. The following guidelines help achieve accurate, repeatable measurements.
Circuit Testing and Troubleshooting
Function generators excel at injecting known signals into circuits for observing response on oscilloscopes or measuring output on meters. Key practices include:
- Verify the generator output on an oscilloscope before connecting to the circuit under test, ensuring the intended waveform is actually being produced
- Account for the generator's 50-ohm source impedance: a low-impedance load divides down the output and may draw more current than the generator can supply, while a circuit designed for a particular source impedance may need a series resistor or matching network
- Start with low amplitude and increase gradually to avoid damaging sensitive circuits
- Consider DC coupling versus AC coupling requirements; some circuits require DC offset for proper bias conditions
- For frequency-critical tests, allow the generator to warm up before measuring; manufacturers commonly state specifications after a warm-up of up to an hour
Frequency Response Measurement
Measuring frequency response using swept or stepped frequency tests requires attention to several factors:
- Sweep slowly enough for the device under test to follow: for a response of bandwidth B, keep the sweep rate well below B2 hertz per second, because fast sweeps shift and blur filter responses
- Account for generator amplitude flatness when measuring system response; characterize or calibrate the generator across the frequency range of interest
- Use synchronization outputs to coordinate time-domain measurements with the sweep frequency
- Consider logarithmic versus linear sweep modes based on the frequency range and desired resolution
- Allow adequate settling time at each frequency for high-Q systems that ring after frequency changes
Signal Integrity Considerations
Maintaining signal integrity from generator to device under test is essential for valid measurements:
- Use quality coaxial cables appropriate for the frequency range; cable losses and reflections increase with frequency
- Terminate cables in their characteristic impedance when edge fidelity matters; the generator's 50-ohm source absorbs a reflection from an unterminated far end, but the edge seen along the cable becomes a two-step staircase and the load's capacitance adds overshoot and ringing
- Keep cable runs short when testing high-speed signals; coaxial cable with a solid polyethylene dielectric, such as RG-58, has a velocity factor of about 0.66 and delays a signal by approximately 1.5 ns per foot, or 5 ns per meter
- Ground connections should be short and direct; ground loops and inductance degrade high-frequency performance
- Consider ground isolation for differential signals or when ground currents could affect measurements
Synchronization and Triggering
Coordinating function generator operation with other instruments and system events enables complex measurements:
- Share one reference among multiple generators to lock their frequencies, then align their phases with the instruments' phase adjustment or synchronization command for phase-coherent multi-channel signals
- Trigger outputs mark output waveform cycles for oscilloscope synchronization
- External trigger inputs synchronize generator output with system events for stimulus-response measurements
- Gate inputs enable burst outputs synchronized to system windows
- For automated test systems, verify trigger timing specifications to ensure proper measurement coordination
Conclusion
Function generators have evolved from simple analog waveform sources to sophisticated instruments capable of producing virtually any signal required for electronic testing and development. The combination of standard waveforms (sine, square, triangle), arbitrary waveform capability, comprehensive modulation features, and precision frequency control makes modern function generators indispensable tools for electronics work.
Understanding the underlying generation techniques—from analog triangle-to-sine shaping to direct digital synthesis and arbitrary waveform memory—enables effective selection and use of these instruments. Each approach offers distinct advantages: analog simplicity and inherent waveform correlation, digital precision and flexibility, or the waveform freedom of arbitrary synthesis, bounded only by sample rate, memory depth, and resolution.
As electronic systems continue advancing in complexity and performance, function generators evolve to meet new requirements. Higher frequencies, faster edge rates, deeper arbitrary waveform memory, and tighter frequency accuracy push the boundaries of signal generation technology. Mastering function generator capabilities and limitations prepares the electronics practitioner for effective testing across this continually expanding domain.