In article ktYub.6631$J%
[email protected] rogers.com,
jason han at
[email protected] 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