Signal chain applications exist in a wide variety of markets, including industrial measurement, medical equipment and automotive electronics. As these applications become more and more advanced, engineers must properly measure and quantify circuit performance.
Figure 1 is a simplified block diagram of a generic input signal chain, along with a digital processing block. There are a number of specific techniques that measure the performance of an input signal chain. This article will discuss two popular techniques — histograms and fast Fourier Transforms (FFT).
Click to Enlarge Image
Figure 1: Input Signal Chain Block Diagram
A histogram is a tabulated display that represents a specified output’s frequency of occurrence. For input signal chains, including the analog-to-digital converter (ADC) portion of the chain, a histogram can measure the static, or DC, characteristics of the circuitry, such as offset and noise performance.
For a noiseless ADC, a constant input produces the same digital output code for each sample, resulting in a histogram containing only one bin (Figure 2, Part A ). For an ADC with noise, the resulting digital output codes will spread across multiple bins (Figure 2, Part B ).
Click to Enlarge Image
Figure 2: Input Signal Chain Block Diagram
This ADC noise, which is present in all electrical systems, can be described as “Gaussian” in nature, implying that the probability density function of the noise is normally distributed about a mean. This property results in a bell-shaped histogram, fully described by the mean and standard deviation. Other noise sources, such as power-supply hum or a mechanical resonance, are not Gaussian in nature and will skew a bell-shaped distribution.
Figure 3 shows a hypothetical histogram of the output codes of an ADC. In this example, the inputs to the ADC are held at zero volts, and multiple samples are taken.
Click to Enlarge Image
Figure 3: Input Signal Chain Block Diagram
This histogram determines several circuit characteristics. Since the input to the ADC is held at zero, the digital output would ideally be a constant code corresponding to a voltage of zero. The above illustration indicates this ideal code.
The mean, or arithmetic average, of the resulting output codes is also identified in this histogram. The resulting difference between these two codes is the DC offset error of the converter. If the converter does not have offset, the Gaussian noise will be normally distributed about the ideal output code. The standard deviation is a statistical measurement that relates to how closely the samples are clustered around the mean value. One standard deviation from the mean accounts for approximately 68 percent of all the samples.
In terms of an ADC’s performance, this standard deviation is also the root-mean-squared (rms) value of the noise. The spread from the minimum to the maximum sample determines peak-to-peak noise. For Gaussian-distributed noise, peak-to-peak noise can also be determined by multiplying the rms noise (standard deviation) by a factor of 6.6. This accounts for over 99 percent of the noise. On the other hand, tones such as those shown in Figure 3 are not Gaussian in nature and do not conform to this statistical analysis.
Fast Fourier Transforms (FFTs)
Many applications, including audio and video, require an analog-to-digital converter to capture a changing, or dynamic, signal. In these types of applications, the use of DC analysis techniques, such as histograms, alone, is not effective for measuring the performance of the input signal chain. Instead, to measure the performance of dynamic signals, the way in which the circuitry alters the spectrum of the original input signal must be determined.
A powerful tool for determining the spectrum of the signal for these types of applications is the Fast Fourier Transform (FFT). The basic premise behind the FFT is to translate a time domain signal (such as a sine wave or speech waveform) into its frequency components. The magnitude and frequency of the spectral components can then be analyzed.
One criterion for applying an FFT is that the time domain waveform must be periodic over the finite time that the transform is applied. This means that multiple copies of the input waveform can be placed together without causing any discontinuities (Figure 4, Part A ). In order to satisfy this criterion, a technique called “windowing” is implemented. This technique applies a windowing function to the time domain waveform. The resulting waveform minimizes the discontinuities at the sample edges and reduces spectral leakage (Figure 4, Part B ).
Click to Enlarge Image
Figure 4: Input Signal Chain Block Diagram
Although windowing reduces spectral leakage, it cannot eliminate it. Many different windowing functions exist, each with its' own advantages and disadvantages. The main differences between windowing functions lie in how they handle spectral leakage. Before we discuss these differences, a brief overview of the FFT sampling process is required.
An FFT algorithm is applied to a time-domain signal over a given number of samples. The sample size of the FFT must be a power of two, for example 27 = 128 samples. The number of samples used for an FFT varies based on the resolution needed, processing power, and characteristics of the input signal. The FFT will then translate the
time-domain signal to the frequency domain.
Next, the frequency content of the input signal is quantized into bins, where the number of bins is equal to half of the samples used in the FFT. For example, an FFT with 128 samples will have 64 bins, with each bin representing a portion of the frequency band from DC up to half of the sample rate.
When the FFT algorithm processes non-periodic signals, spectral leakage occurs across the entire frequency spectrum. This results in the spread of spectral energy from one bin to multiple bins. For example, if an FFT were applied to a pure sine wave, one would expect all of the spectral content to fall within one bin — the bin containing the fundamental frequency of the original sine wave. However, due to the windowing function, some of the spectral content leaks into side bins. This leakage causes the main lobe to appear wider, and results in an error in the spectral magnitude. A full-scale input signal does not result in a full-scale main lobe due to leaked spectral energy.
Some windowing functions are better then others for a specific type of input signal, such as sinusoidal or random signals. In addition, the optimal windowing function depends upon what characteristic is most important to the engineer. Some windowing functions do a better job of preserving the magnitude of the original waveform, while others offer better frequency accuracy. Therefore, the windowing function used should be based upon the unique parameters of each application.
The resulting power spectrum from an FFT can be used to calculate quantitative performance measures of the ADC and/or the entire signal chain. Figure 5 shows a hypothetical power spectrum resulting from a sine wave input.
Click to Enlarge Image
Figure 5: Input Signal Chain Block Diagram
The X-axis of the power spectrum represents frequency, ranging from 0 Hz up to half of the sample rate (Fs ). The Y-axis represents amplitude, typically shown in decibels (dB). Several qualitative observations are gained by looking at the resulting power spectrum.
First, most of the spectral energy should reside in the bin or bins that contain the fundamental frequency of the input sine wave. In Figure 5, these bins are colored green. This hypothetical FFT spectrum includes input harmonics, shown in yellow. The relative magnitude of these harmonics is a function of the design of the ADC.
Secondly, the spectrum shows higher energy components at low frequency (shown in orange). This could indicate that the circuitry has a DC component. By applying a static input and using the histogram analysis discussed above, this offset is quickly quantified.
Finally, the spectrum indicates that there is a tone present, shown in red. This tone could be present in the input signal or could be a result of the input circuitry. Further analysis can determine the source of the tone.
The FFT spectrum also enables the performance of quantitative analysis. Common performance measures include signal-to-noise ratio, total harmonic distortion, harmonic distortion and noise, signal-to-peak noise, and signal-to-distortion ratio.
- Signal-to-Noise Ratio (SNR) : This ratio measures signal strength relative to the broadband noise of the signal. The signal strength in the above spectrum
(Figure 5) is represented in green, while the broadband noise is represented by the bins colored with black. Harmonic noise, shown in yellow, is not included in this measurement.
- Total Harmonic Distortion (THD) : This measure is a ratio of the total harmonic energy to the energy of the input signal. In the FFT spectrum, the total harmonic distortion is the integrated noise of the bins shown in yellow, relative to the energy of the bins shown in green (the fundamental input signal).
- Total Harmonic Distortion and Noise (THD+N) : This ratio is very similar to total harmonic distortion, only the broadband noise (shown in black) is included in the harmonic energy.
- Signal-to-Peak Noise (SPN) : Signal-to-peak noise is the ratio of the input signal energy to the largest noise or distortion component. In Figure 5, the tone (shown in red) is the highest component.
- Signal-to-Distortion Ratio (SDR) : The signal-to-distortion ratio is the inverse of total harmonic distortion. While THD measures the harmonic energy relative to the input signal, the signal-to-distortion ratio is the signal energy relative to the harmonic energy. THD is typically used in audio applications as a measure of linearity. SDR is an indication of the integral non-linearity of the system and is typically used in measuring data-acquisition applications.
Several techniques exist for measuring and quantifying the performance of an input signal chain. Histograms are a useful tool for analyzing the static, or DC, performance of the circuit. In addition, histograms quickly illustrate information on the offset and noise characteristics of the circuit.
FFTs create the power spectrum that offers information on the dynamic, or AC, performance of the circuitry. The selection of an appropriate windowing function and understanding the consequences of that selection are important aspects of using FFTs.
While each of these techniques provides valuable information, if used in isolation, the overall performance of the circuit cannot be determined. Therefore, a combination of both histograms and FFTs is required for testing and debugging all aspects of an input signal chain.