Medium wave AM with Linrad.
(June 7 2008)

Detecting mediumwave AM.

AM broadcast stations are channelized and one can often hear two stations on the same frequency. In case the carriers have similar amplitudes they will nearly cancel each other at times when they are out of phase. Loosing the carrier is not good for detecting AM signals with a conventional AM detector.

The carrier frequency of two stations on the same channel may differ slightly, but not much. The example on this page is two stations with a frequency separation of about 1 Hz. This frequency separation is too large to cause severe distortion in a conventional AM detector because the duration of the minima where the carrier is lost is very short.

Contrary to shortwave DX, mediumwave stations often do not exhibit selective fading and that means that both sidebands are equal in amplitude and in phase. This means that it is possible to insert a synthetic carrier of the correct phase to replace the perturbed carrier while receiving both sidebands. By use of a quadrature detector one can get the AM modulation as the in-phase signal I. At times when the second station is 90 degrees relative to the synthetic carrier, its modulation will be present in the out-of-phase channel Q

A wideband recording.

This file http://sm5bsz.com/linuxdsp/usage/kari/530-930khz.zip (149254963 bytes) is a zipped .wav file that was recorded on February 23, 2008, starting at 0459:30 UTC by Guy, KE7MAV on a Perseus HF receiver in Puyallup, Washington USA.

The recording is centered at 730 kHz. Linrad can not read the frequency information from the Wav file so it is necessary to feed in the correct center frequency 0.73 MHz by hand. Figure 1 shows the Linrad screen when processing the file with a conventional AM detector in a filter bandwidth of 8 kHz. Listen to the loudspeaker output in this file: amdet.mp3 (958380 bytes) About 40 seconds into the file one can easily hear a male voice saying some numbers behind the music from the other station. Listen a couple of times and write down what you can copy. Also try with other software at your disposal to see if you can copy more numbers.



