Function Generators and AWG
In questa pagina 4
To test a device the test signal must be generated with known, adjustable parameters (Oscilloscope Probes and Test SignalsA passive probe is an Rp parallel Cp network in series with the oscilloscope input; it reduces the load on the circuit and attenuates the signal, and it is compensated when Ri Ci = Rp Cp; test signals (sinusoid, rectangular, triangular, modulated, sweep) are described by a few time-domain parameters read on the screen.Oscilloscope Probes and Test Signals →). The instrument is the function generator (AFG, arbitrary function generator): an oscillator with predefined waveforms and, in modern versions, the possibility of generating an arbitrary waveform (AWG, arbitrary waveform generator). Signals are then observed with the The OscilloscopeThe oscilloscope displays the joint trend of two or more quantities; its functional blocks are input channels, trigger and synchronization, time base and acquisition and display, and its input impedance, bandwidth, rise time, coupling, hold-off and probe compensation determine how faithfully a signal is shown.The Oscilloscope →; a lab experience with the generator is in Lab 2 - AC Measurements with the Signal GeneratorSecond laboratory session: indirect measurements with a photoresistor and an LM35 sensor, use of the signal generator (sine, impedance setting) and comparison of multimeter RMS readings with the RMS formula for sinusoidal and non-sinusoidal waveforms.Lab 2 - AC Measurements with the Signal Generator →.
What it generates
- periodic waveforms: sinusoid, square, rectangular, triangular, sawtooth, pulses, noise; one sets amplitude ( or and ), offsetconstant additive term in the output voltage, frequency, duty cycle;
- modulations: AM, FM, PWM; linear or logarithmic frequency sweep;
- a sync signal at TTL levels (-) marking a point of the signal (start of the period, end of the sweep), useful to trigger the oscilloscope;
- an output with impedance : connected to a load (for example the oscilloscope input, or a circuit) the real generator is an ideal voltage generator with in series, so the load voltage is a divider With the load sees half of the open-circuit voltage; with almost all of it. The generator also has a maximum voltage () and a maximum output power (for example ); for a constant resistive load with across it, , a constraint used for example to size a resistor in series with a diode.
The core of an AWG: memory, DAC and filter
The scheme of a direct digital synthesis AWG is
- Memory (look-up table, LUT): contains samples of the waveform, bits each.
- DAC: at every clock of period it converts the current sample to a voltage, which it holds constant until the next one, creating a staircase shape (Analog-to-Digital ConversionAnalog-to-digital conversion consists of sampling (sample-and-hold), uniform quantization with step Delta and error uniformly distributed in plus or minus Delta over 2, and binary coding; flash, successive-approximation and integrating converters trade speed against resolution.Analog-to-Digital Conversion →). With bits the amplitude step is .
- Reconstruction filter (interpolator): a low-pass that removes the spectral images centred on multiples of (due to the steps) and smooths the waveform. The attenuation of the steps on the useful signal is that of : for it is , for it is .
If at every clock the next address is read and at the end the pointer returns to the first location, the output is a periodic waveform with period : to generate a sinusoid the memory is filled with samples of a sinusoid. A whole number of periods must be stored, otherwise the passage from the last to the first location creates a discontinuity (and unwanted spectral lines). If periods are stored in samples, the output frequency is : with , , one gets .
Registers PIR, PR and AR: variable-frequency synthesis
Changing the frequency by adjusting would be inconvenient, so a phase accumulator is used:
- PIR (phase increment register): number added at every clock;
- PR (phase register): -bit register () that at every clock does (modulo ): it represents the phase as a fraction of ;
- AR (address register): the most significant bits of PR, used as memory address.
With the address changes every clocks; with larger addresses are skipped faster. On average each LUT sample lasts The output period is that of samples: The frequency resolution () is : with and it is .
Example. , , (1024 samples), desired frequency : , rounded to ; the real frequency is . Each address lasts on average clocks, so a period is clocks . Since is not an integer multiple of , some samples last and others clocks: a small phase error (jitter) attenuated by the filter.
DAC parameters and non-idealities
- static: offset error, gain error, integral and differential non-linearity (INL, DNL);
- dynamic: settling time, glitches (spikes at transitions due to non-simultaneous switches), total harmonic distortion THD, SFDR (spurious free dynamic range).
An -bit DAC can be built with current generators weighted in powers of driven by switches (); element tolerances set the quality. Glitches and settling-time errors worsen at high frequency.
Common mistakes
- Saying the output frequency is when the phase accumulator is used: it depends on .
- Forgetting that AR are the most significant bits of PR.
- Storing a non-integer number of periods in memory.
- Neglecting the output impedance: open-circuit and on a load the voltage differs by a factor .
- Omitting the reconstruction filter: the images at remain.
Versione ripasso
Key statements and formulas
- Function generator: sinusoid, square, triangular, pulses, noise, AM/FM/PWM, sweep, plus a TTL sync signal. Output impedance : (half the voltage on a load).
- AWG: LUT of samples of bits, DAC (staircase, step ), reconstruction filter that removes images at multiples of ; attenuation of the useful signal.
- Fixed memory readout: period ; a whole number of periods in memory, .
- Phase accumulator: modulo , = most significant bits of PR; ; ; resolution .
- DAC: static parameters (offset, gain, INL, DNL) and dynamic ones (settling time, glitches, THD, SFDR).
Main steps of the examples
- , , : .
- , , , target : , real frequency ; each address lasts clocks on average (samples of or clocks: jitter).
- Resolution with : .
Typical mistakes
- with the accumulator.
- AR taken as the least significant bits.
- Non-integer number of periods in memory.
- Ignoring the output impedance.
- No reconstruction filter.