Project 2 - Speech Detection with FIR Filters

Similar documents
DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

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

Laboratory Assignment 5 Amplitude Modulation

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

Lab 8: Frequency Response and Filtering

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

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab.

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

Final Exam Solutions June 7, 2004

Basic Signals and Systems

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

Lecture 4 Frequency Response of FIR Systems (II)

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

Final Exam Solutions June 14, 2006

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

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

Project I: Phase Tracking and Baud Timing Correction Systems

1B Paper 6: Communications Handout 2: Analogue Modulation

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

Electrical & Computer Engineering Technology

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

DT Filters 2/19. Atousa Hajshirmohammadi, SFU

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Spring Semester, Introduction to EECS 2

ECE 201: Introduction to Signal Analysis

Problems from the 3 rd edition

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

Digital Signal Processing Lecture 1 - Introduction

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

Amplitude Modulation, II

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

Fourier Transform Analysis of Signals and Systems

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

Speech, music, images, and video are examples of analog signals. Each of these signals is characterized by its bandwidth, dynamic range, and the

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

Lecture 17 z-transforms 2

1.5 The voltage V is given as V=RI, where R and I are resistance matrix and I current vector. Evaluate V given that

HW 6 Due: November 3, 10:39 AM (in class)

Synthesis: From Frequency to Time-Domain

EXPERIMENT 4 INTRODUCTION TO AMPLITUDE MODULATION SUBMITTED BY

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

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

3.1 Introduction to Modulation

ECEGR Lab #8: Introduction to Simulink

(b) What are the differences between FM and PM? (c) What are the differences between NBFM and WBFM? [9+4+3]

Frequency Division Multiplexing Spring 2011 Lecture #14. Sinusoids and LTI Systems. Periodic Sequences. x[n] = x[n + N]

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

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

Lab S-4: Convolution & FIR Filters. Please read through the information below prior to attending your lab.

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

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

Final Exam. EE313 Signals and Systems. Fall 1999, Prof. Brian L. Evans, Unique No

Sampling and Reconstruction of Analog Signals

Chapter 3: Analog Modulation Cengage Learning Engineering. All Rights Reserved.

ECE 5650/4650 Exam II November 20, 2018 Name:

EE452 Senior Capstone Project: Integration of Matlab Tools for DSP Code Generation. Kwadwo Boateng Charles Badu. May 8, 2006

Experiment 1 Design of Conventional Amplitude Modulator

cosω t Y AD 532 Analog Multiplier Board EE18.xx Fig. 1 Amplitude modulation of a sine wave message signal

Laboratory Assignment 4. Fourier Sound Synthesis

Amplitude Modulated Systems

B.Tech II Year II Semester (R13) Supplementary Examinations May/June 2017 ANALOG COMMUNICATION SYSTEMS (Electronics and Communication Engineering)

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

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

EECS 452 Midterm Closed book part Winter 2013

EECS 452 Midterm Exam Winter 2012

AM Limitations. Amplitude Modulation II. DSB-SC Modulation. AM Modifications

Digital Signal Processing ETI

Amplitude Modulation II

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

6.02 Practice Problems: Modulation & Demodulation

George Mason University Signals and Systems I Spring 2016

Principles of Communications ECS 332

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

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

Communication Channels

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

Lab S-9: Interference Removal from Electro-Cardiogram (ECG) Signals

EE 422G - Signals and Systems Laboratory

Lakehead University. Department of Electrical Engineering

Experiments #6. Convolution and Linear Time Invariant Systems

Angle Modulated Systems

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

ECE 5650/4650 MATLAB Project 1

Signals and Systems Lecture 6: Fourier Applications

Lab P-10: Edge Detection in Images: UPC Decoding. Please read through the information below prior to attending your lab.

EECS 307: Lab Handout 2 (FALL 2012)

Elements of Communication System Channel Fig: 1: Block Diagram of Communication System Terminology in Communication System

Signals and Systems Lecture 6: Fourier Applications

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

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

Design of Bandpass Delta-Sigma Modulators: Avoiding Common Mistakes

CME312- LAB Manual DSB-SC Modulation and Demodulation Experiment 6. Experiment 6. Experiment. DSB-SC Modulation and Demodulation

HW 6 Due: November 9, 4 PM

Presentation Outline. Advisors: Dr. In Soo Ahn Dr. Thomas L. Stewart. Team Members: Luke Vercimak Karl Weyeneth. Karl. Luke

Lab 6: Sampling, Convolution, and FIR Filtering

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

Linear Frequency Modulation (FM) Chirp Signal. Chirp Signal cont. CMPT 468: Lecture 7 Frequency Modulation (FM) Synthesis

1. page xviii, line 23:... conventional. Part of the reason for this...

Introduction to Amplitude Modulation

AC : FIR FILTERS FOR TECHNOLOGISTS, SCIENTISTS, AND OTHER NON-PH.D.S

Experiment 02: Amplitude Modulation

Transcription:

Project 2 - Speech Detection with FIR Filters ECE505, Fall 2015 EECS, University of Tennessee (Due 10/30) 1 Objective The project introduces a practical application where sinusoidal signals are used to transmit information, i.e., amplitude modulation (AM) for radio (e.g., speech). In this application, FIR filters can be applied to extract the information encoded in the waveforms. Through this project, you should have in-depth understanding of characteristics of FIR filters and review techniques like generating envelope, tone synthesis, amplitude modulation, etc. 2 Background You need a little bit background on how amplitude modulation (AM) is used. AM is often used to transmit a signal with low-frequency content using a highfrequency transmission channel. A common example is AM radio, where a relatively low-frequency signal such as a speech signal, with frequencies between 50 Hz and 4 khz, is transmitted by radio waves at frequencies around 1 MHz. AM is performed by multiplying a high-frequency signal, referred to the carrier, by a low-frequency message signal, m(t), x(t) = (1 + A cos(2πf m t)) cos(2πf c t) = cos(2πf c t) + A 2 cos(2π(f c + f m )t) + A 2 cos(2π(f c f m )t) (1) where m(t) = A cos(2πf m t) is the message signal, cos(2πf c t + θ) is the carrier signal. More complicated message signals may be analyzed if m(t) can be written as summations of multiple sinusoidal components x(t) = (1 + k A k cos(2πf k t)) cos(2πf c t) = cos(2πf c t) + k A k 2 cos(2π(f c + f k )t) + k A k 2 cos(2π(f c f k )t) In communications jargon, the signal components at f = f c ±f m are called the sidebands and the signal component with a frequency of f c is called the carrier. 1

In general, in AM, f c f m. Note that an AM signal is very similar to the beat signals except for the carrier term. AM demodulation is the process of recovering the message waveform from a modulated signal such as AM. There are numerous methods of demodulating a signal. In the following, we only discuss three and the project is focused on the LTI filter-based method. Envelope detection (peak tracking). This method tries to return a waveform that passes through the peaks of the AM waveform using an RC circuit shown in Fig. 1, where the capacitor is charged through the diode during each positive cycle of the AM signal and the resistor discharges the capacitor during the negative part of the cycle. Fig. 2 shows a demodulated signal as compared to the message signal. The demodulated signal approximates the sinusoidal shape of the message signal after removing the DC level of one. The jagged appearance is due to the exponential discharge of the RC circuit. The MATLAB function amdemod() performs this type of demodulation. Figure 1: The demodulated AM signal using MATLAB s amdemod() routine. LTI filter-based demodulation. It is possible to recover the message signal by modulating the modulated signal and then filtering. This is the basic principle used in commercial radios nowadays. Given an AM signal of the form Eq. 1, we can isolate the message signal by multiplying x(t) by cos(2πf c t), x(t) cos(2πf c t) = (1 + m(t)) cos(2πf c t) cos(2πf c t) = = (1 + m(t))( 1 2 + 1 2 cos(2π(2f c)t)) 2 m(t) + 1 2 + 1 2 (1 + m(t)) cos(2π(2f c)t) (2) based on which, by applying a filter to eliminate the high-frequency component and the DC component, the message signal m(t) can be extracted. Notch filters for demodulation. Notch filters can completely eliminate some frequency other than ω = 0 or ω = π. It is possible to make a notch filter with as few as three coefficients. If ω not is the desired notch frequency, then the following 2

Figure 2: The demodulated AM signal using MATLAB s amdemod() routine. length-3 FIR filter y[n] = x[n] 2 cos(ω not )x[n 1] + x[n 2] will have a zero at ω = ω not in its frequency response. For example, a filter designed to completely eliminate signals of the form Ae j0.5πn would have coefficients b 0 = 1, b 1 = 2 cos(0.5π) = 0, b 2 = 1 3 Tasks 3.1 Task 1: Filter Design and Behavior Study (50 pt) Task 1.1 (5 pt): Write a function, function [y] = firfilter(b, x) to implement an FIR filter, where b is the filter coefficient vector, and x and y are the input and the resulting signal, respectively. MATLAB has a build-in function, filter(), but it is more generic and can implement a wide class of filters. Task 1.2 (5 pt): Write a function, function [H] = freqres(b, omega) to generate the frequency response of an FIR system, where b is, again, the filter coefficient, and omega is the radian frequency vector. You can also save the argument of omega as it is normally from π to π. MATLAB also has a build-in function, freqz(), but again is more generic than needed here. 3

