Reply by niarn September 30, 20132013-09-30
> >I'm glad you got it working. > >Clay >
Me 2 :), thanks How would you then rate this question (easy, medium, not fun, not interesting, just lame, etc). Why do both of the below systems of 3 equations give the solution to problem? What do they correspond to? (Note that the two systems of equations are not equivalent but they share the same real solution!) (u1+v1)*(2*K-1) + (v2+v1*u1)*(2*K+1) + v2*u1*(2*K+3) = -2*K+3 (v2+v1*u1)*(1 - K^3) + (u1+v1)*(-K^3-1) + v2*u1*(-1-K^3) = K^3-1 (v2+v1*u1)*(1+2*K^2) + (u1+v1)*(1+2*K^2) + v2*u1*(-3+2*K^2) = -2*K^2+3 u1+v1/v2 = 3*(1-K^3)/(1+K^3) 1/v2+u1*v1/v2 = 3 u1/v2 = (1-K^3)/(1+K^3) _____________________________ Posted through www.DSPRelated.com
Reply by September 27, 20132013-09-27
On Friday, September 27, 2013 6:31:46 AM UTC-4, niarn wrote:
> Hi again Clay, > > > > >Hi Clay, > > > > > >> > > >>Partial fraction decomp allows you to write the factored 3rd order s > > >equati= > > >>on as a sum. Plug in your bilinear transform at this point and reduce > > the > > >a= > > >>lgebra. > > >> > > > > > > > Please disregard my last post. The partial fraction decomposition should of > > course be done before the bilinear transformation. > > cheers > > > > > > > > _____________________________ > > Posted through www.DSPRelated.com
I'm glad you got it working. Clay
Reply by niarn September 27, 20132013-09-27
Hi again Clay,

>Hi Clay, > >> >>Partial fraction decomp allows you to write the factored 3rd order s >equati= >>on as a sum. Plug in your bilinear transform at this point and reduce
the
>a= >>lgebra. >> >
Please disregard my last post. The partial fraction decomposition should of course be done before the bilinear transformation. cheers _____________________________ Posted through www.DSPRelated.com
Reply by niarn September 27, 20132013-09-27
Hi Clay,

> >Partial fraction decomp allows you to write the factored 3rd order s
equati=
>on as a sum. Plug in your bilinear transform at this point and reduce the
a=
>lgebra. >
I'm not sure you're interested in this at all but I think that your proposal of using partial fraction decomposition is not as 'easy' as your sentence seems to indicate. It does not seem to be easier that just trying to get to the allpass decomposed form directly from the non-decomposed form of the transfer function. The issue is that after the polynomial division there is this constant term (not dependent on z) and there is no 'easy' way, at far as I can tell, to put this term into the first and second order terms such that the allpass form comes out. wolframalpha and the symbolic toolbox in matlab (2004 version) spit out the partial fraction decomposition in milliseconds but so far I have not been able to make them spit out the allpass decomposition. I'm not sure if the reason is due to some assumptions not being made or whether the symbolic engines don't find the allpass form 'interesting' enough to display. Using pencil and paper is soooo last millenium ;) Anyway, getting the expression for the coefficients is indeed very easy as you said as they can be read directly from the factored form of the denominator after doing the bilinear transformation. cheers _____________________________ Posted through www.DSPRelated.com
Reply by Tim Wescott September 20, 20132013-09-20
On Fri, 20 Sep 2013 15:04:55 -0500, gretzteam wrote:


>>However, actually implementing your lowpass filter as a sum of all-pass >>filters is practically a written invitation to the Gods of Chaos to hand >>you back an algorithm that fails miserably at actually achieving a good >>stop-band. >> >> > Why? Whenever possible, I implement all filters using a sum-of-allpass > structure. Regular hardware-friendly structure, low coefficient > sensitivity, almost no bad fixed-point artifacts regarding data > quantization, requires less multiplies...So much easier to deal with > than standard SOS! Unfortunately, not all transfer functions are > implementable, > but standard odd-order lowpass certainly are. >
OK, I gotta think that through, some time when I'm not on the clock for a customer. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by gretzteam September 20, 20132013-09-20
> >However, actually implementing your lowpass filter as a sum of all-pass >filters is practically a written invitation to the Gods of Chaos to hand >you back an algorithm that fails miserably at actually achieving a good >stop-band. >
Why? Whenever possible, I implement all filters using a sum-of-allpass structure. Regular hardware-friendly structure, low coefficient sensitivity, almost no bad fixed-point artifacts regarding data quantization, requires less multiplies...So much easier to deal with than standard SOS! Unfortunately, not all transfer functions are implementable, but standard odd-order lowpass certainly are. _____________________________ Posted through www.DSPRelated.com
Reply by niarn September 20, 20132013-09-20
>It is interesting that it seems to decompose into a pair of all-pass >filters.
Yes it is.
>However, actually implementing your lowpass filter as a sum of all-pass >filters is practically a written invitation to the Gods of Chaos to hand >you back an algorithm that fails miserably at actually achieving a good >stop-band. >
Do you mean due to coefficient quantization? I'm not sure I follow. If its made properly It should give exactly the same stopband attenuation as the non-allpass decomposed form....
>-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com > >
_____________________________ Posted through www.DSPRelated.com
Reply by niarn September 20, 20132013-09-20
>First of all, you specified a 3rd order Butterworth filter, so that
specifi=
>es the s eqn (z equ is easy to get from the s equ if you use a bilinear
tra=
>nsform). You may look this up or know from analog filter theory that to
con=
>struct a butterworth filter (3rd order) place 6 poles equally spaced
around=
> the entire unit circle with one of the poles on the negative x axis. Then
=
>just use the 3 poles on the left hand plane, you create two factors (one
li=
>near and the other quadratic) which when multiplied together yield the
butt=
>er filter transfer function. (we are specifically making the denominator -
=
>the numerator is just =3D 1). > >Partial fraction decomp allows you to write the factored 3rd order s
equati=
>on as a sum. Plug in your bilinear transform at this point and reduce the
a=
>lgebra.
>Simultaneaous equations for 3 unknowns is not hard (just tedious). I had
th=
>ose kinds of problems on more than one final exam. Gaussian elimination or
=
>yuck, you can evaluate 6 determinants. > >These methods should be familiar to engineering students. > >Clay > >
Thanks again for your feedback, very informative. Partial fraction expansion was not on my radar when I made the first post and I'm slightly disappointed that I did not think of that myself. I can't see why it shouldn't give the same result. But be sure that I will check this when I have an empty time slot ;) Just so you know, I derived the result using these lines. Here u1 is the 1st order coefficient and v1 and v2 are the second order coefficients. S contains the expressions. Actually S contains 3 solutions but it is the real solution that I posted. syms a1 a2 a3 u1 v1 v2 syms K positive a3 = (1 - K^3)/(1 + K^3); a2 = 3; a1 = 3*a3; S = solve(u1+v1/v2-a1,1/v2+u1*v1/v2-a2,u1/v2-a3) _____________________________ Posted through www.DSPRelated.com
Reply by Tim Wescott September 20, 20132013-09-20
On Fri, 20 Sep 2013 11:29:11 -0700, clay wrote:

> On Friday, September 20, 2013 11:42:22 AM UTC-4, niarn wrote: >> >Easy! Use pencil, paper, and partial fraction decomposition. >> >> >> > >> >Clay >> >> >> >> Thanks for your input. That is not how I derived the expressions. Then >> >> there is another maybe not so easy approach using pencil, paper and >> solving >> >> 3 simultaneous equations in three unknowns. How do you obtain the >> transfer >> >> function on which you perform partial fraction decomposition? >> >> >> >> _____________________________ >> >> Posted through www.DSPRelated.com > > First of all, you specified a 3rd order Butterworth filter, so that > specifies the s eqn (z equ is easy to get from the s equ if you use a > bilinear transform). You may look this up or know from analog filter > theory that to construct a butterworth filter (3rd order) place 6 poles > equally spaced around the entire unit circle with one of the poles on > the negative x axis. Then just use the 3 poles on the left hand plane, > you create two factors (one linear and the other quadratic) which when > multiplied together yield the butter filter transfer function. (we are > specifically making the denominator - the numerator is just = 1). > > Partial fraction decomp allows you to write the factored 3rd order s > equation as a sum. Plug in your bilinear transform at this point and > reduce the algebra. > > Simultaneaous equations for 3 unknowns is not hard (just tedious). I had > those kinds of problems on more than one final exam. Gaussian > elimination or yuck, you can evaluate 6 determinants. > > These methods should be familiar to engineering students. > > Clay
It is interesting that it seems to decompose into a pair of all-pass filters. However, actually implementing your lowpass filter as a sum of all-pass filters is practically a written invitation to the Gods of Chaos to hand you back an algorithm that fails miserably at actually achieving a good stop-band. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by September 20, 20132013-09-20
On Friday, September 20, 2013 11:42:22 AM UTC-4, niarn wrote:
> >Easy! Use pencil, paper, and partial fraction decomposition. > > > > > >Clay > > > > Thanks for your input. That is not how I derived the expressions. Then > > there is another maybe not so easy approach using pencil, paper and solving > > 3 simultaneous equations in three unknowns. How do you obtain the transfer > > function on which you perform partial fraction decomposition? > > > > _____________________________ > > Posted through www.DSPRelated.com
First of all, you specified a 3rd order Butterworth filter, so that specifies the s eqn (z equ is easy to get from the s equ if you use a bilinear transform). You may look this up or know from analog filter theory that to construct a butterworth filter (3rd order) place 6 poles equally spaced around the entire unit circle with one of the poles on the negative x axis. Then just use the 3 poles on the left hand plane, you create two factors (one linear and the other quadratic) which when multiplied together yield the butter filter transfer function. (we are specifically making the denominator - the numerator is just = 1). Partial fraction decomp allows you to write the factored 3rd order s equation as a sum. Plug in your bilinear transform at this point and reduce the algebra. Simultaneaous equations for 3 unknowns is not hard (just tedious). I had those kinds of problems on more than one final exam. Gaussian elimination or yuck, you can evaluate 6 determinants. These methods should be familiar to engineering students. Clay