Overview of Sampling Topics

Similar documents
J. McNames Portland State University ECE 223 Sampling Ver

Core Concepts Review. Orthogonality of Complex Sinusoids Consider two (possibly non-harmonic) complex sinusoids

Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

Overview of Discrete-Time Fourier Transform Topics Handy Equations Handy Limits Orthogonality Defined orthogonal

Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

Assignment 4 Solutions Continuous-Time Fourier Transform

Chapter 5 Frequency Domain Analysis of Systems

Chapter 5 Frequency Domain Analysis of Systems

J. McNames Portland State University ECE 223 DT Fourier Series Ver

EE 224 Signals and Systems I Review 1/10

ECE 301 Fall 2010 Division 2 Homework 10 Solutions. { 1, if 2n t < 2n + 1, for any integer n, x(t) = 0, if 2n 1 t < 2n, for any integer n.

Chap 4. Sampling of Continuous-Time Signals

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

Signals and Systems Spring 2004 Lecture #9

4.1 Introduction. 2πδ ω (4.2) Applications of Fourier Representations to Mixed Signal Classes = (4.1)

ESE 531: Digital Signal Processing

Homework: 4.50 & 4.51 of the attachment Tutorial Problems: 7.41, 7.44, 7.47, Signals & Systems Sampling P1

ESE 531: Digital Signal Processing

ECE 301 Fall 2011 Division 1 Homework 10 Solutions. { 1, for 0.5 t 0.5 x(t) = 0, for 0.5 < t 1

Overview of Bode Plots Transfer function review Piece-wise linear approximations First-order terms Second-order terms (complex poles & zeros)

ELEN 4810 Midterm Exam

Chapter 6: Applications of Fourier Representation Houshou Chen

Lecture 13: Discrete Time Fourier Transform (DTFT)

Final Exam of ECE301, Section 3 (CRN ) 8 10am, Wednesday, December 13, 2017, Hiler Thtr.

Lecture 8: Signal Reconstruction, DT vs CT Processing. 8.1 Reconstruction of a Band-limited Signal from its Samples

Fourier transform representation of CT aperiodic signals Section 4.1

LAB 2: DTFT, DFT, and DFT Spectral Analysis Summer 2011

x[n] = x a (nt ) x a (t)e jωt dt while the discrete time signal x[n] has the discrete-time Fourier transform x[n]e jωn

Grades will be determined by the correctness of your answers (explanations are not required).

Review of Discrete-Time System

Each problem is worth 25 points, and you may solve the problems in any order.

Grades will be determined by the correctness of your answers (explanations are not required).

Homework 4. May An LTI system has an input, x(t) and output y(t) related through the equation y(t) = t e (t t ) x(t 2)dt

6.003: Signals and Systems. Sampling and Quantization

MEDE2500 Tutorial Nov-7

Windowing Overview Relevance Main lobe/side lobe tradeoff Popular windows Examples

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING

Final Exam of ECE301, Prof. Wang s section 8 10am Tuesday, May 6, 2014, EE 129.

Discrete Time Signals and Systems Time-frequency Analysis. Gloria Menegaz

EEO 401 Digital Signal Processing Prof. Mark Fowler

FROM ANALOGUE TO DIGITAL

Bridge between continuous time and discrete time signals

Review: Continuous Fourier Transform

Definition of Discrete-Time Fourier Transform (DTFT)

Final Exam of ECE301, Prof. Wang s section 1 3pm Tuesday, December 11, 2012, Lily 1105.

E : Lecture 1 Introduction

Analog Digital Sampling & Discrete Time Discrete Values & Noise Digital-to-Analog Conversion Analog-to-Digital Conversion

Digital Signal Processing. Midterm 1 Solution

ECE-700 Review. Phil Schniter. January 5, x c (t)e jωt dt, x[n]z n, Denoting a transform pair by x[n] X(z), some useful properties are

X. Chen More on Sampling

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

BME 50500: Image and Signal Processing in Biomedicine. Lecture 2: Discrete Fourier Transform CCNY

Signals & Systems. Lecture 5 Continuous-Time Fourier Transform. Alp Ertürk

Digital Signal Processing

ECE 301. Division 2, Fall 2006 Instructor: Mimi Boutin Midterm Examination 3

Signals & Systems. Chapter 7: Sampling. Adapted from: Lecture notes from MIT, Binghamton University, and Purdue. Dr. Hamid R.

Fourier Representations of Signals & LTI Systems

EE123 Digital Signal Processing

6.003: Signals and Systems. CT Fourier Transform

Discrete Time Fourier Transform

ECE 3084 QUIZ 2 SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING GEORGIA INSTITUTE OF TECHNOLOGY APRIL 2, Name:

Sinc Functions. Continuous-Time Rectangular Pulse

Homework 3 Solutions

6.003: Signals and Systems. CT Fourier Transform

Signals and Systems. Lecture 14 DR TANIA STATHAKI READER (ASSOCIATE PROFESSOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON

Signals and Systems Profs. Byron Yu and Pulkit Grover Fall Midterm 2 Solutions

Aspects of Continuous- and Discrete-Time Signals and Systems

The Fourier Transform (and more )

! Introduction. ! Discrete Time Signals & Systems. ! Z-Transform. ! Inverse Z-Transform. ! Sampling of Continuous Time Signals

6.003 Signal Processing

Fourier Analysis of Signals Using the DFT

Spectrograms Overview Introduction and motivation Windowed estimates as filter banks Uncertainty principle Examples Other estimates

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

Discrete Time Fourier Transform (DTFT) Digital Signal Processing, 2011 Robi Polikar, Rowan University

TTT4120 Digital Signal Processing Suggested Solutions for Problem Set 2

2 Background: Fourier Series Analysis and Synthesis

Discrete Fourier Transform

2A1H Time-Frequency Analysis II Bugs/queries to HT 2011 For hints and answers visit dwm/courses/2tf

Complex symmetry Signals and Systems Fall 2015

Continuous Fourier transform of a Gaussian Function

Lecture 19: Discrete Fourier Series

Sensors. Chapter Signal Conditioning

Discrete-time Fourier transform (DTFT) representation of DT aperiodic signals Section The (DT) Fourier transform (or spectrum) of x[n] is

Discrete-Time David Johns and Ken Martin University of Toronto

School of Information Technology and Electrical Engineering EXAMINATION. ELEC3004 Signals, Systems & Control

ECE 301: Signals and Systems Homework Assignment #7

NAME: ht () 1 2π. Hj0 ( ) dω Find the value of BW for the system having the following impulse response.

Chapter 6 THE SAMPLING PROCESS 6.1 Introduction 6.2 Fourier Transform Revisited

Signals, Instruments, and Systems W5. Introduction to Signal Processing Sampling, Reconstruction, and Filters

L6: Short-time Fourier analysis and synthesis

Filter Analysis and Design

Fourier Analysis & Spectral Estimation

6.003 Signal Processing

Final Exam 14 May LAST Name FIRST Name Lab Time

2A1H Time-Frequency Analysis II

Chapter 2: Problem Solutions

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. Forslag til fasit, versjon-01: Problem 1 Signals and systems.

Lecture 14: Windowing

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

LAB 6: FIR Filter Design Summer 2011

Transcription:

Overview of Sampling Topics (Shannon) sampling theorem Impulse-train sampling Interpolation (continuous-time signal reconstruction) Aliasing Relationship of CTFT to DTFT DT processing of CT signals DT sampling Decimation & interpolation J. McNames Portland State University ECE 223 Sampling Ver. 1.15 1

Amplitude versus Time In this class we are working only with continuous-valued signals Signals with discrete values that have been quantized are called digital signals Analog-to-Digital converters (ADC) convert continuous-valued signals to discrete-valued signals. These often also convert from CT to DT. Digital-to-analog converters (DAC) convert discrete-valued signals to continuous-valued signals. These often also convert from DT to CT. Signals that are both continuous-valued and continuous-time are usually called analog signals Signals that are both discrete-valued and discrete-time are usually called digital J. McNames Portland State University ECE 223 Sampling Ver. 1.15 2

Overview of DT Processing of CT Signals x(t) CT DT x[n] H(z) y[n] DT CT y(t) T s T s Many systems (1) sample a signal, (2) process it in discrete-time, and (3) convert it back to a continuous-time signal Called discrete-time processing of continuous-time signals Most modern digital signal processing (DSP) uses this architecture The first step is called sampling The last step is called interpolation J. McNames Portland State University ECE 223 Sampling Ver. 1.15 3

Signals x(t) x[n] x i (t) X(jω) X(e jω ) X i (jω) For now, just consider the two conversions Sampling (CT DT) Interpolation (DT CT) Suppose we want x i (t) to be as close to x(t) as possible Need to consider relationships in both time- and frequency-domains Three signals, three transforms J. McNames Portland State University ECE 223 Sampling Ver. 1.15 4

Guiding Questions and Objectives x[n] =x(t) t=nts The operation of sampling (CT DT conversion) is trivial The challenge is to understand the limits and tradeoffs The remainder of these slides is dedicated to answering the following three questions 1. How is the CTFT of x(t), X(jω) related to the DTFT of x[n] =x(nt s ), X(e jω )? 2. Under what conditions can we synthesize x(t) from x[n]: x[n] x(t)? 3. How do we perform this DT CT conversion? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 5

Consider three signals Need for a Bridge Signal Type Time Domain Frequency Domain Original Signal CT x(t) X(jω) Sampled Signal DT x[n] X(e jω ) Bridge Signal CT x δ (t) X δ (jω) Goals: to determine the relationship of x(t) to x[n] =x(nt s ) in the time and frequency domains In the time domain, the relationship x[n] =x(nt s ) is clear But what is the relationship of X(jω) to X(e jω )? The transforms differ in character X(e jω ) is periodic X(e jω ) has units of radians per sample A bridge signal x δ (t) is the only way (that I know of) to determine how X(jω) is related to X(e jω ) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 6

Use of the Bridge Signal Define the bridge signal by relating X δ (jω) to X(e jω ) Determine how x(t) is related to x δ (t) in the time domain Determine how X(jω) is related to X δ (jω) Use the relationships of X(e jω ) and X(jω) to X δ (jω) to determine their relationship to one another J. McNames Portland State University ECE 223 Sampling Ver. 1.15 7

Defining the Bridge Signal The bridge signal x δ (t) is a CT representation of a DT signal x[n] It is defined as having the same transform, within a scale factor, as the DT signal Suppose x[n] =Ae j(ωn+φ) What is the CT equivalent? Let us pick x(t) =Ae j(ωt+φ) How do we relate the DT frequency Ω to the CT frequency ω? ω has units of radians/second Ω has units of radians/sample Let us use the conversion factor of T s = f 1 s seconds/sample Ω (radians/sample) = ω (radians/second) T s (seconds/sample) ω (radians/second) =Ω(radians/sample) f s (samples/second) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 8

Defining the Bridge Signal X δ (jω)=x(e jω ) Ω=ωTs = X(e jωt s ) The bridge signal is a CT representation of a DT signal We define it by equating the CTFT and DTFT with an appropriate scaling factor for frequency Note that this is a highly unusual CT signal The CTFT is periodic What does this tell us about x δ (t)? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 9

Solving for the Bridge Signal X(e jω )= X δ (jω)=x(e jω ) Ω=ωTs = n= n= n= x δ (t) FT X δ (jω) δ(t t o ) FT e jωt o δ(t T s n) FT e jωt sn x[n] δ(t T s n) FT x δ (t) = n= n= x[n]e jωn x[n]e jωt sn x[n]e jωt sn x[n] δ(t T s n) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 10

Why Isn t the Inverse Transform Similar to x(t)? DTFT x[n] = 1 X(e jω )e jωn dω 2π 2π CTFT x(t) = 1 + X(jω)e jωt dω 2π We generated x δ (t) from x[n] by equating a CTFT to the DTFT of x[n] This seems reasonable at first But consider the range of the CTFT and DTFT synthesis equations The DTFT synthesizes x[n] out of a finite range of frequencies The CTFT synthesizes x(t) out of all frequencies This is why, if x[n] =x(nt s ), that x δ (t) =F 1 {X δ (jω)} = F 1 { X(e jωt s ) } x(t) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 11

Impulse Sampling 1 p(t) -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts 5Ts p(t) = x δ (t) = δ(t nt s ) n= n= x(nt s ) δ(t T s n)=x(t) p(t) x δ (t) can also be formed from a CT signal This is called impulse sampling We can model sampling by use of the periodic impulse train J. McNames Portland State University ECE 223 Sampling Ver. 1.15 12

Rectangular Window and Impulse Train Notation 1 p(t) -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts 5Ts Note that a similar symbol was used for rectangular windows { 1 t <T p T (t) = 0 Otherwise but p(t) p T (t) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 13

Impulse Sampling Conceptual Example 1 x(t) -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts 5Ts 1 p(t) -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts 5Ts 1 x(t)p(t) -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts 5Ts J. McNames Portland State University ECE 223 Sampling Ver. 1.15 14

Impulse Sampling Terminology x(t) CT DT x[n] H(z) y[n] DT CT y(t) T s T s x δ (t) =x(t) p(t) = n= x(nt s )δ(t nt s ) The impulse train p(t) is called the sampling function p(t) is periodic with fundamental period T s T s, the fundamental period of p(t), is called the sampling period f s 1 T s and ω s = 2π T s are called the sampling frequency J. McNames Portland State University ECE 223 Sampling Ver. 1.15 15

Fourier Transforms of Periodic Signals Overview x δ (t) = n= x(nt s ) δ(t T s n)=x(t) p(t) X δ (jω)= 1 X(jω) P (jω) 2π To determine how X δ (jω) is related to X(jω), we need to calculate P (jω) p(t) is a periodic function with infinite energy The CTFT clearly doesn t converge Is easier to Calculate the Fourier series coefficients P [k] for p(t) Solve for P (jω) from P [k] using the general relationship between the CTFS and the CTFT Since periodic signals have infinite energy, the CTFT of these signals consists of impulses J. McNames Portland State University ECE 223 Sampling Ver. 1.15 16

Fourier Transforms of Periodic Signals Recall the Fourier series representations of periodic signals x(t) = e jω ot FT k= X[k]e jkωt 2πδ(ω ω o ) x(t) = k= X[k]e jkω ot FT 2π k= X[k] δ(ω kω o ) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 17

Example 1: CT Fourier Transform of an Impulse Train Solve for the Fourier transform of the impulse train p(t) = δ(t nt s ) n= Hint: the impulse train is periodic. X[k] = 1 x(t)e jkωot dt T T X(jω)= + x(t)e jωt dt J. McNames Portland State University ECE 223 Sampling Ver. 1.15 18

Example 1: Workspace J. McNames Portland State University ECE 223 Sampling Ver. 1.15 19

The Relationship of X(jω) to X δ (jω) x(t) p(t) P (jω) ω s x(t) p(t) FT 1 2π FT 2π T s 2π T s X(jω) P (jω) k= FT 1 2π X(jω) 2π T s δ ( ) ω k 2π T s k= X(jω) δ(ω ω o ) = X (j(ω ω o )) FT x(t) p(t) 1 X (j(ω kω s )) T s k= δ(ω kω s ) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 20

Summary Sampling: x[n] =x(nt s ) Definition: X δ (jω)=x(e jω ) Ω=ωTs Inverse CTFT: x δ (t) = x[n]δ(t nt s ) Impulse Sampling: x δ (t) = CTFT: P (jω)= 2π T s n= n= x(nt s )δ(t nt s ) k= δ (t kω s ) Multiplication Property: X δ (jω)= 1 X(jω) P (jω) 2π = 1 X (j(ω kω s )) T s k= J. McNames Portland State University ECE 223 Sampling Ver. 1.15 21

Conceptual Diagram of the Relationship 1 X(jω) -ω s -ω x 0 ω x ω s 2π Ts P (jω) -ω s -ω x 0 ω x ω s 1 Ts X δ (jω) -ω s -ω x -ω s -ω s +ω x -ω x 0 ω s -ω x ω s +ω x ω x ω s 1 Ts X(e jω ) -Ω s -Ω x -Ω s -Ω s +Ω x -Ω x 0 Ω x Ω s -Ω x Ω s Ω s +Ω x J. McNames Portland State University ECE 223 Sampling Ver. 1.15 22

x(t) p(t) FT 1 T s X(e jωt s )= 1 T s Observations k= k= X (j(ω kω s )) X (j(ω kω s )) What is Ω s? Ω s = ω s T s = 2π T s =2π T s Thus ω s in CT corresponds to 2π radians/sample in DT Recall that the fastest DT signal is e jπn =( 1) n and oscillates at π radians/sample This is the fastest signal we can observe due to e jωn =e j(ω±l2π)n What is this frequency in the CT domain? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 23

Expressing DT Transform in Terms of CT Transform X(e jωt s )= 1 T s k= X (j(ω kω s )) Ω=ωT s ω = Ω T s X(e jω )= 1 T s ω s = Ω s T s X(e jω )= 1 T s k= = 2π T s k= X X ( ) j( Ω T s kω s ) ( j ( )) Ω k2π T s J. McNames Portland State University ECE 223 Sampling Ver. 1.15 24

What Does this Mean? x(t) p(t) FT 1 T s k= X (j(ω kω s )) Sampling with an impulse train results in a signal with a CTFT of X δ (jω) that is a periodic function of ω There are replicas of X(jω) at each multiple of ω s Note that the replicas will not overlap if ω x < ω s 2 In this case, X(jω) could be recovered from X δ (jω) by applying a lowpass filter with gain T s and a cutoff frequency ω c such that ω x <ω c <ω s ω x This is a surprising result This is the sampling theorem J. McNames Portland State University ECE 223 Sampling Ver. 1.15 25

The Sampling Theorem Let x(t) be a bandlimited signal with X(jω)=0for ω >ω x.then x(t) is uniquely determined by its samples x(nt ),n=0, ±1, ±2,..., if ω s > 2 ω x where ω s = 2π T s. Thus, we can reconstruct any bandlimited signal x(t) exactly by creating a scaled impulse train and lowpass filtering This theorem is sometimes called the Shannon sampling theorem min ω s =2ω x is called the Nyquist rate max ω x = ω s 2 is called the Nyquist frequency In other words, we must obtain at least two samples per a cycle of the fastest sinusoidal component This should sound familiar Recall that the fastest perceivable frequency in discrete-time signals is π radians per sample (i.e. 0.5 cycles per sample) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 26

Signal Relationships Summary x[n] =x(nt s ) X(e jωt s )= 1 T s x δ (t) = x δ (t) = n= n= k= x(nt s ) δ(t T s n) X δ (jω)= 1 T s k= x[n] δ(t T s n) X δ (jω)=x ( e jωt s ) X (j(ω kω s )) X (j(ω kω s )) We now know the relationships between all of the three signals Note that x δ (t) was just a means to determining the relationship of X(e jω ) to X(jω) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 27

Guiding Questions and Objectives Revisited x[n] =x(nt s ) X(e jωt s )= 1 T s k= X (j(ω kω s )) Recall our guiding questions How is the CTFT of x(t) related to the DTFT of x[n] =x(nt s )? Under what conditions can we synthesize x(t) from x[n]? How do we do this DT CT conversion? Only the last remains J. McNames Portland State University ECE 223 Sampling Ver. 1.15 28

Example 2: Equivalent Sinusoids Suppose x[n] is a DT sinusoidal signal, x[n] =cos(ωn + θ) Solve for all of the CT sinusoids x(t) =cos(ωt + φ) that satisfy the relationship x(t) t=nts = x[n]. Which of these CT sinusoids satisfy the sampling theorem criterion? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 29

Example 2: Workspace J. McNames Portland State University ECE 223 Sampling Ver. 1.15 30

Example 2: Equivalent Sinusoids cos(ω t+θ cos((2π ω)t θ) cos((ω t+2π)t + θ) 1 0 Equivalent DT Sinusoids 1 3 1 2 1 0 1 2 3 0 1 3 1 2 1 0 1 2 3 0 1 3 2 1 0 Time (s) 1 2 3 J. McNames Portland State University ECE 223 Sampling Ver. 1.15 31

function [] = EquivalentSinusoids(); close all; t = -3:6/1000:3; n = floor(min(t)):ceil(max(t)); ph = 2*pi*rand; w = 0.6*pi; Example 2: MATLAB Code figure; FigureSet(1, LTX ); subplot(3,1,1); h = plot(t,cos(w*t + ph),n,cos(w*n + ph), k. ); set(h, MarkerSize,12); box off; ylabel( cos(\omega t+\theta ); title( Equivalent DT Sinusoids ); ylim([-1.05 1.05]); AxisLines; subplot(3,1,2); h = plot(t,cos((2*pi-w)*t - ph),n,cos(w*n + ph), k. ); set(h, MarkerSize,12); box off; ylabel( cos((2\pi - \omega)t - \theta) ); ylim([-1.05 1.05]); AxisLines; subplot(3,1,3); h = plot(t,cos((w+2*pi)*t + ph),n,cos(w*n + ph), k. ); set(h, MarkerSize,12); box off; ylabel( cos((\omega t+2\pi)t + \theta) ); xlabel( Time (s) ); ylim([-1.05 1.05]); AxisLines; AxisSet(8); J. McNames Portland State University ECE 223 Sampling Ver. 1.15 32

print -depsc EquivalentSinusoids; J. McNames Portland State University ECE 223 Sampling Ver. 1.15 33

Interpolation Introduction CT DT conversion is trivial: x[n] =x(nt s ) We now know that we can reconstruct x(t) from x[n] exactly This should be surprising There are many signals x(t) that satisfy the constraint x[n] =x(nt s ) Which one is the original x(t)? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 34

Interpolation Possibilities 1 0.8 Signal (scaled) 0.6 0.4 0.2 0 0.2 3 2 1 0 1 2 3 Time (s) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 35

Bandlimited Interpolation x(t) X x p (t) H(jω) y(t) p(t) = P n= δ(t nt s) Intuitively there are signals that are equal to x(t) and evenly spaced samples However, if The samples were taken from a bandlimited signal: X(jω)=0 for ω>ω x The conditions of the sampling theorem are satisfied: ω s > 2 ω x then there is only one bandlimited signal that passes exactly through the samples! J. McNames Portland State University ECE 223 Sampling Ver. 1.15 36

DT Processing of CT Signals x(t) CT DT x[n] H(z) y[n] DT CT y(t) T s T s Since x[n] completely represents x(t), we can process x[n] in discrete-time However, once we process the discrete-time signal and generate a discrete-time output, y[n] we need to create a continuous-time output y(t) We assume that y[n] represent samples from a continuous-time signal y(t) that is bandlimited the same as x(t) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 37

Interpolation x(t) X x δ (t) H(jω) x r (t) p(t) = P n= δ(t nt s) There are many forms of interpolation Piecewise constant Linear (point to point) Splines (piecewise cubic) For bandlimited signals, a lowpass filter can be used to exactly recover the signal Called bandlimited interpolation J. McNames Portland State University ECE 223 Sampling Ver. 1.15 38

Interpolation Simplified x δ (t) = x(nt s ) δ(t nt ) n= x r (t) =x δ (t) h(t) = = = = + n= n= x δ (t τ) h(τ)dτ [ n= x(nt ) ] x(nt s ) δ(t τ nt s ) h(τ)dτ x(nt s ) h(t nt s ) δ(t τ nt s ) h(τ)dτ J. McNames Portland State University ECE 223 Sampling Ver. 1.15 39

Interpolation with Ideal Filters x[n] =x(nt s ) X δ (jω)= 1 T s k= X (j(ω kω s )) If the terms of the sum do not overlap, an ideal lowpass filter can extract X(jω) from X δ (jω) The passband gain must be T s Recall that the ideal lowpass filter with cutoff frequency ω c and gain T s has an impulse response given by h(t) = T sω c sin(ω c t) = T ( ) sω c π ω c t π sinc ωc t π Thus, for ideal interpolation x r (t) = T sω c π n= ( ) ωc (t nt s ) x(nt s )sinc π J. McNames Portland State University ECE 223 Sampling Ver. 1.15 40

Notes on Bandlimited Interpolation x[n] =x(nt s ) x r (t) = T sω c π n= ( ) ωc (t nt s ) x(nt s )sinc π If the sampling theorem criterion is satisfied, x r (t) =x(t) However, this assumes that the frequency components of x[n] are between π/2 and +π/2 If the sampling criterion is not satisfied, high-frequency components will appear as low-frequency components J. McNames Portland State University ECE 223 Sampling Ver. 1.15 41

Bandlimited Interpolation Example 1 Example of Band limited Signal Reconstruction (Interpolation) x(t) 0.5 0 1 5 4 3 2 1 0 1 2 3 4 5 x[n] 0.5 0 1 5 4 3 2 1 0 1 2 3 4 5 x r (t) 0.5 0 5 4 3 2 1 0 1 2 3 4 5 Time (s) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 42

Introduction to Aliasing x(t) p(t) FT 1 T s + k= X (j(ω kω s )) If the sampling theorem is not satisfied (ω x > ω s 2 ), the sum of replicated spectral components X(j(ω kω s )) will overlap This is called aliasing In this case x r (t) x(t), though the two will be equal at t = nt s When aliasing occurs with pure tones (sinusoidal signals), signals with frequencies above ω s 2 are reflected to lower frequencies You should have experienced this in the lab with audio J. McNames Portland State University ECE 223 Sampling Ver. 1.15 43

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:500 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 44

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:900 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 45

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:1100 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 46

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:1500 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 47

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:1800 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 48

Example 3:Aliasing of Pure Tones Signals (scaled) 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Aliasing of Pure Tones Example Tone Frequency:2200 Hz Sample Rate:2000 Hz True Signal Reconstructed Signal 0 1 2 3 4 5 6 7 8 9 10 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 49

Example 3: MATLAB Code function [] = AliasingTones(); close all; fs = 2e3; % 2 khz sample rate fx = [500 900 1.1e3 1.5e3 1.8e3 2.2e3]; t = 0:10e-3/500:10e-3; % Span of 5 ms ts = -15e-3:1/fs:25e-3; % Sampled times T = 1/fs; ws = 2*pi*fs; wc = ws/2; for c1 = 1:length(fx), xt = cos(2*pi*fx(c1)*t); % True signal xs = cos(2*pi*fx(c1)*ts); % True signal sampled xr = zeros(size(t)); % Reconstructed signal memory allocation for c2 = 1:length(ts), st = (wc*t/pi)*xs(c2)*sinc(wc*(t-ts(c2))/pi); % Band-limited interpolation xr = xr + st; end; figure; FigureSet(1, LTX ); h = plot(t*1e3,xt, b,t*1e3,xr, g,ts*1e3,xs, ko ); set(h(1), LineWidth,1.5); set(h(2), LineWidth,0.8); set(h(3), MarkerFaceColor, k ); set(h(3), MarkerSize,4); xlim([min(t*1e3) max(t*1e3)]); ylim([-1.1 1.1]); box off; xlabel( Time (ms) ); ylabel( Signals (scaled) ); title(sprintf( Aliasing of Pure Tones Example Tone Frequency:%d Hz Sample Rate:%d Hz,fx(c1),fs)); J. McNames Portland State University ECE 223 Sampling Ver. 1.15 50

return; AxisSet(8); legend( True Signal, Reconstructed Signal ); eval(sprintf( print -depsc AliasingTones%04d;,fx(c1))); end; n = -15:15; t = -5.5:0.01:5.5; xp = rand(size(n)); % Sampled signal wc = pi; T = 1; xr = zeros(size(t)); % Reconstructed signal subplot(3,1,3); for cnt = 1:length(n), st = (wc*t/pi)*xp(cnt)*sinc(wc*(t-n(cnt)*t)/pi); plot(t,st, g ); hold on; xr = xr + st; end; h = plot(t,xr, b,n,xp, ro ); set(h(2), MarkerFaceColor, r ); set(h(2), MarkerSize,2); hold off; xlim([min(t) max(t)]); ylim([-0.2 1.2]); xlabel( Time (s) ); ylabel( Signal ); box off; subplot(3,1,2); plot([min(t) max(t)],[0 0], k: ); hold on; h = stem(n,xp, r ); set(h(1), MarkerFaceColor, r ); set(h(1), MarkerSize,2); J. McNames Portland State University ECE 223 Sampling Ver. 1.15 51

hold off; ylabel( Sampled Signal ); subplot(3,1,1); h = plot(t,xr, b,n,xp, ro ); set(h(2), MarkerFaceColor, r ); set(h(2), MarkerSize,2); ylabel( Reconstructed Signal ); xlim([min(t) max(t)]); ylim([-0.2 1.2]); box off; title( Example of Band-limited Siganl Reconstruction (Interpolation) ); J. McNames Portland State University ECE 223 Sampling Ver. 1.15 52

Example 4:Aliasing of Speech The following slides show a segment of speech for Regis Philbin stating part of the word Your. The signal was sampled at various rates and then interpolated. The difference between the true signal and the reconstructed signal demonstrates the hazard of under sampling. The original signal was sampled at 44.1 khz. Why isn t the aliasing apparent at 22 khz? J. McNames Portland State University ECE 223 Sampling Ver. 1.15 53

Example 4:Aliasing of Speech Signals (scaled) 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 True Signal Reconstructed Signal Regis "Your" Sample Rate:22050.0 Hz 30 32 34 36 38 40 42 44 46 48 50 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 54

Example 4:Aliasing of Speech Signals (scaled) 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 True Signal Reconstructed Signal Regis "Your" Sample Rate:8820.0 Hz 30 32 34 36 38 40 42 44 46 48 50 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 55

Example 4:Aliasing of Speech Signals (scaled) 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 True Signal Reconstructed Signal Regis "Your" Sample Rate:4410.0 Hz 30 32 34 36 38 40 42 44 46 48 50 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 56

Example 4:Aliasing of Speech Signals (scaled) 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 True Signal Reconstructed Signal Regis "Your" Sample Rate:2205.0 Hz 30 32 34 36 38 40 42 44 46 48 50 Time (ms) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 57

Effect of Aliasing in the Frequency Domain 1 X δ (jω) ω s ω x 1 0 ω x X δ (jω) ω s ω ω s ω x 0 ω x ω s ω 1 X δ (jω) ω s ω x 2 0 ω x X δ (jω) ω s ω 1-2ws ω s 0 ω s 2ws ω J. McNames Portland State University ECE 223 Sampling Ver. 1.15 58

Aliasing Comments In discrete-time, one of the key concepts of this class is that complex exponentials with frequencies that differ by a multiple of 2π are indistinguishable: e j(ω+l2π)n =e jωn When we sample a signal, we convert a continuous-time signal to a discrete-time signal Sinusoidal components that are above ω s 2 are reflected down to lower frequencies You have experienced aliasing before Spoked wheels in street lights that strobe at 120 Hz Spoked wagon wheels or helicopter blades in movies and television Strobe lights applied to rapidly oscillating objects J. McNames Portland State University ECE 223 Sampling Ver. 1.15 59

Preventing Aliasing x(t) H(s) Anti-Aliasing Filter C/D Conversion T x[n] In practice, most data acquisition systems that convert CT signals to DT signals take two measures to prevent aliasing Apply an analog (continuous-time) lowpass filter prior to sampling to ensure the signal is bandlimited Use a higher sampling rate than required by the sampling theorem (e.g. ω s =2.2 ω x ) These lowpass filters are often called anti-aliasing filters J. McNames Portland State University ECE 223 Sampling Ver. 1.15 60

Anti-aliasing Filter Tradeoffs x(t) H(s) Anti-Aliasing Filter C/D Conversion T x[n] Over-sampling also has a number of benefits for the anti-aliasing filter (AAF). The transition band can be wider If the filter order is fixed, the passband and stopband attenuation can be improved If the passband and stopband attenuation are fixed, a lower order filter can be used (easier and less expensive to design and build) J. McNames Portland State University ECE 223 Sampling Ver. 1.15 61

Discrete-Time Processing of Continuous-Time Signals x(t) CT DT x[n] H(z) y[n] DT CT y(t) T s X(e jω )= 1 T s k= X ( j ( T)) s Ω k2π Most electronic systems that process signals do so in discrete-time There are many advantages to this approach Digital technology is cheap to manufacture and very advanced Digital systems do not drift over time Parameter tuning (expensive) is not necessary; repeatable More flexible The sampling theorem is the theoretical basis for DT processing of CT signals T s J. McNames Portland State University ECE 223 Sampling Ver. 1.15 62

Fourier Example of CTFT & DTFT Relationship 1 X(jω) ω s 0 ω s ω 1 X δ (jω) ω s 0 ω s ω 1 T X(e jω ) 2π 0 2π Ω J. McNames Portland State University ECE 223 Sampling Ver. 1.15 63

CT to DT Conversion Comments X(e jω )= 1 ( ( )) Ω k2π X j T s T s k= If the sampling theorem is satisfied, the DTFT is a scaled version of the CTFT The amplitude of the DTFT is scaled by 1 T s The frequency ω s is mapped to Ω s =2π This means we can theoretically calculate the CTFT of a band-limited signal exactly using the DTFT of the sampled signal x(nt ) For spectral estimation, the signal must first be windowed and then the FFT is used to calculate the DTFT This is exactly how the sampling oscilloscopes use the FFT to estimate the Fourier transform of a CT signal J. McNames Portland State University ECE 223 Sampling Ver. 1.15 64

CT to DT Conversion Comments 1 H(jω) ω s 0 1 1 2 ω s 1 2 ω s H(e jω ) ω s ω 2π π 0 π 2π Ω This also means we can process band-limited CT signals with DT systems without any loss As long as the sampling theorem is satisfied, we simply design H(z) such that H(e jω )=H(jω) Ω for Ω <π ω= T s In this case, the DT & CT systems are equivalent J. McNames Portland State University ECE 223 Sampling Ver. 1.15 65

DT to CT Conversion Comments y[n] Impulse Train DT to CT y δ (t) Interpolation Filter y(t) y δ (t) = n= y[n] δ(t nt s ) The interpolation filter is just a lowpass filter with a passband gain of T s and a cutoff frequency of ω s 2 J. McNames Portland State University ECE 223 Sampling Ver. 1.15 66

Summary of Key Concepts If a signal is bandlimited, we can sample the signal without losing any information The original signal can be reconstructed from its samples exactly The sampling theorem is the basis for discrete-time processing of continuous-time signals If the sampling theorem is satisfied, the CTFT can be calculated exactly from the DTFT There are many advantages to using this type of architecture If the sampling theorem is not satisfied, sampling will result in aliasing If a signal is bandlimited, we can theoretically build an equivalent DT system for any CT system J. McNames Portland State University ECE 223 Sampling Ver. 1.15 67