EMRFD Message Archive 10605

Message Date From Subject
10605 2014-12-16 13:19:14 Chris Howard w0ep Audio filter ringing
While I was out jogging today I had a bit of a thought.

I was thinking about ringing in LC audio filters.

I had been thinking about ringing over the weekend while
listening to the ARRL 10 Meter contest and how the
tightest filter on my TenTec Omni sounds OK when the
band is quiet but much worse when it is actually called
upon to do the filtering job for which is is needed.

So, I was picturing all of the "good stuff" making it's
way through the filter, past the pot holes and over
the fences (L's and C's) and out to my ear.
What happens to the bad stuff? I assume that it
gets absorbed by the grounded elements in
the filter. In some situations it probably bounces
around between filter elements for awhile before
it is completely absorbed.

(this is not a technical description)

So, while jogging today I thought, why not increase
the resistance in these bounce-around paths so that
the wanted signal can come through but the unwanted
signals get attenuated on each bounce? Kind of like
how the 200 ft of RG-58 absorbs UHF signals before
they make it back to my SWR meter to tell me that the
real antenna has fallen off the mast.

So now I'm thinking... what would happen if
I used some high resistance wire to connect the elements
of an audio filter? I do remember, what little
my high-resistance brain absorbed from reading EMRFD,
that resistors in a signal path are bad for noise figure.
It seems like that was maybe a front-end thing, for
teeny RF signals. Maybe not so bad for much larger audio signals?

I haven't tried it. Probably someone already has,
or has a Spice model or something. If I had
a ringing audio filter, I might try it.

Somewhere around here I do have a partial spool of
#30 nichrome wire, .56 ohms per inch. If somebody
wants to try it, I can send them a couple of feet in an
envelope.

Just a thought.
10606 2014-12-16 13:31:16 Jim Strohm Re: Audio filter ringing
Like ... a high-resistance L in an LC filter? 

To be resonant at audio, or to present suitable lo-pass filtering at audio, wouldn't you need huge capacitors to give the filtering characteristics you need when using #30 wire in your inductors, even if you used magnetic cores for the inductors?

Somebody else needs to work the math on this one -- I'm on a short break from a project that I have to finish before tomorrow morning, and I am nowhere close to being done with it.

73
Jim N6OTQ

10607 2014-12-16 14:38:36 Chris Howard w0ep Re: Audio filter ringing
Ah! There you go. You caught a flaw in my thinking.

I was thinking of audio filtering but
I was picturing in my mind RF filtering.
I'm not sure if it matters except for the noise-figure issue.

But I thought inductors were based on number of turns
not on the type of wire. You are right that audio
LC filters use large values of L and C.





10608 2014-12-16 14:44:58 Chris Howard w0ep Re: Audio filter ringing
My original thought, though, was to use the high resistance
wire just for interconnections, not for the inductors.



10609 2014-12-16 15:05:50 Jim Strohm Re: Audio filter ringing
Chris,

I actually think you may be on to something here, and it's worthy of some research and experimentation.  I don't think that the existing software can adequately take resistance wire into accurate consideration.

So this is probably worth playing with, just because.

I don't think it's been tried ... but would love to see some existing art.

73
Jim N6OTQ

10610 2014-12-16 15:15:59 Thomas S. Knutsen Re: Audio filter ringing
Adding 0.5 ohms or less between the nodes in your filter is not going to do you much good, compared to an needed inductance you would need in a filter, the resistance in the wire is neglible.
Making inductors from the wire is a different thing, remember that Q = X/R and that Q=F/BW and if your R in the inductor (or anywhere in the filter) goes up, then its going to be impossible to build a filter with good selectivity at a low bandwith.

Both the inductors and the capacitors will be fairly large for a passive design, The Sallen key and other op-amp based designs excist for that reason. Both of these are explained quite well in EMRFD.

Building analog filters that does not ring is difficult. There have been a couple of designs with 100KHz crystals that have had 10Hz or less bandwith, at the cost of having an additional IF at 100KHz.

