Signal Processing. Introduction

Similar documents
Lecture 7 Frequency Modulation

Final Exam Solutions June 14, 2006

Signal Processing. Naureen Ghani. December 9, 2017

ECE 3793 Matlab Project 4

Outline. Communications Engineering 1

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

Laboratory Assignment 4. Fourier Sound Synthesis

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

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

Digital Processing of Continuous-Time Signals

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

Signal Processing Toolbox

Digital Processing of

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Figure 1: Block diagram of Digital signal processing

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

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Electrical & Computer Engineering Technology

ECE 2713 Design Project Solution

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Final Exam Solutions June 7, 2004

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

Sampling and Reconstruction of Analog Signals

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Armstrong Atlantic State University Engineering Studies MATLAB Marina Sound Processing Primer

Problem Set 1 (Solutions are due Mon )

Discrete Fourier Transform (DFT)

STANFORD UNIVERSITY. DEPARTMENT of ELECTRICAL ENGINEERING. EE 102B Spring 2013 Lab #05: Generating DTMF Signals

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

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

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT.

Final Exam Practice Questions for Music 421, with Solutions

ECE 2713 Homework 7 DUE: 05/1/2018, 11:59 PM

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Fourier Transform Analysis of Signals and Systems

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

ENGR 210 Lab 12: Sampling and Aliasing

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

Digital Signal Processing Lecture 1 - Introduction

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

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

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

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

Aliasing. Consider an analog sinusoid, representing perhaps a carrier in a radio communications system,

Frequency Domain Representation of Signals

ELEC3104: Digital Signal Processing Session 1, 2013

Waveshaping Synthesis. Indexing. Waveshaper. CMPT 468: Waveshaping Synthesis

CS3291: Digital Signal Processing

Brief Introduction to Signals & Systems. Phani Chavali

Communication Channels

FFT Analyzer. Gianfranco Miele, Ph.D

Lab 0: Introduction to TIMS AND MATLAB

F I R Filter (Finite Impulse Response)

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

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

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

Wireless Communication

Charan Langton, Editor

EBU5375 Signals and Systems: Filtering and sampling in Matlab. Dr Jesús Requena Carrión

Multirate Digital Signal Processing

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

Chapter 9. Chapter 9 275

Principles of Communications ECS 332

Digital Signal Processing +

Basic Signals and Systems

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

LECTURER NOTE SMJE3163 DSP

ECE 5650/4650 MATLAB Project 1

ELT COMMUNICATION THEORY

Multirate DSP, part 3: ADC oversampling

Lecture 3 Complex Exponential Signals

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

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

Signals and Filtering

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

ECEGR Lab #8: Introduction to Simulink

5650 chapter4. November 6, 2015

Multirate DSP, part 1: Upsampling and downsampling

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

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

ECE 429 / 529 Digital Signal Processing

Introduction to signals and systems

Linear Time-Invariant Systems

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

Filters. Phani Chavali

Sound synthesis with Pure Data

A102 Signals and Systems for Hearing and Speech: Final exam answers

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

1. Clearly circle one answer for each part.

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

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

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

DIGITAL SIGNAL PROCESSING. Chapter 1 Introduction to Discrete-Time Signals & Sampling

George Mason University ECE 201: Introduction to Signal Analysis

Communications I (ELCN 306)

Lecture 4 Frequency Response of FIR Systems (II)

Fourier Theory & Practice, Part I: Theory (HP Product Note )

Transcription:

Signal Processing 0 Introduction One of the premiere uses of MATLAB is in the analysis of signal processing and control systems. In this chapter we consider signal processing. The final chapter of the text considers control systems. To efficiently support signal processing and control system problem solving in MATLAB requires the Signal Processing Toolbox and Control System Toolbox respectively. The student edition of MATLAB 5.0 fully supports both of these toolboxes. Two forms of signal processing are: Analog or continuous-time signal processing (ASP), using analog electronic circuits Digital signal processing (DSP), using discrete-time algorithms running on computers In this chapter of the notes we will deviate from the text Chapter 0 and focus more on specific applications of signal processing Chapter 0: Introduction 0

Sinusoidal Signals One of the simplest signals that we deal with in both the continuous and discrete time domains is the cosine function x c () t = A cos( 2πf t + φ ), t (0.) A signal composed of a single sinusoid has three specific attributes: The sinusoid has amplitude A (units of voltage or current) The sinusoid oscillates with frequency f (units of cycles per second or Hz if t has units of seconds) The sinusoid is phase shifted by φ (units of radians or degrees) x c () t is known as a time-domain representation of a signal A second, and equally useful representation of a signal, is the frequency domain Frequency Domain The frequency domain representation of a single sinusoid consists of both an amplitude spectrum and a phase spectrum The amplitude spectrum is a plot of signal amplitude versus frequency The phase spectrum is a plot of signal phase versus frequency Chapter 0: Sinusoidal Signals 0 2

Formally, the spectrum of x c () t, denoted X c () f, is obtained by taking the Fourier transform, i.e., X c () f = x c t ()e j2πft dt (0.2) For a sinusoid the complexity of (0.2) is not really needed Intuitively, the spectrum of a single sinusoid is as shown below A x c () t cos φ t X c () f A Amplitude Spectrum A Period T = --- f Time Domain Freq. Domain 0 f f, Hz Chapter 0: Sinusoidal Signals 0 3

We now extend the above frequency domain intuition to a signal composed of two sinusoids x c () t = A cos( 2πf t + φ ) + A 2 cos ( 2πf 2 t + φ 2 ) (0.3) # A # T = --- A f 2 x c () t T 2 = --- f 2 t t t X c () f Amplitude Spectrum A A 2 Time Domain Freq. Domain f, Hz 0 f f 2 Chapter 0: Sinusoidal Signals 0 4

Discrete-Time Sinusoids Digital signal processing of a continuous-time or analog signals can be accomplished by uniformly sampling x c () t every T seconds, e.g., xn [ ] = x c ( nt) = A cos( 2πf nt+ φ ), n (0.4) A discrete-time or digital signal is just a sampled version of a corresponding analog signal A single sinuoid is again characterized by three attributes Actually there is now a fourth attribute, T, the sampling period or its inverse, the sampling frequency = T To avoid aliasing, a condition that occurs when analog signals are sampled, we must have the sampling frequency, f s, greater than twice the highest frequency component contained in x c () t If we violate this condition the higher frequencies of the signal, those exceeding f s 2, will alias as lower frequencies in the frequency range 0 to f s 2 Typically a digital signal is stored on memory as a data record or processed in real-time following analog-to-digital conversion An N-point data record is typically stored with starting index 0 and ending index N, e.g., when captured from an analog signal we might have xn [ ] = x c ( nt), n = 0,,, N f s (0.5) Chapter 0: Sinusoidal Signals 0 5

In MATLAB we typically display a discrete-time or digital signal using the stem() function Popular sampling frequencies used in PC sound systems are submultiples of the compact disc (CD) audio standard which has f s = 44.kHz Example: Discrete-time Sinusoid Generation Suppose we wish to created a sampled sinusoid which has a frequency of 000 Hz, is sampled at 44,00/4 =,025 Hz, and has duration of approximately 2 seconds A 2 second record will contain 2 025 = 22050 samples MATLAB Code to Generate the sinusoid:» % Create a signal index first» N = 22050;» n = 0:N-;» x = cos(2*pi*000*n/025);» % Plot a small of portion of the signal» stem(n(:50),x(:50))» title(' khz Sinusoid with fs =.025 khz',... 'fontsize',8)» ylabel('amplitude','fontsize',4)» xlabel('sequence Index - n','fontsize',4) Assuming your computer is equipped with a sound card, this 2 second record can be played using the MATLAB function sound(x,fs)» Play the sound vector x with fs = 025 Hz» sound(x,025) Chapter 0: Sinusoidal Signals 0 6

khz Sinusoid with fs =.025 khz 0.8 0.6 0.4 Amplitude 0.2 0-0.2-0.4-0.6-0.8-0 5 0 5 20 25 30 35 40 45 50 Sequence Index - n Note: Each sample in the above signal is spaced by T = / 025 sec with respect to the underlying analog signal Discrete-Time Sinusoids in the Frequency Domain A frequency domain representation of a discrete-time signal can be obtained through the use of the fast Fourier transform (FFT), formally defined for an N-point data record as N -------------- j2πkn N Xk [ ] = xn [ ]e, k = 0,,, N n = 0 (0.6) Chapter 0: Sinusoidal Signals 0 7

In MATLAB this is accomplished using fft(n) or fft(x,n) where N is the number of points used in the FFT If the vector x has length greater than N points, the record x is truncated to N points If the vector x has length less than N points, the record is zero padded (zeros are appended to x) to length N The function X=fft(x,N) returns a length N complex vector, X, whose magnitude is proportional to the amplitude spectrum of xn [ ] and whose angle is the phase spectrum of xn [ ] Each index of X corresponds to an analog frequency of f k = in the spectrum of k ---f N s, 0 k N x c () t, that is X c () f Example: Continuation of the single sinusoid example (0.7) Using MATLAB the spectrum of the vector x used in the previous example is» X = fft(x(:28),024); % N=28pts padded to 024pts» % Create a frequency axis vector on 0 to fs/2» f = [0:52]*025/024;» plot(f,abs(x(:53)))» grid» title(' khz Sinusoid Spectrum (fs =.025 khz)',... 'fontsize',8)» ylabel(' X(k) ','fontsize',4)» xlabel('index k Scaled to Frequency in Hz',... 'fontsize',4) Chapter 0: Sinusoidal Signals 0 8

