# How do I design filters with unconventional parameters?

1 view (last 30 days)
Christoph F. on 25 Nov 2016
Commented: Star Strider on 25 Nov 2016
Hello,
I am looking for a way to design filters with parameters that are different from what MatLABs filter design functions expect.
For example:
ellip(N,Rp,Rs,Wp)
expects filter order, passband ripple, stopband ripple and passband edge frequency as parameters, and calculates zeroes, poles and gain that correspond to the parameters.
My filter requirements, however, are often given as "must have zeroes at normalized frequencies a and b" and "must have attenuation of X dB and normalized frequency c". This usually leads to manually changing the parameters expected by the filter design function until the requirements are fulfilled, or possibly using one of MatLABs optimization functions to automatically adjust the parameters. Another way would be to manually place the requires zeroes and poles, but then the rest of the filter coefficient to be set manually.
Are there better ways of designing a filter with requirements like fixed zero or pole locations, or a given gain (not necessarily -3 dB) at a certain frequency?

Star Strider on 25 Nov 2016
Have you experimented with the designfilt and other functions? Other ways to design filter polynomials with specific poles and zeros would be to use the poly function to create the transfer function numerator and denominator polynomials. Beyond that, you might have to go to a textbook to design a specific attenuation, or simply increase the filter order until you get the result you want.
I’m not certain if you already considered these options.
Christoph F. on 25 Nov 2016
Edited: Christoph F. on 25 Nov 2016
I haven't experimented with designfilt since it looked to me like a unified, more convenient way to run the regular filter design functions (I've been a MatLAB user for almost 20 years now, so designfilt is a fairly recent addition to me). I will look at its documentation and see if it offers additional functionality I can use.
I worked with manual zero placement, but I would still need a way to place place poles to get a certain filter type. For example, if I place a complex conjugate zero pair at normalized frequency Wn=0.3, where do I need to place a pair of poles so that the resulting filter is identical to the output of cheby2 with either a given stopband ripple OR a given stopband edge frequency?
Star Strider on 25 Nov 2016
The advantage of designfilt is that it optimises the filter design using its own algorithms, making the specification of multiple design constraints much more straightforward. (I’ve also been using MATLAB since early 1994, and in one signal processing course in 1998, had to code the filters and the discrete conversions ourselves, without the filter design functions.)
I’ve never encountered a problem such as the one you describe. My impression is that since Chebyshev filters are defined by the Chebyshev polynomials, designing specific pole-zero placement with them may not be an option. Your best option may be cascading specific simpler (for example Butterworth or FIR) filters to get the result you want. That’s not ideal, but the only way I can think of to do what you want. In both hardware and software, I’ve found that cascading simple filters is easier and more efficient that designing more complicated filters to do the same thing.