Domanda

I am working on implementing BFSK modulation and demodulation with frequency hopping and I need to test my results using Matlab. The output the I am getting from my BFSK program is an array of sine values corresponding to the carrier signal for different bits. These signals are passband signals centered at 2.51KHz with a band width of 4KHz around it. But to test the demodulation step, I need to convert the signal to baseband. So I need to center my output signal at 0Hz.

I know that creating a complex signal of 2.51KHz and multiplying it in time-domain would do this job. But is there any method that I can use with fft() function in matlab to shift the center frequency of the signal and then take an ifft() of the signal to generate the baseband signal.

Thanks, Anshu

È stato utile?

Soluzione

This should be perfectly possible. Just rotate the complex vector that emerges from the fft process before computing the ifft.

Pseudocode would 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 bins that you'd need to shift the index by, you might find the following question useful . . .

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

This reminds me, you'd probably get quicker answers posting questions like this on DSP.stackexchange.com in the future.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top