• Channels
Part Inventory
Go
 
powered by:

 
  • Quick Poll
What Social Networking site do you use the most?



VOTE VIEW RESULTS
Previous Polls

Premium Content

New Signal Chain Technical Papers from Texas Instruments:

 

 

 

Use FFTs To Time Align Asynchronous Waveforms

A basic Fourier transform identity coupled with an iterative convergence algorithm provides a powerful method to align band-limited signals.


Gerrit Barrere

February 04, 2002

Print
Reprints Comment Subscribe

Recently, I wrote automated test software for a multichannel data-acquisition system that I had designed, where sampled waveform accuracy and repeatability were very important. The input waveforms pass through anti-alias filtering, gain, and offset stages before being sampled. It's important to verify that this analog circuitry, which precedes the analog-to-digital converter (ADC), operates properly. One good method is to check the pulse response of the analog circuitry by running a pulse through it and examining the resulting waveform samples.

Prior to testing the analog filters for go/no-go acceptability, a tolerance window must be determined. Then, any filter whose response lies outside the window is rejected. This window may be created by a Spice simulation of the filter using Monte Carlo variation of the component values. Another option is measuring a number of known-good units and calculating an average response and variation from the measurement data.

But a problem arises when the pulse excitation isn't synchronized with the a-d sampling system. This often happens with independent test-equipment modules. The samples from one acquisition exhibit a random time shift relative to samples from another acquisition, or to the reference Spice simulation. Given an analog waveform input, the sampling system may record an infinite number of sample sequences, depending on the phase of the sample clock relative to the input signal (Fig. 1).

Even though the two sample sequences in Figure 1 represent the same analog waveform, averaging or comparing them is difficult due to the time shift between them. You can't simply pair up corresponding samples because the two sequences sample slightly different points on the analog waveform. If you increase the sample rate, either in hardware or by sample interpolation in software, the situation improves. But it never becomes ideal.

Ideally, you want to time shift the samples of each independent sequence to a fixed reference point in time. Then, the sequences may be directly combined and compared, sample by sample. In this application, it's convenient to shift all waveform samples some fraction of one sample period, so that the first positive sample (just past a rising-edge zero-crossing) shifts earlier in time to exactly the zero-crossing. Such a time shift is equivalent to synchronizing the sampling clock to a zero-crossing of the input test square wave.

This is a fine plan, but how do you shift to new sample points along an analog wave without the original wave? After sampling, all that remains is the set of samples acquired from the particular points at which sampling took place. But if the analog signal is properly bandwidth limited prior to sampling, then the samples contain all of the information in the original wave. In other words, all frequencies greater than half the sampling frequency (in this baseband application) must be suppressed to below the sampler's least significant bit (LSB). This provides the information necessary to accurately reconstruct samples in between the actual samples.

To perform the time shift, we can take advantage of a Fourier transform identity. These identities link operations in the time domain to equivalent operations in the frequency domain (see the table). Some operations are equivalent in their implementation. For instance, Identities 2 and 3 show that multiplication by a constant in the time domain is equivalent to multiplication by the same constant in the frequency domain. Or, the addition of two time-domain waveforms is equivalent to adding their frequency-domain counterparts.

But some identities involve very different operations, like Identity 5. It states that multiplication of two time-domain waveforms is equivalent to the convolution of their frequency-domain transforms. Identity 4 shows that to perform a constant time shift of c in the time domain, you may perform a constant-slope phase shift in the frequency domain, which the multiplication by ejcƒÖ indicates. This is exactly the operation required to time align the samples for the application example in this article.

Multiplication by ejcƒÖ in the frequency domain might not look like a phase-shifting operation, but don't be fooled. Each frequency-domain sample, F(ƒÖn), produced by the Fourier transform is a complex vector that can be represented as a magnitude and phase A?ÚƒÆ. Using Euler's equation and trigonometric identities yields:

or a vector of length 1 with an angle of cƒÖn. Therefore,

shows that multiplying a complex vector by ejcƒÖn results in a simple addition of cƒÖn to its phase, without affecting its magnitude. Because the cƒÖn term is directly proportional to frequency ƒÖn, the amount of phase shift to be applied to the frequency-domain samples increases linearly with frequency.

To accomplish our time shift, we will transform our time samples to the frequency domain and back, which means an additional requirement to ensure accurate results. The time-domain signal must exhibit an exact integer number of periods within the frame of N samples to be transformed. If this requirement isn't satisfied, a discontinuity will exist between the first and last samples of the frame. This discontinuity causes spectral "leakage" in the frequency domain, leading to ringing at the beginning and end of the time sequence when the inverse transform is performed.

The requirement for periodicity within the sample frame is frequently met by windowing the time data with a function that forces the beginning and ending portions of the time waveform to have the same value and slope. This eliminates any discontinuity between them. In many cases, this is the only re-course when real-world data won't line up nicely within the sample frame.

But in this application, it's easy to place our pulse waveform within the sample frame such that the waveform matches itself at the beginning and end of the frame. It forms a perfectly periodic signal, with one period per sample frame. Therefore, no windowing is necessary, and the waveform may be transformed to the frequency domain and back without introducing spectral leakage or time-domain ringing.

Average (0 Ratings):

Subscribe
Subscribe to Electronic Design and start receiving more articles like this one
Filed Under:

Check for price and availability on Source ESB:

Go
powered by  
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
Acceptable Use Policy

Sponsored Links