I have a IQ signal with a bandwidth of $200\,\text{MHz}$.
I do I*cos(2*pi*1000e6*t)-Q*sin(2*pi*1000e6*t)
, but my signal doesn't shift to carrier frequency 1000e6
on the power spectrum. I cant find the problem. I do this with Python.
$\begingroup$
$\endgroup$
7
-
$\begingroup$ It's not quite clear what you're doing. What's the sampling rate? If you say you have a signal, do you mean baseband or bandpass signal? $\endgroup$– Marcus MüllerCommented Oct 26, 2022 at 11:01
-
$\begingroup$ I have baseband signal with sample rate of 250MHz and its bandwidth is 200MHz. Im trying to upconvert it to carrier frequency. Carrier frequency can be for example 1000MHz. @MarcusMüller $\endgroup$– QAMCommented Oct 26, 2022 at 13:18
-
$\begingroup$ well, basics question time! What is the maximum frequency you can represent with a sample rate of 250 MHz? $\endgroup$– Marcus MüllerCommented Oct 26, 2022 at 14:16
-
$\begingroup$ 125MHz. Okay now i get it haha $\endgroup$– QAMCommented Oct 26, 2022 at 16:44
-
$\begingroup$ So I need to upsample the baseband I and Q signals for it to work? @MarcusMüller $\endgroup$– QAMCommented Oct 26, 2022 at 18:04
|
Show 2 more comments
1 Answer
$\begingroup$
$\endgroup$
Assuming that you have a complex baseband signal (i.e., IQ samples), then you need to multiply that signal by a $cos{(2{\pi}ft/Fs)}$
In python this would look something like this:
N = 1000 # samples in input array
Ts = 1.0 / 250e6 # sample period
f = 1000e6 # output frequency
t = np.arange(0, Ts*N, Ts)
y = x*np.exp(-1j*2*np.pi*f*t)
Where x
is an input array of baseband I/Q samples and y
is the tuned output.
Keep in mind that if your signal is not sufficiently upsampled, then you won't be able to modulate to the desired output frequency from your question.