Moving from continuous- to discrete-time

Similar documents
Sampling and Reconstruction of Analog Signals

Digital Processing of Continuous-Time Signals

Digital Processing of

Final Exam Solutions June 7, 2004

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

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

Multirate Digital Signal Processing

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

Multirate DSP, part 1: Upsampling and downsampling

Sampling and Signal Processing

Digital Signal Processing

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

Data Acquisition Systems. Signal DAQ System The Answer?

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

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

Lecture Schedule: Week Date Lecture Title

Spectrum Analysis - Elektronikpraktikum

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Signals and Systems. Lecture 13 Wednesday 6 th December 2017 DR TANIA STATHAKI

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

Final Exam Practice Questions for Music 421, with Solutions

Recall. Sampling. Why discrete time? Why discrete time? Many signals are continuous-time signals Light Object wave CCD

Brief Introduction to Signals & Systems. Phani Chavali

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

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

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

SAMPLING THEORY. Representing continuous signals with discrete numbers

Design of FIR Filters

ENGR 210 Lab 12: Sampling and Aliasing

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

ece 429/529 digital signal processing robin n. strickland ece dept, university of arizona ECE 429/529 RNS

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

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Signals and Systems Using MATLAB

Laboratory Assignment 4. Fourier Sound Synthesis

In The Name of Almighty. Lec. 2: Sampling

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

PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture 11-2

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

FFT Analyzer. Gianfranco Miele, Ph.D

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

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.

CS3291: Digital Signal Processing

ECE 5650/4650 Exam II November 20, 2018 Name:

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Digital Signal Processing

Final Exam Solutions June 14, 2006

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

Lecture 7 Frequency Modulation

NON-UNIFORM SIGNALING OVER BAND-LIMITED CHANNELS: A Multirate Signal Processing Approach. Omid Jahromi, ID:

Bibliography. Practical Signal Processing and Its Applications Downloaded from

ECE 429 / 529 Digital Signal Processing

Nyquist's criterion. Spectrum of the original signal Xi(t) is defined by the Fourier transformation as follows :

Experiment 8: Sampling

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

Signal Processing Summary

Laboratory Manual 2, MSPS. High-Level System Design

For the system to have the high accuracy needed for many measurements,

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

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

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

Analyzing A/D and D/A converters

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

Discrete Fourier Transform (DFT)

Experiment 2 Effects of Filtering

Principles of Baseband Digital Data Transmission

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

MAE143A Signals & Systems - Homework 9, Winter 2015 due by the end of class Friday March 13, 2015.

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

System analysis and signal processing

Sampling, interpolation and decimation issues

Fourier Signal Analysis

Design IV. E232 Spring 07

Problem Set 1 (Solutions are due Mon )

Suggested Solutions to Examination SSY130 Applied Signal Processing

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

Digital Signal Processing

! Multi-Rate Filter Banks (con t) ! Data Converters. " Anti-aliasing " ADC. " Practical DAC. ! Noise Shaping

Sistemas de Aquisição de Dados. Mestrado Integrado em Eng. Física Tecnológica 2015/16 Aula 3-29 de Setembro

Experiment 4 Sampling and Aliasing

ANALOGUE AND DIGITAL COMMUNICATION

Signal Processing Techniques for Software Radio

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

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

LAB #7: Digital Signal Processing

Signal Processing Toolbox

Chapter 2: Digitization of Sound

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

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

Digital Filters FIR and IIR Systems

EE123 Digital Signal Processing

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

EE 230 Lecture 39. Data Converters. Time and Amplitude Quantization

The Fast Fourier Transform

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

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

Discrete-time Signals & Systems

Sampling and Reconstruction

Transcription:

Moving from continuous- to discrete-time Sampling ideas Uniform, periodic sampling rate, e.g. CDs at 44.1KHz First we will need to consider periodic signals in order to appreciate how to interpret discrete-time signals as representative of continuous-time Fourier series and transforms Discrete-time Fourier transform (DTFT) Discrete Fourier transform (DFT) & the fast Fourier transform (FFT) Aliasing and signal reconstruction Discrete-time signals then discrete-time systems Matlab tools and digital signal processing Nothing on digital (finite bit-length) signals MAE143A Signals & Systems Winter 2016 1

Sampled signals discrete time For computer use we need to sample signals Most commonly this is periodic sampling every T seconds we take a sample of the continuous signal This yields a sequence x n = x(nt ) A continuous-time signal is a function of time t A discrete-time signal is a sequence indexed by t T is the sampling period (sec) 1/T is the sample rate (Hz) Often we also quantize the samples to yield a digital signal of a fixed number of bits representation This is a subject for the next course MAE143A Signals & Systems Winter 2016 2

Analog-to-digital conversion Real-world signal Electronic Signal Conditioner Track & hold Circuit ADC µc Signal conditioning Filtering (anti-aliasing), offset, ranging Track and hold circuit Enabled by the rising edge trigger Holds the signal at the latched value Analog-to-digital converter Converts held signal to 8-bit, 16-bit, 24-bit digital Computer coordinates sampling, storage, 1/T sec MAE143A Signals & Systems Winter 2016 3

Ideal sampling of signals Continuous-time signal x(t) Continuous values of x, t Discrete-time signal x n Continuous x, integer n A sequence x(t) x n t Sampled-data signal x s (t) Continuous x, t Modeled by a pulse train -2-1 0 1 2 3 4 5 6 7 n x s (t) 1X 1X x s (t) = x n (t nt )=x(t) n= 1 n= 1 0 T 2T 3T 4T 5T 6T 7T MAE143A Signals & Systems Winter 2016 4-2T -T (t nt ) t

The Fourier transform (Roberts Chap 10) Generalization of the Fourier series to non-periodic function only one single, very long period T!1 X( )= X(ω) is like the line spectrum with zero spacing between harmonic elements Still represents the signal as a sum of exponentials Requires absolute integrability of x(t)- finite energy Inverse Fourier transform x(t) = 1 2 Z 1 1 Z 1 x(t)e j 1 t dt X(!)e j!t d! MAE143A Signals & Systems Winter 2016 5

The Fourier transform - example Two-sided decaying exponential x(t) =e t 5, t 2 ( 1, 1) X(!) = = = X(!) = Z 1 1 Z 0 1 1 j! 1 e t 5 e j!t dt e t 5 j!t dt + 5 2 5! 2 + 1 25 + 1 j! + 1 5 Z 1 0 e t 5 j!t dt MAE143A Signals & Systems Winter 2016 6

The Fourier and Laplace transforms For a one-sided signal x(t)with Laplace transform X (s) X(!) =X (s) s=j! Note that this is a signal property It mimics the Laplace transform and frequency response relationship for causal systems Y (!) =H(j!)U(!), H(!) =F(h(t)) The interest in Fourier transforms is in the infinite-time response to periodic inputs Special Fourier transforms F[ (t)] = 1, F[cos! 0 t]= [ (!! 0 )+ (! +! 0 )] F[1] = 2 (!), F[sin! 0 t]=j [ (!! 0 )+ (! +! 0 )] MAE143A Signals & Systems Winter 2016 7

Bandlimited signals Signals, x(t), whose Fourier transform, X(ω), is zero for frequencies outside a value, the bandwidth, B, i.e. X(!) = 0 for {! >B} [ {! < B} is referred to as bandlimited A periodic signal with line spectrum zero outside the bandwidth B is also referred to as bandlimited Bandlimited implies a level of smoothness Fourier series: finite power, periodic Fourier transform: finite energy, one-shot MAE143A Signals & Systems Winter 2016 8

Fourier transform of a sampled signal The spectrum of a perfectly sampled signal x s (t) is a repeated and scaled version of X(ω) Bandlimited signal bandwidth B<ω s /2 X(ω) X s (ω) ω -ω s 0 Signal with bandwidth B>ω s /2 ω s 2ω s ω X(ω) X s (ω) ω -ω s 0 Expect trouble in reconstruction of x(t) from x s (t) ω s 2ω s ω MAE143A Signals & Systems Winter 2016 9

Reconstructing sampled bandlimited signals Reconstruction of the original signal from samples X s (ω) x s (t) x(t) -ω s 0 -B ω s We can reconstruct using an ideal lowpass filter This only works if B 2ω s ω! s 2B H(!) Lowpass Filter Bandwidth B A signal of bandwidth B can be reconstructed completely and exactly from the sampled signal if the sampling frequency ω s is greater than 2B Nyquist s Sampling Theorem! s =2B is called the Nyquist sampling frequency MAE143A Signals & Systems Winter 2016 10

Sampling and reconstruction If the continuous-time signal is bandlimited to B and we sample faster than the Nyquist frequency Then we can exactly reconstruct the original signal from the sample sequence Conversely: if we sample at or more slowly than the Nyquist frequency then we cannot reconstruct the original signal from the samples alone We might have other information that helps the reconstruction. Without such extra information we suffer from Aliasing some frequencies masquerading as others MAE143A Signals & Systems Winter 2016 11

Aliasing Sampling rate is less than the Nyquist rate Spectra overlap in sampled signal Impossible to disentangle Signals from above ω s /2 masquerade as signals of a lower frequency This is what happens to wagon wheels in western movies f s =30Hz but the passing rate of the spokes is greater than this Dopplegänger and impersonation Alias: a false or assumed identity Samuel Langhorne Clemens alias Mark Twain 5.5KHz sampled at 10KHz a.k.a. 4.5KHz MAE143A Signals & Systems Winter 2016 12

Aliasing II MAE143A Signals & Systems Winter 2016 13

Dealing with aliasing Anti-aliasing filters Before we sample a signal x(t) at f s we lowpass filter it through a filter of bandwidth B f s /2 This is straightforward but not simple 1. An ideal lowpass filter has non-timelimited non-causal response 2. A timelimited signal has a Fourier transform of unbounded support in frequency 3. We can only approximately lowpass filter 1. We need to worry about roll-off near f s /2 2. We have to back off from f s /2 3. Fast roll-off is accompanied by passband ripple You cannot remove aliasing after sampling MAE143A Signals & Systems Winter 2016 14

Aliasing in practice Any data-logging equipment worth a dime has antialiasing filtering built in It is switched in at sample-rate selection time and is handled by the equipment software DSpace, LabView, HP analyzers Often this (and timing questions) limits the available sampling rates High-performance data acquisition is an art The data quality near Nyquist is dodgy So why do we need to know about aliasing? Because of the mistakes you can/might/will make!! MAE143A Signals & Systems Winter 2016 15

Downsampling scenario An email arrives containing two columns of data sampled at 44.1KHz You look at it and figure that it is oversampled and that most of the interesting information is in the range less than 10KHz in the signal This would be captured by data sampled at 22.5KHz So you toss out every second sample Now it is the same data sampled at half the rate Let us try this out with a former Hilltop High student MAE143A Signals & Systems Winter 2016 16

Downsampling Original data at 44.1KHz Downsampled data at 22.05KHz Decimated data at 22.05 KHz Difference at 22.05 KHz Between downsample and decimate MAE143A Signals & Systems Winter 2016 17

Decimation instead of downsampling The mistake earlier was that the reconstructed content of the 44.1KHz data contains signals in the range 0-20KHz roughly Downsampling to 22KHz and then reconstructing should yield signals in the 0-10KHz range The 10-20KHz material has been aliased into 0-10KHz Before downsampling we should filter the data with a lowpass digital filter of bandwidth ~10KHz This is called decimation MAE143A Signals & Systems Winter 2016 18

Matlab s decimate >> help decimate decimate Resample data at a lower rate after lowpass filtering. Y = decimate(x,r) resamples the sequence in vector X at 1/R times the original sample rate. The resulting resampled vector Y is R times shorter, i.e., LENGTH(Y) = CEIL(LENGTH(X)/R). By default, decimate filters the data with an 8th order Chebyshev Type I lowpass filter with cutoff frequency.8*(fs/2)/r, before resampling. Y = decimate(x,r,n) uses an N'th order Chebyshev filter. For N greater than 13, decimate will produce a warning regarding the unreliability of the results. See NOTE below. Y = decimate(x,r,'fir') uses a 30th order FIR filter generated by FIR1(30,1/R) to filter the data. Y = decimate(x,r,n,'fir') uses an Nth FIR filter. Note: For better results when R is large (i.e., R > 13), it is recommended to break R up into its factors and calling decimate several times. MAE143A Signals & Systems Winter 2016 19

Matlab s downsample >> help downsample downsample Downsample input signal. downsample(x,n) downsamples input signal X by keeping every N-th sample starting with the first. If X is a matrix, the downsampling is done along the columns of X. downsample(x,n,phase) specifies an optional sample offset. PHASE must be an integer in the range [0, N-1]. Downsampling is asking for trouble with physical signals It is a common mistake made by people It is not really forgivable though No graduate of MAE143A has ever admitted to me to making this mistake MAE143A Signals & Systems Winter 2016 20

A chirp example in Matlab A chirp from100 Hz to 11,250 Hz over 4 seconds Sampled at 22,500 Hz Sampled at 11,250 Hz Sampled at 5,625 Hz Downsampling and decimation MAE143A Signals & Systems Winter 2016 21

Discrete Fourier transform X k = NX 1 n=0 x[n] = 1 N x[n]e jk 2 N n, k =0, 1,...,N 1 NX 1 k=0 X k e jn 2 N k, n =0, 1,...,N 1 DFT: N signal samples in and N transform values out Related to DTFT X k = X( ) = 2 k N Inverse DFT: N in values and N time samples out N is referred to as the record length If {x[n]} is real then X k = X k MAE143A Signals & Systems Winter 2016 22

Interpretation of the DFT N-sample data record {x 0,x 1,...,x N 1 } x 0 x 1 x 2 x N 1 x 0 x 0 x 0 0 T 2T (N-1)T } time Periodic repetition forever What is the Fourier series? Period of this repetition is NT time } } } period NT period NT period NT period NT x rep (t) = 1X n= 1 x[n mod N] (t nt ) MAE143A Signals & Systems Winter 2016 23

The Discrete Fourier Transform The DFT of an N-sample (real) signal record is an N element (complex) transform record is the Fourier series of the periodic (sampled) signal repeated over and over again in both directions is N-periodic in frequency bin (k) We cannot resolve frequency more finely because there are only N data The frequency data have a conjugate relation X k = X k Plotting Xk is a line spectrum as if the data were N-periodic MAE143A Signals & Systems Winter 2016 24

DFT The DFT allows analysis of a data record by computing the Fourier series as if the data record were one period of an infinite periodic sequence This is good for capturing periodic phenomena in the data provided you have an integer number of periods in the data It is easy to be misled Especially if you forget the above explanation The DFT is a fundamental tool in data analysis There is a huge number of helper functions in matlab MAE143A Signals & Systems Winter 2016 25