Linrad home page.
(Part of SM 5 BSZ home page) (July 262010)

Linrad versions

Latest stable is Linrad-03.08.
Source: lir03-08.tbz (559203 bytes) or lir03-08.zip (723836 bytes)
Executable: wlr3-08.zip (338993 bytes)

Unstable Linrad-03.13.
Source: lir03-13.tbz (646906 bytes) or lir03-13.zip (823552 bytes)
Executable: wlr3-13.zip (435049 bytes)
Installer: setup-linrad-03.13.exe (670502 bytes)

Unstable Linrad-03.14.
Source: lir03-14.tbz (656314 bytes) or lir03-14.zip (839239 bytes)
Executable: wlr3-14.zip (440984 bytes)
Installer: setup-linrad-03.14.exe (674297 bytes)

Linrad is a free multi-OS computer program. It is free for anyone for any purpose. Together with hardware that can bring RF signals into digital form Linrad forms an SDR receiver. (A Software Defined Radio receiver.) There is also a transmit part inside Linrad that will form an SDR transmitter together with appropriate hardware. (The transmit side is still at an early development stage.)

Linrad was originally developed under Linux (hence the name: Linux radio.) That is history now. These are the operating systems under which Linrad can be used:

32 bit Linux (from kernel 2.2.12 and up)
64 bit Linux
Windows 98 (re-compile without libusb0)
Windows 2000
32 bit Windows XP
64 bit Windows XP
32 bit Windows Vista
64 bit Windows Vista
32 bit Windows 7
64 bit Windows 7
32 bit PC-BSD


The Linrad source code package will generate executable files under all the listed operating systems with simple commands:

First configure then make

Under Windows these commands take no arguments and the executable always uses the 32 bit memory model.

Under Linux and PC-BSD there are options. One can select to generate 32 bit code or 64 bit code and one can select to generate code for the graphical user interface X11 or for terminal mode. In all there are four different executables. (64 bit PC-BSD does not yet work.)

Linrad can operate with any soundcard for which the operating system on the PC has drive routines. Linrad has support for the following hardwares that use PC soundcards:

WSE converters
Si570 (Synthetizers for Softrock and others.)


Linrad can also operate with the following direct sampling receivers:

SDR-14 from Rfspace
SDR-IQ from Rfspace
Perseus HF Receiver from Microtelecom s.r.l.
SDR-IP from Rfspace

The Linrad dsp software processes any bandwidth that the hardware can handle. Linrad has its origin in software that was developed for 144 MHz EME CW but it is quite general and should be seen more like a kit for designing a receiver that a receiver for some particular usage. To get an idea about different usages, have a look at examples of different usages of Linrad

The Linrad development page has links showing various aspects of Linrad as encountered chronologically during the development work on the Linrad receiver. Old versions can be downloaded from there. The link contains information about the difference between versions and shows how different functions are gradually added to the package. The development page contains information about the different functions as they were added and may be more complete than the more systematic presentation here.

Starting with version 02-36 Linrad also has a transmitter albeit in a very early development stage. The Linrad TX development page and the links there will show in chronological order how the development on the transmit side proceeds.

General aspects of a Linrad Installation

A Linrad installation resides in a single directory, the Linrad directory. It is possible to have many linrad installations in different directories in the same computer and it is possible to run several instances of Linrad concurrently from the same or from different radio hardwares.

It does not matter how you name the linrad directory, but if there is no reason for something else it may be a good idea to follow conventions like this:

Linux
/home/current_user/linrad/linrad-03.13
/home/current_user/linrad/linrad-03.14
/home/current_user/linrad/linrad-03.15
etc.

Windows 98 and Windows 2000
C:\Program\linrad\linrad-03.13
C:\Program\linrad\linrad-03.14
C:\Program\linrad\linrad-03.15
etc.

Windows XP, Windows Vista and Windows 7
C:\Program Files\linrad\linrad-03.13
C:\Program Files\linrad\linrad-03.14
C:\Program Files\linrad\linrad-03.15
etc.

Linrad will generate a large number of parameter files like par_userint, par_ssb_wg, par_sdrip,.... They all match the general file name par_*

