Sampling. Alejandro Ribeiro. February 8, 2018

Similar documents
Fourier transform. Alejandro Ribeiro. February 1, 2018

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

IB Paper 6: Signal and Data Analysis

Continuous Fourier transform of a Gaussian Function

Chapter 5 Frequency Domain Analysis of Systems

Review: Continuous Fourier Transform

MEDE2500 Tutorial Nov-7

Chapter 5 Frequency Domain Analysis of Systems

ELEN 4810 Midterm Exam

Discrete Fourier transform (DFT)

Lecture 1 From Continuous-Time to Discrete-Time

Fourier Series Example

Module 3 : Sampling and Reconstruction Lecture 22 : Sampling and Reconstruction of Band-Limited Signals

Fourier Transform Chapter 10 Sampling and Series

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

Lecture 28 Continuous-Time Fourier Transform 2

FROM ANALOGUE TO DIGITAL

Fourier Transform for Continuous Functions

Fourier transform. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Image Acquisition and Sampling Theory

Lecture 27 Frequency Response 2

8.1 Circuit Parameters

Various signal sampling and reconstruction methods

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

Elec4621 Advanced Digital Signal Processing Chapter 11: Time-Frequency Analysis

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.

Principles of Communications

Discrete-Time Signals and Systems. Efficient Computation of the DFT: FFT Algorithms. Analog-to-Digital Conversion. Sampling Process.

Bridge between continuous time and discrete time signals

Interchange of Filtering and Downsampling/Upsampling

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

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

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

Sampling in 1D ( ) Continuous time signal f(t) Discrete time signal. f(t) comb

Images have structure at various scales

Chapter 2: Problem Solutions

Multirate signal processing

ECE 301: Signals and Systems Homework Assignment #7

E2.5 Signals & Linear Systems. Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & 2)

GBS765 Electron microscopy

2A1H Time-Frequency Analysis II

EE 224 Signals and Systems I Review 1/10

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

Review of Linear Time-Invariant Network Analysis

Experimental Fourier Transforms

Stochastic Structural Dynamics Prof. Dr. C. S. Manohar Department of Civil Engineering Indian Institute of Science, Bangalore

ECG782: Multidimensional Digital Signal Processing

L6: Short-time Fourier analysis and synthesis

Sensors. Chapter Signal Conditioning

ECE 301 Division 1 Final Exam Solutions, 12/12/2011, 3:20-5:20pm in PHYS 114.

1 Understanding Sampling

Two-Dimensional Signal Processing and Image De-noising

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

ANALOG AND DIGITAL SIGNAL PROCESSING ADSP - Chapter 8

Representation of Signals and Systems. Lecturer: David Shiung

Chapter 6: Applications of Fourier Representation Houshou Chen

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING

Multirate Digital Signal Processing

Fourier Analysis Overview (0B)

6 The Fourier transform

Mathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT

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

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

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

Ch.11 The Discrete-Time Fourier Transform (DTFT)

Convolution. Define a mathematical operation on discrete-time signals called convolution, represented by *. Given two discrete-time signals x 1, x 2,

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

Digital Signal Processing. Midterm 1 Solution

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

Frequency2: Sampling and Aliasing

A523 Signal Modeling, Statistical Inference and Data Mining in Astrophysics Spring 2011

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

Discrete sines, cosines, and complex exponentials

Math 016 Lessons Wimayra LUY

Review of Discrete-Time System

Notes 07 largely plagiarized by %khc

Novel Waveform Design and Scheduling For High-Resolution Radar and Interleaving

Aspects of Continuous- and Discrete-Time Signals and Systems

VII. Bandwidth Limited Time Series

Fourier Analysis and Sampling

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science. Fall Solutions for Problem Set 2

3. Lecture. Fourier Transformation Sampling

Flash File. Module 3 : Sampling and Reconstruction Lecture 28 : Discrete time Fourier transform and its Properties. Objectives: Scope of this Lecture:

The Cooper Union Department of Electrical Engineering ECE111 Signal Processing & Systems Analysis Final May 4, 2012

Math Shifting theorems

Information and Communications Security: Encryption and Information Hiding

Quality Improves with More Rays

Simon Fraser University School of Engineering Science ENSC Linear Systems Spring Instructor Jim Cavers ASB

Fourier transform representation of CT aperiodic signals Section 4.1

SC434L_DVCC-Tutorial 6 Subband Video Coding

Sinc Functions. Continuous-Time Rectangular Pulse

Correlator I. Basics. Chapter Introduction. 8.2 Digitization Sampling. D. Anish Roshi

An Introduction to Discrete-Time Signal Processing

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

Discrete Fourier transform

1 1.27z z 2. 1 z H 2

Two-Dimensional Signal Processing and Image De-noising

