*** More digital signal processing in the knowledge article: Digital Data Acquisition and Signal Processing Seminar ***
During digital data acquisition, transducers output analog signals which must be digitized for a computer. A computer cannot store continuous analog time waveforms like the transducers produce, so instead it breaks the signal into discrete ‘pieces’ or ‘samples’ to store them.
Data is recorded in the time domain, but often it is desired to perform a Fourier transform to view the data in the frequency domain. There are unique terms used when performing a Fourier transform on this digitized data, which are not always used in the analog case. They are listed in Figure 1 below:
Whether viewing digital data in the time domain or in the frequency domain, understanding the relationship between these different terms affects the quality of the final analysis.
These Digital Signal Processing (DSP) terms and relationships are covered in this article:
1. Time Domain Terms
Incoming signals are converted to digital format in the time domain (Video 1).
Video 1 YouTube direct link: https://youtu.be/4msFgXDI5_s
There are three important settings for time domain digitization: sampling rate, block size, and frame size.
1.1 Sampling Rate (Fs)
Sampling rate (sometimes called sampling frequency or Fs) is the number of data points acquired per second.
A sampling rate of 2000 samples/second means that 2000 discrete data points are acquired every second. This can be referred to as 2000 Hertz sample frequency.
The sampling rate is important for determining the maximum amplitude and correct waveform of the signal as shown in Figure 2.
To get close to the correct peak amplitude in the time domain, it is important to sample at least 10 times faster than the highest frequency of interest. For a 100 Hertz sine wave, the minimum sampling rate would be 1000 samples per second. In practice, sampling even higher than 10x helps measure the amplitude correctly in the time domain.
It should be noted that obtaining the correct amplitude in the frequency domain only requires sampling twice the highest frequency of interest. In practice, the anti-aliasing filter in most data acquisition systems makes the requirement 2.5 times the frequency of interest. The Bandwidth section contains more information about the anti-aliasing filter.
The inverse of sampling frequency (Fs) is the sampling interval or Δt. It is the amount of time between data samples collected in the time domain as shown in Figure 3.
The smaller the quantity Δt, the better the chance of measuring the true peak in the time domain.
1.2 Block Size (N)
The block size (N) is the total number of time data points that are captured to perform a Fourier transform. A block size of 2000 means that two thousand data points are acquired, then a Fourier transform is performed.
1.3 Frame Size (T)
The frame size is the total time (T) to acquire one block of data. The frame size is the block size divided by sample frequency as shown in Figure 4.
For example, with a block size of 2000 data points and a sampling rate of 1000 samples per second, the total time to acquire a single data block is 2 seconds. It takes two seconds to collect 2000 data points.
The total time frame size is also equal to the block size times the time resolution (Figure 5).
When performing averages on multiple blocks of data, the term total amount of time might be used in different ways (Figure 6) and should not be confused:
The 'Simcenter Testlab Throughput Processing Tips' further explains the interaction between frames and averages.
2. Frequency Domain Terms
Digitized time data can be converted to the frequency domain for further analysis (Video 2).
Video 2 YouTube direct link: https://youtu.be/vPC_fancScQ
There are three important settings used in the conversion of digital time data to the frequency domain: bandwidth, spectral lines, and frequency resolution.
2.1 Bandwidth (Fmax)
The bandwidth (Fmax) is the maximum frequency that can be analyzed. The bandwidth is half of the sampling frequency (Figure 7). The Nyquist sampling criterion requires setting the sampling rate at least twice the maximum frequency of interest.
A bandwidth of 1000 Hertz means that the sampling frequency is set to 2000 samples/second.
In fact, even with a sampling rate of 2000 Hz, the actual usable bandwidth can be less than the theoretical limit of 1000 Hertz. This is because in many data acquisition systems, there is an anti-aliasing filter which starts reducing the amplitude of the signal starting at 80% of the bandwidth.
For a bandwidth of 1000 Hertz, the anti-aliasing filter reduces the bandwidth to 800 Hertz and below. The filter attenuates frequencies above 800 Hertz in this case.
In Simcenter Testlab, under ‘Tools -> Options -> General’, it is possible to view only the usable bandwidth by switching to ‘Span’ under ‘Frequency’ as shown in Figure 9.
‘Span’ represents the actual useable bandwidth, and the switching to the ‘Span’ setting makes all the Simcenter Testlab displays show only 80% of the bandwidth.
2.2 Spectral Lines (SL)
After performing a Fourier transform, the spectral lines (SL) are the total number of frequency domain data points. This is analogous to N, the number of data points in the time domain. There are two data ‘values’ at each spectral line – an amplitude and a phase value as shown in Figure 10.
Note that while the Fourier Transform results in amplitude and phase, sometimes the frequency spectrum is converted to an autopower, which eliminates the phase.
The number of spectral lines is half the block size (Figure 11).
For a block size of 2000 data points, there are 1000 spectral lines.
2.3 Frequency Resolution
The frequency resolution (Δf) is the spacing between data points in frequency. The frequency resolution equals the bandwidth divided by the spectral lines as shown in Figure 12.
For example, a bandwidth of 16 Hertz with eight spectral lines, has a frequency resolution of 2.0 Hertz (Figure 13).
The eight frequency domain spectral lines are spread evenly between 0 and 16 Hertz, which results in the 2.0 Hertz spacing on the frequency axis. Note that 0 Hertz is not included in the spectral line total. The calculated value at zero Hertz represents a constant amplitude DC offset. For example, if a 1 Volt sine wave alternated around a 5 Volt offset, the offset value would be placed at zero Hertz, while the sine wave's 1 Volt amplitude would be placed at the spectral line corresponding to the sine wave's frequency.
3. Digital Signal Processing Relationships
Putting the above relationships together, the different digital signal processing parameters can be related to each other (Figure 14).
This can be boiled down to one ‘golden equation’ of digital signal processing (Figure 15) which related frame size (T) and frequency resolution (Δf):
This means that:
The frequency resolution is important to accurately understand the signal being analyzed. In Figure 16, two sine tones (100 Hertz and 101 Hertz) have been digitized, and a Fourier Transform performed. This was done with two different frequency resolutions: 1.0 Hertz and 0.5 Hertz.
With the finer frequency resolution of 0.5 Hertz, rather than 1.0 Hertz, the spectrum shows two separate and distinct peaks. The benefit of a finer frequency resolution is very obvious. This might beg the question, why not use the finest frequency resolution possible in all cases?
There is a tradeoff. Per the ‘golden equation’ the amount of time data per frame is higher as the frequency resolution is made finer (Figure 13). This can cause requirements for long time data acquisition:
In some situations, these long time acquisition requirements are not practical. For example, a sports car may go from idle to full speed in just 4 seconds, making a 100 second acquisition, and the corresponding 0.01 frequency resolution, impossible.
Rather than using the sine formulation of the Fourier Transform, a wavelet formulation can be used instead. This can address some of the time-frequency tradeoffs. See the knowledge base article Time-Frequency Analysis: Wavelets.
4. Simcenter Testlab Settings
In Simcenter Testlab (formerly LMS Test.Lab), depending on the software module, only some of these parameters may be settable by the user. However, the digital signal processing relationships are still in effect. For example, when setting the bandwidth to 1024 Hz and spectral lines to 2048 as shown in Figure 17, several other parameters are automatically set.
For these settings, the frame size is 2 seconds (inverse of frequency resolution). The sampling frequency is 2048 samples per second, or 2048 Hertz.
Note: Why are the sampling rates and block sizes all powers of two? In the digital world, the Fast Fourier Transform (FFT) and the Discrete Fourier Transform (DFT) are computer algorithms used to perform a Fourier Transform. The Fast Fourier Transform requires a block size that is a power of two (1024, 2048, 4096, etc.) and is computationally quicker than the DFT, which can use any number of data points. With today’s modern computers, the differences in speed are not as noticeable in the past. But due to historical reasons many data acquisition systems still use power of two numbers.
Hopefully this article will be a useful reference for performing digital data acquisition. Some of the key points discussed: