Arbitrary Phase rotation from 0 to 180 degrees?
Hi There! How are you?
I would like to provide an arbitrary phase rotation for the subwoofer outputs, so the user can use any phase angle from 0 to 180 degrees (let's say for example 60 degrees). I am using ADAU1701 for processing. Is there any block at SigmaStudio that allow us to do it? If there isn't, how could I accomplish this mathematically and implement? I have a fully working communication Windows -> Microcontroller -> ADAU1701, so that should facilitate the job.
Thanks a lot!
Best wishes,
Fernando
Hi Fernando,
It's not easy to do some kind of arbitrary phase shift to signals in SigmaDSP. You can pretty easily implement 90 and 180 degree shifts, but anything in between is difficult. The only way I can imagine doing this would be to implement a constant phase (not linear phase) filter that imparts the same phase shift on all frequencies. That would probably be realized as some cascaded allpass filters, but I don't know the details. Perhaps some filter design programs would be useful for determining the best way to do this.
Hi Fernando,
Getting a 0-180 variable phase shift accurate over a wide frequency range isn't easy, as Brett G. noted. Actually I have no idea how to do it. Yet, my DJ subwoofer has an analog knob that purports to do just that. There's no DSP in there, so surely this "phase" knob is not meeting quite such a lofty goal. My guess is that it only "works" (with limited accuracy at that) over a relatively narrow frequency range, as subwoofers generally do. If that's good enough for your application, perhaps you can try something like this: You have the original signal (0 degrees), and can easily produce its inversion (180 degrees). A 90 degree shift is obtainable with a Hilbert transform, although that goes way over my head. However, you can get 90 degrees over some limited frequency range with a first order allpass filter set to the middle of that range (for example, 80 Hz). By fading between these three signals (0 to 90 and then 90 to 180), you may end up with something that your end users would find quite suitable.
Bob
All above is true,
obtaining a continously-variable phase shift over a large frequency range is very difficult, unless you
use an hilbert transform, but it has a fixed shift of 90°.
For your needs, and as Bob said, i think you could satisfactorily use a first order allpass filter using it as a phase shifter: changing
the cutoff frequency you should have 0° below cutoff, 90° at cutoff, 180° above it.
You 'll have to make your uC to recalculate the allpass coefficients and pass them to the DSP; i
recommend to use the safe mode when updating the filter.
But what i would point out is that the outputs of the crossover (i'm thinking you are designing
something like) are to be time-aligned, so you have also to consider this aspect.
If the whole audio signal goes straight to the speakers and the dsp is used only to filter the subwoofer
path, you will have a significant delay added at the subwoofer output, so the result will not be good.
All should be passed through the dsp, adding an extra delay of some milliseconds to the main path.
A variable delay put into the subwoofer path will allow to adjust the subwoofer delay including, when
set to zero, anticipating the main path.
This, and the phase control, will give full control of your sub.
Bye
Drugo
Hi There,
Sorry I took a while to reply to this thread, it's been a lot work recently. Thanks a lot, as you presumed, I don't need to change the phase in a wide frequency range, it's only for the sub that will be cut at 120Hz max. So the fader between 0, 90 and 180 degrees works fine for me!
Thank you all very much for your input, it really helped.
Hi All,
Since this post, a Hilbert Transform block has become available for the ADAU1701. It may be overkill for your application, but this block makes possible a wide-range, wide-frequency phase shifter. Please see:
https://ez.analog.com/message/159162#159162
Bob
Please log in to reply.