All Pass phase equalisation filters - preamp advice

Discussion in 'General Electronics Chat' started by DaveH, Apr 29, 2009.

  1. DaveH

    Thread Starter Active Member

    Jan 1, 2009
    53
    0
    I have a preamp amplication that's rapidly getting more complex than I want and am wondering whether the lengths I am going to (inorder to prevent phase distortion) are really unusual or not?

    I'd like the thoughts of you guys on this.

    Roughly the circuit consists of the following opamp gain blocks

    Non inverting preamp section (I may stick this after the butterworth)
    Unity gain 4th order butterworth low pass in 2 section Sallen-Key topology
    2 cascaded first order active all pass filters at the end

    My aim is to get a maximally flat frequency response (amplitude wise), steep roll off and minimise any phase distortion at the top end of the audio spectrum and hopefully see 0 degrees on the bode plot in most of the spectrum.

    I am wondering whether in pre-amp applications for music designers go to extreme lengths to avoid phase lag at the top end of the audio spectrum?
    I've got my design down to a level where the SPICE bode plot reckons I've got only about 45 degree phase lag at a bit over 20KHz and it goes down to 90 degree lag at dog hearing frequencies. Surely that must be good enough? Or do people not really bother with designing out phase distortion, as most people can't tell by ear?

    It's not an 'audiophile' application, but I want it to be cheap to make and give good results.

    Regarding calculating All Pass filter values, I'm finding this to be VERY non-trivial. I guess if I had a long time I could go through the books and eventually understand it.

    It would be great if you could have an all pass filter, one equation, where you choose your cut of frequency (where 90 degree distortion is acceptable), then set some values for capacitors and resistors and bingo - stick that at the end of your signal chain and all phase distortion disappears. It doesn't appear to be that simple, I've got a book called "Analog and Digital Filter Design, 2nd Edition" - this far deeper than I thought.

    If you've got any advice on All Pass filter calculation, I'd be very happy to hear it (I mean see it :))
     
  2. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,040
    287
    Howdy:

    Lots of good questions here. As it turns out, SUDDEN shifts in phase are quite audible to lots of people...whereas gradual phase shifts, even if quite severe, are much less so.

    Probably where extreme attention to detail with regard to phase shift is when it comes to stereo imaging....at the very least you want well-matched phase response between left and right channel across the audio spectrum.

    This becomes increasingly difficult to do, however, if you also have a lot of frequency equalization....and especially if the right and left channels are equalized differently, as in a studio recording situation.

    To really do the job right, you'd have to have an all-pass network for EACH shelf of a graphic equalizer.

    In a word.....YIKES!


    Eric
     
  3. DaveH

    Thread Starter Active Member

    Jan 1, 2009
    53
    0
    I like your response, it means my design isn't crazy. That's a good sign.

    I suppose you must know a lot about pole zero diagrams to navigate through all that snow
     
  4. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,040
    287
    Actually you can see the effects quite simply with a signal generator and an oscilloscope. A dual trace scope is ideal, but you can also do it with Lissajous figures.


    Eric
     
  5. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    Not trivial indeed, but phase compensation is common in professional audio products like active crossovers. Generally if there's an analogue filter in the audio path with no phase compensation, then it's easier on the ears if the phase shift is linear with respect to frequency, or "phase linear". Bessel response filters are popular in audio for this reason, as they give the best integrity in the time domain, but have poor initial rolloff. Butterworth filters are optimised for a maximally flat frequency response in the passband, which doesn't matter as much to the human ear as a good transient response. If you can null out the non-linear Butterworth phase shifts, then you've got the best of both worlds, exactly what you're after.

    I've got loads of filter books, including that Winder tome, and there's not one of them that's definitive. Even if I cobbled them together there would still be great gaps. Filters are complicated, and it's a brave soul who tackles them head on. Calculators and PSPICE make it much easier, but there's still a place for scribbled equations on scraps of paper.
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    As Darren implied, constant delay over the passband (desirable) equates to linear phase shift, not constant phase shift. Constant phase shift leads to decreasing delay as frequency increases.
    Zero phase shift at all frequencies is perfect. but obviously is impossible to achieve unless all you have is a short piece of wire.:D
    As you and Darren have stated, designing allpass networks for delay equalization is not for the faint of heart.
     
  7. DaveH

    Thread Starter Active Member

    Jan 1, 2009
    53
    0
    Darren, Ron, KL,

    Thanks for you thoughts. I think the concensus is that phase shift that's linear with frequency isn't too bad - I guess as the group delay is about the same.

    I guess if the phase shift changes non linearly with frequency in a sudden way then many people would notice as that's the basis of many audio effects, so if your design does that then may be you have unwittingly designed a new audio effect!

    Darren, in that book, the answer is there, he talks about different types of all passes for specific orders of butterworth roll off, but I now think it's a bit too over the top for what I want. I also considered Bessel like you say, I did a quick back of the envelope in Microchip Filterlab, and I didn't like the roll off. I also use real envelopes.

    Ron, yep a short piece of wire is a near perfect audio system. I'm sure it would be possible to sell on ebay, it could also offer rhodium plating on each end and it would work way better than that valve with the outer glass removed that SgtWookie found advertised somewhere.
     
  8. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    With regard to a phase-linear response, it helps to think in the time domain, and in terms of group delay in particular. The Bessel response is the only one that has a constant group delay throughout the passband, so the integrity of your waveform is maintained as all in-band frequencies are delayed by the same time period. With non-Bessel responses the group delay changes as a function of frequency, which is going to change the shape of a waveform as different frequencies are delayed by different amounts.

    Summary: phase-linear really just means constant time delay in the passband.

    I think a Japanese hi-fi company marketed that short bit of wire (I'm not kidding, I'll try and find the link), though they did put it in a box at least.
     
  9. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,040
    287

    If that piece of wire had some GAIN, I'd buy it. :D
     
Loading...