Software-based enhanced acquired-spectrum analysis can gather the data relevant to avoiding development pitfalls.
Often there are some advantages in using frequency domain techniques, as opposed to using strictly time domain techniques, to analyze signals obtained in data acquisition. The merits and possible issues of using a particular frequency-based transform methodology along with subsequent graphical analyses are discussed. Appropriate choices for analyzing signals in the frequency domain can often improve the overall system during the concept, development, and/or testing phase of many data acquisition systems.
Frequency domain analysis plays an important role in the design and testing of many militarized systems, including wireless communications, remote sensing, radar processing, audio processing (such as speech recognition/authentication, watermarking, and compression/VoIP), and more. The development process of an embedded computing military application often requires sampling real-world physical systems through a data acquisition process that results in a digital representation of those signals.
Although the data representing these signals is most often sampled in the time domain, many applications engineers find it easier – and more conceptually clear – to work with the data in the frequency domain. This is because of the many engineering relationships governing information, which are typically described in the frequency domain. A thorough frequency analysis of the data being acquired and processed can facilitate the retrieval of subtle information contained within the signal and provide valuable insight into the real-world environment that will be encountered. Often that subtle information includes signal artifacts with very low Signal-to-Noise Ratios (SNRs), which might be missed in analyzing the data exclusively from the time domain.
However, there are challenges that can arise to complicate the spectrum analysis of a signal, possibly resulting in a misreading of real-world data. Understanding the analysis options that are available and avoiding potential pitfalls can lead to a more robust design implementation that ultimately results in improved performance of the embedded system prior to its deployment in the field. The data acquisition process serves as impetus for signal conditioning, data discontinuities, bandwidth considerations, channel and SNR analysis, and filtering requirements – all of which can be studied in the frequency domain through a detailed graphical analysis. The proper choices for the transform method and graphical analysis selection and associated parameters will often benefit a data acquisition-based system.
Deciding on a transform method
There are numerous methods for extracting the frequency domain information from acquired time domain data. The selection of a frequency domain transform plays a large role in determining how the acquired data is actually portrayed in a frequency-based display, and each has its own trade-offs of advantages and disadvantages. These frequency domain transforms include the Fast Fourier Transform (FFT), the Constant-Q Transform (CQT), and the Goertzel transform.
The FFT is an implementation of a Discrete Fourier Transform (DFT) with the benefit of considerable speed and efficiency. A useful conceptual aid for the FFT is to consider cross-correlating the input signal with a set of sine/cosine waves, starting each pair at a low fundamental frequency and then increasing the frequency of the pair by an integral multiple of the initial fundamental frequency. It delivers its results in the frequency domain in a linear fashion with regard to the frequency axis, and produces a frequency domain data set with length equal to a power of 2. Therefore, to obtain fine resolution in the frequency domain, a large FFT size is needed to get the many points needed, which are distributed linearly from 0 Hertz (DC) to the sampling rate divided by 2.
If only a small portion of the frequency domain is needed, but with good resolution, the FFT might not always be the best choice. The CQT, although not as efficient as the FFT in a brute-force sense, produces frequency domain results in a logarithmic fashion with respect to the frequency axis. It generally attempts to model the human auditory tract, and acoustic/speech applications are sometimes benefited by this approach. A good way to think of the CQT is as a group of logarithmically spaced filters acting on the input signal. The issue here is that the CQT will allow more resolution for lower areas of the resulting spectrum at the expense of the resolution at the higher frequencies; the resolution trade-off is specific to the choice of parameters used in the CQT. For some acoustic/speech applications, the increased resolution of the lower frequencies because of the logarithmic axis allows more relevant details to be seen.
The Goertzel transform can be used to extract frequency domain information defined at arbitrary points in the frequency axis. By selecting and organizing an array of these arbitrary points, it is possible to end up with great resolution for only a small part of the overall signal bandwidth (typically sampling rate divided by two). Thus, although it may be computationally less efficient than the FFT on a point-per-point basis, for some applications it may actually be better as the requirement might be for fewer overall points. The specific trade-offs between resolution and computation time will be dependent upon the choice of desired frequencies made by the engineer for the application. It is the application itself that drives the efficacy of using a particular transform method.
Choosing the graphical analysis
A typical straightforward method of frequency domain analysis involves graphing the data. A simple two-dimensional frequency domain display (or time slice) will plot the magnitude of the signal against either a logarithmic or linear frequency scale. Additionally, the magnitude component itself can be plotted on either a logarithmic or linear scale; a logarithmic scale will accommodate an increased range of the signal to be viewed. Deciding whether to use a log or linear scale is often dependent upon the nature of the signal being analyzed. Having the ability to graphically view the spectrum with each approach can be beneficial in making that determination.
Beyond the standard frequency display is the spectrogram, which uses three dimensions when plotting the data. More often than not, the time domain is used as a horizontal x-axis, with frequency running along a vertical y-axis, and the magnitude component is shown as a third dimension represented along the z-plane as either a color or a height. Again, as with the two-dimensional plot, both frequency and magnitude components can each be viewed on their own logarithmic or linear scale. A significant benefit of the spectrogram is that the time span allowed by this graph includes more than a single frame, or slice, of data – perhaps even hundreds of frames; this can be especially important for noticing time-varying events occurring in signals.
Figure 1 shows a simple before-and-after comparison of an acquired signal alongside its processed counterpart. The spectrogram display of the acquired signal shows the presence of a sinusoidal noise component comprising a frequency that is easily discerned by a graphical measurement. This information leads to designing a digital filter to remove the unwanted component from the signal.
Figure 1: Spectrogram analysis of an acquired signal
(Click graphic to zoom)
In addition to the transform used for frequency mapping, some consideration must also be given to transform parameters such as windowing and time domain region of interest choices including zero-filling and truncation.
How window functions affect the resulting data
Although a detailed look at window functions is beyond the scope of this discussion, it is important to note that they are often used to improve the frequency transformation in an application-dependent manner. The simplest window, called rectangular, results in just a segment of the time waveform being used. One of the issues with its use is the artificial frequency artifacts that result from the segment’s boundaries; the transform will see these boundaries without the benefit of knowing the signal actually continues, and will produce results accordingly. There are numerous other window functions that minimize this effect with a variety of different results, and oftentimes graphical analysis is employed to study the various trade-offs. An analysis of the signal’s standard frequency display or spectrogram is often a good method to better understand which type of window to apply and how it affects the resulting data.
Which data is being analyzed: Zero-filling/truncation
One common pitfall associated with frequency domain analysis lies in the incorrect selection or usage of the time analysis region for the data being studied. This can happen when an arbitrary amount of time domain data is plotted (in time) together with a frequency domain display without any indication of which time segment has actually been used for the frequency transform. For example, if the time display is showing a signal with 10,000 points but the frequency display is based on a 512-point FFT, the real time region is likely the first 512 points of the 10,000; if the engineer looking at the display incorrectly assumes it is showing the frequency for the whole 10,000 points, he may make design decisions that are incorrect. In Figure 2, NEXTWave Signal Processing Lab software from NEXTXEN is used to show the effects of varying the time analysis region being processed and zero-filling/truncation on a time-domain signal; note the highlighted region of the time domain waveform being analyzed. As is illustrated in the graphs, choosing a larger time duration as an input to the frequency transform results in a higher resolution of the calculated spectrum as compared to transforms using a shorter time duration.
Figure 2: Effects of time duration, transform size, and zero-filling
(Click graphic to zoom by 1.9x)
Frequency domain analysis improves the system
Many embedded militarized real-time data acquisition systems can benefit from specialized software-based signal processing and frequency domain analysis. From a signal processing perspective, certain limitations exist in the way acquired data can be handled to avoid pitfalls when performing the frequency domain analysis. Being aware of the trade-offs associated with the transform process and how the calculated results are displayed when working with acquired data is an important part of this development cycle. A software approach that makes use of enhanced acquired-spectrum analysis can provide information relevant to embedded application development and lead to a more robust system design.
Steve Zachman is Vice President, Engineering at NEXTXEN, a developer of signal processing and neural network software. He has more than 20 years of experience in the digital signal processing development tools industry, including data acquisition and real-time DSP systems. He can be contacted at email@example.com.