Determining the Filter Coefficients of an FIR Filter

Sara Tibbetts today at 09:26. 2 answers, 0 views
filters filter-design fir transfer-function

I need to find the filter coefficients of an FIR filter that will block sinusoids of frequency $200\ \rm Hz$ if the sinusoid is sampled at $1.2\ \rm kHz$.

I feel like this is a fairly simple problem, but I'm not exactly sure how to go about it.

I am thinking I need to convert the frequencies to rad/s, then use these values in the transfer function, but am not sure how to find this transfer function.


I have to choose from one of the possible options:

$$ \{1, 1, 1\} $$ $$ \{1, -1, 1\} $$ $$ \{1, 0, 1\} $$ $$ \{1, \sqrt{2}, 1\} $$

or None of the Above.

From the coefficients above, I know the following equations can be created:

\begin{align} H\left(e^{j\omega}\right)&=1+e^{-j\omega}+e^{-2j\omega}\\ H\left(e^{j\omega}\right)&=1-e^{-j\omega}+e^{-2j\omega}\\ H\left(e^{j\omega}\right)&=1+e^{-2j\omega}\\ H\left(e^{j\omega}\right)&=1+\sqrt{2}e^{-j\omega}+e^{-2j\omega} \end{align}

2 Answers

Matt L. 12/17/2017.

The general formula for the frequency response of a causal second-order FIR filter with a pair of complex zeros on the unit circle is


where $\omega_0$ is the (normalized) frequency in radians where the zero occurs, and $G$ is a (real-valued) gain constant. If we choose $G=1$ and expand $(1)$ we obtain


In your example we have


where $f_0$ is the frequency of the zero, and $f_s$ is the sampling frequency. Plugging $(3)$ into $(2)$ with $\cos(\pi/3)=\frac12$ gives


which corresponds to the impulse response $\{1,-1,1\}$.

Fat32 12/16/2017.

Since you want a linear phase FIR filter. And since you only want to null a given single selected frequency. Then from the given set of filters the one: $$ h[n] = \delta[n] - \delta[n-1] + \delta[n-2] $$ will do the job, as shown by its frequency response plot generated by MATLAB/Octave freqz() function as below:

enter image description here

Note that eventhough this spectrum seems like a good notch with an infintely deep null at the frequency 200 Hz, a close look at the frequency response, as in the next figure, would reveal that there's significand (linear) distortion on the large portion of the spectrum, which may be undesirable depending on the application. This distortion can be perfectly corrected by post-processing however.

enter image description here


Popular Tags