Have you considered an digital approach to this problem? A FFT filter with variable bandwith are trivial to implement on one of the newer ARM processor boards avaible like the Arduino DUE. The total current consuption should not be much more than an decent op-amp design. Digital filters are explained in CH. 10 in EMRFD.

73 de Thomas LA3PNA.


2014-12-16 23:44 GMT+01:00 Chris Howard w0ep w0ep@w0ep.us [emrfd] <emrfd@yahoogroups.com>:
 


My original thought, though, was to use the high resistance
wire just for interconnections, not for the inductors.



10611 2014-12-16 15:17:42 Thomas S. Knutsen Re: Audio filter ringing
Seems to be getting late here, I meant FIR filter, FFT is an mathematical approach to get the frequency components from an time domain signal.

73 de Thomas.

2014-12-17 0:15 GMT+01:00 Thomas S. Knutsen <la3pna@gmail.com>:
Adding 0.5 ohms or less between the nodes in your filter is not going to do you much good, compared to an needed inductance you would need in a filter, the resistance in the wire is neglible.
Making inductors from the wire is a different thing, remember that Q = X/R and that Q=F/BW and if your R in the inductor (or anywhere in the filter) goes up, then its going to be impossible to build a filter with good selectivity at a low bandwith.

Both the inductors and the capacitors will be fairly large for a passive design, The Sallen key and other op-amp based designs excist for that reason. Both of these are explained quite well in EMRFD.

Building analog filters that does not ring is difficult. There have been a couple of designs with 100KHz crystals that have had 10Hz or less bandwith, at the cost of having an additional IF at 100KHz.

Have you considered an digital approach to this problem? A FFT filter with variable bandwith are trivial to implement on one of the newer ARM processor boards avaible like the Arduino DUE. The total current consuption should not be much more than an decent op-amp design. Digital filters are explained in CH. 10 in EMRFD.

73 de Thomas LA3PNA.


2014-12-16 23:44 GMT+01:00 Chris Howard w0ep w0ep@w0ep.us [emrfd] <emrfd@yahoogroups.com>:
 


My original thought, though, was to use the high resistance
wire just for interconnections, not for the inductors.



10612 2014-12-17 03:26:38 Alberto I2PHD Re: Audio filter ringing
10613 2014-12-17 10:14:34 AD7ZU Re: Audio filter ringing
Adding to Thomas’ suggestion of using a digital filter:

There are FIR filter ICs from Quidkfilter Techmologies (check the QF1D512) which will perform well for audio range applications. The power consumption is very very low. There are other products from Quickfilter that incorporate the ADC and multiple channels. The core is a 512 tap symmetric FIR. Asymmetric applications such as a quadrature demodulators limits the filter to 255 taps. The sample rates are up to about 500Khz. The filter coefficients are 32bit fixed point, the sample data is 12- 24bits. The downside is the package is a 3mm x 3mm QFN, however there is a DIP mounted IC protoboard available with a QF1D512 mounted on a standard DIP socket for prototyping but its more $. A very low end 8bit uC (Atmel Attiny) can be used to load the filter coefficients at restart or change the filter characteristics on the fly. There is a free filter designer application available from Quickfilter. It is also possible to design the filter and import the
coefficients into the filter designer to evaluate the performance.


Randy
AD7ZU



-----------------------------------------
10614 2014-12-17 11:20:39 Andy Re: Audio filter ringing
   "I actually think you may be on to something here, and it's worthy of some research and experimentation.  I don't think that the existing software can adequately take resistance wire into accurate consideration."

Actually, this is nothing new.  Almost 100 years ago people were designing filters using L's and C's and they understood pretty well the effects of resistance on the response.  As for software, not a problem!  You just need to enter the resistance you have.

Andy


10615 2014-12-17 11:22:18 Andy Re: Audio filter ringing
Chris,

It's probably not a good idea to think of signals bouncing around back and forth, and this being the cause of the ringing.  It's not.

