DSP filter DISPFIL.EXE

Version 1.09J - June 18, 2000 JE3HHT Makoto Mori
Translated into English by JA7UDE Oba

********************************************************************
I have no plan to update this program any more. Please do not ask me any question about this program.
********************************************************************

This is a DSP filter tool using a PC with the soundcard.
With this tool, you even can design various types of digital filters including adaptive filters.
However, this tool is just experimental and will not afford the practical use for amateur ham radio.

You probably need a powerful CPU to make this tool run flawlessly.l In addition, you need a soundcard with the full-duplex mode.

I made this program just because of my own interest.
As I was not quite familiar with the use of the soundcard, it still has substantial time lag from input to output and might not well work for CW. Needless to say, this program is freeware.

===== How to uninstall =====

DSPFIL does nothing to the Windows registry, so just delete all the files with the directory that has DSPFIL files.

===== System requirement =====

OS:        Windows 95, 98, NT
PC:        The faster the better
Display:        640 x 480 or more
Soundcard:    16-bit soundcard that is capable of FULL-DUPLEX (some cards won't work)

===== Hookup and Operation =====

Connect the speaker out of the radio to the Line-in or Mic of the soundcard. Connect a
headphone or speaker to the output of the soundcard.

* Since the Mic input has too high gain, I recommend the Line-in.

Adjust the input level by using Mic or Line level in the Record property or the audio in the control panel. You can do that by using the AF gain of your radio, too.

Adjust the output level by using Wave or Master level in the Play property or the audio in the control panel. You also can do that by using Up (up arrow) or Down (down arrow) button on the DSPFIL window.

If you have a sound output from your speaker without running DSPFIL.EXE, your PC is
configured so as to play the recording signal directly and thus you must turn it off. Go Play
property and get Mic-in or Line-in muted.

If you hear a sound immediately after starting DSPFIL.EXE, you are ready to go. In case you see a message like "Cannot open the sound device," your soundcard probably does not support the full-duplex mode. Give up listening to the filtered sound, but you can observe how DSPFIL.EXE works by the FFT and adaptive filter response windows.

Since there is a time lag between the input and output, you should keep the buffer size as small as possible. The time lag has a big trouble in filtering CW signals (you will soon understand what it is when you transmit a signal, Hi).

Too high input level causes distortion in the analog circuit of the soundcard. You have to adjust the input level by monitoring the FFT display set to "IN." When overdriven, DSPFIL shows "Over" in the upper right corner of the FFT window.

When the HPF butten is depressed, the 100Hz high-pass filter is activated to the input circuit. It is effective if you have DC ingredient, but it raises the CPU load. Use it only when you need it.

===== Details of the filters =====

[NS4`NS16]

This is a comb filter using moving average. This filter, by its structure, gets the actual center
frequency Rfo shifted from the defined center frequency Fo by

    RFo= fss / int(fss/Fo) [Hz] ifss = fs / 2j

This can be compensated by carefully choosing the sampling frequency (fs). However, the
sound blaster card does not allow fine tuning aroung 11025Hz, so DSPFIL admits the shift, Hi.

The filter does not use a simple averaging calculation but uses subtractions for 1/2 periods.
Thus, the even harmonics are suppressed, but the odd harmonics can be passed through. It is a good idea to use a 500Hz filter of your radio. It has lower quality in the frequency domain compared with BP100, but I think this filter gives the best performance particularly for weak signals.

[BP500`BP70]

This is a band-pass filter using an FIR filter. It uses x3 oversampling. The physical sampling
frequency is 11025Hz; while the application sampling frequency is 3675Hz.

If the number of taps is increased, the filter become sharper. However, it increases the
processing time at the same time, and therefore it will not run on a slow PC.

[LMSBP, LMSB2]

This is an adaptive band-pass filter for CW. I have not tested a lot on the values of ƒÊ(mu) and ƒÁ (gamma), but I think the filter works, hi.

This filter does not affect Fo or Tap, which is configured in the main window.

The frequency-domain graph in the lower right corner shows the frequency characteristics of the transversal filter calculated with the coefficients, which are changed by LMS. You can see how the adaptation is performed by changing the frequency of the input signal.

In case of weak signals, the filter coefficients tend to be small, which would result in a low level output. To compensate this, LMSB2 leaves the AGC turned on to increase the volume for the weak signals.

[2.7K`1.8K]

This is a fixed frequency BPF for SSB. The low-cut frequency is fixed to 200Hz. If it
oversamples the 2.2KHz or higher signals, it causes folding errors because of the decimeter.

This filter does not affect the Fo, which is configured in the main window.

[LMSNS]

This is a noise smoother for SSB. The adaptive operation might not be well tuned yet. The
SSB signal is smaller autocorrelation than the CW signals, so I put small values in the correlation delays.

This filter does not affect the Fo or Tap, which is configured in the main window.

[LMSAN]

This is an automatic notch filter for SSB. It would give better results if it had faster convergence behavior. However, I dare to focus on the response speed for CW signals.

This filter does not affect the Fo or Tap, which is configured in the main window.

[User1`User6]

This is a user-customizable filter. The default setting gives a wide band-pass filter for SSB.
You can customize it by pushing the DESIGN button (the button face text is written in Japanese). You can copy the parameters of the selected other filter to those of this filter by pushing COPY (the button face text is written in Japanese) button.

This filter does not affect the Fo or Tap, which is configured in the main window.

* User setting for the adaptive filters

LMSBP, LMSNS, LMSAN are built-in filters, but the user can design a LMS filter by himself. Push DESIGN (this text is written in Japanese, so it might not correctly appear with non-Japanese Windows) button and select LMS, then push UPDATE (in Japanese text) button. Now you can change the parameters.

The algorithm used in the adaptive filters is called Leaky LMS
(Least Mean Square method).

The user customizable parameters are:

    Tap    the number of orders of the transversal filter
    Delay    the number of delay nodes
    2u    the response speed
    V (gamma)    the dumping factor

Larger u gives faster response but slower convergence.
Smaller V (gamma) makes the coefficients decrease faster when the input signal is cut off.
However, too small V (gamma) will result in oscillation. Generally put a value a little bit smaller than 1 to V (gamma).

If the REVERSE OUTPUT (in Japanese) is checked, DSPFIL outputs an error signal. It is
checked to design an automatic notch filter. When AGC is checked, DSPFIL automatically
increase the output volume for weak input signals.

The characteristics of the adaptive filters are dependent not only on u (mu) and V (gamma) but also on Delay and Tap. Change all of them to see what happens.

===== Use parameters that are given by another design software =====

If you want to test the filter coefficients that are calculated with another filter design software, try the following steps.

1. Push DESIGN button in User1 ? User6
2. Select User and push Update
3. Push SAVE button and make a filter definition file.
4. Exit DSPFIL.
5. Edit the filter definition file using a text editor.

Sampling frequency
    No over sampling    11025[Hz]         OverSmp=1
    Over sampling x2    5512.5[Hz]     OverSmp=2
    Over sampling x3    3675[Hz]         OverSmp=3

Filter order
    Put the number of orders to TAP field

Coefficients
    Put coefficients to H0 ? Hn (n = Tap) fields

6. Start DSPFIL and push one of User1 ? User6
7. Push LOAD button to load the definition file.


* CPU Power
Since this program intensively uses floating-point operations and is not well optimized, it will not run on a PC with a slow CPU.

73 de JE3HHT Makoto Mori

[Dsp Filter Home]