DSPRelated.com
Forums

Why cplex filters?

Started by ZedToe January 23, 2004
Dear all,

Why need we design complex filters? What are the advantages they have
against the real-coefficient fitlers? Except the unsymmetric spectrum,
there indeed nothing special. Also it can be derived from a real
lowpass filter with an appropriated phase shift. What do you think?

Thanks.

Zedtoe
"ZedToe" <acoustictech_zhangtao@yahoo.com.sg> wrote in message
news:7c4bf533.0401231957.22326456@posting.google.com...
> Dear all, > > Why need we design complex filters? What are the advantages they have > against the real-coefficient fitlers? Except the unsymmetric spectrum, > there indeed nothing special. Also it can be derived from a real > lowpass filter with an appropriated phase shift. What do you think? > > Thanks. > > Zedtoe
I think you can use a complex FIR filter to correct for both amplitude as well as phase (you only get amplitude changes using a real FIR filter...linear phase of course). Cheers Bhaskar
"Bhaskar Thiagarajan" <bhaskart@deja.com> writes:

> "ZedToe" <acoustictech_zhangtao@yahoo.com.sg> wrote in message > news:7c4bf533.0401231957.22326456@posting.google.com... >> Dear all, >> >> Why need we design complex filters? What are the advantages they have >> against the real-coefficient fitlers? Except the unsymmetric spectrum, >> there indeed nothing special. Also it can be derived from a real >> lowpass filter with an appropriated phase shift. What do you think? >> >> Thanks. >> >> Zedtoe > > I think you can use a complex FIR filter to correct for both amplitude as > well as phase (you only get amplitude changes using a real FIR > filter...linear phase of course).
Wrong. You can design real, non-linear-phase FIR filters. The amount of control of the phase response is of course limited depending on the number of taps available, just as the amount of control of the amplitude response is. But you can indeed have a real, non-linear phase, FIR filter. -- % Randy Yates % "Though you ride on the wheels of tomorrow, %% Fuquay-Varina, NC % you still wander the fields of your %%% 919-577-9882 % sorrow." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
acoustictech_zhangtao@yahoo.com.sg (ZedToe) writes:

> Dear all, > > Why need we design complex filters? What are the advantages they have > against the real-coefficient fitlers? Except the unsymmetric spectrum, > there indeed nothing special.
I would agree with that. However, an unsymmetric spectrum is of itself pretty important.
> Also it can be derived from a real > lowpass filter with an appropriated phase shift. What do you think?
No, I do not agree with this. How does phase-shifting a real filter give you a complex one? For one thing, a complex filter can have a non-symmetrical magnitude response. However, if you have the real filter H(w) = Hm(w) * exp(j*Hp(w)), then shifting the phase response by some function phi(w) simply changes this filter to Hnew(w) = H(w) * exp(j*phi(w)) = Hm(w) * exp(j*Hp(w)) * exp(j*phi(w)). If we take the magnitude of the result, we get |Hnew(w)| = Hm(w), which is precisely the magnitude of the original real filter. Zedtoe, to answer your question, I think you must ask another question: When is it necessary or convenient to process complex signals? (once you have a complex signal, then obviously you need complex filters to filter them with) In my experience, the answer to this has been "when we are processing a signal with modulation." The reason is that such a signal is almost always modulated on a carrier frequency Fc with bandwidth B, i.e., the signal information is from Fc - B/2 to Fc + B/2 (Hz). In that case it makes sense to utilize the whole digital bandwidth from -Fs/2 to +Fs/2 and sample at Fs = B, quadrature downconverting the comm signal so that the carrier center frequency Fc is translated to DC. If you translated this down to a real signal, you'd be wasting have the bandwidth. It is also convenient to use the complex signal domain when performing frequency estimation. In that case a sinusoid becomes a complex exponential and it is easier to ignore the magnitude component and concentrate on the time-varying phase component. -- % Randy Yates % "Rollin' and riding and slippin' and %% Fuquay-Varina, NC % sliding, it's magic." %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Living' Thing', *A New World Record*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> (ZedToe) writes: > > >>Dear all, >> >>Why need we design complex filters? What are the advantages they have >>against the real-coefficient fitlers? Except the unsymmetric spectrum, >>there indeed nothing special.
...
> Zedtoe, to answer your question, I think you must ask another > question: When is it necessary or convenient to process complex > signals? (once you have a complex signal, then obviously you need > complex filters to filter them with)
The SDFT and Goertzel filters are also good examples of filters with complex coefficients acting on purely real signals to produce a complex output.
acoustictech_zhangtao@yahoo.com.sg (ZedToe) writes:

> Randy Yates <yates@ieee.org> wrote in message news:<hdyj1lsp.fsf@ieee.org>... >> acoustictech_zhangtao@yahoo.com.sg (ZedToe) writes: >> >> > Dear all, >> > >> > Why need we design complex filters? What are the advantages they have >> > against the real-coefficient fitlers? Except the unsymmetric spectrum, >> > there indeed nothing special. >> >> I would agree with that. However, an unsymmetric spectrum is of itself >> pretty important. >> >> > Also it can be derived from a real >> > lowpass filter with an appropriated phase shift. What do you think? >> >> No, I do not agree with this. How does phase-shifting a real filter >> give you a complex one? For one thing, a complex filter can have >> a non-symmetrical magnitude response. However, if you have the >> real filter >> >> H(w) = Hm(w) * exp(j*Hp(w)), >> >> then shifting the phase response by some function phi(w) simply >> changes this filter to >> >> Hnew(w) = H(w) * exp(j*phi(w)) >> = Hm(w) * exp(j*Hp(w)) * exp(j*phi(w)). >> >> If we take the magnitude of the result, we get >> >> |Hnew(w)| = Hm(w), >> >> which is precisely the magnitude of the original real filter. > > Thanks. > I meant the phase shift in time domain. Suppose the a real filter > h(k) <-> H(w) for k = 0,...,N-1 and if hnew(k) = h(k)*e^(-j k \phi), > then Hnew(w) = H(w+\phi).
That is not a "phase shift"! A phase shift shifts the time sequence in time, with a possible frequency dependence. Independent of what you call it, it will indeed translate the orginal filter's response and does indeed produce a complex filter. But this type of operation produces a complex filter with constraints that don't really need to be there, namely, that the resulting filter is symmetric (in a sense) about some frequency w0. Said another way, there are complex filters that cannot be derived in this manner. One could say, however, that a complex bandpass filter can be generated this way, but there are a whole lot of other filters besides bandpass.
>> Zedtoe, to answer your question, I think you must ask another >> question: When is it necessary or convenient to process complex >> signals? (once you have a complex signal, then obviously you need >> complex filters to filter them with) > > Yes, that is question that haunting me. Thanks.
Are you saying "thanks - the response you made below gives me some idea why" or "thanks - but I don't understand or don't buy your reasons below"? Kinda' hard to tell. -- % Randy Yates % "The dreamer, the unwoken fool - %% Fuquay-Varina, NC % in dreams, no pain will kiss the brow..." %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Eldorado Overture', *Eldorado*, ELO http://home.earthlink.net/~yatescr
Randy wrote:

> It is also convenient to use the complex signal domain when performing > frequency estimation. In that case a sinusoid becomes a complex > exponential and it is easier to ignore the magnitude component and > concentrate on the time-varying phase component.
Perhaps I should have read the whole post :), it's all there already. Regards, Andor
"Randy Yates" <yates@ieee.org> wrote in message
news:ptd74i85.fsf@ieee.org...
> "Bhaskar Thiagarajan" <bhaskart@deja.com> writes: > > > "ZedToe" <acoustictech_zhangtao@yahoo.com.sg> wrote in message > > news:7c4bf533.0401231957.22326456@posting.google.com... > >> Dear all, > >> > >> Why need we design complex filters? What are the advantages they have > >> against the real-coefficient fitlers? Except the unsymmetric spectrum, > >> there indeed nothing special. Also it can be derived from a real > >> lowpass filter with an appropriated phase shift. What do you think? > >> > >> Thanks. > >> > >> Zedtoe > > > > I think you can use a complex FIR filter to correct for both amplitude
as
> > well as phase (you only get amplitude changes using a real FIR > > filter...linear phase of course). > > Wrong. You can design real, non-linear-phase FIR filters. The amount of
control But can you use them on complex signals and achieve a desired phase and amplitude correction? (I'm not challenging, but asking).
> of the phase response is of course limited depending on the number of taps > available, just as the amount of control of the amplitude response is. But > you can indeed have a real, non-linear phase, FIR filter. > -- > % Randy Yates % "Though you ride on the wheels of
tomorrow,
> %% Fuquay-Varina, NC % you still wander the fields of your > %%% 919-577-9882 % sorrow." > %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO > http://home.earthlink.net/~yatescr
"Bhaskar Thiagarajan" <bhaskart@deja.com> writes:

> "Randy Yates" <yates@ieee.org> wrote in message > news:ptd74i85.fsf@ieee.org... >> "Bhaskar Thiagarajan" <bhaskart@deja.com> writes: >> >> > "ZedToe" <acoustictech_zhangtao@yahoo.com.sg> wrote in message >> > news:7c4bf533.0401231957.22326456@posting.google.com... >> >> Dear all, >> >> >> >> Why need we design complex filters? What are the advantages they have >> >> against the real-coefficient fitlers? Except the unsymmetric spectrum, >> >> there indeed nothing special. Also it can be derived from a real >> >> lowpass filter with an appropriated phase shift. What do you think? >> >> >> >> Thanks. >> >> >> >> Zedtoe >> > >> > I think you can use a complex FIR filter to correct for both amplitude > as >> > well as phase (you only get amplitude changes using a real FIR >> > filter...linear phase of course). >> >> Wrong. You can design real, non-linear-phase FIR filters. The amount of > control > > But can you use them on complex signals and achieve a desired phase and > amplitude correction? (I'm not challenging, but asking).
I'm pretty sure you can, but I can't really think of any canned filter design packages that let you do this. You could try specifying a vector of N complex numbers representing magnitude/phase at frequencies from -Fs/2 to +Fs/2 and inverse transforming the result, but there is certain to be some constraints on the length N versus the amount of magnitude and phase control. -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%% <yates@ieee.org> % Getting To The Point', *Balance of Power*, ELO http://home.earthlink.net/~yatescr
I have a filter design package that DOES allow you to manipulate the phase
and magnitude for both REAL and COMPLEX filters!
(http://www.dspcreations.com) Further more, my software allows you to
manipulate the phase of complex IIR filters too (in passband).
Bobby



"Randy Yates" <yates@ieee.org> wrote in message
news:vfmy836v.fsf@ieee.org...
> "Bhaskar Thiagarajan" <bhaskart@deja.com> writes: > > > "Randy Yates" <yates@ieee.org> wrote in message > > news:ptd74i85.fsf@ieee.org... > >> "Bhaskar Thiagarajan" <bhaskart@deja.com> writes: > >> > >> > "ZedToe" <acoustictech_zhangtao@yahoo.com.sg> wrote in message > >> > news:7c4bf533.0401231957.22326456@posting.google.com... > >> >> Dear all, > >> >> > >> >> Why need we design complex filters? What are the advantages they
have
> >> >> against the real-coefficient fitlers? Except the unsymmetric
spectrum,
> >> >> there indeed nothing special. Also it can be derived from a real > >> >> lowpass filter with an appropriated phase shift. What do you think? > >> >> > >> >> Thanks. > >> >> > >> >> Zedtoe > >> > > >> > I think you can use a complex FIR filter to correct for both
amplitude
> > as > >> > well as phase (you only get amplitude changes using a real FIR > >> > filter...linear phase of course). > >> > >> Wrong. You can design real, non-linear-phase FIR filters. The amount of > > control > > > > But can you use them on complex signals and achieve a desired phase and > > amplitude correction? (I'm not challenging, but asking). > > I'm pretty sure you can, but I can't really think of any canned filter > design packages that let you do this. You could try specifying a > vector of N complex numbers representing magnitude/phase at > frequencies from -Fs/2 to +Fs/2 and inverse transforming the result, > but there is certain to be some constraints on the length N versus the > amount of magnitude and phase control. > -- > % Randy Yates % "And all that I can do > %% Fuquay-Varina, NC % is say I'm sorry, > %%% 919-577-9882 % that's the way it goes..." > %%%% <yates@ieee.org> % Getting To The Point', *Balance of
Power*, ELO
> http://home.earthlink.net/~yatescr