Linrad will also generate files that contain calibration data in case you calibreate your system. The calibration files all match the general file name dsp_* A convenient way to back up a Linrad installation is to copy the entire directory in a command window:

C:\Program Files\linrad>xcopy linrad-03.14 linrad-03.14-xx /s (Windows)

current_user@HOST/home/current_user/linrad$ cp -r linrad-03.14/ linrad-03.14-xx (Linux)

The commands will create a new directory and place everyting in it. You may save any number of different parameter settings or calibration data in different directories and execute Linrad from a different location depending on the circumstances.

Installation under Linux.

To install Linrad under Linux, place the source archive lirxx-yy.tbz in /home/current_user/linrad/ and execute the command tar xvfj lirxx-yy.tbz from that directory. A new directory /home/current_user/linrad/linrad-xx.yy would be created. Descend into it and type ./configure and then type make. Follow the instructions you get on the screen. The commands will generate instructions how to install missing Linux packages under the most common Linux distributions.

libperseus-sdr.so is needed if you want to use the Perseus. It has to be installed from source code with this package: libperseus-0.4.bsz.tbz (930253 bytes) Unpack and execute "./configure", "make" and "make install" Maybe it will be a good idea to also run ldconfig. For svgalib, see below.

Linrad can be cross compiled for Windows 98, Windows 2000 Windows XP, Windows Vista and Windows 7 on Linux platforms. To produce linrad.exe from source code with a simple make command (make linrad.exe) under Linux, one has to have mingw32 installed. It is also necessary to have palir-01.dll in the linrad directory and the libusb files, libusb.a and usb.h at the appropriate places in the mingw32 directory. The major Linux distributions have the mingw32 as well as the libusb package. If you can not find them, one way of getting the necessary files installed is to download mingw32bsz1.tar.bz2 (11 728 397 bytes) and unpack it from the root directory. The tar xvfj command will install the mingw32 and libusb files under several directories under /usr. To get palir-01.dll into your Linrad directory, download palir-01.dll.bz2 (457609 bytes) to your Linrad directory and unpack it there with the bunzip2 palir-01.dll.tbz command.

Installation under Windows.

The installation consists of three independent parts:

1) The Linrad executable linrad.exe and the two text files help.lir and errors.lir have to be placed in the Linrad directory which may be created new or which may be an old directory. Possibly with a previous Linrad version in it.

2) Libraries and other binary files that Linrad needs access to have to be placed in the PATH. They may be placed with one copy in each Linrad directory, but it is more practical to place them in the system directory {sys} which is C:\WINNT\System32 under Windows 98 and Windows 2000 and C:\Windows\System32 under Windows XP, Windows Vista and Windows 7.

3) The hardware that Linrad will use has to be properly installed and configured in Windows. There are many problems with drive routines under Windows. Elderly hardware is not well (if at all) supported by modern Windows versions. There are often bugs of various kinds in soundcard drivers and the manufacturers might not supply drivers that are suitable for an SDR application like Linrad.

Installing the executable under Windows.

Easiest is to download and execute the installer setup-linrad-xx.yy It will create the appropriate Linrad directory and put the necessary files in it. It will also create a desktop icon and an uninstaller.

You may also download wlrx-yy.zip and unzip it into a suitable directory. Then right click on linrad.exe in Windows Explorer and send linrad.exe to the desktop to create an icon.

In both cases you would use the same pre-compiled version of Linrad with portaudio and support for Si570.

You may also decide to compile the executable yourself by downloading and extracting the Linrad source code into a suitable directory. You will need mingw32 and nasm to compile. First run configure.exe then make.bat (mingw has to reside in C:\mingw). configure.exe will produce Makefile which will control whether the generated linrad.exe will include support for Portaudio and/or libusb (Si570) For Portaudio you need to have palir-01.dll in your Linrad directory. You can get it from this archive: palir-01.zip (485835 bytes) For the Si570 support you need the libusb files, libusb.a and usb.h at the appropriate places in the mingw32 directory. The easiest way is to run this installer: mingw516nasmusb-setup.exe (9 802 336 bytes) It will create C:\MinGW and install everything needed in it including the libusb files.

