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$?


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.

  • $\begingroup$ 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? $\endgroup$ – Haris_tech May 9 '17 at 5:57
  • $\begingroup$ 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). $\endgroup$ – hops May 9 '17 at 6:06
  • $\begingroup$ Thanks a lot. i have found this on forum dsp.stackexchange.com/questions/20303/… $\endgroup$ – Haris_tech May 9 '17 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.