I have a complex IQ signal: $s = X + Yi$. I know my original $f_0$ was $5\textrm{ MHz}$.
I can calculate the magnitude/amplitude of $s$: $A = \sqrt{X^2 + Y^2}$ and phase, $\phi = \arctan\left(\frac YX\right) $
But how can I reconstruct the signal using this frequency, amplitude and phase data?
I need the output as a time varying signal which incorporates the amplitude and phase information from the IQ data. I have found this:
The reconstruction of RF-data from IQ-data is straightforward. It is a reversal of the complex demodulation in the previous section. The decimation is reversed by interpolation. The low- pass filter cannot be reversed, but should be chosen without loss of information in the first place. The down mixing is reversed by up mixing. At last, the RF-signal is found by taking the real-value of the complex up-mixed signal.
But I could really do with a worked example.
EDIT:
This MATLAB code appears to do what I want:
IQ = resample(IQ,downsampl,1);
[Z,X] = size(IQ);
time = [0:Z-1]'*1/F * ones(1,X);
signal = IQ .* exp(+2*pi*i*time*carrier);
signal = real(signal);
where resample
resamples IQ at downsampl/1 times.
It is not clear to me what I should use for downsampl
and what F
is?
i
in yoursignal
variable? $\endgroup$