SM 5 BSZ - Linux pc radio, setting signal levels in the time domain.
(Mar 27 2001)
All graphs on this page use the Delta 44 board with a direct conversion configuration sampling at 96 kHz for 90kHz bandwidth. All graphs have the size of the first fft = 2048 with a sin to power 3 window.

The entire signal path should have well selected signal levels

The Linux PC radio differs from no other radio receiver in its need to have properly selected signal levels in each stage of the processing.

The point to start from when deciding what signal levels to use is the noise floor of the A/D converter. as described in ossmix for A/D setup the first step is to set the sound mixer for the highest possible gain that will not degrade the noise floor.

Once the mixer gain is set, use the "F = HARDWARE TEST MODE" of the main menu to find out how much signal you have to feed to the A/D board to make it saturate.

The A/D converter may saturate before one expects. My Soundblaster PCI saturates at about 23000, 2.5dB below the 32767 one would expect from a 16 bit board. The Vibra16 boards go nicely all the way up to 32767 but they have a higher noise floor and more spurs compared to the PCI board so they are not better.

Once you know the voltage at which your A/D converter saturates you know how large voltages you have to design the last analog amplifier for. It will typically be in the range 4 to 10 volts peak to peak. The last analog amplifier must deliver its signal with very low distortion. At full amplitude one wants the harmonics to be suppressed by over 100dB maybe not possible, but it is a good idea to use a very good op-amp.

How to select gain for the stages preceding the A/D converter is standard analog technology. Add stages one by one backwards towards the antenna and do never use so moch gain that the noise floor is degraded unless you fail to make the stage that supplies the input deliver enough signal to use the full range of the A/D.

The digital processing following the A/D converter does not usually require much consideration for signal levels. The Linux dsp package presented here is different and far more complex than conventional programs. The signal is brought back and forth between the time domain and the frequency domain, in the time critical step using only 16 bit arithmetics and therefore some care has to be taken. Of course it will be possible for the program to use optimum settings that depend on the hardware and the processing parameters selected by the user. At the present time I do not know what rules to apply.

The main spectrum zero level

The noise floor of the main spectrum should be somewhere near 0dB when no signal is fed into the sound board. It is possible to adjust this level by use of the parameter "First FFT amplitude". The default value is 1000 and the parameter is linear in voltage so changing it to 500 will reduce digital signal levels by 6dB.

When using the PC radio for weak signal communication like EME the noise floor should be somewhere around 20dB when antenna and preamplifiers are connected. It is essential that the noise floor is lowered by at least 15dB when the DC feed voltage to the first transistor nearest the antenna is disconnected. This test should be done with the antenna pointing towards quiet sky!!

Personally I bother about very small improvements so I require the noise floor to drop by 20dB when disconnecting the first transistor feed voltage.

Signal levels out from the selective limiter

In case second fft is not enabled all processing is done with floating point arithmetics and there are no adjustments to worry about.

Enabling the second fft means that the signal from the first fft which is available in the frequency domain is split in two groups. One group contains all strong sine wave like signals, everything that causes high peaks in the spectrum. The other group is everything else. The two groups of spectral bins are then separately back transformed to the time domain using 16 bit arithmetics.

Obviously one wants the gain to be high enough to make the noise floor high above 1 bit. At the same time it is essential to make sure no saturation happens. The gain of the back transformation from fft1 to timf2 is adjusted by how many of the back fft loops that contain a right shift (divide by two). The number of low gain loops is set by the parameter "First backward FFT att. N". With this parameter set to a value N the signals are attenuated by two to power N in voltage or N*6dB

Figure 1 shows the screen with a strong pulse interference source. The timf2 oscilloscope function is enabled and the pulse hight is about 200 pixels causing the noise floor to be lifted by over 40dB. For this figure the attenuation N in the fft1 to timf2 transformation is 9 (54dB). The margin to saturation in the weak signal component of timf2 is 31.3dB as shown by the numbers in the lower left corner. (Press A to show Amplitude margins) These pulses are 28.12 respectively 28.32 dB below saturation of the A/D converter for I and Q of rx channel 1 (rx channel 2 has no signal)

