DSPRelated.com
Free Books

Rederiving the Frequency Response

Let's repeat the mathematical sine-wave analysis of the simplest low-pass filter, but this time using a complex sinusoid instead of a real one. Thus, we will test the filter's response at frequency $ f$ by setting its input to

$\displaystyle x(n) = Ae^{j(2\pi f nT + \phi)} =
A\cos(2\pi f n T + \phi)
+ j A\sin(2\pi f n T + \phi).
$

Again, because of time-invariance, the frequency response will not depend on $ \phi$, so let $ \phi = 0$. Similarly, owing to linearity, we may normalize $ A$ to 1. By virtue of Euler's relation Eq.$ \,$(1.8) and the linearity of the filter, setting the input to $ x(n) = e^{j\omega
nT}$ is physically equivalent to putting $ \cos(\omega nT)$ into one copy of the filter and $ \sin(\omega nT)$ into a separate copy of the same filter. The signal path where the cosine goes in is the real part of the signal, and the other signal path is simply called the imaginary part. Thus, a complex signal in real life is implemented as two real signals processed in parallel; in particular, a complex sinusoid is implemented as two real sinusoids, side by side, one-quarter cycle out of phase. When the filter itself is real, two copies of it suffice to process a complex signal. If the filter is complex, we must implement complex multiplies between the complex signal samples and filter coefficients.

Using the normal rules for manipulating exponents, we find that the output of the simple low-pass filter in response to the complex sinusoid at frequency $ \omega/2\pi$ Hz is given by

\begin{eqnarray*}
y(n) &=& x(n) + x(n - 1) \\
&=& e^{j\omega n T} + e^{j\omeg...
...{-j\omega T}) x(n)\\
&\isdef & H(e^{j\omega T}) x(n),
\protect
\end{eqnarray*}

where we have defined $ H(e^{j\omega T})\isdef (1+e^{-j\omega T})$, which we will show is in fact the frequency response of this filter at frequency $ \omega$. This derivation is clearly easier than the trigonometry approach. What may be puzzling at first, however, is that the filter is expressed as a frequency-dependent complex multiply (when the input signal is a complex sinusoid). What does this mean? Well, the theory we are blindly trusting at this point says it must somehow mean a gain scaling and a phase shift. This is true and easy to see once the complex filter gain is expressed in polar form,

$\displaystyle H(e^{j\omega T}) \eqsp G(\omega)e^{j\Theta(\omega)},
$

where the gain versus frequency is given by $ G(\omega)\isdef
\vert H(e^{j\omega T})\vert$ (the absolute value, or modulus of $ H$), and the phase shift in radians versus frequency is given by the phase angle (or argument) $ \Theta(\omega)\isdeftext \angle H(e^{j\omega T})$. In other words, we must find

$\displaystyle G(\omega) \isdefs \left\vert H(e^{j\omega T})\right\vert
$

which is the amplitude response, and

$\displaystyle \Theta(\omega) \isdefs \angle H(e^{j\omega T})
$

which is the phase response. There is a trick we can call ``balancing the exponents,'' which will work nicely for the simple low-pass of Eq.$ \,$(1.1).

\begin{eqnarray*}
H(e^{j\omega T}) &=& (1 + e^{-j\omega T})\\
&=& (e^{j\omega...
... T/2})e^{-j\omega T/2}\\
&=& 2\cos(\omega T/2)e^{-j\omega T/2}
\end{eqnarray*}

It is now easy to see that

\begin{eqnarray*}
G(\omega) &=& \left\vert 2\cos(\omega T/2)e^{-j\omega T/2}\rig...
... \eqsp 2\cos(\pi f T), \qquad \left\vert f\right\vert\leq f_s/2.
\end{eqnarray*}

and

$\displaystyle \Theta(\omega) \eqsp -\frac{\omega T}{2} \eqsp -\pi f T
\eqsp - \pi \frac{f}{f_s},
\qquad \left\vert f\right\vert\leq f_s/2.
$

We have derived again the graph of Fig.1.7, which shows the complete frequency response of Eq.$ \,$(1.1). The gain of the simplest low-pass filter varies, as cosine varies, from 2 to 0 as the frequency of an input sinusoid goes from 0 to half the sampling rate. In other words, the amplitude response of Eq.$ \,$(1.1) goes sinusoidally from 2 to 0 as $ \omega T$ goes from 0 to $ \pi $. It does seem somewhat reasonable to consider it a low-pass, and it is a poor one in the sense that it is hard to see which frequency should be called the cut-off frequency. We see that the spectral ``roll-off'' is very slow, as low-pass filters go, and this is what we pay for the extreme simplicity of Eq.$ \,$(1.1). The phase response $ \Theta(\omega) =
-\omega T/2$ is linear in frequency, which gives rise to a constant time delay irrespective of the signal frequency.

It deserves to be emphasized that all a linear time-invariant filter can do to a sinusoid is scale its amplitude and change its phase. Since a sinusoid is completely determined by its amplitude $ A$, frequency $ f$, and phase $ \phi$, the constraint on the filter is that the output must also be a sinusoid, and furthermore it must be at the same frequency as the input sinusoid. More explicitly:

$\textstyle \parbox{0.8\textwidth}{%
If a sinusoid, $A_1\cos(\omega nT + \phi_1)...
...terized by its gain $A_2/A_1$, and phase $\phi_2 - \phi_1$, at
each frequency.}$

Mathematically, a sinusoid has no beginning and no end, so there really are no start-up transients in the theoretical setting. However, in practice, we must approximate eternal sinusoids with finite-time sinusoids whose starting time was so long ago that the filter output is essentially the same as if the input had been applied forever.

Tying it all together, the general output of a linear time-invariant filter with a complex sinusoidal input may be expressed as

\begin{eqnarray*}
y(n) &=& (\textit{Complex Filter Gain}) \;\textit{times}\;\, (...
...ith Radius $[G(\omega)A]$\ and Phase $[\phi + \Theta(\omega)]$}.
\end{eqnarray*}


Next Section:
Sample-Level Implementation in Matlab
Previous Section:
Plotting Complex Sinusoids as Circular Motion