 #### 联系方式

• QQ：99515681
• 邮箱：99515681@qq.com
• 工作时间：8:00-23:00
• 微信：codehelp #### 您当前位置：首页 >> C/C++程序C/C++程序

###### 日期：2021-11-04 07:40

EECS 50 UCI
Discrete-time signals and systems
Homework 5. Extra Credit
This homework is 4 points extra credit. The winner of the contest gets another 2
points.
running results in one pdf in “Question: upload” in the assignment.
To win the contest, you need to write your own code. Off-the-shelf tools and source
code is not accepted.
Useful matlab functions (see https://www.mathworks.com/help/):
butter butterworth filter
audiowrite write sampled data to .wav file
sound listen to sampled audio data
freqz plot the frequency response
filter apply a filter to the input data, and obtain the output
roots find roots of a polynomial
sum calculate the sum of an array
1. Design a low pass butterworth filter. You can choose arbitrary parameters. Find the
corresponding difference equation, the transfer function, and the poles.
2. Plot the frequency response of your filter.
3. Load the input data from input.wav. Find the output of your filter. Listen to the
input and the output audio. Do you find any difference? (Note that the .wav audio file
has two audio channels, so the corresponding sampled audio data has two columns.)
4. In the contest, there is an unknown 2nd order filter whose transfer function is
H(z) = b0z
2 + b1z + b2
a0z
2 + a1z + a2
for some unknown real constants a0, a1, a2, b0, b1, b2. This filter does not need to
be butterworth. The input is input.wav. The output of the unknown filter is
output_contest.wav (call the output data y_contest). Your task is to find a 2ndorder
filter, whose output (denoted by y) is similar to y_contest as much as possible.
Find the result of the following matlab line, and use it to fill in “Question: contest”
in the assignment.
EECS 50 2
sum(sum ((y -y_contest).^2) )
Here the squared error measures the similarity. The two sums are because we need to
sum over all time and sum over both audio channels.

【上一篇】：到头了
【下一篇】：没有了