Phase- and Amplitude Monitoring Functions (in Spectrum Lab)

In 2010-04-16, the phase- and amplitude monitor was added as an interpreter function in Spectrum Lab. There may be multiple instances ("incarnations") of this function running simultaneously, if CPU power and sampling rate permit.

The intended purpose of this function was to observe the fieldstrength and phase variations of VLF transmitters for ionospheric studies, by plotting amplitudes and phases of different transmitters in Spectrum Lab's watch window / plotter . From there, the data can also be exported in text files (for further post-processing).

Note: Long-term absolute phase measurements with a soundcard are only possible if the soundcard's sampling rate is permanently monitored and corrected (drift compensated) as explained here .

Basic syntax of the pam function (simple, without specifying the update interval and signal source) :

returns the momentary carrier phase in degrees (! - not radians - !) .
Phase measurement arbitrarily starts at 0° (zero degrees); depending on the algorithm, the result may not be limited to +/- 180 .
returns the momentary carrier phase in degrees, limited to "one circle" (result in range -180° ... +180°) .
returns the amplitude, converted to dBfs (dB "over" full scale, thus always a negative value)
returns the precisely measured frequency in Hz . Ideally the same as the configured center frequency (can be used as an additional "health check").

In the above functions, ...

N = instance number of the phase/amplitude monitor, running from 0 (zero; default when omitted) to 9;
<f_center> = center frequency in Hertz; must be very precise for long-term phase measurements
<modulation> : Either CW (continuous wave), followed by the filter bandwidth in Hz; or MSK (minimum shift keying), followed by the bitrate, like "MSK200" = MSK with 200 bits per second (a common value for many VLF broadcasters like DHO38 ).

Extended syntax, with center frequency, modulation, update interval, and signal source

pamN(<f_center>,<modulation>, <update_interval>, <signal_source>).xyz

where :

N = instance number of the phase/amplitude monitor, running from 0 (zero; default when omitted) to 9;
<update_interval> = update interval in seconds. Default (if not specified) = 10 seconds .
<signal_source> = symbolic name of the source node, as shown in the circuit diagram, for example:
L1 = left input from the soundcard;
R1 = left input from the soundcard;
L1R1 = complex signal from a software defined radio. L1=In-phase component aka "real" part, R1=Quadrature component aka imaginary part of a complex signal.
(Note: for complex input, only the combinations L1R1, L2R2, L3R3, L4R4, or L5R5 are possible)
xyz : phase, ampl, etc (see basic syntax above)


returns the relative field strength of a VLF transmitter on 23.4 kHz in dB "over full scale", using the default update interval (10 seconds), and the default signal source ("L1").
returns the phase (in degrees) of the same signal, beginning at zero when the measurement started.
Note that, since the program already knows the center frequency, and the modulation / bandwidth from the previous call (1st example), it is not necessary to specify those parameters in the argument list again (though it wouldn't hurt to do so).
pam2(77500, CW1, 10, L1R1).phase
returns the phase (in degrees) of a continous wave(*) signal on 77.5 kHz, observed bandwidth 1 Hz, update cycle 10 seconds (which, by the way, also dictates the resolution), for a complex signal tapped at L1 (for the inphase component) and R1 (for the quadrature component). Actually, this function was used in a test to examine the stability of the oscillator in a software defined radio, using the German 'DCF77' longwave time signal transmitter as a reference.
pam2(77500, CW1, 10, L1).phase
Almost the same as above, but here a soundcard running at 192 kSamples/second was used for the test.

Note: A list of VLF transmitters is in the control panel for the continuous sample rate correction; typically one of those VLF transmitters is used as the reference (to correct the sample rate drift). Of course, if a VLF transmitter is used as the frequency reference, it makes no sense to measure the diurnal phase variation of that transmitter ! More on that in the chapter titled 'Requirements for long-term phase measurements' .

(*) In this context, CW really means what it says - Continous Wave. Don't confuse "CW" with "Morse code" ! Morse code traditionally uses on-off-keying, which is neither a 'continuous wave' in the long run, nor is it necessarily phase coherent. Thus the phase- and amplitude monitors are pretty useless to observe classic 'Morse' signals (on-off keying). The carrier phase of transmitters like DCF77 can be be observed with the pam() function because despite the amplitude modulation (75 % carrier reduction), the carrier phase is coherent, i.e. the carrier phase doesn't jump"arbitrarily.

The basic function of a phase meter (as implemented here) is this:

There is at least one example configuration in Spectrum Lab's configurations folder (file: PAM_MSK_Test1.usr) which uses the phase- and amplitude monitors to plot the phase of an MSK transmitter on VLF. The results of the pam-functions are shown in numeric form in the watch window, or in graphic form in the plot window .

Requirements for long-term phase measurements

Usually, the 'reference' clock is the soundcard's internal sample rate. It must be accurately set. Spectrum Lab offers two different ways to "calibrate" the sample rate. For long-term phase observations, you will need the "continuous" sample rate correction. It is possible to use any reference frequency which can be handled by the soundcard, for example:
In western Europe, use DCF77 (on 77.5 kHz) or MSF (on 60 kHz) as a reference, to observe the diurnal phase variations (ionospheric effects) of several VLF broadcasters. A list of reference signals can be found in the document about the sample rate detector.


See also: Watch / Plot window;  sample rate correction; Spectrum Lab overview .