Ok Paul, looks like we need a little adjustment then. I will add the
option to save wave-files in SL in the EbNaut / VLF-RX tools compatible
mode (details further below).
DCF77 recorded with the LO (NCO) set to 77490 Hz, i.e. signal 10 Hz
*above* the oscillator, produces a wave file with the following content:
http://www.qsl.net/dl4yhf/t/dcf77_SDR-IQ_recording_NCO_at_77490Hz.png
Channel 1 = "I", Channel 2 = "Q" .
This 'I / Q wave file format' was introduced by SDR-IQ / Spectravue, and
in turn this may have been inspired by the AD6620 (digital downconverter
used in the SDR-IQ), which multiplies the input with
cos( omega * t) for the "I" branch, and ...tada... -sin( omega *
t) for the "Q" branch.
( this can be seen in the block diagram on the first page of the
datasheet :
http://www.analog.com/media/en/technical-documentation/data-sheets/AD6620.pdf
The same convention was applied for the wave files in SpectraVue, and
later also for SL when I added native support for that radio )
With a "DC" input signal (0 Hz, Vin = const = 1), the output from the
I/Q downconverter would equal to the oscillator signal (complex NCO,
ignoring the chain of decimators), i.e.
i(t) = cos( omega * t)
q(t) = -sin( omega * t)
I had 'trimmed' the wave file export function in spectrum lab to produce
wave files compatible with the original SpectraVue software. But I will
add the option to produce wave files with the 'q' component so SL can
write files with both conventions (for vlfrxtools / EbNaut: Q (2nd
channel) peaking 90° before I, and for other SDR software I (1st
channel) peaking before Q.
Those flags (options) will be set by default in the configurations
'EbNaut_Rcvr' and 'EbNaut_Rcvr_SDR_IQ' (just in case someone also wants
to try with an SDR-IQ).
Of course users could just enter a modified RX frequency in the
commandline for the decoder because there is no absolute phase anyway,
but for the sake of simplicity, it should not be necessary to 'mirror'
frequencies at the LO frequency for the decoder.
All the best,
Wolf .
Am 13.12.2015 um 14:58 schrieb Paul Nicholson:
If the signal is on the high side of the oscillator,
Q should lead I after the mixer,
s(t) = sin(wc * t); // Signal, wc = 2 * pi * Fc
i(t) = sin(wc * t) * cos( wo * t); // LO, wo = 2 * pi * Fo
q(t) = sin(wc * t) * sin( wo * t);
expands to
i(t) = 1/2 * { sin((wc+wo)*t) + sin((wc-wo)*t) }
q(t) = 1/2 * { cos((wc-wo)*t) - cos((wc+wo)*t) }
which after LPF to remove the wc+wo component leaves
i(t) ~= 1/2 * sin((wc-wo)*t)
q(t) ~= 1/2 * cos((wc-wo)*t)
which has q(t) leading i(t) by 90 degrees.
The above are the polarities used by vlfrx-tools and ebnaut.
On the scope, signal at 77500 Hz and LO at 77490 Hz looks like
http://abelian.org/vlf/tmp/151213a.gif
with Q (the 2nd channel) peaking 90 deg before I.
--
Paul Nicholson
--
|