Using Spectrum Lab for the reception of VLF natural radio

By Wolfgang Buescher, DL4YHF.
Last modified: 2011-10-15 (YYYY-MM-DD)

Since I became interested in the reception of natural radio, some new functions were implemented in Spectrum Lab. This document describes how to use Spectrum Lab to improve the quality of your natural radio reception *by software*. Most important is the removal of AC hum (including harmonics) and other types of power-line noise.
If required, you can add up a multitude of other (independent) notches, high- or lowpass filters to remove other unwanted signals, like 70 Hz from PC monitors.

Note: Some links in this document only work if it was loaded from SpecLab's manual (in the "html" folder).

Contents:

See also:

Getting started

Before trying all sorts of software-based audio processors, you should try to remove the noise before it enters the soundcard. Find the best location for your VLF reception antenna, and select an antenna which is best suited for your local environment . Excellent articles about this subject have been written by members of the VLF OpenLab community and members of the VLF group (at Yahoo). Be sure to visit:

  • Radio Waves below 22kHz
    The VLF Open Lab site maintained by Renato Romero, IK1QFK. Also has links to other members of the VLF community. Don't miss the articles on loop antennas if you live in a noisy environment.
  • The Natural Radio Lab by Mark Karney, N9JWF, with a lot of resources about how, where, and when to listen for natural radio signals (not limited to VLF).
  • The VLF Group (at Yahoo) helps you get started with natural radio reception.
  • Notes on Domestic VLF Reception by Paul Nicholson, who is also the author of the original hum filter algorithm which is -slightly modified- used in Spectrum Lab. Paul's article demonstrates how to improve reception of natural radio even if you live in a suburban environment. He also has nice recordings of whistlers and auroral risers, etc.

Basically, natural radio is a broadband application (from 500 Hz to 10000 Hz or so, without frequency conversion),  in contrast to narrow-band listening to man-made VLF transmitters (as explained in the "VLF receiver" article).

The decision to use an H-field antenna (which receives the magnetic field), or an E-field antenna (for the electric field) depends on the type of man-made noise at the receiver's site. Just as an example, here is a circuit used by the author in a portable E-field receiver, or as the frontend for a soundcard-based receiver (for the soundcard, the headphone amplifier type LM386 is not required).

active E-field antenna with dual FET frontend
Schematics of a dual FET frontend for a active E-field antenna.
Source resistors (here: 680 and 560 Ohm) were selected to achieve a DC voltage
of approximately the half supply voltage at the drain of the lower transistor.

As a bare minimum 'receiver' (only for occasional use but not as a permanent installation), you can use a long wire antenna directly connected to the soundcard's line- or even mic-input, but never forget proper protection against transients ! Use lightning protection, proper grounding / earth connection of the lightning arrestor, anti-parallel diodes or similar voltage limiting elements at the soundcard's input, surge protectors, and always disconnect the antenna from your equipment when there's lightning around. In addition, you may need additional low-pass filtering if there are strong medium- or longwave broadcasters in your area. Such signals may overload the soundcard's input, even if you don't see them in the displayed spectrum.

The rest of this document describes the operation of Spectrum Lab as the 'backend' for a VLF 'Natural Radio' receiver.

Because SpecLab has grown over the years into a really complicated program, the best way to use it as "backend" for a natural radio receiver is this:

To get started,

  • Download the latest release from http://www.qsl.net/dl4yhf/spectra1.html . There is a "download" section which points to the site where the latest release can be found.
  • Install SpecLab as described here (if you read this document as part of the manual, you will most likely have installed it properly).
  • Properly adjust the soundcard's "mixer settings" to avoid clipping and wasting too much of the ADC's dynamic range. SpecLab's "input monitor" may help you with this.
  • Load one of the preconfigured settings which have been designed for natural radio reception, for example HumFi50.usr or HumFi60.usr. How to load these files is explained in another document (use your browser's "back"-button to return here..). HumFi50 is for countries with 50 Hz mains frequency (Europe), HumFi60 for others with 60 Hz mains frequency.
  • Alternatively, use one of the configurations in the "Quick Settings" menu (easier to load, but requires a processor in the 1-GHz-class):
    Select "Quick Settings"..."Natural Radio; animal voices"..."Sferics, Tweeks and Whistlers with filtered audio output" (we'll come back to that later).

The settings for the hum filter may require some "tweaking", depending on the type of noise from your VLF antenna. If the dominant hum frequency is 50 Hz,  it may be better to use the FFT to track its frequency. For other hum flavours the tracking algorithm which is implemented in Paul's HumFilt Version 1.1 or Version 1.2 is better. Playing with the parameters may help. If you are already satisfied with the performance of the preconfigured settings "as they are", you are lucky and don't have to read further in this document. Enjoy the sound of natural radio instead !

Depending on the speed of your computer, and on the bandwidth of your receiver, you may adjust the soundcard's sampling rate. For 11 kHz bandwidth (which is usually sufficient), use 22050 samples per second. If this sounds too mushy for you, increase the sampling rate to 44100 or even 48000 Hz. From the main menu, select "Options".."Audio Settings" for this.

To compare two different VLF antennas (possibly a H-field loop and an E-field whip), you can switch SpecLab into stereo mode. In the circuit window, the lower signal processing path will be enabled then. Both (left+right) channels have independent parameters, so be sure to use the same settings for all stages in the signal processing chain, and turn the hum filter on for both channels.


Using the automatic multi-notch filter to remove hum

Since the implementation of the FFT-based audio filter, this is the preferred method to remove hum from a VLF 'natural radio' signal. This filter basically removes all 'stable' signals within a certain frequency band, such as AC hum + harmonics, but also those 'carriers' in the audio passband which are not an integer multiple of the mains frequency.
This filter uses the FFT to transform the signal into the frequency domain, perform some kind of filtering there, and transform the filtered signal back into the time domain with an inverse FFT. Now you can have as many notches in your audio filter as you like.

However, as mentioned above, to preserve the original sound of natural radio it is desirable to remove as much unwanted signals as possible before they enter the receiver.

To get started with a filtered VLF audio stream, try the following configuration:

In SL's main menu, select
    "Quick Settings"...
       "Natural Radio; Animal Voices"...
          "Sferics, Tweeks, Whistlers with filtered audio output".
In this configuration, only the FFT-based audio filter is enabled (only if the hum is really overwhelming, it may help to additionally turn on the comb filter as described in a later chapter).
The FFT-based filter limits the output frequency range from 300 to 13000 Hz, in which the automatic notch filter removes all "constant" frequencies (usually, those are man-made signals which you don't want to hear). You can check the effect by turning on the "test signal generator" : In this configuration, it adds sawtooth signals at 50, 60, and 70 Hz to simulate unwanted noise from the AC mains, TV screens, CRT computer monitors etc. With the filter, this noise can be almost completely eliminated.

Note: This brute-force filtering does affect the wanted signals to some degree, too. So if you don't need these filters (because you don't have a lot of unwanted signals), turn them off. You can see which filter is currently active in the circuit window. Click on their symbols to configure them. On the same panel, the filter can be set to 'bypass' mode so you can compare the audio with and without filtering.

For details, follow this link to the FFT-based audio filter.


Using the older 'hum filter' (multi-stage comb filter)

The older hum filter is embedded in each of Spectrum Lab's four "DSP blackboxes". It uses a multi-stage comb filter, and operates (in contrast to the automatic multi-notch filter) entirely in the time domain.

This filter is based on an algorithm by Paul Nicholson, for more explanations see http://www.abelian.demon.co.uk/humfilt/ .

To use the comb filter for 'hum removal', you must specify your AC mains frequency (50 or 60 Hz) in the hum filter control panel. The filter tracks this frequency within a certain range to place the sharp notches of the comb filter exactly on the mains frequency and its harmonics. This only works if the mains frequency is quite stable (so its not suitable for "wandering carriers" in a shortwave receiver, caused by free running switching-mode power supplys). Alternatively you can provide an external source for the AC mains frequency, for example: Let the spectrum analyzer detect the precise mains frequency from the second channel of the soundcard (see below how to achieve this).

There is a control panel for the hum filter which can be connected to one of the four DSP blackboxes. To open the control panel, right-click on the DSP blackbox in the circuit window, point on the "hum filter" menu (so the submenu opens), then click on "Show Control Panel". On the control screen for the hum filter, you may modify...

  • the nominal hum frequency (usually 50.0 or 60.0 Hz)
  • the end stop for the possible hum frequency (in percent, 0.5 should be ok)
  • the number of filter stages (the higher this value, the narrower the notches of the comb filter)
  • the slew rate (the maximum adjustment speed for the built-in tracking algorithm)
  • selection of the tracking algorithm (several versions of Paul's algorithm are implemented here, plus the option to turn automatic tracking off)
  • tracking cycle: Defines how frequently the current hum frequency is revised by the algorithm. A good point to start with is 0.5 ... 1 seconds.
  • "Calculate current hum frequency from numeric expression": Uses SpecLab's interpreter to define an alternative source for the current hum frequency (mains frequency). Some examples follow in the next chapters.

In the lower part of the window, some actual values from the tracking algorithm are displayed. They were mainly used for testing purposes, but the "Current hum frequency" may be interesting for you (dear user) as well.

If your VLF antenna produces equally distributed harmonics of the 50 (60) Hz mains hum, the tracking algorithm "V1.2" should work fine, just like in Paul's original "Humfilt-1.2" implementation. But if there are other "ugly noises" stronger than to the hum-harmonics, it may be better for the tracking algorithm *NOT* to look at the entire spectrum. If - for example- there is a strong interfering signal which is close to but not related to hum harmonics, the filter's locking algorithm will jump around the true hum frequency.

Also, if one of the hum-harmonics (or the 50 Hz signal itself) is much stronger than all other harmonics, it may be better to lock the hum filter to that particular frequency. For this purpose, there are several methods to track the current mains frequency. Very accurate tracking of the hum frequency (50 or 60 Hz) is essential for a proper function of the hum filter. The next chapter shows some alternatives.

Detecting the hum frequency with Spectrum Lab's frequency analyzer (only for the old comb filter)

Just let the spectrum analyzer detect the precise hum frequency. This is basically an FFT (fast fourier transform), which transforms a signal from the time domain into the frequency domain. The results of the FFT are visible in the spectrogram window (the "waterfall") and in the spectrum graph, but the results can also be accessed through SpecLab's macro functions (there is a kind of interpreter in the program which was originally used for something totally different, but that doesn't matter now).

Use the peak_f() function, like peak_f(#1, 48, 52) or peak_f(#1, 58, 62) to get a precise reading of the mains frequency (or one of the harmonics, see below). This method is used in the preconfigured settings "HumFi50.usr" or "HumFi60.usr". Open the hum filter control panel. The peak-frequency-detection routine is entered in the edit field under the checkmark "Calculate current hum frequency from expression". Note that the 1st channel (#1) of the frequency analyzer (which feeds the waterfall) is connected to the INPUT of the DSP blackbox (labelled "L1"). Be careful not to connect this channel to "L2", because the 50 Hz / 60 Hz signal is notched in the output of the DSP blackbox !
For accurate tracking we need a good SNR of the 50 Hz / 60 Hz line, otherwise the interpolation in the peak_f function is severely degraded. If your VLF antenna does not pick up enough hum, switch the program to "stereo" mode and use the second input of your soundcard as an auxiliary hum input. Use an insulated piece of wire as "hum antenna", tied around a power cable or similar. Connect the second input of the spectrum analyzer to this auxiliary hum input. To let the "peak_f" function operate on the results of the second spectrum analyzer channel, use "#2" instead of "#1" in the first argument.

Locking the hum filter to a single "higher" harmonic of the hum frequency (only for the old comb filter)

This works almost the same way as locking to 50 (60) Hz, as explained in the previous chapter. All we do here is modify the numeric expression which calculates the hum frequency.

Example: Locking the filter to the 5th harmonic of the 50 Hz mains frequency.

Instead of entering
peak_f(#1, 48, 52)
in the edit field "Calculate current hum frequency from expression" (on the hum filter control panel), use an expression like this:
peak_f(#1, 245, 255) / 5
or (to lock on the 11-th harmonic):
peak_f(#1, 545, 555) / 11

(the spaces in the expression are added for clarity, the interpreter does not need them)

How does this work ? The peak_f function detects the peak frequency in the range 245 Hz ... 255 Hz, which is most likely where the 5-th harmonic of the (european) mains frequency will be. The result is divided by 5, which gives a very accurate measurement for the mains frequency itself (which is required for the filter).

Notes:

  • Look for the strongest harmonic in the spectrum of the "incoming" signal (visible in the left part of the split frequency analyzer). Depending on the type of your VLF antenna (loop with high- or low-impedance anplifier, or e-field probe), the strongest hum harmonic may be even higher than in the example shown above. Don't forget the divisor when modifying the "peak_f"  expression !
  • If the frequency deviation of the mains frequency (from the "nominal" value) may be larger in your country, try to increase the frequency range passed to the peak_f function. Usually, the drift range is much less, but the interpolation algorithm in the "peak_f" function needs a certain frequency range to play with. Don't try "peak_f(549.99, 550.01)/11" for this reason !


Eliminating other unwanted signals

Even with the hum filter, there may be some other unwanted frequencies remaining. Most of them can be eliminated with individual notches in SpecLab's digital filter (which is by principle an FIR filter with FFT convolution). For most applications, use that filter as a lowpass- or bandpass filter. If you are plagued with hum (and similar noises from CRT monitors, which cannot be removed with the hum filter mentioned earlier), turn on the "automatic multi-notch" option in the FFT filter.

You can set the type of the FFT-based filter to "Custom Filter". Then, you can modify the filter response on-the-fly: You can then edit the filter's frequency response in graphical form in the FFT filter control panel. If the filter type is set to "custom", you can se the mouse in the filter's graph window to modify the frequency response.

Another alternative is to activate a second hum filter in the second DSP blackbox in a signal processing branch (the one close to the output, near "L4" in the circuit window). The hum filter also works with "strange" hum frequencies like 70 Hz, just turn on another hum filter (in the popup menu of the 2nd DSP blackbox) and provide an expression to detect the base frequency of the unwanted signal - something like peak_f(#1, 68, 72) .


Volume control (inside SpecLab)

After removing hum and other kinds of unwanted signals, the "remaining" effective voltage is usually much less than the total signal at the input. You may compensate this with the output amplifiers in the circuit window. On my VLF reception site (which is exceptionally bad!), the hum signal is often a hundred times stronger than anything else, this means that *after* the removal of hum the signal must be amplified by about 40 dB to have an acceptable output volume.

On this occasion, a word of warning:

If you connect the output from the soundcard to the stereo system in the living room, and don't hear much after turning the hum filter on, don't crank up the volume on the 100-watt stereo amplifier !

Instead, increase value of the "software"- output amplifier, until SpecLab's output monitor indicates about 25 % peak-to-peak output. Then, adjust the volume on your stereo amplifier to a pleasant level. The soundcard's output now has about 12 dB headroom (20*log(25/100)) before the output is clipped. This reduces the risk of blowing your speakers or damaging your ears, if suddenly a strong signal comes in from the antenna (caused by a sheep scratching its backside on someone's VLF antenna ;-).

Alternatively use one of the DSP blackboxes (preferrably the one near the output) as an automatic gain control with fast attack and slow decay.


Audio Streaming

Since April 2008, the filtered output (from Spectrum Lab) can be sent to Winamp, which -together with the Oddcast plugin- can be used to send a compressed continuous audio stream to an Icecast server. More details could be found here (if the link doesn't work anymore, search the net for
"Sending an audio stream to an Icecast server with Spectrum Lab, Audio-I/O, Winamp, and Oddcast" .
Details about streaming audio (via the internet, using SL and Winamp) used to be here.
A collection of live VLF Natural Radio streams was, and hopefully still is, here.

See also: main index, filter control panel, hum filter .