Analog filters have a certain transfer function, which can be expressed mathematically with polynomials.  If you design a filter to have some transfer function, and it rings, well it's going to ring like that because that is what that transfer function does!  (It is what the impulse response of the transfer function does.)  It will do that whether you build the filter with coils and capacitors, or as an active filter with op-amps and R's and C's.  You can make a different transfer function whose impulse response doesn't ring as much ... but it's all in the mathematical transfer function ... not in the wires and the signals "bouncing around" on them.

Adding more resistance to the wires and L's changes the transfer function.  If the modified transfer function has less ringing, it's only because the new transfer function has less ringing.  You could have designed the filter to have that transfer function, right from the start, without using nichrome wires.  Yes, designers get to pick the transfer function they want.

The simple fact is, that if you make a very narrow lowpass or bandpass filter with steep skirts, you are discarding many of the frequency components needed to "keep the signal together", and the signal starts to spread out in time, and you might get ringing.  It's always a trade-off.  To get less ringing, you can keep more of those discarded frequencies (i.e., use a wider bandwidth filter), or change the steepness of the skirts, or maybe change the phase response in the passband in such a way that there is less "dispersion" and the signal stays together better.  At least the first two of these involve letting more "undesired" signal get through.  It's a trade-off.  You can't have a free lunch.  You can't get no ringing while also having very narrow bandwidth and very sharp filtering, no matter what elements are in the wires you use.

By the way, in the early days of electronics and telephony (~90 years ago), there were different classes of filters, and some were designed to reflect the unwanted frequencies back to the source (where they would be absorbed by the source impedance) whereas other filters were designed to absorb them within the filter.  But it makes no difference to the signal getting through the filter, if they both have the same transfer function.  The transfer function says everything about what the output signal looks like.

Regards,
Andy


10617 2014-12-17 13:36:35 boblarkin02 Re: Audio filter ringing
Adding to Andy's post, the filter ringing involves three elements, the filter amplitude response, the filter phasse (or delay) response and the response of the human listener.

Sizeable portions of the ringing comes from the phase or delay response.  If the filter is built with a single path for the signal (called "minimum phase" by the math guys) then the phase response and the amplitude response are locked together.  To remove the ringing from the non-linear phase (non-flat delay) you need a multipath structure, such as the FIR filter (p3.28 and 10.14 in EMRFD), or the delay equalizer (a somewhat laborious process for correcting filters after they introduce non-linear phase, but not covered in EMRFD).

After you fix the delay related ringing, you are left with amplitude shape related ringing that Andy discusses. Tucked away at the bottom of p10.19 is a brief discussion of a non-ringing, but yet selective filter.  This is a really interesting subject in that it does provide selectivity, in a way, and it does work!  BUT, the "sin(x)/x" response described in the footnote can be exasperating.  For instance, when set for 12 WPM CW dots, the tone period is 0.1 second, and the 6-dB filter bandwidth is about 6 Hz.  That calls for better than average tuning skill.  Making things worse, the filter has sidelobes every 6 Hz or so, that fll off, but not that fast.  50 Hz away from the center, the lobes are down about 30 dB.

But, if you know what frequency you want to receive on, and everything is stable, the performance is a pleasure to listen to.  There is no ringing, but the audio is still colored to the center frequency.  This challenges the ear after a while, just like any narrow filter. But, the reduction in noise produces a major S/N enhancement.  The math guys tell us that there is nothing better, and the name  "matched fiter" alludes to that.  The CW that could not be heard on any other filter design becomes copyable by the ear (or automatic device).  For this case of operating, the matched filter has much value.  My experience has been with the DSP-10 which has a filter matched to 12 WPM (yeah, each CW speed needs a different filter!).

Thus, thesin(x)/x matched filter makes major strides towards dealing with the issues of amplitude response ringing and with the human ear.  Try it, see what you think.

I am unaware of an analog implementation.  But, it would merely consist of a delay line with a bunch of taps added together, so it would be reasonable to do it in analog.  Any takers?

Also, the DFT displays, that are common now, can tell you where to tune the audio peak, easing the issues described above.

73, Bob  W7PUA
10618 2014-12-17 14:02:20 boblarkin02 Re: Audio filter ringing
I mispoke on the analog implementation.  Correcting, it could consist of a tapped line with *inverters* on every other tap when they are added.  This is equally simple. For a center frequency 600 Hz you would use a sample period (delay element) of 4x frequency, or 1/2400 second. At this rate every other tap multiplies by zero, so we don't build those, but instead use a delay element (all-pass filter) of 1/1200 sec.  Then every other tap needs to multiply by +/- 1.  For 12 WPM, you end up with 23 op amps.  For higher speeds, you use less than 24 taps, with a bunch of switches to make the selection.

Of course, I only built the DSP version, so this one may not work  ;-)

73,
Bob, W7PUA
10619 2014-12-17 14:50:58 Chris Howard w0ep Re: Audio filter ringing
First, what do you mean by "response"? Is that like
a black-box function, f(input) ==> output or a more
detailed characterization?

Second

If I have a diplexer, energy from some
signals goes one way and energy from other signals
goes another way.

In a filter, what happens to the energy of
the "other" signals? If I tune just past
a big booming signal and I can hear the
tiny signal, what is happening to the energy that
has entered my filter from Mr. Boomer?
Where did it go?

(this is very interesting stuff)

I need to get out my book, was this covered?




10623 2014-12-17 17:39:48 Chris Howard w0ep Re: Audio filter ringing
I found a bit: page 3.29 about analog FIR filters

"Among the significant lessons that emerge from a study of FIR
filters is the realization that filtering is a comparative
process; a signal is compared with a replica from an earlier
point in time. The nature of the comparison is
direct and clear in the FIR filter. It is present in the
simpler filters, be it a single LC resonator or crystal, or
and active version with an identical function. The signal
components from earlier times vanish from the resonator as
they dissipate in the tuned circuit losses."


I am a little bit familiar with DSP FIR filters.

I was listening to the 300 Hz audio filter on my rig
with an empty band. It didn't ring, sounded great.
When there were lots of signals on the band
I didn't hear lots of signals I heard lots of noise.
The signals being filtered out were the ones making
my filter noisy. Whether that was ringing or
from the energy dissipation or whatever EE term is
right, I don't know. The more work the filter
has to do, the worse it sounds.

Why do digital FIR filters have less ringing than
analog LC filters? (yes, I know they embody a different
function) With a digital filter you just throw away
the parts of the signal that don't fit the function
you want. With an LC filter you have to wait around for
them to dissipate. Is that why?

And from that I thought, maybe the memory in an
LC filter is because the signals move back and forth
between the filter elements like waves on a transmission
line. That is what resonators do, right?
If I could penalize them for multiple passes,
discriminate based on time, Maybe there is some
way to get that junk out of there.





10624 2014-12-17 18:00:55 Joe Re: Audio filter ringing
Group,

A long time ago I took up NDB (non-directional beacon) listening and soon realized that most of the then available audio filters were much too wide and were susceptible to ringing. 

However, some really novel approaches were available, i.e. Datong(1), Hildreth(2), Timewave(3), etc. and they were significantly better than any of the LC types.

Modern computer based filters are most probably superior to any non-computer based types. But my favorite is the analog design which was, to the best of my knowledge, developed by PA0LQ, and subsequently improved and popularized by PA0RDT, KO6BB and AA7U.

A description of this filter and a schematic may be found at:
  http://www.qsl.net/ko6bb/PA0LQ_Narrow_Audio_Filter.html

I am not sure of the topology but I have seen it described as having a Gaussian response, one which does not have steep falloff on either side of the passband.  Apparently in other analog designs, both active and passive, it is the steep falloff which is the reason for ringing.

