# Filter design by distributing poles and zeros on parametric curves

An $N$th order Butterworth low-pass filter of cutoff frequency $\omega_c$ can be designed by distributing $N$ poles uniformly with respect to parameter $0 < \alpha <1$ on an s-plane parametric curve $f(\alpha) = \omega_c e^{i(\pi/2+\pi\alpha)}$, which is a semicircle:

Figure 1. Poles of a 6th order Butterworth filter (CC BY-SA 3.0 Fcorthay)

It is remarkable that the same parametric curve can be used for any filter degree $N$ giving the unnormalized transfer function:

$$H(s)=\prod_{k=1}^N\frac{1}{s-f\left(\frac{2k-1}{2N}\right)},\tag{1}$$

and that the resulting filter is always a Butterworth filter. That is to say, no other filter with the same number of poles and zeros has a higher number of vanishing derivatives of the magnitude frequency response at frequencies $\omega = 0$ and $\omega = \infty$. The set of Butterworth filters that have the same cutoff frequency $\omega_c$ form a subset of Butterworth filters to which the parametric curve $f(\alpha)$ is unique. The subset is infinite as $N$ has no upper bound.

More generally, not counting poles and zeros at infinity unless they stem from the parametric curves, any filter with $NN_p$ poles and $NN_z$ zeros, with $N$ an integer and $N_z/N_p$ a nonnegative fraction of integers, has an unnormalized transfer function of form:

$$H(s)=\frac{\prod_{k=1}^{NN_z}\left(s-f_z\left(\frac{2k-1}{2NN_z}\right)\right)}{\prod_{k=1}^{NN_p}\left(s-f_p\left(\frac{2k-1}{2NN_p}\right)\right)},\tag{2}$$

where $f_p(\alpha)$ and $f_z(\alpha)$ are parametric curves that may describe the distribution of poles and zeros in the limit $N\to\infty$.

• Question 1: What other filter types than Butterworth, defined by some optimality criterion, have infinite subsets each defined by the fraction $N_z/N_p$ and the pair of parametric curves $f_p(\alpha)$ and $f_z(\alpha)$ per Eq. 2, with the filters differing only by $N$? Type I Chebyshev filters, yes; with them the poles reside on one half of an ellipse with parametric angle $\alpha$. Both Butterworth and type I and type II Chebyshev filters are special cases of elliptic filters. Just to be clear, by "infinite subsets" I do not mean an infinite number of subsets, but subsets that are of infinite size.
• Question 2: Do non-Butterworth-non-Chebyshev elliptic filters have such infinite subsets?
• Question 3: Is every elliptic filter in such an infinite subset?

If the infinite set of all elliptic filters is an union of mutually exclusive and exhaustive infinite subsets of elliptic filters each defined by a single parametric curve for placement of poles and a single parametric curve for placement of zeros, and an irreducible fraction of the number of zeros to poles, then numerical optimization to obtain elliptic filters could be done by optimizing the parametric curves rather than the filters for any particular order. The optimal curves could be reused for several filter orders, maintaining optimality. The "if" above is why I ask questions 2 and 3. Question 1 is about extending the approach to other optimality criteria.

Certainly pole-zero plots of elliptic filters look like there are some underlying curves:

Figure 2. Logarithmic magnitude of an elliptic low-pass filter on s-plane. White points are poles and black points are zeros.

One lead is that per Eq. 1, certain values of $\alpha$ and thus certain pole and zero positions must be shared between multiple filters:

Figure 5. Values obtained by the curve parameter $\alpha$ for different filter degree $N$. Note how for several filter orders we have for example $\alpha = 0.5$, or $\alpha = 0.25$ and $\alpha = 0.75.$

In particular, for a filter that has $N$ poles or zeros, they all appear also in filters that have $3nN$ of the same where $n$ is any positive integer.

Demonstrating extremely dry humor, per user A_A's request I had a look at the lemniscate of Bernoulli as an example s-plane parametric curve:

Figure 4. Lemniscate of Bernoulli

The following parametric curve gives the left half of the lemniscate of Bernoulli, with parameter $0 < a < 1$ and starting and ending at $s=0$:

$$f(\alpha) = -\frac{\sqrt{2}\sin(\pi\alpha)}{\cos^2(\pi\alpha) + 1} + i\frac{\sqrt{2}\sin(\pi\alpha)\cos(\pi\alpha)}{\cos^2(\pi\alpha) + 1}$$

Using this parametric curve for the poles, we would like to somehow compare between different $N$ the magnitude frequency responses obtained via Eq. 1. One way is to look at the $N$th root $|H(i\omega)|^{1/N}$ of the magnitude frequency response. It also allows us to peek at what things look like at $N\to\infty$:

Figure 3. $N$th root of the magnitude frequency response of an $N$-pole filter that has its poles distributed on the lemniscate of Bernoulli uniformly with respect to the parameter of the curve. At higher frequencies than those shown the plots all follow a -6 dB/oct (-20 dB/decade) slope. In the limit $N\to\infty$ there is a discontinuity in the derivative of the plot at $\omega=0 \Rightarrow s = 0$ as the lemniscate (twice) crosses the s-plane imaginary axis at that point.

The limit of the $N$th root of the magnitude of the transfer function (Eq. 1) as $N\to\infty$ was calculated as:

$$\lim_{N\to \infty}\left|H(s)\right|^{1/N} = \prod_{0}^{1}\left|\frac{1}{s-f(\alpha)}\right|^{d\alpha} = e^{-\displaystyle\int_{0}^{1}\log\left(\left|s-f(\alpha)\right|\right)d\alpha},\tag{3}$$

where $\prod$ represents a product integral that can be calculated with the natural logarithm, integration, and the exponential function. As often with integration, there was no symbolic expression for the integral which had to be evaluated numerically for the lemniscate of Bernoulli. All in all, the resulting magnitude frequency responses look rather useless for this "randomly selected" parametric curve.

User Matt L. mentioned Lerner filters. What I've found about them, with slight interpretation:

$$H(s) = \sum_{k=1}^{m}\frac{B_k(s+a)}{(s+a)^2+b_k^2}\\ B_1 = 1/2,\, B_m = \frac{(-1)^{m+1}}{2}\\ B_i = (-1)^{k+1}\text{ for }k = 2,\dots,m-1,$$

with pole positions $-a+ib_k$ such that $b_m-b_{m-1} = b_2-b_1 = \frac{1}{2}(b_k - b_{k-1})$ for all $3 < k < m-1$. Looks like these poles, while distributed on a line, are not the poles of the complete filter but poles of parallel sections. I have not confirmed what the poles of the complete system are, or whether the Lerner filters are in any useful sense optimal. Reference: C. M. Rader, B. Gold, MIT Lincoln Laboratory Technical Note 1965-63, Digital Filter Design Techniques, 23 December 1965.

• My English is shaky this morning, so I don't quite understand what you're trying to say, but if it's about more than one way of computing an elliptic filter, I'd suggest finding the book from Lutovac, in the wikipedia's elliptic filter notes (also Dimopoulos), it's quite the eye opener: you can have 7 ways to design an elliptic filter. If this isn't what you meant, please ignore my comment. Oct 26 '16 at 6:50
• Lerner filters have all their poles on a line parallel to the imaginary axis. They have the advantage of having an approximately linear phase response. Oct 26 '16 at 20:19
• The complete filter; but if the poles of all parallel sections lie on the same line, then also the complete filter will have all its poles on that line. You're right about the reference. There's that technical note by Rader and Gold that I usually refer to. Oct 27 '16 at 6:33
• OK, which journal are we going for? :D Is there a guiding principle in this? For example, are you looking for a possible parametric that does better than the eliptic in some aspect? (e.g. transition band vs ripple). Another family that might be "interesting" is the *cycloids...But, without an "ordering principle", we can't call "worst, bad, good, best" any of them :)
– A_A
Oct 27 '16 at 8:29
• The comment thread has gone too long. However, just throwing in a parametric $|4y(1-y)| = 1$ location for Daubechies wavelet filters ams.org/journals/proc/1996-124-12/S0002-9939-96-03557-5/… Nov 1 '16 at 13:30

## 6 Answers

Throughout the answer I will use the mathematical notations, that is, the mathematica equivalent of expressing the magnitude response of a filter in frequency domain. For this, $x$ will be used instead of $j\omega$, to better reflect @Olli's question about finding a mathematical parametric curve to approximate filters. Since this is not filter design, the corner frequency is normalized to unity, hence $x$ instead of $\omega/\omega_p$.

I'm not sure if this is the answer you're looking for, but any filter can be represented through the generic transfer function:

$$H^2(x)=\frac{1}{1+\epsilon_p^2 R^2(x)}$$

where $\epsilon_p=\sqrt{10^{A_p/10}-1}$, and $R(x)$ is the characteristic attenuation function. $A_p$ is the passband attenuation/ripple in dB, but it can also be in the stopband for Cauer/Elliptic, inverse Pascal, or inverse Chebyshev (a.k.a. "Chebyshev Type II"). The latter are expressed as:

$$H^2(x)=\frac{1}{1+\displaystyle\frac{1}{\epsilon_s^2 T_N^2(x)}}$$

For Butterworth, as you've seen:

$$R(x)=x^N$$

for Chebyshev it's $R(x)=T_N(x)$, or the Chebyshev polynomials ($\cos$/$\rm acos$ for $x\leq1$ and $\cosh$/$\rm acosh$ for $x>1$), for Elliptic it's:

$$R(x)=\mathrm{cd}\left(N\frac{K_1}{K}\mathrm{cd}^{-1}(x, k), k_1\right)$$

In the book from Lutovac, there are some extremely simplistic representations through exact equivalent functions for Elliptic filters. For example, the 2nd order transfer function can be accurately represented through:

$$R(x)=\frac{\left(\sqrt{1-k^2}+1\right)x^2-1}{\left(\sqrt{1-k^2}-1\right)x^2+1}$$

where the only dependency is of the modulus $k$.

These are the known types, for less known types, for example, Legendre, $R(x)=P_N(x)$, where $P_N(x)$ are the Legendre polynomials, for Pascal filters there's the shifted and normalized version of the Pascal polynomials, which is:

$$\binom{\frac{N+1}{2}x+\frac{N-1}{2}}{N}$$

The list goes on. Some are approximated differently, for example Gaussian is $\lvert H(x)\rvert^2=\exp(-x^2)$, which is expanded with MacLaurin series, about the same thing for Bessel, which is expanded from its Laplace expression $\exp(-s)$ into its denominator terms as:

$$a_i=\frac{(2N-1)!}{2^{N-i}i!(N-i)!}$$

There are also more exotic ways to deduce the transfer function, such as Papoulis (Optimum L), and Halpern, both of which use the Legendre polynomials to integrate the response such that the transfer function is monotonically decreasing with high filter selectivity. For Papoulis, it's:

$$R(x^2)= \int_{i=-1}^{2x^2-1}{\left(\sum_{i=0}^k{a_i \cdot P_i(x)}\right)^2}$$

where $k$ is $\lfloor (N-1)/2\rfloor$, and $a_i$ are some cleverly chosen terms, depending on whether $N$, or $k$, both, are odd/even.

As noted, all these don't use the frequency domain for representation, as in $x$ is the mathematical $x$, real, not imaginary $j\omega$. Solving for the roots can either be done by simply finding the poles (and zeroes) for the transfer function when replacing $x$ with $j\omega$., thus finding out $H(s)H(-s)$ and selecting the Hurwitz polynomial, or by simply finding the roots of the mathematical expression in $x$ (see the link in the 2nd comment, below). This will yield the roots rotated by 90 degrees, which means all there is to do is to switch the real and imaginary parts between themselves and then select the righ-hand side.

Is this answer close to what you were searching for?

I think, at this point, it's important to say that filters don't exist because people were throwing darts at a map to mark down the poles, they came to be after careful considerations about the goal they had in mind.

For example, and going in approximately increasing quality, Butterworth filters came to be because there was a need for a filter that was simple to design, with monotonically increasing attenuation. Linkwitz-Riley are nothing but Butterworth in (clever) disguise such that summing a lowpass and a highpass with the same corner frequency results in a flat response, useful for audio applications.

Chebyshev (I and II) were designed to have better attenuation, at the cost of ripples in passband or stopband. Legendre, ultraspherical, Pascal (and possibly others) minimize the ripple, thus improving group delay, at the cost of slightly reduced attenuations.

Papoulis and Halpern were developed as a mix between passband ripple and monotonically increasing attenuation, while improving the attenuation around the corner frequency, at the cost of a droop in the passband.

Cauer/Elliptic filters make use of ripple in both passband and stopband in order to minimize the required order for the same, or better, attenuation.

All these are in the frequency domain, which most filters are. Going the other way, Bessel filters came to be because of the need to approximate an analog delay, so they converge towards $\exp(-j\omega)$ as the order increases, while Gaussian filters were created for zero overshoot, thus they approximate $\exp(-x^2)$ with increasing order.

Of course, as someone suggested, you can also sprinkle poles and see what comes out, maybe configure them as a star, or some honey-comb pattern, choose your favourite lemniscate, but that's not the way to do it if you want a filter out of it. Sure, you may get an exotic response that may even be applicable who-knows-where, as a single case out of a million, but that's really just a particular case. The way to go is to first impose a design goal and see how can that goal be achieved in terms of a physically realizable filter. Even if that means coming up with a who-knows-where applicable filter. :-)

Given the recent answer from @Olli, consider the simple case of a Butterworth filter, designed for, say 0.9@fp=1, 0.1@fs=5. The calculations are something like this:

\begin{align} Ap&=-20 \log_{10}(0.9)=0.91515\textrm{ dB}\\ As&=-20 \log_{10}(0.1)=20\textrm{ dB}\\ \epsilon_p&=\sqrt{10^{A_p/10}-1}=0.48432\\ \epsilon_s&=\sqrt{10^{A_s/10}-1}=9.94987\\ F&=\frac{f_s}{f_p}=\frac 51=5\\ N&=\frac{\log{\frac{\epsilon_s}{\epsilon_p}}}{\log{F}}=1.878 \end{align}

$N$ is calculated as rounded up, so $N=2$. This means that, if you match the filter's response to the passband, you'll get a higher attenuation in the stopband @fs. Using the first formula up, the attenuation@fs is:

$$H(f_s)=\frac{1}{\sqrt{1+0.48432^2*5^{2N}}}=0.08231<0.1$$

If you'd have to match the stopband to have 0.1@fs, you'd have to apply a frequency correction:

\begin{align} \omega_{\text{scale}}&=\left(\frac{\epsilon_s}{\epsilon_p}\right)^{1/N}\frac{f_p}{f_s}=9.94987^{0.5}=0.9065\\ H(5*\omega_{\text{scale}})&=0.1 \end{align}

So $\omega_{\text{scale}}$ can vary from $1$ to $0.9065$ and you'll get all the infinite possibilities in between the two extremes. Can you do it? Yes. Is it worth it? Even if you might find an argument or two, the general answer is still no. How was all this possible? Because the initial response of the Butterworth filter was already obtained, so you knew beforehand that you had an analytical expression for a filter that has monotonically decreasing frequency attenuation, which lead to finding out the poles from the denominator of the transfer function, which happen to lie on a circle with equal angles.

Given the recent answer from @Olli, there are a few things that need spelling out. First, all this is about filter design, no matter how you look at it: from a mathematical or from a physical realizability point of view.

If it is mathematical, then there is some interesting part about the theory of it, namely obtaining a different order from the same filter without the need for re-designing the original filter.

But from a physical realizability point of view, the whole process implies some extra, unneeded work, that (should) lead to the same result, and that is precisely the part about the increasing/decreasing the filter's order to obtain a new one. My arguments are as follows.

Any filter, at its core, serves to filter unneeded frequencies, be they electrical, or mechanical, or other physical quantities. Their purpouse is to modify a spectrum (or group delay, or time response). If there is the need for such a device, then that device cannot be designed by simply throwing in a filter of any kind, "just put it there, it'll filter out stuff"; its design is, most often, quite involved. But all this process has to start from the requirements. That is, first there has to be a specific goal, "let's filter out everything above $100\textrm{ Hz}$", or "let only the infrared light pass through", or anything similar, which starts by first determining the parameters with which that filter has to work.

As a quick example, if there was a need to filter out frequencies below $300\textrm{ Hz}$ and above $3000\textrm{ Hz}$, one wouldn't just throw in any bandpass filter with those corner frequencies, attenuations must be also specified, whether ripple in the passband, or stopband, or both, is needed or accepted, whether the phase is linear or not, how will the group delay affect all this, etc. So, first of all, there are specific parameters by which the filter needs designing.

Once the parameters are specified, how will the filter be designed? Let's presume that there is a need for a 12th order elliptic lowpass filter, and that there is a possibility to increase a low order filter to a high order one (see @Olli's answer). Let's say that the process of transforming a 4th order into a 12th order is a flawless one, that there is a way to specify the design parameters for the 4th order filter in such a way that, after transforming, the resulting 12th order would end up satisfying those conditions. "Premeditated thinking", if you will.

The question that comes is this: how will the 4th order filter be designed? The answer can only be through the known ways of designing it. And, if there are other methods, to come, or yet to be invented, those would have to be applied, first, in order to design that 4th order filter. Only afterwards the 12th order can be calculated. As assumed from the beginning, even with a flawless transformation process it would only mean that the resulting filter, the 12th order, towards which the whole design tries to converge, needs two steps of design: one, for the 4th order, and the second, for the 12th order, making the whole process an unnecessarily encumbered one, since the 12th order filter could have simply been designed, in the first place, with the method used for the 4th order.

