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

Similar documents
Armstrong Atlantic State University Engineering Studies MATLAB Marina Sound Processing Primer

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

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

EE 464 Short-Time Fourier Transform Fall and Spectrogram. Many signals of importance have spectral content that

DCSP-10: DFT and PSD. Jianfeng Feng. Department of Computer Science Warwick Univ., UK

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

Limitations of Sum-of-Sinusoid Signals

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

Discrete Fourier Transform (DFT)

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

Performing the Spectrogram on the DSP Shield

EE123 Digital Signal Processing

URBANA-CHAMPAIGN. CS 498PS Audio Computing Lab. Audio DSP basics. Paris Smaragdis. paris.cs.illinois.

Signal Processing Summary

SAMPLING THEORY. Representing continuous signals with discrete numbers

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

Digital Signal Processing

Signal Processing. Introduction

Fourier Signal Analysis

Moving from continuous- to discrete-time

It is the speed and discrete nature of the FFT that allows us to analyze a signal's spectrum with MATLAB.

Outline. Introduction to Biosignal Processing. Overview of Signals. Measurement Systems. -Filtering -Acquisition Systems (Quantisation and Sampling)

George Mason University Signals and Systems I Spring 2016

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

ECE 201: Introduction to Signal Analysis

ELECTRONOTES APPLICATION NOTE NO Hanshaw Road Ithaca, NY Nov 7, 2014 MORE CONCERNING NON-FLAT RANDOM FFT

Laboratory Assignment 4. Fourier Sound Synthesis

Signal Processing First Lab 20: Extracting Frequencies of Musical Tones

Lab 0: Introduction to TIMS AND MATLAB

ECE503: Digital Signal Processing Lecture 1

Data Acquisition Systems. Signal DAQ System The Answer?

Audio Restoration Based on DSP Tools

DSP First. Laboratory Exercise #11. Extracting Frequencies of Musical Tones

Digital Signal Processing

ELT COMMUNICATION THEORY

ENGR 210 Lab 12: Sampling and Aliasing

Digital Signal Processing

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

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

Spectrogram Review The Sampling Problem: 2π Ambiguity Fourier Series. Lecture 6: Sampling. ECE 401: Signal and Image Analysis. University of Illinois

Short-Time Fourier Transform and Its Inverse

LAB 2 Machine Perception of Music Computer Science 395, Winter Quarter 2005

DFT: Discrete Fourier Transform & Linear Signal Processing

EE 311 February 13 and 15, 2019 Lecture 10

CS3291: Digital Signal Processing

Fourier transforms and series

Final Exam Solutions June 7, 2004

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering

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

ELEC3104: Digital Signal Processing Session 1, 2013

Short Time Fourier Transform *

Digital Signal Processing Fourier Analysis of Continuous-Time Signals with the Discrete Fourier Transform

6.S02 MRI Lab Acquire MR signals. 2.1 Free Induction decay (FID)

Fourier Methods of Spectral Estimation

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

Project 0: Part 2 A second hands-on lab on Speech Processing Frequency-domain processing

Introduction to signals and systems

Lab 4 Fourier Series and the Gibbs Phenomenon

Principles of Communications ECS 332

Lecture 5: Sinusoidal Modeling

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

Time-Frequency analysis of biophysical time series

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

Final Exam Solutions June 14, 2006

Keywords: spectral centroid, MPEG-7, sum of sine waves, band limited impulse train, STFT, peak detection.

Frequency Domain Representation of Signals

FFT analysis in practice

Signals and Systems Lecture 6: Fourier Applications

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

Use Matlab Function pwelch to Find Power Spectral Density or Do It Yourself

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

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.

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37

Experiments #6. Convolution and Linear Time Invariant Systems

Sampling and Reconstruction of Analog Signals

Project I: Phase Tracking and Baud Timing Correction Systems

6.02 Fall 2013 Lecture #14

Chapter 6 CONTINUOUS-TIME, IMPULSE-MODULATED, AND DISCRETE-TIME SIGNALS. 6.6 Sampling Theorem 6.7 Aliasing 6.8 Interrelations

Discrete Fourier Transform, DFT Input: N time samples

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

EE 422G - Signals and Systems Laboratory

6.02 Fall 2012 Lecture #13

Lecture 7 Frequency Modulation

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

Topic 6. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

FFT Analyzer. Gianfranco Miele, Ph.D

Signal Processing Toolbox

ECEn 487 Digital Signal Processing Laboratory. Lab 3 FFT-based Spectrum Analyzer

Speech Signal Analysis

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

EE 123: Digital Signal Processing Spring Lecture 15 March 6

Chapter 7. Frequency-Domain Representations 语音信号的频域表征

Lab 3 FFT based Spectrum Analyzer

applications John Glover Philosophy Supervisor: Dr. Victor Lazzarini Head of Department: Prof. Fiona Palmer Department of Music

REAL-TIME PROCESSING ALGORITHMS

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

Waveforms and Spectra in NBFM Receiver

Multirate Digital Signal Processing

Transcription:

From Fourier Series to Analysis of Non-stationary Signals - VII prof. Miroslav Vlcek November 23, 2010

Contents Short Time Fourier Transform 1 Short Time Fourier Transform 2

Contents Short Time Fourier Transform 1 Short Time Fourier Transform 2

An overview of Fourier transforms continuous in time discrete in time periodic in frequency in frequency x(t) = 1 X(jω)e jωt dω 2π x(n) = T +π/t X(e jωt )e jkωt dω 2π π/t continuous X(jω) = e jωt x(t)dt X(e jωt ) = x(n)e jkωt n= Fourier transform Fourier transform t = nt in frequency in time x(t) = k= X(k)e jkω 0 t x(n) = 1 N 1 X(k)e (j2π/n)kn N k=0 discrete periodic X(k) = ω π/ω 0 0 jnω x(t)e 0 t dt 2π π/ω 0 N 1 X(k) = x(n)e (j2π/n)kn n=0 Fourier series Discrete Fourier transform

