Education‎ > ‎

Uneven transceiver audio frequency response

posted Apr 29, 2013, 8:29 PM by Charles Boling   [ updated Apr 29, 2013, 8:30 PM ]

A perfect audio reproduction system, i.e. one that outputs an exact replica of the sound that was put into it, were it to actually exist, would exhibit, among other things, a perfectly linear frequency response.  This means that if you were to feed it a tone that varied in frequency but never in amplitude, the output tone would do likewise.  Were you to graph the amplitude (volume) of the output over time (an oscilloscope-style waveform), it would be perfectly flat.

In real-life, audio systems -- particularly those used in amateur radio systems -- do not have a perfectly flat frequency response.  In fact, with regard to linearity of frequency response, they can be downright terrible!  (Even the derivative (slope) of the response varies direction a lot across the audio band.)  This was made painfully clear to me during a recent radio-telephony experiment.

Before continuing, let me say that the frequency response of your transceiver is not supposed to be flat.  Some of the goals of the design that conflict with a flat frequency response include:

  • High-pass receive filter so that, instead of having your ears blasted by someone's 254 Hz PL tone (sample attached), you can actually hear what they're saying.
  • Low-pass transmit filter so your signal isn't 100kHz wide, hogging all the nearby frequencies
  • Shaped response so that your speech is more easily heard in a noisy environment
  • Cheap

Getting back to my experiment...  I was sending DTMF digits over the radio to my PBX (think autopatch), and I found that some digits worked, while others consistently didn't.  A couple of them sometimes worked.  I played with volume levels, etc. and never could get them to work.  I finally used the computer to record what was coming in on the "sound card" (in this case, a SignaLink USB), and used the spectrum analyzer in Audacity to see what frequencies were being output.  I would have suspected that the tone frequencies were off in my transmitter, were it not for the fact that two very different transmitters, each generating their own tones, behaved nearly the same.

I was surprised to find that, while the frequencies were off a little, the the higher tone was always much quieter than the lower tone of each DTMF pair.  The greater the difference in frequency between the two tones, the greater the difference in volume.  It was the 2,3, and 6 that consistently failed to work -- the same digits whose tones are the farthest apart from each other!  While some digits (7) had as little as 4dB difference in amplitude between the two tones, the digits that didn't work all had 10dB or greater difference.  That's a lot of twist! (Twist is the telecommunications term for the difference in volume level between the two tones, which typically start off at the same volume.)

Wondering if the radio was generating the tones at different volume, I played the tones from the transmitter into a microphone attached to the computer (bypassing the RF link).  I found that through this route, the higher (column) tones were actually louder than the lower (row) tones!  There was obviously a lot of distortion going through the radios.

To get a picture of the frequency response, I had Audacity generate a constant-amplitude tone that swept from 0 to 4 kHz over a 10-second period (linearly, i.e. 400 Hz/sec.)  Pressing the transmit button on my HT, I played that sound, while recording it on the same computer.  Here is a picture of two waveforms: the input and the resulting output (you know, the one that should look just like the input, were the frequency response flat?), so you can see just how bad the fidelity is:

input and output waveforms from a very non-linear system

The cursor above is sitting at 1 second, or about 400 Hz.  At this point, you're just starting to get a little response.  (Note that the audio passband for ham radio communication is often said to be from 300-3000 Hz.)  Response peaks at about 780 Hz, and them starts going down.  Note that the curve is far from smooth; there are deep notches in it, making it easy to see how two tones could vary by 20dB.  The frequency analysis of the entire transmission shows the same thing.  (Attached is a text output of a 512-point FFT of the transmission.)

There are a lot of places for infidelity to be introduced.  Here are the analog portions of the path the above signal takes:

  • Transmission:
    • Computer sound card (DAC) output
    • stereo system amplifier
    • speakers
    • room acoustics
    • ht microphone
    • audio pre-amp
    • modulator
  • Reception:
    • discriminator
    • audio amplifier
    • SignaLink ADC input
    • software filters

Boldfaced items are shared with the DTMF tones generated by the radio.  Since they are injected right into the transmitter's audio circuit, they bypass the microphone, but it's worth noting that if analog oscillators are used to generate the tones, the generator could have its own imperfections.  Once the audio hits the SignaLink, though it passes through a SIP client and across the network to the Asterisk server, it's 100% digital, so no additional problems can be introduced unless one of the software components performs some sort of digital shaping in an attempt to be helpful.

Asterisk (my PBX software) believes that anything with more than about 8dB of difference between the two tones must not actually be an intentional DTMF tone; this is why it's rejecting certain digits.  But what can I do about my problem?  Newer versions of Asterisk (since October 2012) allow you to customize the DSP logic that performs the DTMF decoding to allow greater disparity ("twist") between the tones, but the version that's packaged with my chosen server OS (Ubuntu 12.04) doesn't, so I either need to tough it out until I upgrade that, or break my easy-and-brainless package installation and install a newer version from source.  (I did that for years on my last machine, and swore that I would be patient and take the easy route this time...)  Another option would be to insert my own filter (either in the form of a piece of analog hardware between the radio and the computer, or a virtual sound device that does filtering between the SignaLink and the SIP client on my PC) to de-emphasize the 600-1000 Hz range.

While you don't care quite as much as my DTMF decoder does about frequency response most of the time, knowing about it can be handy.  You will find that different microphones and speakers, for example, can make voice sound different.  You (or other people) might appreciate hearing a more natural, or pleasing voice, or perhaps one with more "punch" that can be better understood over particular noise.  More bass might make you sound "manly", but a decreased bass response might allow you to "turn the volume up" more on the higher frequencies that are critical for discerning speech, without trying to put out more power than the typical puny little radio speaker  can handle without gross distortion.  When listening to audio in a moving vehicle, I often "turn up the treble" and "turn down the bass" to make it easier to hear over the road noise without hurting my ears with a high overall power.  Even your own ears are nonlinear, as many men can attest to as they struggle with high-frequency hearing loss in their later years.  An audio equalizer between your radio and a satellite speaker can let you "tweak" your received audio so you can understand people easier.


Ć
254Hz.mp3
(40k)
Charles Boling,
Apr 29, 2013, 8:29 PM
ċ
spectrum512.txt
(6k)
Charles Boling,
Apr 29, 2013, 8:29 PM
Comments