Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3.1-Listening to aliasing Since we can only work with sequences and sampled signals in Matlab, we need a bit of a trick to illustrate

image text in transcribedimage text in transcribed

Exercise 3.1-Listening to aliasing Since we can only work with sequences and sampled signals in Matlab, we need a bit of a trick to illustrate sampling and aliasing. In this exercise, we will explain it by means of resampling. We will take a speech signal, and resampke" it to a lower sampling rate. In a way, we are pretending that the original speech signal is an analog signal, which we sample at the lower sampling rate We will resample the signal in two ways ng every one out of N samples, where N is the downsampling factor by using the resample function from the Signal Processing Toolbox, which applies an anti liasing filter to the signal before downsampling it To load a speech signal, try the following commands: y, fa]aread('Ozk.wa) >> soundsc (y,fs a. Load the Ozk.wav file. b. Plot the signal y against time in seconds. >>t(0:length (y)-1)/tsi > figure, plot (t,y), xlabel('Time (s)', title('Original signal') Part 1: sampling without anti-aliasing filter c. Define two new sampling frequencies, as follows >>fs2-fs / 2; d. Create two downsampled signals by selecting 1 out of every 2, and 1 out of every 3 samples >y3y(1:3:end) ; e. Plot the downsampled signals against time in seconds. Do you see anything different compared to the original signal? 2 (o:length (y2)-1)/Es2 >t3(0:length (y3)-1)/Es3 >> figure, plot (t2,y2), xlabel ('Time >> figure, plot(t 3, y3), x1abe 1 ("Timo (a)'), (s).), title('Downsampled by 2') title('Downsampled by 3' ) f. Play the downsampled signals. These signals should sound low-pass in nature, with some (in case of y2) or a lot (in case of y 3) distortion Is that what you hear as well? Part 2: sampling with anti-aliasing filter g. Create two resampled" signals using the resample function. >> y2r > y3r resample (y, fs2,fs); resample (y,1, 3) downsample by 2 with anti-alias filter % downsample by 3 with anti-alias filter The resample function takes three parameters: the input signal, the target sampling rate and the original sampling rate. The sampling rates must be specified as integers. The resample function doesn't use the target and original sampling rates directly,but resamples the signal by the ratio of the two rates, i.e., target / original. This property of the resample function is used in the second line, because we can't use fs3 in that case because it is not an integer. For more details on the resample function, see help resample. h. Plot the resampled signals against time in seconds. Do you see anything different compared to the original signal? >figuro, plot (t2,y2r), xlabe1 ('Timo (a)", title(Resampled by 2' >> figure, plot (t3,y3r)xlabel ('Time ()title 'Resampled by 3') i. Play the resampled signals. >> soundac (y3r, Es3) These signals should sound low-pass in nature, like y2 and y3, but without any aliasing distortion. Keep y, y 2, , y2r and y3r and their sampling rates for the next exercise. Original signal 0.8 0.6 0.4 0.2 0 -0 0.4 -0.6 0 0.5 1152 25 33.5 445 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions