PDA

View Full Version : constant 90-degree phase shift using parallel allpass filter networks


Robert Adams
07-11-2008, 03:47 AM
One method of creating a quadrature signal is to pass an input signal
through two parallel allpass networks, where the outputs of the two
networks differ in phase by 90 degrees. Each allpass network is
typically high-order to obtain reasonable accuracy in terms of holding
the phase difference over frequency. One advantage of this technique
compared with the more usual anti-symmetric Hilbert filter is that the
number of multiplies is smaller for a given accuracy (note that the
Hilbert filter is perfect for phase accuracy, but suffers from
amplitude errors and becomes very long if you need a frequency range
that spans a large portion of the band from 0 to PI, whereas the
allpass filters are perfect for amplitude accuracy but cannot hold the
phase difference at frequencies near DC and PI).

The problem I have is designing the allpass filter networks to hold
the 90-degree phase difference. In the past I have seen people apply
non-linear optimizers to the problem. I am trying to solve it with
Matlab fminsearch, but am having trouble getting a starting point that
is close enough that it converges to the desired 90-degree phase
difference.

Has anyone seen any papers on this?.


Thanks!


Bob Adams

Andor
07-11-2008, 07:48 AM
Robert Adams wrote:
> One method of creating a quadrature signal is to pass an input signal
> through two parallel allpass networks, where the outputs of the two
> networks differ in phase by 90 degrees. Each allpass network is
> typically high-order to obtain reasonable accuracy in terms of holding
> the phase difference over frequency. One advantage of this technique
> compared with the more usual anti-symmetric Hilbert filter is that the
> number of multiplies is smaller for a given accuracy (note that the
> Hilbert filter is perfect for phase accuracy, but suffers from
> amplitude errors and becomes very long if you need a frequency range
> that spans a large portion of the band from 0 to PI, whereas the
> allpass filters are perfect for amplitude accuracy but cannot hold the
> phase difference at frequencies near DC and PI).
>
> The problem I have is designing the allpass filter networks to hold
> the 90-degree phase difference. In the past I have seen people apply
> non-linear optimizers to the problem. I am trying to solve it with
> Matlab fminsearch, but am having trouble getting a starting point that
> is close enough that it converges to the desired 90-degree phase
> difference.
>
> Has anyone seen any papers on this?.

Hi Bob

You could try FDLS for this (at least to get sensible starting values
for the coefficients). Using FDLS for phase compensation was discussed
in the thread "Allpass filter with specific phase response Options" by
the FDLS inventor Greg Berchin.

I'm curious: the two allpass networks you want are supposed to have a
phase shift of 90° with respect to each other. However, does the
output of each network have a constant phase shift?

Regards,
Andor

Vladimir Vassilevsky
07-11-2008, 10:03 AM
"Robert Adams" <[email protected]> wrote in message
news:d0b3aa98-a31e-48a1-87ba-93cc24adabb9@r66g2000hsg.googlegroups.com...

> The problem I have is designing the allpass filter networks to hold
> the 90-degree phase difference. In the past I have seen people apply
> non-linear optimizers to the problem. I am trying to solve it with
> Matlab fminsearch, but am having trouble getting a starting point that
> is close enough that it converges to the desired 90-degree phase
> difference.
>
> Has anyone seen any papers on this?.

IIRC the 90 degree IIR networks are designed analytically by lowpass
transformation. The standard approximations like Chebyshev, etc. can be
used.

Vladimir Vassilevsky
DSP and Mixed Signal Consultant
www.abvolt.com

Robert Adams
07-11-2008, 11:08 AM
On Jul 11, 2:48*am, Andor <[email protected]> wrote:
> Robert Adams wrote:
> > One method of creating a quadrature signal is to pass an input signal
> > through two parallel allpass networks, where the outputs of the two
> > networks differ in phase by 90 degrees. Each allpass network is
> > typically high-order to obtain reasonable accuracy in terms of holding
> > the phase difference over frequency. One advantage of this technique
> > compared with the more usual anti-symmetric Hilbert filter is that the
> > number of multiplies is smaller for a given accuracy (note that the
> > Hilbert filter is perfect for phase accuracy, but suffers from
> > amplitude errors and becomes very long if you need a frequency range
> > that spans a large portion of the band from 0 to PI, whereas the
> > allpass filters are perfect for amplitude accuracy but cannot hold the
> > phase difference at frequencies near DC and PI).
>
> > The problem I have is designing the allpass filter networks to hold
> > the 90-degree phase difference. In the past I have seen people apply
> > non-linear optimizers to the problem. I am trying to solve it with
> > Matlab fminsearch, but am having trouble getting a starting point that
> > is close enough that it converges to the desired 90-degree phase
> > difference.
>
> > Has anyone seen any papers on this?.
>
> Hi Bob
>
> You could try FDLS for this (at least to get sensible starting values
> for the coefficients). Using FDLS for phase compensation was discussed
> in the thread "Allpass filter with specific phase response Options" by
> the FDLS inventor Greg Berchin.
>
> I'm curious: the two allpass networks you want are supposed to have a
> phase shift of 90° with respect to each other. However, does the
> output of each network have a constant phase shift?
>
> Regards,
> Andor- Hide quoted text -
>
> - Show quoted text -

No, it does not.
Each allpass network will display increasing phase shift with
frequency, but if you were to plot them on the same graph the
difference in phase would be 90 degreees.


Bob

Andor
07-11-2008, 11:12 AM
On 11 Jul., 12:08, Robert Adams <[email protected]> wrote:
> On Jul 11, 2:48*am, Andor <[email protected]> wrote:
>
>
>
>
>
> > Robert Adams wrote:
> > > One method of creating a quadrature signal is to pass an input signal
> > > through two parallel allpass networks, where the outputs of the two
> > > networks differ in phase by 90 degrees. Each allpass network is
> > > typically high-order to obtain reasonable accuracy in terms of holding
> > > the phase difference over frequency. One advantage of this technique
> > > compared with the more usual anti-symmetric Hilbert filter is that the
> > > number of multiplies is smaller for a given accuracy (note that the
> > > Hilbert filter is perfect for phase accuracy, but suffers from
> > > amplitude errors and becomes very long if you need a frequency range
> > > that spans a large portion of the band from 0 to PI, whereas the
> > > allpass filters are perfect for amplitude accuracy but cannot hold the
> > > phase difference at frequencies near DC and PI).
>
> > > The problem I have is designing the allpass filter networks to hold
> > > the 90-degree phase difference. In the past I have seen people apply
> > > non-linear optimizers to the problem. I am trying to solve it with
> > > Matlab fminsearch, but am having trouble getting a starting point that
> > > is close enough that it converges to the desired 90-degree phase
> > > difference.
>
> > > Has anyone seen any papers on this?.
>
> > Hi Bob
>
> > You could try FDLS for this (at least to get sensible starting values
> > for the coefficients). Using FDLS for phase compensation was discussed
> > in the thread "Allpass filter with specific phase response Options" by
> > the FDLS inventor Greg Berchin.
>
> > I'm curious: the two allpass networks you want are supposed to have a
> > phase shift of 90° with respect to each other. However, does the
> > output of each network have a constant phase shift?
>
> > Regards,
> > Andor- Hide quoted text -
>
> > - Show quoted text -
>
> No, it does not.
> Each allpass network will display increasing phase shift with
> frequency, but if you were to plot them on the same graph the
> difference in phase would be 90 degreees.

Ah, ok. So you generate a quadrature pair, but neither of the outputs
is equal to the input ...

Robert Adams
07-11-2008, 11:40 AM
On Jul 11, 6:12*am, Andor <[email protected]> wrote:
> On 11 Jul., 12:08, Robert Adams <[email protected]> wrote:
>
>
>
>
>
> > On Jul 11, 2:48*am, Andor <[email protected]> wrote:
>
> > > Robert Adams wrote:
> > > > One method of creating a quadrature signal is to pass an input signal
> > > > through two parallel allpass networks, where the outputs of the two
> > > > networks differ in phase by 90 degrees. Each allpass network is
> > > > typically high-order to obtain reasonable accuracy in terms of holding
> > > > the phase difference over frequency. One advantage of this technique
> > > > compared with the more usual anti-symmetric Hilbert filter is that the
> > > > number of multiplies is smaller for a given accuracy (note that the
> > > > Hilbert filter is perfect for phase accuracy, but suffers from
> > > > amplitude errors and becomes very long if you need a frequency range
> > > > that spans a large portion of the band from 0 to PI, whereas the
> > > > allpass filters are perfect for amplitude accuracy but cannot hold the
> > > > phase difference at frequencies near DC and PI).
>
> > > > The problem I have is designing the allpass filter networks to hold
> > > > the 90-degree phase difference. In the past I have seen people apply
> > > > non-linear optimizers to the problem. I am trying to solve it with
> > > > Matlab fminsearch, but am having trouble getting a starting point that
> > > > is close enough that it converges to the desired 90-degree phase
> > > > difference.
>
> > > > Has anyone seen any papers on this?.
>
> > > Hi Bob
>
> > > You could try FDLS for this (at least to get sensible starting values
> > > for the coefficients). Using FDLS for phase compensation was discussed
> > > in the thread "Allpass filter with specific phase response Options" by
> > > the FDLS inventor Greg Berchin.
>
> > > I'm curious: the two allpass networks you want are supposed to have a
> > > phase shift of 90° with respect to each other. However, does the
> > > output of each network have a constant phase shift?
>
> > > Regards,
> > > Andor- Hide quoted text -
>
> > > - Show quoted text -
>
> > No, it does not.
> > Each allpass network will display increasing phase shift with
> > frequency, but if you were to plot them on the same graph the
> > difference in phase would be 90 degreees.
>
> Ah, ok. So you generate a quadrature pair, but neither of the outputs
> is equal to the input ...- Hide quoted text -
>
> - Show quoted text -

Yes, that's right.


Bob

Greg Berchin
07-11-2008, 12:55 PM
On Jul 11, 2:48*am, Andor <[email protected]> wrote:

> You could try FDLS for this (at least to get sensible starting values
> for the coefficients). Using FDLS for phase compensation was
> discussed in the thread "Allpass filter with specific phase response
> Options" by the FDLS inventor Greg Berchin.

I experimented a little bit with FDLS this morning, and with a
"reasonable" filter size I can get 0dB±˝dB and 90°±1° from
approximately Fs/40 to just under Fs/2. Bob, would that satisfy your
performance requirements?

Greg Berchin

Robert Adams
07-11-2008, 01:15 PM
On Jul 11, 7:55*am, Greg Berchin <[email protected]> wrote:
> On Jul 11, 2:48*am, Andor <[email protected]> wrote:
>
> > You could try FDLS for this (at least to get sensible starting values
> > for the coefficients). Using FDLS for phase compensation was
> > discussed in the thread "Allpass filter with specific phase response
> > Options" by the FDLS inventor Greg Berchin.
>
> I experimented a little bit with FDLS this morning, and with a
> "reasonable" filter size I can get 0dB±˝dB and 90°±1° from
> approximately Fs/40 to just under Fs/2. *Bob, would that satisfy your
> performance requirements?
>
> Greg Berchin

Greg


Thanks for running this through FDLS. I actually need much better
accuracy. In the end I am using this for making a frequency shifter,
so quadrature phase error will result in leakage into the "Lower
sideband" (sorry, my past history as a ham radio operator causes me to
use strange terminology!). These leakage components should be < -80
dB. I haven't gone through the math but I assume roughly that this
corresponds to a phase error on the order of 90 degrees/10000.

I am not that familiar with FDLS, perhaps you can give me an overview?

Bob

Robert Adams
07-11-2008, 01:18 PM
On Jul 11, 5:03*am, "Vladimir Vassilevsky"
<[email protected]> wrote:
> "Robert Adams" <[email protected]> wrote in message
>
> news:d0b3aa98-a31e-48a1-87ba-93cc24adabb9@r66g2000hsg.googlegroups.com...
>
> > The problem I have is designing the allpass filter networks to hold
> > the 90-degree phase difference. In the past I have seen people apply
> > non-linear optimizers to the problem. I am trying to solve it with
> > Matlab fminsearch, but am having trouble getting a starting point that
> > is close enough that it converges to the desired 90-degree phase
> > difference.
>
> > Has anyone seen any papers on this?.
>
> IIRC the 90 degree IIR networks are designed analytically by lowpass
> transformation. The standard approximations like Chebyshev, etc. can be
> used.
>
> Vladimir Vassilevsky
> DSP and Mixed Signal Consultantwww.abvolt.com

Can you elaborate a little more, or provide a reference? This sounds
interesting.


Bob

Robert Adams
07-11-2008, 01:25 PM
On Jul 11, 7:55*am, Greg Berchin <[email protected]> wrote:
> On Jul 11, 2:48*am, Andor <[email protected]> wrote:
>
> > You could try FDLS for this (at least to get sensible starting values
> > for the coefficients). Using FDLS for phase compensation was
> > discussed in the thread "Allpass filter with specific phase response
> > Options" by the FDLS inventor Greg Berchin.
>
> I experimented a little bit with FDLS this morning, and with a
> "reasonable" filter size I can get 0dB±˝dB and 90°±1° from
> approximately Fs/40 to just under Fs/2. *Bob, would that satisfy your
> performance requirements?
>
> Greg Berchin

Greg


Never mind, I just read your paper and realized that FDLS stands for
frequency-domain least-squares; I thought at first it was the name of
a program that was commercially available.

I also note that you mention amplitude and phase accuracy, so I assume
the FDLS method cannot be constrained to produce allpass filters
(otherwise the amplitude error would be zero).


Bob

Greg Berchin
07-11-2008, 01:38 PM
On Jul 11, 8:25*am, Robert Adams <[email protected]> wrote:

> I also note that you mention amplitude and phase accuracy, so I assume
> the FDLS method cannot be constrained to produce allpass filters
> (otherwise the amplitude error would be zero).

Correct. It's a conventional least-squares model, so it really knows
nothing of the "type" of filter that it's creating. It just minimizes
the squared error based upon the data matrices.

Achieving phase accuracy on the order of 0.001° over a significant
bandwidth is a really tall order.

Greg

Greg Berchin
07-11-2008, 01:58 PM
On Jul 11, 8:15*am, Robert Adams <[email protected]> wrote:

> I haven't gone through the math but I assume roughly that this
> corresponds to a phase error on the order of 90 degrees/10000.

I played around a bit more with FDLS. I'm seeing 90°±0.01° from about
Fs/22 to just under Fs/2. (Yeah, 90/10000 is closer to 0.01 than it
is to 0.001; I can't do arithmetic in my head this early in the
morning.) So if your band falls close to those limits, it might be
worth a try.

Greg Berchin

Andor
07-11-2008, 02:19 PM
On 11 Jul., 14:25, Robert Adams <[email protected]> wrote:
> On Jul 11, 7:55*am, Greg Berchin <[email protected]> wrote:
>
> > On Jul 11, 2:48*am, Andor <[email protected]> wrote:
>
> > > You could try FDLS for this (at least to get sensible starting values
> > > for the coefficients). Using FDLS for phase compensation was
> > > discussed in the thread "Allpass filter with specific phase response
> > > Options" by the FDLS inventor Greg Berchin.
>
> > I experimented a little bit with FDLS this morning, and with a
> > "reasonable" filter size I can get 0dB±˝dB and 90°±1° from
> > approximately Fs/40 to just under Fs/2. *Bob, would that satisfy your
> > performance requirements?
>
> > Greg Berchin
>
> Greg
>
> Never mind, I just read your paper and realized that FDLS stands for
> frequency-domain least-squares; I thought at first it was the name of
> a program that was commercially available.

It is available as a free Matlab function file. If that interests you,
download here:

http://apollo.ee.columbia.edu/spm/external/tipsandtricks/files/TandT_Jan2007.zip

Regards,
Andor

Robert Adams
07-11-2008, 02:41 PM
On Jul 11, 8:58*am, Greg Berchin <[email protected]> wrote:
> On Jul 11, 8:15*am, Robert Adams <[email protected]> wrote:
>
> > I haven't gone through the math but I assume roughly that this
> > corresponds to a phase error on the order of 90 degrees/10000.
>
> I played around a bit more with FDLS. *I'm seeing 90°±0.01° from about
> Fs/22 to just under Fs/2. *(Yeah, 90/10000 is closer to 0.01 than it
> is to 0.001; I can't do arithmetic in my head this early in the
> morning.) *So if your band falls close to those limits, it might be
> worth a try.
>
> Greg Berchin

Greg


Thanks, I'll give it a try!

Bob

Tim Wescott
07-11-2008, 06:49 PM
Andor wrote:
> On 11 Jul., 12:08, Robert Adams <[email protected]> wrote:
>> On Jul 11, 2:48 am, Andor <[email protected]> wrote:
>>
>>
>>
>>
>>
>>> Robert Adams wrote:
>>>> One method of creating a quadrature signal is to pass an input signal
>>>> through two parallel allpass networks, where the outputs of the two
>>>> networks differ in phase by 90 degrees. Each allpass network is
>>>> typically high-order to obtain reasonable accuracy in terms of holding
>>>> the phase difference over frequency. One advantage of this technique
>>>> compared with the more usual anti-symmetric Hilbert filter is that the
>>>> number of multiplies is smaller for a given accuracy (note that the
>>>> Hilbert filter is perfect for phase accuracy, but suffers from
>>>> amplitude errors and becomes very long if you need a frequency range
>>>> that spans a large portion of the band from 0 to PI, whereas the
>>>> allpass filters are perfect for amplitude accuracy but cannot hold the
>>>> phase difference at frequencies near DC and PI).
>>>> The problem I have is designing the allpass filter networks to hold
>>>> the 90-degree phase difference. In the past I have seen people apply
>>>> non-linear optimizers to the problem. I am trying to solve it with
>>>> Matlab fminsearch, but am having trouble getting a starting point that
>>>> is close enough that it converges to the desired 90-degree phase
>>>> difference.
>>>> Has anyone seen any papers on this?.
>>> Hi Bob
>>> You could try FDLS for this (at least to get sensible starting values
>>> for the coefficients). Using FDLS for phase compensation was discussed
>>> in the thread "Allpass filter with specific phase response Options" by
>>> the FDLS inventor Greg Berchin.
>>> I'm curious: the two allpass networks you want are supposed to have a
>>> phase shift of 90° with respect to each other. However, does the
>>> output of each network have a constant phase shift?
>>> Regards,
>>> Andor- Hide quoted text -
>>> - Show quoted text -
>> No, it does not.
>> Each allpass network will display increasing phase shift with
>> frequency, but if you were to plot them on the same graph the
>> difference in phase would be 90 degreees.
>
> Ah, ok. So you generate a quadrature pair, but neither of the outputs
> is equal to the input ...

Right. It's an old method for generating or demodulating SSB signals
for voice communications. Since the ear is relatively insensitive to
phase variations, the overall phase variation of the result doesn't
matter nearly as much as the suppression of the opposing sideband.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html

Vladimir Vassilevsky
07-11-2008, 06:56 PM
Tim Wescott wrote:

> Andor wrote:
>
>> On 11 Jul., 12:08, Robert Adams <[email protected]> wrote:
>>
>>> On Jul 11, 2:48 am, Andor <[email protected]> wrote:
>>>
>>>
>>>
>>>
>>>
>>>> Robert Adams wrote:
>>>>
>>>>> One method of creating a quadrature signal is to pass an input signal
>>>>> through two parallel allpass networks, where the outputs of the two
>>>>> networks differ in phase by 90 degrees. Each allpass network is
>>>>> typically high-order to obtain reasonable accuracy in terms of holding
>>>>> the phase difference over frequency. One advantage of this technique
>>>>> compared with the more usual anti-symmetric Hilbert filter is that the
>>>>> number of multiplies is smaller for a given accuracy (note that the
>>>>> Hilbert filter is perfect for phase accuracy, but suffers from
>>>>> amplitude errors and becomes very long if you need a frequency range
>>>>> that spans a large portion of the band from 0 to PI, whereas the
>>>>> allpass filters are perfect for amplitude accuracy but cannot hold the
>>>>> phase difference at frequencies near DC and PI).
>>>>> The problem I have is designing the allpass filter networks to hold
>>>>> the 90-degree phase difference. In the past I have seen people apply
>>>>> non-linear optimizers to the problem. I am trying to solve it with
>>>>> Matlab fminsearch, but am having trouble getting a starting point that
>>>>> is close enough that it converges to the desired 90-degree phase
>>>>> difference.
>>>>> Has anyone seen any papers on this?.
>>>>
>>>> Hi Bob
>>>> You could try FDLS for this (at least to get sensible starting values
>>>> for the coefficients). Using FDLS for phase compensation was discussed
>>>> in the thread "Allpass filter with specific phase response Options" by
>>>> the FDLS inventor Greg Berchin.
>>>> I'm curious: the two allpass networks you want are supposed to have a
>>>> phase shift of 90° with respect to each other. However, does the
>>>> output of each network have a constant phase shift?
>>>> Regards,
>>>> Andor- Hide quoted text -
>>>> - Show quoted text -
>>>
>>> No, it does not.
>>> Each allpass network will display increasing phase shift with
>>> frequency, but if you were to plot them on the same graph the
>>> difference in phase would be 90 degreees.
>>
>>
>> Ah, ok. So you generate a quadrature pair, but neither of the outputs
>> is equal to the input ...
>
>
> Right. It's an old method for generating or demodulating SSB signals
> for voice communications. Since the ear is relatively insensitive to
> phase variations, the overall phase variation of the result doesn't
> matter nearly as much as the suppression of the opposing sideband.

BTW this method can be used in the opposite way. I.e. the SSB signal can
be easily converted into 90-degree shifted versions of the modulation
signal. The SSB can be formed by conventional filtering.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com