I only mention this filter to illustrate what is possible, a very narrow (< 10Hz) audio filter with very negligible ringing.  Realistically, this filter requires an relatively small step and slow tuning rate which is not consistent with most general ham activity.  It would be a PITA.  8-(

On the other hand, an NDB tends to be on the same exact frequency 24/7 all year around.  This filter is ideal for separating multiple signals on a single frequency.

As for the OPs thought experiment:  I am under the understanding that ringing is caused by the incident energy shocking the filter and causing a damped wave oscillation at the resonant frequency of the filter.   (This last statement can be considered blather by those in the know.)

Joe, K9HDE


(1) Family of tunable active audio filters, some with automatic notching, a great engineering job done with simple CMOS chips. (I owned 2 FL-1s and reverse engineered a third. Liked the FL1 better than the fl-2 and FL-3.) (David A. Tong, Datong Electronics Limited)

(2) Active audio filter with a wide audio bandpass filter with another narrower BPF inside the wide one offset to avoid center frequency's ringing. ( Don Hildreth, W6NRW in 1980's Ham Radio Magazine)

(3) Active audio active filter (digital readout) had frequencies resettable, lottsa nice options, automatic noise reduction.  Indicated bandwidth at narrow frequencies was really optimistic. (indicated bandwidth ~ 1.3 dB down, not 3 dB down, would not have sold as many if the truth be known, but it was the best filter I had at the time and is still in use.)
10626 2014-12-17 18:56:31 David Re: Audio filter ringing
Sampling gates have a sin(x)/x response and this is what usually limits sampling
oscilloscope (not DSO) bandwidth.

On 17 Dec 2014 13:36:34 -0800, you wrote:

>Thus, thesin(x)/x matched filter makes major strides towards dealing with the issues of amplitude response ringing and with the human ear. Try it, see what you think.
>
>I am unaware of an analog implementation. But, it would merely consist of a delay line with a bunch of taps added together, so it would be reasonable to do it in analog. Any takers?
10627 2014-12-17 19:01:45 Chris Howard w0ep Re: Audio filter ringing
I'm reading more about response in chapter 3.

And a mention about the reflection of rejected
signals back to the input port of the filter.

I'll shut up and read for awhile.



10634 2014-12-18 12:53:19 Chris Howard w0ep Re: Audio filter ringing
I read most of chapter 3 last night and a bit of chapter 10 as
Bob suggested.

And I did some more thinking on Andy's reply and the other replies.

Adding resistance in a crystal filter would be similar
to raising the ESR (right?). That would lower the Q.
Maybe that would be good, maybe not. In an LC filter
it is hard to see where to add any resistance.

I think what I am trying to do is change an IIR filter to an FIR
filter, and I don't see any hint at how to do that or it if can
be done, without going to DSP.

I did see the analog FIR implementation in chapter 3.
I see that FIR implementations use a delay mechanism,
a transformation of the delayed elements and a summary/result.
It is hard to map that to an LC or crystal analog filter.

That brought another related question. Are there any chips
which will perform an FIR function in an analog environment?
I googled and found various academic papers. I found one
product that may be interesting. The DSD1700 takes a 1 bit
input and a clock and treats it as an oversampled digital signal
which it then runs through a fixed-configuration FIR filter.
If I ran my audio signal in at the proper level and an appropriate
clock, would the input act as a 1 bit ADC?
The frequency response curve is in the datasheet. If I scale
down the clock would it compress the response curve
proportionately? I'm not sure why I would want to do this
except to see if it works in making a less ringing
audio filter without the overhead of "real" DSP.

Chris
w0ep

p.s. thanks to anyone who is reading my posts.
I know it probably sounds a lot like sophomore
year with dumb questions. But I really do learn a lot.





10637 2014-12-18 14:39:20 Thomas S. Knutsen Re: Audio filter ringing
EMRFD ch. 3 is quite good on filter design, better than several college level texts I have used. It does explain the difference between Infinite Impulse Responce (IIR) and Finite Impulse Responce (FIR). There are as far as I know no way of going from IIR to FIR.
As for mapping the FIR filter to an crystal filter thats not going to be practical to do. You could use a delay line for the filter at RF, but that would still require a knowledge and understanding of the Q of delay line.

