(And a "Mini"
version of the comb filter - read about it here)
After using a "Doppler"-type of ARDF unit for a
while, one learns to pick up subtle audible cues that tell something
about the possible quality of the bearing:
Having used this sort of ARDF system - both with and without a comb filter, I can say that such information is not removed - but it is changed slightly. When multipath is occurring, this implies that some sort of distortion is also present in the audio. What this means is that it is likely that the switching tone will get mixed with the audio that is being modulated onto the carrier and that artifacts at frequencies other than that of the tone (and its harmonics) will be produced: These artifacts have a very distinctive sound, even with the comb filter active. Likewise, those transient changes caused by "mobile flutter" (brief instances of multipath experienced in a moving vehicle) also cause audible artifacts - even with the comb filter active. Not only are there mixing products with the modulated audio that are readily apparent, the rapid changes cause modulation sidebands to appear on the switching tone, increasing the bandwidth: Because the notches in the come filter are so narrow, these sidebands aren't well-filtered and show up as a sort of "pinging" in the audio - and this is true even if one is monitoring an unmodulated carrier. From experience, I know that even with the comb filter active, I can still rely on audible artifacts to indicate - without having to look at the the display - various aspects of the quality of the signal being received, such as multipath - and there isn't that constant, tedious tone present all of the time! For more information about mobile use, read below. |
Any "active" direction-finding system that switches antennas necessarily modulates the received signal with its switching signal: After all, it's the phase of this signal relative to the switching of the antennas that is used to determine the bearing. The resulting tone, however, can become tedious after a while and it can obscure some of the contents (e.g. modulation) on the signal. This can especially be a problem if the modulation is very low or there are some background noises on the signal that might give some clues as to its origin.
The switching of the antenna array superimposes upon it a waveform that has the fundamental and harmonics of the original switching frequency, and the harmonic content can vary widely. Removal of these switching components requires that the filter remove not only the fundamental, but these harmonics of it as well.
Note that this filter may also be useful if you are using another receiver whose antenna is anywhere near your Doppler switched antenna system: Because switched antennas tend to "space modulate" the local environs, any other receiver and/or transmitter nearby will be afflicted with the switching tone to some extent. (While this won't get the tone out of your transmitted signal, it will likely remove it from the received signal.)
Finally, there are occasions where listening one may want to listen to the tone: The practiced ear can often tell - just from the tone - if the received signal is being distorted by multipath (or other types of) distortion. The presence of such distortion may alert the user that the readings being obtained may not be valid. For this reason it should be possible to switch the filter out of the audio path.
Note: While the rotation frequency for the
Montreal
Doppler II is 500.8 Hz, the Doppler III's rotation is approximately
499.3
Hz using Jacques' original firmware: If you are interested in
using
this comb filter with the Doppler III, let me know. Note that
the alternate
firmware for both the Doppler II and Doppler III operates at
500.8
Hz.
Please note: This is NOT an official page of
VE2EMM and he cannot be reasonably expected to answer questions
pertaining to it. If you have questions/comments about this page,
please direct them using the contact information
at the bottom of this page.
Tackling the problem:
In this particular case we are using the VE2EMM Montreal II Doppler
unit. This unit switches the antennas at 500.8 Hz (5 MHz/9984 to
be precise) and this frequency is from a quartz crystal reference. (Note:
This
comb
filter
may be modified to use other frequencies as noted later.)
Having such a stable frequency makes it much easier to notch out the
switching
tone and its harmonics as these are very stable and predictable.
Because we are actually removing the fundamental and its
harmonics, we need a comb filter. This type of
filter
does precisely as its name implies, an effect easily visualized with
the
aid of a spectrum display (see below.)
Comment:
The VE2EMM Montreal III Doppler unit - running the original
firmware operates at approximately
499.3
Hz instead of 500.8 Hz. For best performance with the
Montreal
III running original firmware, a slight frequency shift is required (see
below.)
Our design criteria are as follows:
Normally, when one thinks of "DSP" one may also think of cost and complexity. We are fortunate, however, that we are trying to just build a comb filter: This filter can be implemented with very modest software and hardware requirements: Even a PIC can do it!
The design:
I decided to use the PIC16F819. This microcontroller has 2k of
program memory, 256 bytes of RAM, a built-in 10-bit A/D converter, and
a hardware-based PWM generator that may be used as a 10 bit D/A
converter.
Also to be included with the comb filter is all of the necessary anti-aliasing filtering as well as a decent audio amplifier: While mobile radios usually have an audio amplifier capable of a room-filling 1 or 2 watts, the audio amplifier in an HT is usually inadequate when pressed to do the same task.
The original (and typical) design used a rheostat to set the volume and this required that the audio amplifier to be turned up quite high if a "loud" volume were ever needed. The rheostat was then turned down to adjust the speaker volume to the desired level. With this arrangement, I noticed an annoying tendency for the speaker's changing load (when the rheostat was adjusted - particularly when it was turned all of the way up) to cause the audio phase (and thus the bearing) to shift slightly. The use of an additional audio amplifier handily solves this and the other problems.
How the hardware works:
From a hardware standpoint, operation of the comb filter is straightforward:
U1A forms a 3-pole Chebychev lowpass filter with a "knee" of about 3.5 kHz. The purpose of this filter is to remove energy at frequencies higher than this - particularly those near or above the Nyquist frequency - which is one-half of the sampling rate. In this case the lowest sampling rate is 10 kHz (for the 8-tap implementation of Algorithm 2) meaning that those signals above 5 kHz need to be adequately attenuated.
From the output of the filter the input audio is fed into the
PIC.
As seen from the schematic, a pair of 10k resistors are used to bias
the
input at mid-supply, or 2.5 volts. Although this PIC has five
multiplexed
A/D channels, it has only one 10 bit A/D converter - and we need only
the
one input on Pin 17.
The LM380 audio amplifier is a big brother to the LM386 - but is capable of more output power and operation at higher voltages. The LM380, which is rated to operate at up to 22 volts, will easily drive an 8 ohm speaker to at least 1.5 watts when operating from 12 volts - and it's capable of over 2 watts if a 4 ohm speaker is used (although that latter case may require a bit of extra heat-sinking on the amplifier.) In contrast, the LM386, when operated at 12 volts, is capable of, at most, about 0.5-1 watt of audio output or so. Furthermore, the most commonly-available versions of the LM386 (those with the -1, -2, and -3 suffix) are NOT rated for operation above 12 volts and should not be used here! Use only the LM386-4 at 12 volts and above. (And before anyone asks: Yes, they still make the LM380!) |
The PIC, after suitably digesting the inputted signal, outputs the processed audio on pin 8. This pin is configured to be used as a PWM (Pulse Width Modulation) output - a sort of poor-man's D/A converter. This converter simply uses hardware timers to adjust the duty cycle from very low values (corresponding with a low voltage) to higher duty cycles (corresponding with high voltage.) Despite it simplicity, the PWM technique works very well and has good accuracy and linearity, being commonly used as the "1-bit D/A" found on many CD players. A minor drawback of a PWM-type of D/A converter over a more conventional one (such as an R/2R) is that the PWM converter can produce a very strong component at the clock frequency - which, in this case, is the sampling rate.
The output of the PWM generator is lowpass filtered using U1B - a filter nearly identical to the input filter - which quite effectively removes high-frequency components. The output of this filter is then passed to a volume control, attenuated, and put into an LM380 audio amplifier.
There is also a "Clip Indicator." When the audio input or output goes above a certain amplitude, pin 9 will pulse high indicating the possibility of clipping. In actual fact, the clip indicator's threshold is well below the "full-scale" A/D input/output level - about 6 db lower. This amount of headroom allows occasional "flickering" of the CLIP LED without the peaks (which will be higher) actually going into distortion. The output pulse is lengthened by the 0.1 uF capacitor and this pulse then drives the transistor that illuminates the LED. (Note that only the input/output levels of the PIC are monitored and that this indicator has nothing to do with whether or not the LM380 audio amplifier is clipping: You use your ears for that.)
Pins 10, 11, 12 and 13 are inputs used to select the operational mode of the comb filter. Internal pullups are used in the PIC and the appropriate mode is changed by grounding the appropriate pin(s) as described below.
Construction:
As seen from the picture, the comb filter was constructed on a small piece of proto board and all ICs are socketed.
Owing to the rather sensitive A/D converter (with 10 bits of resolution - one bit being equal to a voltage change of about 0.005 volts) and the presence of the audio amplifier on-board, it is relatively important that proper construction techniques be observed:
Important note:
If the PIC16F88 is used instead of the PIC16F819, the audio output is on RB0 (pin 6) rather than RB2 (pin 8.)
How the software works:
Bypass mode:
When pins 10, 11, and 12 are left floating (and are pulled high by resistors internal to the PIC) the comb filter is in the "Bypass" mode where input signals are simply passed to the output. In this mode, all 10 A/D bits are simply sent to the 10 bit PWM converter and the sample rate is set to about 19.53 kHz.
|
(RB4) |
(RB6) |
(RB7) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When pin 11 (RB5) is pulled low and pin 10 (RB4) is left floating (high) the comb filter is enabled and Algorithm 1 is used. This comb filter samples at 12 kHz, uses IIR techniques and works as follows:
Other algorithms may be selected that use from 75% to 97% feedback and the performance of these filters varies in terms of how broad the "notches" in the comb are as well as how fast the filter can adapt to current conditions. Naturally, the higher the feedback, the narrower the notches, but the slower the response. This means that on a rapidly changing, fluttery signal the 97% feedback filter may "ring" noticeably on rapid signal fluctuations. This filter may also "ping" when the squelch opens/closes. As an aside, it is interesting to observe that this type of filter, as the amount of feedback is lowered to unity, turns into a "1-tap" FIR filter (see below) and takes on a distinctly "hollow" sounding characteristic. (This effect is just becoming audible in the "75% feedback" mode.)
Algorithm 2:
When both pins 11 (RB5) and 10 (RB4) are grounded the comb filter is enabled using Algorithm 2. This algorithm is a simple tapped FIR comb filter and it works as follows:
(Hz) |
(88% feedback) |
(75% feedback) |
(8-tap mode) |
(4, 2, and 1-tap modes) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3000 (6th harmonic) |
|
|
|
|
Comments:
Here are some audio clips demonstrating the filter's
effectiveness.
There is one file for each of the algorithms and in each case, the 1st
10 seconds are the original unfiltered audio with the switching
tone in its fully glory. At approximate 10 second intervals, the
mode is changed as evidenced by a "click." Each MP3 file is about
150k.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Comments on the audio clips:
Attenuation table:
The efficacy of the comb filter in its various modes was measured and the results are shown in the table. Note that the measured attenuation is relative to that component's strength when in the bypass mode and not to the fundamental. In several cases (with the higher-order harmonics) there was not enough signal present to fully measure the amount of attenuation provided by the comb filter: In these cases, one knows only that it was reduced by ">40 db" for example.
Spectrum analysis plots:
Also note the spectrum analyzer plots showing the filters bandpass. This analysis was done using the Spectran software and a computer-generated white noise on the input of the filter.
A few comments on these plots:
Using the comb filter:
This comb filter was designed to work specifically with the VE2EMM Doppler. This unit has a tone frequency of 500.8 Hz - but this comb filter could be designed to operate at any frequency from this up to at least 1.5 kHz or so.
Please note that the notches are extremely narrow - and a fundamental frequency difference of even 1 Hz from the intended center frequency will result in significant (15 db) degradation of the notch depth at 500 Hz. This happened to some extent in the case of the 8-tap filter where the exact frequency of that filter is 501.0 Hz: This deviation of 0.2 Hz from its intended frequency caused a 4db reduction in the notch depth at 500 Hz and similar performance reductions at the harmonics. When used (without modification) with the Montreal III, this comb filter is still usable, but the 1.6 Hz difference causes noticeable degradation unless this filter is "retuned" to accommodate (or modified - see below) the Montreal III's 499.22 Hz switching tone. Note that the Doppler III running the Alternate Firmware operates at 500.8 Hz. If you anticipate use of this comb filter with your Doppler system, consider the following:
Getting more info:
The code for this comb filter has been written to work on the
PIC16F819
and it is available for the PIC16F88 as well. If you are
interested
in this - and especially if you have need for it to use something other
than 500.8 Hz, you may send an email to the address below.
In addition to the power, crystal, and audio in/out pins, there are
only two pins remaining on this 8-pin chip:
Integration into the Doppler III:
The "output" of the comb filter is connected to the "high" side of
the volume control on the Doppler III, but it is recommended that a
slight modification be made to the input of the Doppler III to allow
the audio level being input to the Doppler III's filtering to be
adjusted independently from the audio input level to the
comb filter. To do this, a 1k pot - with the wiper connected to
the audio input of the unit - is placed at the audio input to the
Doppler III to adjust audio level. The ungrounded end of R50 (the
27 ohm "loading" resistor) is lifted from the circuit board connected
to the "radio" side of the added potentiometer.
The audio input to the comb filter is directly from the radio - the
"hot" (radio) side of the 1k pot added in the above step rather than
from the original source - which is now "level adjusted" with the
newly-added potentiometer. For adjustment, tune in a "clean"
signal containing audio peaking at a full 5 kHz deviation (or slightly
more) and set the volume control on the radio at about 1/3-1/2 of the
way up (that is, turned up a bit, but well below distortion.)
Now, adjust the newly-added "input-level" adjustment pot on the Doppler
unit to just provide a "solid" quality level of 8 on the
display.
Now, adjust the "input level" control on the comb filter such that CLIP
LED flashed only on occasional high-level audio peaks.
Once this is done, the "output level" control on the comb filter is
adjusted to provide the desired amount of audio level drive for the
volume control.
Why is all of this necessary? In my experience, the Doppler
III's audio input is too sensitive - requiring a minute amount
of audio from the radio being used. Adding the comb filter gave
me the opportunity (or excuse) to add an "input level" control to allow
a more "midrange" setting of the volume control to be used.
Having an "input level" control on the DF unit that is separate from
that on the comb filter allows flexibility in adjustment to optimize
the range of both. Because the output level of the comb filter is
quite high, the adjustment on the output allows one to set the
amplifier's drive to a reasonable level.
Usage of the comb filters
while mobile:
As mentioned above, being able to listen to the audio tone can allow
someone with experience to determine, without looking at the display,
something about the quality of the bearing: The "timbre" of the
tone and the way it changes can alert the savvy user to the likely
presence of multipath and to the fact that the bearings being received
at that instant may be suspect in their validity.
For this reason, both of the described units have the "bypass" mode
readily available that allows one to quickly switch the filter in and
out to allow an "audible examination" of the switching tone. One
would possibly have the comb filter switched in much of the time to
avoid "ear fatigue" or if there was something modulated onto the
monitored signal that was being masked by the switching tone.
It is also worth pointing out that even with the comb filters
switched in, it is possible to determine something about the bearing
quality: As one moves about in an area with a multipathy signal,
the switching tone varies wildly in amplitude and harmonic content -
not to mention the likelihood that some noise and fading comes and
goes. The two different algorithms of comb filter react quite
differently in these situations.
As mentioned before, Algorithm 1 tends to "ping" a bit when the tone
changes rapidly, with the intensity of the "pinging" increasing on a
given signal as the amount of feedback is increased. What this
means is that when using Algorithm 1, one will start to hear "pinging"
of the switching tone as the multipath conditions worsen - a good
indicator of signal quality that can be heard even when the comb
filter is active! As you might guess, the "75% feedback"
version of Algorithm 1 is somewhat less-sensitive to this effect than
the "88% feedback" version.
Algorithm 2 is more-or-less immune to the "pinging" effect, but
there's another phenomenon that causes a sound similar to the "pinging"
to be heard when multipathy signals are being filtered. As the
multipath comes and goes, the amplitude of the switching tone and its
harmonics varies rapidly. This effectively causes a random
amplitude modulation of the spectral components of the switching tone
which
causes the generation of random sidebands around the actual switching
tone frequencies: Because the comb filter's notches are so
narrow, some of this energy falls outside the effective bandwidth of
the notch, resulting in audible artifacts. In addition to this,
as the signal quality degrades, distortion in the audio being received
can cause some of the audio frequencies to mix with the switching tone
(due to nonlinearities) and produce audible artifacts in that manner as
well. In short, Algorithm 2 is much-less affected by the
"pinging" but multipath is still evident to the user even when the comb
filter is active.
For the "full-sized" version of the comb filter, it's probably a
tossup between the "8-tap" and "75% feedback" algorithms when using
them mobile: Both work very nicely.
In the case of the "mini" version of the comb filter, I find that
the "75% feedback" algorithm (2 flashes) works very nicely while
causing only minimal coloration of the audio. The "3-tap"
algorithm work very well, too - if you don't mind a bit of a "hollow"
sound imparted on the audio. Because you have the three
algorithms to select from, you can decide for yourself!
Note: This page (and other pages at this site) are not
"official" pages of VE2EMM. These pages are simply set up to aid
those who have built or might build the described equipment.
Note: The author does not officially endorse any vendors mentioned above. The level and satisfaction of performance of any of the above circuits is largely based on the skill and experience of the operator. Your mileage may vary. Do not taunt happy fun ball.
Do you have any questions on this or other
DF-related topics or are
you interested in getting a comb filter?
If so, you may send email to the address below:
For information about the availability of this firmware, go here.
Do you have any questions on this or other DF-related topics? Go here.
Return to the KA7OEI ARDF Page.This page updated on 20080804