# questions raised by reading and thinking with possibly missing background

Started by December 10, 2005
```abariska@student.ethz.ch writes:

> Randy Yates wrote:
>> abariska@student.ethz.ch writes:
>>
>> > Richard Owlett wrote:
>> >> Richard Owlett wrote:
>> >>
>> >> > ...
>> >> > That got me thinking ;<
>> >>
>> >> What are the *NECESSARY* conditions for a FIR filter of an arbitrary
>> >> shape in the frequency domain to be "linear phase".
>> >>
>> >> One of the references I was reading stated that "a FIR filter would be
>> >> 'linear phase' if its coefficients were symmetric about the middle
>> >> coefficient."
>> >>
>> >> Is that a "sufficient" condition or a "necessary" condition?
>> >
>> > We discussed this last June:
>> >
>>
>> Consider the filter coefficients determined as
>>
>> function y = test(x)
>> %function y = test(x)
>> n = [-25 : 25];
>> Fs = 1;
>> Ts = 1/Fs;
>> t = n*Ts;
>> plot(sinc(t+1/7));
>>
>> These are neither symmetric nor antisymmetric in the sense you defined,
>> and yet this is a linear phase filter, is it not?
>
> No, it's not.

True, but this is:

b[n] = sinc(n + 1/7)

The truncation was unintended - just to get a plot in Matlab.
--
%  Randy Yates                  % "My Shangri-la has gone away, fading like
%% Fuquay-Varina, NC            %  the Beatles on 'Hey Jude'"
%%% 919-577-9882                %
%%%% <yates@ieee.org>           % 'Shangri-La', *A New World Record*, ELO
```
```"Peter K." <p.kootsookos@iolfree.ie> writes:
> [...]
> I'm with Andor:
>
>>> X = grpdelay(sinc(t+1/7),1,20);
>>> X
>
> X =
>
>    24.7190
>    24.8790
> [...]

Those ripples are apparently from truncation. I haven't
proved it, but the longer you extend the sequence, the
smaller they become.

As I stated to Andor, I think

b[n] = sinc(n + 1/7)

is linear phase, and doesn't match the symmetric/antisymmetric
requirement.

then delay it by a fractional sample amount, it's still linear phase,
but it ain't necessarily symmetric anymore.

The symmetry condition is sufficient, not necessary.
--
%  Randy Yates                  % "Maybe one day I'll feel her cold embrace,
%% Fuquay-Varina, NC            %                    and kiss her interface,
%%% 919-577-9882                %            til then, I'll leave her alone."
%%%% <yates@ieee.org>           %        'Yours Truly, 2095', *Time*, ELO
```
```Randy Yates <yates@ieee.org> writes:

> Those ripples are apparently from truncation. I haven't
> proved it, but the longer you extend the sequence, the
> smaller they become.
>
> As I stated to Andor, I think
>
>   b[n] = sinc(n + 1/7)
>
> is linear phase, and doesn't match the symmetric/antisymmetric
> requirement.
>
> then delay it by a fractional sample amount, it's still linear phase,
> but it ain't necessarily symmetric anymore.
>
> The symmetry condition is sufficient, not necessary.

Certainly!  The Clements and Pease paper (see
http://0xdc.com/CLPIIR.html for an example) showed that there exist
causal, IIR, linear phase impulse responses... they're just not
realizable using rational transfer functions.

Ciao,

Peter K.

```
```Richard Owlett wrote:
> Picking numbers *AT RANDOM*
> Are you saying that a "low pass" filter with an overall passband of 10
> kHz with "peaks" at 2 kHz, 3.14 kHz, and 7.9631 kHz with relative
> amplitudes of 1, 2.91234, and 1.167 *could not* be linear phase?

Three peaks implies a multiple number of poles and zeros,
which can be reflected around (left or right half plane) for
multiple phase relationships, none of which might be linear,
even though for identical frequency response filters.

Linear phase implies that if you know the delay of one
frequency (the time it takes a zero crossing at the input
to appear at the output), it's the same for all frequencies
(realistically, only within the passband of the filter).

IMHO. YMMV.
--
rhn A.T nicholson d.O.t C-o-M

```
```Randy Yates wrote:
> "Peter K." <p.kootsookos@iolfree.ie> writes:
>
>>[...]
>>I'm with Andor:
>>
>>
>>>>X = grpdelay(sinc(t+1/7),1,20);
>>>>X
>>
>>X =
>>
>>   24.7190
>>   24.8790
>>[...]
>
>
> Those ripples are apparently from truncation. I haven't
> proved it, but the longer you extend the sequence, the
> smaller they become.
>
> As I stated to Andor, I think
>
>   b[n] = sinc(n + 1/7)
>
> is linear phase, and doesn't match the symmetric/antisymmetric
> requirement.
>
> then delay it by a fractional sample amount, it's still linear phase,
> but it ain't necessarily symmetric anymore.
>
> The symmetry condition is sufficient, not necessary.

I think I stated earlier, in an oblique way tailored to Richard, that
pure delay added to a linear-phase transfer function won't impair the
phase linearity. b[n] = sinc(n + 1/7 is only pure delay when n ranges
from negative to positive infinity. We didn't start this discussion soon
enough and I won't be around to see it through. :-)

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```Randy Yates wrote:
> abariska@student.ethz.ch writes:
>
> > Randy Yates wrote:
> >> abariska@student.ethz.ch writes:
> >>
> >> > Richard Owlett wrote:
> >> >> Richard Owlett wrote:
> >> >>
> >> >> > ...
> >> >> > That got me thinking ;<
> >> >>
> >> >> What are the *NECESSARY* conditions for a FIR filter of an arbitrary
> >> >> shape in the frequency domain to be "linear phase".
> >> >>
> >> >> One of the references I was reading stated that "a FIR filter would be
> >> >> 'linear phase' if its coefficients were symmetric about the middle
> >> >> coefficient."
> >> >>
> >> >> Is that a "sufficient" condition or a "necessary" condition?
> >> >
> >> > We discussed this last June:
> >> >
> >>
> >> Consider the filter coefficients determined as
> >>
> >> function y = test(x)
> >> %function y = test(x)
> >> n = [-25 : 25];
> >> Fs = 1;
> >> Ts = 1/Fs;
> >> t = n*Ts;
> >> plot(sinc(t+1/7));
> >>
> >> These are neither symmetric nor antisymmetric in the sense you defined,
> >> and yet this is a linear phase filter, is it not?
> >
> > No, it's not.
>
> True, but this is:
>
>   b[n] = sinc(n + 1/7)

