Sign in

Not a member? | Forgot your Password?

Search compdsp

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction

Discussion Groups

IIR Filter Design Software

Free Online Books

See Also

Embedded SystemsFPGA

Discussion Groups | Comp.DSP | Cascade All Pass Filters

There are 13 messages in this thread.

You are currently looking at messages 1 to .


Is this discussion worth a thumbs up?

0

Cascade All Pass Filters - Dan Brateris - 2009-05-10 20:21:00

Hello All,

Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
for filters with dbGain blocks after them for the gains.  My filters
are IIR filters designed using the butterworth design method. The
problem is that in the passband of my filters the phase is not
perfectly linear.  Could someone help instruct me on how to use matlab
to design an all pass filter to linearize the phase in these filters?

Thank you,
Dan


Re: Cascade All Pass Filters - Jerry Avins - 2009-05-10 21:06:00

Dan Brateris wrote:
> Hello All,
> 
> Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
> for filters with dbGain blocks after them for the gains.  My filters
> are IIR filters designed using the butterworth design method. The
> problem is that in the passband of my filters the phase is not
> perfectly linear.  Could someone help instruct me on how to use matlab
> to design an all pass filter to linearize the phase in these filters?

First of all, ask yourself if you need linear phase. (If you weren't 
aware that Butterworth filters don't exhibit linear phase, you are now 
that I informed you. In fact, no IIR filters exhibit linear phase.)

Second, determine whether the combination of a nonlinear-phase filter 
and an all-pass to approximately correct the phase is more cumbersome 
than an FIR filter that inherently has linear phase. In general, 
all-pass filters are useful for correcting phase errors that are not 
under the designer's control. When possible, do it right and avoid 
correction.

Jerry

P.S. Many practitioners believe that linear-phase filters don't sound 
very good. The issue is pre-echo. http://en.wikipedia.org/wiki/Pre-echo
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯


Re: Cascade All Pass Filters - Tim Wescott - 2009-05-10 23:06:00

On Sun, 10 May 2009 21:06:58 -0400, Jerry Avins wrote:

> Dan Brateris wrote:
>> Hello All,
>> 
>> Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
>> for filters with dbGain blocks after them for the gains.  My filters
>> are IIR filters designed using the butterworth design method. The
>> problem is that in the passband of my filters the phase is not
>> perfectly linear.  Could someone help instruct me on how to use matlab
>> to design an all pass filter to linearize the phase in these filters?
> 
> First of all, ask yourself if you need linear phase. (If you weren't
> aware that Butterworth filters don't exhibit linear phase, you are now
> that I informed you. In fact, no IIR filters exhibit linear phase.)
> 
> Second, determine whether the combination of a nonlinear-phase filter
> and an all-pass to approximately correct the phase is more cumbersome
> than an FIR filter that inherently has linear phase. In general,
> all-pass filters are useful for correcting phase errors that are not
> under the designer's control. When possible, do it right and avoid
> correction.

No _stable_ IIR filters exhibit linear phase.  If you're willing to 
discard that one trivial requirement (or causality, either one) then you 
can have a linear IIR filter.

(Sorry, your answer couldn't be improved upon so I thought I'd get out 
the rattle-can of Theory and tag it).

-- 
http://www.wescottdesign.com


Re: Cascade All Pass Filters - HardySpicer - 2009-05-11 04:16:00

On May 10, 6:06 pm, Jerry Avins <j...@ieee.org> wrote:
> Dan Brateris wrote:
> > Hello All,
>
> > Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
> > for filters with dbGain blocks after them for the gains.  My filters
> > are IIR filters designed using the butterworth design method. The
> > problem is that in the passband of my filters the phase is not
> > perfectly linear.  Could someone help instruct me on how to use matlab
> > to design an all pass filter to linearize the phase in these filters?
>
> First of all, ask yourself if you need linear phase. (If you weren't
> aware that Butterworth filters don't exhibit linear phase, you are now
> that I informed you. In fact, no IIR filters exhibit linear phase.)
>
> Second, determine whether the combination of a nonlinear-phase filter
> and an all-pass to approximately correct the phase is more cumbersome
> than an FIR filter that inherently has linear phase. In general,
> all-pass filters are useful for correcting phase errors that are not
> under the designer's control. When possible, do it right and avoid
> correction.
>
> Jerry
>
> P.S. Many practitioners believe that linear-phase filters don't sound
> very good. The issue is pre-echo.http://en.wikipedia.org/wiki/Pre-echo
> --
> Engineering is the art of making what you want from things you can get.
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

You can have approx linear phase with a Bessel filter and phase
equalisation.
There was life before digital!


Hardy


Re: Cascade All Pass Filters - Symon - 2009-05-11 05:05:00

"Jerry Avins" <j...@ieee.org> wrote in message 
news:TSKNl.53398$H...@newsfe15.iad...
>
> P.S. Many practitioners believe that linear-phase filters don't sound very 
> good. The issue is pre-echo. http://en.wikipedia.org/wiki/Pre-echo

That's interesting. I guess that as the ear doesn't measure phase per se, 
then the time shift of things with strong attack, like percussion 
instruments are the things to worry about. Although I noticed your qualifier 
'many'!
Symon.


Re: Cascade All Pass Filters - Greg Berchin - 2009-05-11 07:21:00

On Sun, 10 May 2009 22:06:30 -0500, Tim Wescott <t...@seemywebsite.com>
wrote:

>> Dan Brateris wrote:
>>> Hello All,
>>> 
>>> Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
>>> for filters with dbGain blocks after them for the gains.  My filters
>>> are IIR filters designed using the butterworth design method. The
>>> problem is that in the passband of my filters the phase is not
>>> perfectly linear.  Could someone help instruct me on how to use matlab
>>> to design an all pass filter to linearize the phase in these filters?
>> 
>No _stable_ IIR filters exhibit linear phase.  If you're willing to 
>discard that one trivial requirement (or causality, either one) then you 
>can have a linear IIR filter.
>
>(... I thought I'd get out the rattle-can of Theory and tag it).

Good answer!  Thanks for a morning chuckle, Tim!  Causality is just a
nuisance and stability is overrated.

To partially answer the OP:  "Modern Filter Theory and Design", Gabor
Temes and Sanjit Mitra; section 2.2 "LINEAR PHASE FUNCTIONS",
subsection "Equal-Ripple Group-Delay Approximation" -- might get you
started.

Greg


Re: Cascade All Pass Filters - Jerry Avins - 2009-05-11 09:34:00

HardySpicer wrote:
> On May 10, 6:06 pm, Jerry Avins <j...@ieee.org> wrote:
>> Dan Brateris wrote:
>>> Hello All,
>>> Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
>>> for filters with dbGain blocks after them for the gains.  My filters
>>> are IIR filters designed using the butterworth design method. The
>>> problem is that in the passband of my filters the phase is not
>>> perfectly linear.  Could someone help instruct me on how to use matlab
>>> to design an all pass filter to linearize the phase in these filters?
>> First of all, ask yourself if you need linear phase. (If you weren't
>> aware that Butterworth filters don't exhibit linear phase, you are now
>> that I informed you. In fact, no IIR filters exhibit linear phase.)
>>
>> Second, determine whether the combination of a nonlinear-phase filter
>> and an all-pass to approximately correct the phase is more cumbersome
>> than an FIR filter that inherently has linear phase. In general,
>> all-pass filters are useful for correcting phase errors that are not
>> under the designer's control. When possible, do it right and avoid
>> correction.
>>
>> Jerry
>>
>> P.S. Many practitioners believe that linear-phase filters don't sound
>> very good. The issue is pre-echo.http://en.wikipedia.org/wiki/Pre-echo
>> --
>> Engineering is the art of making what you want from things you can get.
>> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
> 
> You can have approx linear phase with a Bessel filter and phase
> equalisation.
> There was life before digital!

Of course there was. It was my profession for many years. Minimum-phase 
filters often sound better in audio and almost always work better in 
servos than linear phase. Audio preemphasis is defined in terms of time 
constants. The corresponding deemphasis filters best have complementary 
phase responses. Linkwitz-Reilly crossovers work very well. Linear-phase 
crossovers with the same amplitude response perform poorly. I'm sure you 
can think of many other examples where linear phase is no help at all.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯


Re: Cascade All Pass Filters - Dave - 2009-05-11 10:44:00

On May 10, 11:06 pm, Tim Wescott <t...@seemywebsite.com> wrote:
> On Sun, 10 May 2009 21:06:58 -0400, Jerry Avins wrote:
> > Dan Brateris wrote:
> >> Hello All,
>
> >> Im designing and audio equalizer in Simulink. I have 15 FDATool blocks
> >> for filters with dbGain blocks after them for the gains.  My filters
> >> are IIR filters designed using the butterworth design method. The
> >> problem is that in the passband of my filters the phase is not
> >> perfectly linear.  Could someone help instruct me on how to use matlab
> >> to design an all pass filter to linearize the phase in these filters?
>
> > First of all, ask yourself if you need linear phase. (If you weren't
> > aware that Butterworth filters don't exhibit linear phase, you are now
> > that I informed you. In fact, no IIR filters exhibit linear phase.)
>
> > Second, determine whether the combination of a nonlinear-phase filter
> > and an all-pass to approximately correct the phase is more cumbersome
> > than an FIR filter that inherently has linear phase. In general,
> > all-pass filters are useful for correcting phase errors that are not
> > under the designer's control. When possible, do it right and avoid
> > correction.
>
> No _stable_ IIR filters exhibit linear phase.  If you're willing to
> discard that one trivial requirement (or causality, either one) then you
> can have a linear IIR filter.
>
> (Sorry, your answer couldn't be improved upon so I thought I'd get out
> the rattle-can of Theory and tag it).
>
> --http://www.wescottdesign.com

In Fred J Harris's book "Multirate Signal Processing for Communication
Systems" he discusses The use of allpass filter in multirate filter
banks to produce filters with nearly linear phase. In this case the
allpass filters also provide the main filter response (i.e. lowpass,
bandpass etc) as well as the near phase linearity. Harris's design
procedure produces equiripple stopband behaviour.

Cheers,
David


Re: Cascade All Pass Filters - foxcob - 2009-05-11 14:18:00

>HardySpicer wrote:
>> On May 10, 6:06 pm, Jerry Avins <j...@ieee.org> wrote:
>>> Dan Brateris wrote:
>>>> Hello All,
>>>> Im designing and audio equalizer in Simulink. I have 15 FDATool
blocks
>>>> for filters with dbGain blocks after them for the gains.  My filters
>>>> are IIR filters designed using the butterworth design method. The
>>>> problem is that in the passband of my filters the phase is not
>>>> perfectly linear.  Could someone help instruct me on how to use
matlab
>>>> to design an all pass filter to linearize the phase in these
filters?
>>> First of all, ask yourself if you need linear phase. (If you weren't
>>> aware that Butterworth filters don't exhibit linear phase, you are
now
>>> that I informed you. In fact, no IIR filters exhibit linear phase.)
>>>
>>> Second, determine whether the combination of a nonlinear-phase filter
>>> and an all-pass to approximately correct the phase is more cumbersome
>>> than an FIR filter that inherently has linear phase. In general,
>>> all-pass filters are useful for correcting phase errors that are not
>>> under the designer's control. When possible, do it right and avoid
>>> correction.
>>>
>>> Jerry
>>>
>>> P.S. Many practitioners believe that linear-phase filters don't sound
>>> very good. The issue is
pre-echo.http://en.wikipedia.org/wiki/Pre-echo
>>> --
>>> Engineering is the art of making what you want from things you can
get.
>>>
�����������������������������������������������������������������������
>> 
>> You can have approx linear phase with a Bessel filter and phase
>> equalisation.
>> There was life before digital!
>
>Of course there was. It was my profession for many years. Minimum-phase 
>filters often sound better in audio and almost always work better in 
>servos than linear phase. Audio preemphasis is defined in terms of time 
>constants. The corresponding deemphasis filters best have complementary 
>phase responses. Linkwitz-Reilly crossovers work very well. Linear-phase

>crossovers with the same amplitude response perform poorly. I'm sure you

>can think of many other examples where linear phase is no help at all.

I've heard the arguments for minimum phase vs linear phase for audio
filtering before because of the pre-ring, but I'm interested in why linear
phase would not be ideal for a cross-over.  It seams that the cross-over
could be complementary for the high / low pass sections and cancel out. 
Theoretically it sounds good, but is a problem of the loudspeaker
performing this way in reality?

Jacob

>
>Jerry
>-- 
>Engineering is the art of making what you want from things you can get.
>�����������������������������������������������������������������������
>


Re: Cascade All Pass Filters - Greg Berchin - 2009-05-11 14:34:00

On Mon, 11 May 2009 13:18:26 -0500, "foxcob" <j...@gmail.com>
wrote:


>I've heard the arguments for minimum phase vs linear phase for audio
>filtering before because of the pre-ring, but I'm interested in why linear
>phase would not be ideal for a cross-over.  It seams that the cross-over
>could be complementary for the high / low pass sections and cancel out. 
>Theoretically it sounds good, but is a problem of the loudspeaker
>performing this way in reality?

Yes, it's a problem in reality.

Consider that the lowpass and highpass sections of perfect
reconstruction crossovers have frequency responses that sum to unity
magnitude and impulse responses that sum to a (delayed) impulse.  This
means that the pre-ring (and post-ring) of the highpass function is
out-of-phase with the pre-ring (and post-ring) of the lowpass
function.  If the outputs are summed arithmetically or electrically,
the ring cancels perfectly.  But in reality the outputs are summed
acoustically.  This means that there will be some locus of points in
space where they cancel perfectly (or there would be if the
transducers were identical), but at every other point in space they
will not.

Greg


| 1 | |