What is wrong with Fourier Transform? Lets consider basis functions: sin(ωt), cos(ωt) and δ(t) support region in time in frequency sin(ωt) (, ) 0 cos(ωt) (, ) 0 δ(t) 0 (, ) The basis functions sin(ωt) and cos(ωt) are not localized in time! The δ(t) is not localized in frequency! We have learnt to localize a signal in time domain by windowing short time Fourier transform

Short Time Fourier Transform When sampling an audio signal at a sampling rate 44.1 khz... 1 hour of stereophonic music would be 44100 2 60 60 = 317520000 samples! If we want to compute DFT, the closest power-of-two FFT is 2 28 = 268435456 per channel. A better approach is to break the long signal into small segments and analyze each one with FFT short time Fourier transform

Short Time Fourier Transform Assume that x(m) is an infinitely long sequence in order to localize energy in time and frequency we segment the signal into short-time pieces and calculate DFT of each one sampled STFT for a window defined in the region 0 m M 1 is given by X(k,lL) = M 1 m=0 ( x(ll m)w(m) exp j2π km N )

Short Time Fourier Transform

Short Time Fourier Transform

In MATLAB the command spectrogram(x,window,noverlap,nfft,fs, yaxis ) performs short-time Fourier transform and plots a 2D frequency-time diagram, where x is the signal specified by vector x window is a Hamming window of length nfft noverlap is the number of overlapping segments that produces 50% overlap between segments

nfft is the FFT length and is the maximum of 256 or the next power of 2 greater than the length of each segment of x fs is the sampling frequency, which defaults to normalized frequency using yaxis displays frequency on the y-axis and time on the x-axis We also use command colorbar which appends a color scale to the current axes.

Chirp signal analysis sin(2π(f 0 +αt))

MATLAB project Spectrogram I 1 Start MATLAB. Load in the audio signal with commands filename = flute-c4.wav ; [x1 sr1] = wavread(filename); 2 The sampling rate is 11025 Herz, and the signal contains 36 250 samples. If we consider this signal as sampled on an interval (0, T), what is the time duration of the flute sound? 3 Use command soundsc(x1,sr1) to obtain flute sound click to play 4 Make resampling of the audio signal by f r = 4000[Hz] and write the sound file to disk using wavwrite(x2, sr2, flute-resampled.wav );

MATLAB project Spectrogram I Flute 0.05 0 0.05 0 0.5 1 1.5 2 2.5 3 3.5 Time [s] Resampled flute 0.05 0 0.05 0 0.5 1 1.5 2 2.5 3 3.5 Time [s])

MATLAB project Spectrogram I 5 Compute the DFT of the signal with X1 = fft(x1(1:1024)); and X2 = fft(x2(1:1024)); 6 DFT of real-valued signals is always symmetric around sr/2 so we only need to plot the first half. Display the magnitude of the Fourier transform using plot(f1(1:end/2+1), abs(x1(1:end/2+1))) 7 Q: What is the approximate fundamental frequency of the flute note C4? 8 A: Find the bin corresponding to the first peak in the magnitude spectrum.

MATLAB project Spectrogram I 9 You can use a systematic way to find the frequency of the peaks in spectrum abs(x2)using following commands: % find local maxima mag = abs(x2); mag = mag(1:end/2+1); peaks = (mag(1:end-2) < mag(2:end-1)) & mag(2:end-1) > mag(3:end); 10 Then evaluate the peaks at corresponding frequencies above a threshold: peaks = peaks & mag(2:end-1) > 0.5; fmax=f2(peaks)

MATLAB project Spectrogram I 1.4 Flute 1.2 1 Magnitude 0.8 0.6 0.4 0.2 0 0 1000 2000 3000 4000 5000 6000 Frequency (Hz) 7 Resampled flute 6 5 Magnitude 4 3 2 1 0 0 500 1000 1500 2000 2500 Frequency (Hz)

MATLAB project Spectrogram I 11 Finally we will use Spectrogram with folowing specifications: nwin = 512; % samples of a window noverlap = 256; % samples of overlaps nfft = 512; % samples of fast Fourier transform spectrogram(x1, nwin, noverlap, nfft, sr2, yaxis ); colorbar print -djpeg90 figure-spect 12 Carefully study the options for the spectrogram using help!

MATLAB project Spectrogram I 2000 Frequency (Hz) 1800 1600 1400 1200 1000 800 600 400 200 50 60 70 80 90 100 110 120 130 140 0 0.5 1 1.5 2 2.5 3 Time

MATLAB project Spectrogram II 1 Construct a signal f of two sinusoids on interval t < 0, 2 > sampled at 1 khz t=[0:1999]/1000; f=cos(2*pi*137*t)+cos(2*pi*147*t); 2 Compute the DFT of f and display its magnitude in time and frequency domain. 3 Use spectrogram routine spectrogram(f,512,510,512,1000, yaxis ); colorbar

MATLAB project Spectrogram II

MATLAB project Spectrogram II 1 Construct a signal f with varying frequency within interval t < 0, 2 > sampled at 1 khz t=[0:1999]/1000; arg=100+20*cos(2*pi*t); f=cos(2*pi*arg.*t); 2 Compute the DFT of f and display its magnitude in time and frequency domain. 3 Use spectrogram routine spectrogram(f,128,120,512,1000, yaxis ); colorbar

MATLAB project Spectrogram II