This is a symmetric filter plus a fractional tap delay, or vice
versa.  Given a perfectly bandlimited filter function, no truncation,
and infinite precision, the fractional delay should be linear in
phase delay.  Practically, it's a little harder to analyze than
a set of symmetric tap coefficients, which are linear phase
even with lots of (symmetric) truncation, and (symmetric)
quantization.

IMHO. YMMV.
--
rhn A.T nicholson d.O.t C-o-M

```
```Vladimir Vassilevsky wrote:
>
>
> Jerry Avins wrote:
>
>
>> A linear-phase phono equalizer completely louses up the transient
>> response. A "perfect" linear-phase speaker crossover often sounds much
>> worse that the minimum-phase analog approximation that it replaced.
>
>
>
> Don't look at the transient response and linear phase will sound just as
> good as the minimal phase :) We are entering the area of the holy wars
> of the blunt-pointed vs sharp pointed. From my experience the only
> observable difference results from the implementation issues like
> overflows, loss of accuracy, group delay or frequency response mismatch
> and such.
>
> BTW, what do you think about Bessel filters, which are the minimum phase
> approximations of the linear phase?

Bessel filters are good for many applications, but not for crossovers.
Their approximation to linear phase breaks down at the crossover
frequency, where it matters most. As far as I know, Bessel filters are
low-pass. The filters produced by the usual low- to high-pass
transformation approximate linear phase very poorly. It's a mess.

There is an excellent crossover -- Linkwitz-Riley -- that consists of
cascaded second-order Butterworth (Butterworth^2) sections. When used
with appropriate offset, it allows a very wide angle of good
performance. Most crossovers are evaluated only on axis, hardly a
reasonable basis, especially in a theater.

