# How Do You Design a Digital FIR Filter to Remove a 70Hz Disturbance?

• BriWel
The correct transfer function is H(z) = z^2 + 1, which gives the correct filter function of y(n) = x(n) + x(n-2).
BriWel
I have a question which is to design a filter of the form:

y(n) = a(0)x(n) + a(1)x(n-1) + a(2)x(n-2) to remove a narrowband disturbance with frequency f0 = 70Hz.
The sampling frequency, fs is 280Hz.

I've made an attempt at answering it, but don't think my result is correct:

w0 = (2*pi)* (f0/fs) = pi/2

I then calculate the zeros of the filter from the definition of w

z1 = exp(i*(pi/2))[
z2 = exp(-i*(pi/z))
where i = sqrt(-1)

The transfer function of the filter is therefore;

Z2H(z) = (z - exp(i*(pi/2))[ )(z - exp(-i*(pi/z)) )

When expanded and simplified this gives

H(z) = z2 + 1, so the filter function

y(n) = x(n) + x(n - 2),
giving
a(0) = 1
a(1) = 0
a(2) = 1

Which I'm pretty sure is wrong. Can anyone tell me where I have gone wrong?

You did wrong while expanding and simplifying

Hello,

Thank you for your question about designing a digital FIR filter to remove a narrowband disturbance at 70Hz.

First, let's review the basics of FIR filters. FIR stands for Finite Impulse Response, which means that the output of the filter is only affected by a finite number of input samples. FIR filters are typically designed using the frequency sampling method, where the desired frequency response is sampled at specific frequencies and then used to determine the filter coefficients.

In this case, we want to design a filter to remove a disturbance at 70Hz. This disturbance can be represented as a sinusoidal signal with a frequency of 70Hz. The sampling frequency, fs, is 280Hz. This means that the sampling interval is T = 1/fs = 1/280 = 0.00357 seconds.

The first step in designing an FIR filter is to determine the filter length, N. This can be done using the formula N = fs/f0, where f0 is the frequency of interest. In this case, N = 280/70 = 4.

Next, we need to determine the desired frequency response of the filter. Since we want to remove the disturbance at 70Hz, we want a notch filter with a notch at 70Hz. This can be achieved by setting the desired frequency response to 0 at 70Hz and 1 at all other frequencies.

Using the frequency sampling method, we can then determine the filter coefficients by taking the inverse discrete Fourier transform (IDFT) of the desired frequency response. The IDFT of a notch filter with a notch at 70Hz and a filter length of 4 is given by:

h(n) = 1/4 [1, 1, 1, 1]

Therefore, the filter equation is:

y(n) = (1/4)x(n) + (1/4)x(n-1) + (1/4)x(n-2) + (1/4)x(n-3)

This is in the same form as the one provided in the question, except for the coefficients. So the correct filter coefficients for this design are:

a(0) = 1/4
a(1) = 1/4
a(2) = 1/4
a(3) = 1/4

I hope this helps to clarify the correct approach for designing a digital FIR filter. Please let me know if you have any further

## 1. What is a digital FIR filter?

A digital FIR (finite impulse response) filter is a type of signal processing filter that is used to remove unwanted frequencies from a digital signal. It is characterized by having a finite duration response to an input signal, as opposed to an infinite duration response in an infinite impulse response (IIR) filter.

## 2. How does a digital FIR filter work?

A digital FIR filter works by convolving the input signal with a series of coefficients, also known as taps, which are determined by the filter design. These coefficients act as weights that determine the contribution of each input sample to the output of the filter. The output of the filter is a weighted sum of the input samples and the coefficients.

## 3. What are the advantages of using a digital FIR filter?

Some advantages of digital FIR filters include their stability, linear phase response, and the ability to have a sharp cutoff frequency. They are also easy to implement and can be designed to have a desired frequency response. Additionally, digital FIR filters do not suffer from feedback loops, making them less susceptible to instability compared to IIR filters.

## 4. What are the different types of digital FIR filter designs?

There are several types of digital FIR filter designs, including windowed, frequency sampling, and optimal filters. Windowed filters use a window function to shape the frequency response, while frequency sampling filters use samples of the desired frequency response to design the filter. Optimal filters use mathematical optimization techniques to design a filter with the desired frequency response and minimum error.

## 5. How do I choose the right digital FIR filter for my application?

The choice of digital FIR filter depends on the specific requirements of your application. Some factors to consider include the desired frequency response, the type of input signal, and the computational resources available. It is important to carefully evaluate the trade-offs between complexity, accuracy, and performance when selecting a digital FIR filter for your application.

• Engineering and Comp Sci Homework Help
Replies
2
Views
1K
• Engineering and Comp Sci Homework Help
Replies
16
Views
1K
• Engineering and Comp Sci Homework Help
Replies
11
Views
2K
• Engineering and Comp Sci Homework Help
Replies
3
Views
2K
• Engineering and Comp Sci Homework Help
Replies
11
Views
3K
• Engineering and Comp Sci Homework Help
Replies
6
Views
4K
• Engineering and Comp Sci Homework Help
Replies
6
Views
2K
• Electrical Engineering
Replies
5
Views
2K
• Engineering and Comp Sci Homework Help
Replies
13
Views
4K
• Engineering and Comp Sci Homework Help
Replies
3
Views
1K