联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> C/C++程序C/C++程序

日期:2021-11-04 07:42

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.
Upload your source code, answers to the questions, and screenshots of the program
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.
Info about installing matlab: https://www.oit.uci.edu/help/matlab/
Useful matlab functions (see https://www.mathworks.com/help/):
butter butterworth filter
audioread load .wav file to obtain sampled data
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.

相关文章

版权所有:留学生编程辅导网 2021,All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。