乐趣区

关于后端:EECS-50-电子系统

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/…
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
    • b1z + b2
      a0z
    • 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.
退出移动版