FIR Filter Design

The objective of this project is to use three different design methods to design a low-pass filter that meets specifications given, and then compare these three different methods through different parameters. In this project, seven filters should be designed using Matlab. And we compare them on worst case gain, largest tap weight coefficient, maximal passband and stopband error, magnitude frequency response, impulse response, group delay and zeros/poles location. Finally, use these filters to do filtering, and then compare their responses to the predicted one.
Discussion of Results:
> Part 1: Window Method

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

(a) Use fir1 function to synthesize an FIR that meets specifications using a boxcar window.
Worst gain = 1.8372 Largest tap weight coefficient = 0.3694
Maximal passband error = 0.1678 Maximal stopband error = 0.0795
(b) Use Hann window to synthesize an FIR that meets specifications.
Worst gain = 1.4154 Largest tap weight coefficient = 0.3496
Maximal passband error = 0.0052 Maximal stopband error = 0.2385
**Filter #1 is the unwindowed design, and Filter #2 is the windowed design.
From the comparison above, we can see that the unwindowed design has a more critical passband and stopband edge, but the windowed one has a smaller maximal passband error as we expected. Also, the windowed one has a larger attenuation on stopband than the unwindowed one. The group delay responses of two designs are the same.
(c) Use Kaiser window to synthesize an FIR that meets specifications
Worst gain = 1.6900 Largest tap weight coefficient = 0.3500 N = 21 (which is in 20 in matlab)
Maximal passband error = 0.0706 Maximal stopband error = 0.0852
** Filter #1 is the unwindowed design, and Filter #2 is the kaiser design.
From the comparison above, we can see that both designs have critical passband and stopband edges, but the kaiser one has a smaller maximal passband error as we expected. Also, the kaiser one has a smaller attenuation on stopband compare with the unwindowed one. The group delay responses of two designs are different, the Kaiser one only has 20th order, so the group delay is 10, not 11 as the unwindowed one.
(d)The zeros of the three windowed designs
** Filter #1 is the “boxcar” design, and Filter #2 is the Hann design, Filter #3 is the Kaiser design.
From figure above, we can see that Hann design has a zero far from unit circle, which is corresponding to the slower attenuation compared to the other two designs. The zeros of “boxcar” design are similar to the Kaiser design.
> Part 2: LMS Method
(a) Using Matlab’s firls function to meet the original design specification.
Worst gain = 1.5990 Largest tap weight coefficient = 0.3477
Maximal passband error = 0.0403 Maximal stopband error = 0.1137
** Filter #1 is the 2(a) design, and Filter #2 is the “boxcar” design.
From the comparison above, we can see that the “boxcar” design has a more critical passband and stopband edge, but the LMS one has a smaller maximal passband error as we expected. Also, the LMS one has a larger attenuation on stopband than the “boxcar” one. The group delay responses of two designs are the same.
(b) Using Matlab’s fircls1 function to meet the original design specification.
Worst gain = 1.6771 Largest tap weight coefficient = 0.3464
Maximal passband error = 0.0516 Maximal stopband error = 0.0782
** Filter #1 is the 2(a) design, and Filter #2 is the 2(b) design.
From the comparison above, we can see that the 2(b) design has a more critical passband and stopband edge, but the 2(a) one has a smaller maximal passband error. Also, the 2(a) one has a larger attenuation on stopband than the 2(b) one. The group delay responses of two designs are the same.
(c)The zeros of the two LMS designs
** Filter #1 is the 2(a) design, and Filter #2 is the 2(b) design.
From figure above, we can see that 2(b) design has a zero far from unit circle, which is corresponding to the slower attenuation compared to the other design. The zeros around the unit circle are similar to each other.
> Part 3: Equiripple Method
(a) Using Matlab’s firgr function to meet the original design specification (uniform error weight)
Worst gain = 1.6646 Largest tap weight coefficient = 0.3500
Maximal passband error = 0.0538 Maximal stopband error = 0.0538
** Filter #1 is the 3(a) design, and Filter #2 is the “boxcar” design.
From the comparison above, we can see that the “boxcar” design has a more critical passband and stopband edge, but the 3(a) one has a smaller maximal passband error. Also, the “boxcar” one has a larger attenuation on stopband than the 3(a) one. The group delay responses of two designs are the same.
(b) Using Matlab’s firpm function to meet the original design specification
Worst gain = 1.6639 Largest tap weight coefficient = 0.3476
Maximal passband error = 0.0638 Maximal stopband error = 0.0594
** Filter #1 is the 3(a) design, and Filter #2 is the 3(b) design.
From the comparison above, we can see that the 3(b) design has a more critical passband and stopband edge. And the stopband error is 0.0488 (which is consistent with 0.0538*(1-20%)=0.04304), the passband error is 0.0639 (which is consistent with 0.0538/(1-20%)=0.06725). The group delay responses of two designs are the same.
(c) The zeros of the two equiripple designs
** Filter #1 is the 3(a) design, and Filter #2 is the 3(b) design.
From figure above, we can see that 3(a) design has a zero far from unit circle, which is corresponding to the slower attenuation compared to the other design (almost no attenuation on the figure shown ). There is only one zero stays outside the unit circle for 3(b) design, which is the minimum phase design.
> Part 4: Testing
(a)Table the features for the 7 designed FIRs:
Features
Filter #1
Filter #2
Filter #3
Filter #4
Filter #5
Filter #6
Filter #7
Maximum gain
1.8372
1.4154
1.6900
1.5990
1.6771
1.6646
1.6639
Maximum passband linear
0.1678
0.0052
0.0706
0.0403
0.0516
0.0538
0.0638
Maximum passband error(dB)
-15.5052
-45.7568
-23.0266
-27.8855
-25.7472
-25.3838
-23.9007
Maximum stopband linear
0.0795
0.2385
0.0852
0.1137
0.0782
0.0538
0.0594
Maximum stopband error(dB)
-21.9886
-12.4495
-21.3913
-18.8858
-22.1339
-25.3838
-24.5274
Group delay
11
11
10
11
11
11
11
Largest tap weight coefficient
0.3694
0.3496
0.3500
0.3477
0.3464
0.3500
0.3476
(b) From the figure followed, we can figure out that the group delay is 22-11=11 samples regardless of the input frequency.
(c) Compare the original, mirror, and complement FIR’s impulse, magnitude frequency, and group delay response
**Filter #1 is the original filter, Filter #2 is the mirror filter, and Filter #3 is the complement filter.
(d) Maximal output is 1.8372, which equals to the worst gain prediction of this filter.
> Part 5: Run-time Architecture
(a) N = 8, M=1; N = 12, M=1; N = 16, M=1;
Round off error
N=8 N=12
N=16
From the comparison above, we can see clearly that as the value of N increases, the round-off error decreases.
Bits of precision is N-1-1=N-2
(b) Choose two 12-bit address space which has memory cycle time of 12 ns, so the maximum run-time filter speed is 1/ (12ns/cycle*16 bits) =1/ (192 ns/filter cycle) =5.21*106 filter cycles/sec
> Part 6: Experimentation
(a) The maximal of the output time-series is 1.1341. It is reasonable, because it is smaller than the worst case gain which is 1.8372. So this agrees with the predicted filter response.
(b) The “chirp” function makes a short, high-pitched sound, and it sounds four times, which is corresponding to the 4*fs. When all the .wav files are played, we can hear obviously that the frequency of output sound is much lower than the frequency of input sound, which means that the filter did filter high-frequency components out.
From the figure above, we can see the high-frequency components are gone, which agrees with the predicted filter response, a low-pass filter.
Summary:
Through this project, the detailed processes of designing a filter by three different methods have been understood. And we know more about all the parameters which would affect properties of the filters, and how to use different methods to design them and make best trade-off between each other.

Fountain Essays
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.