How can I compare a 1000 Hz signal with a 1024 Hz signal?

조회 수: 8 (최근 30일)
Maria Ma
Maria Ma 2021년 8월 3일
댓글: Scott MacKenzie 2021년 8월 3일
I have generated two sets of data. Each set of data is a 1-dimensional vector. The first vector contains samples which are generated with a sample rate of 1000 Hz. The second vector contains samples which are generated with a sample rate of 1024 Hz and is therefore a bit longer than the first vector. Both vectors contain samples over the same time span.
Now, I want to compare the two sets of data which are generated with different sample rates but over the same time span. But I am not sure how to do that properly. My goal is to derive the differences between these two vectors. I already tried to upsample the vector (with the 1000 Hz data) to 1024 Hz by using "resample". I know that resampling requires some filtering and will effect the ampltiude of the signal, which the "resample" function does. I´d like to keep the effects from the resampling as low as possible.
It looks like that the amplitude of the upsampled signal is overall 20% lower than the original signal. This decrease in the amplitude looks too high for me and affects my comparison too much.
So here are my questions:
  1. How can I compare two signals with two different sample rates properly?
  2. Do you have any suggestions how to implement this?
  3. Does my actual attempt makes sense to you?
Thank you very much in advance.
Best regards
  댓글 수: 2
KSSV
KSSV 2021년 8월 3일
You can interpolate and get the vectors to the same size.
Scott MacKenzie
Scott MacKenzie 2021년 8월 3일
If you are worried about changes in amplitude, then you can use rescale to restore the amplitude after resampling, for example
y = resample( );
y2 = rescale(y, -1, 1];

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by