Fig 1.The 530-930khz.wav file with simple processing, just an ordinary AM detector. Linrad is set for repeated playing so the file which goes from 00.00.00 to 00.00.59 starts from zero every 59 seconds as can be seen in the main waterfall. The S-meter shows QSB at a rate of about 1 Hz reflecting the interference between the two carriers from two different stations that are separated by about 1 Hz.
To reproduce figure 1 and the loudspeaker output on your own computer under Microsoft Windows, follow these instructions:

  • Make a directory of your choice. C:\Linrad is used below but you may use any name of your choice.
  • Download the Linrad executable and help files contained in wlr2-xx.zip and unpack them into C:Linrad.
  • Download the file adwav (261 bytes) into C:\Linrad.
  • Make a directory C:\wavlib and download 530-930khz.zip into it and extract the 530-930khz.wav file into it.
  • Create a directory par in the C:/wavlib directory.
  • Unpack the contents of karipar.zip (20632 bytes) into C:\wavlib\par. (In case you are using Linux, use karipar_linux.tbz
  • Open the command (MS-DOS) window and type CD C:\LINRAD then start linrad.exe by typing LINRAD
  • Linrad will start by asking you to press S for setup routines. Do this and
    • Enter 1 for font scale.
    • Enable high process priority in case you need when having other programs running simultaneously.
    • Set parport address to 0
    • Select percentage of screen so the number of horizontal pixels becomes larger than 1000 and the number of vertical pixels becomes larger than 710. With a 1024x768 screen this corresponds to 98% screen width and 93% screen height.
    • Set max dma rate to 50. When listening to a recorded file there is no reason for using small soundcard buffers so it could be a good idea to set the minimum value for max DMA rate low on slow computers.
    • Press W to save the parameters.
  • Press U to enter the setup for your soundcard(s) This part of Linrad should be self-explanatory.
  • Press W again to save the parameters.

Now setup is complete. Press 2 to start listening to the recording with the parameters specified on the first line in the adwav file. Move the mouse to 550 on the frequency scale at the top of the screen and click the left button. You will need a wheel mouse to fine-tune the frequency. Press the wheel and turn it to set the step size.
The signal from your soundcard should be identical to amdet.mp3 (958380 bytes)

Coherent processing in Linrad.

Linrad uses several filters in the baseband. The main filter is the wide yellow curve but there is also a narrower filter which is set to have four times narrower bandwidth in figure 1. (There is also a wider filter to allow integrate and dump filters for optimized Morse decoding.)

For AM detection the mode Coh2 is useful. One should then set the narrow filter to a small bandwidth that will make the output dominated by the carrier. Linrad will then use the phase of the output from the narrow filter as a phase reference for quadrature detection of the signal that has passed through the main filter. Figure 2 shows the screen with a bandwidth of 8 kHz for the main filter and 200 Hz for the carrier filter (bw ratio = 40.) Listen to the loudspeaker output here: amcohwav.mp3 (959216 bytes) 32 seconds into the recording you should easily hear "Contact focus on the family toll free in the US at" and the complete telephone number that was difficult to copy with the ordinary AM detector. You will also be able to copy the telephone number for Canada. Note that it is essential to use good stereo head-phones when listening. The left and right channels must reach separate ears without interfereing with eachother. In Coh2 mode the human brain is used as a phase detector!



Fig 2.The 530-930khz.wav file with coherent processing, mode Coh2, with a carrier filter bandwidth of 200 Hz.
To reproduce the loudspeaker output on your own computer, press 4 on the main menu, then select 1 to process the wideband recording with the parameters specified on the second line in the adwav file. Move the mouse to 550 on the frequency scale at the top of the screen and click the left button. A wheel mouse must be used to fine-tune the frequency because the carrier must be within the narrow filter. The signal from your soundcard should be identical to amcohwav.mp3 (959216 bytes)

In case you do not have a wheel mouse, press 4 on the main menu, then 2 to select the parameters from the third line in adwav. The Linrad AFC will then be used to fine tune the frequency. Note that the tuning range is small and that there are many narrowband signals near the carrier. Check that the AFC graph shows a frequency very near 550 kHz as in figure 3. Otherwise move the mouse one pixel and click again.



Fig 3.The 530-930khz.wav file with coherent processing, mode Coh2, with a carrier filter bandwidth of 200 Hz. Here the AFC is used to fine tune the frequency.
As can be seen in the AFC graph, the white curve, the frequency of the digital LO that is used to mix the 550 kHz signal down to the baseband does not vary by more than a few tenths of a Hz and the variation is very slow. The coherent detection could absorb very much greater phase errors than those introduced by the AFC. The loudspeaker output is identical to the Coh2 output without the AFC.

Note that the time delay from antenna to loudspeaker has increased from 0.6 seconds in figures 1 and 2 to about 2 seconds with the AFC parameters used in figure 3. This could be a problem in amateur radio, but for DX listening it does not matter.

Coherent processing with selected carriers.

In Linrad02-47 and later it is possible to set very large bandwidth ratios that allow the selection of one or the other of close spaced carriers. Figure 4 shows the Linrad screen when the carrier of KARI on 549.9995 kHz is selected to generate the reference phase for the quadrature detector. The loudspeaker output carr9995.mp3 (958798 bytes) has the KARI signal mainly in I, the left audio channel, while the interfering signal is present in both channels.



Fig 4.The 530-930khz.wav file with coherent processing, mode Coh2, with a carrier filter bandwidth of about 1 Hz centered on the KARI carrier.
When the carrier of the interfering station is selected, figure 5, the interference is mainly present in the left channel. carr0007.mp3 (958798 bytes) The KARI signal is present in both channels so using stereo head-phones makes an improvement over listening to the right channel only.


Fig 5.The 530-930khz.wav file with coherent processing, mode Coh2, with a carrier filter bandwidth of about 1 Hz centered on the carrier of the interfering station.
To reproduce the two audio files, press 4 on the Linrad main menu, then 3 to select the parameters of the fourth line in adwav. Click on 550 kHz and use a wheel mouse to shift the frequency to 549.9995 or 550.0007 kHz.

As can be seen from figures 4 and 5, the interfering station is 3 to 5 dB stronger than KARI.

Linrad can use an AF-derived AGC in COH2 mode. Click the AGC box and figure 5 should change to look like figure 6. With the AF derived AGC the audio volume is set equal in both channels and that increases the gain for KARI to some extent. The audio file should then sound like this: afagc.mp3 (959216 bytes) and the screen should look like figure 6. At times when both KARI and the stronger interfering station are weak in the Q channel one can hear fragments of a third station on the same frequency in this file.



Fig 6.As figure 5 but with the AGC derived independently from the two audio signals.

Hardware considerations

Linrad can be used with many different hardware. It can use the Perseus, but only under Microsoft Windows. It can also use SDR-14 and SDR-IQ under both Linux and Windows. Any direct conversion hardware that can produce I and Q for input to a soundcard can be used and with a two channel hardware it can process the input from two antennas simultaneously. It is also possible to use any conventional radio in SSB mode provided that the bandwidth is large enough to allow both sidebands (and the carrier).

The parameters used in the files on this page can be used as a starting point for AM DX-ing with all the different types of hardware using the Coh2 mode of Linrad.


To SM 5 BSZ Main Page