 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] Re: DSP method
| [mathcad] Re: DSP method |
|
Author: Quang-Viet Nguyen
Posted: Wed, 11 Jan 2006 13:04:24 -0500
|
Hi Mark,
At 05:26 PM 1/11/2006 +0000, Mark Smith wrote:
>I have 2 digitised signals (A2D sampled) which are very similar in shape
>but differ by a fixed time difference, can anyone suggest methods which
>will allow me to calculate what the time difference is?
> I have the feeling that if i can somehow use all the data I should get a
> much more accurate value than say just comparing a zero crossing of the 2
> traces which I think will be far more susceptable to noise in the signal.
>
>Thanks in advance
>mark
You should check on the theory behind this, but I think there is a rather
fast way to do this with the built in FFT functions. You are trying to
calculate the cross-correlation function between the two signals, and
this can be found by doing the following:
Given two discrete time series signals f(t) and g(t),
1. take the FFT of each F(s) and G(s),
2. take the complex product of F(s) with the conjugate of G(s)
3. take the inverse FFT of the above product in (3) to get the
cross-correlation funtion R(t)
4. plot R(t) to see where the peaks are, and you can process R(t) to
automatically find the maxima.
The resulting function R(t) is the cross-correlation, and is in time units,
the peaks of this function correspond to maximum overlaps and correspond to
the difference in time you are looking for. If it is cyclic, you will get
multiple peaks.
I have done this to find the time delay between two digitized time-series
signals from transducers, microphones, etc. You also get the power
spectrum by plotting the FFT vs frequency.
I hope this helps.
Viet Nguyen
Quang-Viet Nguyen, Ph.D.
NASA Glenn Research Center
21000 Brookpark Rd, MS 5-10
Cleveland, Ohio 44135
Voice: (216) 433-3574
Fax: (216) 433-5802
E-Mail: "Quang-Viet.Nguyen" or "Quang-Viet.Nguyen-1"
|
[View Complete Thread]
Previous by date: [mathcad] Re: DSP method, Eden Mei
Next by date: [mathcad] DSP method, Mark Smith
Previous thread: [mathcad] DSP method, Mark Smith
Next thread: [mathcad] DSP method, Mark Smith
|
|
|