Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | Zoom FFT - RESAMPLING HELP

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Zoom FFT - RESAMPLING HELP - hide_xjapan2003 - Aug 25 22:59:15 2008



dear everyone,

i need some help about Zoom FFT.
i've read some literature about this from B&K but there is one 
question
that make me stuck when perform this.

from the literature ,the final step for accomplish this method is 
RESAMPLING.

i've try to simulate the ZOOM FFT based on sinusoidal signal, but i 
dont understand in the last step, RESAMPLING. if you try this code 
its work, BUT if we imagine that we take the real data from 
measurement, we have ONLY limited amount data (due to discretization 
in ADC) after first sampling (like in this code, fs = 256 Hz), so we 
ONLY can play with 512 data in time domain.

BUT how can we perform resampling method by "Oversampled the data by 
M factor while we have ONLY discrete data based on previous sampling?"

I'm not sure about this code either it is true or not, is there 
someone who can help me to explain this ?????  

%----------------------PARAMETER ADJUST-------------------------------
Nf   = 200;                              %CHOOSE frequency line
fmax = 100;                              %CHOOSE max frequency
fp   = 50;                               %CHOOSE shifting frequency
M    = 2;                                %CHOOSE zoom factor
fmaxn= fmax/M+fp;                        %CHOOSE new max frequency

%----------------------SAMPLING---------------------------------------
fs   = 2.56*fmax;                        %compute sampling freq. 
dt   = 1/fs;                             %compute time increment   
Nt   = 2.56*Nf;                          %compute total time domain 
data
T    = 0:dt:(dt*(Nt-1));                 %time range

x    = 1*sin(2*pi*60.5*T)+1*sin(2*pi*60*T);                 %function

df   = fmax/Nf;                          %compute frequency increment
y    = fft(x,Nt);                        %compute FFT   
mag  = (2*abs(y))/Nt;                    %compute magnitude
freq = 0:df:(fmax-df);                   %frequency range

subplot(211);
plot(freq,mag(1:Nf))                  
title('Frequency Domain Signal')
xlabel('Frequency [Hz]')
ylabel('Amplitude [mm]')

%----------------------HETERODYNE & DIGITAL LPF-----------------------
k    = x.*exp(-j*2*pi*fp.*T);            %shifting signal
fc   = fmaxn;
Wp   = (fc/(fs/2));                      %define cut-off frequency
[b,a]= butter(2,Wp,'low');
w    = filter(b,a,k);                    %filter the time domain  

%----------------------RESAMPLING-------------------------------------
dfn  = df/M;                             %compute new frequency inc.
Ntn  = Nt*M;                             %compute new time dom. data

yn   = fft(w,Ntn);                       %compute FFT   
magn = (2*abs(yn))/Nt;                   %compute new magnitude
freqn= fp:dfn:(fmaxn-dfn);               %frequency range

subplot(212);
plot(freqn,magn(1:length(freqn)))                  
title('Frequency Domain Signal After Zoom Process')
xlabel('Frequency [Hz]')
ylabel('Amplitude [mm]')
%---------------------------------------------------------------------



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )