EEE - 321: Signals and Systems Lab Assignment 3

Similar documents
George Mason University Signals and Systems I Spring 2016

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

Faculty of Engineering Electrical Engineering Department Communication Engineering I Lab (EELE 3170) Eng. Adam M. Hammad

ECE 201: Introduction to Signal Analysis

Experiments #6. Convolution and Linear Time Invariant Systems

EECE 301 Signals & Systems Prof. Mark Fowler

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

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

Laboratory Assignment 5 Amplitude Modulation

Laboratory Assignment 4. Fourier Sound Synthesis

MATLAB Assignment. The Fourier Series

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

Final Exam Practice Questions for Music 421, with Solutions

EE 422G - Signals and Systems Laboratory

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

Sampling and Reconstruction of Analog Signals

Electrical & Computer Engineering Technology

Digital Signal Processing Lecture 1 - Introduction

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

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

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

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

Lecture 2: SIGNALS. 1 st semester By: Elham Sunbu

zt ( ) = Ae find f(t)=re( zt ( )), g(t)= Im( zt ( )), and r(t), and θ ( t) if z(t)=r(t) e

Communication Channels

Introduction to signals and systems

LAB 2 SPECTRUM ANALYSIS OF PERIODIC SIGNALS

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

Handout 2: Fourier Transform

Problem Set 1 (Solutions are due Mon )

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING

Lecture 2 Review of Signals and Systems: Part 1. EE4900/EE6720 Digital Communications

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

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

Fourier Series and Gibbs Phenomenon

Wireless PHY: Modulation and Demodulation

Principles of Communications ECS 332

Communications IB Paper 6 Handout 2: Analogue Modulation

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

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

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

Brief Introduction to Signals & Systems. Phani Chavali

Project 2 - Speech Detection with FIR Filters

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

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

Limitations of Sum-of-Sinusoid Signals

HW 6 Due: November 9, 4 PM

Signals and Systems Lecture 9 Communication Systems Frequency-Division Multiplexing and Frequency Modulation (FM)

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

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

EE 5410 Signal Processing

Outline. Wireless PHY: Modulation and Demodulation. Recap: Modulation. Admin. Recap: Demod of AM. Page 1. Recap: Amplitude Modulation (AM)

C.8 Comb filters 462 APPENDIX C. LABORATORY EXERCISES

DSP First. Laboratory Exercise #2. Introduction to Complex Exponentials

Laboration Exercises in Digital Signal Processing

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

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

Knowledge Integration Module 2 Fall 2016

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

Problems from the 3 rd edition

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

Lab 0: Introduction to TIMS AND MATLAB

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

School of Engineering and Information Technology ASSESSMENT COVER SHEET

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Outline. J-DSP Overview. Objectives and Motivation. by Andreas Spanias Arizona State University

H represents the value of the transfer function (frequency response) at

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

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


Experiment Guide: RC/RLC Filters and LabVIEW

EEO 401 Digital Signal Processing Prof. Mark Fowler

Project I: Phase Tracking and Baud Timing Correction Systems

Wireless Communication Systems Laboratory Lab#1: An introduction to basic digital baseband communication through MATLAB simulation Objective

Assignment 1. Regular Problems

Theory of Telecommunications Networks

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

Final Exam Solutions June 14, 2006

AC CURRENTS, VOLTAGES, FILTERS, and RESONANCE

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

Synthesis: From Frequency to Time-Domain

FREQUENCY RESPONSE AND PASSIVE FILTERS LABORATORY

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Open Loop Frequency Response

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

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

SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number:

University of Pennsylvania Department of Electrical and Systems Engineering Digital Audio Basics

Chapter 1. Electronics and Semiconductors

Experiment 3. Direct Sequence Spread Spectrum. Prelab

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

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

Figure 1: Block diagram of Digital signal processing

Basic Signals and Systems

Project 1. Notch filter Fig. 1: (Left) voice signal segment. (Right) segment corrupted by 700-Hz sinusoidal buzz.

Physics 132 Quiz # 23

Laboratory 7: Active Filters

Lab 8: Frequency Response and Filtering

Transcription:

BILKENT UNIVERSITY ELECTRICAL AND ELECTRONICS ENGINEERING DEPARTMENT EEE - 321: Signals and Systems Lab Assignment 3 For Section-I report submission is due by 08.11.2017 For Section-II report submission is due by 10.11.2017 Please carefully study this assingment before coming to the laboratory. You may begin working on it or even complete it if you wish, but you do not have to. There will be short quizzes both at the beginning and end of the lab session; these may contain conceptual, analytical, and Matlab-based questions. Within one week, complete the assignment in the form of a report and turn it in to the assistant. Some of the exercises will be performed by hand and others by using Matlab. What you should include in your report is indicated within the exercises. Note: Along with this pdf file, you will find a.zip file containing two Matlab functions named FT.m and IFT.m and a music wav file named furelise. Unzip the archive and place all files contained in it under the current directory of Matlab. 1 Part 1 In this lab, you are going to see two common daily life applications in which the concepts you learned in the signals and systems course are used. In this part, you will see the first of these applications: transmission and detection of Dual Tone Multi Frequency (DTMF) signals. In Part 2, you will see the second application: cancelation of the echoes from a sound signal. Dual tone multi frequency (DTMF) is the name of the standard technique 1

