EMRFD Message Archive 2000

Message Date From Subject
2000 2008-09-04 13:48:26 timshoppa GPLA for plotting group delay?
OK, obviously I'm spending too much time in front of the computer with
Zverev and XLAD and GPLA instead of on the radio, but wow this is fun.

Silly question: how do I use GPLA for plotting group delay through my
newly designed filters?

If I have phase shift through the filter from LTSpice, is group delay
something simple like the derivative or slope of the phase shift vs
frequency? I remember something like that from school days...

Tim N3QE
2001 2008-09-04 19:02:53 victorkoren Re: GPLA for plotting group delay?
Group delay is always the derivative of phase to Omega (2*Pi*F):
d(phi)/d(W)
Victor 4Z4ME

2003 2008-09-04 19:51:40 Wes Hayward Re: GPLA for plotting group delay?
Hi Tim and gang,

Many thanks for the interesting questions. Let me make a few
comments.

First, XLAD does indeed have code that generates the k and q values
for both Butterworth and Chebyshev filters. The Butterworth
expressions are simple and easy to program. Chebyshev is more
complicated, for the relationships for component values are
interrelated. They are still simple enough. See section 2.7 of
Intro to RF Design for all the gore. This analysis provides the
normalized component values for the low pass filters, which are the
prototypes for the bandpass filters.

Once you have the g(n) values for the normalized low pass components,
the next step is to translate these to k and q values. Years ago I
recall learning about this in one of my first exposures to Zverev.
At one place, and I don't remember just where it was, he describes
the design of a low pass filter from k and q tables. These tables
are normally used for bandpass filters, but that is not the only
application. Anyway, once I found this design scheme, I was able to
go through it to work backwards. Once I had values for a normalized
low pass, the backwards process will provide the k and q values. It
all comes down to using the mathematical definitions of the k and q
for a given filter. This is what is embedded within XLAD.

XLAD does not go beyond the Butterworth and Chebyshev filters. (My
private version includes Cohn.) Evidently, from what you say Neil
has not provided code to go further in the AADE programs either. I
have not found any closed forms for the Gaussian components and other
filter forms, but I'm sure they are out there and I can see how one
might derive them from some of the basic transfer functions.

It is not necessary or even desired that you know anything about
MathCad when doing any of this work. It is mathematics, pure and
simple. I happen to use MathCad as a tool for some of my work, for
I have become somewhat familiar with the way to drive the program.
It produces equations that look good in print or in the web. But
the stuff that is in EMRFD that came from MathCad is nothing more
than a series of equations that the reader can use with a slide rule,
hand calculator, spread sheet, MatLab, Mathcad, Maple, or
Mathematica, or any of many programming languages.

