# Removing an unwanted sinusoidal signal using FIR filter

I am learning about the $$\mathcal Z$$-transform and FIR filters and I do have problem with the following exercise:

There is given signal $$x[n] = s[n]+\sin\left(2\pi f_n n\right)$$ where $$s[n]$$ is a useful signal, while sinus is an interference. Let's assume, that we use FIR filter to remove the interference. Where should be placed zeros of a transfer function to completely remove sinusoidal signal?

Sampling frequency: $$f_s=10\textrm{ kHz}$$

Sinusoid's frequency: $$f=2.5 \textrm{ kHz}$$

Here is my attempt:

$$f_n=\frac{f}{f_s}=\frac{1}{4}$$

\begin{align} y[n]&=x[n]\star h[n]\\ &=s[n]\star h[n]+\sin\left(2\pi f_n n\right)\star h[n]\\ \implies Y(z)&=S(z) \cdot H(z)+ \underbrace{\mathcal{Z}\left\{ \sin\left(2\pi f_n n\right)\right\} \cdot H(z)}_0 \end{align}

thus

$$0=H(z)\cdot\frac{z\sin\left(2\pi f_n\right)}{z^2-2z\cos\left(2\pi f_n\right)+1}$$

In general FIR filter is given by equation

$$H(z)=b_0+b_1z^{-1}+b_2z^{-2}+\dots$$

hence

$$\left(b_0+b_1z^{-1}+b_2z^{-2}+\dots\right)\cdot\frac{z}{z^2+1}=0$$

And I am stuck here. What to do next?

• ok I see where I've done mistake... Dec 23, 2016 at 17:39
• it will be easier to remove an unwanted sinusoid of a known frequency using a 2nd-order IIR filter configured as a notch filter. Dec 25, 2016 at 3:41

Considering that $f_s=10kHz$, a full rotation on the unit circle relates to $10kHz$. A sine has frequency components at $f_n$ and $-f_n=f_s-f_n$ (considering the periodicity of the DTFT due to the sampling). Hence, there need to be zeros at 2.5kHz and 7.5kHz, corresponding to 90 and 270 degree on the unit circle. Accordingly, the zeros need to be at $z=\pm j$.