Frequency offset using FFT in Matlab

I am working on implementing BFSK modulation and demodulation using frequency hopping, and I need to check the results with Matlab. The result that I get from my BFSK program is an array of sine values โ€‹โ€‹corresponding to the carrier signal for different bits. These signals are bandwidth signals centered at 2.51 kHz with a bandwidth of 4 kHz around it. But to check the demodulation step, I need to convert the signal to baseband. Therefore, I need to focus my output signal at a frequency of 0 Hz.

I know that creating a complex 2.51 kHz signal and multiplying it in the time domain will do the job. But is there any method that I can use with the fft() function in matlab to shift the center frequency of the signal, and then take the ifft() signal to generate the main band signal.

Thanks Anshu

+4
source share
1 answer

It should be completely possible. Just rotate the complex vector that appears from the fft process before calculating the ifft.

Pseudo code will be:

 shiftIndex = 20; %// This value would depend on the frequency shift requited Y = fft(x); %// Where x is the input vector z = ifft ( [Y((shiftIndex+1):end); Y(1:shiftIndex)] ); 

For help on the number of boxes you need to move, you may find the following question helpful.,

https://dsp.stackexchange.com/questions/2970/how-to-make-frequency-axis-for-even-and-odd-fft-length/2971#2971

This reminds me, you will probably get faster answers to questions like DSP.stackexchange.com in the future.

+3
source

All Articles