In case you want to compile for Windows 98 you must delete the libusb files C:\mingw\lib\libusb.a and/or C:\mingw\include\usb.h and rerun configure. (The Si570 support does not work under Windows 98.)

Installing libraries and binaries under windows.

Easiest is to download and execute the installer setup-linrad-dll-package-01.exe (614050 bytes) It will place palir-01.dll, libusb0.dll and inpout32.dll in your {sys} directory.

In case you want to use the Perseus HF receiver you must also have perseususb.dll in the path with the Perseus .sbs firmware files in the same directory. You can download and execute this installer: setup-linrad-perseus-support-01.exe (NOT YET) It will place the Perseus files in your {sys} directory.

Installing drive routines under Windows.

This is not really a Linrad problem, it belongs to the manufacturer of your hardware and to Microsoft. There is a lot to say about drive routines for soundcards under Windows, but at the moment little of that will be exposed here. Use Google, Yahoo or some other search engine.

The Delta 44 drivers may be incorrect under Vista and Windows 7 The audiodg.exe bug(?) may cause excessive CPU load and some soundcards are useless due to misaligned samples. Soundblaster Audigy 24 bit, EMU 1212M and others have this error.

In case you want to use Linrad with SDR-14, SDR-IQ or Perseus under Windows, first install the drivers supplied by the manufacturer and make sure the units run with the manufacturers software.

With the Perseus such a strategy might fail. perseus.exe might not work at all on a Pentium 3 and it might not work under Windows 98. To run Linrad with the Perseus HF receiver on obsolete platforms (software and/or hardware,) download this file: old-perseus.zip (63321 bytes) It contains an old version of perseususb.dll as well as a directory Drivers. By installing the drive routine from "Drivers" and by placing the old perseususb.dll in the path where you have your .sbs files it is possible to run Linrad with the Perseus on Win 98 systems as well as on elderly Pentium 3 systems where the winusb drivers do not work.

The Perseus files are protected by copyright. All rights belong to http://www.microtelecom.it Each version of Linrad is compiled for a specific version number on the sbs files for Perseus. Go to this page if you want to use Perseus with Linrad and need specific version of the sbs files: sbs files for using Linrad with Perseus

For Perseus you might want to use this installer: setup-linrad-perseus-bin-package-01.exe It will install perseususb.dll as well as the .sbs files in your system directory. The binary files for Perseus will then automatically become available for new Linrad versions.

For SDR-14 and SDR-IQ the file FTD2XX.DLL has to be available to Linrad and the SDR-14 or SDR-IQ drive routine has to be installed. In case if you do not want to install SpectraVue you can download this file ftd2xx.zip (266881 bytes), unpack it to a suitable place and instruct the Windows hardware installation tool to search for the drive routines for "SDR-14" or "SDR-IQ" there. You may place a copy of FTD2XX.DLL in the Linrad directory or in your system directory.

Watzo

The source code for the waterfall zoom program watzo is here: wtz01-01.tbz (62454 bytes) Tar archive packed with bzip2 March 11 2007. Under Linux it will generate executables for Linux and Microsoft Windows.

The executable file for Windows, watzo.exe, is packed in win-wtz01-01.zip (21139 bytes.)

The watzo program allows immediate zoom into huge amounts of waterfall data. It works on power spectra that Linrad can send over the network.

Additional general information about Linrad.

Linrad can use the network to split the processing between several computers, to allow several operators listen simultaneously at different signals received by the same antenna and to send data to various other programs such as watzo.

Linrad and watzo are free softwares. They are free for anyone to use for any purpose.

There is a Linrad mailing list: http://groups-beta.google.com/group/linrad This list is intended for information exchange and questions about Linrad and related issues on computer and radio hardware.

If you have questions about Linrad, have a look at Linrad Mailing List Archives.

LINRAD USER DATA BANK is a site where you can read details about Linrad installations on various hardware combinations. There are also links to other Internet sites with information relevant to Linrad and to software defined radio in general.

ARRL, the American Radio Relay League has a site Software Defined Radio where you can find many interesting articles. Among those is the series about Linrad:

