Hardware and raw data.The calibration pulses are contained in http://www.sm5bsz.com/linuxdsp/flat/cal2/blankerinit2.raw (50Hz, 6 341 753 bytes) To study the influence of the pulse repetition rate you might want to download one of these files http://www.sm5bsz.com/linuxdsp/flat/cal2/blankerinit4.raw (5Hz, 6 106 745 bytes) or http://www.sm5bsz.com/linuxdsp/flat/cal2/blankerinit5.raw (400Hz, 6 226 553 bytes). These file were recorded with the WSE converters and a Delta 44 soundcard. The calibration pulses is the square wave TTL output from a function generator (Escort EGC 2230) which was connected directly to the RXHFA input which was set to +10 dB gain at 3.6 MHz.To do the calibration procedure from one of the three files above, place the file in a directory /demo if you run under Linux or in a directory c:\demo if you run under Windows. Then place a file adfile or adfile.txt in the directory from where you launch Linrad. Use one of these files adfile for Linux or adfile.txt for Windows depending on the OS you are using. You also have to create a subdirectory par under demo. This is where Linrad will place the parameter files for this recording as specified in adfile. Running for the first timePress 3 to select one of the files you have in your demo directory. When running for the first time Linrad will prompt for the receive mode to use. Select any mode, i.e. Normal CW. You must then answer Y to the question Repeat recording endlessly because Linrad will read from the file at 96000 samples per second while you set filter parameters and Linrad will hang in the calibration routine if end of file is reached.Linrad will remember your choices in the file blnkini_2 under the par subdirectory under demo as specified in adwav. You will then be prompted for the mode parameters unless you already have calibration files for the WSE converters in the directory from where you launch Linrad. (If you have, it might be a good idea to save them and then remove the calibration files (dsp_xxx_corr) from your Linrad directory. Collect the average pulse shape.Go to the collect averages screen, look here Calibration for two channels if you are not familiar to the Linrad menu system.The three files at 5, 50 and 400 Hz contain about 100, 1000 and 8000 pulses respectively and collecting each pulse more than one time is meaningless. Collecting for the duration of the file, about 10 seconds, will give a good enough S/N with a broad margin. Set the desired filter response.When U is pressed on the collect averages screen, you arrive at the screen for setting the desired filter response.The focus on this page is on the interpolation across the center discontinuity, so just press Y on this screen to return to the collect averages screen on which you should then press S followed by X to return to the menu from where you can again go to the calibration menu. Remove the center discontinuity.In a soundcard based direct conversion receiver there is an infinitely deep notch in the spectrum caused by the fact that soundcards are not DC coupled. When collecting calibration pulses, Linrad can not analyze a much longer time span than the time between two pulses and that causes another high pass filter on top of the one supplied by hardware. It will be present also with DC coupled hardwares.Phase and amplitude determined from the average pulse will not be correct at the center frequency, but by interpolation across the center region Linrad can make sure that the curves on both sides of the notch match each other. The first screen of the remove center discontinuity procedure is shown (in part) in figure 1. With the blankerinit1.raw file, the default setting, 515 Hz is reasonable. A 50 Hz square wave gives pulses that repeat at 100 Hz and the flat region of the window used to select a single pulse corresponds to 200 Hz so excluding 2.5 times more bandwidth seems reasonable. | |
Fig 1. Set the width over which the average pulse should be considered non-valid near the center on this screen. | |
|
There are four screens to interpolate across the center discontinuity.
The curves are nearly symmetric around the center frequency and it is
advantageous to use that.
The first interpolation across the center is converted to an extrapolation to zero (the midpoint) of the antisymmetric amplitude, figure 2. | |
Fig 2. The anti-symmetric power reflects the slope of the amplitude response of any RF filters in front of a direct conversion receiver. | |
|
It is obvious from figure 2 that the RF filters of the WSE converter chain
have an amplitude spectrum with a negligible second derivative across
the center discontinuity.
When a polynomial in 3 terms is fitted to the raw data, the yellow curve,
the difference raw data to fitted data is very close to zero except for about
half the excluded region of 515 Hz to the right.
Note that the vertical scale is expanded 128 times.
Using the red curve will be very safe - and it will not matter
what number of terms one chooses for the curve fitting.
Just press A to use the polynomial rather than the (incorrect)
data points across the center notch.
The next two screens are also straight-forward, but the last screen, the symmetric phase that corresponds to the phase response of all the RF filters in front of the I/Q mixer is more difficult. See figures 3 and 4. | |
Fig 3. The symmetric phase reflects reflects the phase response of the RF section. It has higher order derivatives and needs many terms in the polynomial fit. Here the number of terms is 3. Compare with figure 4 | |
Fig 4. Here the number of terms is 9. Compare with figure 3. | |
|
Even with 9 terms the red line is not zero outside the
excluded region.
By calibrating from the blankerinit4.raw file that has a 10
times lower pulse repetition frequency one can set the excluded
range to 50 Hz and find that 9 terms is actually enough
to describe the phase response of the RF section.
Running the calibration procedure at a very low pulse rate shows
another thing that is illustrated by figure 5.
| |
Fig 5. Compare with figure 3. | |
|
The second polynomial fit, the antisymmetric phase, shows the phase
response of the audio section.
By using the blankerinit4.raw file which uses a 5 Hz square wave
to give a 10 Hz pulse repetition frequency,
the width of the center discontinuity should be well below 50 Hz
which is where the green line of figure 5 is placed.
It is obvious that there is a phase shift that starts already
around 200 Hz and this is due to the DC blocking high pass
filters in the hardware and in the digital DC restoring
algorithm of the soundcard.
Currently (vers 02-39) Linrad does not allow a fit to this phase shift.
For the WSE units it does not matter,
the phase shift is small over a narrow frequency range only.
With other hardwares, particularly if the DC blocking filters are also used to attenuate the mains frequency and its overtones, it might be a good idea to add terms to fit to the phase and amplitude response of the audio section at low frequencies. With the ability of Linrad-02.28 and later to calibrate from files it will be possible to investigate this if someone has such hardware. When blankerinit5.raw is used for calibration, the time window for each pulse is so short that the total number of points in the flat region of the pulse is only about 100 so a pulse is described by an fft in 100 points only. Figure 6 shows one of the center notch screens with a width of 1500 Hz for the excluded points range. The result of the calibration is not quite as good as with a lower pulse repetition frequency. | |
Fig 6. At high pulse repetition rates the transforms become smaller and the center notch wider. At some point the accuracy will suffer. | |