6.003: Signals and Systems. Sampling and Quantization

Periodic (Uniform) Sampling ELEC364 & ELEC442

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

Transcription:

Sampling Alejandro Ribeiro February 8, 2018 Signals exist in continuous time but it is not unusual for us to process them in discrete time. When we work in discrete time we say that we are doing discrete signal processing, something that is convenient due to the relative ease and lower cost of using computers to manipulate signals. When we use discrete time representations of continuous time signals we need to implement processes to move back and forth between continuous and discrete time. The process of obtaining a discrete time signal from a continuous time signal is called sampling. The process of recovering a continuous time signal from its discrete time samples is called signal reconstruction or interpolation. Mathematically, the sampling process has an elementary description. Given a sampling time T s and a continuous time signal x with values x(t), the sampled signal x s is one that take values x s (n) = x(nt s ), n Z. (1) As per (1), the sampled signal retains values at regular intervals spaced by T s and discards the remaining values of x(t) see Figure 1. The process by which this is done in, say, a sound card, is a problem of circuit design. For our purposes, let us just say that (1) is a reasonable model for the transformation of a continuous time signal into a discrete time signal. A relevant question, perhaps the most relevant question, is what information is lost when discarding all the values of x(t) except for those at times nt s. To answer this question, we compare the spectral representations of x s and x. In fact, since x s is a discrete time signal and x is a continuous time signal it is convenient to introduce a continuous time representation of the sampled signal as we describe in the following section. 1

x Sample T s x s T s -4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts t x x s Figure 1. Sampling with sampling time T s. Sampling the continuous time signal x to create the discrete time signal x s entails retaining the values x s (n) = x(nt s ). A relevant question is in what respect the sampled signal x s (n) differs from the original signal x(t). F F 1-4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts t -4 fs -3 fs -2 fs - fs 0 fs 2 fs 3 fs 4 fs f Figure 2. A Dirac train with spacing T s (left). The Fourier transform of the Dirac train is another Dirac train with spacing f s = 1/T s. 1 Dirac train representation of sampled signals A Dirac train, or Dirac comb, with spacing T s is a signal x c defined by a succession of delta functions located at positions nt s (Figure 2): x c (t) = T s n= δ(t nt s ). (2) A Dirac train is, in a sense, a trick to write down a discrete time signal in continuous time. The train is formally defined to be a continuous time signal but it becomes relevant only at the (discrete) set of times nt s. In our forthcoming discussions of sampling, we use the Fourier transform of the Dirac comb. This transform can be seen to be another Dirac comb, but with spacing f s = 1/T s. I.e., if we denote the Fourier transform of x c as X c = F(x c ) we have that X c ( f ) = δ( f k f s ). (3) k= That X c ( f ) does represent the values of the Fourier transform of x c is not difficult to show by identifying x c with the discrete time constant signal x(t) = 1, but we don t show this derivation on these notes. 2

-4Ts -3Ts -2Ts -Ts 0 Ts 2Ts 3Ts 4Ts t Figure 3. Representation of sampled signal with a modulated Dirac train. The representation is equivalent to the one in Figure 1 but makes comparisons with the original signal x easier. In the Dirac train representation of sampling we use the samples x s (n) = x(nt s ) to modulate the deltas of a Dirac train. Specifically, we define the signal x δ as (Figure 3) x δ (t) = T s n= x(nt s )δ(t nt s ). (4) That (1) and (4) are equivalent representations of sampling follows from the simple observation that when given the value x s (n) we can determine x δ (nt s ) and vice versa. The representation in (1) is simpler, but the representation in (4) allows comparisons with the original signal x. Indeed, the sampling representation in (4) can be written as the product between x(t) and the Dirac train in (2): [ ] x δ (t) = x(t) δ(t nt s ). (5) T s n= Note that the expressions in (4) and (5) are equivalent since in the multiplication of the function x(t) with the shifted delta function δ(t nt s ), only the value x(nt s ) is relevant. It is therefore equivalent to simply multiply δ(t nt s ) by x(nt s ). Straightforward as it is, rewriting (4) as (5) allows us to rapidly characterize the spectrum of the sampled signal x δ (t). Since we know that multiplication in time is equivalent to convolution in frequency we have that the Fourier transform X δ = F(x δ ) can be written in terms of the Fourier transforms X = F(x) of x and the Dirac train as [ ] X δ = X F δ(t nt s ). (6) T s n= The Fourier transform of the Dirac train x c (t) = T s n= δ(t nt s ) we have seen is given by the Dirac train in (3). Using this result in (6) and 3

-3 fs/2 - fs - fs /2 0 fs/2 fs 3 fs/2 2 fs 5 fs/2 f Figure 4. Spectrum X δ = F(x δ ) of the sampled signal x δ. The spectrum of the original signal (in blue) is copied and shifted to all the frequencies that are integer multiples of f s (in green). The spectrum X δ (in red) is the sum of all these shifted copies. the linearity of the convolution operation we further conclude that X δ = X δ( f k f s ). (7) k= A final simplification come from observing that the convolution of X with the shifted delta function δ( f k f s ) is just a shifting of the spectrum of X so that it is re-centered at f = f s. We can therefore write X δ ( f ) = X( f k f s ). (8) k= The result in (8) is sufficiently important so as to deserve a summary in the form of a Theorem that we formally state next. Theorem 1 Consider a signal x with Fourier transform X = F(x), a sampling time T s, and the corresponding sampled signal x δ as defined in (4). The spectrum X δ = F(x δ ) of the sampled signal x δ is a sum of shifted versions of the original spectrum X δ ( f ) = k= X( f k f s ). The result in Theorem 1 is explained in terms of what we call spectrum periodization. We start from the spectrum X of the continuous time signal that we replicate and shift to each of the frequencies that are multiples of the sampling frequency f s. The spectrum X δ of the sampled signal is given by the sum of all these shifted copies see Figure 4. The result of spectrum periodization provides a very clear answer to the question of what information is lost when we sample a signal at frequency f s. The answer is that whatever information is contained by 4

frequency components X( f ) outside of the set f [ f s /2, f s /2] is completely lost. Information contained at frequencies f close to the borders of this set are not completely lost but rather distorted by their mixing with the frequency components outside of the set f [ f s /2, f s /2]. We refer to this distortion phenomenon as aliasing. The result in Theorem 1 points out to a particularly interesting result for the case of bandlimited signals that you are asked to analyze. 1.1 Sampling of bandlimited signals. Suppose the signal X has bandwidthsampling W, i.e., thatofx( bandlimited f ) = 0 for allsignals f / [ W/2, W/2]. In this case, 1.1 sampling entails no loss of information in that it is possible to recover x(t) perfectly if only the samples x s (n) are given. Explain why this is true and describe a method to recover the continuous time signal x from the modulated Dirac train x δ. 1.2 Avoiding aliasing. When we sample a signal that is not bandlimited, there 1.2 is Avoiding an unavoidable aliasing loss of the information contained in frequencies larger than f s /2 -and the equivalent information contained in frequencies smaller than f s /2. However, it is possible to avoid aliasing through judicious use of a low pass filter. Explain how this is done. 1.3 Reconstruction with arbitrary pulse trains. While it is mathematically possible Reconstruction to reconstruct with x(t) arbitrary from x δ (t), pulse it is physically trains implausible 1.3 to generate a Dirac train because delta functions are not physical entities. We can, however, approximate δ(t) by a narrow pulse p(t) and attempt to reconstruct x(t) from the modulated train pulse x p (t) = x(nt s )p(t nt s ). (9) n= As long as the pulse p(t nt s ) is sufficiently tall and narrow, x p (t) is not too far from x δ (t) and the reconstruction method described in 1.1 should yield acceptable results with x p (t) used in lieu of x δ (t). Work in the frequency domain to explain what distortion is introduced by the use of x p (t) in lieu of x δ (t). In the course of this analysis you will realize that there is a condition on p(t) that guarantees no distortion, i.e., perfect reconstruction of x(t) without using a Dirac train. Derive this condition and propose a particular pulse with this property. Do notice that the pulse you are proposing is not that narrow after all. 5

-7Ts -6Ts = 2τ -5Ts -4Ts -3Ts = τ -2Ts -Ts 0 Ts 2Ts 3Ts = τ 4Ts 5Ts 6Ts = τ 7Ts t Figure 5. Subsampling (top). When subsampling a discrete time signal we retain a subset of the values of the given discrete time signal. In the figure, the sampling time of the given signal x is T s and the sampling time of the subsampled signal x s is τ = 3T s. We therefore keep one out of every three values of x to form x s.. 2 Subsampling Most often, sampling is understood as a technique to generate a discrete time signal from a continuous time signal. However, we can also use sampling to generate a smaller number of samples from an already sampled signal. Consider then a discrete time signal x d with sampling time T s and values x d (n). We want to generate a (sub)sampled signal x s with sampling time τ and values x s (m) given by ( x s (m) = x d m τ ). (10) T s For the expression in (10) to make sense we need to have the subsampling time τ to be an integer multiple of T s. Under that assumption, (10) means that we retain one value of x d (n) out of every τ/t s values. E.g., of τ/t s = 2, we keep every other sample of x d into x s. If τ/t s = 3, we make x s (0) = x d (0), x s (1) = x d (3), and, in general x s (m) = x d (3m), so that we keep all the values in x that correspond to time indexes that are multiples of 3 see Figure 5. As in the case of sampling, we want to understand what information, if any, is lost when we subsample x d into x s. And again as in the case of sampling, the difficulty in answering this question is that the support of the signals x d and x s are different. In (1), the continuous time signal x is a function of the continuous time parameter t and the sampled signal x s is a function of the discrete time parameter n. In (10), the original signal x d is defined for times nt s, whereas the subsampled signal is defined for times mτ. We can overcome this problem by introducing the analogous of the 6

