This program enables you to design an All Pass Filter system and also analyse the phase performance for use in phasing type SSB transmitters and receivers. It is written in Visual Basic, version 6. This should work OK under all versions of Windows from 95 onwards with the screen resolution set to 800 x 600.

This circuit shows a typical All Pass Filter. Unlike most filters it gives a constant insertion gain of 1 over its range provided that R1 is equal to R2. It does, however, exhibit a phase shift that depends on the frequency of the signal and on the values of C3 and R4. Similar results are obtained if C3 and R4 are transposed. In each case the filter will exhibit a phase shift of between 0 and 180 degrees which depends on the input frequency. The frequency at which the phase shift is 90 degrees is given by 1/(2 x Pi x C3 x R4) and this may be used to define the filter.

This circuit shows a typical array of 6 All Pass Filters, 3 in each path, for use in an SSB transmitter. There is one input signal, from the microphone amplifier, but two outputs which should maintain a constant phase difference. By selecting the values of the frequency determining components, these are C3 and R4 for each filter, it is possible to achieve a phase shift of close to 90 degrees over the required range. The program calculates the component values and determines how good the performance is. We would normally expect the resultant phase error, relative to the ideal of 90 degrees, to be less than 1 degree and hopefully much better. A phase error of 1 degree would produce an unwanted sideband suppression of about 41 dB.

This view of the program window shows it calculating the component values and the phase perfomance for a system with three filters in each path. This is the default when first run and the Design button selected although the graph scale, vertical axis, has been reset from 1 to 0.5 degrees. The frequency range may be changed by entering new values for F1 and F2. Initially all capacitors have been set to 10 nF but this value can be changed by altering the default value and operating the Reset C button. Then operate the Design button again. Individual capacitor values may also be changed by overwriting the displayed values that have been calculated, then operate the Phase button. Resistor values can also be changed by overwriting then operating the Phase button. This allows you to choose practical values or see what the effect of component tolerances will be.

The results are given in a graphical display which shows the phase error in blue and the resultant unwanted sideband suppression in red. The phase graph may be rescaled for the best display. The operation is, hopefully, quite simple so I have not included any help file yet. If you do have any problems with it then just ask me by e-mail.

The Design button causes the 90 degree frequencies, for each filter section, to be calculated for the specified frequency range and the number of specified filters in each path. The resistor values depend on the 90 degree frequencies and the default capacitor values. These optimum values are then calculated and displayed on the graph. After that if any changes are made to the capacitor and resistor values the modified 90 degree frequencies are recalculated from these, when the Phase button is used, and the table and graph changed to show the effect of these changes. The 90 degree frequency values cannot be changed manually, unlike the resistors and capacitors.

The graph scale buttons may be used to show the phase graph, in blue, to best advantage. The red graph of the unwanted sideband suppression displays a wide enough range and is not rescalable. It is possible to calculate suppression figures of greater than 80 dB but is not likely that figures of anywhere near that could ever be realised in practise.

If you change the component values from the ideal ones that have been calculated you will find that the results can change quite dramatically. Very close tolerance components are needed in order to achieve a performance that is anywhere close to what is anticipated.

I would suggest that all the capacitors are chosen to be of the same nominal value, such as 10 nF, and then measured and matched. The closest tolerance capacitors that I can get are 1% and even that is too wide if they actually exhibit that amount of spread. These are metallised polypropylene and cost about 0.52 each. Try changing some values to 10.1 nF and others to 9.9 nF, or closer, and see what happens! A typical digital capacitance meter might not be able to measure the actual values closely enough but should be OK for matching them which is why different capacitor values in different locations in the circuit are not to be recommended.

I can get precision metal film resistors with 0.5% tolerance for 0.25 each and with 0.1% tolerance for 0.79 each. The values of the 0.1% tolerance resistors are avaliable in steps of about 2.5% which is still too coarse. In order to get close enough to the calculated values it might be necessary to use two resistors in series or in parallel in some locations. Other circuit parameters will also limit the ultimate performance of the system.

Other designs may be entered by overwriting the values having chosen the required number of filter sections. For example, the well known R2/T2 design by KK7B may be evaluated. Just leave the frequency range as preset from 270 Hz to 3600 Hz and the number of filters to 3. Operate the Design button then overwrite the resistor and capacitor values. Finally operate the Phase button. You can then choose the best scale for the phase graph.


Here are some examples of designs for All Pass Filter networks with the graphs showing how well they might work.

KK7B The values are those used in the R2 and T2 designs.

AN1981 This is from a Philips application note.

N4BCU This design was copied from the web site of Michael G. Ellis. There is a lot of other interesting and useful information on his site.


The calculations to derive the time constants and therefore the 90 degree frequencies, and the component values, were based on equations in the article by Dr. (Eng) Ralph Oppelt, DB2NP, published in VHF Communications Volume No. 18, Summer, 2/1987.


In order to run the program you must download it and place it in a suitable directory. The EXE file will not run by itself but needs another file called msvbvm60.DLL to be installed as well. This can be placed in the same directory or any other one that is in the path. A suitable location could be in C:\Windows\System\. If you already have this DLL then there is no need to download it again which is why they are avaliable as separate downloads. If you choose to download any more of my programs when they become available, or others, that have been written in this version of Visual Basic then you will only need to download the EXE file. Click on the file name, then choose the option "Save this file to disk" (depending on your browser) and specify the location where you want to put it.

The program is still in development so any suggestions for improvement would be appreciated. There might also be errors that have not yet been noticed so please let me know if you find any.

This version of the program was updated on October 12th 2002 and any previous version that you have should be replaced. The latest changes have been the addition of ToolTips on November 27th 2002 and a further change to the e-mail address on January 28th 2004.

Download Apf.exe (60 k)

Download msvbvm60.dll (1,356 k)


This program is offered free of charge to Radio Amateurs who might find it useful. I believe that it works OK and gives the right answer. I offer no guarantee of any sort and you download and use it at your own risk. That is just to protect myself in case you have any problem that I am unaware of.

73, Lawrence GJ3RAX





Copyright (c) 2002 J-Tek.




Back to Lawrence's Amateur Radio Page (GJ3RAX)