DSPRelated.com
Forums

Frequency shifting with FFT

Started by PMartin 7 years ago10 replieslatest reply 7 years ago1555 views

Hi,

i'd like to shift the frequency of a signal that is modulated DSBSC

The problem is that the I FFT the signal, but the carrier frequency is not integer multiple of a frequency bin, So I applied this:

- Prepare the analytic signal of the modulated wave to shift the frequencies.

- Use Hilbert tranform to shift the frequency so that the carrier falls into a multiple of freq bin:

shifted_signal = s_hilbert*sin(delta_freq) + signal*cos(delta_freq). Where delta_freq is 2*pi*freq_error/fs

- i shift down the bins

- IFFT the signal obtained.

My problem is that the signal is not shifted.

Any suggestion?

Thanks in advance,

PMartin

[ - ]
Reply by oliviertNovember 9, 2017

Why do you need an FFT for this?

A simple digital mixer should be OK.

[ - ]
Reply by PMartinNovember 9, 2017

Thanks.

I'm a newby...could you provide an example?

I'd like to demodulate only one band, not both

Thanks

PMartin

[ - ]
Reply by oliviertNovember 9, 2017

Suppose your signal is $$s(nT)$$

You want to shift it to the frequency $$f_c$$, the final signal will be $$y(nT)$$

If you want to keep the complex signal: $$y(nT) = s(nT)*\exp(2i\pi f_c nT)$$.

You may see that only the fractional part of $$nT$$ is effectively necessary to compute this exponential.


[ - ]
Reply by oliviertNovember 9, 2017

I forgot to add a lowpass filter as you are on the demodulation part, in order to remove the other part of the spectrum that goes at twice $$f_c$$

[ - ]
Reply by PMartinNovember 9, 2017

Hi,

my sampling rate is 192 Khz.

I have to demodulate a DSBSC signal with carrier 32768 Hz.

I want to use FFT because my SOC has a built-in FFT Hw accelerator.

I have computed that if i Shift my received (modulated) signal of +232 Hz, and then rotate the spectrum of 176 (integer number) bins back, i have efficient demodulation. 

So i need to know an algo to shift a signal of X (232) Hz.

I have tried by multiplying my real modulated signal by the complex exp, so i obtain a complex signal. Now, the spectrum is shifted of 232Hz. Now, i FFT this complex signal, turn back of 176 bins the result.

My question is: how can I obtain the real demodulated signal using ifft?


Thanks

PMartin

[ - ]
Reply by chalilNovember 9, 2017


>> i need to know an algo to shift a signal of X (232) Hz.

Algorithm to shift a signal by a freq f1 is to simply multiply the signal in time domain and perform a low pass filter. ie, same as coherent am demod if f1 is carrier freq. 

>> I have tried by multiplying my real modulated signal by the complex exp, so i obtain a complex signal. Now, the spectrum is shifted of 232Hz. Now, i FFT this complex signal, turn back of 176 bins the result.

If you want to ensure that the IFFT output shall only have real signal, then you need to feed the analytical signal equivalent as the input. ie,  if one part is x(t), then the other part should be x'(t) where x' is the Hilbert transform of x. i don't see any need for you to go for this method for demodulating a dsbsc signal. 

use your fft hw accelerator for something else. 

[ - ]
Reply by PMartinNovember 9, 2017

DSB-SC demodulation in real time is not so simple because you don't know the phase of the carrier of the received signal.

Regards

PMartin

[ - ]
Reply by chalilNovember 9, 2017

I see. so you don't have coherent fc. try converting the input to ssb by a lpf at input. then add carrier and apply envelop detection. since carrier is addition the phase won't play a major role for narrow band cases. this is practical only if there is sufficient gap between usb and lsb. note that the lpf should be linear phase/fir. 


[ - ]
Reply by PMartinNovember 9, 2017

Thanks, but I think i'll first try the analytic signal strategy. I think it is more efficient

Regards

PMartin

[ - ]
Reply by chalilNovember 9, 2017

Sure, one more point. if you mix input with sin(wt) and the same signal with cos(wt) you get analytic pairs. just a tip, may be helpful in case... 

a nice read https://www.dsprelated.com/showarticle/192.php