This page is under more or less continuous development as Leif SM5BSZ releases
new versions of Linrad, and as I learn more about how to use Linrad.
The notes below were originally written in April 2008, when Linrad was in version 2.43.
I am currently using Linrad version 3.37 with a network feed to either MAP65-IQ or MAP65v2 running on the same computer.
The notes below carry no stamp of authority or guarantee of
Errors of detail are inevitable, and there may well be some substantial errors of understanding.
They represent the present status of one person's journey towards understanding and knowledge.
Since this page represents a resource for myself just as much as for others, errors will be corrected promptly as they come to light.
Please let me know if you find these notes useful (or not).
I have chosen to use Linrad's Normal mode. Two other modes are available - Beginners and Expert.
Font Scale determines the size of printed symbols on the screen.
Larger symbols take up more screen space, so unless you have serious difficulty reading normal text set the Font Scale to 1 (smallest). Allowed range is 1-5.
Process Priority. Linrad has to process significant amounts of data more or less in real time, or its buffers will overflow. Most users will be running other programs on the same computer (such as MAP65-IQ), and it is important that Linrad has immediate access to the CPU when necessary. The higher priority options available to programs running under under Windows are Normal (0), AboveNormal (1), High (2), and Realtime (3). Experience has shown that the most suitable choice so as to avoid Linrad crashes is AboveNormal (1).
Number of Blocked Processors. Linrad is now a multi-threaded program, able to make full use of more than one processor core. It is possible to block access by Linrad to one or more cores to enable another program (possibly MAP65-IQ or a second instance of Linrad itself) to obtain adequate resources. My computer has 2 cores. I have tried both 0 and 1 for this parameter, but have found no adverse effects from setting it to zero.
Percentage of Screen Width. If you want to use Linrad with a wide
bandwidth spectral display, such as 100kHz or even more, then you need as big a
screen as possible, such as 1280x1024 pixels, or wider.
The program tends to overfill such a screen slightly, so experiment with numbers in the range 80 to 95%. I find that 95% works well for me.
Percentage of Screen Height. The same figure as for Screen Width is not necessarily optimal. I find that 92% works best for me.
CIC2 Decimation, CIC5 Decimation and RCF Decimation.
These parameters are discussed in more detail above. Spend a little time experimenting with the total decimation factor, so as to get the required flat spectral range in the main spectrum window, and the scale points which best help you to read the frequency easily.
Then find the separate decimations which best achieve your required total, and which meet the criteria discussed by Leif in the message archive referred to above.
Note that if you enter the 20 or so parameters in the main Input Parameter Screen below, and then change any of the Decimations, you will be prompted to renter all the Input Parameters again, and Linrad will revert to the standard defaults for these rather than remember your previous settings.
If you are using Linrad as a feed into MAP65-IQ, then these parameters must give a combined decimation of 700, making the Linrad Clock Rate equal to 66.666667MHz/700 = 95238Hz. Joe K1JT recommends values of 10, 10, 7 respectively.
RCF Output Shift is used to select which 16 bits (of the 23 bits sampled
by the SDR-IQ) will be sent by the USB to Linrad. As discussed above it is best
to run the SDR-IQ hard so as to minimize the effect of the quantization noise in
the SDR-IQ. Use the RCF Output Shift to set the right signal level for Linrad,
namely a noise floor of about 20 to 25dB in the main spectrum.
This is preferable to reducing the gain of the SDR-IQ with the Linrad input attenuator.
The best value of the RCF Output Shift for the SDR-IQ appears to be 5 or 6; this sets the maximum signal before overload (red light) of the SDR-IQ approximately equal to the input overload point of Linrad (test with Amplitude Margins 'A').
Sampling Clock Shift allows the user to correct for sampling rate errors
in the SDR-IQ receiver. The nominal sampling rate is 66.666667MHz, but the
actual value will almost certainly differ slightly from this, and will also
drift a bit with temperature. When first setting up Linrad, use a value of
0Hz for the Sampling Clock Shift, but once Linrad is running you can measure any
error by checking the Linrad displayed frequency for an accurate reference
frequency. Suppose the reference frequency is 28.125000MHz and that Linrad reads
Scale the correction from 28MHz up to the nominal clock frequency of 66.7MHz : 335Hz / 28.125 * 66.666667 = 794Hz.
Enter the correction in the Linrad setup for the SDR-IQ as -794 Hz. So enter the correction negative if Linrad reads high, and positive if Linrad reads low.
Don't agonize over one or two Hz, the SDR-IQ will drift a bit anyway. I actually entered -800Hz, but have since corrected this to -1000Hz.
Attenuation below which to use 10dB. This is the value of the Linrad
Input Attenuator at which the -10dB SDR-IQ fixed input attenuator is activated.
If you set this to, say, 15, then for Linrad Input attenuations from 0 to -14dB the -10dB attenuator will not be used, but from -15dB down it will be switched in automatically.
For 144MHz EME where the background noise is low, it is probably best to set this to 25 (so that the attenuator is OUT of circuit all the time),
unless you really have lots of signal to spare into the SDR-IQ, which is unlikely.
On the other hand for operation on 7MHz with a much higher noise level, you will probably want to use a setting of 10 (attenuator IN circuit from a Linrad setting of -10dB down).
Output Device. You may not have any choice here, depending on your
hardware and other
Before I obtained an SDR-IQ receiver, I wanted to be able to run the audio output of Linrad into the WSJT program running on the same computer, and WSJT has to be able to output its tones to the sound card for modulating the transmitter.
The solution to this dilemma is to use a program like Virtual Audio Cable (VAC) to connect the 2 programs, and to direct the output of Linrad into the VAC, which appears as a second Output Device. Likewise WSJT is directed to take its input from the VAC.
Linrad will also prompt for the Maximum DMA Rate. If you are using an SDR-IQ the value set here is not very important, since the DMA rate is fixed by the SDR-IQ. However if you use the Linrad output, then the Max DMA Rate parameter will limit the interrupt rate for the output. The output write buffers will not become smaller than specified by this parameter. The output block sizes are also set so as not to increase the time delay through Linrad significantly; so if for example one of the FFTs is set for a narrow bandwidth such as 5Hz, then the DMA rate will never exceed some corresponding low value around 20Hz.
Format should be set to TIMF2 for output to MAP65-IQ. The baseport should be set to 50020, as opposed to 50000 for MAP65.
A separate version of the Linrad Parameters is maintained for each operating
mode: CW, SSB etc, since the optimum values will differ between different modes.
There are a number of differences between the modes, for example the frequency displayed in the baseband window is the centre of the audio filter for all modes except SSB.
For SSB the BFO frequency is displayed since this corresponds to the carrier insertion frequency.
You should use SSB as your main mode for JT65.
If you want a test setup for trying out the effects of parameter value changes without losing your original set of values, then it is best to set up a completely separate version of Linrad in a different directory.
The 20-odd parameters are input in blocks of a few related parameters at a time, allowing you to play with them to see their effect before moving on to the next block.
1st FFT Bandwidth. The narrower the resolution bandwidth of the first FFT, the more
points are required in the transform and the longer the computational time.
Leif has written that there is no point in setting too narrow a resolution bandwidth for the first FFT if the second FFT is enabled.
When running Linrad at wide total bandwidths the first FFT is used only to separate out very strong signals so that the noise blanker can operate properly.
For this purpose there is no reason to use an FFT with much narrower resolution bandwidth than the strong signal. This means that the size of the first FFT is typically 1024 or 2048 points.
Because the FFT size is an exact power of 2, you will not get exactly the bandwidth for which you ask, but rather the closest value which corresponds to an allowed FFT size.
For no windowing function the resolution bandwidth is the reciprocal of the total
the FFT block,
so at a sampling rate of 95.238kHz (my value) an FFT of 2048 points gives a bandwidth of 46.5Hz.
In other words the resolution bandwidth is equal to the sampling rate divided by the number of FFT points.
With a windowing function the resolution bandwidth will become larger as the power of sine
is increased, but the binwidth will remain unchanged.
For large bandwidths like 100Hz or 200Hz a higher order window should be used. The resolution bandwidth is then equal to the reciprocal of the time between the 6dB points of the FFT window function.
1st FFT Window (power of sine). The calculation of an FFT assumes that
the block of sample values is repeated identically for ever. If the samples do
not fall to zero at the two ends of the sample block, a phenomenon called
leakage occurs, which leads to errors in the transform space (in this case the
spectral components). This effect can be corrected by the use of a "window"
which is applied to the samples so as to taper the values to zero at both ends
of the block; a corresponding correction is then applied after the transform to
restore the spectrum to more or less its correct form. There are many different
window functions in common use, but Linrad uses powers of a half-sine wave. As
the power is increased, so the taper at the block ends is flatter, and the
spectrum is more accurate with lower side lobes. One by-product of this is that the effective number of
points in the transform is reduced, and so the bandwidth of the transform is increased.
The factors by which the bandwidth is increased are 1.5, 2.0, 2.4, 2.75 and 3.05 for sine powers of 1, 2, 3, 4, 5 respectively.
For example with my sample rate of 95.238kHz, the bandwidth for an FFT with 2048 points is:
46.5Hz for power 0 (no window), 70Hz for power 1, 93Hz for power 2, 112Hz for power 3, 128Hz for power 4, and 142Hz for power 5.
Clearly you will need more points in the FFT to achieve the same bandwidth for a window of higher power, and therefore more computational time.
Better (higher order) windows also give greater dynamic range (suppression of spurious signals) but they do use more processing time.
Note that the 16-bit MMX routine for the 1st Backwards FFT loses one bit of precision if the window for the 1st FFT is not 0 or 2; so a power of 2 should always be chosen for the 1st FFT window in this case.
Linrad offers two other window options:
option 8: a Gaussian window of bandwidth 233Hz (for 2048 points), and
option 9 (the default): a "flattish" window of bandwidth 124Hz (for 2048 points).
1st Forward FFT version. There are various implementations available for
the FFT algorithm.
For example the calculations can be done with integer rather than floating point arithmetic, or by using the fast MMX or SIMD instructions if these are available on your computer.
The FFT version refers to these various options, though the FFT1 version numbers are all for different floating point implementations.
You can check the time taken by FFT1 for each version by using the toggle 'T' on the main Linrad screen.
I understand that on a single channel system the choice is not very important, but with 2 channels the SIMD instructions (version 5) are significantly faster.
However version 5 is inefficient for single channel systems, and is therefore not an available option.
1st FFT Storage Time (s). The storage time affects the maximum averaging time possible for the 1st FFT. Subject to available memory 4 to 5s should be enough.
1st FFT Amplitude. As a last resort the value of the 1st FFT Amplitude
can be used as a gain control to reduce the noise floor in the main spectrum to
around 20 to 25dB, but as Leif has said this is bad for system dynamic range.
It is much better to control the gain earlier in the chain, preferably with the RCF Output Shift. So the amplitude of the 1st FFT is best left at its default value of 1000.
Main Waterfall Saturation Limit. This parameter is used to make the main
waterfall black during transmit in case of leakage of the transmit signal into
the receive system. The value you set is the percentage of saturated (white)
pixels which must be exceeded to trigger blanking.
The correct value to use can be quite tricky to find! It must be large enough that strong (white) birdies in the waterfall do not cause black blanking bars across the waterfall, yet small enough that the transmit leakage can trigger the blanking.
Experiment to find a suitable value. I have found that a value as low as 5 is necessary for waterfall blanking to occur during transmit. Zero inhibits blanking.
Enable Correlation Spectrum. This only applies when you have 2 independent input channels such as from H and V antennas. Enter 0 for a single channel system.
Enable 2nd FFT. For a wideband system, you need the second FFT to get enough resolution, so enter 1 for yes.
1st Backward FFT Version. Leif has recommended version 1 (16-bit integer arithmetic using MMX instructions) as faster, but also more critical in that there are more places where quantization noise can enter unless the digital signal levels are set correctly. A floating point implementation (version 0) is something like 3 times slower, but more forgiving.
Selective Limiter Maximum Level controls the maximum permitted amplitude
in a single FFT1 frequency bin, and should ideally be set to 4000 or less in order to
avoid the possibility of FFT2 saturation from a strong and stable carrier. Such signals are
unlikely in practice, and in their absence a larger value will make the
waterfall diagram give a better representation of strong signals.
Another problem with too low a value of the Selective Limiter Maximum Level is that under conditions of high noise level such as power line interference it may not be possible to set the 2 selective limiters high enough to prevent the whole main spectrum (except that part actually selected) from turning Red, in which case the Noise Blankers will not function correctly.
It is the FFT2 to FFT1 size ratio that creates the risk of overflows, but when the FFT2 size is very large, the risk of a signal being stable enough to put all its power into a single bin becomes very small.
The default value of 6000 is probably best, and in the event of overflow problems the size of FFT1 should be increased.
1st Backward FFT Attenuation N
Use this parameter to set the timf2 Strong and Timf2 Weak margins - press A to see the amplitude margin information.
Avoid setting too large a margin or not enough bits will be used for the timf2 signals.
This parameter is particularly useful for setting the optimum level of timf2 signal into MAP65-IQ. Joe K1JT has suggested a signal level of 5dB in the MAP65-IQ box, though this is not at all critical. Set the Network Attenuator (bottom left of High Resolution Graph, centre one of 3 boxes) to 7dB (half scale), and then adjust the 1st Backward FFT Attenuation to give approximately a 5dB signal level. The value of the 1st Backward FFT Attenuation is a power of 2, so each step is about 6dB. Then use the Network attenuator for fine adjustments.
2nd FFT Bandwidth Factor (power of 2) determines the factor by which the
FFT2 resolution bandwidth is less than the FFT1 resolution bandwidth.
As a consequence it determines the horizontal (frequency) scale of the High Resolution spectrum, which is 1 pixel per FFT2 resolution bandwidth (FFT2 bin size).
For example if the FFT1 bandwidth is exactly 100Hz, then a value of 3 will give an FFT2 bandwidth of 12.5Hz (100/2^3), and a value of 4 will give an FFT2 bandwidth of 6.25Hz (100/2^4).
However, unless you happen to be using the same window function for FFT2 as you used for FFT1, you are unlikely to get exactly the Bandwidth Factor for which you asked.
This is because the FFT size must always be an exact power of 2, so Linrad selects the closest Bandwidth Factor that gives such an allowed size for FFT2.
2nd FFT Window (power of sine). Leif has recommended a value of 1 or
according to the application.
For a large size of FFT2 (to get a narrow resolution bandwidth) the processing time required for a higher order window is prohibitive.
2nd Forward FFT Version. As previously choose the fastest version on your
computer, possibly version 2 (16-bit integer arithmetic). Version 0 is floating
Strictly as a test that the signal levels are correct for version 2, Leif suggests temporarily setting BOTH the 1st Backward FFT version (above) and the 2nd Forward FFT version to 0 (32-bit floating point arithmetic),
which is 3-times slower but with levels which are not at all critical and can be used without error on strong test signals and pulses.
2nd Forward FFT Attenuation N
The second FFT gain is controlled in the same way as in the first backwards FFT.
Set this parameter to get a reasonable margin for FFT2 - press A on the normal screen to see the margin.
2nd FFT Storage Time (s). The storage time affects the maximum averaging time possible for the 2nd FFT. The default value of 5s is probably suitable.
Enable AFC/Spur/Decode. AFC should not be used for SSB.
The AFC function is particularly powerful on CW, being able to track a JT65 sync tone which is drifting too fast for WSJT to sync onto it.
A value of 1 gives you manual control of spur cancellation by clicking on each spur and pressing E to Eliminate that spur. Typing C Clears the spur elimination table, which seems to be the only way to restore a spur eliminated in error.
A value of 2 invokes automatic spur elimination, which can then be turned on (yellow) and off (blue) by clicking a box at the top right of the main (wide) waterfall.
AFC Lock Range.
The default value of 150Hz seems to be fine.
AFC Maximum Drift.
The default value of 100Hz/minute is probably ok.
Enable Morse Decoding.
Leave this at zero; morse decoding is still under development.
Maximum Number of Spurs to Cancel.
Spur cancellation is very efficient in terms of CPU usage, so there is little penalty in setting this number quite high.
My own experience is that with the automatic spur cancellation setting, Linrad usually finds between 10 and 20 spurs to cancel in a 60khz bandwidth on 144MHz. Leif has suggested a setting of 100 spurs as appropriate.
Spur Time Constant.
Spur cancellation requires that the spur is coherent over at least 4 transforms - FFT2 if this is activated. The FFT2 transform rate is equal to the FFT2 resolution bandwidth (5 Hz in my case).
You can therefore improve the cancellation of unstable spurs by widening the FFT2 resolution bandwidth (smaller FFT2 size), but the FFT2 resolution bandwidth is likely to be determined in practice by other more important factors.
So for an FFT2 resolution bandwidth of 5Hz spurs will only be removed if they are coherent over a time of at least 0.8s.
Setting the spur time constant to less than 8 (units of 0.1s) does not achieve anything, though it seems to do no harm either. A value greater than 8 will presumably limit removal to spurs which remain coherent over this longer time.
1st Mixer BW Reduction (power of 2) is quite different from the FFT2
bandwidth reduction discussed above.
Instead it is analogous to a decimation stage in the SDR-IQ, in which the sample rate is reduced by some factor, and the total bandwidth falls by the same factor.
In this case the mixing process (with an internal digital oscillator of the same frequency) is from the FFT2 output down to baseband (audio).
For example, suppose the 1st Mixer Bandwidth Reduction Factor is 2^4, and the original sample rate in FFT1 and FFT2 is 95.238kHz.
Then after mixing, the baseband sample rate (and total baseband bandwidth) is 95.238kHz/2^4 = 5952Hz. Actually it will be somewhat narrower than this due to FFT3 windowing.
The baseband resolution depends on the total baseband bandwidth but also on the number of points in FFT3 (set on-screen).
However the minimum allowed size of FFT3 depends on the number of pixels across the baseband window - the Linrad baseband display is set to show an integer number of pixels per bin.
For 512 (2^9) points we would have a resolution of 6015/2^9 = 11.7Hz.
If the baseband window is any wider than 512 pixels, Linrad will increase the FFT3 size to 1024 (2^10) points with a resolution bandwidth of 5.9Hz, and so the frequency span across the baseband window will be narrower.
You can however expand the frequency scale of the baseband display to give more than one pixel per bin, and then reduce the FFT3 size to, say 2^8.
Obviously if you are using Linrad for CW, your choice of 1st Mixer Bandwidth Reduction Factor and FFT3 size will be quite different from values suitable for SSB or JT65.
1st Mixer Number of Channels. It is possible to select secondary mixer
These channels are intended to be processed in the same way as the main channel but they will not be routed to the loudspeaker.
The secondary channels are intended to be useful when the automatic implementation of morse code to text is in place. Set this parameter to 1.
3rd FFT Window (power of sine). See comments for 1st FFT window above. A value of 2 is usually suitable.
Baseband Storage Time (s) is the time span over which the filtered baseband signal is saved.
This is the time over which coherent averaging will search for matching keying sequences. (Some day hopefully....)
Output Delay Margin (ms). The processing delay through Linrad is not
entirely predictable, and Windows may sometimes add further delays by choosing
to give priority to some of its own tasks.
For these reasons an additional Output Delay Margin should be set as a buffer to accommodate processing delays greater than those expected by Linrad.
It is obviously unwise to set this higher than really necessary, since the audio output would be correspondingly delayed.
Press T to get timing information while receiving. If the D/A MIN value becomes zero then the selected value is too small.
It is a good idea to set a large value like 1000ms initially for testing, note the lowest value of D/A MIN after a minute or two, and then reduce the value so that D/A MIN sits around 0.100s.
In case Linrad is used for QSK CW with small FFTs throughout, D/A MIN should sit at around 5ms, in which case the delay from antenna to loudspeaker can be as low as 15ms or so if you use Portaudio under Windows with ASIO, WDM-KS or WASAPI drivers.
Output Sampling Speed (Hz)
If you are using an SDR-IQ for input via the USB port, then there is no conflict between A/D (input) and D/A (output) sample rates. It is best to select a speed that is actually supported in hardware.
My onboard sound samples at 48kHz, so I have chosen to use 48kHz for audio output.
Default Output Mode. There is a line of blue boxes at the bottom of the
baseband spectrum, which are used to invoke audio expansion and coherent
If you make use of these, then set the Default Output Mode to the value at the right hand end of the row of boxes, so as to turn on your favourite settings automatically at switch-on.
Otherwise use the default value of 1 for this parameter.
Audio Expander Exponent. This exponent is used to determine
the curvature of the expander when the "Exp" option is selected in the
left hand blue box below
the baseband graph.
The amplitude expander is intended to be used for CW at narrow bandwidths below about 25Hz where the human ear can no longer hear frequency differences,
causing both signal and noise to be perceived as a single tone with constant frequency and varying amplitude.
Human hearing is not designed to distinguish well between small amplitude variations of a single tone because of the logarithmic nature of the ear's amplitude response.
The exponential expansion compensates for the logarithmic response and makes decoding of extremely weak signals by ear possible for long times without fatigue.
Baseband Waterfall Saturate Limit. This is used in the same way as the Main Waterfall Saturate Limit in Block 1 above.
There are a bewildering number of these! For JT65
reception one of the more important is the number of Waterfall averages (bottom
left corner of the wide waterfall window), because the value of this directly
affects the visibility of weak JT65 signals.
The waterfall is driven by the FFT2 output, so the time to generate each line depends on the duration of each FFT2 transform. This time is simply the reciprocal of the FFT2 bandwidth, so for a BW of 5.8Hz, the time is 1/5.8Hz = 0.17s.
Averaging a number of waterfall lines before printing to the screen reduces the background noise, making a weak signal more visible. However you want to have enough printed waterfall lines to see a signal during a single transmit period of around 49s.
Leif has often recommended a time of 10s between printed lines, giving 5 printed lines per transmission and the number of waterfall averages set to 10s/0.17s = 59, so choose 60.
I actually use a time of 8.5s per printed line, giving about 6 printed lines per transmission and the number of waterfall averages set to 8.5s/0.17s = 50.