70 khz Sinusoid Spectrum (fs =.025 khz) 60 X[k] 50 40 30 A Single Spectral Line at 000 Hz as Expected 20 0 0 0 000 2000 3000 4000 5000 6000 Index k Scaled to Frequency in Hz Note: The amplitude is scaling does not match the singlesided spectrum of a sinusoid shown earlier unless we divide by the record length over two, i.e., plot Xk [ ] 2 N Transfer Functions and Filters Both analog and digital signals can be processed by filters to produce modified signals. The MATLAB signal processing toolbox contains a vast array of filter design functions. Chapter 0: Transfer Functions and Filters 0 9

Analog Frequency Response (Transfer) Functions Consider a sinusoid passing through an analog filter Acos( 2πf o t + θ) Analog Bcos ( 2πf o t + θ + φ ) x c () t Filter y c () t A sinusoid is returned at the output, but the amplitude and phase are modified by the filters frequency response function A B θ θ + φ In the frequency domain a filter is described as having a frequency response function (a complex function of frequency) which tells us the amplitude gain and phase shift imparted to a sinusoidal signal at a particular frequency If the analog filter depicted above has frequency response function H c () f, then the output sinusoid is related to the input sinuoid and H c () f as follows y c () t = AH c ( f o ) cos [ 2πf o t + θ + H c () f ] (0.8) The four main filter types are lowpass, highpass, bandpass, and bandstop f c f c Lowpass f Highpass f B f o f o Bandpass f Bandstop f Chapter 0: Transfer Functions and Filters 0 0

Analog lowpass filters are usually designed to meet a set of amplitude response requirements in the frequency domain Lowpass Filter A p Transition Band H c () f A s 0 0 Passband f p f s Stopband f The actual filter amplitude response, H c () f, just needs to fall within the white space A p is the minimum filter gain in the passband A s is the maximum filter gain in the stopband MATLAB has a collection of functions in the signal processing toolbox that designs analog filters in transfer function form, i.e., Hf () = b 0 s n + b s n + + b ---------------------------------------------------------- n a 0 s n + a s n + + a n Digital Frequency Response Functions In the discrete-time domain filters can also be designed The same basic concepts apply (0.9) When a discrete-time sinusoid is applied to a linear filter, s = j2πf Chapter 0: Transfer Functions and Filters 0

the output is a sinusoid of the same frequency, but amplitude attenuated and phase shifted Given a digital filter has frequency response Hf () we can write for xn [ ] = Acos ( 2πf o nt) that yn [ ] = AHf ( o ) cos [ 2πf o nt + θ + Hf ( o ) ] Applications Compact Disc Digital Audio (0.0) Digital audio, CD digital audio, relies on real-time digital signal processing, coding theory, and control theory to function CD recording frame format CD sync subcode Data (96 bits) Data (96 bits) Parity (32 bits) The raw input rate for stereo is.4 Mb/s ( 2 6 4400), but with overhead this is increased to 4.328 Mb/s An hour of music requires about 5.5 Billion bits Parity (32 bits) Maximum playing time is about 74 minutes, enough for Beethoven s 9th symphony Chapter 0: Applications 0 2

Communication Systems Consider the commercial broadcast frequency spectrum Frequency Spectrum AM Radio FM stereo receiver TV 2-6 535 605 khz 54-88 MHz FM Radio 88. 7.9 MHz TV 7-3 74 26 MHz Spectrum at Discriminator Output L + R 9 khz Pilot ( L R ) cos ( 2πf sc ) 0 5 9 23 38 53 LPF 0-5 khz L + R + Σ + L Limiter Discriminator BPF ~9 khz BPF 23-53kHz Demodulator + - Σ L R R Chapter 0: Applications 0 3

Bat Echo Location Signal Processing Bat echo-locate using frequency chirps above the human hearing range To allow humans to listen to bat echo location we must first frequency translate the bat chirp frequency spectrum down to the human hearing range Bat Echo Location Human Hearing 0 6 30 00 f, khz Frequency Translate a Portion into Human Range The front-end to a system for processing bat chirps is a microphone array The output is an audio signal that can be recorded on magnetic tape (a cassette) and later digitized using a PC audio system Chapter 0: Applications 0 4