Software Programming in Matlab/Simulink and Labview
Matlab/Simulink is a most suitable environment in which to develop and prototype a DSP application. And it has powerful tools to verify the functional behavior.
The next block diagram for example is programmed with Simulink and shows the Effective Directivity part of the software.
Simulink uses ready-made blocks in which basic functions are pre-programmed. This is handy as it is not necessary to reinvent the wheel. Another significant advantage is that Matlab is capable of producing an executable program, which increases processing speed considerably. This translates into the possibility of carrying out more complex processing in real time. I will quote some figures for the TDOA-processing. There are 4 FFTs and 4 IFFTs, each 512 (up to 1024 or 2048) samples long executed with a sample frequency of 8 kHz.
Both receivers are equalized using a noise source and an adaptive filter of the Least-Mean-Square (nLMS) type.
Note: a higher sample frequency than 8 kHz is not necessary when rate conversion is used at the input and output. 48kHz is used for the soundcards input and output sample rate.
Three graphs show the phase difference (degrees) and amplitude (dBm) of the frequency components (0 to 4 kHz) and a cumulative histogram of phase differences (upper right). The phase difference fitting the peak in the histogram (-81į) is shown separately in numerical terms. This makes it easier to adjust the processing.
The S-meter is calibrated. One S-point is exactly 6dB.
The control panel is shown in the bottom half and is programmed using Labview.
From the left to the right you see the controls for:
- Equalizing the receivers
- Matching the antennas
- On/off switches for Labview, Simulink, Read from File and Recording to File
- Phaser: On/off switch, Manual and Automatic phasing
- FFT processing control
o On/off switch
o Selection for using Phase info (ph=TDOA), using only speech Noise Reduction 1) or using both (NR-ph)
o Speech Noise Reduction low/high switch
o Selection switch for TDOA Phasing or Muting 2)
- SSB/CW nLMS Noise Reduction, nLMS Multi Notch filter and level control (see e.g.: A DSP-Based Audio Signal Processor, by KC7WW, QEX September 1996)
- CW Filtering 3)
o Brick Wall CW filtering, 100Hz step size
o Frequency and Bandwidth continuous variable CW filtering and Spot Tone
- Enhanced Stereo reception
- Panoramic reception
- AF gain and other amplitude related controls
- AGC 4) knee voltage and AGC speed
1) Noise Reduction for speech/SSB only, including Automatic Multi Notch. For more info see the Results and Audio Samples page.
2) In Effective directivity by DSP all unwanted frequency components are muted. Instead of muting, each frequency component (frequency bin) can be noise cancelled or phased like a phaser (this makes 256 phasers). So for each bin we have a different radiation pattern of the two loops. See Phasing.
3) Brick-Wall filtering for selecting one CW signal out of a pile-up or during a contest, variable CW filtering for weak signal detection (low S/N). For more info see the Results and Audio Samples page.
4) The AGC is at the end of all the processing and incorporates a pulse detection and pulse AGC action.
This software is used with the two phase coherent Elecraft K2 receivers.
The K2ís receivers and this software can be called a dual Software Defined Radio.
Software Downloads (single receiver only)
I have made six functions available as separate programs (executables) with fixed settings using the PC soundcard IN/OUT. The sample frequency used in the processing is 8kHz.
This 40mtr SSB_example gives an impression of the noise reduction.
The noise reduction is optimized for best signal readability.
Last update: August, 2014
1- improved audio quality CW LMS filters.
The audio is much improved and shows only minimal audio distortion.
It is now at the level I wanted it to be. You will not miss a signal, only noise.
2- added stereo output.
The unprocessed original audio is on the left channel and the processed audio is on the right channel.
This makes switching between processed and original audio easier by using the balance controls or by using hardware switching.
If using a laptop and using the mic input: check the settings carefully and don't use any extra signal processing. It can influence the L/R balance.
An external sound card is much preferred.
FFT based noise reduction:
- PA0SIM_SSB_FFT4_NR: audio noise reduction optimized for speech (SSB, but also AM and FM)
- PA0SIM_SSB_FFT4_NR_AN: audio noise reduction with automatic notch, optimized for speech (SSB, but also AM and FM)
This version is also able to reduce non white noise (QRM) to some extend
- PA0SIM_CW_FFT4_NR: audio noise reduction optimized for CW
Adaptive Least Mean Squares (nLMS) filter based:
- PA0SIM_CW_nLMS_NR: audio noise reduction for CW (use 500Hz or higher receiver bandwidth)
- PA0SIM_CWfilter30Hz: audio 30Hz (-3dB) bandwidth, 750Hz CW filter optimized for weak signal reception (bandwidth famous APF FT1000D and now FTDX5000)
With processed stereo output:
- PA0SIM_PanoramicCW: audio panoramic CW processing
All files are zipped in (incl. 6 needed .dllís):
Unzip all files and add (if necessary) a path to the directory with the .dllís (via My Computer/ Properties/ Advanced/ Environment Variables). Run the programs by double-click the file in Windows Explorer.
These programs are given "as is". I am not able to give any substantial support.
However donít hesitate to ask. Feedback is much appreciated.
Disclaimer: see also my Home Page.
Last update: July 4, 2015