I wish to design an all-pole formant filter by specifying frequency θ (between 0 and π radians for Nyquist) and bandwidth Φ such that the response of the filter at θ-Φ and at θ+Φ should be roughly 50% of the response at θ.
I start by specifying a pole at $p=[r,θ]=re^{jθ}$.
My question is this: How to estimate $r$ as a function of $Φ$?
Note: A fairly crude estimate will suffice for my purposes (vowel synthesis).
This is my approach so far:
Adding a conjugate pole, I construct a transfer function $H(z) = \frac{1}{p-z}\frac{1}{p^*-z}$
$$\frac{1}{H(z)} = (p-z)(p^*-z)$$
$$= pp^* -z(p+p^*) + z^2$$
$$ = r^2 -z(2r cos θ) + z^2 $$
The gain at frequency α will be $\text{Gain}(α) = |H(e^{jα})|$, so the gain at θ is as follows:
$$ \frac{1}{H(e^{jθ})} = r^2 -e^{jθ}(2 rcos θ) + (e^{jθ})^2 $$
$$ = r^2 -re^{jθ}(e^{jθ} + e^{-jθ}) + e^{j\cdot2θ} $$
$$ = r^2 -r(e^{j\cdot2θ} - 1) + e^{j\cdot2θ} $$
$$ = r(r-1) - e^{j2θ}(r-1) $$
$$ = (r-1)(r - e^{j2θ}) $$
So $\text{Gain}(θ) = |H(e^{jθ})| = \frac{1}{(r-1)(r - e^{j2θ})} $ as $0<r<1$. So far so good, nice and tidy!
But now it gets tricky. I require Φ such that:
$$ \text{Gain}(θ) = 2 \text{Gain}(Φ)$$
$$ \frac{1}{|(r-1)(r - e^{j2θ})|} = \frac{2}{|r^2 -z(2r cos θ) + z^2|} \text{where} z=e^{jΦ} $$
$$ 2|(r-1)(r - e^{j2θ})| = |r^2 -e^{jΦ}(2r cos θ) + e^{j2Φ}| $$
Now I should be able to split out real and imaginary components inside each modulus: $2|A+jB| = |C+jD| => 4(A^2+B^2) = C^2+D^2$
But this is starting to look very heavy. How would an engineer approach this?
Is there any way I can do it using iPython/numpy/scipy?