The effects of up/down mixing on phase shifts at different frequencies
This is the setup we wish to analyze:
A source signal created with gr.sig_source_c() is upconverted in the hardware
by M1 and applied to the DUT. The output of the DUT is to be measured in phase
and amplitude after downconverting by M2. What I need to know is what effects
does the downconversion have on shifts in phase in the DUT? That is, is a shift
by +90 at test frequency going to still be 90 at the software frequency or is
it going to be a tiny impossible to measure amount?
Using the math package, ignoring amplitude for the moment, and setting
M1 and M2 phase to 0 (relative to the source signal). The source here
will be 4 cycles/unit, mixed up by 1000 cycles, shifted by pi/4, then
mixed back down to 4 cycles.
The source signal:
produces this plot:
Next we mix up to 1004 hz:
The above is our signal S2 applied to the DUT. Next we shift it in phase to
get S3:
Then down mix back to 4 hz:
and, Voila, the final signal does indeed reflect the DUT phase shift at
the lower software frequency. Lastly, collecting the exponential terms:
produces the same results as #10 above:
This shows the advantages of working with complex exponentials, all you have
to do is total up the frequency conversions and phase shifts to get the
final result, wOut = w0 + w1 + w2 and theta_out = theta_1 + theta_2 + theta_3.
If the DUC or DDC introduced phase shifts those (theta_0 and theta_1)
would be accounted for in the result.