http://www.rane.com/note147.html http://www.rane.com/note160.html

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```Vladimir Vassilevsky wrote:
>
>
> Jerry Avins wrote:
>
>
>> A linear-phase phono equalizer completely louses up the transient
>> response. A "perfect" linear-phase speaker crossover often sounds much
>> worse that the minimum-phase analog approximation that it replaced.
>
>
>
> Don't look at the transient response and linear phase will sound just as
> good as the minimal phase :) We are entering the area of the holy wars
> of the blunt-pointed vs sharp pointed. From my experience the only
> observable difference results from the implementation issues like
> overflows, loss of accuracy, group delay or frequency response mismatch
> and such.
>
> BTW, what do you think about Bessel filters, which are the minimum phase
> approximations of the linear phase?

Bessel filters are good for many applications, but not for crossovers.
Their approximation to linear phase breaks down at the crossover
frequency, where it matters most. As far as I know, Bessel filters are
low-pass. The filters produced by the usual low- to high-pass
transformation approximate linear phase very poorly. It's a mess.

There is an excellent crossover -- Linkwitz-Riley -- that consists of
cascaded second-order Butterworth (Butterworth^2) sections. When used
with appropriate offset, it allows a very wide angle of good
performance. Most crossovers are evaluated only on axis, hardly a
reasonable basis, especially in a theater.

http://www.rane.com/note147.html http://www.rane.com/note160.html

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```Vladimir Vassilevsky wrote:
>
>
> Jerry Avins wrote:
>
>
>> A linear-phase phono equalizer completely louses up the transient
>> response. A "perfect" linear-phase speaker crossover often sounds much
>> worse that the minimum-phase analog approximation that it replaced.
>
>
>
> Don't look at the transient response and linear phase will sound just as
> good as the minimal phase :) We are entering the area of the holy wars
> of the blunt-pointed vs sharp pointed. From my experience the only
> observable difference results from the implementation issues like
> overflows, loss of accuracy, group delay or frequency response mismatch
> and such.
>
> BTW, what do you think about Bessel filters, which are the minimum phase
> approximations of the linear phase?

Bessel filters are good for many applications, but not for crossovers.
Their approximation to linear phase breaks down at the crossover
frequency, where it matters most. As far as I know, Bessel filters are
low-pass. The filters produced by the usual low- to high-pass
transformation approximate linear phase very poorly. It's a mess.

There is an excellent crossover -- Linkwitz-Riley -- that consists of
cascaded second-order Butterworth (Butterworth^2) sections. When used
with appropriate offset, it allows a very wide angle of good
performance. Most crossovers are evaluated only on axis, hardly a
reasonable basis, especially in a theater.

http://www.rane.com/note147.html http://www.rane.com/note160.html

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```Richard Owlett <rowlett@atlascomm.net> writes:

> Randy Yates wrote:
>
>> abariska@student.ethz.ch writes:
>>
>>>Richard Owlett wrote:
>>>
>>>>Richard Owlett wrote:
>>>>
>>>>
>>>>>...
>>>>>That got me thinking ;<
>>>>
>>>>What are the *NECESSARY* conditions for a FIR filter of an arbitrary
>>>>shape in the frequency domain to be "linear phase".
>>>>
>>>>One of the references I was reading stated that "a FIR filter would be
>>>>'linear phase' if its coefficients were symmetric about the middle
>>>>coefficient."
>>>>
>>>>Is that a "sufficient" condition or a "necessary" condition?
>>>
>>>We discussed this last June:
>>>
>> Consider the filter coefficients determined as
>> function y = test(x)
>> %function y = test(x)
>> n = [-25 : 25];
>> Fs = 1;
>> Ts = 1/Fs;
>> t = n*Ts;
>> plot(sinc(t+1/7));
>> These are neither symmetric nor antisymmetric in the sense you
>> defined,
>> and yet this is a linear phase filter, is it not?
>
> je ne comprend pas ;]
>
> Can you give me code understood by Scilab so I can know what point you
> wish to make ;[

Sorry, Richard, I don't know Scilab. You can download Octave (a Matlab
clone) and try the code there.

You should be able to construct the basic response in your head
anyway.  It's just a since function, shifted left by 1/7 of a second
(but still sampled at n*Ts intervals). Since I set my sample rate to 1
Hz (Ts = 1 second), this means the 1/7 second is a fraction of a
sample delay, so the sinc() function, which is usually nice and
symmetric about 0, is no longer symmetric.
--
%  Randy Yates                  % "I met someone who looks alot like you,
%% Fuquay-Varina, NC            %             she does the things you do,
%%% 919-577-9882                %                     but she is an IBM."
%%%% <yates@ieee.org>           %        'Yours Truly, 2095', *Time*, ELO