Forums

phase corrector / filter with arbitrary phase and amplitude / designer tools

Started by Unknown September 18, 2009
Hi I am creating the active bass trap. It is device to correct room
acoustic similar to this:
http://www.bagend.com/bagend/downloads/ETrap.pdf
http://www.bagend.com/bagend/ETrap.htm

In few words - It receives sound from room via microphone, filters by
pass band filter (tuned on resonance frequency of room) and
transmitting via speaker sound in opposite phase. This sound wave is
opposite to sound of resonance and thanks to superposition rule -
unwanted sound is attenuated. DSP section is made on LPC2148.

Device works fine but there is some problem with phase. I adjusted
phase in a middle of pass band but phase a couple Hz above and blow of
middle frequency (still in a pass band) is opposite to required.
Device starts to amplify instead of attenuate. Example of
characteristics are here: http://www.audiostereo.pl/zalaczniki/1431648_1.jp=
g
. To decrease phase shift I have changed FIR filters on lower order
IIR structure. Phase adjuster is realized as a mixer of imaginary and
reality parts of analytic signal instead of simple buffer shifter. But
phase characteristic is still to arduous.

So I am looking for some structure/algorithm which help to correct
phase in full pass band (it must have opposite phase characteristic to
characteristic of filter to provide constant phase). Do you know any
tools which can design filter with arbitrary phase and amplitude
characteristics (to reach this kind of characteristics:
http://obrazki.elektroda.net/39_1251985087.jpg ) or allpass phase
corrector ? Or maybe you know some other solutions of this problem

I found allpass phase eq designer in here:
http://www.isip.piconepress.com/projects/speech/software/demonstrations/app=
lets/util/filter_design/current/
but it provides non-stable structures (like this:
http://obrazki.elektroda.net/85_1251985036.jpg ). I have tried to find
some matlab tools but all of them offer only an arbitrary group delay
(not phase) characteristic

I=E2=80=99ll be grateful for all suggestions

Regards
Piotr =C5=BBelechowski
On 18 Sep, 20:28, Piotrek =AFelechowski <pezel...@gmail.com> wrote:

> In few words - It receives sound from room via microphone, filters by > pass band filter (tuned on resonance frequency of room) and > transmitting via speaker sound in opposite phase.
...
> So I am looking for some structure/algorithm which help to correct > phase in full pass band (it must have opposite phase characteristic to > characteristic of filter to provide constant phase).
The problem is that the 'true' source and your cancelling source are located at different positions, so in some positions the sounds interact destructively, which is what you want, and at others they interact constructively. There is no way you can get only destructive interference everywhere, so you will have to choose the target positions where you want the cancellation to occur. You don't mention what kind of spatial coverage you want for your cancellation, but don't expect much more than point coverage. Design your system to cancel the sound at a specific direction and a specific distance from your speaker. Rune
Rune Allnor wrote:
> On 18 Sep, 20:28, Piotrek &#379;elechowski <pezel...@gmail.com> wrote: > >> In few words - It receives sound from room via microphone, filters by >> pass band filter (tuned on resonance frequency of room) and >> transmitting via speaker sound in opposite phase. > ... >> So I am looking for some structure/algorithm which help to correct >> phase in full pass band (it must have opposite phase characteristic to >> characteristic of filter to provide constant phase). > > The problem is that the 'true' source and your cancelling > source are located at different positions, so in some > positions the sounds interact destructively, which is what > you want, and at others they interact constructively. > There is no way you can get only destructive interference > everywhere, so you will have to choose the target positions > where you want the cancellation to occur. > > You don't mention what kind of spatial coverage you want > for your cancellation, but don't expect much more than > point coverage. Design your system to cancel the sound > at a specific direction and a specific distance from your > speaker.
I took it from the original statement that the wavelengths involved were much longer than the room dimensions. (Bass; deep bass!) I see now how silly I was. A wavelength at 20 Hz is about 55 feet or 17 meters. Few rooms are "much larger" than that. So the phase will shift unacceptably from place to place. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
>>Rune
At really low frequencies it is possible to reach sound cancellation on quite enough coverage. I=92ve tested it and it works. But to improve my device I need more steady phase shift in filter pass band. So If you know some methods please answer on my questions. Peter
Piotrek &#379;elechowski wrote:
>>> Rune > At really low frequencies it is possible to reach sound cancellation > on quite enough coverage. I&rsquo;ve tested it and it works. But to improve > my device I need more steady phase shift in filter pass band. So If > you know some methods please answer on my questions.
How wide is the band whose phase you want to shift? Have you calculated the phase shift from one end of the room to the other? (Pure delay is easy to arrange. Constant phase shift implies delay that varies inversely with frequency.) Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On 19 Sep, 21:54, Piotrek =AFelechowski <pezel...@gmail.com> wrote:
> >>Rune > > At really low frequencies it is possible to reach sound cancellation > on quite enough coverage. I've tested it and it works.
How did you test that? With two monochromatic signalsources? If so, you might very well get results that might lead you to believe that you can get extended coverage. With wide-band signals you end up with exactly the kinds of problems you see. Do this step by step: First obtain canceallation in one point. Then extend the area of cancellation. Rune
>>Jerry >How wide is the band whose phase you want to shift?
It depends of room acoustic. Let=92s say, for example, about 5Hz @ =963dB
> Have you calculated the phase shift from one end of the room to the > other?
It depends of between which walls. But it doesn't matter now.
> (Pure delay is easy to arrange. Constant phase shift implies > delay that varies inversely with frequency.)
I know. That=92s why I=92m asking for phase corrector. Phase shifter made on a delay can adjust phase in a middle of pass band but is useless to correct phase in a whole pass band.
>>Rune >How did you test that?
I made couple of analysis by =91Room EQ Wizard=92
>With wide-band signals you end up with exactly the kinds of >problems you see.
My device doesn=92t work in wide-band (it has narrow pass band filter inside). I agree with You that it won=92t work perfectly in whole room, but for example for 30Hz +-45degrees of phase shift give You almost 3meters in direct of wave. Beside, wave length is longer than room dimensions so some rules are different than for higher frequencies. Please, don=92t worry about area, because even in one reference point - main problem is to get close to constant phase characteristic in pass band of filter.
>Do this step by step: First obtain canceallation in one point. >Then extend the area of cancellation.
Ok. So I need phase corrector to avoid problem which I wrote about on the beginig of discussion.
Piotrek &#379;elechowski wrote:
>>> Jerry >> How wide is the band whose phase you want to shift? > > It depends of room acoustic. Let&rsquo;s say, for example, about 5Hz @ &ndash;3dB > >> Have you calculated the phase shift from one end of the room to the >> other? > > It depends of between which walls. But it doesn't matter now. > >> (Pure delay is easy to arrange. Constant phase shift implies >> delay that varies inversely with frequency.) > > I know. That&rsquo;s why I&rsquo;m asking for phase corrector. Phase shifter made > on a delay can adjust phase in a middle of pass band but is useless to > correct phase in a whole pass band. > >>> Rune >> How did you test that? > > I made couple of analysis by &lsquo;Room EQ Wizard&rsquo; > >> With wide-band signals you end up with exactly the kinds of >> problems you see. > > My device doesn&rsquo;t work in wide-band (it has narrow pass band filter > inside). > I agree with You that it won&rsquo;t work perfectly in whole room, but for > example for 30Hz +-45degrees of phase shift give You almost 3meters in > direct of wave. Beside, wave length is longer than room dimensions so > some rules are different than for higher frequencies. Please, don&rsquo;t > worry about area, because even in one reference point - main problem > is to get close to constant phase characteristic in pass band of > filter. > >> Do this step by step: First obtain canceallation in one point. >> Then extend the area of cancellation. > > Ok. So I need phase corrector to avoid problem which I wrote about on > the beginig of discussion.
A practical Hilbert transformer will provide a phase shift of 90 degrees over a relatively wide band, say a decade. It does this by introducing a delay that is a quarter of a cycle at the lowest frequency. The phase shift is relative to a delayed copy of the original. There is no way to decrease a lag with a filter. Filters can only /add/ delay. Can your problem be solved by adding controlled amounts of delay? if not, i don't see a solution. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;

Rune Allnor wrote:
> On 18 Sep, 20:28, Piotrek =AFelechowski <pezel...@gmail.com> wrote: >=20 >=20 >>In few words - It receives sound from room via microphone, filters by >>pass band filter (tuned on resonance frequency of room) and >>transmitting via speaker sound in opposite phase. >=20 > ... >=20 >>So I am looking for some structure/algorithm which help to correct >>phase in full pass band (it must have opposite phase characteristic to >>characteristic of filter to provide constant phase). >=20 >=20 > The problem is that the 'true' source and your cancelling > source are located at different positions,
Dr. Rune, cancellation is a different problem, which is indeed=20 difficult. However the OP is talking about the active damping of the Q=20 of the room. At low frequencies, the room acts as a cavity resonator.=20 You only have to damp the most pronounced resonant modes; this is quite=20 feasible. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 20 Sep, 01:59, Piotrek =AFelechowski <pezel...@gmail.com> wrote:
> >>Jerry > >How wide is the band whose phase you want to shift? > > It depends of room acoustic. Let's say, for example, about 5Hz @ -3dB > > > Have you calculated the phase shift from one end of the room to the > > other? > > It depends of between which walls. But it doesn't matter now. > > > (Pure delay is easy to arrange. Constant phase shift implies > > delay that varies inversely with frequency.) > > I know. That's why I'm asking for phase corrector. Phase shifter made > on a delay can adjust phase in a middle of pass band but is useless to > correct phase in a whole pass band. > > >>Rune > >How did you test that? > > I made couple of analysis by 'Room EQ Wizard'
You really did your homework, then.
> >With wide-band signals you end up with exactly the kinds of > >problems you see. > > My device doesn't work in wide-band (it has narrow pass band filter > inside). > I agree with You that it won't work perfectly in whole room, but for > example for 30Hz +-45degrees of phase shift give You almost 3meters in > direct of wave. Beside, wave length is longer than room dimensions so > some rules are different than for higher frequencies. Please, don't > worry about area, because even in one reference point - main problem > is to get close to constant phase characteristic in pass band of > filter.
Well, I don't worry about area (or volume). You should.
> >Do this step by step: First obtain canceallation in one point. > >Then extend the area of cancellation. > > Ok. So I need phase corrector to avoid problem which I wrote about on > the beginig of discussion.
The first step is to come up with a precise statement of the problem to be solved and the characteristics of an acceptable - not ideal - solution. Rune