4

I have a signal $X$ and I want to find signal $Y$ in $X$, I can achieve this by cross-correlation. Signal $X$ is sampled at $8000\textrm{ Hz}$, and $Y$ signal is sampled at $44100\textrm{ Hz}$.

My question is "should both signals be sampled at same rate to correlate to find $Y$ in $X$ " Or is it okay to correlate two signals sampled at different rate to find $Y$ in $X$?

Gilles
  • 3,386
  • 3
  • 21
  • 28
Haris_tech
  • 41
  • 1
  • 4

1 Answers1

2

If you are looking for the exact signal, then yes you need to resample one of them to the same rate as the other before performing a cross correlation. Otherwise you will be cross correlating against a time-stretched (or compressed) version of the desired signal (which probably will not yield accurate results). If your $Y$ signal bandwidth is less than $4000\textrm{ Hz}$, then you may want to use an anti-aliasing filter and resample it to $8000\textrm{ Hz}$ for reduced computational load in the cross correlation. If not, then you must resample the signal $X$ to $44100\textrm{ Hz}$ in order for a cross correlation to be meaningful.

Gilles
  • 3,386
  • 3
  • 21
  • 28
hops
  • 1,422
  • 9
  • 15
  • Thanks. 44100 / 8000 is 5.5125, how can i resample Y at 8000hz? Matlab offers integral down sampling. I can sample Y only at 44100 so i have to down sample it at 8khz but how can I achieve this accurately? – Haris_tech May 09 '17 at 05:57
  • There are many ways to achieve this. If you are interested in details, I'd suggest asking a new question to get a wide variety of answers from several people. In this case though, I'm assuming that you can do this resampling offline. In that case, just use the resample command in Matlab to resample your signal (if you have Matlab). – hops May 09 '17 at 06:06
  • Thanks a lot. i have found this on forum https://dsp.stackexchange.com/questions/20303/trying-to-downsample-audio – Haris_tech May 09 '17 at 06:31