used over analog telephone lines to transmit and receive the information about the dialed phone number. Examine the following chart: The interpretation of this chart is as follows: 1209 Hz 1336 Hz 1477 Hz 1633 Hz 697 Hz 1 2 3 A 770 Hz 4 5 6 B 852 Hz 7 8 9 C 941 Hz 0 # D Table 1: DTMF frequencies Suppose you press the button for 5 on your phone for 0.25 seconds. Then, the DTMF transmitter on your phone sends the following signal x(t) = { cos(2π770t) + cos(2π1336t) for 0 t 0.25, Or if you press 9, the transmitted signal becomes x(t) = { cos(2π852t) + cos(2π1477t) for 0 t 0.25, At the receiver (that is the telephone exchange - telefon santrali), the DTMF receiver examines the incoming signal, tries to understand which frequencies were transmitted, so tries to decide which number is dialed. 1.1 DTMF Transmitter In this part, you will write a function that prepares the analog signal to be transmitted when a phone number containing only numerical digits 0,1,...,9 is dialed. Assume that for each button, the duration of the transmitted signal is only 0.25 seconds. Thus, for instance, if the dialed number is 2017, you should prepare the following signal: cos(2π697t) + cos(2π1336t) for 0 t 0.25, cos(2π941t) + cos(2π1336t) for 0.25 t 0.5, x(t) = cos(2π697t) + cos(2π1209t) for 0.5 t 0.75, cos(2π852t) + cos(2π1209t) for 0.75 t 1, Note that if N digits are dialed, the duration of the final signal is 0.25N. Of course, in Matlab we can only compute the samples of x(t). Your code should compute the samples within 0 t 0.25N using the sampling period T s = 1/8192. 2

Your function should look like function [x]=dtmftra(number) where Number of size 1 N contains the phone number that is dialed. For instance, if the dialed number is 2017, you should have Number=[2 0 1 7]. x contains the samples of the transmitted signal x(t). Once your code is ready to run, prepare the signal for your own cellular phone number and listen to it using the Matlab command soundsc(x,8192). Does what you listen to sound familiar to you? Include your code and comments to your report. 1.2 DTMF Receiver (Note: Before starting this part, clear everything in the workspace issuing the command clear all. Place the m-files named FT.m and IFT.m under the current directory.) First run x=dtmftra(number), where Number includes the last 4 digits of your ID number in reverse order (i.e., for 20151234, choose Number = [4 3 2 1]). Now, suppose we are on the receiver side, x is the received signal and assume we do not know what x includes. You can listen to it typing soundsc(x,8192). We know that the form of the signal that we receive is as follows: cos(2πf r 1 t) + cos(2πf c 1 t) for 0 t 0.25, cos(2πf r 2 t) + cos(2πf c 2 t) for 0.25 t 0.5, x(t) = cos(2πf r 3 t) + cos(2πf c 3 t) for 0.5 t 0.75, cos(2πf r 4 t) + cos(2πf c 4 t) for 0.75 t 1, where (f r 1, f c 1 ) determine the first digit,..., (f r 4, f c 4 ) determine the last digit. To understand the dialed phone number, we need to find (f r 1, f c 1 ),..., (f r 4, f c 4 ). The Fourier transform operation is a powerful tool to analyze the frequency content of signals, and we will make use of it to understand the frequency content of the received signal. The Fourier transform of x(t), denoted by X (ω) is defined as: X (ω) = x(t)e j ωt dt (1) For a particular frequency ω, X (ω) denotes the contribution of the complex exponential e j ωt to the signal x(t). As an analogy, X (ω) shows how many grams of e j ωt we need to use to form x(t). 3

Answer the following questions and include the answers to your report. You can directly use the result given in the book for part a. For the other parts show your work clearly. In these parts, you can directly use the definition of the Fourier transform. However, if it is possible, it is recommended to use the properties of the Fourier transform. a) Let x(t) = exp(j 2πf 0 t b) Let x(t) = cos(2πf 0 t ( c) Let x(t) = rect t ( d) Let x(t) = exp(j 2πf 0 t)rect t ( e) Let x(t) = cos(2πf 0 t)rect t f) Let x(t) = rect( t t0 g) Let x(t) = exp(j 2πf 0 t)rect( t t0 h) Let x(t) = cos(2πf 0 t)rect( t t0 Type X=FT(x). Then create a frequency array using the following code: omega=linspace(-8192*pi,8192*pi,8193); omega=omega(1:8192); This piece of code will create a frequency array in angular frequency. You will learn the details of this code when you learn the details of sampling. Then type plot(omega,abs(x)). You will obtain the plot of the magnitude of the Fourier transform of x(t) computed over the grid specified by omega. Include the plot to the report. Examine the figure, in particular, determine the frequencies where you see the peaks. Are the frequencies where the peaks occur the ones used by DTMF transceivers? (Here you should consider the conversion of cyclic frequency (with units of Hertz) to angular frequency (with units of rad/sec)). If yes, can you understand ONLY from this figure what the dialed number is? Include your answers to the report. Now, define a new signal as x(t) for 0 t 0.25, x 1 (t) = 0 for 0.25 t 1. This operation can be seen as a multiplication of x(t) by a rectangular signal. First write the analytical expression of this rectangular signal. Then, in Matlab, generate this rectangular 4

signal and by multiplying by x(t), create x 1 (t). Make sure that the size of the array for x 1 (t) is the same with the size of the array for x(t). Include your code to the report. Now compute X 1 (ω) using the FT.m function and plot its magnitude against ω. Include the plot to the report. Look again to the frequencies where the peaks occur. This time, can you understand what is the first digit that is dialed? Include the answer to your report. Continue in this manner and find the remaining three digits. Explain these steps clearly. Why do you think that the first method (looking at X (ω) at once) does not work but the second method (looking at X 1 (ω),...,x 4 (ω) separately) works? Write your answer to the report. 2 Part 2 (Note: Before starting this part, clear everything in the workspace issuing the command clear all. Place both the m-files named FT.m and IFT.m and the wav file furelise under the current directory.) In this part you will learn how to add an echo to an audio signal using Matlab. Note that echoes are essentially delayed and possibly attenuated versions of the original signal. You will first load a music wav file named furelise. At this point learn more about Matlab function wavread and how it can be used to extract the sampling frequency of furelise wav file. Initially you will load the original wav file signal and save it in the workspace named as x. From its sampling frequency and length of the signal find the total duration, T of x. Listen to it in Matlab using soundsc function. Include the code and your calculated signal duration T to your report. You will then create a delayed version of x and multiply it by an attenuation constant A i to reduce the amplitude of the echo signal. Finally the delayed and attenuated signal are added back to the original signal to get the echo effect of the audio signal. Now synthesize an echo signal y from the original signal x. It can be represented as M y(t) = x(t) + A i x(t t i ), (2) i=1 where the summation simulates multiple echoes. M represent the number of the echo, A i denotes the amplitude of the i th echo and t i denotes the time delay for the i th echo with t i > 0. First, answer the following questions and include your answers to your report together with a clear derivation. a) Find h(t) such that y(t) = x(t) h(t) where denotes the convolution operation. Note that in this way, we describe the process that relates x(t) to y(t) as a linear time invariant (LTI) system. The impulse response of this LTI system is h(t). 5

b) What is the frequency response of this system? Fourier transform of h(t)? That is, what is H(ω), i.e., the c) What is the relation between X (ω), Y (ω) and H(ω)? d) Given Y (ω) and H(ω), how can you determine X (ω)? Now, generate the time variable t by issuing the command t=0:1/f s :T 1/F s ;, where F s is the sampling frequency of original signal x and T is the duration of the signal. This variable indicates the sampling points in time of your furelise. Then generate y from x by assuming M = 4, A i = 0.75,0.5,0.25,0.15 and t i = 0.75,1.5,2.25,3 seconds. Crop the delayed signals so that each of them is T seconds long. Plot x(t) vs. t and y(t) vs. t in separate figures. Clearly indicate the titles and labels. Also listen to y(t) and describe the sound that you listened. Now you will extract the original signal from the disturbed signal using Fourier domain relations. In order to do this, compute the Fourier transform of y(t) using the command Y=FT(y). Then, compute H(ω) over the grid specified by omega, which will be generated typing omega=linspace(-f s *pi,f s *pi,(t F s ) + 1); omega=omega(1:(f s T )); Next, compute h(t) typing h=ift(h). Plot h(t) vs. t and H(ω) vs. ω in separate figures. Include your plots to your report together with the appropriate labels and titles. Then, using your result in item d, compute X e (ω), where e indicates estimated X. Finally, compute x e (t) from X e (ω) typing xe=ift(xe). Then listen to xe(t). Is the estimated audio different than your original audio. Plot xe(t) and include the plot to your report. Also include your comments and observations to the report. 6