Adding resistance in series with the crystal does add to both the C0 parasitic capacitance and the series resonance. The result will be that the Q goes down as this resistance goes up. In the LC filter there are 2 ways to add resistance, in series or in shunt (parallel). The simplest way is in series with the inductors.
It is important to understand that for a given bandwith there is a minimum unloaded Q for each of the resonators given as:
Qunloaded > (2*f*n)/bw where f = resonator frequency, n = number of resonators and bw = the wanted filter bandwith. You can solve that equation for bandwith if that makes more sence.

If you want to implement the filter in audio, I still think the simplest approach is to use the $50 Arduino DUE. At 30mA it should be better than most of the avaible DSP solutions and you have 12bit ADC and DAC so its audio in - audio out. There are ready sketches on the web to work from.


73 de Thomas LA3PNA.


2014-12-18 21:53 GMT+01:00 Chris Howard w0ep w0ep@w0ep.us [emrfd] <emrfd@yahoogroups.com>:
 


I read most of chapter 3 last night and a bit of chapter 10 as
Bob suggested.

And I did some more thinking on Andy's reply and the other replies.

Adding resistance in a crystal filter would be similar
to raising the ESR (right?). That would lower the Q.
Maybe that would be good, maybe not. In an LC filter
it is hard to see where to add any resistance.

I think what I am trying to do is change an IIR filter to an FIR
filter, and I don't see any hint at how to do that or it if can
be done, without going to DSP.

I did see the analog FIR implementation in chapter 3.
I see that FIR implementations use a delay mechanism,
a transformation of the delayed elements and a summary/result.
It is hard to map that to an LC or crystal analog filter.

That brought another related question. Are there any chips
which will perform an FIR function in an analog environment?
I googled and found various academic papers. I found one
product that may be interesting. The DSD1700 takes a 1 bit
input and a clock and treats it as an oversampled digital signal
which it then runs through a fixed-configuration FIR filter.
If I ran my audio signal in at the proper level and an appropriate
clock, would the input act as a 1 bit ADC?
The frequency response curve is in the datasheet. If I scale
down the clock would it compress the response curve
proportionately? I'm not sure why I would want to do this
except to see if it works in making a less ringing
audio filter without the overhead of "real" DSP.

Chris
w0ep

p.s. thanks to anyone who is reading my posts.
I know it probably sounds a lot like sophomore
year with dumb questions. But I really do learn a lot.


10638 2014-12-18 15:02:55 David Re: Audio filter ringing
Switched capacitor filters could be designed this way but in practice they
implement other topologies.

On Thu, 18 Dec 2014 14:53:12 -0600, you wrote:

>That brought another related question. Are there any chips
>which will perform an FIR function in an analog environment?
>I googled and found various academic papers. I found one
>product that may be interesting. The DSD1700 takes a 1 bit
>input and a clock and treats it as an oversampled digital signal
>which it then runs through a fixed-configuration FIR filter.
>If I ran my audio signal in at the proper level and an appropriate
>clock, would the input act as a 1 bit ADC?
>The frequency response curve is in the datasheet. If I scale
>down the clock would it compress the response curve
>proportionately? I'm not sure why I would want to do this
>except to see if it works in making a less ringing
>audio filter without the overhead of "real" DSP.
>
>Chris
>w0ep
10640 2014-12-19 04:10:22 Alberto I2PHD Re: Audio filter ringing
10641 2014-12-19 07:25:50 nm0s_qrp Re: Audio filter ringing
The primary requirement for a filter to not ring in response to a pulsed waveform is to have a flat group delay within the pass band, and to the -6dB points in the skirts. A filter having a Bessel response tends to have this characteristic inherently, whether it is fabricated using a FIR or IIR or analog circuit.

Filters of other passband characteristics such as Butterworth or Chebychev tend not to have flat group delay, and are known for ringing.  It is possible to compensate for their non-flat group delay using all pass filters.

Blinchikoff writes about this extensively in his book, "Filtering in the Time and Frequency Domains", and it's an excellent reference.

The 4SQRP 'Hi-Per-Mite' CW filter http://www.4sqrp.com/HiPerMite.php uses a Blinchikoff-derived design to achieve its excellent no-ringing impulse response.

73 Dave NM0S