Chapter 4 The Frequency Domain of Signals and Systems.

Slides:



Advertisements
Similar presentations
DCSP-12 Jianfeng Feng
Advertisements

1 Chapter 16 Fourier Analysis with MATLAB Fourier analysis is the process of representing a function in terms of sinusoidal components. It is widely employed.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
Review of Frequency Domain
Chapter 1 -Discrete Signals A Sampled or discrete time signal x[n] is just an ordered sequence of values corresponding to the index n that embodies the.
Chapter 8: The Discrete Fourier Transform
EECS 20 Chapter 10 Part 11 Fourier Transform In the last several chapters we Viewed periodic functions in terms of frequency components (Fourier series)
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
Chapter 12 Fourier Transforms of Discrete Signals.
About this Course Subject: Textbook Reference book Course website
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps.
CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling.
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
Systems: Definition Filter
Over-Sampling and Multi-Rate DSP Systems
Discrete-Time Fourier Series
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Numerical algorithms for power system protection Prof. dr. sc. Ante Marušić, doc. dr. sc. Juraj Havelka University of Zagreb Faculty of Electrical Engineering.
Discrete-Time and System (A Review)
Fourier Analysis of Systems Ch.5 Kamen and Heck. 5.1 Fourier Analysis of Continuous- Time Systems Consider a linear time-invariant continuous-time system.
DTFT And Fourier Transform
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
GCT731 Fall 2014 Topics in Music Technology - Music Information Retrieval Overview of MIR Systems Audio and Music Representations (Part 1) 1.
Chapter 2 Discrete-Time Signals and Systems
Chapter 2: Discrete time signals and systems
Fourier Series Summary (From Salivahanan et al, 2002)
TELECOMMUNICATIONS Dr. Hugh Blanton ENTC 4307/ENTC 5307.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Introduction to the IEEE Derivation of the DFT Relationship to DTFT DFT of Truncated.
1 The Fourier Series for Discrete- Time Signals Suppose that we are given a periodic sequence with period N. The Fourier series representation for x[n]
Digital Signal Processing – Chapter 10
EE104: Lecture 5 Outline Review of Last Lecture Introduction to Fourier Transforms Fourier Transform from Fourier Series Fourier Transform Pair and Signal.
Systems (filters) Non-periodic signal has continuous spectrum Sampling in one domain implies periodicity in another domain time frequency Periodic sampled.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
Course Outline (Tentative) Fundamental Concepts of Signals and Systems Signals Systems Linear Time-Invariant (LTI) Systems Convolution integral and sum.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Chapter 5 Finite-Length Discrete Transform
Chapter 7 Finite Impulse Response(FIR) Filter Design
Fourier Analysis of Signals and Systems
Signals and Systems Prof. H. Sameti Chapter 4: The Continuous Time Fourier Transform Derivation of the CT Fourier Transform pair Examples of Fourier Transforms.
Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.
Lecture#10 Spectrum Estimation
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Derivation of the DFT Relationship to DTFT DFT of Truncated Signals.
Fourier Representation of Signals and LTI Systems.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
1 Roadmap SignalSystem Input Signal Output Signal characteristics Given input and system information, solve for the response Solving differential equation.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Math for CS Fourier Transforms
Hülya Yalçın ©1 Fourier Series. Hülya Yalçın ©2 3.
Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT
Chapter 4 Discrete-Time Signals and transform
CE Digital Signal Processing Fall Discrete-time Fourier Transform
Speech Signal Processing
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
SIGNALS PROCESSING AND ANALYSIS
Outline Introduction Signal, random variable, random process and spectra Analog modulation Analog to digital conversion Digital transmission through baseband.
EE Audio Signals and Systems
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
UNIT V Linear Time Invariant Discrete-Time Systems
Chapter 8 The Discrete Fourier Transform
Lecture 17 DFT: Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Lec.6:Discrete Fourier Transform and Signal Spectrum
Electrical Communications Systems ECE Spring 2019
Electrical Communication Systems ECE Spring 2019
Fourier Transforms of Discrete Signals By Dr. Varsha Shah
Electrical Communications Systems ECE
Presentation transcript:

Chapter 4 The Frequency Domain of Signals and Systems

Objectives Define the Fourier transform and explain some of its important properties. Define the discrete-time Fourier transform (DTFT) and demonstrate that it gives its maximum response at the digital frequencies contained in a discrete time-domain signal. Prove the three key properties of the DTFT: linearity, periodicity, and time-delay. Demonstrate the replication of the frequency content of a signal at integer multiples of the sampling frequency Demonstrate the concept of signal windowing in spectral analysis and show how different windows affect the resolution and side-lobe amplitudes of the DTFT. Explain the limitations of the DTFT and the “uncertainty principle” in spectral analysis. Define signal power and energy and demonstrate their methods of calculation in the time domain and frequency domain. Show how to simulate signals with random noise and demonstrate the spectral properties of Gaussian noise power in discrete-time signals. Derive the frequency response of a general linear time-invariant DSP system and show that the frequency response is the value of the z-domain transfer function on the unit circle in the complex plane.

Fourier’s Theorem Fourier’s theorem states that any continuous periodic signal can be represented by an infinite sum of harmonically related sinusoids. The coefficients (a,b,c) represent the frequency content of the signal at discrete frequencies.

The Fourier Coefficients of a Square Pulse Train

Computational Analysis of a Square Pulse Train (Custom M-file “pulse_train”) >> w=1; %Set the pulse width in ms >> fmax=3500; %Set the maximum harmonic frequency >> R1=4; %Set the period-to-width ratio for each case >> R2=8; >> R3=32; >> [c1,f1]=pulse_train(fmax,w,R1); %Use the M-file to compute the Fourier coefficients >> [c2,f2]=pulse_train(fmax,w,R2); % Case 2 >> [c3,f3]=pulse_train(fmax,w,R3); % Case 3 >> subplot(3,1,1),stem(f1,c1),title('Period to Width Ratio = 4'); >> subplot(3,1,2),stem(f2,c2),title('Period to Width Ratio = 8'); >> subplot(3,1,3),stem(f3,c3),title('Period to Width Ratio = 32'); >> xlabel('Harmonic Frequency - Hz') As the period-to-width ratio increases the frequency “density” of the coefficients increases. In the limit, the coefficients become a continuous function of frequency.

Fourier Transform The pulse train analysis suggests that for a general non-periodic signal, a continuous function of frequency represents the “frequency content” of the continuous signal. Definition of the Fourier transform:

The Discrete-Time Fourier Transform (DTFT) The DTFT is the Fourier transform for discrete-time signals The DTFT requires a finite causal signal for a practical calculation. Therefore, the result depends on signal length, N The DTFT is a continuous complex function of Ω Calculation of the DTFT requires N terms for a discrete Ω. Thus, practical calculations require computer assistance. Efficient computation of the DTFT is an important problem in DSP (e.g., the FFT or “Fast Fourier Transform”)

Example Calculation Calculate the DTFT for the signal x[n] = [1,-1,1,-1] at the digital frequencies of π and π/2. For Ω = π: For Ω = π/2

Example Calculation: A Short Sinusoid at 3 Frequencies >> n=0:7; >> omega1=pi/2; >> x=cos(omega1*n); >> stem(n,x), title('8 Samples of a Sinusoid of Frequency pi/2') >> xlabel('Index, n') >> omega=[0,pi/2,pi]; % Our three values of Ω >> X=[0,0,0]; % We initialize the vector for X >> for k=1:3 % For each value of omega >> for m=1:8 % For each value of the signal % Compute the DTFT summation for the kth value of Ω >> X(k)=X(k)+x(m)*exp(-j*omega(k)*(m-1)); >> end >> figure,plot(omega/pi,abs(X)) >> title('Three Points of the DTFT') >> ylabel('Magnitude of the DTFT') >> xlabel('Digital Frequency in Units of Pi')

Example Calculation: A Short Sinusoid at 3 Frequencies

Example Calculation: A Short Sinusoid at 512 Frequencies >> dtft_demo(x,0,pi,512); % Custom M-file

Example Calculation: A Long Sinusoid at 512 Frequencies >> n=0:99; % create a signal with 100 samples >> omega1=pi/2; >> x=cos(omega1*n); >> dtft_demo(x,0,pi,512);title('DTFT of a Sinusoid, Omega = pi/2, N = 100')

Properties of the DTFT Linearity Suppose y[n] = x 1 [n] + x 2 [n] The DTFT of a linear combination of signals is the same linear combination of the DTFT’s of the individual signals.

Properties of the DTFT Periodicity The DTFT is periodic in the Ω frequency domain with period 2π

Properties of the DTFT Time-Delay Suppose the DTFT of x[n] is X(Ω) and the DTFT of x[n-k] is X k (Ω) The DTFT of a signal delayed by k steps is e -jkΩ times the DTFT of the un-delayed signal

