Line 16: Line 16:
 
==Procedure==
 
==Procedure==
 
# Let input be a pure frequency, i.e. a sine wave function. Up sample by factor of 5 then down sample by factor 3. To avoid aliasing, the filter was build by MATLAB embedded function "fir1" with order= 20, cut-of frequency =1/5.
 
# Let input be a pure frequency, i.e. a sine wave function. Up sample by factor of 5 then down sample by factor 3. To avoid aliasing, the filter was build by MATLAB embedded function "fir1" with order= 20, cut-of frequency =1/5.
[[Image:Fig1.jpg|Fig1]]
+
[[Image:Fig1.jpg|Fig1]]  
 +
 
 +
 
 +
According to above graph, the output signal is up-sampled by 5/3
 +
 
 +
 
 +
 
 
[[Image:DTFT_sin.jpg|Fig2]]
 
[[Image:DTFT_sin.jpg|Fig2]]
 +
 +
 +
In frequency domain, the signal was decreased by factor of 3/5, as the figure indicated above.
 +
 +
 
[[Image:spec_sin.jpg|Fig3]]
 
[[Image:spec_sin.jpg|Fig3]]
 +
 +
 
[[Image:signal_speech.jpg|Fig4]]
 
[[Image:signal_speech.jpg|Fig4]]
 
[[Image:DTFT_speech.jpg|Fig5]]
 
[[Image:DTFT_speech.jpg|Fig5]]
 
[[Image:spec_speech.jpg|Fig6]]
 
[[Image:spec_speech.jpg|Fig6]]

Revision as of 08:47, 18 November 2011

Up sampling and Down sampling

Abstract

Filtering a signal by up samping in matlab is able to change the original frequency of the signal by a mutiplying it with an integer, and filtering a signal by down samping in matlab is able to change the original frequency of the signal by a dividing it by an integer. For example, by using the method above, a pure frequency signal with pitch C can be transfer to #C or bC. However, if the signal C needs to be transfer to D or F, then simply mutiplying or dvivding the original frequency by integer is not going to work. Instead, the original frequency needs to be mutiplied by a fraction number. Thus the goal of this project is to design a Matlab function to mutiply the input signal frequency by a fraction to make a small change of the pitch of the input signal.

Theory

Up-Sampling is a "Zero-Padding Procedure" that increase the number of samples of a DT signal. More specificals, when up sampling, zeros are added between the samples of a signal. Down-Sampling is to decrease the sample size. In the other word, it divides the input signal into segments, and pick a point from each segment to form a new signal.


Relevant Source http://en.wikipedia.org/wiki/Upsampling http://en.wikipedia.org/wiki/Downsampling


Procedure

  1. Let input be a pure frequency, i.e. a sine wave function. Up sample by factor of 5 then down sample by factor 3. To avoid aliasing, the filter was build by MATLAB embedded function "fir1" with order= 20, cut-of frequency =1/5.

Fig1


According to above graph, the output signal is up-sampled by 5/3


Fig2


In frequency domain, the signal was decreased by factor of 3/5, as the figure indicated above.


Fig3


Fig4 Fig5 Fig6

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang