Starting again with our 2nd-order low-pass transfer function in the s-domain:
$$H(s) = \frac {1}{s^2 + \frac {s}{Q} + 1}$$
Yesterday we used the following bilinear transform with frequency warping:
$$ s \leftarrow \frac {1}{tan \frac {\omega}{2}} \frac {1-z^{-1}}{1+z^{-1}} $$
What I'd like to do today is to use a slightly different writing of this and see how the math juggling comes out:
$$ s \leftarrow \frac {1}{K} \frac {z-1}{z+1}$$
Where \(K= tan \frac {\omega}{2}\)
This is the same transform, which can be seen by multiplying by \( \frac {z^{-1}}{z^{-1}} \). The maths just plays out a little differently.
Substituting this in to the transfer function:
$$ H(s) = \frac {1}{s^2 + \frac {s}{Q} + 1} \leftarrow \frac {1}{\frac {1}{K^2} \frac {(z-1)^2}{(z+1)^2}+\frac {1}{KQ} \frac {(z-1)}{(z+1)}+1} $$
Multiplying top and bottom by \( K^2(z+1)^2 \) gives something slightly easier:
$$ H(z) = \frac {K^2(z+1)^2}{(z-1)^2 + \frac {K}{Q}(z-1)(z+1) + K^2(z+1)^2} $$
Expanding:
$$ H(z) = \frac {K^2(z^2 + 2z + 1)}{(z^2+2z+1)+ \frac {K}{Q}z^2 - \frac {K}{Q}+K^2(z^2+2z+1)} $$
Collecting together the terms:
$$ H(z) = \frac {K^2z^2 + 2K^2z + K^2}{z^2(1+\frac{K}{Q}+K^2) + z(-2+2K^2)+(1-\frac{K}{Q}+K^2)} $$
All very easy, which gives us our coefficients:
- \( b_2 = K^2 \)
- \( b_1 = 2K^2 \)
- \( b_0 = K^2 \)
- \( a_2 = K^2+\frac{K}{Q}+1 \)
- \( a_1 = -2(1-K^2) \)
- \( a_0 = K^2-\frac{K}{Q}+1 \)
First step then is to get the top-half functions all looking similar, so we can take \(K^2\) and using the trig identity \(K^2 = tan^2 \frac {\omega}{2} = \frac {(1-cos \omega)}{(1+cos \omega)} \). We can use the numerator in the top and the denominator in the bottom. This makes the b coefficients:
- \( b_2 = 1-cos \omega \)
- \( b_1 = 2 (1-cos \omega) \)
- \( b_0 = 1-cos \omega \)
$$ a_0 = (1+cos \omega) \left( tan^2 \frac {\omega}{2} - \frac {1}{Q} tan \frac {\omega}{2} + 1 \right) $$
Using our favourite trig identities \(K = tan \frac {\omega}{2} = \frac {sin \omega}{(1+cos \omega)} \) and \(K^2 = tan^2 \frac {\omega}{2} = \frac {(1-cos \omega)}{(1+cos \omega)} \) and substituting \( 1 = \frac {(1+cos \omega)}{(1+cos \omega)} \) gives:
$$ a_0 = (1+cos \omega) \left( tan^2 \frac {omega}{2} - \frac {1}{Q} tan \frac {\omega}{2} + 1 \right) = (1+cos \omega) \left( \frac {(1-cos \omega)}{(1+cos \omega)} - \frac {1}{Q} \frac {sin \omega}{(1+cos \omega)} + \frac {(1+cos \omega)}{(1+cos \omega)} \right) $$
And crossing out terms gives:
$$ a_0 = (1-cos \omega) - \frac {sin \omega}{Q} + (1+cos \omega) = 2 - \frac {sin \omega}{Q} $$
and similarly for \(a_2\). Now taking \(a_1\):
$$ a_1 = -2 (1+cos \omega)\left(1-tan^2 \frac {\omega}{2} \right)= -2 (1+cos \omega) \left( \frac {(1+cos \omega)}{(1+cos \omega)} - \frac {(1-cos \omega)}{(1+cos \omega)} \right) = -2\left((1+cos \omega) - (1-cos \omega)\right) = -2(2cos \omega) $$
and dividing all the terms by 2 gives:
- \( b_2 = \frac {(1-cos \omega)}{2} \)
- \( b_1 = (1-cos \omega) \)
- \( b_0 = \frac {(1-cos \omega)}{2}2 \)
- \( a_2 = (1+\frac {sin \omega}{2}) \)
- \( a_1 = -2cos \omega \)
- \( a_0 = (1-\frac {sin \omega}{2}) \)
No comments:
Post a Comment