Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | How to implement a filter with arbitrary amplitude curve and phase curve?

There are 6 messages in this thread.

You are currently looking at messages 0 to 6.


How to implement a filter with arbitrary amplitude curve and phase curve? - jason han - 2003-11-20 00:40:00

Hello, all
I am currently working on a project which needs to design a custom filter
with arbitrary amplitude curve and arbitrary phase curve. All these cures
are known(I call it desired curve). I sampled desired amplitude curve and
did IFFT, then shifted, windowed. I got filter kernel. I checked this filter
amplitude with desired one, It matches very well. But, the phase of this
filter is totally different with desired phase curve.
How can I design this filter match both amplitude and phase character?

Many thanks
jason


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How to implement a filter with arbitrary amplitude curve and phase curve? - Brian Reinhold - 2003-11-20 06:08:00



Dumb question

Did you account for the delay due to the length of the IFFT when noting the
difference in the phase curves (though I am not sure what you mean by phase
curve)?

Brian

"jason han" <j...@rogers.com> wrote in message
news:ktYub.6631$J%S...@twister01.bloor.is.net.cable.rogers.com...
> Hello, all
> I am currently working on a project which needs to design a custom filter
> with arbitrary amplitude curve and arbitrary phase curve. All these cures
> are known(I call it desired curve). I sampled desired amplitude curve and
> did IFFT, then shifted, windowed. I got filter kernel. I checked this
filter
> amplitude with desired one, It matches very well. But, the phase of this
> filter is totally different with desired phase curve.
> How can I design this filter match both amplitude and phase character?
>
> Many thanks
> jason
>
>


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How to implement a filter with arbitrary amplitude curve and phase curve? - Matt North - 2003-11-20 06:41:00

Jason,

I am new to this therefore ignore me if i am barking up the wrong tree.

>>I sampled desired amplitude curve
Does this mean you have generated your coefficients by sampling an analogue
waveform?
Are these coefficients palindromic? if so you will get an FIR filter (Linear
Phase).
A bode plot of the phase of an FIR filter will have a sawtooth response as
it wraps around
on each zero on the s-plane, is this what you are seeing?

>> How can I design this filter match both amplitude and phase character?
I would be interested to find out myself. All the books show how to design a
digital
filter from the desired amplitude response of a filter.
What if you need to design an ALL PASS filter with a desired phase
response??

Matt


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How to implement a filter with arbitrary amplitude curve and phase curve? - Vladimir Vassilevsky - 2003-11-20 12:03:00


jason han wrote:
> 
> Hello, all
> I am currently working on a project which needs to design a custom filter
> with arbitrary amplitude curve and arbitrary phase curve.

The best way to do that is by the brute force multi variable
optimization. 
The other way is to split the passband into many subbands by common
bandpass filters and apply desired gains and delays to each subband,
then add all together.    


> All these cures
> are known(I call it desired curve). I sampled desired amplitude curve and
> did IFFT, then shifted, windowed. I got filter kernel. I checked this filter
> amplitude with desired one, It matches very well. But, the phase of this
> filter is totally different with desired phase curve.

You should deal with the complex amplitude-phase curve.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How to implement a filter with arbitrary amplitude curve and phase curve? - Ban - 2003-11-20 12:56:00

jason han wrote:
|| Hello, all
|| I am currently working on a project which needs to design a custom
|| filter with arbitrary amplitude curve and arbitrary phase curve. All
|| these cures are known(I call it desired curve). I sampled desired
|| amplitude curve and did IFFT, then shifted, windowed. I got filter
|| kernel. I checked this filter amplitude with desired one, It matches
|| very well. But, the phase of this filter is totally different with
|| desired phase curve.
|| How can I design this filter match both amplitude and phase
|| character?
||
|| Many thanks
|| jason

Maybe this document is of use. But it is a dissertation and requires a bit
of understanding.
http://www.nt.tuwien.ac.at/dspgroup/zip/Thesis_M_Lang.ps.gz
Algorithms for the Constrained Design of Digital Filters with Arbitrary
Magnitude and Phase Response.

ciao Ban


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: How to implement a filter with arbitrary amplitude curve and phase curve? - robert bristow-johnson - 2003-11-20 13:07:00

In article ktYub.6631$J%S...@twister01.bloor.is.net.cable.rogers.com,
jason han at j...@rogers.com wrote on 11/20/2003 00:40:

> I am currently working on a project which needs to design a custom filter
> with arbitrary amplitude curve and arbitrary phase curve.

okay, first thing you need to think about is that there is a *minimum* phase
that a causal filter with some arbitrary amplitude can have.  the minimum
phase (in radians) and the natural log of the amplitude are a Hilbert
transform pair.

if, for simplicity, you take "causal" out of the spec, for the time being
(and add whatever delay to make it causal later), then you should be able to
specify an "arbitrary amplitude curve and arbitrary phase curve" (make sure
the amplitude is even symmetry and the phase is odd symmetry, if you want a
real impulse response), sample the complex curve densely, inverse DFT it,
and you will have a possibly (likely) non-causal impulse response.  delay
the impulse response enough to make it causal, and you have some
approximation to what you want.

if you have access to the Parks-McClellan algorithm (called "remez" in
MATLAB), there is a way to design the filter with a sorta min-max norm for
both amplitude and phase.  there is a trick on how to do this (from Eric
Jacobson) at the dspguru.com web site.

> All these cures
> are known(I call it desired curve). I sampled desired amplitude curve and
> did IFFT, then shifted, windowed. I got filter kernel. I checked this filter
> amplitude with desired one, It matches very well. But, the phase of this
> filter is totally different with desired phase curve.

when you shifted it, you added a linear phase term to your phase.  if you
look at it in terms of phase-delay or group-delay, the curves should look
right except for a constant delay added.

> How can I design this filter match both amplitude and phase character?
> 
> Many thanks

FWIW,

r b-j

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.