# LMS identifying Non-Min Phase systems

Started by November 6, 2003
```Suppose we have two signals - a Primary and Reference as in classical
noise cancelling except that the mics are about one foot apart (for an
acoustic problem). Let us suppose that the top path (for simplicity) has
a transfer function (1-0.5z^-1) and the bottom path has a TF of unity.
This of course is not realistic but I want to keep the sums easy. Now if
we use LMS the LMS algorithm will converge nicely to (1-0.5z^-1) -
assuming there is no additive noise.

Now consider the same problem but with a TF in the top path of (Primary)
of (1-2z^-1). Again the LMS algorithm has no trouble identifying this.

The problems occur when the TF is in the bottom path. In the Min Phase
case the LMS algorithm will converge to the inverse of (1-0.5z^-1) =
1-0.5z^+0.25z^-2-... ie the inverse.

For the Non Min Phase case the inverse gives us a non-convergent series
and the LMS algorithm runs into trouble.
Is there an answer to this other than reversing the mics?

Thanks

Tom

```
```Hello Tom,

The LMS is not going to work if the reference signal is delayed with
respect to the primary signal. The system *is* to be casual.

The cure to that is to delay the primary signal for at least the same
amount of delay as reference.

DSP and Mixed Signal Design Consultant

http://www.abvolt.com

Tom wrote:
>
> Suppose we have two signals - a Primary and Reference as in classical
> noise cancelling except that the mics are about one foot apart (for an
> acoustic problem). Let us suppose that the top path (for simplicity) has
> a transfer function (1-0.5z^-1) and the bottom path has a TF of unity.
> This of course is not realistic but I want to keep the sums easy. Now if
> we use LMS the LMS algorithm will converge nicely to (1-0.5z^-1) -
> assuming there is no additive noise.
>
> Now consider the same problem but with a TF in the top path of (Primary)
> of (1-2z^-1). Again the LMS algorithm has no trouble identifying this.
>
> The problems occur when the TF is in the bottom path. In the Min Phase
> case the LMS algorithm will converge to the inverse of (1-0.5z^-1) =
> 1-0.5z^+0.25z^-2-... ie the inverse.
>
> For the Non Min Phase case the inverse gives us a non-convergent series
> and the LMS algorithm runs into trouble.
> Is there an answer to this other than reversing the mics?
>
> Thanks
>
> Tom
```
```

> Hello Tom,
>
> The LMS is not going to work if the reference signal is delayed with
> respect to the primary signal. The system *is* to be casual.
>
> The cure to that is to delay the primary signal for at least the same
> amount of delay as reference.
>

I suppose I could reverse the Primary and Reference (assuming there is no
special conditions stopping me)

Tom

```
```
Tom wrote:
>
>
> > Hello Tom,
> >
> > The LMS is not going to work if the reference signal is delayed with
> > respect to the primary signal. The system *is* to be casual.
> >
> > The cure to that is to delay the primary signal for at least the same
> > amount of delay as reference.
> >
>
>
> I suppose I could reverse the Primary and Reference (assuming there is no
> special conditions stopping me)
>

You don't have to. Just create a reasonable amount of fixed delay in the
Primary channel to make sure the primary signal will never arrive before
the reference signal.

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
```
```

> Tom wrote:
> >
> >
> > > Hello Tom,
> > >
> > > The LMS is not going to work if the reference signal is delayed with
> > > respect to the primary signal. The system *is* to be casual.
> > >
> > > The cure to that is to delay the primary signal for at least the same
> > > amount of delay as reference.
> > >
> >
> >
> > I suppose I could reverse the Primary and Reference (assuming there is no
> > special conditions stopping me)
> >
>
> You don't have to. Just create a reasonable amount of fixed delay in the
> Primary channel to make sure the primary signal will never arrive before
> the reference signal.
>
>
> DSP and Mixed Signal Design Consultant
>
> http://www.abvolt.com

Ah but what if the noise source moves so it comes from the left rather than the
right?(say)

Tom

```
```
Tom wrote:
>
> > create a reasonable amount of fixed delay in the
> > Primary channel to make sure the primary signal will never arrive before
> > the reference signal.
> >
> Ah but what if the noise source moves so it comes from the left rather than the
> right?(say)

The time delay is not going to be longer then the distance between the
mikes divided by the speed of sound.  Just add this amount of plain
delay to the primary before applying the LMS.

I can give you better advice if you can tell me what you are trying to
accomplish.

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
```
```

> Tom wrote:
> >
> > > create a reasonable amount of fixed delay in the
> > > Primary channel to make sure the primary signal will never arrive before
> > > the reference signal.
> > >
> > Ah but what if the noise source moves so it comes from the left rather than the
> > right?(say)
>
> The time delay is not going to be longer then the distance between the
> mikes divided by the speed of sound.  Just add this amount of plain
> delay to the primary before applying the LMS.
>
> I can give you better advice if you can tell me what you are trying to
> accomplish.
>

I think the problem is that I do not know which input is the reference and which is
the primary.They are just two microphone inputs close together (one foot say).
If I know which direction the noise is coming from then it would be easy. Doing what
you suggest would mean that I would have to put the delay in either one of the paths
depending on which was the largest.

Tom

```
```"Tom" <somebody@nOpam.com> wrote in message
>
>
>
> > Tom wrote:
> > >
> > > > create a reasonable amount of fixed delay in the
> > > > Primary channel to make sure the primary signal will never arrive
before
> > > > the reference signal.
> > > >
> > > Ah but what if the noise source moves so it comes from the left rather
than the
> > > right?(say)
> >
> > The time delay is not going to be longer then the distance between the
> > mikes divided by the speed of sound.  Just add this amount of plain
> > delay to the primary before applying the LMS.
> >
> > I can give you better advice if you can tell me what you are trying to
> > accomplish.
> >
>
> I think the problem is that I do not know which input is the reference and
which is
> the primary.They are just two microphone inputs close together (one foot
say).
> If I know which direction the noise is coming from then it would be easy.
Doing what
> you suggest would mean that I would have to put the delay in either one of
the paths
> depending on which was the largest.

Tom,

You still haven't said what it is you're trying to do.
It sounds like you have noise that you want to eliminate from two
microphones, or, is it one of the microphones you want to remove the noise
from?
Is the "noise" loaded with tones or is the noise more like broadband
Gaussian noise?
etc. etc.

Fred

```
```
Fred Marshall wrote:

> "Tom" <somebody@nOpam.com> wrote in message
> >
> >
> >
> > > Tom wrote:
> > > >
> > > > > create a reasonable amount of fixed delay in the
> > > > > Primary channel to make sure the primary signal will never arrive
> before
> > > > > the reference signal.
> > > > >
> > > > Ah but what if the noise source moves so it comes from the left rather
> than the
> > > > right?(say)
> > >
> > > The time delay is not going to be longer then the distance between the
> > > mikes divided by the speed of sound.  Just add this amount of plain
> > > delay to the primary before applying the LMS.
> > >
> > > I can give you better advice if you can tell me what you are trying to
> > > accomplish.
> > >
> >
> > I think the problem is that I do not know which input is the reference and
> which is
> > the primary.They are just two microphone inputs close together (one foot
> say).
> > If I know which direction the noise is coming from then it would be easy.
> Doing what
> > you suggest would mean that I would have to put the delay in either one of
> the paths
> > depending on which was the largest.
>
> Tom,
>
> You still haven't said what it is you're trying to do.
> It sounds like you have noise that you want to eliminate from two
> microphones, or, is it one of the microphones you want to remove the noise
> from?
> Is the "noise" loaded with tones or is the noise more like broadband
> Gaussian noise?
> etc. etc.
>
> Fred

The noise can be anything from a Radio to ordinary speech. I am using a
generalised sidelobe canceller
and it appears to work ok. The mics are about one foot apart and the noise can
come from any direction except directly in front of the mics. I have a voice
activity detector which freezes the LMS during speech.
I changed this later to a two microphone beamformer without beam steering (as I
speak directly in front of the mics steering is not nescessary). To form the
reeference input you subtract the two signals and the primary is formed by
adding them. This is well discussed in the literature. However, if a noise
source comes from say the right then as you point out by adding a delay in the
primary we can get causality. However if the noise now eminated from the left
things are reversed (or could very much be). This means I would have to put the
delay in the other path and this to me is similar to reversing the mics.

Tom

```