Weak Signal Communication: Menggunakan Linrad

From OnnoWiki
Jump to navigation Jump to search


What is Linrad?

Linrad is a computer program that can be run under Linux as well as under Microsoft Windows and Free BSD on a PC compatible computer. Linrad is available as source code with a Makefile that allows the generation of an executable with a single command both under Linux and under Windows.

Linrad can operate with any soundcard for which the operating system on the PC has drive routines. A conventional radio receiver or a direct conversion radio is then used to bring some part of the RF spectrum to audio frequencies. Linrad can also be used with the SDR-14 and the SDR-IQ from Rfspace as well as with the Perseus HF Receiver from Microtelecom s.r.l.

The Linrad dsp software is independent of the hardware. It 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.

Here is the latest stable version of Linrad: lir03-08.tbz (559203 bytes) Tar archive packed with bzip2 Oct 02 2009. The same files are contained here lir03-08.zip (723836 bytes) This package will generate executables with the commands configure and make under Linux as well as under Windows.

linrad.exe, the executable for Microsoft Windows and the message files help.lir and errors.lir are contained in wlr3-08.zip (338993 bytes) in case you do not want to compile from source code.

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.)

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. Dedicated hardware for Linrad Several high performance WSE units can be combined to make Linrad a really high performance radio. All details including PCB layouts are presented here.

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....


Installing software under Linux

Linrad is a Linux package and when you download it you will download the source code only and no executable file. To get it running on your computer you must:

1. Install a Linux distribution on your computer if it is not already done. 2. If you want to be able to use svgalib, Install svgalib 3. Install nasm if it is not already included in your Linux distribution. 4. Install Linrad 5. Get sound running. You need line input. The microphone input, which is default, is very noisy. You also have to switch off the direct connection from the input to the loudspeaker. There are two modern sound systems for Linux, ALSA and OSS. There is also an older sound system (legacy sound). 6. Install Portaudio (Optional)

The links above are intended for radio amateurs who have no experience at all with Linux. The instructions are very detailed and it is assumed that Linux is running in text mode.

If you have no experience with Linux whatsoever, the links on this page Install Linux for use with Linrad (For Linux novices only) give very detailed instructions for some of the popular Linux distributions of year 2009.

If you have just a little bit of Linux experience these links will give no useful information - just follow the instructions that come with each package!

The first series of Linrad packages, Linrad-00.xx and Linrad-01.xx were written as simple single-threaded programs. The main loop for normal receiver operation was a state machine and very efficient while calibration routines were slow, not reading data while processing. Starting with Linrad-02.00 a multi-threaded structure is adopted. This makes the CPU load increase with a few percent under normal operation which otherwise is not affected at all. The calibration routines however can read and process simultaneously in different threads in Linrad-02.xx and they are much faster.

Linrad-02.xx can be cross compiled for Windows 98, Windows 2000 and Windows XP. To produce the linrad.exe from source code with a simple make command under Linux, one has to have mingw32 installed. The major Linux distributions have this package. If you can not find it, one way of getting the necessary files installed is to download mingw32.tar.bz2 (11 665 983 bytes) and unpack it from the root directory. The tar xvfj command will install the mingw32 files under several directories under /usr.

Installing software under Microsoft Windows

Make a directory for linrad (default = C:\linrad) to which you unpack the zip file containing linrad.exe, errors.lir and help.lir. Starting with Linrad-03.12 you also have to unpack this file palir-01.zip (485835 bytes) into the Linrad directory to make the dll file for portaudio palir-01.dll available to Linrad. That is all, provided that your soundcard(s) are properly installed for Windows. Linrad reads and writes its parameter files on the currently logged directory so you may have several different directories with different names.

In case you have WSE converters or want to use the parallel port to control some other kind of hardware (There have been descriptions of DDS frequency synthetizers with parallel port control in e.g. QST.) you have to make inpout32.dll (32768 bytes) available to Linrad by placing it in the linrad directory or whereever Microsoft conventions suggest it should reside.

If you want to use the SDR-14 or SDR-IQ hardware from Rfspace 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 you already have installed SpectraVue on your computer, everything is already done, but if you do not want to install SpectraVue now 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 the dll file in the Linrad directory.

If you want to use the Perseus hardware http://www.microtelecom.it the file perseususb.dll has to be available to Linrad and the Perseus hardware has to be installed. Make sure that perseus.exe runs properly before trying Linrad. (One has to use the CD supplied with the Perseus to install the USB driver.) Linrad also needs the sbs files of Perseus. You may place copies of the dll file and the sbs files in the Linrad directory. These 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

To compile linrad.exe from source code under Windows, make a directory C:\linrad and unpack the contents of lirxx-xx.zip into it. Install MinGW and nasm which are free under GNU licenses. MinGW can be downloaded here http://mingw.org/category/wiki/download and nasm here: http://nasm.sourceforge.net Unpack and copy nasm.exe to the folder C:\MinGW\bin. In case you want support for the Si570 (softrock) you also have to copy libusb.a and usb.h into the appropriate mingw32 directories. These files are available from http://sourceforge.net/projects/libusb-win32/files Finally log into the C:\linrad directory and run configure.exe to generate the file Makefile (from Makefile.in.) Finally type make to execute the command in make.bat.

You can download mingw, nasm and libusb-win32 as a single file here: mingw516nasmusb.zip (23660852 bytes) Unpack this file from C:\. It contains the entire directory mingw with all subdirectories and files needed to compile Linrad as well as Portaudio under Windows. It should work for versions from Windows 95 up to Windows 7 on 32 bit systems as well as on 64 bit systems. All the source files of mingw and libusb-win32 are available here: mingw516-src.htm

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.

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 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.

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.

Referensi


Pranala Menarik