1
$\begingroup$

I was reading these lecture slides: https://web.mit.edu/6.02/www/f2006/handouts/Lec9.pdf and I tried to implement some of the schematics shown there in GNU Radio.

On page 3 the author describes how using a single LO is suboptimal, because in the worst case, when the transmitter's and the receiver's LOs are orthogonal, the output will be zero. I implemented this in the following flowgraph: https://gist.github.com/ardavast/45b3fa0fb6e8ee9f3489a15a732549a9 lo.grc It behaves as expected, if I move the sliders so that the phase difference is $\pm \frac{\pi}{2}$ the output is zero.

After that, on page 10, there is an explanation on how this can be prevented by using quadrature signals. I implemented this one too: https://gist.github.com/ardavast/f1c2f0296382bbc005e72ee034117e6a loiq.grc After I start it, I move the rx_phase slider to about 1.57 ($\approx \frac{\pi}{2}$) - this should make the rx_lo_i and rx_lo_q signals which are originally cos and sin, equal to, respectively, sin and -cos, exactly as shown in the diagram on page 10, the one on the right side. But contrary to what's written there, the signal vanishes completely, as in the single LO example. Where is the error in my flowgraph?

$\endgroup$
  • $\begingroup$ Um, there's a lot wrong in here – starting from the beginning: you should probably just be using a float signal source instead of a complex one and throwing away the imaginary or real part of that, just to latter piece them back together. $\endgroup$ – Marcus Müller Aug 26 '19 at 15:57
  • $\begingroup$ @MarcusMüller I do this, because I want to be able to change the phase of a float signal arbitrarily - so I start from a complex signal which is then multiplied to get the needed phase (that's what the multiply const blocks, connected to the qt ranges are for), and finally converted to float. I don't know how to change the phase of a float signal directly. $\endgroup$ – Ardavast Dayleryan Aug 26 '19 at 16:13
  • $\begingroup$ but you're not using the signals as float signals at all. What you do is just complex multiplication with extra steps. $\endgroup$ – Marcus Müller Aug 26 '19 at 16:18
1
$\begingroup$

It turns out that I misunderstood how complex signal source blocks work. For example, I was expecting that a flowgraph like this one: phase_diff.grc phase_diff.grc.png will produce two signals 90° out of phase with each other - but it produces two signals that are exactly the same. If I multiply the lower signal source by 1j, however: phase_diff2.grc phase_diff2.grc.png it works - and it doesn't matter if the lower signal source is set to sine or cosine. Indeed, unexpectedly for me, a flowgraph like this one returns zero: phase_diff3.grc phase_diff3.grc.png

So if I change my original flowgraph to look like this - it works exactly as expected, and it produces the effect that was described in the lecture slides: loiq2.grc loiq2.grc.png

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.