George Mason University Signals and Systems I Spring 2016

Similar documents
EECS 216 Winter 2008 Lab 2: FM Detector Part I: Intro & Pre-lab Assignment

Knowledge Integration Module 2 Fall 2016

EE 422G - Signals and Systems Laboratory

EEE - 321: Signals and Systems Lab Assignment 3

Electrical & Computer Engineering Technology

Laboratory Assignment 4. Fourier Sound Synthesis

DSP First Lab 03: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: k=1

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

Lab S-8: Spectrograms: Harmonic Lines & Chirp Aliasing

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

MATLAB Assignment. The Fourier Series

Experiments #6. Convolution and Linear Time Invariant Systems

Lab P-4: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: ) X

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2

Laboratory 7: Active Filters

Laboratory 5: RC Circuits and Filtering

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

Fourier Series and Gibbs Phenomenon

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #1 Sinusoids, Transforms and Transfer Functions

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

BME 3512 Bioelectronics Laboratory Two - Passive Filters

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Lab 4 Fourier Series and the Gibbs Phenomenon

THE CITADEL THE MILITARY COLLEGE OF SOUTH CAROLINA. Department of Electrical and Computer Engineering. ELEC 423 Digital Signal Processing

Laboratory Assignment 5 Amplitude Modulation

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

ECE 2006 University of Minnesota Duluth Lab 11. AC Circuits

EGR 111 Audio Processing

ECE 201: Introduction to Signal Analysis

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

Each individual is to report on the design, simulations, construction, and testing according to the reporting guidelines attached.

Continuous-Time Analog Filters

Midterm 1. Total. Name of Student on Your Left: Name of Student on Your Right: EE 20N: Structure and Interpretation of Signals and Systems

Lab S-1: Complex Exponentials Source Localization

Signals and Systems Lecture 6: Fourier Applications

ECE 4670 Spring 2014 Lab 1 Linear System Characteristics

George Mason University ECE 201: Introduction to Signal Analysis

Signal Processing First Lab 20: Extracting Frequencies of Musical Tones

ECE 301, final exam of the session of Prof. Chih-Chun Wang Saturday 10:20am 12:20pm, December 20, 2008, STEW 130,

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY /6.071 Introduction to Electronics, Signals and Measurement Spring 2006

Project 2 - Speech Detection with FIR Filters

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Signals and Systems Lecture 6: Fourier Applications

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

Here are some of Matlab s complex number operators: conj Complex conjugate abs Magnitude. Angle (or phase) in radians

Basic Signals and Systems

L A B 3 : G E N E R A T I N G S I N U S O I D S

Final Exam Solutions June 14, 2006

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering. EIE2106 Signal and System Analysis Lab 2 Fourier series

CSC475 Music Information Retrieval

Lab S-3: Beamforming with Phasors. N r k. is the time shift applied to r k

STATION NUMBER: LAB SECTION: Filters. LAB 6: Filters ELECTRICAL ENGINEERING 43/100 INTRODUCTION TO MICROELECTRONIC CIRCUITS

ECE503: Digital Filter Design Lecture 9

SIGNALS AND SYSTEMS: 3C1 LABORATORY 1. 1 Dr. David Corrigan Electronic and Electrical Engineering Dept.

EELE503. Modern filter design. Filter Design - Introduction

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

Boise State University Department of Electrical and Computer Engineering ECE 212L Circuit Analysis and Design Lab

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

UNIVERSITY OF WARWICK

FREQUENCY RESPONSE AND PASSIVE FILTERS LABORATORY

Fall Music 320A Homework #2 Sinusoids, Complex Sinusoids 145 points Theory and Lab Problems Due Thursday 10/11/2018 before class

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

EECS 216 Winter 2008 Lab 2: FM Detector Part II: In-Lab & Post-Lab Assignment

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2025 Fall 1999 Lab #7: Frequency Response & Bandpass Filters

Lab 8: Frequency Response and Filtering

EE 470 BIOMEDICAL SIGNALS AND SYSTEMS. Active Learning Exercises Part 2

EE 210 Lab Exercise #5: OP-AMPS I

Assignment 1. Regular Problems

Open Loop Frequency Response

Laboratory Project 4: Frequency Response and Filters

Lab S-7: Spectrograms of AM and FM Signals. 2. Study the frequency resolution of the spectrogram for two closely spaced sinusoids.

ECE 2201 PRELAB 6 BJT COMMON EMITTER (CE) AMPLIFIER

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

ECE 3500: Fundamentals of Signals and Systems (Fall 2015) Lab 4: Binary Phase-Shift Keying Modulation and Demodulation

Laboration Exercises in Digital Signal Processing

ECEN 325 Lab 5: Operational Amplifiers Part III

PYKC 13 Feb 2017 EA2.3 Electronics 2 Lecture 8-1

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

Signal Processing First Lab 02: Introduction to Complex Exponentials Multipath. x(t) = A cos(ωt + φ) = Re{Ae jφ e jωt }

George Mason University ECE 201: Introduction to Signal Analysis Spring 2017

1 Introduction and Overview

Introduction to signals and systems

Signal Processing. Introduction

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

Real Analog - Circuits 1 Chapter 11: Lab Projects

EE 233 Circuit Theory Lab 2: Amplifiers

EE Experiment 8 Bode Plots of Frequency Response

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

Problem Set 1 (Solutions are due Mon )

Final Exam Solutions June 7, 2004

From Fourier Series to Analysis of Non-stationary Signals - VII

EE 233 Circuit Theory Lab 3: First-Order Filters

EECE 301 Signals & Systems Prof. Mark Fowler

Experiment 8 Frequency Response

Transcription:

George Mason University Signals and Systems I Spring 2016 Laboratory Project #4 Assigned: Week of March 14, 2016 Due Date: Laboratory Section, Week of April 4, 2016 Report Format and Guidelines for Laboratory Projects Your lab report for each lab is a formal report in the sense that it should be well-prepared, carefully written, and follow the format given below. It must include descriptions and analysis of all parts of the lab that have been assigned. It may help in the preparation of your report to assume that your report is being written for your boss at the place where you now work as a newly-hired engineer, and that this report represents your response to his request for an analysis of a problem that you have been given to work on. General Guidelines Your report should be typewritten, neat and well-organized. The report must be well-organized and follow the format given below. It must include all analytical work, MATLAB plots and code, and relevant explanations. The analytical work and calculations should be complete and clearly explained. It is expected that the report will be grammatically correct with no spelling errors. Part of your grade will be based on the grammatical correctness of your report, and points will be deducted for spelling errors. If you prepare your report in Word, there is a spell checker that you are encouraged to use. Explanations should be given that describe your work, and plots must include properly labeled axes and a title. Each plot should be a figure, with a figure number and a caption. Although it is important to be complete and thorough in your report, points will be deducted if you present too many unnecessary graphs and plots. Within the text of your report, when referring to a particular plot, refer to it by number. For example, you may write something such as The frequency response of the bandstop filter is shown in Figure 2, and from this plot we see that the center frequency of the stop-band is 10 khz and the stop-band width is 2 khz as desired.

Detailed Format 1. Title Page: This page contains an identification of the Laboratory by title and number. It also has the name and G-Number of the author as well as the date of submission. 2. Introduction: This section contains a description of the purpose and objectives of the laboratory project. Do not simply copy test from the assignment. It should also summarize the topics covered in the laboratory and a brief summary of the key results obtained. 3. Main body: This section is the most detailed part in your report. Note that it must not contain any MATLAB code. It does contain a description of the results obtained including any figures that were generated with MATLAB or other sources. The report body should contain subsections that are organized in a manner similar to the laboratory assignment. All figures must have a caption that is used when referring to them in the body of the report. If theoretical calculations are required, these should be detailed and used in comparisons with the experimental portion of the lab. 4. Conclusions: Summarize the conclusions that you made once the results were obtained. The conclusions should be tied back to the objectives of the Lab Project. This should be a concise section that focuses on the important results obtained and your conclusions that resulted from these results. Be concise, but be complete in your conclusions. 5. References/Appendices: If you used any references (e.g. web pages) identify them here. You should also include appendices labelled Appendix A, Appendix B, Appendix C, etc. for each experiment for which you wrote MATLAB code. In these appendices, do not list every MATLAB instruction that you typed in the MATLAB command line. Only provide those that would be necessary to repeat any of your experiments or to create the plots that you present in the report. Each MATLAB script file, or sequence of MATLAB commands must be fully documented, and before each listing ini the appendix, you should provide a description of what the script file or MATLAB commands are used for.

1 Prelab (a) Background: We have seen that periodic functions can be represented in terms of a Fourier Series expansion in either the sine/cosine form or the complex exponential form. In this lab, we will use the complex exponential form. Thus, if x(t) = x(t + T ) for all t, where T is the smallest value for which this is true, then the complex exponential form of the Fourier Series is given by: x(t) = x n e jnω 0t n= The coefficients x n are complex and given by, where ω 0 = 2π/T x n = 1 T t 0 +T x(t)e jnω0t dt When the input to a linear time-invariant system has the following form, t 0 x(t) = e st where s = σ + jω is a complex number, then the output will be an exponential of exactly the same form, but scaled by a complex number whose value depends on s and the impulse response of the system, h(t). More specifically, the output is where y(t) = H(s)e st H(s) = h(t)e st dt (1) is the system function. Thus, complex exponentials are eigenfunctions of linear timeinvariant systems. In the special case when s = jω, then and x(t) = e jωt y(t) = H(jω)e jωt where H(jω) is the frequency response of the system (filter) that is given by H(jω) = H(s) = s=jω h(t)e jωt dt Note that H(jω) is a complex-valued function of ω, the frequency of the complex exponential.

(b) LCCDE s Consider an LTI system whose input x(t) and output y(t) are related by a LCCDE of the form a 3 d 3 y(t) dt 3 + a 2 d 2 y(t) dt 2 + a 1 dy(t) dt + a 0 y(t) = b 2 d 2 x(t) dt 2 + b 1 dx(t) dt In this case, the system function is a ratio of two polynomials in s, + b 0 x(t) (2) H(s) = B(s) A(s) = b 2 s 2 + b 1 s + b 0 a 3 s 3 + a 2 s 2 + a 1 s + a 0 (3) where the coefficients a k and b k are the coefficients of the differential equation. The frequency response is then found by setting s = jω, H(jω) = H(s) s=jω The magnitude of H(jω) at a given frequency ω tells us how much a complex exponential at frequency ω is attenuated or amplified in amplitude. The phase (angle) of H(jω) indicates how much the complex exponential is shifted in phase (delayed or advanced in time). Question 1 for Lab 4 An LTI system is defined by the following LCCDE: d 2 y(t) dt 2 + 0.4 dy(t) dt + y(t) = 0.2 d2 x(t) dt 2 + 0.3 dx(t) dt + x(t) (4) The system function is H(s) = B(s)/A(s) where the polynomials A(s) and B(s) have the form: A(s) = a 2 s 2 + a 1 s + a 0 B(s) = b 2 s 2 + b 1 s + b 0 The coefficients of the polynomials A(s) and B(s) may be represented by vectors a and b as follows: a = [a 2 a 1 a 0 ] b = [b 2 b 1 b 0 ] (a) What are the vectors a and b for this system? (b) Find the roots of the polynomial A(s). These are called the poles of the system. (c) Find the roots of the polynomial B(s). These are called the zeros of the system. (d) Plot the pole/zero locations for this filter using the MATLAB commands: H = tf(b,a); pzmap(h) grid More information on the MATLAB functions tf and pzmap can be found using the MATLAB help function.

(e) Find an analytical expression for H(jω) for this system. (f) Write a MATLAB program to plot H(jω) over the range 0 ω 5.0 by evaluating your analytical expression. Use 101 equally-spaced values of ω for the horizontal axis. Note: For this part, you must write your own code, and you may not use existing MATLAB functions. Be sure to label both axes in your plot. Provide a documented listing and description of your program in an Appendix of your lab report. 2 Finding the Frequency Response of LTI Systems MATLAB has a number of useful m-files to find and plot the frequency response of a system and to filter signals. One of these that you will be using in this lab is freqs, which returns the frequency response H(jω) of a continuous-time system that is specified by the coefficients a k and b k in the numerator and denominator polynomials of H(jω). Using the vectors a and b that you found in Question 1(a), demonstrate that the MATLAB code below plots the magnitude of the frequency response, H(jω), for the system given in Eq. 4: w = linspace(0,5,101); H = freqs(b,a,w); plot(w,20*log10(abs(h))) xlabel( Frequency (rad/s) ) ylabel( H(j\omega) in db ) grid Note that the vector H contains the values of the frequency response in rad/s at the frequencies specified by the vector w. In this case, H contains 101 samples of H(jω) within the range 0 ω 5 radians/sec. Question 2 for Lab 4 (a) Verify that the results you obtained using freqs in the MATLAB code above agrees with your analytical results from Question 1. Explain any differences. (b) Use MATLAB to plot the system frequency response H(jω) for the following system: s 2 + ω0 2 H(s) = s 2 + 2ω 0 cos(θ)s + ω0 2 with ω 0 = 2π(60) and θ = 60 o. The result will show that H(s) is a notch filter that eliminates one or more frequency components from the input signal. What frequencies are eliminated? (c) If θ is increased to 85 o, what happens to the notch? Explore the behavior of the notch filter for other values of θ and describe what you observe. There are other ways to use the MATLAB function freqs and these may be found by typing help freqs. Additional useful MATLAB functions that you may find useful include impulse(sys,tfinal,dt), and lsim(sys,u,t,x0). Again, for documentation on any of these use the MATLAB help function.

