resample lacks appropriate lowpass filtering

조회 수: 6 (최근 30일)
Alain
Alain 2014년 3월 4일
댓글: Greg Dionne 2014년 6월 10일
Surprisingly, resample does not seem to apply appropriate filtering to avoid aliasing. Try: x=randn(10000,1); pwelch(decimate(x,2)); hold on pwelch(resample(x,1,2));
decimate does the right thing, which is to first lowpass filter with a cutoff below the new Nyquist frequency. resample does not. The result is that power above the original Nyquist frequency is aliased into the downsampled signal.
Annoyingly, decimate works only on vectors.
Am I missing something?
Alain

답변 (1개)

Greg Dionne
Greg Dionne 2014년 6월 3일
편집: Greg Dionne 2014년 6월 3일
I think resample has a higher cutoff frequency to admit more of the Nyquist range. If I'm interpreting your plot correctly, DECIMATE has a 3dB point near 0.8 pi rad/s; whereas the 3dB point of RESAMPLE is closer to 1.0 pi rad/s.
To convince yourself that there is (some) alias attenuation try something like:
t = (1:10000)/10000;
x = cos(2*pi*(100*t + 200*t.^2)) + cos(2*pi*(2500*t + 200*t.^2));
pwelch(x)
title('original PSD')
figure
pwelch(decimate(x,2));
hold on;
pwelch(resample(x,1,2));
title('decimated PSD')
Hope this helps a little.
  댓글 수: 2
Alain
Alain 2014년 6월 4일
Thanks, but no it does not help. I'm surprised that matlab got such a basic thing wrong. Alain
Greg Dionne
Greg Dionne 2014년 6월 10일
I did a little more digging. RESAMPLE allows you to take a set of FIR coefficients. You could always try something like (?)
pwelch(resample(x,1,2,fir1(40,.8*1/2)));
I think that will get you a little closer to the behavior of DECIMATE.
Out of curiosity, what are your bandwidth requirements?

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

카테고리

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