Wave filter question (mainly for Joerg)

J

Joel Kolstad

Jan 1, 1970
0
Simple question on wave filters, that I've heard about but never used: Rumor
has it that wave filters are just the digital simulation of a classical L-C
(ladder-type) filter structure. True?

I skimmed the TI application note on DTMF detection using wave filters, and
there's an awful lot of unfamiliar (to me) material there. Somewhere I have a
print out of some IEEE tutorial on the subject, but I can't place my hands on
it at the moment.

What I'm really after is trying to find efficient (in terms of, e.g.,
multiply/accumulate cycles) tone detectors...

---Joel Kolstad
 
T

Tim Wescott

Jan 1, 1970
0
Joel said:
Simple question on wave filters, that I've heard about but never used: Rumor
has it that wave filters are just the digital simulation of a classical L-C
(ladder-type) filter structure. True?

I skimmed the TI application note on DTMF detection using wave filters, and
there's an awful lot of unfamiliar (to me) material there. Somewhere I have a
print out of some IEEE tutorial on the subject, but I can't place my hands on
it at the moment.

What I'm really after is trying to find efficient (in terms of, e.g.,
multiply/accumulate cycles) tone detectors...

---Joel Kolstad
I'm taking the liberty of cross-posting this to the DSP group because
you'll get a lot of good answers there, too.

I would look at either plain old bandpass filters of the form

(z+1)(z-1)
H(z) = -------------------------
z^2 - 2 d cos(th) z + d^2

or I would consider modulating the incoming signal with inphase and
quadrature versions of the tone you're looking for, and low-pass
filtering the result.

Note that I do _not_ have the famous Goertzel filter on this list. Odd,
that.

In the bandpass filter case you'll have to think carefully about the
form of the filter; the states can easily overflow, and you sometimes
need an astonishing precision to your variables for a high-Q filter.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google? See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
 
N

Nico Coesel

Jan 1, 1970
0
Joel Kolstad said:
Simple question on wave filters, that I've heard about but never used: Rumor
has it that wave filters are just the digital simulation of a classical L-C
(ladder-type) filter structure. True?

I skimmed the TI application note on DTMF detection using wave filters, and
there's an awful lot of unfamiliar (to me) material there. Somewhere I have a
print out of some IEEE tutorial on the subject, but I can't place my hands on
it at the moment.

What I'm really after is trying to find efficient (in terms of, e.g.,
multiply/accumulate cycles) tone detectors...

If you are into tone detectors, don't use filters for detection.
Filters are good to isolate the frequency spectrum of interest.
Nothing more. If you want to detect a tone, you have to watch 3
parameters: frequency, allowed error and minimum duration. So what you
want to know is whether the frequency of the signal is whithin spec.
and how long the frequency is present. Both are easy to get from a
signal.
 
N

Nico Coesel

Jan 1, 1970
0
Tim Wescott said:
I'm taking the liberty of cross-posting this to the DSP group because
you'll get a lot of good answers there, too.

I would look at either plain old bandpass filters of the form

(z+1)(z-1)
H(z) = -------------------------
z^2 - 2 d cos(th) z + d^2

or I would consider modulating the incoming signal with inphase and
quadrature versions of the tone you're looking for, and low-pass
filtering the result.

Note that I do _not_ have the famous Goertzel filter on this list. Odd,
that.

Goertzel doesn't work for detecting tones reliably especially when a
few percent of error is allowed.
 
J

Joel Kolstad

Jan 1, 1970
0
Hi Nico,

Nico Coesel said:
If you want to detect a tone, you have to watch 3
parameters: frequency, allowed error and minimum duration. So what you
want to know is whether the frequency of the signal is whithin spec.
and how long the frequency is present. Both are easy to get from a
signal.

How would you suggest obtaining "the frequency" (i.e., the major component of
a signal) given that -- in a real system -- there's plenty of noise around?
(Probably about 10dB SNR here...) What I'm used to in the continuous time
domain is closer to what Tim suggested -- bandpass filter, rectify & low-pass
filter the result. Frequencies error should be in the single-digit percentage
ballpark, but may be as poor as, say, +/-10%.

I agree with both you and Tim that the Goertzel "filter" (the term filter
being a bit of a stretch in my mind!) isn't at all robust.

Thanks for the help,
---Joel
 
J

Joerg

Jan 1, 1970
0
Hello Joel,

Simple question on wave filters, that I've heard about but never used: Rumor
has it that wave filters are just the digital simulation of a classical L-C
(ladder-type) filter structure. True?

Yes. You'll have to first design the analog structure and then transfer
it. I don't know of any other design methodology.

I skimmed the TI application note on DTMF detection using wave filters, and
there's an awful lot of unfamiliar (to me) material there. Somewhere I have a
print out of some IEEE tutorial on the subject, but I can't place my hands on
it at the moment.

Most of the stuff I have is in German so I guess that wouldn't help you.
Professor Fettweis published his famous 1986 paper "Wave Digital
Filters: Theory and Practice" which is still considered "the WDF paper".
I don't have it but if you have access to IEEE-Explore you should find it.

I could send you some info about WDF. If interested let me know your
real email address but it needs to be one where you can receive a huge
file. Might be until tomorrow to get to the stuff though.

The design program I am using is the one from Professor Mildenberger:
http://www.ite.fh-wiesbaden.de/~mildeno/
Download links are at the page bottom but you'll need at least some
elementary knowledge of German and a dictionary next to the keyboard.
Also, if it's still the old stuff it'll be DOS-based. Mine is an old
licensed copy that I bought but now it's free AFAIK.

There is also WDF design SW at Texas Instruments, from the group around
Dr.Ulrich Kaiser. I only got it under the condition not to distribute
but they told me that others can ask TI support for it. I like the
Mildenberger SW better (but I understand German...)

Just don't expect any exhaustively documented software or fancy user
interface. It's more like bare-bones race cars assuming you know how the
fire extinguishing and all that works :)

What I'm really after is trying to find efficient (in terms of, e.g.,
multiply/accumulate cycles) tone detectors...

WDFs are pretty good at that if you have to do it on budget hardware,
IOW when there are no leather seats and hardware multipliers. They are
also very stable in the presence of disruptions, something that needs
extra tricks on classical digital filters (but can also be done there).

Goertzel is another option as Tim mentioned. However, they will quickly
clog your processor when you need to detect more than a handful of
frequencies simultaneously. You'd have to "price out" whether a full FFT
might be better in terms of economy.

Regards, Joerg
 
J

Joel Kolstad

Jan 1, 1970
0
Thanks for the detailed reply, Joerg.

Joerg said:
Most of the stuff I have is in German so I guess that wouldn't help you.
Professor Fettweis published his famous 1986 paper "Wave Digital Filters:
Theory and Practice" which is still considered "the WDF paper". I don't have
it but if you have access to IEEE-Explore you should find it.

That's the paper I was looking for -- thanks for the title; I've downloaded a
copy (it's old enough that it's scanned, but at least it's a PDF -- the copy
with unknown whereabouts I have was Xeroxed...)
I could send you some info about WDF. If interested let me know your real
email address but it needs to be one where you can receive a huge file.
Might be until tomorrow to get to the stuff though.

Let me digest a few other things first before you make the effort, but thanks
for the offer. My real e-mail address is just removing "hates spam" at the
end of [email protected].
There is also WDF design SW at Texas Instruments, from the group around
Dr.Ulrich Kaiser. I only got it under the condition not to distribute but
they told me that others can ask TI support for it. I like the Mildenberger
SW better (but I understand German...)

Spanish I could do passably, but German... mmm... not so much. :) I'll talk
to TI and see what they have to say.
WDFs are pretty good at that if you have to do it on budget hardware, IOW
when there are no leather seats and hardware multipliers. They are also very
stable in the presence of disruptions, something that needs extra tricks on
classical digital filters (but can also be done there).

The hardware budget isn't tight, but there is plenty of noise (it's a wireless
link). A full FFT might be worthwhile, since we actually have 17 tones to
detect (not just 7 or 8 like DTMF does).

---Joel
 
J

Joerg

Jan 1, 1970
0
Hello Joel,

That's the paper I was looking for -- thanks for the title; I've downloaded a
copy (it's old enough that it's scanned, but at least it's a PDF -- the copy
with unknown whereabouts I have was Xeroxed...)

That should give you the essence of wave digital filtering.
Let me digest a few other things first before you make the effort, but thanks
for the offer. My real e-mail address is just removing "hates spam" at the
end of [email protected].

Ok, just let me know if you need more but with 17 tones I am not so sure
WDF is the right approach.
Spanish I could do passably, but German... mmm... not so much. :) I'll talk
to TI and see what they have to say.

It helps to have a glass of Spaten Optimator beforehand (Trader Joe's
has it). Just don't drive after that :)
The hardware budget isn't tight, but there is plenty of noise (it's a wireless
link). A full FFT might be worthwhile, since we actually have 17 tones to
detect (not just 7 or 8 like DTMF does).

If you can allow for a DSP or uC with a HW multiplier I'd consider the
FFT. Look at the bandwidths you want for each tone. If they are all
grossly different the FFT might become a bit large and you have to do
binning. Sometimes individual DFTs (which is what the Goertzel
essentially is) can be easier. The nice feature about FFTs and DFTs is
that you can use a "routine in a can" for most architectures whereas
something like a WDF usually needs to be coded by hand from scratch,
more work.

Noise is one thing but more worrisome would be hard signal drop-outs.
That can throw DFT stuff and especially IIR filters off the rocker. WDFs
are said to be more tolerant against that but I never had a case where
that was too much of a concern. Although it was nice to see how they
never had a continuous little oscillation trailer when shorting the
input for a brief moment.

Regards, Joerg
 
N

Nico Coesel

Jan 1, 1970
0
Joel Kolstad said:
Hi Nico,



How would you suggest obtaining "the frequency" (i.e., the major component of
a signal) given that -- in a real system -- there's plenty of noise around?
(Probably about 10dB SNR here...) What I'm used to in the continuous time
domain is closer to what Tim suggested -- bandpass filter, rectify & low-pass
filter the result. Frequencies error should be in the single-digit percentage
ballpark, but may be as poor as, say, +/-10%.

How about measuring the frequency (zero crossings)? Or using an
adapted FFT which gives you precise frequency information
(http://www.dspdimension.com/data/html/pshiftstft.html)?
I think it is not a good idea to clone analog solutions to digital
solutions. Digital solution offer many more approaches to a problem.
 
J

Joerg

Jan 1, 1970
0
Hello Nico,
How about measuring the frequency (zero crossings)? Or using an
adapted FFT which gives you precise frequency information
(http://www.dspdimension.com/data/html/pshiftstft.html)?


Zero crossers work nicely in a low noise environment put they really
fall apart on noisy channels. Been there a lot, mostly for vascular
Doppler apps.

I think it is not a good idea to clone analog solutions to digital
solutions. Digital solution offer many more approaches to a problem.

Err, analog filters have a tendency to be unconditionally stable. That
is one of the traits they bestowed on the digital world with WDF.
Probably they did so kicking and screaming ;-)

Regards, Joerg
 
J

Joel Kolstad

Jan 1, 1970
0
Joerg said:
Err, analog filters have a tendency to be unconditionally stable. That is
one of the traits they bestowed on the digital world with WDF. Probably they
did so kicking and screaming ;-)

Indeed. :)

I was at the local Wal*Mart today, Joerg, and guess what they had on
clearance? HDTV (ATSC) to composite/S-Video/component/etc. converter boxes,
all of $129 each! I wouldn't be surprised if they're not being replaced by a
newer model, but rather Wal*Mart just won't sell such converters given what I
suspect was a rather low uptake rate. (Something that probably won't change
for a handful of years, by which point converters might be... $49?)
 
J

Jim Thompson

Jan 1, 1970
0
On Thu, 11 May 2006 18:00:08 -0700, "Joel Kolstad"

[snip]
I was at the local Wal*Mart today, Joerg, and guess what they had on
clearance? HDTV (ATSC) to composite/S-Video/component/etc. converter boxes,
all of $129 each! I wouldn't be surprised if they're not being replaced by a
newer model, but rather Wal*Mart just won't sell such converters given what I
suspect was a rather low uptake rate. (Something that probably won't change
for a handful of years, by which point converters might be... $49?)

A newbie-level question...

I have no clue what the HDTV format is like.

Is it possible to convert HDTV with a block converter so I can
continue to use my old composite TV sets?

I have 7 sets, 5 of which are over ten years old ;-)

...Jim Thompson
 
J

Joel Kolstad

Jan 1, 1970
0
Hi Jim,

Jim Thompson said:
A newbie-level question...

I have no clue what the HDTV format is like.

Natively it's an MPEG-2 (compressed video) bitstream. "They" (the
broadcasters) have a choice of a handful of different resolutions (see
http://en.wikipedia.org/wiki/High-definition_television) and therefore can fit
multiple (up to 4) "standard" definition TV (SDTV) channels into the
traditional 6MHz channel spacing; HDTV tuners hence end up with
"sub-channels," e.g., channel 14.1, 14.2, and 14.3, where it's understood that
"channel 14" comes with a single broadcaster and you get 3 choices of
programming. "True" high-definition video results when they do use the entire
6MHz for a single show, and this does look noticeably better than SDTV; the
Olympics back in February looked *very* nice.

Generally speaking, most true HD shows use a 16:9 aspect ratio (so a 4:3 TV
set ends up with horizonal bars across the top and bottom) whereas SD programs
stick to 4:3 (so a 16:9 TV set ends up with vertical bars across the left and
right... although most 16:9 TV sets have options to distort and/or crop the
image to fit the screen in various ways).
Is it possible to convert HDTV with a block converter so I can
continue to use my old composite TV sets?

That's what the box I was describing does, although of course the quality of
the end result is going to be limited by the analog connection -- hence the
reason these boxes have component video outputs. I'd expect that with only
composite inputs on a TV, the main features you'd get would be the elimination
of show and ghosts rather than any noticeable resolution improvement (so
probably no real benefit at all if you already have cable TV...).

If you visit antennaweb.org it'll show you nearby HDTV transmitters (and the
bearing and distance to them); it looks like you have many to choose from
there in Phoenix!

---Joel
 
J

Jim Thompson

Jan 1, 1970
0
Hi Jim,



Natively it's an MPEG-2 (compressed video) bitstream. "They" (the
broadcasters) have a choice of a handful of different resolutions (see
http://en.wikipedia.org/wiki/High-definition_television) and therefore can fit
multiple (up to 4) "standard" definition TV (SDTV) channels into the
traditional 6MHz channel spacing; HDTV tuners hence end up with
"sub-channels," e.g., channel 14.1, 14.2, and 14.3, where it's understood that
"channel 14" comes with a single broadcaster and you get 3 choices of
programming. "True" high-definition video results when they do use the entire
6MHz for a single show, and this does look noticeably better than SDTV; the
Olympics back in February looked *very* nice.

Generally speaking, most true HD shows use a 16:9 aspect ratio (so a 4:3 TV
set ends up with horizonal bars across the top and bottom) whereas SD programs
stick to 4:3 (so a 16:9 TV set ends up with vertical bars across the left and
right... although most 16:9 TV sets have options to distort and/or crop the
image to fit the screen in various ways).


That's what the box I was describing does, although of course the quality of
the end result is going to be limited by the analog connection -- hence the
reason these boxes have component video outputs. I'd expect that with only
composite inputs on a TV, the main features you'd get would be the elimination
of show and ghosts rather than any noticeable resolution improvement (so
probably no real benefit at all if you already have cable TV...).

If you visit antennaweb.org it'll show you nearby HDTV transmitters (and the
bearing and distance to them); it looks like you have many to choose from
there in Phoenix!

---Joel

Over-the-air is of no value to me... I have a serious mountain range
in the way. I'm presently on Cox Cable Basic... I take no pay
channels.

...Jim Thompson
 
N

Nico Coesel

Jan 1, 1970
0
Joerg said:
Hello Nico,



Zero crossers work nicely in a low noise environment put they really
fall apart on noisy channels. Been there a lot, mostly for vascular
Doppler apps.

Are you sure? At 10dB SN ratio the dominant frequency will still
dictate the zero crossings. I have had excellent results with tone
detectors based on zero crossings in telecommunications systems.
Err, analog filters have a tendency to be unconditionally stable. That
is one of the traits they bestowed on the digital world with WDF.
Probably they did so kicking and screaming ;-)

Perhaps filters is a field where there is not much to gain. But that
is not the point I tried to make :)
 
J

Joerg

Jan 1, 1970
0
Hello Nico,
Are you sure? At 10dB SN ratio the dominant frequency will still
dictate the zero crossings. I have had excellent results with tone
detectors based on zero crossings in telecommunications systems.

10dB SNR with a smooth hash type noise can be ok but the real world
often imposes other noises. The average might still be 10dB but there
are spikes, pops, drop-outs, you name it. In my world (medical) it would
be wall echoes from hardened blood vessels. In Doppler ultrasound those
can easily be 40dB stronger than the echoes you want to measure and it
is expected that the Doppler still shows the correct flow values. A
simple zero crosser doesn't stand a chance in that scenario. They were
used in the old days in cases where digital (or analog) filtering was
just too expensive, but only for simple applications.
Perhaps filters is a field where there is not much to gain. But that
is not the point I tried to make :)

If you enter the world of correlators then, of course, analog is mostly
out of range.

Regards, Joerg
 
N

Nico Coesel

Jan 1, 1970
0
Joerg said:
Hello Nico,

Err, analog filters have a tendency to be unconditionally stable. That
is one of the traits they bestowed on the digital world with WDF.
Probably they did so kicking and screaming ;-)

In my experience digital filters are just as stable as analog ones as
long as they are not oversteered and there is enough head room for the
filter's Q factor. The latter is easely overlooked.
 
G

geroldschrutz

Jan 1, 1970
0
Nico Coesel said:
Goertzel doesn't work for detecting tones reliably especially when a
few percent of error is allowed.

just widen the bandwidth (of the "filter") by using a window, then Goertzel

is more "error tolerant".

Gerold Schrutz
 
N

Nico Coesel

Jan 1, 1970
0
geroldschrutz said:
just widen the bandwidth (of the "filter") by using a window, then Goertzel

is more "error tolerant".

Still, the error margin will be smaller for high amplitude signals
than for low amplitude signals.
 
Top