[SOLVED] ASAS Homework 2-Convolution and Linear Time-invariant Filtering

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon hw2-krjx1b.zip (501.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
๐Ÿ”’ Securely Powered by:
Secure Checkout
Rate this product

 

  1. Averaging and โ€œdifferencingโ€ (Remarks: Yes, here we are going to use โ€œdifferenceโ€ as a verb). Please first find a piece of music or any sound and read it into MATLAB. Denote the signal as ๐‘ฅ[๐‘›].
  • Check the sampling rate, the number of channels, and the number of bits per sample.
  • The simplest low-pass filter is to average over consecutive samples; that is, let

1ย ย ย ย ย ย  !

๐‘ฆ[๐‘›] =+ย ย  ๐‘ฅ[๐‘› โˆ’ ๐‘š + 1] ,

๐‘ย ย ย ย ย ย  “#$

where ๐‘ is the order of the filter, and ๐‘ฆ[๐‘›] is the output of the filter. Implement this filter and listen to the output. Increase ๐‘ from 1 to 10 to see if you can hear the difference.

  • Check your result in (b) against the following results. They should essentially be identical.

y_conv = conv(x, 1/p*ones(p,1));

  • In fact, the array 1/p*ones(p,1) can be regarded as the impulse response of this FIR

(finite impulse-response) filter. Denote h = 1/p*ones(p,1) and use freqz(h) to plot the frequency response of the filter.

  • Now, define ๐‘ฆ% = ๐‘ฅ[๐‘›] โˆ’ ๐‘ฅ[๐‘› โˆ’ 1]. Of course this can be done with a โ€œforโ€ loop, but alternatively, please use conv() to do the job.
  • Set x =1*randn(A_CERTAIN_LENGTH, 1) so it is an instance of Gaussian white noise with mean zero and standard deviation ๐œŽ = 0.1. Listen and compare the result before and after averaging/differencing. Does it feel more unpleasant before or after averaging/differencing? Describe how you feel about it and explain, perhaps, the reason why.

Remark: When you listening to a signal stored in a vector, make sure that its range is between ยฑ1 to avoid clipping effect. Or, alternatively, use soundsc() to avoid clipping. Always remember to specify the sampling rate.

 

  1. Infinite impulse response (IIR). Take any audio signal ๐‘ฅ[๐‘›] and for any ๐‘› > 1 implement the following by a for loop,

๐‘ฆ[๐‘›] = ๐›ผ๐‘ฆ[๐‘› โˆ’ 1] + ๐‘ฅ[๐‘›],

Where 0 < |๐›ผ| < 1 is a constant. You can assume ๐‘ฆ[1] = 0.

  • Check your result against y = filter([1], [1 -alpha], x).
  • Create an instance of Gaussian white noise for about 1 second long. Listen and compare the result before and after filtering. (c) Create a periodic impulse train:

๐‘ฅ[๐‘›] = 700.5, ,ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  otherwiseifย ย ย ย  ๐‘› = 80.๐‘š

Where ๐‘š is an integer. In other words, ๐‘ฅ[๐‘›] is non-zero at every 80th sample. Listen and compare the result before and after filtering.

(d) Discuss how to restore ๐‘ฅ[๐‘›] from ๐‘ฆ[๐‘›]. (Hint: if ๐›ผ is known, it is quite easy. However, if ๐›ผ is unknown, you may need to make assumptions.)

 

 

Preview of the next homework: We will study how to model speech as a glottal source signal being filtered by the vocal tract next time.

  • hw2-krjx1b.zip