Data exercise on

VLF sounds and hum removal techniques

By Morris Cohen

In this exercise, we will view and listen to VLF data containing magnetospheric emissions, and try a couple different techniques to filter out the effects of 50/60 Hz harmonics.

The data come from Valdez, Alaska. We will focus on the data during 25-March-2006, between 19:20:42 and 19:21:00 UT. The data you will need is in the file called VZ060325192000_000.mat. You will also need the standard AWESOME Matlab scripts, which should be loaded as part of your Matlab path. Oh, and make sure your computer is able to play sound!

All the Matlab code we will utilize is contained in the file called SoundExercise.m. Put this file in the same folder as the data folder. To run parts of that code, simply load it, then highlight the portions of the code you want to run, and press F9. We will go through the code section by section.

In this exercise, we will apply two different filtering techniques to the data, in order to isolate some strong chorus activity, and we will also try combining the two techniques.

The below four spectrograms show the data under these four states, corresponding to, in order (1) raw unprocessed data, (2) data with a high pass filter applied, (3) data with a “rake” filter, i.e., it removes a narrow frequency range around each power line harmonic of 60 Hz, and (4) data with both 2 and 3 applied. (5) data with the “Humstractor” tracking filter.

You will immediately notice that the first two techniques are able to remove some of the noise, but not all of it, but that the combination of the two (in the top plot) works quite well. The fourth method seems to leave some noise, but it doesn’t remove the real data below 2 kHz, for instance, you can still see some radio atmospherics below 2 kHz.

In general, noise filtering is very much a function of the site itself, and at each site you might have to utilize differing techniques. For instance, in this case, the high pass filter was applied with a cutoff of 1800 Hz. This was chosen because in this particular case most of the noise is below 1.8 kHz, but most of the chorus activity is above 1.8 kHz.

First, run the first 19 lines of the Matlab code. Make sure to change the pathToFile variable to the location of this file on your computer. This is the raw unfiltered data. Zoom in on the spectrogram. Can you see the individual hum lines? Are they spaced out by 60 Hz, or something else?

Now, run line 22 in the attached Matlab code. This will play the audio of the raw unfiltered data. Can you hear the chorus? How about the hum, what does that sound like? Can you hear anything else in the file? If so, what?

Now, let’s try applying the lowpass filter by running lines 25 and 26. Then, make the spectrogram in lines 29-36. What looks different? Is 1800 the right choice for the cutoff frequency? You can try changing line 25 and then trying again, if you’d like.

Listen to the sound with line 39. Does it sound better?

In order to remove the 60 Hz harmonics more effectively, we will apply an finite-impulse-response (FIR) filter that will remove the hum fundamental frequency and its harmonics. We’ll call it a “rake” filter. First, run lines 42-46 in order to view the spectrum of the signal. We must first determine the true frequency of the ~60 Hz power line signal, since it may be a slightly different from 60.

Now, the 51st harmonic of 60 Hz is at 3060 Hz (note that the x-axis in the plot that appears is kHz, not Hz). Zoom in near this point in the spectrum, (you can do this manually, or with line 49) and you’ll see something like this

The 51st harmonic is not exactly at 3060 Hz, but it’s actually a little lower. What is the center of the band? Based on that, what is the actual fundamental frequency?

Taking the center of the harmonic spike to be 3058.5, Hz the fundamental must be 3058.5/51, or ~59.97 Hz. You can also see in the above plot that the hum harmonic has a width to it. What is this width? Given that, what is the “bandwidth” of the fundamental 60 Hz frequency? Taking the width to be ~8 Hz, than means the fundamental has a bandwidth of 8 Hz/51, or ~0.16 Hz.

We are now ready to construct a filter consisting of the removal of a fundamental frequency (at 59.97 Hz), with a bandwidth of 0.16 Hz, so that the removal of the Nth harmonic is achieved with a notch filter at 59.95 Hz, and a bandwidth of 0.16 Hz. We will use 0.25 just to make sure there is enough bandwidth to remove the entire noise. Lines 49-52 set up these main variables. Line 51 just sets the length of the FIR filter. The higher is the number, the more “rect-like” will be the filter, but it will take longer to compute.

Lines 52-67 construct the “rake” filter, one frequency at time, so that they can be applied in lines 70-71 (this might take a little while). Once that’s done, you should again make the spectrogram with lines 74-81. Notice that the higher harmonics are mostly gone, but that the lower harmonics (between ~0-500 Hz) are still quite strong. Why do you think this is? Can you think of anything else to do about this? Now listen to the “rake-filtered” data using line 84. How does this compare to the raw data? How does it compare to the high pass filtered data?

As you might guess, the ideal situation could be to utilize BOTH hum filtering techniques. Lines 87-88 take the rake filtered data, and applies the high pass filter that we used before. Now, create the spectrogram in lines 91-98, and listen to the data with line 101. Is this a big improvement?

Finally, we’ve included a filter which, rather than removes a frequency range, attempts to track the frequency of the power line signal, constructs a filter based on this frequency, and then removes the signal. We call this the Humstractor. Give it a try by running lines 104-108. Then, make a spectrogram with lines 111-118, and listen to the data with line 121. How is this different from the others?

Which of the filtering techniques makes the sound the nicest? Which one makes the spectrogram look the nicest? What if the chorus were activity were actually at 1.5 kHz? Then which technique should you use?