Replication of Spectral Content in the Frequency Domain (Periodicity of the DTFT) >> [asig,tt]=analog([50,120],[1,0.5],500,32000); >> d1000=sample(tt,asig,1000); >> d2000=sample(tt,asig,2000); >> dtft_demof(d1000,-500,500,512,1000); >> figure,subplot(2,1,1), dtft_demof(d1000,0,8000,16*512,1000); title('Fs = 1000 Hz') >> subplot(2,1,2), dtft_demof(d2000,0,8000,16*512,2000); title('Fs = 2000 Hz') Replication at integer multiples of the sampling frequency

Effects of Signal Length and Windowing Frequency Resolution >> N1=0:9; >> N2=0:19; >> N3=0:39; >> omega=pi/2; >> x1=cos(omega*N1); >> x2=cos(omega*N2); >> x3=cos(omega*N3); >> [X1,f]=dtft_demo(x1,0,pi,512); >> [X2,f]=dtft_demo(x2,0,pi,512); >> [X3,f]=dtft_demo(x3,0,pi,512); >> subplot(3,1,1),plot(f/pi,(abs(X1)/max(abs(X1)))),title('DTFT - N=10') >> subplot(3,1,2),plot(f/pi,(abs(X2)/max(abs(X2)))),title('DTFT - N=20') >> subplot(3,1,3),plot(f/pi,(abs(X3)/max(abs(X3)))),title('DTFT - N=40') >> xlabel('X Axis - Frequency in Units of Pi') Each doubling of the signal length reduces the main lobe width by half

Effects of Signal Length and Windowing Gibbs Phenomenon In all cases, the rectangular window (abrupt truncation of the signal) results in side lobes (Gibbs phenomenon)

Effects of Signal Length and Windowing Tapering Window: The Time Domain >> x=analog(100,1,100,4000); % 100 Hz sinusoid, 100 ms long, Fs=4kHz >> xw=x.*hamming(length(x))'; % The Hamming window is given by “hamming” >> subplot(3,1,1),plot(x),title('Rectangular Windowed Sinusoid, N=401') >> subplot(3,1,2),plot(hamming(length(x))),title('Hamming Window, N=401') >> subplot(3,1,3),plot(xw),title('Hamming Windowed Sinusoid, N=401') >> xlabel('X Axis - Sample Index') The window function (Hamming) tapers the abrupt truncation of the signal but preserves its frequency characteristics

Effects of Signal Length and Windowing Tapering Window: The Frequency Domain >> N=0:39; >> omega=pi/2; >> x=cos(omega*N); >> xw=x.*hamming(length(x))'; >> [X,f]=dtft_demo(x,0,pi,512); >> [XW,f]=dtft_demo(xw,0,pi,512); >> subplot(2,1,1),plot(f/pi,abs(X)/max(abs(X))); >> title('DTFT of Rectangular Windowed Signal, N=40'); >> subplot(2,1,2),plot(f/pi,abs(XW)/max(abs(XW))); >> title('DTFT of Hamming Windowed Signal, N=40'); >> xlabel('X Axis - Frequency in Units of Pi') The Hamming window suppresses the side lobes but degrades the resolution of the main lobe

Effects of Signal Length and Windowing Hamming and Blackman Tapering Windows >> xb=x.*blackman(length(x))'; >> [XB,f]=dtft_demo(xb,0,pi,512); >> subplot(2,1,1),plot(f/pi,20*log10(abs(XW)/max(abs(XW)))) >> title('Hamming Window') >> axis([0,1,-100,0]) >> subplot(2,1,2),plot(f/pi,20*log10(abs(XB)/max(abs(XB)))) >> title('Blackman Window') 1.The Blackman window suppresses side lobes further, but… 2.The Blackman window degrades resolution to a greater extent, r = 2.6

Effects of Signal Length and Windowing Comparison of Windows >> subplot(3,1,1),plot(f/pi,20*log10(abs(X)/max(abs(X)))) >> axis([0,1,-100,0]) >> subplot(3,1,2),plot(f/pi,20*log10(abs(XW)/max(abs(XW)))) >> axis([0,1,-100,0]) >> subplot(3,1,3),plot(f/pi,20*log10(abs(XB)/max(abs(XB)))) Rectangular Window Hamming Window Blackman Window

Spectral Analysis Problem: What is the minimum number of samples required to resolve the spectral components of the signal s(t)? Assume a sampling frequency of 10 kHz. The spectral components are separated by 500 Hz and the 2500 Hz component is -50 dB below the other two components. Pick 300 Hz as the desired resolution. A Blackman window would be required to suppress the side lobes more than 50 dB

Spectral Analysis The Importance of Correct Windowing >> x=analog([ ],[ ],17.3,10000); >> xh=x.*hamming(length(x))'; % Window the signal with a Hamming window >> xb=x.*blackman(length(x))'; % Window the signal with a Blackman window >> [Xh,f]=dtft_demof(xh,0,5000,512,10000); % DTFT of the Hamming signal >> [Xb,f]=dtft_demof(xb,0,5000,512,10000); % DTFT of the Blackman signal >> subplot(2,1,1),plot(f,20*log10(abs(Xh)/max(abs(Xh)))), axis([ ]) >> title('DTFT - Hamming Window') >> subplot(2,1,2),plot(f,20*log10(abs(Xb)/max(abs(Xb)))), axis([ ]) >> title('DTFT - Blackman Window') >> xlabel('Hz') The Hamming window does not suppress the side lobes sufficiently to resolve the weak component at the correct relative amplitude (-50 dB) The signal length is 173

The Discrete Fourier Transform (DFT) The DFT is a discrete transform X[k] of a digital signal rather than a continuous transform like X(Ω) The length of the DFT is equal to the length of the signal The DFT is defined always over the interval Ω = [0,2π] The DFT turns out to be a sample of the DTFT of x[n] over the interval [0,2π].

The Discrete Fourier Transform (DFT) >> n1=0:10; >> n2=0:40; >> f=pi/4; >> y1=cos(f*n1); >> y2=cos(f*n2); >> subplot(2,1,1),stem(n1,y1);title('Short Signal, y1'),xlabel('Sample') >> subplot(2,1,2),stem(n2,y2);title('Long Signal, y2'),xlabel('Sample') >> [X1,omega1]=dft_demo(y1); >> [X2,omega2]=dft_demo(y2); >> subplot(2,1,1),stem(omega1/pi,abs(X1));title('DFT of y1') >> subplot(2,1,2),stem(omega2/pi,abs(X2));title('DFT of y2') >> xlabel('X axis: Digital Frequency in of pi')

The Discrete Fourier Transform (DFT) >> [X1_dtft,omega_dtft]=dtft_demo(y1,0,2*pi,512); >> plot(omega_dtft/pi,abs(X1_dtft)) >> hold >> stem(omega1/pi,abs(X1), 'k') >> legend('DTFT of x1','DFT of x1') >> title('Comparison of DTFT and DFT for Signal x1') >> hold off The DFT of a signal is a sample of the DTFT in the interval [0,2π]

Inverse Transforms Inverse DTFT Inverse DFT

Energy and Power in Signals Analog signals physically transport energy between two points to do useful work (for example, from an amplifier to a speaker). Digital signals carry information but not physical energy (digital signals are simply numbers that represent analog signals). We seek something that mathematically represents energy and power (rate of change of energy) for digital signals that is computable from their numerical values.

Power and Energy in Analog Signals For a sinusoidal voltage with amplitude A, the power dissipated in the impedance is That is, the power is proportional to mean square of the voltage. The energy consumed is the power X time,

Power and Energy in Digital Signals By analogy with an analog signal, we can define the power in a digital signal to be the mean square of the signal values. Since the number of samples, N, defines a time window (t = NT s ), we can define the energy in a digital signal to be:

Parseval’s Theorem Physical signals must obey the conservation of energy. A signal in the time domain must have the same power as the signal in the frequency domain. Digital signals must also have the same power in the two domains. Using the inverse DTFT, it can be shown that: In the above equation, the LHS is the time domain, while the RHS is the frequency domain. This result is called Parseval’s Theorem

Energy Conservation in Signals Parseval’s Theorem states that a digital signal must have the same power in both the time (sample) domain and the frequency domain Energy conservation also implies that digital signal power cannot depend on the sampling frequency (f s )

Example Power Calculations Compute the power in the signal: The power in the analog signal is 2 2 /2+1 2 / /2=2.625 Compute the power in the digital signal: –At two different sampling frequencies (1 kHz, 2kHz) –In the time domain (mean square of the signal values) –In the frequency domain (integration of the DTFT using the custom M-file sig_power)

Example Power Calculations % Construct a pseudo-analog signal and sample at two different F s : >> [s,t]=analog([100,200,300],[2,1,.5],1000,50000); >> d1000=sample(t,s,1000); >> d2000=sample(t,s,2000); % Compute the time domain power: >> [mean(d1000.^2),mean(d2000.^2)] ans = (Total Power does not depend on F s ) % Compute the frequency domain power: >> [sig_power(d1000),sig_power(d2000)] ans = (Frequency domain power = time domain power)

Gaussian Noise Random electrical noise from the environment and thermal noise from components can contaminate analog voltage signals. The noise usually has a “normal” or “Gaussian” statistical distribution In MATLAB, Gaussian noise can be simulated with the “randn” random number generator.

Normal Distribution of “randn” % Create a randn vector with 1000 values: >> N=1:1000; >> rn=randn(size(N)); % Compute a histogram of randn values with 11 bins from -3 to 3: >> xr=-3:6/10:3; >> M=hist(rn,xr); % Plot a “normalized”(area = 1) histogram of the randn values: >> bar(xr,M/(.6*sum(M))) % Compute the normal pdf of mean 0 and variance 1 from -3 to 3: >> xn=-3:.01:3; >> y=pdf('normal',xn,0,1); % Plot the pdf on the histogram plot: >> hold >> plot(xn,y,'r','LineWidth',2) >> hold off >> legend('Normalized histogram of randn values','The normal distribution')

Normal Distribution of “randn”

Noise Signals >> N1=1:1000; >> N2=1:2000; >> t1=N1; % Define each signal to be 1000 milliseconds long >> t2=N2/2; >> n1=randn(size(N1)); % n1 is 1000 samples, 1 ms per sample >> n2=randn(size(N2)); % n2 is 2000 samples, 0.5 ms per sample >> subplot(2,1,1),plot(t1,n1),title('Gaussian Noise Signal Sampled at 1 kHz') >> axis([ ]) >> subplot(2,1,2),plot(t2,n2),title('Gaussian Noise Signal Sampled at 2 kHz') >> axis([ ]) >> xlabel('X axis - time in milliseconds') The amplitude of the randn noise signal is, with high probability, between -3 and 3 because it has mean zero and standard deviation 1

Frequency Domain of Gaussian Noise >> [X1,f1]=dtft_demof(n1,0,1000,1024,1000); >> [X2,f2]=dtft_demof(n2,0,2000,1024,2000); >> subplot(2,1,1),plot(f1,abs(X1)),title('DTFT of n1, Fs = 1 kHz') >> subplot(2,1,2),plot(f2,abs(X2)),title('DTFT of n2, Fs = 2 kHz') >> xlabel('X Axis - Frequency in Hz') For both sampling frequencies, the noise power is uniformly distributed in the frequency domain

Noise Power Density in the Frequency Domain Noise power density is inversely proportional to the sampling frequency

Power Density and Sampling Frequency >> p1=(abs(X1)).^2/(1000*length(n1)); % The power density of signal n1 >> p2=(abs(X2)).^2/(2000*length(n2)); % The power density of signal n2 >> subplot(2,1,1),plot(f1,p1),title('Power Density of n1, Fs = 1 kHz') >> axis([ e-3]) >> subplot(2,1,2),plot(f2,p2),title('Power Density of n2, Fs = 2 kHz') >> axis([ e-3]) >> xlabel('X Axis - Frequency in Hz') >> mean(p2) % The average of the power density of signal n2 >> mean(p1) % The average of the power density of signal n1 ans = e-004 ans = e-004

Frequency Response The frequency response of a general LTI system can be derived by taking the DTFT of the difference equation, using the linearity and time-delay properties. H(Ω) is the value of the transfer function H(z) on the unit circle z = e jΩ

Filter Shape and Symmetry >> omega=-pi:2*pi/100:pi; % a vector of 100 values from –pi to pi >> z=exp(j*omega); % the complex number on the unit circle from –pi to pi >> H=( *z.^ *z.^-4)./( *z.^ *z.^-4); >> plot(omega/pi,abs(H)) >> title('Example of Filter Shape and Symmetry') >> xlabel('Digital Frequency in Units of Pi') >> ylabel('Magnitude of the Filter Frequency Response') |H(Ω)| is symmetric about the real axis (Ω = 0)

Filter Shape and Symmetry >> plot(omega/pi,angle(H)) >> title('Filter Phase Angle and Symmetry') >> xlabel('Digital Frequency in Units of Pi') >> ylabel('Phase Angle in Radians') The phase angle is anti- symmetric about the real axis

Summary The frequency domain of a discrete-time signal is computed from its discrete-time Fourier transform (DTFT). The important properties of the DTFT are its linearity, periodicity, and its time delay property. Use of the DTFT for spectral analysis requires consideration of signal length (resolution) and window functions (suppression of the Gibbs phenomenon) Conservation of energy (Parseval’s Theorem) requires signal power to be the same in the time-domain and frequency domain Total signal power cannot depend on the sampling frequency Signal power density is inversely proportional to the sampling frequency. The frequency response of a linear-time invariant DSP system is the value of its transfer function on the unit circle in the complex plane, provided we interpret the angle in the complex plane as the digital frequency, Ω.