Recall Many signals are continuous-time signals Light Object wave CCD Sampling mic Lens change of voltage change of voltage 2 Why discrete time? With the advance of computer technology, we want to process signals by computer Computer can handle data, but not continuous time signals Need sampling Extract signals at some time instants Discrete-time signals 3 Why discrete time? voltage Discrete-time signal time 4.2v 4v 2v Signal is found only at some instants Computers only understand 0 and Discrete-time signal at every instant needs to be converted into digital data Need Analogue/Digital (A/D) converter 4
Typical DSP system Mic speaker Sound card with sampler (or A/D converter) D/A converter and low pass filter Processed signal 5 DSP against analogue SP Guaranteed accuracy: Control by how many bits used to represent data Prefect reproducibility No drift in performance with temperature or age Greater flexibility DSP systems can be programmed and reprogrammed to perform a variety of function, without modifying the hardware Superior performance New methods are found for processing signals in discrete domain, but hardly in analogue domain 6 Construct a DSP system Input Output Construct a DSP system Input Output Prepare all the required hardware To generate digital data for processing at the computer input To convert digital data from the computer output to analogue signal Develop SP algorithm Express input and output in mathematical form Realize the SP algorithm 7 Prepare all the required hardware Develop SP algorithm Using mathematics to figure out the solution to the problem Realize the SP algorithm Translate the algorithm into computer program Execute the program with the computer 8
Example: amplify a signal Start with an analogue signal x(t) t = 0 t = 70.5 t = 00.23 We use () to indicate that x is continuous t: a real number variable x(t): defined for all values of t, hence continuous x(0) = 0, x(70.5) = -90., x(00.23) = 8.2 9 Example: amplify a signal The sampler converts x(t) to become a discrete-time signal x[n] n = 0 n = 70 n = 00 We use [] to indicate that x is discrete n: an integer variable x[n] is defined only at some time instants since n is an integer x[0] = 0, x[70] = -90., x[00] = 8.2 0 Example: amplify a signal Example: amplify a signal Input (256 samples) Output (256 samples) Our task: Output = Input x 2 Step. develop SP algorithm Input: x[n], output: y[n] Algorithm: y[n] = x[n] 2 Step 2. realize the SP algorithm Matlab Program C CProgram 2
Discrete Signal Representation Spectrum x(t) x(t) x[n] x[n] x[n] = x(nt s ) -6T -4T -2T 0 2T 4T 6T 8T 0T Ts t -6-4 -2 0 2 4 6 8 0 n Small Ts closer samples dense sampling 3 4 Spectrum of discrete-time signals Spectrum of discrete-time signals x(t): aperiodic continuous-time signal x[n]: samples of x(t) Fourier transform j t Xp Ts x(t)e dt x[n]e or j nts X p ˆ n x[n]e jˆ n tnt s n Normalized radian frequency ˆ T s 5 x(t): aperiodic continuous-time signal x[n]: samples of x(t) Spectrum of x(t): aperiodic X Spectrum of x[n]: periodic p X ˆ 2k x[n]e n j( ˆ 2k)n p ˆ n j ˆ n j2nk x[n]e e X ˆ p( ) n x[n]e 6 jˆ n
Spectrum of discrete-time signals Relationship Periodic -2 X( ˆ ) p ˆ T 0 s 2 Relationship between the spectrum of x(t) and the spectrum of x[n]? X( T) X( 2k/T) p s s Ts k X( 2 / T s ) T s s X( ) T 7 X( 2 / T s ) T s 8 Relationship 9 20
Shannon sampling theorem A real signal is sampled at frequency f s =/T s The signal has frequency components beyond /T s The frequency components beyond /T s will affect other replicas in the spectrum Alias effect: original signal cannot be reconstructed even with an ideal low pass filter 2 22 Shannon sampling theorem Shannon sampling theorem If a real signal is sampled at frequency f s =/T s and the maximum frequency of the signal is at frequency fmax, then 2f max /Ts 2f f or f 2f max s s max A continuous-time aperiodic signal x(t) with frequencies no higher than f max can be reconstructed exactly from its samples x[n] = x(nt s ) if the samples are taken at a rate f s = /T s that is greater than 2f max Nyquist rate: 2f max 23 24
Example Example 2 Time Domain Frequency Domain Time Domain Frequency Domain Resulted signal Resulted signal Ideal low pass filter Ideal low pass filter 25 26 Example 3 Time Domain Frequency Domain How to solve the aliasing problem Resulted signal Increase the sampling rate such that f s 2f max Use anti-aliasing filter f Pre-filter the input signal first no frequency components beyond /T s Ideal low pass filter A/D Digital Signal Processor D/A Prefilter Postfilter 27 28
29 30 References Appendix A: Inverse DFT M.J. Roberts, Fundamentals of Signals & Systems, McGraw-Hill, 2008. Chapters and 4 James H. McClellan, Ronald W. Schafer and Mark A. Yoder, Signal Processing First, Prentice-Hall, 2003. Chapters 4, 2, 3 3 32