'How phase lock cosine/sine signal sources in gnuradio?

I would like to generate a properly phase locked cosine and sine signal (float) using 2 Signal Source blocks while being able to adjust their frequency with a GUI Range Control. I set up the 2 Signal Sources one of them as a cosine and the other as a sine and both configured with to use the GUI Range's variable as a frequency input. They start up properly, but after changing the frequency on the GUI a couple of times and changing it back to the initial value, the 2 signals' phase difference won't remain 90 deg. Clearly visible on a constellation plot too.

Phase Relations

Don't really understand why this happens.

Is there a way to keep the phases locked to each other using 2 separate Signal Generator blocks in the above scenario? A workaround I found is using a complex Signal Generator block and breaking out the real and imaginary parts.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source