It is obvious that a lower value for the fft1 to timf2 attenuation will cause timf2 to saturate before the A/D converter. Setting the N value 6 is reasonable, then timf2 will saturate 15dB before the A/D converter for perfectly shaped pulses. fig. 2 shows a screen dump with att N=6, 18 dB higher signal levels compared to fig. 1.



Fig 1. Noise pulses 28dB below saturation of the A/D converter are 31dB below saturation for timf2 when max attenuation is selected for the fft1 to timf2 transformation.


Fig 2. Noise pulses 28dB below saturation of the A/D converter are 18dB below saturation for timf2 when 3 steps less attenuation is selected for the fft1 to timf2 transformation compared to fig.1.
The timf2 margins have to be studied with the noise blankers disabled. Fig. 3. has identical settings compared to fig.2 but it has noise blankers and timf2 oscilloscope enabled. The peak signal level in the weak signal part of timf2 has dropped by 46dB because of the action of the noise blanker. The peak level is only 5dB higher compared to channel 2 where no pulses are injected. As can be seen from the baseband graph the rms voltage differs by only 1 dB between the channels. The noise blanker really removes pure pulse interferences very efficiently! The timf2 oscilloscope shows pulse amplitudes around 10 pixels to compare with the original near 2000 (200 plus 18dB) also this way a reduction of peak amplitudes around 46 dB is indicated.



Fig 3. Noise pulses 28dB below saturation of the A/D converter are 18dB below saturation for timf2 when 3 steps less attenuation is selected for the fft1 to timf2 transformation compared to fig.1.
The pulse test in figures 1 to 3 indicate that the attenuation N should be at least 5, preferrably larger, but not larger than 8. Note that the optimum size of att. N depends on the size of the first fft and what window was used. It is also depending on input mode, analog filter characteristics and many other things.

To investigate the maximum permitted att. N from a noise floor degradation point of view a weak signal was connected to channel 1. Figure 4 shows the screen with att. N = 0 causing a very strong signal in timf2 ensuring that quantization noise is absent. As a contrast fig.5 uses maximum attenuation with N=9.



Fig 4. Weak signal with no attenuation in the fft1 to timf2 transformation.


Fig 5. Weak signal with max attenuation (54dB) in the fft1 to timf2 transformation.
When comparing figures 4 and 5 the first observation is that the main spectrum, fft1 is identical. This is of course expected since the signal is the same. The waterfall, and high resolution graphs, fft2 as well as the baseband graph, fft3 show a 6dB S/N degradation. This means that the maximum attenuation one should use is 7 (42dB). Fig.6 shows how the screen looks then. The S/N degradation from fig. 4 to fig. 6 is very small. Note that the noise floor belonging to the preamplifier will be placed about 15dB above the noise floor in these figures causing the effect of quantization noise visible as a small difference between figures 4 and 6 to disappear completely.



Fig 6. Weak signal with att. N=7 (42dB) in the fft1 to timf2 transformation.

Real life parameter adjustment

There is no reason to study timf2 in detail to select the optimum value for "First backward FFT att. N". Just press A and watch the margin for "timf2 St" and "timf2 Wk". The figures on this page show incorrectly timf1 in this position. With dsp00-14 and later the correct text timf2 is printed There is no need to use larger value for att. N than required to prevent saturation of timf2. Fig 7 shows a recording from 7MHz in which the largest value has been collected for about 5 minutes. The value for fft1 to timf2 attenuation was 5 (30dB) The channel 2 antenna gives about 20dB more signal and consequently the margins are smallest in channel 2. There is a 6dB margin although with the noise floor at 40dB for channel 2 a 20 dB attenuator between the antenna and the receiver would be appropriate and would give around 23 dB margin in both channels. Without any S/N degradation one can increase the att. N to 7 as deduced from the graphs above so the headroom is in the order of 30dB for typical 7MHz signals so it does not seem to be difficult to avoid the 16bit arithmetics causing system degradation.



Fig 7. A 10 minute recording from 7MHz. The Amplitude margins show the strongest data point over the entire time expressed as dB below saturation (Z to clear). The two antennas are very different and produce different signal levels in the two receiver channels.