Date: Tue, 17 Oct 2000 00:16:42 -0400 From: "Roger Rehr W3SZ" Subject: [Elecraft] Software DSP Hello all! I had enough requests that I have posted this to the list. I hope it is of some help. It is just a summary of what I've learned over the past couple of years. I apologize for the differences in line width. I had to collate several emails from several computers to make this, and just removing the '>' characters was difficult; I didn't know how to remove the hard carriage returns that got into the files when I forwarded them... There are the following sections: 1. The brief summary of DSP programs from the MUD Proceedings 2. Specific comments on DSP and the K2 Part I I included the stuff on Leif's system as it will eventually be able to be used either as an audio processor for a receiver such as is in the K2, or as a stand-alone rig. To me it is the most exciting POTENTIAL project in software designed radios Ive come across that I could actually implement myself. If you don't want to read it, just skip to the end of part 1 when you come to my comments after the discussion on Hamview and Spectran. The links I've given are all current, except for those for K6STI. I checked them out again tonight before sending this to the Elecraft list. - --------------- 1. Leif Asbrink SM5BSZ's DSP Program for Weak Signal Work and other DSP Programs A Brief Summary by Roger Rehr W3SZ The Holy Grail of EME and other weak signal work for many of us is a DSP program that will provide visual evidence of very weak signals over a fairly large bandwidth as well as substantial improvement in signal reception by virtue of DSP processing. Specifically, the ideal program would provide: 1. Waterfall display with adjustable gain, baseline, visualized bandwidth, frequency bin size, and number of averages per displayed line 2. Spectral display with adjustable gain, baseline, visualized bandwidth, frequency bin size, and number of averages per displayed spectrum 3. DSP audio processing with a. variable bandwidth filtering with adjustable center frequency b. adjustable LMS (or equivalent) noise reduction algorithm c. binaural receive capability d. defeatable and adjustable AGC e. notch filtering Programs (and accompanying hardware in some cases) to date have each provided one or more of the above capabilities, but no program to my knowledge has provided all of the above. When fully implemented, SM5BSZ's planned software may come the closest of any package to providing all of the above. Of software/hardware currently available, the superb DSP-10 series http://www.proaxis.com/~boblark/dsp10.htm comes the closest to doing all of the above. It has an excellent waterfall display with adjustable gain, baseline, and averaging. The visualized bandwidth can be set only to 2400 or 4800 Hz, and frequency bin size is not adjustable. It has an excellent spectral display with adjustable gain and baseline, 2400 or 4800 Hz visualized bandwidth, and ajustable averaging. The frequency bin size is not adjustable. It also has DSP audio processing with 200 and 400 Hz filters, fixed at a center frequency of 600 Hz. It has adjustable LMS noise reduction, binaural receive capability, defeatable and adjustable AGC, but no notch filter. It uses an Analog Devices EZ-Kit Lite to do the DSP rather than a sound card; it just makes use of the PC for control and display, and runs under DOS ( NOT a DOS Window). Setting up the audio version is a piece of cake. For performance and versatility DSP-10 is heads and shoulders above the other currently available packages, although I believe the long-in-the-tooth DOS program DSP-Blaster, while very limited in its display capabilities, may still hold the edge in terms of audio signal processing effectiveness. In addition to the audio version, a complete computer-controlled 144 MHz transceiver using the DSP-10 software was described in the September thru November 1999 issues of QST. I have built this and have found it to be superb as a microwave IF. The ability to spot those weak signals that are up to 4 Khz off frequency at 2305 MHz and above is critical in the microwave contests, and this radio really does that superbly. I have not yet tried this RF Hardware Version of the DSP-10 as a 144 MHz weak signal receiver or used it on 144 MHz EME in comparison to my usual system. Other, software doing some of the above include the following. A listing of Sound Blaster ham software is at http://www.muenster.de/~welp/sb.htm#analyzer though it is somewhat dated. Here goes: DSP-Blaster, an early DOS SoundBlaster based DSP program by K6STI, Brian Beezley. This program has good LMS noise reduction, narrow filters with adjustable bandwidth and center frequency, a beautiful notch filter, synthetic stereo, and much more. http://seti1.setileague.org/software/dspblast.htm gives some info. Brian has been difficult to reach and I don't know if any of the listed email addresses are current. More comments are at http://www.nitehawk.com/rasmit/dsp_soft.html and a bit of K6STI history at http://www.qth.net/archive/bitbucket/199901/19990131.html. Brian may now be back in business now, I am not sure... FFTDSP, http://www.webcom.com/af9y which provides waterfall display capability but no audio processing, by AF9Y. This is an excellent display which many EMEer's swear by. AF9Y's web page referenced here is a superb tour/reference for a variety of weak signal, DSP, and astrophysical topics ChromaSound http://www.siliconpixels.com by N7CXI and VE3EC that provides graphic filter control and spectrum display over 5000 Hz or so, along with DSP noise reduction but no waterfall. I don't think it does as good a job as DSP Blaster, DSP-10, or the Hamview author's programs in signal processing, and mention it here just for completeness. GNASP1, which provides selectable filtering and spectrum output but no waterfall, noise reduction, or notching. See http://members.tripod.com/~gniephaus/gnasp1/gnasp1.html. I've not used this much as the filters didn't seem to be anything special and its lack of noise reduction was a real negative here. Hamview (by I2PHD and IK2CZL), now being replaced by Spectran (version beta4 build 127 as this is written), provides a waterfall display, spectral display, mouse-adjustable filters, an LMS type denoiser. The filters/denoiser in Spectran do not work as well for me as those in DSP-Blaster and the DSP-10 audio package, but the waterfall display is excellent. Links are at http://www.radiodsp.com or http://members.nbci.com/spectran/ Leif SM5BSZ has begun the migration and upgrading of his MS-DOS PC radio http://ham.te.hik.se/~sm5bsz/pcdsp/pcdroot.htm to Linux. This is what he envisions for the system when complete: .....Start Leif's comments: I am currently working on a new DSP radio package. This time the system is designed for flexibility so it can be used for many different combinations of computers, A/D boards and analog radio circuitry. The platform is Linux and the package will typically operate with a 486 computer together with a conventional SSB receiver as the minimum configuration. The current high end operation is with a 4-channel 96kHz A/D board and a Pentium III providing nearly 2 x 90kHz of useful signal bandwidth in a direct conversion configuration (stereo for two antennas). When the Linux package is in full operation I will interface it to a modern radio A/D chip and digital data decimation chip. The component cost is very low and there will be an exciting improvement in dynamic range, bandwidth and flexibility. The LINUX PC-radio for Intel platforms http://ham.te.hik.se/homepage/sm5bsz/linuxdsp/linroot.htm will be continously upgraded to show various aspects of digital radio processing and how they are implemented in the dsp package. The Linux PC-radio is not designed for VHF weak signal only. It is very flexible and designed to accomodate routines for all radio communication modes on all frequency bands. The program can run on a 486 to process 3kHz bandwidth with almost any sound board. It can also run on a Pentium III with a 96kHz board such as Digital River Delta44 to produce spectra covering about 90kHz bandwidth using two mixers to provide a direct conversion receiver. (For EME it may be easiest to make a direct conversion receiver for a fixed frequency such as 10.7 MHz and put some converter in front of it). This is an ongoing project. The current version only produces spectrum graphs with user selectable resolution and averaging. More sophisticated processing will be added gradually. The package will provide more than 30kHz bandwidth with a standard audio board and should be very useful for 10 GHz EME and any other mode where a wide spectrum range has to be searched. I am using Red Hat 6.1 and it works fine on several computers. I am using OSS for the sound board devices and they charge USD 40 (if I remember correctly) for the Delta44 option. For the screen I use svgalib. For the future I will try to make the package run under several Linux distributions. Someone tried SuSe but that did not work, I do not know why. I have bought Caldera, Debian, SuSE and Mandrake and some time I will try to get the software run under these distributions - but right now other things have higher priority. You may have to change sound.h and run make to select the drivers for your system< See belos--W3SZ. I am using two sound boards so I can run the audio output at a low speed. For CW modes there is no need for 96kHz output.... .....end Leif's comments The goal here at W3SZ is to have something like Leif describes. John K3PGP helped me to get started with a homebrew computer-controlled receiver using TUF-1's for mixers, a couple of computer-controlled frequency synthesizers for the LO's, and the DSP-10 as the final audio stage. This has worked well, but the visible bandwidth with the DSP-10 at 4.8 KHz was less than the 10-30 KHz I want. Hence my interest in Leif's software. I had never used Linux, or any unix before, but found that with a little help and some quick reading I was able to get Linux installed on my Windows 95 computer and Leif's program running over a couple of evenings. Right now, as Leif pointed out, his computer just gives a visual display of the audio. But hopefully there is more to come, and I wanted to keep up with his progress so I bit the bullet and started now. I run a Pentium Pro 200 with a soundblaster AWE32. The machine was originally set up to dual boot with NT and Win95 so I can't boot linux from a hard disk...I just boot from floppy when I want to run linux. I will eventually get a separate machine for linux. I have 1.5 gB HD space set aside for linux (about right), 128 MB RAM (much more than I need, I think), Number Nine Virge S3 type video card, PS2 3 button mouse. I am running Red Hat Linux 6.2 and got the OSS sound drivers off of the web from www.opensound.com ; they are not free but made the installation pretty simple. I had never used linux before and don't really know C but I was able to get going with the docs on the web from OSS and Red Hat (www.redhat.com). So its not too hard to do. Please note: if you have Windows NT on your system and you install Linux to boot from a hard disk you will have a disaster...do not do this. I believe you must do a CUSTOM install in order to choose the option of NOT installing LILO on the hard disk (the boot utility). To me, even if I could have set it up to boot from the hard disk, I likely would have taken this route...when I want to boot to Linux I boot from the Linux boot floppy. When I want to boot to Windows, I pop the floppy part way out of the drive before start-up. The main notes I have from my experience at installing all of this are: 1. I used Partition Magic to set up the partition for Linux. There is a good section in "Red Hat Linux for Dummies" (I felt this was just what I needed) that goes over the actual installation of Linux. I'd recommend getting this and reading it carefully. Also read the Installation Manual that comes with Red Hat Linux. I got the Standard Version of Red Hat Linux, for $29.95 list. 2. After you install Linux and are sure its working OK, you unzip Leif's dsp files and the oss files using the linux utility "tar", invoking the parameters zxvf. Exactly how to do this is detailed very nicely in the OSS installation file "INSTALL". The expanded OSS files from the OSS archive file which you can download from their website listed above have to go into the directory /tmp to be installed. I put Leif's files in /home/rrehr/sm5bsz. When tar expanded them it put them in a subdirectory /dsp, i.e., in /home/rrehr/sm5bsz/dsp. Tar, the C compiler, etc are all in the RedHat Linux package. Install the development tools packages when you install linux to get the C stuff. (I did a custom install so I could make sure I didn't overwrite the boot sector on my hard drive; I DID NOT install LILO!!!). 3. Install the OSS sound drivers and get them working before you compile Leif's program (see section '5' below). 4. I changed the parameters in the sound.h file for SND8 from /dev/dsp5 to /dev/dsp and for SND16 from /dev/dspW to dev/dsp1. I just used dsp and dsp1 because these were used in the stock linux text that was "commented out" in the sound.h file, and so they seemed like a good place to start...I don't know if other values would work or work better for my AWE 32. 5. I needed to change the location of "soundcard.h" referred to in "sound.h" to /usr/lib/oss/soundcard.h. as that is where the OSS install program put it. Once you've made that change to the file sound.h, make sure you're in whatever directory you have Leif's files in and type "make". This will use his "Makefile" to compile the program and produce the executable file "dsp". You run this from the command line in this directory (again, on my machine its /home/rrehr/sm5bsz/dsp) by typing "./dsp". This will bring up the menu screen of Leif's program. 5. I have avoided setting up the mouse in his program ("T") as when I did this early on it destroyed mouse function in the program (but not elsewhere in linux). Set up the display parameters, and then to to "U" to set the A/D and D/A parameters. Then go to "F" to see if all is well. Then go to "A" and "B" etc and play around. Let me know if you need help or if there are more details of interest that I neglected... Below are some details on the look/feel of the program. The spectral display is very nice and its great the way the bandwidth and center frequency etc can be varied. The bandwidth as well as the center frequency of the display are changed using the mouse, and the floor and gain of the waterfall are changed by clicking on the appropriate parameter field with the left mouse key and then using the keyboard to enter the new parameter. At this point, at least here, there is no audio output from the soundboard while the program is running, but just the graphics (which are very nice, especially in the weak signal CW screen). Currently there is a waterfall display at the top, with the spectral display below; kind of like DSP-10 but reversed, and with the ability to change the width of the display in terms of Hz (within the range permitted by your prior choice of FFT parameters) as well as physically on the screen, the center frequency, the zero point of the spectral display as well as its amplitude range using the left mouse button in real time. You can create .gif files of the screen by just typing "g" and following the instructions. Read the files settings.txt and mouse_on_graph.txt in the dsp directory to see how to control things once you have the program running. But anyway, RIGHT NOW the spectral display is the best there is that I've seen in terms of its on-screen adjustability, although I don't have it all figured out yet and there IS still room for improvement. GOOD SHOW, Leif!! As noted above, I've used FFTDSP, DSP-Blaster, Spectran, HamView, and DSP-10 here over the past several years; If Leif continues with this it should obviate the need for the others... - -----------------------end of 1. 2. Comments on K2 and DSP, Part I. HI, Lionel! I got things working, at least receive-wise, last night/this morning and was able to compare in an admittedly unscientific way some of the receive combinations we've been talking about in an EME environment. This was the first time I had the 2 x 2 MXP20 array 'on the moon' since it went up this past February. I didn't get the calls on any small stations, but I did hear and copy the usual big guns: WB9UWA OZ1HNE F3VS I3DLI EA3DXU SM2CEW (I think) K2GAL (both ways, tropo and EME) RU1AA W0EP (probably a bad call ??W0HP??) I2FAK and several others I was not able to get full calls on. The big guns were mostly 10-14 dB out of the noise as measured by the spectral display on the DSP-10. What I found was: The new version of Spectran does a better job than DSP-10 (and of course better than DSP-Blaster) of DISPLAYING visually the signals, in both the spectrum display and the waterfall. But the AUDIO processing (what you listen to, as opposed to what you see on the screen) is much better with DSP-Blaster and DSP-10 than it is with Spectran. So you can run two computers; one to watch the band with Spectran, and one to hear the signals with DSP-Blaster or DSP-10 ;) It was not a very noisy night from a pulse noise/noise blanker standpoint, but I found that the noise blanker in the Elecraft K2 WAS helpful and there were a couple of times when I felt that the lack of a noise blanker in the DSP-10 hardware was a disadvantage, even with the LMS noise reduction it has. Nevertheless, to my surprise I felt I could find the stations more easily and found listening to them/copying them more comfortable on the DSP-10 hardware than on the SSB LT2S/K2 combination, whether I was running the LT2S/K2 with no dsp, with DSP-blaster, with the AUDIO version of DSP-10, or with Spectran. I think this relates primarily to the fact that the binaural implementation on the DSP-10 is very much to my liking, and I like it far better than the DSP-Blaster's, even though I previously liked the DSP-Blaster's version very much. There were signals I essentially couldn't appreciate with the binaural 'off' on the DSP-10, that just popped out when I turned it on (I normally run with it on, and turned it off just to try to figure out why the DSP-10 receiver seemed so 'hot', so what actually happened was that signals that were easy copy became lost in the mud when I turned off the binaural). Also, the quality of the signal through the RF DSP-10 just seems better than when the audio DSP-10 is tacked onto the end of the audio chain after the K2. Thirdly, the very slow tuning rate of the DSP-10 (10 Hz at a time by keystroke, not with an infinitesimal rotation of a knob) was a real advantage with the weak signals, especially since they could be seen on the display and 'dialed in'. Finally, I think the mast mounted preamps likely eliminated any effect of the better MDS the xvrtr/K2 have compared with the DSP-10, and evened the score in this regard. I had previously compared the K2 with the IC-735 as IF, and the K2 won hands down; I think the K2 is a very good IF rig, but liked the DSP-10 better today. So I guess the ideal setup for me would be the RF hardware DSP-10 with a spectral display and waterfall more like that of Spectran, and with a noise blanker in addition to the DSP functions it has. All of this is subjective, so take it all with a grain of salt... I wait for a really noisy night to see what the noise blanker on the K2 does under those conditions. I did not try the spectral display of Leif, SM5BSZ, as I was sure it wouldn't be as good as the others yet, and the DSP audio processing isn't available yet... Though I could send out gif files, I of course didn't do that here, and the DSP-10 site and each of the other sites have pictures of their displays, so you can see them there. I hope this was helpful...any questions/comments, etc...fire away... 73, Roger Rehr W3SZ ex AA3QK, WA3JYM FN20ah 2 Merrymount Road Reading, PA 19609-1718 http://www.epix.net/~rrehr/w3sz.htm - --- Submissions: elecraft at qth.net