Apparently if you record as a WAV and open with Audacity, you can multiply both tracks by a sine wave to shift an off-center signal to the center. However, I don't know how you'd do this for a signal on the left since Audacity doesn't accept negative values.
Here's how it's done, based in part on advice from Steve the Fiddle on the Audacity mailing list:
- Open your IQ file
- Split it to mono and remove the right track
- Create a mono track and generate a sine wave of the desired frequency
- Make Stereo Track
- Open Nyquist Prompt and run this:
- (mult (aref *track* 0)(aref *track* 1))
- Remove one side (both will be the same) and save as a mono wav file.
- Repeat with the right channel.
- Open a new Audacity project and combine the 2 files you just created.
- (Obvious) The original left channel (I) must be the left channel in the resulting file, and the same with the right channel (Q).
- Finally, see that it worked using HDSDR or something similar.
This is what it looked like when I used a 550 kHz tone. You can see that it's not perfectly centered because 550 kHz was not quite right, but it's very close.
Seeing the double signal, I initially thought I had created a lower sideband but upon closer examination I saw that it was not mirrored like AM should be, but rather duplicated, so this apparently works. You can see the faint carrier at both plus and minus 550 kHz along with the higher, non-mirrored duplicate of the signal.
I then low-pass filtered in Audacity (Effect->Low Pass Filter) to 900 kHz to get just the desired signal.
Now it's much easier to see how off-center it still is. Finally, here's a picture of this in SpectraVue:
This has significant implications not just for analysis but for saving space on IQ recordings.
You've answered your own question about how to deal with "a signal on the left". Your procedure yields a copy at higher frequency in addition to a copy at lower frequency. For a "signal on the left", you would just take the copy at higher frequency rather than the one at lower frequency.
ReplyDeleteActually, you should be able to get just one copy in the first place, which will be important if there are nearby signals. If you multiply the I signal by cos(kx) and the Q signal by sin(kx), you should just get the higher-frequency copy. Multiplying I by cos(kx) and Q by -sin(kx) should yield just the lower-frequency copy.
Actually, the details of that last part are not right. New I should be
ReplyDeletecos(kx)*I - sin(kx)*Q
and new Q
cos(kx)*Q + sin(kx)*I
for shifting up; change the signs on the sin terms to shift down. Or something like that.