Docsity

Study Materials for Assignment 1 - Signal Processing | ME 360, Assignments of Digital Signal Processing

Toggle sidebar
bg1
ME 360
Homework 1: Signals Part 1
Assigned: September 1, 2006 Due: September 8, 2006
Review the following concepts discussed in lecture:
1) Analog vs. Digital Signals (Section 1.1)
2) Deterministic vs. Stochastic Signals (Section 3.7)
3) Signal Characteristics (Sections 2.1, 3.1)
4) Operations on Signals (Sections 2.2, 3.2)
5) Decimation and Interpolation (Section 3.3)
6) Periodic and Harmonic Signals (Section 2.4)
Do the following problems from A. Ambardar:
Operations on Signals
Prob. 2.1 d
Prob. 3.3 d
Power and Energy Signals
Prob. 2.26 e, g
Prob. 3.13 c, e
Sketching Signals
(see sect 2.5 for common
signal type definitions)
Prob. 2.9 h, i
Prob. 3.6 c
Periodic Signals
Prob. 2.6 a, d, f
pf3
pf4

Partial preview of the text

Download Study Materials for Assignment 1 - Signal Processing | ME 360 and more Assignments Digital Signal Processing in PDF only on Docsity!

ME 360

Homework 1: Signals Part 1

Assigned: September 1, 2006 Due: September 8, 2006 Review the following concepts discussed in lecture:

  1. Analog vs. Digital Signals (Section 1.1)
  2. Deterministic vs. Stochastic Signals (Section 3.7)
  3. Signal Characteristics (Sections 2.1, 3.1)
  4. Operations on Signals (Sections 2.2, 3.2)
  5. Decimation and Interpolation (Section 3.3)
  6. Periodic and Harmonic Signals (Section 2.4) Do the following problems from A. Ambardar: Operations on Signals Prob. 2.1 d Prob. 3.3 d Power and Energy Signals Prob. 2.26 e, g Prob. 3.13 c, e Sketching Signals (see sect 2.5 for common signal type definitions) Prob. 2.9 h, i Prob. 3.6 c Periodic Signals Prob. 2.6 a, d, f

MATLAB Problem: Decimation and Interpolation of Sound

  1. Go to the course website and find the file me360sound.mat. Load the sound file in MATLAB - (e.g. MATLAB command “load me360sound”). You have to make sure you are in the right directory first.
  2. Play the sound (MATLAB command “sound”)
  3. Review LectureHandout01.doc, posted on the course website, on plotting signals in matlab
  4. Plot the sound data appropriately for discrete data (MATLAB command “stem”)
  5. Decimate the signal by 2, 4, and 8 (MATLAB command “downsample” not “decimate”)
  6. Determine the difference in file size between the original me360sound.mat and the 3 different levels of decimation.
  7. Play the downsampled sound data and describe the difference.
  8. Interpolate the downsampled signals with zero-interpolation to restore it to the original number of data points (2, 4, or 8) (MATLAB command “upsample” not “interp”)
  9. Play the upsampled sound data and describe the difference.
  10. Plot the downsampled and upsampled sound data for one of the cases (factor of 2, 4, or 8) (MATLAB command “stem”)
  11. Decimate the signal by 2, 4, and 8 using the “decimate” command.
  12. Play the decimated sound data and describe the difference.
  13. Type “help decimate” and “help downsample” and describe the difference in MATLAB’s commands for downsampling data, and decimating data.
  14. Include a copy of your plots, code, and discussion.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ME 360 HW #3: Decimating/Interpolating Sound % Bryan Rasmussen % 17 Sep. 2004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Load and Play the Sound File load handel sound(y,Fs); pause(10); % Plot a section of the sound file total_time = max(size(y))/Fs; time_increment = 1/Fs; time_vector = [time_increment:time_increment:total_time]; figure stem(time_vector,y') % Plot a zoomed in section of the sound file figure stem(time_vector(1:250),y(1:250)') % Downsample the signal by 4 y_ds_4 = downsample(y,4); Fs_ds_4 = Fs/4; % Play the downsampled sound files sound(y_ds_4,Fs_ds_4); pause(10); % Upsample the signal y_us_4 = upsample(y_ds_4,4); % Play the upsampled sound files sound(y_us_4,Fs); pause(10); % Plot the downsampled and upsampled sound signal (we pad with zeros to make the vectors the same length) time_increment = 1/Fs; time_vector_ds_4 = [0:1/Fs_ds_4:total_time]; time_vector_us_4 = [0 0 0 time_vector]; figure subplot(311) stem(time_vector,y') subplot(312) stem(time_vector_ds_4,y_ds_4') subplot(313) stem(time_vector_us_4,y_us_4') % Plot a zoomed in section of the sound file figure subplot(311) stem(time_vector(1:240),y(1:240)') subplot(312) stem(time_vector_ds_4(1:60),y_ds_4(1:60)') subplot(313) stem(time_vector(1:240),y_us_4(1:240)') % Decimate the signal by 2, 4, and 8 using the "decimate" command. y_dc_4 = decimate(y,4); % Play the decimated sound files sound(y_dc_4,Fs_ds_4); pause(10); % Type "help decimate" and "help downsample" and describe the difference in MATLAB's commands. help downsample; help decimate;