Second Order Filters

From PrattWiki
Revision as of 14:29, 20 March 2021 by DukeEgr93 (talk | contribs) (Half-Power Frequencies)
Jump to navigation Jump to search

This page is currently a sandbox for things related to second-order filters.

General Form

For the cases below, we will be looking at specific examples of second-order filters, and in each case we will turn on specific components of a general second-order filter by setting $$K_H$$, $$K_B$$, and $$K_L$$ to a non-zero value in:

$$ \mathbb{H}(s)=\frac{K_H(s^2)+K_B(2\zeta \omega_ns)+K_L(\omega_n^2)}{s^2+2\zeta \omega_ns+\omega_n^2} $$

Band-Pass

For the band-pass filter, with $$K_B$$ set to some non-zero value and $$K_H$$ and $$K_L$$ both set to zero, the transfer function becomes:

$$ \mathbb{H}_B(s)=\frac{K_B(2\zeta \omega_ns)}{s^2+2\zeta \omega_ns+\omega_n^2} $$

or, as a Fourier transform,

$$ \mathbb{H}_B(j\omega)=\frac{K_B(2\zeta \omega_n(j\omega))}{(j\omega)^2+2\zeta \omega_n(j\omega)+\omega_n^2} $$

which is the form we will use here.

Alternate Representation

To analyze this transfer function more easily, we can divide through by the $$2\zeta\omega_n(j \omega)$$ term to get:

$$ \begin{align*} \mathbb{H}_B(j\omega)&=\frac{K_B}{\frac{j\omega}{2\zeta\omega_n}+1+\frac{\omega_n}{2\zeta j\omega}}\\ ~&=\frac{K_B}{1+\frac{j\omega}{2\zeta\omega_n}+\frac{\omega_n}{2\zeta j\omega}}\\ ~&=\frac{K_B}{1+\frac{j}{2\zeta}\left(\frac{\omega}{\omega_n}-\frac{\omega_n}{\omega}\right)}\\ \end{align*} $$

At this point, we introduce a new quantity, the quality factor of the filter $$Q$$, where $$Q=\frac{1}{2\zeta}$$, such that:

$$ \begin{align*} \mathbb{H}_B(j\omega)&=\frac{K_B}{1+jQ\left(\frac{\omega}{\omega_n}-\frac{\omega_n}{\omega}\right)}\\ \end{align*} $$

Magnitude and Phase

This alternate arrangement makes it easier to determine how the magnitude and phase change as the frequency changes:

Magnitude

To find the magnitude of $$\mathbb{H}_B(j\omega)$$, find the magnitude of the numerator and divide it by the magnitude of the denominator:

$$\begin{align*} |\mathbb{H}_B(j\omega)|&=\frac{|K_B|}{\sqrt{1^2+Q^2\left(\frac{\omega}{\omega_n}-\frac{\omega_n}{\omega} \right)^2}} \end{align*}$$

From this, we can see that the numerator has a constant magnitude. Furthermore, the denominator has a constant real part. This means that the magnitude of the denominator is going to be at its smallest when $$\omega=\omega_n$$; any deviation from this will create a non-zero imaginary part and thus increase the size of the denomintor. From this we can assert the following:

  • The largest magnitude of this band-pass filter is $$|K_B|$$ and it occurs when $$\omega=\omega_n$$.

Phase

To find the phase of $$\mathbb{H}_B(j\omega)$$, find the phase of the numerator and subtract the phase of the denominator from it. For a complex number $$\mathbb{n}=n_r+jn_i$$, the angle is given by $$\arctan(n_i/n_r)$$; for the denominator of $$\mathbb{H}_N(j\omega)$$, the real part is simply 1 so the angle of the denominator is the arctangent of the imaginary part. The angle of the numerator depends on the sign of $$K_B$$:

$$\begin{align*} \angle \mathbb{H}_B(j\omega)&=\angle K_B - \arctan\left(Q\left(\frac{\omega}{\omega_n}-\frac{\omega_n}{\omega} \right) \right) \end{align*}$$

Once again, $$\omega=\omega_n$$ is an interesting point to consider - the denominator will contribute $$0^o$$ to the phase of the transfer function here. As $$\omega$$ gets larger, the phase angle of the transfer function will shift by $$-90^o$$ degrees while smaller values of $$\omega$$ will shift the transfer function by up to $$+90^o$$. There is therefore a total $$180^o$$ phase shift from the smallest frequencies to the highest frequencies - this is to be expected from a transfer function with two corners in the denominator. From this we can assert the following:

  • The phase of this band-pass filter when $$\omega=\omega_n$$ is $$0^o$$ if $$K_B$$ is positive and $$180^o$$ if $$K_B$$ is negative.

Half-Power Frequencies

Next we will look at the cutoff, or half-power, frequencies for this filter. Recall that the half-power frequencies $$\omega_{hp}$$ are defined as the frequencies where:

$$\begin{align*} \left|\mathbb{H}\left(j\omega_{hp}\right)\right|&=\frac{1}{\sqrt{2}}\left|\mathbb{H}(j\omega)\right|_{\mathrm max} \end{align*}$$

or, since it will be much easier to calculate without the square roots involved in finding magnitudes,

$$\begin{align*} \left|\mathbb{H}\left(j\omega_{hp}\right)\right|^2&=\frac{1}{2}\left|\mathbb{H}(j\omega)\right|_{\mathrm max}^2 \end{align*}$$

Since we know the formula for the magnitude as well as the maximum magnitude, we can substitute that formula and that constant in for this band-pass filter to get:

$$\begin{align*} \frac{K_B^2}{1+Q^2\left(\frac{\omega_{hp}}{\omega_n}-\frac{\omega_n}{\omega_{hp}}\right)^2}&=\frac{1}{2}K_B^2 \end{align*}$$

Since the numerators are the same, the denominators need to be the same, which gives:

$$\begin{align*} Q^2\left(\frac{\omega_{hp}}{\omega_n}-\frac{\omega_n}{\omega_{hp}}\right)^2&=1 \end{align*}$$

To solve for $$\omega_{hp}$$ requires...some...algebra:

$$\begin{align*} \mbox{Original}&~ & Q^2\left(\frac{\omega_{hp}}{\omega_n}-\frac{\omega_n}{\omega_{hp}}\right)^2&=1\\ \mbox{Common denominator}&~ & Q^2\left(\frac{\omega_{hp}^2-\omega_n^2}{\omega_{hp}\omega_n}\right)^2&=1\\ \mbox{Take square root}&~ & Q\left(\frac{\omega_{hp}^2-\omega_n^2}{\omega_{hp}\omega_n}\right)&=\pm 1\\ \mbox{Cross-multiply}&~ & Q\omega_{hp}^2-Q\omega_n^2&=\pm\omega_{hp}\omega_n\\ \mbox{Move everything left}&~ & Q\omega_{hp}^2\mp\omega_{hp}\omega_n-Q\omega_n^2&=0 \end{align*}$$