Task 1.3 (3 pt): Write a function, function [x] = xn(a, omega, theta, n) to generate a discrete-time cosine wave, where A, omega, theta, n are the amplitude, frequency in radian, phase shift, and length of the discrete-time signal, respectively. Task 1.4 (5 pt): In homework 3, you ve written nwz.m that outputs the impulse response, magnitude response, phase response, and pole-zero plots given the pole and zero locations. The sample source code can be located at http://web.eecs.utk.edu/ qi/ece505/code/nwz.m. Now write two other functions n2z.m that generates the pole-zero locations given the coefficients b and a, i.e., [Z, P] = n2z(b,a); and z2n.m that generates the coefficients given the pole-zero locations, i.e., [b, a] = z2n(z,p). Task 1.5 (5 pt): Generate a 30-sample cosine wave, xn1, with A = 7, theta = π/3, and omega = π/8. Use firfilter() to implement the following first-difference filter with a gain of 5, In a figure with 3 2 subplots y[n] = 5x[n] 5x[n 1]. Plot xn1 using MATLAB s built-in function subplot() and stem(). Plot yn1 in another subplot. Plot the frequency response of the filter, generated from freqres() in a 3rd subplot(). Plot the phase response of the filter in a 4th subplot Use n2z to find the pole/zero locations and provide the pole-zero plot in the 5th subplot Plot the impulse response in the last subplot. Explain how the amplitude, frequency, and phase of the input signal should be changed by the frequency response and compare it with the plot of yn1 to see if the plot confirms your analysis. Explain what the zero locations should be distributed and confirm that with the plot. Task 1.6 (7 pt): If a system is made of two subsystems cascaded together with the first subsystem being a 5-point averager, i.e., w[n] = x 2 [n], and the second subsystem the first difference FIR filter as in Task 1.5, i.e., y[n] = 5w[n] 5w[n 1], if we still use xn1 as the input, plot all three waveforms, xn1, wn, and yn on the same figure with subplot. Make a sketch of 4

the spectrum of these three signals. Observe signal wn and see if you can see the additional frequencies introduced by the squaring operation. Now replace the first-difference filter with the second-order FIR filter y 2 (n) = w(n) 2 cos(0.25π)w(n 1) + w(n 2) and observe how this new filter is able to remove certain frequency component(s). What type of FIR filter is it? Task 1.7 (10 pt): Use the same signal w[n] generated from Task 1.6, design an 8-point bandpass filter to just pass the extra frequency components due to the square operation but eliminate all other frequencies (including the DC components). You can either start by specifying the pole/zero locations and find the filter coefficients, or specifying the filter coefficients and using which to find the pole/zero locations. What type of FIR filter is it? Task 1.8 (10 pt): Is the bandpass filter a minimum-phase system? If not, implement the system as a minimum-phase system cascaded by an allpass system. Provide the frequency response, impulse response, and pole-zero plots of both subsystems, as well as the input and output waveform with their spectrum. Assume the input is still wn[n]. Are the subsystems FIR filters? If so, what type? 3.2 Task 2: AM Waveform Detection and Filtering (50 pt) Task 2.1 (8 pt): Write a function mx = ampmod(x, fs, fc) that would modulate a speech signal x with a carrier signal of frequency fc and fs is the sampling frequency. The speech can be downloaded at http://web. eecs.utk.edu/ qi/ece505/project/proj2speech.mat. The file contains three signals, cc, mm, ss representing the carrier signal, the modulated signal and the speech signal. Plot the waveform and the spectrum of the three signal, estimate the carrier frequency and perform modulation using ss. Task 2.2 (12 pt): Write a function ampdemod LTI that would demodulate the modulated speech signal using LTI filters. Compare results with the one from amdemod(). Task 2.3 (15 pt): Filter the demodulated speech signal using two systems cascaded together with the first system being a 5-point average and the second system a first difference filter. Do it in both the time and the frequency domain and compare the difference. 5

Task 2.4 (15 pt): Write a function ampdemod Notch to demodulate the speech signal using notch filters then compare results with the one from amdemod() and LTI filters. Acknowledgement Part of this project is designed based on labs provided in McClellan, Schafer, and Yoder s DSP FIRST: A Multimedia Approach. 6