DRMscan page

DRMscan software background

Instead of manually searching for DRM stations I have written a Windows .NET program called DRMscan to automatically control the G303i PCI radio and search the short wave broadcast bands looking for DRM stations. The program scans the short wave bands using a channel increment of 5 kHz and takes around 5 minutes to complete a scan.

The program is written in Microsoft Visual C#.NET so it will only run with Windows XP/2000 with .NET Framework 1.1 and the latest service packs installed. There are no run-time libraries with .NET programs as all the necessary software support is now part of the operating system. The .NET Framework Version 1.1 (24 Mbytes) can be downloaded from the Microsoft site (www.microsoft.com/downloads) – alternatively many PC magazines have this .NET software on their cover CD.

Download the latest version of DRMscan V1.6 (42 Kbyte) here (left click and choose save file).

DRMscan - how it works

After the G303i radio is tuned to a new frequency the 12 kHz IF is captured to create a 32 Kbyte block of data with 16 bit resolution, at sample rate of 48,000 Hz. The DRMscan program is multi-threaded with the capture routine running in its own asynchronous thread.

To establish that the current received broadcast is DRM the software uses two different algorithms - one algorithm is specific to DRM (FAC reference carriers) and the other algorithm is part of how OFDM is encoded to be immune to problems associated with multi-path reception. If the captured data passes both tests it is assumed to be a DRM broadcast.

FFT

Having captured the 32k IF data block the first step is to convert this data using a Fast Fourier Transform (FFT). FFT software converts the captured audio from the time domain into the frequency domain. The FFT program I’ve used is based on a public domain Pascal FFT program written by Don Cross. Conversion of the program from Pascal to C# is straight forward only requiring minor changes.

I have used a 16384 point FFT to convert the time sampled data into the frequency domain. The resolution for each ‘bin’ (which represents the signal’s energy / amplitude) is 2.93 Hz, derived from dividing the sampling frequency with the FFT resolution (48,000 Hz / 16384). This is much higher than would be normally needed for decoding DRM signals but the software does not attempt to synchronise to the DRM signal so a much finer frequency resolution is needed. The on-screen spectrum displays every 32nd reading.

FAC carrier routine

To determine if the signal is a DRM signal the program looks for three FAC (Fast Access Channel) reference carriers in the frequency domain data. It is not possible to directly look for these FAC frequencies in the FFT data as there will be an unknown frequency offset caused by the radio’s local oscillator not being exactly on frequency.

For successful OFDM decoding the transmitter and receiver need to be exactly on the same frequency. Although the software doesn’t know exactly where these carriers are in the frequency domain data, it does know the relative carrier frequency spacing will always be the same and will not change. The recognition software uses three windows (±150 Hz) appropriately spaced to move through the frequency domain data created by the FFT summing the value of all the individual carriers. At a certain point there will be a correlation of the carrier amplitude that should coincide with the three boosted FAC carriers. From this peak the actual frequency can be determined and the offset can be calculated, this gives a coarse frequency offset. This is a necessary first part of the DRM synchronisation process in a software decoder but the offset value is not used in this application.

 

FAC finder – software sums the three outputs F1+F2+F3 to create FAC correlation data.

FAC reference carrier correlation for DRM RTL broadcast on 6095 kHz.

The above plot shows the FAC correlation for a RTL short wave broadcast, the X axis is the frequency offset centred on bin 50 (12 kHz), the correlation peak is at FFT bin 65, giving a frequency offset of (65 – 50) x FFT resolution = 15 x 2.93 = 43.95 Hz.

At any instance music on an AM station or interference could have these frequencies present so the FAC recognition routine is not perfect. Interference picked up from computers and monitors can cause particular problems as the frequency profile can be very similar to OFDM. If the captured data passes this FAC test then a DRM signal is assumed and the data is passed to the cyclic prefix routine for further evaluation.

cyclic prefix routine

 

Cyclic prefix correlation for symbol alignment.

The prefix correlation routine moves through the time domain samples calculating a correlation between two points which represent the distance between the guard interval and the same interval data at the end of each symbol (marked A and B). The distance between these two points is fixed depending on the mode. If the received signal is DRM then there is only one point in the samples where the two sets of data can match (as shown). Before and after this position the correlation routine will be comparing partial data from two different symbols so correlation will be poor.

Cyclic prefix correlation for Mode A and Mode B (results for the other two modes are not shown for clarity).

Any correlation between the two intervals shows up as a dip and if the mode parameters used match the received mode then the distinctive pattern seen for Mode B should appear. The software looks for these dips as they should occur at known intervals (symbol length). Then an average is taken and a decision is made as to whether this is an OFDM signal. If the software concludes that this is a DRM broadcast then the spectrum already calculated by the FFT routine is displayed, this is used to visually confirm that the broadcast is DRM.

With multi-path propagation the distinctive correlation symbol pattern is altered with multi-path inducing small time variations between symbols. To compensate for this DRMscan has a slider on the main form which determines how many symbols need to show exact timing relationship to be recognised as OFDM.

running DRMscan program

If the DRMscan program is active then attempting to run the G303i control software will produce a ‘No receiver found’ and will run in demo mode.

screen of DRMscan in operation.

Screen of the DRMscan program is shown, after the scan button is pressed the program checks to see that a G303i is installed and the PCI radio’s serial number is displayed. Spectrum of the last found DRM is displayed and is added to the list of DRM stations found. The program has an internal database of what frequencies the various DRM transmitters broadcast on.

When the scan is finished clicking on any frequency in the list will tune the G303i to that frequency but as the Winradio G303i control program cannot also be active it requires an external DRM decoder (e.g. Dream) to be running if you want to decode the DRM broadcast. The +/- 5 kHz button allows the receiver frequency to be adjusted as the software may recognise OFDM on only half the signal bandwidth if it is a strong DRM signal.

The slider on the DRMscan form alters the required inter symbol threshold timing and sets the number of symbols that need to show the exact timing for the data to be considered as OFDM. Each captured block will have around 12 symbols (the actual number will vary as the start point of the captured data is arbitrary) and the percentage displayed is the symbol threshold for OFDM recognition. The slider value is read before each new data capture so the value can be altered during the scan.

There is a trade-off with this setting, low percentage numbers will mean that more stations are passed to the DRM recognition routines and will increase the chances of finding weak DRM signals but will produce more false readings. Setting the slider higher will tighten the timing parameters within the OFDM recognition routines so that only the strong DRM stations with little multi-path will be listed, possibly missing valid DRM broadcasts. Radio propagation conditions are changing all the time so a second scan with a different setting may produce a slightly different list.

At night time when some of the bands gets noisy and interference becomes more prevalent then false readings are more likely to occur. At any point in the scan a weak DRM signal may be undergoing fading and DRMscan could miss that broadcast. Despite the possibility of a few errors it is much quicker to run the program than to step through the frequencies manually.

Where the OFDM decision is close between the received signal being AM or DRM then the program assumes a DRM signal - I would rather have a few spurious results but listing all DRM stations rather than run the risk of missing a DRM station. Remember that the software is making a decision on less than 1 second of sampled data unlike DRM decoders that are continually assessing the data but may take 5-15 seconds to achieve DRM recognition.

Windows XP, .NET Framework are registered trademarks of Microsoft Corporation.

WiNRADiO, G303 are registered trademarks of Rosetta Laboratories Pty. Ltd. trading as Winradio Communications.

 

 

 

 

 


For a more detailed explanation of how the software works please read my DRMscan article which was published in radiouser magazine February 2006 and March 2006.