Linrad: New Possibilities for the Communications Experimenter Part 1 (237422 bytes, PDF file) Discussion opens with analog versus digital RF-input techniques and attendant performance considerations. QEX Nov/Dec 2002. p 37-41.
Linrad: New Possibilities for the Communications Experimenter Part 2 (923583 bytes, PDF file) From the Analog World into the Digital: How do we get the desired signal from RF to the sound card ? QEX Jan/Feb 2003. p 41-48.
Linrad: New Possibilities for the Communications Experimenter Part 3 (396080 bytes, PDF file) Linux and the Linrad software package. QEX May/June 2003. p 36-43
Linrad: New Possibilities for the Communications Experimenter Part 4 (752789 bytes, PDF file) Examples of simple Linrad use with an amateur transceiver (IC706) yield improved noise blanking and filtering. QEX Sept/Oct 2003. p 29-37
Linrad with high performance hardware. (518802 bytes, PDF file) Together with the WSE RX converters. Linrad is a software-defined receiver that should exceed any other receiver in dynamic-range performance. QEX Jan/Feb 2004. p 20-31

If you are unfamiliar to QEX, the ARRL "Forum for Communications Experimenters." have a look at www.arrl.org/qex You may want to subscribe....


Source code for GNU softwares.

MinGW can be downloaded here; http://mingw.org/category/wiki/download

nasm is here: http://nasm.sourceforge.net

libusb-win32 is here: http://sourceforge.net/projects/libusb-win32/files

All the source code files of mingw and libusb-win32 are available here:
mingw516-src.htm

For information about Portaudio in Linrad click here: Portaudio in Linrad. Among other things there is a description how palir-01.dll is generated from source code.

Old links about Linrad installation under Linux.

These links are now old, but maybe they still can be of use in some situations:

1. Install Linux for use with Linrad (For Linux novices only)
2. Install a Linux distribution on your computer if it is not already done.
3. If you want to be able to use svgalib, Install svgalib
4. Install nasm if it is not already included in your Linux distribution.
5. Install Linrad
6. Get sound running.

Configuring your operating system.

Microsoft Windows usually comes with a configuration that is not well suited for realtime applications like software defined radio. Many things can be changed by the user to improve the realtime properties of Microsoft Windows.

The same is to some extent valid for Linux. There may be visual effects and needless delay through pulseaudio etc.

Radio hardware

Linrad can receive a radio signal in two formats. As a real signal or as a complex (analytic) signal.

A complex signal is a pair of two signals I and Q which are obtained from two frequency mixers with a phase shift of 90 degrees between them. To use the complex format two audio channels are needed for one RF signal. It is possible to convert directly from radio frequency to I and Q. No filters are required, the anti alias filters of the sound board will provide the selectivity before the actual A/D conversion. Using complex signals provides twice the bandwidth compared to real signals sampled at the same sampling rate. The double bandwidth is no magic - it is because two audio channels are used for a single RF signal.

A real signal is just an ordinary audio signal such as the one that is fed to the terminals of the loudspeaker of an ordinary SSB receiver.

Look here for some examples of analog hardware to use with Linrad and ordinary sound boards.

The radio hardware needed for Linrad is just a linear receiver. A combination of amplifiers, frequency mixers and filters. An ordinary SSB receiver is one example of a linear receiver. A general discussion on radio receivers might shed more light (or confusion) about what is required to prepare the signal before it is converted to digital form.

Linrad uses the parallel port to control external hardware. One pin is clock, one is data and the remaining pins can be used to select what device the data is for. This hardware control is intended to control frequency synthesizers, antenna rotors and any other hardware one might like to have under computer control.

Making the PC quiet. The standard PC computer radiates at VHF frequencies. This link shows some images of how I made my PC computer quiet by putting it into a box with filters on all wires that pass through the wall of the box.

Blanker performance and calibration using RX2500 With linrad00-50 some improvements are made in the noise blanker. This link shows blanker performance on a calibrated system. RX2500 users having no pulse generator can download a calibration function from here to get started with the smart blanker.

Hardware related parameters

