Hello, I'm stuck on how to calculate the Chebyshev's transfer function's coefficients. The notes I'm following determine the coefficients once epsilon is calculated. The following equation yields epsilon: epsilon ^ 2 = 10 ^ (r / 10) - 1 Using the equation above, for r = 1dB, epsilon = 0.5088 The transfer function is defined as: H(s) = k' / ( a_0 + (a_1 * s) + (a_2 * s ^ 2) + (a_3 * s ^ 3) + ... + s ^ N ) and provide a table that show the following coefficients for a 4th order: a_0 = 0.2756 a_1 = 0.7426 a_2 = 1.4539 a_3 = 0.9528 But here is where I get stuck. I'm not sure how these values are calculated. There is this equation for calculating the pole locations: S_k = sigma_k + i * Omega_k = \ - sinh ( 1 / N * sinh^-1 (1 / epsilon ) ) * sin ( (2k - 1) / N * Pi / 2) + \ i * cosh( 1 / N * sinh^-1 (1 / epsilon ) ) * cos ( (2k - 1) / N * Pi / 2), k = 1, 2, ..., N Using this equation, I get the following results: k = 1, S_k = -0.139536, 0.983379i k = 2, S_k = -0.336870, 0.407329i k = 3, S_k = -0.336870, -0.407329i But, I do not see the relation between to the coefficients in the table and these values. If anyone can shed some light on this, Thank you! Thanks in advance, -Roberto. Here is a python script that uses ScientificPython to calculate the results above: ---- #!/usr/bin/env python import sys from Numeric import * r = None N = None count = 0 while count < len(sys.argv): if sys.argv[count] == '-r': count += 1 r = int(sys.argv[count]) * 1.0 elif sys.argv[count] == '-N': count += 1 N = int(sys.argv[count]) else: count += 1 if r is None: sys.stdout.write("r: ") r = int(sys.stdin.readline().strip()) * 1.0 if N is None: sys.stdout.write("N: ") N = int(sys.stdin.readline().strip()) epsilon = sqrt(pow(10, (r / 10)) - 1) print "epsilon: %f" % epsilon print "" for k in range(1, N): S_k_real = \ -1.0 * sinh( (1.0 / N) * arcsinh(1.0 / epsilon ) ) * sin( (2.0 * k - 1.0) / N * (pi / 2.0)) S_k_imag = \ cosh( (1.0 / N) * arcsinh(1.0 / epsilon ) ) * cos ( (2.0 * k - 1.0) / N * (pi / 2.0)) print "k = %d, S_k = %f, %fi" % (k, S_k_real, S_k_imag)
How to calculate Chebyshev coefficients
Started by ●April 14, 2006
Reply by ●April 14, 20062006-04-14
we were discussing this very recently: http://groups.google.com/group/comp.dsp/browse_frm/thread/e87be38dac40bb65/aab08d9c29100268 make sure you express the pole locations in conjugate pairs. then put two poles (that are complex conjugates of each other) together and multiply them out. then normalize "a0" and you get the feedback s-plane coeffecients for one 2nd order section. r b-j
Reply by ●April 14, 20062006-04-14
"robert bristow-johnson" <rbj@audioimagination.com> wrote in message news:1144988922.832613.291380@z34g2000cwc.googlegroups.com...> we were discussing this very recently: > >http://groups.google.com/group/comp.dsp/browse_frm/thread/e87be38dac40bb65/a ab08d9c29100268> > make sure you express the pole locations in conjugate pairs. then put > two poles (that are complex conjugates of each other) together and > multiply them out. then normalize "a0" and you get the feedback > s-plane coeffecients for one 2nd order section. > > r b-j >You need to watch the dc gain - it's different for odd and even polynomials. One of them has a 1/sqrt(1+eps^2) if I rememeber right. Tam
Reply by ●April 14, 20062006-04-14
Entropy wrote:> > You need to watch the dc gain - it's different for odd and even polynomials. > One of them has a 1/sqrt(1+eps^2) if I rememeber right.you're right for this (and i forgot it): |H(jw)|^2 = 1/(1 + (eps*T_N(w))^2) { cos(N*arccos(x)) |x| <= 1 T_N(x) = { cosh(N*arccosh(x)) x >= 1 { (-1)^N*cosh(N*arccosh(-x)) x <= -1 eps = sqrt( 10^(dBripple/10) - 1 ) it's the even N that has lower DC gain 1/sqrt(1+eps^2) but for this: H_n(s) = 1 / (1 - s/p_n)(1 - s/p_n*) = |p_n|^2 / (s - p_n)(s - p_n*) = |p_n|^2 / (s^2 - 2*Re{p_n}*s + |p_n|^2) where p_n = -cos(theta)*sinh(phi) +/- j*sin(theta)*cosh(phi) and phi = (1/N)*arcsinh(1/e) { pi/N*(n + 1/2) 0 <= n < N/2 N even and theta = { { pi/N*(n) 0 <= n < N/2 N odd and H(s) = H_0(s) * H_1(s) * H_2(s) ... in that case, i constructed each section with 0 dB gain (and never explicitly put in the single 1st-order section - ooops), so i don't see how any other DC gain creeps in there. probably i have to include the 1/sqrt(1+eps^2) gain with H(s) for even N to make sure the H(s) on the bottom is consistent with the H(jw) on the top. H(s) = 1/sqrt(1+eps^2) * H_0(s) * H_1(s) * H_2(s) ... but, for odd N, H_0(s) = sqrt(1+eps^2)/(1 + s/p_0) for only n = 0 instead of the expression for H_n(s) above. how'zat, Tam? (thanks for pointing this out, i do like to dot my t's and cross my i's.) r b-j
Reply by ●April 14, 20062006-04-14
roberto.c.aguilar@gmail.com skrev:> Hello, > > I'm stuck on how to calculate the Chebyshev's transfer function's > coefficients. The notes I'm following determine the coefficients once > epsilon is calculated. The following equation yields epsilon: > > epsilon ^ 2 = 10 ^ (r / 10) - 1 > > Using the equation above, for r = 1dB, epsilon = 0.5088 > > The transfer function is defined as: > > H(s) = k' / ( a_0 + (a_1 * s) + (a_2 * s ^ 2) + (a_3 * s ^ 3) + ... + s > ^ N ) > > and provide a table that show the following coefficients for a 4th > order: > > a_0 = 0.2756 > a_1 = 0.7426 > a_2 = 1.4539 > a_3 = 0.9528 > > But here is where I get stuck. I'm not sure how these values are > calculated....> Using this equation, I get the following results: > > k = 1, S_k = -0.139536, 0.983379i > k = 2, S_k = -0.336870, 0.407329i > k = 3, S_k = -0.336870, -0.407329i > > But, I do not see the relation between to the coefficients in the table > and these values. > > If anyone can shed some light on this, Thank you!You have already recieved some good advice. The one detail that might be missing is the link between the S_k's and a_n's above. The Chebyshev filter is computed as a set of 2nd order sequtions that each represent two complex conjugate poles (or possibly one real pole) in the transfer function. Each of the complex-valued S_k's above represent one such pair of conjugate root. Denote the roots z = Re + i*Im z'= Re - i*Im The 2nd order polynomial in s, S'(s), for each section becomes S'(s)= (s-z)(s-z')= (s-Re-i*Im)(s-Re+i*Im) = s^2 - 2Re *s + Re^2+Im^2 The a_n coefficients above are found by multiplying the polynomials S'(s) corresponding to each 2-pole section. Rune
Reply by ●April 15, 20062006-04-15
Entropy wrote: ...> You need to watch the dc gain - it's different for odd and even polynomials. > One of them has a 1/sqrt(1+eps^2) if I rememeber right.Which is practically equal to 1-eps^2/2. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●April 15, 20062006-04-15
Jerry Avins skrev:> Entropy wrote: > > ... > > > You need to watch the dc gain - it's different for odd and even polynomials. > > One of them has a 1/sqrt(1+eps^2) if I rememeber right. > > Which is practically equal to 1-eps^2/2.That was one eye-opener I got when I played with my IIR design program a few months ago: The problems people in the pre-PC and pre-calculator era had with computing "common" functions like exp, log, sinh, cosh,... Not to mention all the labour spent on calculating the "trivial" ones like squares, square roots etc. I had a really hard time sorting out from some of the books what was basic design formulas and what was "practical" (i.e. hand calculable) approximations to those design formulas. Rune
Reply by ●April 15, 20062006-04-15