linrad support: The Linrad network.
(Nov 10 2011)


Computers have hardware that allows them to be connected to other computers via a network. Such hardware is called a network interface and there may be several of them in the same computer. Each network interface must have an IP address and there may be several IP addresses in one computer.

Linrad uses the network to make raw or processed data available to other programs that may run on the same computer or on any other computer in a local network.

If network transmit is enabled, Linrad will blindly transmit UDP messages to the IP addres that was specified during Linrad setup. The default address is in the range to and no computer should have an address in this range. Datagrams sent to one of these addresses is intended for a group, the group of all computers that want to join the group. When more than one computer is listening, Linrad is multicasting data on the network. Routers typically do not send such packages to the outside world.

It is possible to set the address to to transmit UDP to other programs in the same computer. Such packages will not reach the outside world. It is also possible to set something like to send data to a particular computer.

Firewalls will not allow the UDP messages of Linrad by default. When setting up the Linrad network it is a good idea to physically disconnect from the Internet and other computers not directly involved in using the Linrad transmissions. By temporarily disabling all firewalls one can make sure that everything is set up properly. It is a good idea to use fixed IP addresses to make sure that DHCP does not change the addresses from time to time. When everything works properly one can enable the firewalls again - but personally I think it is better to not use firewalls in any computer in my own local network. A single but very restrictive firewall in the ADSL modem is adequate protection from the Internet. Others may not want a restrictive firewall for all computers and then it might be a good idea to have one in each computer.

To receive the packages into another instance of Linrad, one has to set the same address that the transmitting instance of Linrad is using.

When an address outside the range to is desired, a file par_netsend_ip or par_netrec_ip has to be present in the Linrad directory. The file has to be a plain text file (ascii) containing one line with the IP address in the standard format like

The Linrad base port has to be set between 50000 and 65000 in steps of 10 and Linrad will send data to a port with an offset with respect to the base port that depends on the data format.

Table 1 shows the Linrad data formats and offsets used in the Linrad network.

Format Offset Description RAW16 0 Raw data in 16 bit format. RAW18 1 Raw data in 18 bit format. RAW24 2 Raw data in 24 bit format. FFT1 3 Fourier transforms in float format, the output of fft1. TIMF2 4 The output from the noise-blanker 16/32 bit int/float. FFT2 5 Fourier transforms, the output of fft2 16/32 bit int/float. BASEB 6 Baseband, resampled, in 16 bit format. BASEBRAW 7 Baseband in 24 bit format.
Table 1. The different formats used in the Linrad network and their port offsets from the base port.

A single Linrad program can send all these formats simultaneously to the network.

All the network formats can be used as the input to Linrad and thereby allow several operators to listen simultaneously to the same receiver/antenna. The network can also be used to distribute the processing between several computers. A computer with network input can send the output of later processing stages to the network for other computers to process. It will then use the same base port as the one used for the input, but it must be given another group address.

Raw data formats.

It is possible to run many instances of Linrad simultaneously on the same computer when using X11 or Windows. Figure 1 shows four instances of Linrad on a Pentium IV running a single audio channel at a sampling speed of 96 kHz. One is as a master using a modified Delta 44 soundcard for input while the other three use the different raw data formats of the network.

Fig 1. Four instances of Linrad running simultaneously under X11 on a Pentium IV computer. The upper left waterfall is generated by the master which reads 24 bit data from a modified Delta 44 soundcard with nothing connected to its input. The slanted lines are from a function generator that produces a sweeping sinewave. It is coupled magnetically to the soundcard and the level is set for a weak signal. The upper right waterfall is generated by a slave using the 24 bit signal from the network. It is identical to the master waterfall. The lower left is generated from the 18 bit network data. A small degradation is visible. The lower right is generated from the 16 bit data and it is obvious that S/N is degraded significantly.

When a 10 V p-p signal (3.53V RMS) is applied to the input, the dB scale reads 119.2 dB. With all 24 bits in use, the level in a 10.0 kHz bandwidth is 19.0 dB which means that the noise voltage at the input is 340 nV in a bandwidth of 1 Hz. Since the thermal noise in 10 k ohm is 12.6 nV the noise figure (referenced to 10 k) for the soundcard in this experiment is 24.3 dB.

The 18 bit data format which was introduced to make the saving of raw data files possible on the Pentium III computer that war used in the early phases of Linrad development causes a degradation of the noise figure by 0.2 dB. This is a perfectly acceptable loss of dynamic range for a 25% reduction of file sizes. It is obviously perfectly adequate for use in a networked system.

The 16 bit format is 11% smaller than the 18 bit format but the associated dynamic range loss is 3 dB. It is perfectly ok to use it for network or disk storage, but it requires 3 dB more system gain for the same system noise figure and therefore saturation on strong signals will occur 3 dB earlier. In most situations this is perfectly OK.

The fft1 format.

The first FFT has to use floating point arithmetics and may be the dominating load for the CPU. By sending transforms rather than the raw data it may be possible to use old computers as slaves on the network.