When you start Linrad for the first time you are prompted to select screen, mouse speed, A/D and D/A devices and speeds etc.

By pressing W your will create the file dsp_uiparm and get the same settings automatically when you start Linrad the next time. In case you have got your dsp_uiparm from some other system it will work on your computer if the hardware is compatible.

One group of hardware related parameters is the loudspeaker setup. There are many alternatives for the loudspeaker output under Windows. Here is a list in order of performance:

1: Portaudio ASIO
2: Portaudio WDM-KS
3: Portaudio WASAPI
4: Native MME
5: Portaudio Direct Sound
Do not use Portaudio MME.

Select the first alternative from the list that exists for the soundcard that you want to use for output. The difference between these drivers may be very large.

Under Linux there is ALSA, alsa-oss, 4Front OSS and legacy sound. Problems with bad drive routines are generally much smaller in Linux compared to Windows.

The input and output of the Rx side of Linrad can be set up in a very large number of ways sepending on the hardware and on user preferences. It is not practical to try to describe all of it here. Linrad itself will give a reasonable amount of information to the user during the setup phase. Install Linrad and go ahead. In case you find something that seems unclear, post a question on the Linrad mailing list. Somebody will answer and Linrad will probably be changed in a way that should reduce the risk that others have the same problem in the future.

Parameters that depend on receive mode

There are several distinctly different modes of operation for Linrad. The routines responsible for the processing are essentially the same for all modes and the main differences are due to user selectable parameters.

The mode-dependent parameters define fft sizes and related things. Since the FFT's are used as filters they define the size of the filters used when data is decimated. The FFT window functions correspond to the coefficients used by FIR filters so better windows give greater dynamic range (suppression of spurious signals) but they do use more CPU time.

A= Weak signal CW A mode for extremely weak signals with modest QSB, primarily EME. This mode typically has a processing delay of several seconds.

B= Normal CW Like a "normal" radio. The processing delay depends mainly on the bandwidth and can be anything between 20 and 200 ms

C= Meteor scatter A mode for short bursts of very high speed CW. This mode does not have any features of its own, it can be used as a second mode for normal CW with different parameters.

D= SSB Like a "normal" radio. Automatic frequency control can not be selected.

E= FM This mode has a conventional FM detectot as well as an improved detector that uses a small FFT to allow more sensitive detection.

F= AM For AM one can use the same algorithms as in weak signal CW. That allows synchronous AM detection with the possibillity to select one particular carrier a fraction of a Hz away from other carriers as the reference.

G= QRSS CW This mode is identical to normal CW and Meteor scatter CW but it is intended to have the user selectable parameters very different in order to make QRSS CW well visible in the baseband waterfall.

H= TX TEST This mode is for measurement on transmitters. It will display spectra of peak powers (splatter and keying clicks) as well as power vs time which is helpful to understand the causes of excessive bandwidth in transmitters.

I= SOUNDCARD TEST MODE This mode might be useful when testing soundcards as well as other parts of the hardware.

J= ANALOG HARDWARE TUNE This mode is for tuning the WSE converters.

K= RADAR This mode is intended to work as a radar with the Linrad Tx. Very useful on VHF when there is aurora or meteor reflections. Presumably it can be used to look for ionospheric reflections on HF bands.

Dynamic range considerations

The dynamic range of the A/D converter is limited. It is essential for the dynamic range of the whole system to set the analog signal level and A/D board gain correctly.

The Linrad program itself is just another linear receiver (with some additions to it). For processing speed the dynamic range of the digital signal is limited by the use of 16-bit arithmetics and it is essential to set digital signal levels correctly in case the second fft is enabled. The digital signal levels depend on fft sizes, total bandwidth and the nature of the signals you receive.

Checking the dynamic range of your hardware

In case Linrad is used to receive large bandwidths it is essential that the analog hardware has extremely good linearity.

If one strong signal enters the computer at 5kHz while the desired signal is at 10kHz any non-linearity in the hardware that produces second order harmonics will be disastrous.

Good linearity is also required for the intelligent noise blanker that assumes noise pulses to be shaped by the filters independently of amplitude. Poor linearity also leads to incorrect calibration.