The really important thing about q0 is the definition, which is the
ratio of the unloaded Q of a resonator to the Filter Q. This is the
thing that makes the discussion general, transcending resonator type.
The filter Q is just the reciprocal of the fractional bandwidth.
Consider an example. We have a pile of 8 MHz crystals that we have
measured and have found that the unloaded Q is 75,000. These are
useful, but far from stellar parts. We wish to make a SSB filter
from these with a bandwidth of 2 kHz. The fractional bandwidth is
2/8000 = 2.5 E-4. (That's 2.5 times 10 raised to the -4 power.)
The reciprocal of this is 4000. So q0 is 75000/4000=18.75. If we
go to the Zverev tables, we find that this is going to be a pretty
easy filter to build so long as we don't need too many crystals.
Specifically, from the tables, you could realize a 7 element filter
with these crystals, but no more, if designing for a 0.1 dB Chebyshev
shape. Eight elements would go with a .01 dB Chebyshev or a
Butterworth. Bill Carver covered this, as you pointed out.

Say we wanted to use those same crystals for a 200 Hz wide CW
filter. The filter Q would then be 40,000 and q0 is only 1.9. We
would be hard pressed to make much of a CW filter with these low Q
rocks. (Well, it would work with two crystals.)

Many builders have examined only the Min-Loss (Cohn) crystal
filter. It's not a bad choice. On the other hand, it is not that
difficult to design something else. The Min Loss filter grows ugly
bumps on the skirts when the order goes beyond 5.

The Zverev tables often have a wide variety of values for each
filter. For example, the N=8 Butterworth response shows four sets
of k and q for each q0 value considered. The question of which k
and q set to pick among the many offered is a good one. I've done
comparative simulations of filters that use all available sets for
one case and saw no difference, which is of course implied by the
text. I've heard the comment that the better choice is one where q1
is close to qn, but that is not vital. Lower values of q1 and qn
may be more easily realized. Generally, you want to end up with a
low value of "native resistance," for want of a better term. This is
the R mentioned Eq 3.12 in EMRFD. The lower that value is, the
greater flexibility you have during the design.

The Zverev tables use "predistortion". The distortion we refer to
here is a alteration or compromise in the shape of a filter as a
result of component loss. If we know that this is going to occur, we
can plan for it, and this planning is predistortion. Use
predistortion if you wish to obtain the exact specified shape. For
example, if you happen to pick predistorted 0.1 dB ripple Chebyshev,
you want to have a filter that is nearly flat with only these minor
0.1 dB ripples within the passband. If you have crystals with
enough Q, this can be achieved. But predistortion comes with a cost,
usually in excess filter loss. You can simulate all of this. The
predistorted k and q tables of Zverev give you the data you need for
such a design.

Most of the filters that I build are not predistorted. That was not
always the case. I was really hung up on predistortion back in the
mid 1970s SSD era. But building filters illustrated the price to be
paid for the accurate shape. Comments from some friends and
colleagues also helped. For example, Bill Sabin commented that he
rarely used predistortion in filters for the radios he built, on and
off the job. The k and q values generated by XLAD are not
predistorted.

We don't usually need a precise shape. If a SSB filter happens to
have a little ripple, we won't even hear it, so long as it is not
excessive. I would say that 0.5 to 1 dB ripple in a SSB filter
would rarely be a problem. That is, of course, a subjective
number. Other folks often have more discerning ears than mine.

We give a lot of lip service to ringing and one shape over another.
Any filter is going to ring. Even the FIR filters that we usually
realize with DSP ring, but the ringing then is confined to a limited
number of cycles. Our more general observation for CW filters is
that filters will sound good if they have a rounded peak shape rather
than one that is flat. It is not that important to go for one exact
shape over another, for it is going to be difficult to actually
realize an exact shape anyway. (I can envision debate on this from
some folks.)

As mentioned, these are subjective details that bridge between the
mathematics, the designs that follow and the actual perceptions.
Various folks have different requirements and interests.

The transitional filters such as the Gaussian to 6 dB will have quite
different values for q1 and qn, which means that the native
resistances will also be different. I've built some filters such as
that in EMRFD Fig 7.60 where the termination is 500 Ohms at each end
even though there are different native resistance values each end.
Any of these filters, be they LC, crystal, or whatever other
resonator you might want, can be built with impedance transforming
properties. That is, you could design one with a 500 Ohm
termination at one end and 1500 at the other. There is an LC
example of this in the manual that comes with the software in
EMRFD. The manual is a text file on the CD. If you do a crystal
filter with unequal terminations at the two ends, some careful tuning
will be required. This can be done with Meshtune, the tuning
program that is also on the CD.

The transitional filters such as the Gaussian to 6 differs
considerable from the Chebyshev in that the symmetry that is usually
present with a Butterworth or Chebyshev is no longer there. So a
transitional filter will have all coupling capacitors different.
While this is sometimes a practical frustration, there is also a
positive to these filters: They tend to be quite tolerant of
component variations. This becomes apparent if you play with these
filters in a simulator such as GPLA. In fact, you could do an
analysis in a general purpose simulator using Monte Carlo analysis
and see the impact of component variations.

This is probably a good place to inject another practical
observation. I recently became the owner of a vector network
analyzer. I ended up with one of those from N2PK, and it is a
wonderful tool. Among the first things I examined were some
crystal filters. They were built from a variety of crystals on hand
at 5, 7.373, 10, and 11.06 MHz. One of the things that quickly
emerged was that a Butterworth shaped SSB filter with N=6 was
especially easy to realize. The correspondence with simulation was
outstanding. I also got good results with a 0.1 dB Chebyshev design
with N=8, although I had to be more careful with component values and
end tuning.

I did not include phase or group delay analysis as a part of GPLA.
It could have been done, but I just didn't take the time when writing
the code. The software that comes with IRFD has a DOS versi