formula for the zeros of a parallel connection of filters?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

this time, i have a math-question. i'll first motivate it by some filter problem. lets assume, i have two filters specified in terms of their poles and zeros. now consider a parallel connection of these two filters. the resulting filter has the transfer function:

Code: Select all

   P                     R
 -----                 -----
  | |                   | |
  | | (z - z_p)         | | (z - z_r)
 
  p=1                   r=1

-----------------  +  -----------------

   Q                     S
 -----                 -----
  | |                   | |
  | | (z - z_q)         | | (z - z_s)
 
  q=1                   s=1
which, expressed over a common denominator, becomes:

Code: Select all

   P              S                   R              Q
 -----          -----               -----          -----
  | |            | |                 | |            | |
  | | (z - z_p)  | | (z - z_s)  +    | | (z - z_r)  | | (z - z_q)
 
  p=1            s=1                 r=1            q=1

------------------------------------------------------------------

                  Q                   S
                -----               -----
                 | |                 | |
                 | | (z - z_q)       | | (z - z_s)
 
                 q=1                 s=1

from which we can directly see, that the set of poles of the new filter is formed by union of the sets of poles the two original filters because the product of the two products in the new denominator could also be written as a single product running from 1 to Q+S. but how about the zeros? is there some easy way to figure out where the new zeros are? we can write the first summand (consisting of two products) in the numerator as one product (running up to N = P+S) and similarly write the second summand as product running up to M = R+Q, so the denominator becomes:

Code: Select all

   N                   M
 -----               -----
  | |                 | |
  | | (z - z_n)  +    | | (z - z_m)
 
  n=1                 m=1

now the question boils down to finding the roots of a sum of two polynomials which are each given in product form (that is, via their roots) - is anyone aware of a formula/theroem how these roots can be obtained from the roots of the two constituting polynomials?

thanks, robin
Last edited by Music Engineer on Thu Feb 18, 2010 11:40 pm, edited 1 time in total.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

...just found a nice list of theorems for polynomials myself:

http://homepage.smc.edu/kennedy_john/polytheorems.pdf

but it doesn't seem to address my problem. but i looked only briefly up to now.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

You guys must be aliens to understand this stuff lol

~Rob.

Post

Mathematicians, physicists and electrical engineers shouldn't have much trouble understanding these things. No need to wait for our alien overlords ;)

Post

The answer of course is 42.
Dean Roddey
Chairman/CTO Charmed Quark Systems, Ltd
www.charmedquark.com

Post

I don't think there's a way to obtain the roots of a sum of two polynomials via the roots of each of the polynomials (unless they have a root in common, of course).

Post

docdued wrote:I don't think there's a way to obtain the roots of a sum of two polynomials via the roots of each of the polynomials (unless they have a root in common, of course).
And even then only the common root would remain the same. All others would change.

Post

Dean Roddey wrote:The answer of course is 42.
you mean, i accidentaly found the question of all questions? :shock:

i'm beginning to believe that there is indeed no such formula. i guess, that means then: multiply out the numerator-products, add them and throw a root-finder at the result. i hoped to avoid that.
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

I think I might have an approach to this problem.

Let P(z) and Q(z) represent your two parallel feedforward filters and

Code: Select all

S(z) = P(z) + w∙Q(z)
where w is a free parameter. When w=0 the roots of S are the same as the roots of P. Imagine these roots moving around the z plane as w gradually increases. For the kth root r_k,

Code: Select all

dr_k/dw = Q(r_k) / S'(r_k)
This gives a differential equation of the form

Code: Select all

[P'(y)+w∙Q'(y)]∙y' - Q(y) = 0
Find y(w,C), which will be an expression in terms of w with some free parameter C. For each root r_k find C such that

Code: Select all

y(0,C) = r_k
Then the new root is

Code: Select all

r_new = y(1,C)
So the big trick is finding the general form for y. I don't see how to do this but someone with more knowledge of diffeqs might know.

Then again, I wouldn't be surprised if finding y required knowing the roots of S'.

Post

MackTuesday wrote:I think I might have an approach to this problem. Let P(z) and Q(z) represent your two parallel feedforward filters and

Code: Select all

S(z) = P(z) + w∙Q(z)
where w is a free parameter. When w=0 the roots of S are the same as the roots of P. Imagine these roots moving around the z plane as w gradually increases. For the kth root r_k

Code: Select all

dr_k/dw = Q(r_k) / S'(r_k)
interesting approach! errmm...maybe i'm overlooking something obvious, but could you explain how you arrived at that expression for the derivative?
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

Robin from www.rs-met.com wrote:errmm...maybe i'm overlooking something obvious, but could you explain how you arrived at that expression for the derivative?
Yeah, let me look at it again here.

Consider dP/dz near a root and ask which direction the root will migrate due to an infinitesimal change in w. We're looking to attain

Code: Select all

dS = 0
with infinitesimal changes in both r and w. We have

Code: Select all

dS/dz = dP/dz + w∙dQ/dz
dS/dw = dP/dw + d[wQ]/dw = 0 + Q = Q
Now here's a little trick I used that might not have been kosher. Since we always think of r as a root of P, and since r is changing, P must be changing as well. We can say that, due to these infinitesimal increments of w, P continually changes by dQ and Q changes by -dQ. And w remains at 0. Therefore we say

Code: Select all

dS/dz = dP/dz + w∙dQ/dz
 = dP/dz + 0∙dQ/dz
 = dP/dz
and then

Code: Select all

dr/dw = dS/dw * dr/dS
 = Q / dP/dr
Ahh, but I think I see a problem. Since this formulation requires that P and Q change as the root migrates, that differential equation becomes a whole lot more complicated than I thought. Hm.

I dunno, this approach might still be made to work if the resulting diffeq isn't too cruel.
Last edited by MackTuesday on Sat Feb 20, 2010 10:34 pm, edited 1 time in total.

Post

So maybe what we need to do is keep P and Q constant and think of r as a root of S. Let's see, if dS=0,

Code: Select all

dS/dz∙dz + dS/dw∙dw = (dP/dz + w dQ/dz) dz + Q dw = 0
and

Code: Select all

dz/dw = -Q / (dP/dz + w dQ/dz) = -Q / dS/dz
Yikes, I had a sign wrong the first time around. Anyway, maybe we can say

Code: Select all

z = z0 + INTEGRAL {w=0..1} -Q dw / (dP/dz + w dQ/dz)
But like I feared, this requires knowing the roots of dS/dz unless someone has a fantastic way of finding the antiderivative when there's a polynomial in the denominator.

But even if you had the roots, the partial fraction expansion requires solving a system of equations -- just as expensive as finding roots.

Post

Oh but wait a second. The integral here

Code: Select all

z = z0 + INTEGRAL {w=0..1} -Q dw / (dP/dz + w dQ/dz)
is only first-degree in w on the bottom there. I was conflating w with z in that integral. So it turns out to be

Code: Select all

z = z0 - (Q / dQ/dz) [ln ((dP/dz + dQ/dz) / Q) - ln (dP/dz / Q)]
 = z0 - (Q / dQ/dz) ln (1 + dQ/dz / dP/dz)
So that appears to be the answer we sought. Now it seems a little too good to be true, considering this answer doesn't appear to be well known and doesn't seem to have any mechanism for roots increasing or decreasing in number as we know is possible when you add two polynomials together. Hm.

Post

Good lord, this is above me.

I promised myself that I would have a simple VST plugin coded by the end of the year, so if anyone could point me in the direction of something that would give a beginner an idea of what has just been discussed in this thread, I would be very grateful.

Thanks!

Post

vadarfone wrote:Good lord, this is above me.

I promised myself that I would have a simple VST plugin coded by the end of the year, so if anyone could point me in the direction of something that would give a beginner an idea of what has just been discussed in this thread, I would be very grateful.
Actually I would put this thread into the "advanced" bin of the local topics. We have a nice number of people that actually like math, I guess (I do at least; though I'm not that great at it). What robin wants to solve is the total filter he gets when combining two filters in parallel, which probably happens to be approximately the deepest math you might encounter when working with (idealized) linear time-invariant filters. Why he actually wants to do that is beyond me as well... not that it isn't curious exercise anyway. :)

But for writing your first plugin, you most definitely don't need any of this (like said; I can't think of why he wants to do it that way anyway), so don't worry if you can't follow.

Post Reply

Return to “DSP and Plugin Development”