The network itself is a heavy load to old computers however so receiving all the bits via the ethernet interface might be too much and then it does not help that most of the processing is done already. The number of bytes that have to be transferred for the first FFT is four for each sample from the soundcard multiplied by a factor that depends on how much the transforms overlap. A Delta 44 that samples two RF channels at 96 kHz in complex format (I and Q) reads 96000*4=384000 samples/second. If no window is used the data rate for transferring fft1 over the network then is 1.536 MB/s or 12.3 megabit/s. Such a rate is close to the limit for a Pentium processor at 133MHz. It is actually possible to use one as a slave but one has to make waterfalls small and averaging on spectra reasonably large to not use too much cpu time on the graphics. The audio output would have to use a low sampling speed. One has to set a large bandwidth reduction for the first mixer in order to have a low load from the baseband and disable the second fft.

Without windows the dynamic range becomes lower but the effect is not severe when large transforms are used. With a sine squared window the fft1 data rate is twice as high as without a window and using a Pentium 133 MHz as a slave is then impossible. A 200 MHz Pentium MMX can be used as the slave in this case, but only without the second fft and with low load from graphics and output processing.

On a 800 MHz Pentium III it does not matter much what format one selects for the network. Table 2 shows some timing information.

CPU load Data rate Input Format (%) (MB/s) Delta44 16bit 10.2 0.768 Delta44 32bit 10.7 1.536 Network RAW16 11.2 0.768 Network RAW18 13.2 0.864 Network RAW24 12.9 1.536 Network FFT1 10.0 3.688
Table 1. Timings for Linrad on a 800 MHz Pentium III with standard parameters for the WSE converters and a Delta44 soundcard. FFT1 bandwidth = 100 Hz, window = sin3 and fft1 version =5 (SIMD). For computers of this generation and later the CPU power is not a limiting factor when running Linrad in terminal mode. The table shows that the network is not a limiting factor either. When running Linrad as a master on 32 bit input while sending fft1 data to the output the CPU load increases from 10.7% to 19.2%.

The timf2 format.

The second time domain signal in Linrad is the full bandwidth output of the noise blanked data. This format is intended for input to other software that might need a wideband noise blanker. One example is MAP65, a wideband JT65 decoder under work by K1JT.

Linrad can not use this format as input. The reason is that strong signals are treated differently depending on whether they are the desired signal or not. In a JT65 decoder, the strong signals will not be interesting and the way they will become distorted by the selective AGC that affects all strong signals which the master computer regards as not interesting should not destroy readability. For SSB voice signals it is different however and for Linrad there is no reason to have the noise blanker in the master computer.

The fft2 format.

The output of the second FFT will normally fit in much less than 16 bits because of the selective AGC and the noise pulse removal of the blankers. These transforms can therefore be transfered to other computers and stored for use in separate software. With two RF channels of 96 kHz bandwidth the data rate is 1.5MB/s with a sin2 window.

One intended usage is for a separate program zoom by which one can zoom in or out on waterfall spectra that contain all the information from the latest hour or so. One hour of data would require 5.4 gigabytes of storage if all 16 bits were retained. It should be enough to save 8 bits and storage can be on the hard disk because it will be ok if moving focus takes a little time. Optimum bandwidths for the second FFT may range from a couple of millihertz up to maybe 10 Hz depending on the interests of the user. With only 1000 pixels on the screen and say 5 pixels over the resolution bandwidth the usefullness of a zoom tool is obvious.

The basebraw format.

This format is by default used to send the output from the baseband filter as input to one or more other instances of Linrad. The sampling rate is reduced by aa power of two with respect to the sampling rate of the hardware. Linrad changes the sampling rate on the fly when the baseband bandwidth is changed so DO NOT CHANGE THE BANDWIDTH WHEN SLAVES ARE RUNNUNG ON THE BASEBAND RAW SIGNAL The slaves would malfunction.

The basebraw format can be set to transmit detector or decoder output. The file options.h can be used to send various other signals in the basebraw format. Currently various signals from the FM detector and stereo decoder can be transmitted. More about the basebraw options here: A splatter killer for wideband FM

In a two channel system a master instance of Linrad can send the input as raw data to many slaves and the different instances of Linrad can then process the data with different settings for fixed polarization. The different instances can then send the baseband via network or as audio output to single channel decoders for various digital decoders. In this way a computer system can act as many receivers each one with its own decoder where the receivers are connected to different antennas having different polarization or different patterns depending on the real antennas in use.

For use with multiple decoders the basebraw format would save CPU resources. Figure 2 shows a master instance of Linrad operating with two channels at 96 kHz as input. A frequency range of about 15kHz is selected with the baseband filter. The master is set to send basebraw to the network which in this case produces a signal with a sampling rate of 24 kHz. Four slaves receive the baseband signal with different fixed polarizations.

Fig 2. Four slaves receiving thre differently polarized signals. Note the different signal levels in the baseband windows of the slaves.

The polarizations in figure 2 are set to H, V, RC and +45. It would be possible to use more slaves to set fixed polarizations at 33 or 22.5 degree stepping as well as all sorts of elliptical polarization. This kind of arrangement could be useful with cross yagis on VHF as well as HF.

When the two antennas are similar but physically separated, the polarization control has a different meaning. With the angle set to 45 degrees (same gain for both channels) one can turn the lobe in azimuth with the phase control. By use of both controls one could place a null on some interference source and perhaps find an advantage in using another instance at the same time with a null on another interference source.

To SM 5 BSZ Main Page