1

I have an input complex signal at frequency of 250.01MHz. i have to mix this signal with a frequency at 250MHz. I understand that by mixing(multiplying) it will produce the sum and difference of the 2 frequencies. And i will use a low pass filter to filter out the sum frequencies. However, i cant seem to get how to multiply the signal with the frequency, Someone please help me. Below is my code:

close all;clear all;
    j=sqrt(-1);
    fsig = 250.01e6; %input frequency
    fs = 1e6; %sampling frequency
    fc = 250e6; %frequency of USRP
    t= [0:1/fs:1];
    sig = exp(j*2*pi*fsig*t); %input signal
bwegs
  • 3,769
  • 2
  • 30
  • 33
user982209
  • 183
  • 2
  • 3
  • 7
  • Want to shift the signal in frequency domain? – mehmet Dec 27 '14 at 09:05
  • Hi mehmet, I only want to keep the difference between the 2 frequencies. But I need to write it out in code such that it can show me the sum and differences. – user982209 Dec 27 '14 at 09:25
  • Wait a minute. Are you really sampling a 250 MHz carrier with 1 Msamples/second? Unless you are consciously doing [bandpass sampling](http://en.wikipedia.org/wiki/Undersampling), this doesn't seem appropriate – Luis Mendo Dec 27 '14 at 16:18
  • @LuisMendo Nope. That 1Mhz is used to sample 10khz which is the difference between the signal frequency and carrier frequency. So I'm not sure how to mix the 2 to get the sun and difference. – user982209 Dec 28 '14 at 01:34
  • @user982209 But when you do `sig = exp(j*2*pi*fsig*t)`, you are actually sampling a 250-MHz signal with 1 Msamples/second – Luis Mendo Dec 28 '14 at 03:20
  • @LuisMendo I thought that's just a generating a signal at 250.01MHz frequency? – user982209 Dec 28 '14 at 03:58
  • @user982209 It is a _sampled_ signal. Your time vector is discrete – Luis Mendo Dec 28 '14 at 04:04
  • @LuisMendo ok, what I'm trying to do is, generate a complex signal at 250.01MHz. And mix it with a carrier frequency at 250MHz. How do I do it? Thanks. – user982209 Dec 28 '14 at 04:22
  • @user982209 Generate those two signals with a sample rate high enough to fulfill Nyquist criterion. Then multiply (`.*`) and apply a lowpass filter (see `butter`). – Luis Mendo Dec 28 '14 at 15:43

0 Answers0