electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Does Upsampling or Downsampling Change the Frequency content


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> Does Upsampling or Downsampling Change the Frequency content
Author Message
lordsathish



Joined: 11 Feb 2006
Posts: 268
Helped: 28
Location: Asia


Post08 Oct 2008 9:32   

upsampling and downsampling


Hi ppl,
Does Ups ampling or Down sampling a signal change its frequency content.
Since Up sampling increase the number of zero valued samples in the signal i think it should decrease the DC content of the signal. And again as Up sampling increase
both the sampling frequency and number of samples in the signal i think it should
not affect the frequency content of the signal since in a FFT the frequency domain values are k*Fs/N.
Please do tell me if my views are right...?
Back to top
Google
AdSense
Google Adsense




Post08 Oct 2008 9:32   

Ads




Back to top
mathuranathan



Joined: 11 Sep 2006
Posts: 247
Helped: 29
Location: India


Post12 Nov 2008 8:43   

upsampling downsampling


Hi,
Thanks for asking this question. I really got a doubt over interpolation and decimation and their frequency content.

i have made a simulation and compared the spectral content.
Which suggests that the frequency content of t he signal changes as u do an upsampling and downsampling.

The results of the simulation are attached.

Also the matlab script is pasted

%author mathuranathan
%Program to demonstrate upsampling and its effect on frequency spectrum

%--------------Variables----------------
n=1:1:30; % Number of Sample Points
K=10; %Number of samples in one cycle of sine wave
N=1024 ; %FFT Length
L=2; % Upsampling factor
%---------------------------------------


x=sin(2*pi*n/K);
stem(s);

X=abs(fft(x,N));
X=fftshift(X);
F=[-N/2:N/2-1]/N;

plot(F,X);
xlabel('frequency / f s');


L=2; %Add L-1 zeros
size_x=(size(x,2));
size_y = size_x+(size_x-1)*(L-1);

y=zeros(1,size_y);

for i=2:size_y
if mod(i-1,L)==0
y(i)=x((i-1)/L);
end
end

subplot(2,1,1)
stem(x)
xlabel('Samples');
ylabel('Amplitude');
title('x(n)=sin(2*pi*n/10)');

subplot(2,1,2)
stem(y)
xlabel('Samples');
ylabel('Amplitude');
title('y(n)=x(n/L)');

N=1024;
Y=abs(fft(y,N));
Y=fftshift(Y);
F=[-N/2:N/2-1]/N;

figure(2)
subplot(2,1,1)
plot(F,X);
xlabel('frequency / f s');
ylabel('Magnitude => |X(f)|');
title(' Spectrum of x(n)=sin(2*pi*n/10)')


subplot(2,1,2)
plot(F,Y);
xlabel('frequency / f s');
xlabel('frequency / f s');
ylabel('Magnitude => |Y(f)|');
title(' Spectrum of y(n)=x(n/L)')
%--------------------End of program---------

Regards,
Mathuranathan



Sorry, but you need login in to view this attachment



Last edited by mathuranathan on 14 Nov 2008 16:51; edited 1 time in total
Back to top
mathuranathan



Joined: 11 Sep 2006
Posts: 247
Helped: 29
Location: India


Post12 Nov 2008 8:53   

downsampling upsampling matlab code


Upsampling is used to make the sampling rate of the signal compatible with the bandwidth of the signal processing system.

The spectral content of the upsampled signal differs from the original signal. But when the upsampled signal is sampled at upsampling frequency , the "Sample Values" will be same as that of the original signal.

"Spectral content differs -> but -> Sample value is same at upsampling frequency"

Regards,
Mathuranathan
Back to top
ring0



Joined: 10 Nov 2008
Posts: 61
Helped: 5
Location: Moscow, Russia


Post12 Nov 2008 10:54   

downsampling and upsampling in frequency


In order to upsample properly, the signal after adding zeroes should be passed through a digital low-pass filter.

http://en.wikipedia.org/wiki/Upsampling

In the case when an ideal low-pass filter is used, the spectrum will be unchanged, as it should be (only scaled along frequency axis).
Back to top
gabin



Joined: 15 Mar 2008
Posts: 13


Post13 Nov 2008 8:37   

what is the purposes of upsampling


up and down sampling is the process of changing the sampling rate of the signal.
Back to top
FvM



Joined: 22 Jan 2008
Posts: 5161
Helped: 767
Location: Bochum, Germany


Post13 Nov 2008 9:16   

frequency content of a signal


You can say, that upsampling (without a filter or interpolation) actually doesn't change the frequency content. The image around 0.5 fs in the higher sampling frequency signal representation is also present at 1.0 fs in the upper spectrum, but outside the presented range. However, the purpose of upsampling usually is in (almost) removing images within the nyquist range, and this implies interpolation respectively a lowpass filter.
Back to top
jetset



Joined: 17 Jun 2004
Posts: 153
Helped: 11
Location: Panama


Post14 Nov 2008 15:34   

sine2 frequency content


Downsampling and upsampling means shift in frequency by the dicrete time Fourier frequency shift property :

e^(jωon)x(n) <-> X(e(jω-ωo))

so we may say that yes, they do change frequency content compared to the signal with no change at sampling...
Back to top
Petre Petrov



Joined: 05 Aug 2009
Posts: 51
Helped: 5
Location: Sofia


Post06 Aug 2009 9:48   

how does the spectrum change with sampling


lordsathish Does Upsampling or Downsampling Change the Frequency content

Hello!
If you increase the sampling frequency Fd you are decreasing all errors (all differences between the sampled signals and the obtained samples).
Please note that you should increase also the number of the used bits n for coding the samples.
If is advisable to works with signal sampling factor (SSF) N>=4.

You could find some evaluation for the sinusoidal and co-sinusoidal signals here:
“A New Approach to Sampling Sinusoidal and Cosinusoidal Signals”, P T Petrov,
http://www.ieindia.org/pdf/88/88ET104.pdf

Also may be it will be useful to know:
“Sampling of the Simplest Signals”, P T Petrov
http://www.ieindia.org/pdf/89/89CP109.pdf

I hope that is helpful to you in some cases.
BR
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> Does Upsampling or Downsampling Change the Frequency content
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
How does spur change after frequency divider? (3)
The total width does not change properly by changing w or f (2)
Does anyone know how to change the name of a USB device? (10)
how do i change the frequency of a digital signal.. (5)
change the frequency of the transmiter (3)
VHF/UHF transmitter- how to change the frequency? (11)
How can I change the pulse frequency to voltage level? (2)
What does "tap" in content of Channel mean? (1)
what value does the solution frequency I need to setup? (1)
what does interrupt on change means ? (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS