Friday 3 November 2023

42 - Other ways to design Low pass Filters for HF use (spreadsheets)

A previous post discussed low pass filters and mentioned six methods of designing them. I covered method 1 and 2(a) in my last post. Here are notes on all six methods...

Method 1:  https://rf-tools.com/lc-filter/ is very very useful, together with the toroid coil turns calculator at http://toroids.info/ this are my main tools until recently when I wanted to investigate more thoroughly. 

Method 2(a). Elsie, ( http://tonnesoftware.com/elsie.html )

Other common design filter software is AADE ( at  http://www.ke5fx.com/aadeflt.htm ) or the PC software at http://www.alkeng.com/ and a number of tools that WEs Hayward included in his EMRFD book, sometimes included in the CDs that come with the ARRL or RSGB handbooks. My personal choices at present are to use the rf-tools website, the elsie software or the spreadsheet in 2(b),or my own written to generate more detailed LTspice circuits to play with.

Method 2(b) A spreadsheet written by Per Magnusson and described in his blog at https://axotron.se/blog/tool-for-designing-butterworth-and-chebyshev-filters/ is available for free download at the same address, he has kindly placed it in the public domain.  The really powerful convenience of the spreadsheet is that clicking a button generates a LTspice schematic (better layout than ELSIE)  I have a sophisticated set of commands for LTspice filter designs and I can quickly get what I need. It uses the table method which I investigated below.

From Per's spreadsheet. clicking the button generates an LTspice schematic

Automatically generated from PER's Spreadsheet

You can add all the .Measure commands given in my last post to experiment with this design, add Rser to the coils and capacitors to take the Q factor of real components into account and switch to standard value capacitors or combinations of 2 (or more) capacitors in parallel (typically) to get close to the theoretical values above. It does require Microsoft excel and macros and I tend to use libreoffice, I may convert Pers macros to ones that tun under Libreoffice some day...

Now, I did not realise at first that Pers spreadsheet actually calculated its own tables from scratch and I assumed it was just using lookup tables, so I set about learning how to work out the filters from the raw mathematics. This was a journey that took me some time but was satisfying (in the end!)

The theory behind designing filters allows the use of a calculator. You'll need a scientific calculator, and if it doesn't have cosh functions you'll need a few extra formulae to get around that.

cosh(x) = 1/2(e^x + e^-x)   and Cosh-1(x) = ln(x +/- Sqrt(x^2-1)

I got the theory from a book "Introduction to Radio Frequency Design" by Wes Hayward, W7ZOI, my copy is a 1996 edition and I have misplaced the software that came with the book, but he outlines the equations in Chapter 2, Page 62, I list his equation numbers below page numbers are for my first edition. (Pers also lists references with page numbers in the documentation part of his spreadsheet)

For a 1 Ohm, Butterworth filter components are given by G(k) = 2 SIN(2k-1)* PI/2N where k=1,2..n WEs describes this as equation 2.7-4 on page 61

For the Chebychev, a bit more work is needed. You need to take into account the passband ripple factor E and calculate Chebychev polynomials for the particular order you are designing for.

The ripple factor E=sqrt[10^(R/10)  -  1] where R is the ripple in dB  Eqn 2.7-8/P62

The transfer function H(jw) = SQRT (  1/[1 + E^2 * Cn(w)^2 ]  )       Eqn 2.7-6/p62

Where Cn(w) = cos(n * cos-1(w)) ;w<1 (passband)                             Eqn 2.7-7/P62

Where Cn(w) = cosh(n * cosh-1(w)) ;w>1 (stopband)                         Eqn 2.7-7/P62

To work out component values, Wes replaced the COSH functions with their e equivalents which is handier on most calculators.

d=A/8.68589   Eqn 2.7-11 where A is the passband ripple in dB

B=1/2n * ln [  (e^d + 1)/(e^d-1)]     Eqn 2.7-12    B0=2nB     Eqn 2.7-13  N=1/2(e^B-e^-B) Eqn 2.7-14

ak=sin[  (  (2k-1)Pi)/2n ] ,  bk= N^2  + sin^2(kw/n) ;k=1,2...n  Eqns 2.7-15 and -16 /Page 64

The gk values of the components is then found from g1 = 2a1/N    Eqn 2.7-17/P64

and gk= (4a{k-1}ak)/b{k-1}g{k-1})    Eqn 2.7-18/Page 64 curly braces are for subscripts


I tested these equations in my own spreadsheet -Method 2(c)

Look at the files section of this blog for a link to my google drive for this

Method 3: The GQRP club website has example designs at https://www.gqrp.com/Datasheet_W3NQN.pdf

Here is a screenshot

https://www.gqrp.com/Datasheet_W3NQN.pdf and see QST Feb 1999

Method 4: Using tables that are based on 1 Ohm and 1 Radian/Second frequency (0.159Hz) and scaling them up -to 50 Ohms and as many MHz as you need. - a simple multiplication and division. Note there are some tables about that are scaled to 1MHz or even 1HZ so follow the instructions that come with your tables. There is one Butterworth table (if input and output impedances are the same) but there are separate tables for each degree of ripple in a Chebyshev design so pick the right table. There are also tables that allow for the source, driving impedance to be different to the terminating impedance. I prefer to design a 50 Ohm in and 50 Ohm out filter, add an impedance changing section and merge the various components.

Here are two screenshots of a Butterworth table and the scaling calculations as well as the final values


Again, the file is in my google drive - accessible from the pages section of this blog

In practice I just use the RF-Tools website, Elsie and Per's or my own spreadsheets!

To conclude, here are a list of references and bibliography I found and read!

[1] EMRFD, Experimental Methods in Radio Frequency Design, by Wes Hayward (Author), Rick Campbell (Author), Bob Larkin (Author) I have the first edition, there is a second. This was the most valuable resource, everyone should have a copy of this book!

[2] RF Design Basics by  John Fielding, ZS5JF has a good chapter on Filters.

[3] ARRL Handbook, older editions are more detailed

[4] RSGB Handbook, The older editions are better as they cover the table method, modern versions just say " use online or downloadable tools"

[5] Zveverev's "Handbook of Filter Synthesis" I was able to download a copy from https://ia803101.us.archive.org/20/items/HandbookOfFilterSynthesis/Handbook%20of%20Filter%20Synthesis.pdf so I assume it is out of copyright. It is a Wiley book, dated 1967. This book contains all the tables that more modern books quote. It is a heavy read but a good reference.

[6] Part 1 and Part 2 of Design of Microwave filters, impedance matching networks and coupling structures Volume 1 and 2 by G.L. Matthaei, Leo Young and E.M.T. Jones, available from download from https://www.microwaves101.com/uploads/MYJ-part-1.pdf

[7] G3OTK, Richard Harris's 9 part series of articles at Itchen Valley Amateur Radio club  https://www.ivarc.org.uk/uploads/1/2/3/8/12380834/1_filter_article_version_2.pdf





No comments:

Post a Comment