Checking the dynamic range is very easy. You need a single strong signal only. Errors show up as extra signals.

Calibration

Linrad has routines that compensate for "errors" in the analog hardware.

Linrad is working happily in an uncalibrated state but you will not be able to use the intelligent noise blanker.

Calibrating amplitude and phase of the entire filter chain used by the system provides a very flat background on top of which very small signals can be seen. The spectrum becomes extremely flat even if the analog hardware uses filters with a very irregular frequency response. Filter characteristics of the analog hardware only affect the dynamic range on a calibrated system.

In case the input signal is in complex format Linrad has routines to correct amplitude and phase for complex input signals These routines operate in the frequency domain and can absorb frequency dependent phase and amplitude errors that are introduced by differences in amplifiers and filters used between the I/Q mixers and the audio board. The only requirement (non trivial) is that amplitude and phase errors are independent of amplitude, time and temperature.

Running Linrad

Linrad uses several windows to supply the user with information and to accept commands by mouse clicks. These windows can be moved around and their size can be changed. Left mouse button on the border lines is used.

The wide graph is divided into two parts; a waterfall display and a normal power spectrum. It can show the entire frequency range or some zoomed part of it.

The high resolution graph is present only if the second fft is enabled. It shows the second fft power spectrum, always with one point per pixel

The baseband graph shows the spectrum of the signal after it has been shifted in frequency and decimated to a lower sampling speed. This graph also shows what filter is in use for the signal that is routed to the loudspeaker.

The afc graph is present only if AFC is enabled. It gives information on how successful the AFC is in following the signal.

The polarization graph is present only if two receiver channels are present. It shows the current receive polarisation which is set automatically or by hand.

Using the noise blanker

The noise blanker in Linrad is quite different from conventional noise blankers. To use it to its full capability, good hardware that allows high bandwidth and good dynamic range is required and it is necessary to have the system properly calibrated.

The signal on which the blanker operates does not contain the entire spectrum that is received by the computer, those parts of the spectrum that contain strong signals are excluded. Averaged spectra are used to determine what frequencies to exclude so averaging parameters and to some extent fft sizes affect blanker performance. The exclusion of strong signals also depends on threshold levels which can be set by the operator depending on the interference situation.

The blanker itself operates in two steps, both of which have threshold levels that decide if a pulse is strong enough to be treated by the blanker.

To get the most out of the blanker a good understanding of its way of operation is required. A real life demo of the Linrad blanker shows what the noise blanker can do to make it possible to receive weak signals under really difficult circumstances. This is a sequence recorded during the leonids meteor shower 2001 with severe powerline noise and several very strong signals in the passband. The sequence is processed in different ways in order to explain the different processing steps.

The Linrad noise blanker was originally developed for Pentium MMX 200 MHz. It was necessary to use 16 bit MMX instructions because of the limited CPU speed of the time. Today (2004) the fast computers allow the use of 32 bit floating point arithmetics. Starting with Linrad-01.26 the user can avoid the limitations with the 16 bit arithmetics by selecting fft version=0 for both the backwards fft1 and for the forward fft2. Using 32 bit floating point does not improve the reception of weak signals, but it makes the setup less critical and it makes the reception of strong signals better. Look here for details A comparison between 16 bit integer and 32 bit floating point arithmetics for the Linrad noise blanker

Using the spur removal function.

Linrad can apply notch filters to remove spurs. These notch filters are applied as phase locked oscillators, sine waves that are fitted in phase and amplitude to sinewaves present in the input. Only signals that have a very narrow bandwidth can be removed this way but the process runs in the frequency domain so a very large number of notches can be present simultaneously.

The spur cancellation routines have been present in Linrad since 2002: Spur cancellation. With Linrad-02-39 (Sept 30 2007) spur cancellation is automated. Click here: Automatic spur cancellation. for examples on how to use this feature.

Second operator over network

If two operators want to receive the signals from a common antenna they may use the same radio hardware and add a second computer in which a Linrad slave will process the digital data sent to it over a network from the Linrad master.

The LINRAD NETWORK can be used for raw data or partly processed data.


To SM 5 BSZ Main Page