-7Ts -6Ts = 2τ -5Ts -4Ts -3Ts = τ -2Ts -Ts 0 Ts 2Ts 3Ts = τ 4Ts 5Ts 6Ts = 2τ 7Ts t Figure 6. Delta train representation of subsampling. The difference with the subsampled signal in Figure 5 is that here we pad with zeros so that the support of this signal is the same support of the original signal.. modulated Dirac train in (4). To do so, consider a train of discrete time delta functions centered at discrete time indexes mτ/t s and define the delta train representation of the subsampled signal as x δ (n) = ( x d m τ ) m= T s δ (n m τts ). (11) A schematic representation of (11) is shown in Figure 6. The difference between x δ and x s is that x δ is padded with zeros so that its support is the same support of the original signal x d. Do notice that it is pointless to utilize x δ for signal processing when we can use the equivalent signal x s. However, the delta train representation x δ is more convenient for analysis. In particular, it is ready to repeat the steps in (5) (8) to conclude that a result equivalent to the periodization statement of Theorem 1 holds. 2.1 Subsampling theorem. Derive the equivalent of Theorem 1 relating thesubsampling spectra of discrete theorem time signal x d and its subsampled version 2.1 x δ. To solve this part you need to compute the DTFT of the delta train m= δ(n mτ/t s ). This DTFT is a Dirac train with spikes that are spaced by the subsampling frequency ν = 1/τ. If you have problems with this derivation, which you will most likely have, talk with one of your teaching assistants. If you don t want to talk with them, ponder the fact that the train m= δ(n mτ/t s ) is akin to a constant function when we use the sampling time τ. 2.2 Subsampling function. Create a function that takes as input a signal x d, Subsampling a timefunction T s, and a subsampling time τ to return the sub- 2.2 sampled signal x s and its delta train representation x δ. The latter signal 7

would not be returned in practice, but we will use it here to perform some analyses. Test your function with a Gaussian pulse of standard deviation σ = 100ms and mean µ = 1s. Set the original sample frequency to f s = 40kHz, the subsampling frequency to f ss = 4kHz and the total observation period to T = 2s. 2.3 Spectrum periodization. Take the DFT of the functions x d and x δ of 2.3 Part 2.2 Spectrum and check that the periodization result of Part 2.1 holds. Keep all parameters unchanged and vary the standard deviation of the Gaussian pulse to observe cases with and without aliasing. 2.4 Prefiltering. The function you wrote in Part 2.2 results in aliasing 2.4 when Prefiltering the spectrum of the signal x d has a bandwidth W that exceeds ν. We can avoid aliasing by implementing a low pass filter to eliminate frequencies above ν before subsampling. Modify the function of Part 2.2 to add this feature. 2.5 Spectrum periodization with prefiltering. Repeat Part 2.3 using 2.5 the function Spectrum in Part periodization 2.4. For the cases with without prefiltering aliasing the result should be the same. Observe and comment the differences for the cases in which you had observed aliasing. 2.6 Reconstruction function. Create a function that takes as input a 2.6 subsampled Reconstruction signal x s, a function sampling time T s, and a subsampling time τ to return the signal x d. Depending on context this process may also be called interpolation because we interpolate the values between subsequent samples in x s or upsampling because we increase the sampling frequency from ν to f s. In implementing this function you can assume that the signal x s is bandlimited and was generated without aliasing. Test your function for a Gaussian pulse. Choose parameters of Part 2.3 that did not result in aliasing. Choose parameters for which you observed aliasing and check that, indeed, the reconstructed pulse is not a faithful representation of the original pulse. For this latter experiment, test both the subsampling function in Part 2.2 and the subsampling function in Part 2.4. 8

3 Time management This lab returns to the mean and is more involved than Lab 4. Part 1 includes results that we will derive on class, so it shouldn t be too onerous to finish. The teaching assistants will work on these problems during Tuesday s meeting. It should be an additional hour or so to wrap it up. Part 2.1 is an odd man as it is asking that you do a somewhat involved derivation. Work on it during Wednesday and, if you can t solve it before the end of the day, go talk with one of your teaching assistants. A 2 hour investment should do. We will work on the remaining parts on the Thursday session. Completing the rest should take about 5 hours, 1 hour for each of the parts. 9