(a) Ideal limiter input and output. (b) Spectra. Figure 1: A unit amplitude sinusoid that is input to an ideal limiter with a clipping value of 0.6. 3 Amplitude Limiting Effects in LTI Systems In many practical filtering systems, the relationship between the input and the output may be accurately modelled as an LTI system provided that the input does not exceed some maximum value. An amplifier, for example, may be linear for signals that do not exceed some maximum amplitude, but nonlinear for signals that exceed this maximum value. In other cases, it may be important to limit the amplitude of the input to an LTI system to some maximum value, x max in order to prevent damage to sensitive system components. In these cases, one may pass the input through a limiter that clips the amplitude to some maximum value, x max. The model for the overall system thus consists of an ideal limiter followed by an LTI system. An ideal limiter is a nonlinear memoryless system where the output is equal to the input provided that the magnitude of the input signal is less than some specified value, called the clipping level. When the input exceeds this value, the output is clipped to this value. For example, if the clipping value is equal to one, then the output is given by { x(t) ; 0 x(t) 1 y(t) = sign(x(t)) ; 1 < x(t) Figure 1(a) illustrates the clipping process for a unit amplitude sinusoid of frequency ω 0 = 2π500 Hz. and a clipping level of 0.6. As we see, the output y(t) has a maximum value of 0.6. The spectra of the original and clipped waveforms are shown in Fig. 1(b). Note that although the input to the limiter is a pure sinusoid with no harmonics, the ideal limiter is a nonlinear device and, therefore, is capable of producing multiple harmonics in the output signal. Question 3 for Lab 4 This question addresses the issue of the effects of amplitude limiting in systems. Suppose that we have a linear time-invariant system with a frequency response H(jω), but any input to this system is first passed through a limiter that clips the amplitude of the input to some maximum value, x max. (a) Using MATLAB, create a vector a consisting of L = 2 16 = 65, 536 samples of a unit-

amplitude sinusoid x(t) with a frequency f 0 = 440 Hz. (This is the musical note A above middle C.) With a sampling frequency f s = 44, 100 Hz., the spacing between samples will be T = 1/f s = 2.2710 5 seconds. What is the duration of the tone that you have created? Instructor Verification (separate page) (b) Using MATLAB, create a clipped signal y(t) that is equal to the sinusoid x(t) that you created in part (a) when x(t) 0.8, and equal to ±0.8 whenever x(t) exceeds 0.8. Use the hold function in MATLAB to produce a plot similar to Figure 1. (c) Listen to the pure tone x(t) and (separately) the clipped signal y(t) using the soundsc command in MATLAB. The format for this function is soundsc(x,fs). It is important that you include the sampling frequency f s in the MATLAB command. If you type soundsc(x), it will take a very long time to play and the frequency you hear will be very low. Explain what you hear when comparing the clipped and original signals. Are the results of your listening experiment expected? Experiment with other clipping levels such as 0.9 and 0.1 and discuss the results of your comparison. Instructor Verification (separate page) (d) The MATLAB code below will plot the spectrum of a 440 Hz sinusoid x(t). fs = 44100; % Sampling frequency fc = 440; % Sinusoid frequency dt = 1/fs; % Sampling interval L = 2^(16); % Number of points in sinusoid t = [0:L-1]; x = sin(2*pi*fc/fs*t); Fx = 20*log10(abs(fft(x,L))); % Spectrum of signal x ff = fs*linspace(0,1,l); % Frequency values plot(ff,fx) xlim([0 3000]) % Limits frequencies to 0 -> 3,000 Hz. grid Modify this program to compute the spectrum of the clipped signal y(t) that you created in part (b), and plot the spectra of both x(t) and y(t) on the same axis as in Figure 1(b). Provide a documented listing and description of your program in an Appendix of your lab report. (e) Experiment with different clipping levels between zero and one. By varying the clipping level and playing the result, find the lowest value of clipping detectable by the ear when playing the clipped waveforms. (f) Change the frequency of the sinusoid in part (e) and determine whether or not there are any differences in the effects of clipping in low-frequency sinusoids compared to high-frequency sinusoids. For example, does the lowest value of clipping detectable by the ear depend on the frequency of the sinusoid?

4 Clipped Trumpet Signals As we have seen, the effect of signal clipping on a sinusoid is primarily to produce harmonics at multiples of the sinusoidal frequency. As we will see later, it is possible to attenuate these harmonics by filtering the clipped signal with a lowpass filter that passes frequencies lower than that of the sinusoid while rejecting the higher frequency harmonics. In this section, we examine the effects of clipping on a trumpet signal. (a) Download the file trump_short.mat into your MATLAB workspace. This file can be found in the Blackboard page for Prof. Griffiths or the course web page for Prof. Hayes. Once the file is in your workspace, use the following MATLAB commands to retrieve the audio file of a trumpet playing the note middle C, which is nominally 261.626 Hz.: >> load( trump_short.mat ); After loading this file, your workspace will contain the following two files: 1. trumpet 2. fs The file trumpet is the trumpet sound and the variable fs is the sampling rate. (b) Use soundsc to listen to the trumpet with the following format: >> soundsc(trumpet,fs); (c) Compute the spectrum of this signal using the method that you used in part 3(d). Plot this spectrum over the range 0 to 3,000 Hz. More than 10 harmonic peaks should be visible. (d) Using the same approach as in Part 3, apply a clipping level of 0.5 to the trumpet signal and plot the resulting spectrum on the same plot as the original (un-clipped) signal. Discuss the differences that you observe in the spectra of the original and clipped trumpet signals. Again, use soundsc to listen to the clipped trumpet waveform and describe the differences that you hear. (e) Experiment with different clipping levels between 0 and 1. By varying the clipping level and listening to the result, find the lowest value of clipping detectable by ear when you play the clipped waveform. 5 Clipped Music Signals In this section, we will examine the effects of clipping on a recorded song. (a) Download the file River_220.mat into your MATLAB workspace. This file can be found in the Blackboard page for Prof. Griffiths or the course web page for Prof. Hayes. Load River_220.mat into MATLAB. This file contains the following two files: 1. y

2. fs where y is a music recording. (b) Use soundsc to listen to the trumpet with the command: >> soundsc(y,fs); (c) Analyze this signal using exactly the same approach as in Part 4, i.e., repeat parts (b) through (e) for the music signal. 6 Conclusions and Observations In this lab, you have studied the effects of clipping on three different types of audio signals: 1. A 440 Hz sinusoidal tone. 2. A trumpet playing one note at 261.626 Hz. 3. A music track having a continuous music spectrum. Write a one page narrative that summarizes your findings in this lab. As a part of your summary, you must discuss the following issues and answer the following questions in addition to any other conclusions that you find relevant and important: (a) Which signal can be clipped to the lowest level without significantly distorting the sound: the sinusoid, the trumpet, or the music track? Rank the three cases with respect to their susceptibility to clipping. Can you provide any reasons that explain your findings? (b) In Question 3(f), you changed the frequency of the sinusoid that is clipped and determined whether or not there are any differences in the effects of clipping in lowfrequency sinusoids compared to high-frequency sinusoids. Does this provide any insight or explanation for your analysis on the effects of clipping in sinusoids compared to the trumpet and to music? (c) What additional experiments would you want to perform in order to analyze the effects of clipping on signals? Formulate an experimental plan for data collection and analysis. 7 Appendices Use the Appendix section to list the MATLAB code that you generated during this lab. Make sure the code is documented sufficiently using comments so that it can easily be understood by others. Make sure you indicate which portion of the report used the MATLAB code that you are listing. If you used the web to search on various items during the lab, list the pages you used as a result of the search. Again indicate which portion of the lab corresponds to the pages you are listing.

Lab #4 ECE 220: Spring 2016 Instructor Verification Sheet For each verification, be prepared to explain your answer and respond to other related questions that the lab TA s or professors might ask. Turn this page in along with your lab report. Name: Date of Lab: Question 3(a): With a sampling frequency f s = 44, 100 Hz., the spacing between the samples of a sinusoid of frequency 44,100 Hz. will be T = 1/f s = 2.2710 5 seconds. With L = 65, 536 samples, what is the duration of the tone? Tone duration = sec. Explain how you determined this value. Verified: Date/Time: Question 3(c): Explain why the command soundsc(x) takes so long to play when x is the sinusoid you created in this problem.