Pertanyaan matematika yang keluar dari menggunakan transformasi bilinear


10

Jadi ini terkait dengan Cookbook dan saya mencoba menyelesaikannya mungkin dua dekade lalu, menyerah, dan diingatkan tentang masalah yang belum terpecahkan. Tapi itu sangat lurus ke depan, tapi aku masih terjebak dalam kotoran.

Ini adalah Bandpass filter sederhana (BPF) dengan frekuensi resonansi Ω0 dan resonansi Q :

H(s)=1QsΩ0(sΩ0)2+1QsΩ0+1

Pada frekuensi resonansi

|H(jΩ)|H(jΩ0)=1

dan batas atas dan bawah didefinisikan sedemikian rupa sehingga

|H(jΩU)|2=|H(jΩ02BW/2)|2=12

|H(jΩL)|2=|H(jΩ02BW/2)|2=12

Kami menyebutnya "setengah kekuatan bandedges" . Karena kami audio, kami mendefinisikan bandwidth dalam oktaf, dan di dunia analog bandwidth ini dalam oktaf, BW , terkait dengan Q sebagai:

1Q=2BW12BW=2sinh(ln(2)2BW)

Kami menggunakan transformasi bilinear (dengan frekuensi resonansi pra-bengkok) yang memetakan:

sΩ01tan(ω0/2)1z11+z1jΩΩ0jtan(ω/2)tan(ω0/2)

membiarkan z=ejω dan s=jΩ .

Frekuensi sudut resonansi dari filter analog adalah Ω0 , dan dengan kompensasi warping frekuensi dilakukan ke frekuensi resonansi dalam filter digital terwujud, ketika ω=ω0 (frekuensi resonansi yang ditentukan pengguna), kemudian Ω=Ω0 .

Jadi jika frekuensi sudut analog

ΩΩ0=tan(ω/2)tan(ω0/2)

kemudian dipetakan ke frekuensi sudut digital sebagai

ω=2arctan(ΩΩ0tan(ω0/2))

Sekarang, bandedges atas dan bawah di dunia analog adalah

ΩU=Ω02BW/2
ΩL=Ω02BW/2

dan dalam domain frekuensi digital

ωU=2arctan(ΩUΩ0tan(ω0/2))=2arctan(2BW/2tan(ω0/2))

ωL=2arctan(ΩLΩ0tan(ω0/2))=2arctan(2BW/2tan(ω0/2))

Maka perbedaan yang sebenarnya, dalam frekuensi log dari bandeges (yang merupakan bandwidth aktual dalam filter digital) adalah:

bw=log2(ωU)log2(ωL)=log2(2arctan(2BW/2tan(ω0/2)))log2(2arctan(2BW/2tan(ω0/2))) 

atau

ln(2)bw=ln(arctan(eln(2)BW/2tan(ω0/2)))ln(arctan(eln(2)BW/2tan(ω0/2)))

Ini memiliki bentuk fungsional

f(x)=ln(arctan(αex))ln(arctan(αex))

dimana f(x)ln(2)bw , xln(2)2BWdanαtan(ω0/2)

Yang ingin saya lakukan adalah membalikkan f(x) (tapi saya tahu saya tidak bisa melakukannya persis dengan formulir tertutup yang bagus). Saya sudah melakukan pendekatan tingkat pertama dan saya ingin menumbuhkannya hingga pendekatan tingkat ketiga. Dan ini telah menjadi semacam taring betina yang bersanggama, meskipun harus lurus ke depan.

Sekarang ini ada hubungannya dengan Formula Pembalikan Lagrange dan saya hanya ingin mengambil satu istilah lagi dari yang saya miliki.

Kita tahu dari atas bahwa f(x) adalah fungsi aneh-simetri:

f(x)=f(x)

Ini berarti dan semua persyaratan urutan-seri Maclaurin akan menjadi nol:f(0)=0

y=f(x)=a1x+a3x3+...

Fungsi terbalik juga simetri ganjil, melewati nol, dan dapat dinyatakan sebagai seri Maclaurin

x=g(y)=b1y+b3y3+...

dan jika kita tahu apa dan satu 3 adalah dari f ( x ) , maka kita memiliki ide yang bagus apa b 1 dan b 3 harus:a1a3f(x)b1b3

b1=1a1b3=a3a14

Sekarang, saya bisa menghitung turunan dari f(x) dan mengevaluasinya pada nol dan saya dapatkan

a1=2α(1+α2)arctan(α)=sin(ω0)ω0/2
b1=(1+α2)arctan(α)2α=ω0/2sin(ω0)

Tapi saya mengalami jalang dari waktu mendapatkan dan karena itu b 3 . Adakah yang bisa melakukan ini? Saya bahkan setuju dengan ekspresi solid untuk turunan ketiga dari f ( x ) yang dievaluasi pada x = 0 .a3b3f(x)x=0


2
Hanya untuk memperjelas: Tujuan Anda adalah membalikkan , yaitu untukf(x) yang diberikan, Anda ingin menemukanx? Secara khusus, Anda ingin melakukannya dengan ekspansi polinomial dan Anda mencari koefisien ke-3 (karena ke-2 adalah nol lakukan untuk keanehan fungsi). Baik?
f(x)=ln(arctan(αex))ln(arctan(αex))
f(x)x
Maximilian Matthé

2
Jadi, Anda ingin tahu diberikan b w , yaitu, Anda ingin tahu apa bandwidth filter analog Anda harus memilih untuk mendapatkan bandwidth yang diinginkan dari filter digital, kan? BWbw
Matt L.

2
ya, ya, dan ya.
robert bristow-johnson

1
@robertbristow-johnson I didn't read the question too carefully, but I did notice you are interested in f(x) at x=0. Is it ok to use Mathematica or Wolfram Alpha to compute that? I get a pretty clean result: 4(8π2)α3π3. wolframalpha.com/input/… And if you remove the "evaluate at x=0" part, Wolfram spits out the couplating female canine in its full glory.
Atul Ingle

1
Typo in my f(x) there. The "clean" result is actually: (6a2)/((a2+1)2atan(a)2)+(2a)/((a2+1)atan(a))+(16a5)/((a2+1)3atan(a))+(12a4)/((a2+1)3atan(a)2)(16a3)/((a2+1)2atan(a))+(4a3)/((a2+1)3atan(1)(a)3) wolframalpha.com/input/…
Atul Ingle

Jawaban:


4

To complement my part to this question: Here is a somewhat shorted answer based upon a manual expansion of the odd function f(x)

f(x)=ln(arctan(αex))ln(arctan(αex))(1)=f1x+f3x3+O(x5)
into a series up to the third order. Some more details can be found at mathSE.

At first we focus at the left-hand term

ln(arctan(αex))
of f(x) and start with

Series expansion of arctan:

We obtain

arctan(αex)=n=0(1)n2n+1α2n+1e(2n+1)x=(2)=j=01j!n=0(1)n(2n+1)j1α2n+1xj

We now derive from (2) the coefficients up to x3. Using the coefficient operator [xk] to denote the coefficient of xk in a series we obtain

[x0]arctan(αex)=n=0(1)n2n+1α2n+1=arctanα[x1]arctan(αex)=n=0(1)nα2n+1=α1+α2[x2]arctan(αex)=12n=0(1)n(2n+1)α2n+1==α2ddα(α1+α2)=α(1α2)2(1+α2)2[x3]arctan(αex)=16n=0(1)n(2n+1)2α2n+1=α26n=0(1)n(2n+1)(2n)α2n1+α6n=0(1)n(2n+1)α2n==(α26d2dα2+α6ddα)(α1+α2)==α56α3+α6(1+α2)3

We conclude

arctan(αex)=arctan(α)+α1+α2x+α(1α2)2(1+α2)2x2(3)+α56α3+α6(1+α2)3x3+O(x4)

Powers in logarithmic series:

In order to derive the coefficients of the logarithmic series

ln(arctan(αex))=n=1(1)n+1n(arctan(αex)1)n
we write the expression (3) as
arctan(αex)=a0+a1x+a2x2+a3x3+O(x4)
and we consider
(4)ln(arctan(αex))=n=1(1)n+1n((a01)+a1x+a2x2+a3x3)n+O(x4)

We now set A(x)=(a01)+a1x+a2x2+a3x3 and extract the coeffcients of x0 to x3 from

(A(x))n=((a01)+a1x+a2x2+a3x3)n=j=0n(nj)(a01)j(a1x+a2x2+a3x3)nj(5)=j=0n(nj)(a01)jk=0nj(njk)a1kxk(a2x2+a3x3)njk

We obtain from (5)

[x0](A(x))n==(a01)n[x1](A(x))n==a1n(a01)n1[x2](A(x))n==a2n(a01)n1+12n(n1)a12(a01)n2[x3](A(x))n==na3(a01)n1+a1a2n(n1)(a01)n2(6)+16n(n1)(n2)a13(a01)n3

Series expansion of logarithm:

We calculate using (6) the coefficients of ln(arctan(αex)) in terms of aj,0j3

[x0]ln(arctan(αex))=n=1(1)n+1n[x0]A(x)=n=1(1)n+1n[x0](a01)n=ln(a01)[x1]ln(arctan(αex))=n=1(1)n+1n[x1]A(x)=n=1(1)n+1n[x0]a1n(a01)n1=a1n=0(1)n(a01)n=a1a0[x2]ln(arctan(αex))=n=1(1)n+1n[x2]A(x)=n=1(1)n+1n(a2n(a01)n1+12n(n1)a12(a01)n2)==(a2+a122dda0)(1a0)=a2a0a122a02[x3]ln(arctan(αex))=n=1(1)n+1n[x3]A(x)=n=1(1)n+1n(na3(a01)n1+a1a2n(n1)(a01)n2+16n(n1)(n2)a13(a01)n3)==(a3+a1a2dda0+a136d2da02)(1a0)(7)=a3a0a1a2a02+a133a03

Series expansion of f(x):

Now it's time to harvest. We finally obtain with (3) and (7) respecting that f(x) is odd

f(x)=ln(arctan(αex))ln(arctan(αex))==2a1a0x+2(a3a0a1a2a02+a133a03)x3+O(x5)=2α(1+α2)arctan(α)x+α3(1+α2)3arctan(α)(α46α2+13α(1α2)arctan(α)+2α2(arctan(α))2)x3+O(x5)

Markus, while you are correct about O(x4), since we know f(x) has odd-symmetry and that the even-order terms are zero, i think you can say this expansion is good to O(x5).
robert bristow-johnson

@robertbristow-johnson: Yes, of course. Updated accordingly. :-)
Markus Scheuer

Great effort! Trying to read this detailed and lengthy answer I couldn't see how you could isolate O(x4), in the equation (4), outside of the logarithm? The infinite series already includes every power of x, so what does the isolated O(x4) term mean there?
Fat32

Of course I got the feeling of what you want to mean there but then the proper notation could be something like this:
ln(arctan(αex)) = n=1(1)n+1n((a01)+a1x+a2x2+a3x3+O1(x4))n = T0+T1x+T2x2+T3x3+O2(x4)
where I used T to stay away from all of your other notation. And note that I have used O1 and O2 to distinguish between those two sets of coefficents. So now your equation (4) and this above line are not exactly the same. I don't think however it will effect any of your further progress.
Fat32

@Fat32: You might want to look at big-O notation
Markus Scheuer

3

(Converting comment to answer.)

Using Wolfram Alpha, f(x) at x=0 evaluates to:

f(0)=6α2(α2+1)2(arctan(α))2 + 2α(α2+1)arctan(α)+16α5(α2+1)3arctan(α) + 12α4(α2+1)3(arctan(α))216α3(α2+1)2arctan(α) + 4α3(α2+1)3(arctan(α))3=2(α46α2+1)α(α2+1)3arctan(α)+6(α21)α2(α2+1)3(arctan(α))2+4α3(α2+1)3(arctan(α))3

http://www.wolframalpha.com/input/?i=evaluate+d3%2Fdx3++(+ln+(arctan+(a+exp(+x)))+-+ln+(arctan(a+exp(-+x)))+)+at+x%3D0

We can also double check if this matches up with Markus's answer here.

His coefficient of x3 comes out to be

α3(1+α2)3arctan(α)(α46α2+13α(1α2)arctan(α)+2α2(arctan(α))2).

If we multiply that by 6 and rearrange some factors we get:

2α(α46α2+1)(1+α2)3arctan(α)6α2(1α2)(1+α2)3(arctan(α))2+4α3(1+α2)3(arctan(α))3

which matches up!


Atul, it appears that your simplified answer is not consistent with Markus's answer at the math SE. it should be the case that
f(x)|x0 = 3!a3=6a3
i don't think every term in your f'''(0) is consistent with Markus. could be that Markus is wrong.
robert bristow-johnson

2
@robertbristow-johnson I think they match up.
Atul Ingle

they do now. i think Markus must have had an error. he did his answer the good old-fashioned way.
robert bristow-johnson

Atul, you will get your bounty. but i explored the rules about bounty and they don't let me split it, but they let me award it twice, but one at a time. so since Markus has less rep than you here at dsp.se and since he grunged out an answer without the help of a computer, i'm awarding his bounty first. then i will place another bounty on this question and then i'll award it to you. it says i need to wait 23 hours. dunno who's gonna get my "check mark" yet.
robert bristow-johnson

1
@robertbristow-johnson sorry for the late response. The coefficients are 2/3,2/15,16/945,2/945 for ω02,ω04,ω06,ω08 respectively. wolframalpha.com/input/…
Atul Ingle

3

The problem as posed in the question appears to have no closed-form solution. As mentioned in the question and shown in other answers, the result can be developed into a series, which can be accomplished by any symbolic math tool such as Mathematica. However, the terms become quite complicated and ugly, and it is unclear how good the approximation is when we include terms up to third order. Since we can't get an exact formula, it might be better to compute the solution numerically, which, unlike with the approximation, will give an (almost) exact result.

However, this is not what my answer is about. I suggest a different route which gives an exact solution by changing the problem formulation. After thinking about it for a while it turns out that it is the specification of the center frequency ω0 and the specification of the bandwidth as a ratio (or, equivalently, in octaves) which causes the mathematical intractability. There are two ways out of the dilemma:

  1. specify the bandwidth of the discrete-time filter as a difference of frequencies Δω=ω2ω1, where ω1 and ω2 are the lower and upper band edges of the discrete-time filter, respectively.
  2. prescribe the ratio ω2/ω1, and instead of ω0 prescribe one of the two edge frequencies ω1 or ω2.

In both cases, a simple analytical solution is possible. Since it is desirable to prescribe the bandwidth of the discrete-time filter as a ratio (or, equivalently, in octaves), I'll describe the second approach.

Let's define the edge frequencies Ω1 and Ω2 of the continuous-time filter by

(1)|H(jΩ1)|2=|H(jΩ2)|2=12

with Ω2>Ω1, where H(s) is the transfer function of a second-order band pass filter:

(2)H(s)=ΔΩss2+ΔΩs+Ω02

with ΔΩ=Ω2Ω1, and Ω02=Ω1Ω2. Note that H(jΩ0)=1, and |H(jΩ)|<1 for ΩΩ0.

We use the bilinear transform to map the edge frequencies ω1 and ω2 of the discrete-time filter to the edge frequencies Ω1 and Ω2 of the continuous-time filter. Without loss of generality we can choose Ω1=1. For our purposes the bilinear transform then takes the form

(3)s=1tan(ω12)z1z+1

corresponding to the following relationship between continuous-time and discrete-time frequencies:

(4)Ω=tan(ω2)tan(ω12)

From (4) we obtain Ω2 by setting ω=ω2. With Ω1=1 and Ω2 computed from (4), we obtain the transfer function of the analog prototype filter from (2). Applying the bilinear transform (3), we get the transfer function of the discrete-time band pass filter:

(5)Hd(z)=gz21z2+az+b

with

(6)g=ΔΩc1+ΔΩc+Ω02c2a=2(Ω02c21)1+ΔΩc+Ω02c2b=1ΔΩc+Ω02c21+ΔΩc+Ω02c2c=tan(ω12)

Summary:

The bandwidth of the discrete-time filter can be specified in octaves (or, generally, as a ratio), and the parameters of the analog prototype filter can be computed exactly, such that the specified bandwidth is achieved. Instead of the center frequency ω0, we specify the band edges ω1 and ω2. The center frequency defined by |Hd(ejω0)|=1 is an outcome of the design.

The necessary steps are as follows:

  1. Specify the desired ratio of band edges ω2/ω1, and one of the band edges (which is of course equivalent to simply specifying ω1 and ω2).
  2. Choose Ω1=1 and determine Ω2 from (4). Compute ΔΩ=Ω2Ω1 and Ω02=Ω1Ω2 of the analog prototype filter (2).
  3. Evaluate the constants (6) to obtain the discrete-time transfer function (5).

Note that with the more common approach where ω0 and Δω=ω2ω1 are specified, the actual band edges ω1 and ω2 are an outcome of the design process. In the proposed solution, the band edges can be specified and ω0 is an outcome of the design process. The advantage of the latter approach is that the bandwidth can be specified in octaves and the solution is exact, i.e., the resulting filter has exactly the specified bandwidth in octaves.

Example:

Let's specify a bandwidth of one octave, and we choose the lower band edge as ω1=0.2π. This gives an upper band edge ω2=2ω1=0.4π. The band edges of the analog prototype filter are Ω1=1 and from (4) (with ω=ω2) Ω2=2.2361. This gives ΔΩ=Ω2Ω1=1.2361 and Ω02=Ω1Ω2=2.2361. With (6) we get for the discrete-time transfer function (5)

Hd(z)=0.24524z21z20.93294z+0.50953

which achieves exactly a bandwidth of 1 octave, and the specified band edges, as shown in the figure below:

enter image description here

Numerical solution of the original problem:

From the comments I understand that it is important to be able to exactly specify the center frequency ω0 for which |Hd(ejω0)|=1 is satisfied. As mentioned before it is not possible to get an exact closed-form solution, and a series development produces quite unwieldy expressions.

For the sake of clarity I would like to summarize the possible options with their advantages and disadvantages:

  1. specify the desired bandwidth as a frequency difference Δω=ω2ω1, and specify ω0; in this case a simple closed-form solution is possible.
  2. specify the band edges ω1 and ω2 (or, equivalently, the bandwidth in octaves, and one of the band edges); this also leads to a simple closed-form solution, as explained above, but the center frequency ω0 is an outcome of the design and cannot be specified.
  3. specify the desired bandwidth in octaves and the center frequency ω0 (as asked in the question); no closed form solution is possible, nor is there (for the time being) any simple approximation. For this reason I think it's desirable to have a simple and efficient method for obtaining a numerical solution. This is what is explained below.

When ω0 is specified we use a form of the bilinear transform with a normalization constant that is different from the one used in (3) and (4):

(7)Ω=tan(ω2)tan(ω02)

We define Ω0=1. Denote the specified ratio of band edges of the discrete-time filter as

(8)r=ω2ω1

With c=tan(ω0/2) we get from (7) and (8)

(9)r=arctan(cΩ2)arctan(cΩ1)

With Ω1Ω2=Ω02=1, (9) can be rewritten in the following form:

(10)f(Ω1)=rarctan(cΩ1)arctan(cΩ1)=0

For a given value of r this equation can be solved for Ω1 with a few Newton iterations. For this we need the derivative of f(Ω1):

(11)f(Ω1)=c(r1+c2Ω12+1c2+Ω12)

With Ω0=1, we know that Ω1 must be in the interval (0,1). Even though it's possible to come up with smarter initial solutions, it turns out that the initial guess Ω1(0)=0.1 works well for most specs, and will result in very accurate solutions after only 4 iterations of Newton's method:

(12)Ω1(n+1)=Ω1(n)f(Ω1(n))f(Ω1(n))

With Ω1 obtained with a few iterations of (12) we can determine Ω2=1/Ω1 and ΔΩ=Ω2Ω1, and and we use (5) and (6) to compute the coefficients of the discrete-time filter. Note that the constant c is now given by c=tan(ω0/2).

Example 1:

Let's specify ω0=0.6π and a bandwidth of 0.5 octaves. This corresponds to a ratio r=ω2/ω1=20.5=2=1.4142. With an initial guess of Ω1=0.1, 4 iterations of Newton's method resulted in a solution Ω1=0.71, from which the coefficients of the discrete-time can be computed as explained above. The figure below shows the result:

enter image description here

The filter was calculated with this Matlab/Octave script:

% specifications
bw = 0.5;    % desired bandwidth in octaves
w0 = .6*pi;  % resonant frequency

r = 2^(bw);  % ratio of band edges
W1 = .1;     % initial guess (works for most specs)
Nit = 4;     % # Newton iterations
c = tan(w0/2);

% Newton
for i = 1:Nit,
    f = r*atan(c*W1) - atan(c/W1);
    fp = c * ( r/(1+c^2*W1^2) + 1/(c^2+W1^2) );
    W1 = W1 - f/fp
end

W1 = abs(W1);
if (W1 >= 1), error('Failed to converge. Reduce value of initial guess.'); end

W2 = 1/W1;
dW = W2 - W1;

% discrete-time filter
scale = 1 + dW*c + W1*W2*c^2;
b = ( dW*c/scale) * [1,0,-1];
a = [1, 2*(W1*W2*c^2-1)/scale, (1-dW*c+W1*W2*c^2)/scale ];

Example 2:

I add another example to show that this method can also deal with specifications for which most approximations will give non-sensical results. This is often the case when the desired bandwidth and the resonant frequency are both large. Let's design a filter with ω0=0.95π and bw=4 octaves. Four iterations of Newton's method with an initial guess Ω1(0)=0.1 result in a final value of Ω1=0.00775, i.e., in a bandwidth of the analog prototype of log2(Ω2/Ω1)=log2(1/Ω12)14 octaves. The corresponding discrete-time filter has the following coefficients and its frequency response is shown in the plot below:

b = 0.90986*[1,0,-1];
a = [1.00000   0.17806  -0.81972];

enter image description here

The resulting half power band edges are ω1=0.062476π and ω2=0.999612π, which are indeed exactly 4 octaves (i.e., a factor of 16) apart.


two initial comments (i haven't read this through, yet, Matt): first, i am interested in log frequency more so than linear frequency. for the analog BPF (or the digital BPF with resonant frequency much lower than Nyquist), there is perfect symmetry about the resonant frequency.
robert bristow-johnson

and the second comment is this, while i thank you for apparently sticking with the notation of s=jΩ and z=ejω, i wish you would stick to the notation that the analog and digital resonant frequencies are Ω0 and ω0, respectively, and the analog upper and lower bandedges are ΩU and ΩL respectively and likewise for the digital bandedges: ωU and ωL. we know that, in log frequency, half of the bandwidth is above Ω0 and half is below. but, due to warping, that is not exactly true for the digital BPF filter.
robert bristow-johnson

as i read this more, it is important to me that the resonant frequency gets mapped through the bilinear transform exactly. so i understand this approach, Matt, but i want to stick with exact mapping of ω0 and then tweak the BW until bw is what is specified.
robert bristow-johnson

@robertbristow-johnson: OK, fair enough, you want an exact specification of ω0. That's possible if you specify Δω as a linear difference (which you don't want, I understand). A neat solution is not possible with specified ω0 AND a bandwidth in octaves.
Matt L.

1
@robertbristow-johnson: I've added a very simple numerical solution to my answer (4 Newton iterations).
Matt L.

3

okay, i promised to put up bounty and i will keep my promise. but i have to confess that i might renege a little bit on being satisfied with just the third derivative of f(x). what i really want are the two coefficients for g(y).

so i didn't realize that there was this Wolfram language as an alternative to mathematica or Derive and i didn't realize it could so easily compute the third derivative and simplify the expression.

and this Markus guy at the math SE posted this answer (which i thought was gonna have to be the amount of grunge i thought would be needed).

y=f(x)=ln(arctan(αex))ln(arctan(αex))a1x + a3x3=2α(1+α2)arctan(α)x+α3(1+α2)3arctan(α)(α46α2+13α(1α2)arctan(α)+2α2(arctan(α))2)x3

so i put together the third-order approximation to the inverse:

x=g(y)b1y + b3y3=1a1y  a3a14y3=(1+α2)arctan(α)2αy(1+α2)(arctan(α))348α3(α46α2+13α(1α2)arctan(α)+2α2(arctan(α))2)y3=(1+α2)arctan(α)2αy(1+α2)(arctan(α))348α(α26+α23(1α2)αarctan(α)+2(arctan(α))2)y3=y(arctan(α)α+α12)(1 +((arctan(α))2(1α2+α26)arctan(α)αα1213)y24)

i was kinda hoping someone else would do this. recall y=f(x)ln(2)bw, g(y)=xln(2)2BW and αtan(ω0/2)

x=g(y)y(arctan(α)α+α12)(1 +((arctan(α))2(1α2+α26)arctan(α)αα1213)y24)ln(2)2BW(ln(2)bw)(arctan(α)α+α12)(1 +((arctan(α))2(1α2+α26)arctan(α)αα1213)(ln(2)bw)24)

i have three convenient trig identities:

12(α+α1)=12(tan(ω0/2)+1tan(ω0/2))=1sin(ω0)

12(αα1)=12(tan(ω0/2)1tan(ω0/2))=1tan(ω0)

12(α2+α2)=12(tan2(ω0/2)+1tan2(ω0/2))=1sin2(ω0)+1tan2(ω0)=2sin2(ω0)1

"finally" we got:

BWbwω0sin(ω0)(1 + (ln(2))224(2(ω021)(ω0sin(ω0))2+3ω0tan(ω0))(bw)2)

this ain't so bad. fits on a single line. if someone sees an error or a good way to simplify further, please lemme know.

with the power series approximation from the comment above,

BWbwω0sin(ω0)(1 + (ln(2))2(136ω021180ω0422835ω06)(bw)2)

also, i am not sure that Atul's answer for f(0) and Markus's answer for a3 are consistent. i wonder if someone might be able to straight that out in an answer that could get in on the bounty.
robert bristow-johnson

I also found out about Wolfram's cloud notebook which is like Mathematica in your webbrowser. Go to sandbox.open.wolframcloud.com/app and type in 6*SeriesCoefficient[ Series[Log[ArcTan[a E^x]] - Log[ArcTan[a/E^x]],{x,0,5}],3]
Atul Ingle

@AtulIngle, i incorporated the Markus's corrections into the inverse function. would you mind checking the result for g(y)?
robert bristow-johnson

i would appreciate it if someone would check my substitution back to g(y), particularly the factor that multiplies y2. very soon i will return α back to tan(ω0/2) which will cause a whole other simplification and form. but i will hold off a little in case someone tells me my simplifications above are wrong.
robert bristow-johnson

1
@ robert bistow-johnson I checked your final expression for g(y) using Mathematica, it looks right.
Atul Ingle

2

so here are some quantitative results. i plotted spec'd bandwidth bw for the digital filter on the x-axis and the resulting digital bandwidth on the y-axis. there are five plots from green to red representing the resonant frequency ω0 normalized by Nyquist:

ω0π= [0.0002 0.2441 0.4880 0.7320 0.9759]

so the resonant frequency goes from nearly DC to nearly Nyquist.

here is no compensation (or pre-warping) at all for bandwidth: enter image description here

here is the simple first-order compensation that the Cookbook has done all along: enter image description here

here is the third-order compensation that we just solved here: enter image description here

what we want is for all of the lines to lie directly on the main diagonal.

i had made a mistake in the third-order case and corrected it in this revision. it does look like the third-order approximation to g(y) is a bit better than the first-order approximation for small bw.

so i diddled with the coefficient of the 3rd-order term (i wanna leave the 1st-order term the same), lessening it's effect. this is from multiplying just the 3rd-order term by 50%:

enter image description here

this is reducing it to 33%:

enter image description here

and this is reducing the 3rd-order term to 25%:

enter image description here

since the object of an inverse function is to undo the specified function, the point of this whole thing is to get the curves of the composite function to lie as close to the main diagonal as possible. it's not too bad for up to 75% Nyquist for resonant frequency ω0 and 3 octaves bandwidth bw. but not so much better to really make it worth it in the "coefficient cooking" code that is executed whenever the user turns a knob or slides a slider.


How can the bandwidth become negative in the second and third plot??
Matt L.

it can't, which is why i am so far unimpressed with this third-order approximation to the real x=g(y) which is the inverse function of
f(x)=ln(arctan(αex)arctan(αex))
i don't think that third-order approximation is an improvement over the first-order approximation that has existed for a couple decades. so what is plotted is
f(g^(y))
where g^(y) is the approximation to the true inverse g(y) where
y=f(g(y))
because f(x) is bipolar (even though negative bandwidth is nonsensical) f(g^(y)) can go negative.
robert bristow-johnson

oh, @MattL. the fact that f(x) passes through the origin should not surprize you even if bandwidth is never really negative. that bandwidth mapping function is odd symmetry, so the first and second plot do not surprize me at all. but the third plot is disappointing.
robert bristow-johnson

I was just wondering why you plotted the curves for negative bandwidths. But anyway, if I'm not mistaken then the series you use is a kind of Taylor series expansion at bw=0, right? So why would you even expect it to approximate the real behavior well at larger bandwidths if you only use two terms?
Matt L.

i just wanted to make sure the functions are odd-symmetry and go through the origin real nicely. yes, this is all about Taylor (or more specificly, Maclaurin) series. you will notice, @MattL., that i think one term does rather nicely for all of the resonant frequencies that ain't terribly close to Nyquist. leaving the linear term unchanged, i diddled a little with the third-order term a little (stay tuned, i'll show the results) and it does pretty well. but not so much better than the first-order that i think i should bother changing it in the Cookbook.
robert bristow-johnson
Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.