Let's go a bit further and assume some more. The resulting poles of the 12th order would lie on an ellipse, and the zeroes on the imaginary axis. The distances between them would be precisely defined by the underlying elliptic functions that govern the elliptic filters. Suppose there is a way to define those curves, as @Olli hopes, in such a manner that it is possible to readily design a filter from the beginning, in one shot, by simply using these (parametric or not) curves by which all the pole placement is done. So far, so good. But those curves would have to first be calculated, and the parameters by which they unravel are the exact ones that are used for the filter design, the same ones that would generate the filter through other methods, known or yet unknown. What's more, the calculations are still left to be done, and, most probably, the underlying definitions for those parametric curves would have to be elliptical, one way or another, or no elliptical filter would come out of it[note#1]. Which means that the whole process would simply be yet another method of design for the elliptic filters, since the poles of the elliptical filter have closed form expressions, already.

Don't get me wrong. If one filter can be designed one way, the same way it can be designed in another. It's just one of those "yet to be known" ways. Bravo to the inventor. But if this method of design implies extra steps in order to converge to the same results it would take for a different method, then it doesn't seem like a feasible approach. And please note: I am not using names or descriptive labels when I am talking about the filter designs, just generic names, because it doesn't really matter which method you're using as long as the results are correct and the method isn't encumbering for the design process.

[note#1]: Simply following a generic curve in order to place the poles is not enough, and I'll give two examples, related to the Butterworth filters, who have the poles placed on a circle with equidistant angles. Chebyshev type I filters have the poles placed on an ellipse, with the angles of the Butterworth, but projected on the imaginary axis until they intercept the ellipse. Modifying the distance between the poles will result in a non-equiripple behaviour, rendering the filter a non-Chebyshev type. Similarly, the poles of the minimum-Q elliptic filter are disposed on an underlying circle, but that doesn't mean it's a Butterworth (even if the ripple is the minimum possible for an elliptic filter), because it has unequal distances between the angles. For the last one, here's a comparison of two 8th order Butterworth and minimum-Q elliptic:

Overall, despite the genuine interest the question brings, I fear it has no more than a theoretical value, at best an educational one, since it doesn't manage to fit the very part dealing with the filter design. Of course, if it should prove to be of actual value, I'd be glad to be proven wrong, as it would mean that there is a new method of filter design, possibly better than the already existent ones.

• @OlliNiemitalo Yes, it's the non-squared version. Do what the priest says, not what he does. :-) Ap is the passband attenuation/ripple, in dB, but it can also be for the stopband, in the case of Cauer/Elliptic, inverse Chebyshev, or inverse Pascal. I see there are other minor mistakes, I'll edit them. Oct 31 '16 at 8:04
• Olli, there are nice closed-form expressions for both Tchebyshevs and the Butterworth. but not so much for the Elliptical/Cauer filter. getting a well-defined alg down for that (the loci of poles and zeros) is (how shall we say?) a copulating female canine. Nov 1 '16 at 1:51
• @robertbristow-johnson Despite the accurate scientific synonim, there are at least 3 ways to represent the poles for Cauer. One is the approximation (Antoniou?, Dimopoulos?, not sure), which, I think it's the widest used. Then there's Burrus's way which accurately follows elliptical functions, i.e. the zeroes are $\pm j/(k*sn(i*K/N,k)), i=1,2,..$ (different odd/even), but that requires using theta functions and whatnot, which gets very "fluffy" in terms of CPU. Then there's Lutovac, who, even if he can't use prime numbers, greatly simplifies them, but they get bigger as the order increases. Nov 1 '16 at 7:25
• @robertbristow-johnson Me neither, as mentioned at the end of the original edit, and in one of the comments, but it looks like it got edited along the way, I'll correct it. As for the elliptic functions, Burrus and another one (forgot the name, Paarman?) use the $sn(K+sn^{-1}())$ version, but $sn(K+x)=cd(x)$, the shifted Jacobi sine, a fact noted by Lutovac. So, to avoid the need to calculate an extra complete elliptic integral, one can write $cd()$, there's no difference. A simple plot can show it ($k_1=\epsilon_p/\epsilon_s,k=fp/fs,K_1=K(k_1),K=K(k)$). Nov 1 '16 at 22:11
• @robertbristow-johnson You missed the part where I say that all the expressions use $x$ as a variable, because they reflect the mathematical function that describes the filter response, since it's related to the mathematical approach of Olli's. Plotting all the functions with $x$ in any mathematical software will get you the magnitude, without going into frequency domain. I left outside replacing $x=j\omega$, making $H(s)H(-s)$, and selecting only the Hurwitz criterion poles/zeroes, that is for filter design. Besides, you can get the poles without that, just as well (see link in comment#2). Nov 2 '16 at 6:43

While I intuitively feel that I understand what is required, I struggle to express it. I am not sure if this is because of my own limitations or if indeed the problem is difficult or ill-posed. I have a feeling that it is ill-posed. So, here is my attempt:

1. The objective is to build a filter. That is, calculate a set of coefficients of some rational form:

$$H(s) = \frac{B(s)}{A(s)} = \frac{\sum_{m=0}^{M}b_m \cdot s^m}{s^N + \sum_{n=0}^{N-1} a_n \cdot s^n}$$

(Please note, it doesn't have to be over the s-plane, it could be over the z-plane too. And also, simpler forms of it could be considered (e.g. $H(s)$ to have only poles). Let's run with the s-plane for the moment and let's keep the nominator in too).

1. Digital filters are characterised by their frequency and phase responses, both of which can be completely determined by the values (or, positions on the s-plane) of their $a_n,b_m$ coefficients. The discussion so far seems to be focusing on the frequency response so let's consider that one for the moment.

2. Given a set of some $a_n, b_m$ and some point $\sigma + j \omega$ on the s-plane, the geometric way of deriving the frequency response at that point is to form "zero vectors" (from the locations of the zeros, towards the specific point) and "pole vectors" (similarly for the poles), sum their magnitudes and form the ratio as in the equation above.

3. To ask "What [...] filter types defined by some optimality criterion have infinite subsets defined by parametric curves [...]" is to ask "What is the pair of some parametric curves $A(s, \Theta), B(s, \Theta)$ whose locations also result in a magnitude response curve with specific desired characteristics over $\Theta$ (e.g. slope, ripple, other). Where $\Theta$ is the parameter(s) of the...parametric.

4. A note, at this point: On the one hand, we are looking for $A(s), B(s)$ that satisfy two constraints. First of all they have to satisfy the constraints of the parametric (easy) and secondly they have to satisfy the constraints specified by the magnitude response characteristic (difficult).

5. I think that the problem, in its current form, is ill-posed because there is no analytic way to connect the frequency response constraints with the parametrics $A(s,\Theta), B(s, \Theta)$, except the direct evaluation of it. In other words, it is impossible at the moment to specify some constraints on the frequency response curve and through that, work backwards and find those parametrics that satisfy these constraints. We can go the other way around, but not backwards.

6. Therefore, what (i think that) realistically can be done, at the moment, is to accept $A(s, \Theta), B(s, \Theta)$ of some specific form and then, either check how do they fare as filters OR, iteratively move their coefficients around as much as their parametric allow, to squeeze the best performance they can offer out of a particular range of their $\Theta$. However, we might find that given the worked out characteristics of elliptics (for example), a given iterative scheme on a parametric might choose to "bend" the coefficients as close as possible to some "elliptic" region characteristic. This is why earlier on, I mention that we might find that a complex parametric might be possible to be broken down to a "sum of elliptics" or a "sum of curves with known characteristics". Perhaps a third constraint is required here, reading "Stay away from known configurations of $A(s), B(s)$", in other words, penalise solutions that start looking like elliptics (but still in an iterative scheme).

Finally, if this path is not too wrong so far then we are somewhere close to something like Genetic Algorithms For Filter Design, or some other informed "shoot in the dark" technique by which the coefficients of a filter satisfying specific criteria might be derived with. The above is just an example, there are more publications along these lines out there.

Hope this helps.

• +1 I like your program. For your point #4 and others, the optimization goal could be stated in terms of $\lim_{N\to \infty}\big(H(i\omega)\big)^{1/N},$ or usually its absolute value. Then again it would mean we are already relying on the the viability of the approach, which is in question. So it would be necessary to also check with some finite $N$ filters. In point #7, I don't think "repulsion of elliptics" would help as it would give sub-optimal near-elliptic filters. Rather, the optimization goal should be changed. Oct 31 '16 at 13:06
• Thank you. I agree that the optimisation goal is crucial here. "Repulsion of the eliptics" should be used more often... :)
– A_A
Oct 31 '16 at 13:59

i don't think it's particularly remarkable that Butterworth filters, defined as all-pole filters that are maximally flat at $\omega=0$ (for LPF prototype, meaning the most possible derivatives of $|H(j\omega)|$ are zero at $\omega=0$), have s-plane poles that lie equally spaced on the left half-circle of radius $\omega_0$.

from the "maximally flat" and "no zeros", you can derive

$$|H(j\omega)|^2 = \frac{1}{1 + \left(\frac{\omega}{\omega_0}\right)^{2N}}$$

for the $N$th-order Butterworth.

so

$$|H(s)|^2 = \frac{1}{1 + \left(\frac{s}{j \omega_0}\right)^{2N}}$$

$s=p_n$ is a pole when the denominator is zero.

$$1 + \left(\frac{p_n}{j \omega_0}\right)^{2N} = 0$$

or

$$\left(\frac{p_n}{j \omega_0}\right)^{2N} = -1$$

$$p_n^{2N} = - (j \omega_0)^{2N}$$

$$|p_n| = \omega_0$$

$$2N \cdot \arg\{p_n\} = -\pi + 2N \cdot \frac{\pi}{2} + 2 \pi n$$

$$\arg\{p_n\} = \frac{\pi}{2} + \frac{\pi}{N}\left( n - \tfrac12 \right)$$

for $N$th-order Tchebyshev (Type 1, which is all-pole), it's like this:

$$|H(j\omega)|^2 = \frac{1}{1 + \epsilon^2 T_N^2\left(\frac{\omega}{\omega_c}\right)}$$

where $$T_N(x) \triangleq \begin{cases} \cos\big(N \, \arccos(x) \big), & \text{if }|x| \le 1 \\ \cosh\big(N \, \operatorname{arccosh}(x) \big), & \text{if }x \ge 1 \\ (-1)^N \, \cosh\big(N \, \operatorname{arccosh}(-x) \big), & \text{if }x \le -1 \end{cases}$$

are the $N$th-order Tchebyshev polynomials and satisfy the recursion:

\begin{align} T_0(x) & = 1 \\ T_1(x) & = x \\ T_{n+1}(x) & = 2xT_n(x) - T_{n-1}(x) \quad \quad \forall n \in \mathbb{Z} \ge 1 \end{align}

and $\omega_c$ is the "passband cutoff" frequency and not to be confused with the -3 dB frequency $\omega_0$. (but the two are related.)

the passband ripple parameter is $\epsilon = \sqrt{10^{\tfrac{dB_\text{ripple}}{10}} - 1}$

analytic extension again:

$$|H(s)|^2 = \frac{1}{1 + \epsilon^2 T_N^2\left(\frac{s}{j \omega_c}\right)}$$

and again $s=p_n$ is a pole when the denominator is zero.

$$1 + \epsilon^2 T_N^2\left(\frac{p_n}{j \omega_c}\right) = 0$$

or

$$T_N\left(\frac{p_n}{j \omega_c}\right) = \pm \frac{j}{\epsilon}$$

(because $\cos(\theta) = \cosh(j \theta)$ we can use either $\cos()$ or $\cosh()$ expression for $T_N()$

$$\cosh\big(N \, \operatorname{arccosh}\left(\frac{p_n}{j \omega_c}\right) \big) = \pm \frac{j}{\epsilon}$$

$$N \, \operatorname{arccosh}\left(\frac{p_n}{j \omega_c}\right) = \operatorname{arccosh}\left(\pm \frac{j}{\epsilon}\right)$$

since $$y = \cosh(x) = \tfrac12 ( e^x + e^{-x} )$$ and $$x = \operatorname{arccosh}(y) = \log \left( y \pm \sqrt{y^2-1} \right)$$

then

$$N \log \left( \frac{p_n}{j \omega_c} \pm \sqrt{\left(\frac{p_n}{j \omega_c}\right)^2 - 1} \right) = \log \left( \pm \frac{j}{\epsilon} \pm \sqrt{\left(\pm\frac{j}{\epsilon}\right)^2-1} \right)$$

$$N \log \left( \frac{\Re(p_n)+j \Im(p_n)}{j \omega_c} \pm \sqrt{\left(\frac{\Re(p_n)+j \Im(p_n)}{j \omega_c}\right)^2 - 1} \right) = \log \left( \pm j\left( \frac{1}{\epsilon} \pm \sqrt{\frac{1}{\epsilon^2}+1} \right) \right)$$

$$N \log \left( \frac{-j \Re(p_n)+\Im(p_n)}{\omega_c} \pm \sqrt{\left(\frac{-j \Re(p_n) + \Im(p_n)}{\omega_c}\right)^2 - 1} \right) \\ = \log \left( \pm j\left( \frac{1}{\epsilon} \pm \sqrt{\frac{1}{\epsilon^2}+1} \right) \right)$$

oh dear i might not get this blasted out in 12 hours

i've decided that i am too lazy to grok through this. if anyone wants to pick it up, feel free to. lotsa conversion between rectangular and polar notation of complex values. remember when

$$w = \pm \sqrt{\ z \ }$$ then $$|w| = +\sqrt{|z|}$$ and \begin{align} \arg\{w\} &= \frac12 \arg\{z \} + \arg\{ \pm 1\} \\ &= \frac12 \arg\{z \} + \frac{\pi}{2}(1 \pm 1) \end{align}

and remember $$\log(z) = \log|z| + j\arg\{z\} + j 2 \pi n \quad n \in \mathbb{Z}$$

you may add any integer multiple of $2 \pi$ (say "$2 \pi n$") to any $\arg\{\cdot\}$ (choose the right-hand $\log()$ which is how you can get different poles for $p_n$).

if you like mathematical masturbation with complex variables, knock yourself out.

• +1 for the interesting observation, but since this doesn't address the questions I hope there will be other candidates for the bounty. Oct 30 '16 at 11:10
• so Olli, you can see how the derivation of the poles for Tchebyshev 1 and poles/zeros for Tchebyshev 2 is similarly done? Oct 31 '16 at 4:14
• the Jabobi Elliptical is a bitch. i dunno how to evaluate it without looking it up in Antonio. and it ain't gonna be closed form. Oct 31 '16 at 4:15
• Yes, the zeros of Tchebyshev 2 are uniformly distributed on parametric curve $f(\alpha) = j/\cos(\pi\alpha)$ for cutoff $1$. Oct 31 '16 at 6:46
• and how do you get that result and the loci of the poles for either Tchebyshev 1 or 2? Oct 31 '16 at 6:56

It seems that most of the participants in this discussion do not know a type of filter which may be their real solution ! Namely the Paynter filters developed by Henry M.Paynter who was a professor at MIT and partner of Philbrick Reseach. They are the best approach to "running" average filtering and treating non deterministic input signals, far better than Bessel-Thomson. I used them for physiological-medical and sonar applications. Their theories are in the January-July and July-October editions of the "Lightning Empiricist" under the general title: "New approaches for the design of Active Low Pass Filters" by Peter D. Hansen Tables are given for the poles of the 2nd, 4th and 6th order filters. I computed the same for the 8th order.

• And it would seem you missed OP's point: to find the Holy Graal of mathematical formulas that can be used to calculate any filter type (or similar). :-) Jan 25 '18 at 7:32

### 12th order elliptic to 4th order elliptic

(I'm not eligible to the bounty.) I tried to produce a counterexample to question 3 in Octave but was pleasantly surprised that I couldn't. If the answer to the question 3 is yes, then according to Fig 5. of the question, specific poles and zeros should be shared between an elliptic filter of order 4 and an elliptic filter of order 12, here shown explicitly:
Figure 1. Poles and zeros potentially shared between elliptic filters of order $N=12$ and $N=4$, in blue and numbered in order of ascending parameter $\alpha$ of a parametric curve $f(\alpha)$.

Let's design an order 12 elliptic filter with some arbitrary parameters: 1 dB pass band ripple, -90 dB stop band ripple, cutoff frequency 0.1234, s-plane rather than z-plane:

pkg load signal;
[b12, a12] = ellip (12, 0.1, 90, 0.1234, "s");
ra12 = roots(a12);
rb12 = roots(b12);
freqs(b12, a12, [0:10000]/10000);


Figure 2. The magnitude frequency response of the 12th order elliptic filter designed using ellip.

scatter(vertcat(real(ra12), real(rb12)), vertcat(imag(ra12), imag(rb12)));


Figure 3. Poles (red) and zeros (blue) of order 12 elliptic filter designed using ellip. Horizontal axis: real part, vertical axis: imaginary part.

Let's construct an order 4 filter by reusing select poles and zeros of the order 12 filter, per Fig. 1. In the particular case, ordering the poles and zeros by the imaginary part is sufficient:

[~, ira12] = sort(imag(ra12));
[~, irb12] = sort(imag(rb12));
ra4 = [ra12(ira12)(2), ra12(ira12)(5), ra12(ira12)(8), ra12(ira12)(11)];
rb4 = [rb12(irb12)(2), rb12(irb12)(5), rb12(irb12)(8), rb12(irb12)(11)];
freqs(poly(rb4), poly(ra4), [0:10000]/10000);


Figure 4. Magnitude frequency response of the 4th order filter that has all poles and zeros identical to certain ones of those of the 12th order filter, per Fig. 1. Zooming in gives a characterization of the filter: 3.14 dB pass band equiripple, -27.69 dB stop band equiripple, cutoff frequency 0.1234.

It is my understanding that an equiripple pass band and an equiripple stop band with as many ripples as the number of poles and zeros allows is a sufficient condition to say that the filter is elliptic. But let's try if this is confirmed by designing an order 4 elliptic filter by ellip with the characterization obtained from Fig 3 and by comparing the poles and zeros between the two order 4 filters:

[b4el, a4el] = ellip (4, 3.14, 27.69, 0.1234, "s");
rb4el = roots(b4el);
ra4el = roots(a4el);
scatter(vertcat(real(ra4), real(rb4)), vertcat(imag(ra4), imag(rb4)));


That against:

scatter(vertcat(real(ra4el), real(rb4el)), vertcat(imag(ra4el), imag(rb4el)), "blue", "x");


Figure 5. Comparison of pole (red) and zero (blue) locations between an ellip-designed 4th order filter (crosses) and a 4th order filter (circles) that shares certain pole and zero locations with the 12th order filter. Horizontal axis: real part, vertical axis: imaginary part.

The poles and zeros coincide between the two filters to three decimal places, which was the precision of the characterization of the filter derived from the order 12 filter. The conclusion is that at least in this particular case both the poles and zeros of the order 4 elliptic filter and those of the order 12 elliptic filter could have been obtained, at least up to a precision, by uniformly distributing them on the same parametric curves. The filters were not Butterworth or Chebyshev I or II type filters as both the pass band and the stop band had ripples.

### 4th order elliptic to 12th order elliptic

Conversely, can the poles and zeros of the 12th order filter be approximated from a pair of continuous functions fitted to the poles and zeros of the 4th order ellip filter?

If we duplicate the four poles (Fig. 5) and flip the sign of the real parts of the duplicates, we get an oval of sorts. As we go round and round the oval, the pole locations that we pass give a periodic discrete sequence. It is a good candidate for periodic band-limited interpolation by zero-padding its discrete Fourier transform (DFT). Of the resulting $24$ poles the ones with a positive real part are discarded, halving the number of poles to $12$. Instead of the zeros, their reciprocals are interpolated, but otherwise the interpolation is done the same way as with the poles. We start with the same ellip-designed 4th order filter as earlier (approximately identical to Fig. 4):

pkg load signal;
[b4el, a4el] = ellip (4, 3.14, 27.69, 0.1234, "s");
rb4el = roots(b4el);
ra4el = roots(a4el);
rb4eli = 1./rb4el;
[~, ira4el] = sort(imag(ra4el));
[~, irb4eli] = sort(imag(rb4eli));
ra4eld = vertcat(ra4el(ira4el), -ra4el(ira4el));
rb4elid = vertcat(rb4eli(irb4eli), -rb4eli(irb4eli));
ra12syn = -interpft(ra4eld, 24)(12:23);
rb12syn = -1./interpft(rb4elid, 24)(12:23);
freqs(poly(rb12syn), poly(ra12syn), [0:10000]/10000);


Figure 6. Magnitude frequency response of a 12th order filter with the poles and zeros sampled from curves matched to those of the 4th order filter.

It is not an accurate enough of a mockup of the Fig. 2 response to be useful. The stop band fares pretty well but the pass band is tilted. The band edge frequencies are approximately correct. Still, this shows potential considering the parametric curves were only described by 4 degrees of freedom each.

Let's have a look at how the poles and zeros match those of the $N=12$ ellip-generated filter:

[b12, a12] = ellip (12, 0.1, 90, 0.1234, "s");
ra12 = roots(a12);
rb12 = roots(b12);
scatter(vertcat(real(ra12), real(rb12)), vertcat(imag(ra12), imag(rb12)), "blue", "x");
scatter(vertcat(real(ra12syn), real(rb12syn)), vertcat(imag(ra12syn), imag(rb12syn)));


Figure 7. Comparison of pole (red) and zero (blue) locations between an ellip-designed 12th order filter (crosses) and a 12th order filter (circles) that was derived from the 4th order filter. Horizontal axis: real part, vertical axis: imaginary part.

The interpolated poles are quite a bit off, but zeros are matched relatively well. A larger $N$ as the starting point should be investigated.

### 6th order elliptic to 18th order elliptic

Doing the same as above but starting at 6th order and interpolating to 18th order shows a seemingly well-behaved magnitude frequency response, but still has trouble in the pass band when examined closely:

[b6el, a6el] = ellip (6, 0.03, 30, 0.1234, "s");
rb6el = roots(b6el);
ra6el = roots(a6el);
rb6eli = 1./rb6el;
[~, ira6el] = sort(imag(ra6el));
[~, irb6eli] = sort(imag(rb6eli));
ra6eld = vertcat(ra6el(ira6el), -ra6el(ira6el));
rb6elid = vertcat(rb6eli(irb6eli), -rb6eli(irb6eli));
ra18syn = -interpft(ra6eld, 36)(18:35);
rb18syn = -1./interpft(rb6elid, 36)(18:35);
freqs(poly(rb18syn), poly(ra18syn), [0:10000]/10000);


Figure 8. Top) 6th order ellip-generated filter, Bottom) 18th order filter derived from the 6th order filter. Zoomed in, the pass band has only two maxima and about 1 dB of ripple. The stop band is nearly equiripple with 2.5 dB of variation.

My guess about the trouble at the pass band is that the band-limited interpolation isn't working well enough with the (real parts of the) poles.

### Exact curves for elliptic filters

It turns out that elliptic filters for which $NN_z = NN_p = N$ provide positive examples to questions 1 and 2. C. Sidney Burrus, Digital Signal Processing and Digital Filter Design (Draft). OpenStax CNX. Nov 18, 2012 gives the zeros and poles of the transfer function of a sufficiently general $NN_z = NN_p = N$ elliptic filter in terms of the Jacobi elliptic sine $\operatorname{sn}(t, k).$ Noting that $\operatorname{sn}(t, k) = -\operatorname{sn}(-t, k),$ Burrus Eq. 3.136 can be rewritten for zeros $s_{zi},$ $i=1\dots N$ as:

$$s_{zi}=\frac{j}{k\operatorname{sn}\big(K + K(2i+1)/N,k\big)},\tag{1}$$

where $K$ is a quarter period of $\operatorname{sn}(t, k)$ for real $t$, and $0 \le k \le 1$ can be seen as a degree of freedom in the parameterization of the filter. It controls the transition band width relative to pass band width. Recognizing $(2i+1)/N = 2\alpha$ (see Eq. 2 of the question) where $\alpha$ is the parameter of the parametric curve:

$$f_z(\alpha) = \frac{j}{k\operatorname{sn}(K + 2K\alpha,k)}\tag{2},$$

Burrus Eq. 3.146 gives the upper-left quarter-plane poles including a real pole for odd $N$. It can be rewritten for all poles $s_{pi},$ $i=1\dots N$ with any $N$ as:

$$s_{pi} = \frac{\operatorname{cn}\big(K + K(2i+1)/N, k\big) \operatorname{dn}\big(K + K(2i+1)/N, k\big) \operatorname{sn}\big(\nu_0, \sqrt{1-k^2}\big)\\ \times \operatorname{cn}\big(\nu_0, \sqrt{1-k^2}\big) + j \operatorname{sn}\big(K + K(2i+1)/N, k\big) \operatorname{dn}\big(\nu_0, \sqrt{1-k^2}\big)} {1-\operatorname{dn}^2\big(K + K(2i+1)/N, k\big) \operatorname{sn}^2\big(\nu_0, \sqrt{1-k^2}\big)}, \tag{3}$$

where $\operatorname{dn}(t, k) = \sqrt{1-k^2\operatorname{sn}^2(t, k)}$ is one of the Jacobi elliptic functions. Some sources have $k^2$ as the second argument for all of these functions and call it the modulus. We have $k$ and call it the modulus. The variable $0 < \nu_0 < K´$ can be thought of as one of the two degrees of freedom $(k, \nu_0)$ of the sufficiently general parametric curves, and one of the three degrees of freedom $(k, \nu_0, N)$ of a sufficiently general elliptic filter. At $\nu_0 = 0$ the pass band ripple would be infinite and at $\nu_0 = K´$ where $K´$ is the quarter period of Jacobi elliptic functions with modulus $\sqrt{1-k^2}$, poles would equal zeros. By sufficiently general I mean that there is just one remaining degree of freedom that controls the pass band edge frequency and which will manifest itself as uniform scaling of both parametric curve functions by the same factor. The subset of elliptic filters that share $f_p(\alpha),$ $f_z(\alpha),$ and an irreducible fraction $N_z/P_z=1$, are transformed to another subset of infinite size in dimension $N$ upon change of the trivial degree of freedom.

By the same substitution as with the zeros, the parametric curve for the poles can be written as:

$$f_p(\alpha) = \frac{\operatorname{cn}\big(K + 2K\alpha, k\big) \operatorname{dn}\big(K + 2K\alpha, k\big) \operatorname{sn}\big(\nu_0, \sqrt{1-k^2}\big)\\ \times \operatorname{cn}\big(\nu_0, \sqrt{1-k^2}\big) + j \operatorname{sn}\big(K + 2K\alpha, k\big) \operatorname{dn}\big(\nu_0, \sqrt{1-k^2}\big)} {1-\operatorname{dn}^2\big(K + 2K\alpha, k\big) \operatorname{sn}^2\big(\nu_0, \sqrt{1-k^2}\big)}. \tag{4}$$

Let's plot the functions and the curves in Octave, for values of $k$ and $\nu_0$ (v0in the code) copied from Burrus Example 3.4:

k = 0.769231;
v0 = 0.6059485; #Maximum is ellipke(1-k^2)
K = 1024; #Resolution of plots
[snv0, cnv0, dnv0] = ellipj(v0, 1-k^2);
dnv0=sqrt(1-(1-k^2)*snv0.^2); # Fix for Octave bug #43344
[sn, cn, dn] = ellipj([0:4*K-1]*ellipke(k^2)/K, k^2);
dn=sqrt(1-k^2*sn.^2); # Fix for Octave bug #43344
a2K = [0:4*K-1];
a2KpK = mod(K + a2K - 1, 4*K)+1;
fza = i./(k*sn(a2KpK));
fpa = (cn(a2KpK).*dn(a2KpK)*snv0*cnv0 + i*sn(a2KpK)*dnv0)./(1-dn(a2KpK).^2*snv0.^2);
plot(a2K/K/2, real(fza), a2K/K/2, imag(fza), a2K/K/2, real(fpa), a2K/K/2, imag(fpa));
ylim([-2,2]);
a = [1/6, 3/6, 5/6];
ai = round(a*2*K)+1;
scatter(vertcat(a, a), vertcat(real(fza(ai)), imag(fza(ai)))); ylim([-2,2]); xlim([0, 2]);
scatter(vertcat(a, a), vertcat(real(fpa(ai)), imag(fpa(ai))), "red", "x"); ylim([-2,2]); xlim([0, 2]);


Figure 9. $f_z(\alpha)$ and $f_p(\alpha)$ for Burrus Example 3.4, analytically extended to period $\alpha = 0\dots2$. The three poles (red crosses) and the three zeros (blue circles, one infinite and not shown) of the example are sampled uniformly with respect to $\alpha$ at $\alpha = 1/6,$ $\alpha = 3/6,$ and $\alpha = 5/6,$ from these functions, per Eq. 2 of the question. With the extension, the reciprocal of $\operatorname{Im}\big(f_z(\alpha)\big)$ (not shown) oscillates very gently, making it easy to approximate by a truncated Fourier series as in the previous sections. The other periodic extended functions are also smooth, but not so easy to approximate that way.

plot(real(fpa)([1:2*K+1]), imag(fpa)([1:2*K+1]), real(fza)([1:2*K+1]), imag(fza)([1:2*K+1]));
xlim([-2, 2]);
ylim([-2, 2]);
scatter(real(fza(ai)), imag(fza(ai))); ylim([-2,2]); xlim([-2, 2]);
scatter(real(fpa(ai)), imag(fpa(ai)), "red", "x"); ylim([-2,2]); xlim([-2, 2]);


Figure 10. Parametric curves for Burrus Example 3.4. Horizontal axis: real part, vertical axis: imaginary part. This view does not show the speed of the parametric curve so the three poles (red crosses) and the three zeros (blue circles, one infinite and not shown) do not appear to be uniformly distributed on the curves, even as they are, with respect to the parameter $\alpha$ of the parametric curves.

Elliptic filter design by the exact pole and zero formulas given by Burrus is fully equivalent to sampling from the exact $f_p(\alpha)$ and $f_z(\alpha)$, so methods are equivalent and available. Question 1 remains open-ended. It may be that other types of filters have infinite subsets defined by $f_p(\alpha)$ and $f_z(\alpha)$ and $N_z/N_p$. Of methods of approximating the elliptic parametric curves, those that do not depend on the exact functional form may be transferable to other filter types, I think most likely to those that generalize elliptic filters, such as some subset of general equiripple filters. For them, exact formulas for poles and zeros may be unknown or intractable.

Going back to Eq. 2, for odd $N$, we have for one of the zeros $\alpha = 0.5$, which sends it to infinity by $\operatorname{sn}\big(2K,k\big) = 0$. No such thing takes place with the poles (Eq. 4). I have updated the question to have such zeros (and poles, in case) included in the count $NN_z$ (or $NN_p$). At $k = 0$, all zeros go to infinity according to $f_z(\alpha)$, which looks to give type I Chebyshev filters.

I think question 3 just got resolved and the answer is "yes". That, as it appears that we can cover all cases of elliptic filter without being in conflict with $NN_z = NN_p$, with the new definition of those.

• Olli, you can't give yourself the bounty anyway. your 500 points are gone forever. just don't waste them like i did accidentally once at the EE.SE page. Nov 1 '16 at 20:56
• Comments are not for extended discussion; this conversation has been moved to chat.
– jojek
Nov 2 '16 at 9:48
• Yes, they still are, that is the special case for odd orders, when there's an additional, single, real pole, $re/(s+re)$, to the transfer function. As for the rational function starting from zeroes, only, you have: $$R(x)=\frac{\prod_i^{n/2}{x^2-zero_i^2}}{\prod_j^{n/2}{x^2-k/zero_j^2}}$$, where $k=fs/fp$. For odd orders, $R(x)=R(x)*x$. This will make the filter have unnormalized gain, so it should be scaled by $R(0)$. Poles come from expanding $1+\epsilon^2 R^2(x)$ and finding the roots of the denominator, then selecting the left-hand side, and forming the transfer function. Nov 3 '16 at 18:00
• I wasn't sure if I said this. To make the transfer function, it's not really necessary to follow the book by making $H(s)H(-s)$, then left-hand side poles, then rational transfer function according to @A_A's formula. Mathematically, and the practical result, is that after finding the roots from $1+\epsilon^2R^2(x)$ (note: $x$, not $j\omega$, or $s$), simply select the roots with the positive realparts and either positive or negative imagparts (not both). I.e. for $N=4$, there would be 4 pairs/8 poles; after selection you have 2 different poles. Then simply: $$N(s)=\prod_i^{N/2}{|p_i|^2}$$... Nov 4 '16 at 7:26
• (for all-pole filters), where $p=\sigma+j\omega$, and $$N(s)=\prod_i^{N/2}{s^2+|z_i|^2}$$ , where $z=j\mu$ (for pole-zero filters), while the denominator: $$D(s)=\prod_j^{N/2}{s^2+2*Re(p_j)*s+|p_j|^2}$$ and $$H(s)=\frac{N(s)}{D(s)}$$ . This would be the lowpass prototype. Nov 4 '16 at 7:31

I'll add here some notes that may be useful if someone wants to calculate the limit $N\to\infty$ of the $N$th root of magnitude of a transfer function with a multiple of $N$ poles and zeros distributed on arbitrary parametric curves. One could approximate that by using a large $N$ and by distributing the poles and zeros uniformly over the parameter of the parametric curve. Unfortunately the approximation always has infinite error on dB scale at the locations of the poles and zeros of the realizable transfer function. In that sense a better building block is a line segment with uniform pole or zero distribution along its length. Considering just $N$ zeros, distributed on a line segment with start point $x_0 + y_0i$ and end point $x_1 + y_1i:$

$$\lim_{N\to\infty}|H(0)|^{1/N} = \prod_0^1\Bigg|\left(x_0+y_0i\right)(1-\alpha) + \left(x_1+y_1i\right)\alpha\Bigg|^{d\alpha}\\ = \prod_0^1\left(\sqrt{\left(x_0(1 - \alpha) + x_1x\right)^2 + \left(y_0(1 - \alpha) + y_1\alpha\right)^2}\right)^{d\alpha}\\ = e^{\displaystyle\int_0^1\log\left(\sqrt{\left(x_0(1 - \alpha) + x_1\alpha\right)^2 + \left(y_0(1 - \alpha) + y_1\alpha\right)^2}\right)d\alpha}\\ = e^{\left(\displaystyle\frac{\left(x_0y_1 - x_1y_0\right)\operatorname{atan2}\left(x_0y_1 - x_1y_0, x_0x_1 + y_0y_1\right)}{\left(x_0 - x_1\right)^2 + \left(y_0 - y_1\right)^2} - 1\right)}\\ \times \left(x_0^2 + y_0^2\right)^{\left(\displaystyle\frac{x_1\left(x_0 - x_1\right) + y_0\left(y_0 - y_1\right) + \left(x_0 - x_1\right)^2}{2\left(\left(x_0 - x_1\right)^2 + \left(y_0 - y_1\right)^2\right)}\right)}\\ \times \left(x_1^2 + y_1^2\right)^{\left(\displaystyle\frac{x_0\left(x_1 - x_0\right) + y_1\left(y_1 - y_0\right) + \left(x_1 - x_0\right)^2}{2\left(\left(x_1 - x_0\right)^2 + \left(y_1 - y_0\right)^2\right)}\right)}$$

Some special cases need to be handled separately. If $x_0 = 0$ and $y_0 = 0$ we must use the limit: $$= e^{-1}\sqrt{x_1^2 + y_1^2}$$

Or conversely if $x_1 = 0$ and $y_1 = 0$: $$= e^{-1}\sqrt{x_0^2 + y_0^2}$$

Or if the line segment has zero length, $x_0 = x_1$ and $y_0 = y_1$, we have just a regular zero: $$= \sqrt{x_0^2 + y_0^2}$$

To do the evaluation at different argument values of $H(z)$ or $H(s)$, simply subtract that value from the line start and end points.

What this looks like on the complex plane:
Figure 1. Magnitude of the transfer function with a single zero. 1 dB steps are indicated in turquoise and 10 dB steps in yellow.

Figure 2. The limit $N\to\infty$ of the $N$th root of magnitude of a transfer function with $N$ zeros uniformly distributed on a line segment. There is a crease at the line segment, but the value never goes to zero like with a regular, realizable zero. At sufficient distance this would look like a regular zero. The color code is the same as in Fig. 1.

Figure 3. An approximation of Fig. 2 using discrete zeros: 5th root of the magnitude of a polynomial with 5 zeros distributed uniformly on the line segment. At the location of each zero, the value is zero, because $0^{1/5} = 0.$

Figs. 1 and 2 were generated using this Processing sketch, with source code:

float[] dragPoints;
int dragPoint;
float dragPointBackup0, dragPointBackup1;
boolean dragging, activated;
PFont fnt;
PImage bg;
float pi = 2*acos(0.0);
int appW, appH;
float originX, originY, scale;

int numDragPoints = 2;

void setup() {
appW = 600;
appH = 400;
originX = appW/2;
originY = appH/2;
scale = appH*7/16;
size(600, 400);
bg = createImage(appW, appH, RGB);
dragging = false;
dragPoint = -666;
dragPoints = new float[numDragPoints*2];
dragPoints[0] = originX-appW*0.125;
dragPoints[1] = originY+appH*0.125;
dragPoints[2] = originX+appW*0.125;
dragPoints[3] = originY-appH*0.125;
fnt = createFont("Arial",16,true);
ellipseMode(RADIUS);
activated = false;
}

void findDragPoint() {
int cutoff = 49;
int oldDragPoint = dragPoint;
float dragPointD = 666666666;
dragPoint = -666;
for (int t = 0; t < numDragPoints; t++) {
float d2 = (mouseX-dragPoints[t*2])*(mouseX-dragPoints[t*2]) + (mouseY-dragPoints[t*2+1])*(mouseY-dragPoints[t*2+1]);
if (d2 <= dragPointD) {
dragPointD = d2;
if (dragPointD < cutoff) {
dragPoint = t;
}
}
}
if (dragPoint != oldDragPoint) {
loop();
}
}

void mouseMoved() {
if (activated) {
if (!dragging) {
findDragPoint();
loop();
}
}
}

void mouseClicked() {
if (dragPoint < 0) {
activated = !activated;
if (activated) {
findDragPoint();
}
}
loop();
}

void mousePressed() {
if (dragPoint >= 0) {
dragging = true;
dragPointBackup0 = dragPoints[dragPoint*2];
dragPointBackup1 = dragPoints[dragPoint*2+1];
} else {
dragging = false; // Not needed?
}
loop();
}

void mouseDragged() {
if (!activated) {
dragPoint = -666;
activated = true;
findDragPoint();
}
if (dragging) {
int x = mouseX;
int y = mouseY;
if (x < 5) {
x = 5;
} else if (x >= appW - 5) {
x = appW - 6;
}
if (y < 5) {
y = 5;
} else if (y >= appH - 5) {
y = appH - 6;
}
dragPoints[dragPoint*2] = x;
dragPoints[dragPoint*2+1] = y;
loop();
}
}

void mouseReleased() {
if (activated && dragging) {
dragging = false;
loop();
}
}

float sign(float value) {
if (value > 0) {
return 1.0;
} else if (value < 0) {
return -1.0;
} else {
return 0;
}
}

void draw() {
for(int y = 0; y < appH; y++) {
for(int x = 0; x < appW; x++) {
float x0 = (dragPoints[0]-x)/scale;
float y0 = (dragPoints[1]-y)/scale;
float x1 = (dragPoints[2]-x)/scale;
float y1 = (dragPoints[3]-y)/scale;
float gain;
if (x0 == x1 && y0 == y1) {
gain = sqrt(x0*x0 + y0*y0);
} else if (x0 == 0 && y0 == 0) {
gain = exp(-1)*sqrt(x1*x1 + y1*y1);
} else if (x1 == 0 && y1 == 0) {
gain = exp(-1)*sqrt(x0*x0 + y0*y0);
} else {
gain = exp((x0*y1 - x1*y0)*atan2(x0*y1 - x1*y0, x0*x1 + y0*y1)/(sq(x0 - x1) + sq(y0 - y1)) - 1)*pow(x0*x0 + y0*y0, (x1*(x0 - x1) + y0*(y0 - y1) + sq(x0 - x1))/(2*(sq(x0 - x1) + sq(y0 - y1))))*pow(x1*x1 + y1*y1, (x0*(x1 - x0) + y1*(y1 - y0) + sq(x1 - x0))/(2*(sq(x1 - x0) + sq(y1 - y0))));
}
int intensity10 = round(log(gain)/log(10)*0x200)&0xff;
int intensity1 = round(log(gain)/log(10)*(0x200*10))&0xff;
bg.pixels[y*appW + x] = color(intensity10, 0xff, intensity1);
}
}
image(bg, 0, 0);
noFill();
stroke(0, 0, 255);
strokeWeight(1);
line(dragPoints[0], dragPoints[1], dragPoints[2], dragPoints[3]);

//ellipse(originX, originY, scale, scale);
if (!activated) {
textFont(fnt,16);
fill(0, 0, 0);
text("Click to activate",10,20);
for (int x = 0; x < appW; x++) {
color c = color(110*x/appW+128, 110*x/appW+128, 110*x/appW+128);
set(x, 0, c);
}
for (int y = 0; y < appH; y++) {
color c = color(110*y/appH+128, 110*y/appH+128, 110*y/appH+128);
set(0, y, c);
}
}

for (int u = 0; u < numDragPoints; u++) {
stroke(0, 0, 255);
if (dragPoint == u) {
if (dragging) {
fill(0, 0, 255);
strokeWeight(3);
ellipse(dragPoints[u*2], dragPoints[u*2+1], 5, 5);
} else {
noFill();
strokeWeight(3);
ellipse(dragPoints[u*2], dragPoints[u*2+1], 6, 6);
}
} else {
//noFill();
//strokeWeight(1);
//ellipse(dragPoints[u*2], dragPoints[u*2+1], 6, 6);
}
}
noLoop();
}