Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Simcenter
- Forums
- Blogs
- Knowledge Bases

- Siemens PLM Community
- Simcenter
- Testing Knowledge Base
- Digital Signal Processing: Sampling Rates, Bandwid...

- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Labels:

**Digital Signal Processing (DSP): Sampling Rates, Bandwidth, Spectral Lines, and more…**

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.

*Time Domain Terms*

*Sampling Rate (F*– Number of data samples acquired per second_{s})*Frame Size**(T)*– Amount of time data collected to perform a Fourier transform*Block Size (N)*– Total number of data samples acquired during one frame

*Frequency Domain Terms*

*Bandwidth (F*– Highest frequency that is captured in the Fourier transform, equal to half the sampling rate_{max})*Spectral Lines*(*SL*)– After Fourier transform, total number of frequency domain samples*Frequency Resolution (**Δf)*– Spacing between samples in the frequency domain

*Sampling Rate (F _{s})*

Sampling rate (sometimes called sampling frequency or F_{s}) 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 (F_{s}) 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.

*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.

*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:

- Total Time to Acquire One Block – The frame size (T) is the time to acquire
*one*data block, for example, this could be*two*seconds - Total Time to Average – If five blocks of data (two seconds each) are to be averaged, the total time to acquire all five blocks (with no overlap) would be 10 seconds

The 'Throughput Processing knowledge base article' further explains the interaction between frames and averages.

*Bandwidth (F _{max})*

The bandwidth (F_{max}) 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 LMS Test.Lab, 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 LMS Test.Lab displays show only 80% of the bandwidth.

*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.

*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.

**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
*finer*the desired frequency resolution, the longer the acquisition time - The shorter the acquisition time, or frame size, the
*coarser*the frequency resolution

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:

- 10 Hz frequency resolution is desired, only 0.1 seconds of data is required
- 1 Hertz frequency resolution requires 1 second of data
- 0.1 Hertz frequency resolution requires 10 seconds of data
- 0.01 Hertz frequency resolution requires 100 seconds of data!

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.

**LMS Test.Lab Settings**

In 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.

**Conclusions**

Hopefully this article will be a useful reference for performing digital data acquisition. Some of the key points discussed:

- Sampling frequency (F
_{s}) must be set properly to capture the correct amplitude:- High as possible to capture peak amplitude in
*time domain.*Should be set no lower than 10x the highest frequency of interest. - At least two times higher than the highest frequency of interest for the
*frequency domain.*This would be at least 2.5x higher if accounting for an anti-aliasing filter.

- High as possible to capture peak amplitude in
- There is an inverse relationship (the ‘golden equation’) relating frequency resolution (Δf) and frame size time (T)

Questions? Contact us!

**Related Links:**

Labels:

- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc