Reply by Rick Lyons October 14, 20052005-10-14
On 9 Oct 2005 16:55:06 -0700, "dbell" <dbell@niitek.com> wrote:

>Rick,
Hi,
>If you are refering to halfband filters that have almost half of their >taps as zero, those are always odd, and only of length 3, 7, 11, 15, 19 >,.. increasing in steps of 4 taps.
Yes.
>Multiplying any sequence that has zeros with another equal length >sequence will have zeros in the same locations and may introduce more. > >Are you talking about a combined mix by Fs/4 and decimate by 4 filter?
Not really. I shouldn't have used the term "even-tap half-band" filters. I should have just said "even-tap" filters. Sorry for the confusion. See Ya', [-Rick-]
Reply by dbell October 9, 20052005-10-09
Rick,

If you are refering to halfband filters that have almost half of their
taps as zero, those are always odd, and only of length 3, 7, 11, 15, 19
,.. increasing in steps of 4 taps.

Multiplying any sequence that has zeros with another equal length
sequence will have zeros in the same locations and may introduce more.

Are you talking about a combined mix by Fs/4 and decimate by 4 filter?

Dirk

Rick Lyons wrote:
> On 2 Oct 2005 00:34:37 -0700, "dbell" <dbell@niitek.com> wrote: > > >Rick, > > > >The symmetric cosine sequence (c(n)) multiplying the LP filter coeffs > >(h(n),n=0,...,N-1) will depend on the length N of the filter. > > > >I assume we are starting with an even symmetric LP filter, where N can > >be even or odd. The filter delay is n0=(N-1)/2 samples. > > > >The desired cosine sequence is given by > > > >c(n)=cos(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > > > >which is clearly even symmetric about n0. > > > >The corresponding desired sine sequence s(n) (change the sign if you > >like) is given by > > > >s(n)=sin(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > > > >which is clearly odd symmetric about n0. > > > (snipped) > > > >Dirk > > Hi Dirk (& Jerry) > > I don't know if I once knew about your c(n) and s(n) > mixing sequences and later forgot about them, or if > I never did know about them. In any case they're > "very slick" and they work just fine. > Neat. Very neat. > > (If I ever write a 3rd edition of my book, > I'll mention what you two have explained to me, > giving you both full credit.) > > One thing I noticed: if the original lowpass filter > is an even-tap half-band filter, and Fc = Fs/4, Dirk's > c(n) and s(n) mixing sequences work fine, but the > resulting bandpass filter doesn't have all the > zero-valued coefficients that are so beneficial. > In the case of starting with > an even-tap lowpass half-band filter, and Fc = Fs/4, > as far as I can tell, it's sensible to use > > c(n)=cos(2*pi*Fc/Fs*n), for n=0,...,N-1 > > and > > s(n)=sin(2*pi*Fc/Fs*n), for n=0,...,N-1 > > to end up with lots of those beneficial zero-valued > coefficients in the cos and sine filters. > > Dirk & Jerry, thanks for teachin' me some DSP. > > If there's a better newsgroup than this one, > I'd sure as heck like to know what it is. ;-) > > [-Rick-]
Reply by Rick Lyons October 9, 20052005-10-09
On 2 Oct 2005 00:34:37 -0700, "dbell" <dbell@niitek.com> wrote:

>Rick, > >The symmetric cosine sequence (c(n)) multiplying the LP filter coeffs >(h(n),n=0,...,N-1) will depend on the length N of the filter. > >I assume we are starting with an even symmetric LP filter, where N can >be even or odd. The filter delay is n0=(N-1)/2 samples. > >The desired cosine sequence is given by > >c(n)=cos(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > >which is clearly even symmetric about n0. > >The corresponding desired sine sequence s(n) (change the sign if you >like) is given by > >s(n)=sin(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > >which is clearly odd symmetric about n0. >
(snipped)
> >Dirk
Hi Dirk (& Jerry) I don't know if I once knew about your c(n) and s(n) mixing sequences and later forgot about them, or if I never did know about them. In any case they're "very slick" and they work just fine. Neat. Very neat. (If I ever write a 3rd edition of my book, I'll mention what you two have explained to me, giving you both full credit.) One thing I noticed: if the original lowpass filter is an even-tap half-band filter, and Fc = Fs/4, Dirk's c(n) and s(n) mixing sequences work fine, but the resulting bandpass filter doesn't have all the zero-valued coefficients that are so beneficial. In the case of starting with an even-tap lowpass half-band filter, and Fc = Fs/4, as far as I can tell, it's sensible to use c(n)=cos(2*pi*Fc/Fs*n), for n=0,...,N-1 and s(n)=sin(2*pi*Fc/Fs*n), for n=0,...,N-1 to end up with lots of those beneficial zero-valued coefficients in the cos and sine filters. Dirk & Jerry, thanks for teachin' me some DSP. If there's a better newsgroup than this one, I'd sure as heck like to know what it is. ;-) [-Rick-]
Reply by Rick Lyons October 9, 20052005-10-09
On Sun, 02 Oct 2005 16:10:57 -0400, Jerry Avins <jya@ieee.org> wrote:

>dbell wrote: >> That would work well for odd length filters. For even length filters >> the center of the filter is not on a sample so that would complicate >> things a little. But to get the idea across you could just use odd >> length filters. Align the odd length LP filter to zero and apply the >> trig functions as you have suggested, add in a delay to make it causal, >> and you are done. >> >> Dirk > >Also for even lengths, set zero at the center -- between two samples -- >and have the cosine peak and the sine cross zero there too. The values >of the sine and cosine can be appropriately computed from the sampling >points with just a little more effort (and more thought.) > >Jerry
Hi Jerry and Dirk, Yes, yes! I now understand what you guys are saying. Thanks for pounding away at me until I got my brain into gear. [-Rick-]
Reply by Jerry Avins October 2, 20052005-10-02
dbell wrote:
> That would work well for odd length filters. For even length filters > the center of the filter is not on a sample so that would complicate > things a little. But to get the idea across you could just use odd > length filters. Align the odd length LP filter to zero and apply the > trig functions as you have suggested, add in a delay to make it causal, > and you are done. > > Dirk
Also for even lengths, set zero at the center -- between two samples -- and have the cosine peak and the sine cross zero there too. The values of the sine and cosine can be appropriately computed from the sampling points with just a little more effort (and more thought.) Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by dbell October 2, 20052005-10-02
That would work well for odd length filters.  For even length filters
the center of the filter is not on a sample so that would complicate
things a little. But to get the idea across you could just use odd
length filters. Align the odd length LP filter to zero and apply the
trig functions as you have suggested, add in a delay to make it causal,
and you are done.

Dirk

Reply by Jerry Avins October 2, 20052005-10-02
dbell wrote:
> Rick, > > The symmetric cosine sequence (c(n)) multiplying the LP filter coeffs > (h(n),n=0,...,N-1) will depend on the length N of the filter. > > I assume we are starting with an even symmetric LP filter, where N can > be even or odd. The filter delay is n0=(N-1)/2 samples. > > The desired cosine sequence is given by > > c(n)=cos(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > > which is clearly even symmetric about n0. > > The corresponding desired sine sequence s(n) (change the sign if you > like) is given by > > s(n)=sin(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1 > > which is clearly odd symmetric about n0. > > Then, the final filters will be designed as > > c(n)*h(n) which is even symmetric about n0 (=>linear phase) > > and > > s(n)*h(n) which is odd symmetric about n0 (=>linear phase) > > both with length N and delay n0.
Maybe the simplest way to think about it is labeling the coefficients minus to plus, with zero in the center. The trig arguments go the same way. ... Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by dbell October 2, 20052005-10-02
Rick,

The symmetric cosine sequence (c(n)) multiplying the LP filter coeffs
(h(n),n=0,...,N-1) will depend on the length N of the filter.

I assume we are starting with an even symmetric LP filter, where N can
be even or odd.  The filter delay is n0=(N-1)/2 samples.

The desired cosine sequence is given by

c(n)=cos(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1

which is clearly even symmetric about n0.

The corresponding desired sine sequence s(n) (change the sign if you
like) is given by

s(n)=sin(2*pi*Fc/Fs*(n-n0)), for n=0,...,N-1

which is clearly odd symmetric about n0.

Then, the final filters will be designed as

c(n)*h(n) which is even symmetric about n0 (=>linear phase)

and

s(n)*h(n) which is odd symmetric about n0 (=>linear phase)

both with length N and delay n0.


Dirk


Rick Lyons wrote:
> On 28 Sep 2005 14:19:09 -0700, "dbell" <dbell@niitek.com> wrote: > > >Yes. The alignment between the sine and cosine must of course be > >fixed, but how you position them against the lowpass filter taps before > >you multiply is up to you. You can make the resulting filters > >symmetrical by effectively shifting the sine positive zero crossing and > >cosine maximum to both align with the point of symmetry of the original > >symmetric lowpass filter. > > > >Dirk > > Hi Dirk, > > Humm, maybe am missing something, and maybe I'm not. > > Let's just talk about a cosine sequence. I was > thinking about a cosine sequence of some > frequency Fc sampled at a sample rate of Fs. What > I was thinking was that this sequence will not > be symmetrical for all possible sequence lengths N. > > Dirk, I'll be out of town for the next 7-10 days on business > so if you reply and don't hear back from me for a while, > please know that I'm not ignoring you. > > [-Rick-]
Reply by Jerry Avins October 2, 20052005-10-02
Rick Lyons wrote:
> On 28 Sep 2005 14:19:09 -0700, "dbell" <dbell@niitek.com> wrote: > > >>Yes. The alignment between the sine and cosine must of course be >>fixed, but how you position them against the lowpass filter taps before >>you multiply is up to you. You can make the resulting filters >>symmetrical by effectively shifting the sine positive zero crossing and >>cosine maximum to both align with the point of symmetry of the original >>symmetric lowpass filter. >> >>Dirk > > > Hi Dirk, > > Humm, maybe am missing something, and maybe I'm not. > > Let's just talk about a cosine sequence. I was > thinking about a cosine sequence of some > frequency Fc sampled at a sample rate of Fs. What > I was thinking was that this sequence will not > be symmetrical for all possible sequence lengths N. > > Dirk, I'll be out of town for the next 7-10 days on business > so if you reply and don't hear back from me for a while, > please know that I'm not ignoring you.
It's simple for cosine alone. In the case of an odd number of terms, make the center term cos(0) and work out from there to both ends. That leaves the cosine branch symmetric. The sine is almost as simple. With the condition I specified, the sine term in the middle is zero and the sine branch is antisymmetric. One more thing. If the filter's bandwidth is enough wider than the signal's, a pure delay can replace the cosine branch. That pure delay comes free if the number of taps is odd. Sound familiar? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Rick Lyons October 1, 20052005-10-01
On 28 Sep 2005 14:19:09 -0700, "dbell" <dbell@niitek.com> wrote:

>Yes. The alignment between the sine and cosine must of course be >fixed, but how you position them against the lowpass filter taps before >you multiply is up to you. You can make the resulting filters >symmetrical by effectively shifting the sine positive zero crossing and >cosine maximum to both align with the point of symmetry of the original >symmetric lowpass filter. > >Dirk
Hi Dirk, Humm, maybe am missing something, and maybe I'm not. Let's just talk about a cosine sequence. I was thinking about a cosine sequence of some frequency Fc sampled at a sample rate of Fs. What I was thinking was that this sequence will not be symmetrical for all possible sequence lengths N. Dirk, I'll be out of town for the next 7-10 days on business so if you reply and don't hear back from me for a while, please know that I'm not ignoring you. [-Rick-]