c J.

Fessler, May 27, 2004, 13:10 (student version)

0.1

EECS 451 Digital Signal Processing and Analysis Lecture Notes J. Fessler DSP is everywhere, and hardly needs a motivating introduction these days: modems, cell phones, computer sound cards, digital video. Course Overview • 2 Discrete-time signals • 2 Discrete-time systems (LTI, convolution) • 3 z-transform • 4 Discrete-time Fourier transform (DTFT) • 8 Filter design • 5 Discrete Fourier transform (DFT) • 6 Fast Fourier transform (FFT) • 9 A/D and D/A (sampling, quantization, reconstruction) • Multirate signal processing (upsampling, downsampling) • Image processing (as time permits)

. . . . . . .3 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quantization of continuous-amplitude signals . . . . . . . . . . .11 1.} • square root of −1:  1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analog to Digital and Digital to Analog Conversion . . . . . . . . . . . . . Basic Elements of a DSP System . . . . . . . . . . . . . . . . .7 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 1. . . . . . . . . . . Systems. . . .1 . . . . . . . . . . . . . . . . . . . Coding of quantized samples . . Continuous-Time Sinusoidal Signals . . . . . . . . . . Quantization of sinusoidal signals . . . . . . . . . . . . . . . . . . . . . . .10 1. . . . . . . . . . . .11 1. . . . . . . . . . . . . . . . . . Energy and power . . . . . . . . . . . . . . . .Chapter 1 Introduction Contents Notation . . . . . . . . . . . . . . . . . Value characteristics . . . . . . . . . . .5 1. . . . . . . . . . .12 Notation • set of real numbers: R • set of complex numbers: C • set of integers: Z • set of natural numbers: N = {1. . . . . . . . . . . . . . . . . . . . . . . . . .11 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 1. . . . Time characteristics . . . . . . . .11 1. . . . . . . . . . . . . . . . . . Dimensionality . . . . . . . . . . . . and Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 1. . . . . . . . . . . . . . . . .12 1. . . . . . . . . . . . Deterministic vs Random signals . . . . . . . . . Classification of Signals . . . . . . . . . . . . Instantaneous frequency . . . . . . . . . . . . . . . . . . Signals. . . . . . . . . . . . . D/A conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other types of classifications . . . . . . . . . . . . . . . . . . . . . 1. . . . . . . . .8 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Periodicity . . . . . . . . . . . . . . . Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 1. . . . . . . . . . . . . . . . . . . . . . . . .4 1.11 1. . . . . . . . . . . . . .6 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . Analysis of digital signals and systems vs discrete-time signals and systems Summary . . . . . Sampling Analog Signals . . . . . . . . . . . . . . . . . . . . . . .12 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discrete-Time Sinusoidal Signals . . . . . . 2. . . . . . . . . . . . .7 1. . . . . . . . .11 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Sampling Theorem . . . . . . . . . . . . . . . . . . .6 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advantages of Digital over Analog SP . . . . . . .2 1. .

the frequency is time-varying. 1. Example. e. Fessler. We call this type of application signal analysis or signal classification. however.) Example.1. Programmable . Why digital over analog? Cheaper. In this case the input and output signals for the system are different physical quantities. More reliable. Often higher precision. 2004. Systems. The human ear converts acoustic signals into electrical nerve synapses (another signal) that are processed by the brain. For an audio amplifier. 13:10 (student version) Overview • Defines terms. This course will emphasize signal processing methods for digital signals . ideally the output signal is “simply” an amplified version of the input signal. the 300 cos(2π2t) term represents the eeh-ooh-eeh-ooh periodic variation in pitch. Example: An approaching ambulance siren produces a time-varying change in acoustic pressure that our ears perceive as sound. But implementing this in analog hardware with minimal distortion is nontrivial. Often when we discuss signals we refer to the mathematical representation of the physical quantity. But usually we think of signals as representing some “physical” quantity that varies with time or space (or any other independent variable or variables). One of the main roles of electrical engineers is to design and analyze systems that take some input signal and produce some related (but almost always different) output signal. and mathematical content of text fairly closely.. Often. These notes will follow organization.” and extend concepts to 2D for image processing. (On paper it is easy: sout (t) = asin (t).2 c J.g.1 Signals. and the 10t term represents increasing pitch due to the Doppler effect as the ambulance approaches. a signal is just a function. signals are very complicated and not easily described by a concise mathematical formula. The point is that the primary physical attributes can often be captured in a mathematical representation that we call a signal. We refer such operations as signal processing. DSP • Basic elements of a DSP system • Basic types of signals • Frequency • Sampling A/D and D/A conversion Much of this chapter is review of 206/306. The input to a fingerprint recognition system is an image of a fingerprint. Example. or a list of likely matches. A simplified representation of the siren signal is s(t) = (1 + t) cos(2π[1000 + 10t + 300 cos(2π2t)]t) The (1 + t) amplitude term represents increasing loudness as the ambulance approaches. so it will covered only briefly in lecture. Example. They will fill in the “whys. The tone controls (bass treble) in an audio amplifier perform filtering of an audio signal (represented as analog voltages in the amplifier). In this case the input and output signals are both voltage waveforms. The “output” is (most likely) some bits within a digital device that correspond to the identity of the person with that fingerprint. A system is a physical “device” that performs an operation on a signal. the sinusoidal term represents the siren oscillation. notation. .flexible. and Signal Processing Mathematically speaking.to be defined soon. May 27.

2 Advantages of Digital over Analog SP • Programmable .1. 13:10 (student version) 1. 2004. a DSP system usually needs an interface between the analog physical world and the digital computer world. In a speech recognition system the analog voice signal (from microphone) is digitized. Example.3 1. so a DSP system designer must consider the tradeoff between cost and performance. 10% tolerance resistors and other passive circuit elements) • Can store. but less music on CD. since they limit the speed and accuracy of a DSP system. Typical digital signal processing system Analog input Digital input Digital output Analog output → A/D → → DSP → → D/A → xa (t) x[n] y[n] ya (t) Often the final D/A step is not needed. punctuation. i. Example. temperature drifts of analog components). the A/D and D/A interfaces are the “Achilles heel” of DSP. • Cheaper (sometimes).flexible (“just” a software change rather than complete redesign) • Often more accurate (higher precision) (cf. duplicate digital signals with no (additional beyond A/D) loss of fidelity. • More reliable (cf. Higher sampling rate might give higher quality. due to flexibility.. 1. . transmit. numbers.1 Basic Elements of a DSP System Typical analog signal processing system: Analog input signal Analog output signal → Analog signal processor → xa (t) ya (t) In EE (since after all the first E in EE is electrical) typically the input and output signals are voltages or currents.e.1.c J. Although DSP systems have many advantages over analog SP. Fessler. May 27. and then the processing converts the digital signal into ASCII characters representing letters. Music CD at 44kHz. etc. but faster and more accurate A/D chips are also usually more expensive. Since most physical quantities are analog. Of course the speed and accuracy of A/D converters is continually increasing with improvements in circuit technology.

the space of values the function can take. y. it is a (scalar valued) function of two spatial coordinates x and y and of time t. We will also consider images. 2004. t).. Example.e.g. • An M -dimensional signal is a function of M independent variables.2.. Range dimension We can also classify signals by the dimension of the range of the function. i. so it is a 3D signal. time.1 Dimensionality Domain dimension We can classify signals by the dimension of the domain of the function. how many arguments the function has. An audio signal xa (t) is a one-dimensional. 13:10 (student version) 1. 1. We will focus on scalar signals in this course. which we call an image. e. A color TV picture can be described by a red. • A one-dimensional signal is a function of a single variable. Example. generally considering the independent variable to be time t. e. since it is a function of two spatial coordinates.1.. • scalar or single-channel signals • real-valued scalar • complex-valued • multichannel signals • real vector • complex vector Example. or 1D.2 Classification of Signals A signal is a function of one or more independent variables.4 c J. Fessler. whereas a BW TV picture is scalar valued. . May 27. since it is a function of time.. What is an example of a 3D signal? A “black and white” movie is a time-varying sequence of pictures I(x. both real and complex.e.. y). We will focus on one-dimensional signals in this course. f (x. Most of the design/analysis techniques generalize to multichannel and multidimensional signals. i.e.g. A color photograph is a two-dimensional (2D) signal. signal. which are 2D signals. blue and green signal. i. Example. so it is a three-channel signal.

.2 Time characteristics (type of domain) • Continuous-time signals or analog signals Defined for all times t ∈ (−∞. 6.5n . ∞). n = 5. Fessler. Example. to denote time instants where signal is defined.   0. we refer to continuous-space functions f (x. Discrete-time signals arise as follows. In this case we can (and will) use the short hand x[n] as follows: x[n] = xa (tn ) = xa (nT ) . . . 2004. m ∆). and x[n] would be the number. • Sampling a continuous signal at discrete time instants. y) is scanned by a digital scanner. . When counting number of heart attacks per month. When a “black and white” photograph with intensity f (x. For images. . Some authors use the notation xn or x(n). the output of the scanner is a digital image x[n. In this course we focus on uniformly spaced time samples tn = nT. • Accumulating a quantity over a period of time Example. where ∆ denotes the sample spacing. 1. . “72 dots per inch” means ∆ = 1/72 inches.. m]. . where T denotes the time-spacing between samples.g. xa (t) = e−t . y) and discrete-space functions x[n. b).5 1. ±2. n would index the month. Picture • Discrete-time signals Defined only at certain specific values of time. ±1. 13:10 (student version) 1. Typically use tn . −∞ < t < ∞.2. or at least over some continuous interval (a. Example. m] consisting of uniformly-spaced samples of the original image: x[n. n = 0.  0.  n < 0.   1 n = 0. 2. x[n] = Picture n = 3. May 27. e. 4  0. 2 Example. m] = f (n ∆.c J.

An 8-bit A/D converter can represent 28 = 256 different values. it is also reasonable to say that its fundamental period is ∞. it is natural to say that the “fundamental period” of this signal is N = 1. or N -periodic. Example. A digital signal is a discrete-time signal that is also discrete-valued.g. • A discrete-valued signal only takes values from a finite set of possible values. • The energy of an image x[n. e.2. ∀n ∈ Z. m]| . 2. Energy and power For concepts that were introduced in detail in 1D in 206. A constant signal. May 27. From a timedomain perspective. from a frequency-domain perspective. we say x[n. • A binary signal only takes two values.. e. although reducing noise (eliminating a random component) is often a goal in a DSP system. In fact it is N -periodic for every N ∈ N. Other types of classifications 1. Fessler. m] is defined as ∞ ∞ Ex = n=−∞ m=−∞ |x[n. 2004. If the input to a DSP system is originally an analog signal (e. In heart attack example above. m] is an power signal. we say x[n. . then the A/D converter will convert the analog signal to digital form by quantizing its values to a finite discrete set of values. m] is defined as Px = lim 1 N →∞ (2N + 1)2 N N |x[n.4 Deterministic vs Random signals • Deterministic signals can be described by an explicit mathematical representation.g. The 1D versions can be obtained easily from the 2D versions. these notes will sometimes present only the 2D versions. the signal is called aperiodic. The smallest such N is called the fundamental period of the signal. 13:10 (student version) 1. m]| .. n=−N m=−N 2 • If 0 < Px < ∞. m] is an energy signal. x[n] could be 0. an acoustic voice signal that has been converted to a voltage signal by a microphone). x[n] = c. population of world.1. is a degenerate type of periodic signal. Example: “Hiss” or “noise” in an audio system.3 Value characteristics (type of range) • A continuous-valued signal can take any value in some continuous interval. voltage between 0 and 5 volts. 1. Periodicity A discrete-time signal x[n] is called periodic with period N ∈ N. . . . if and only if x[n] = x[n + N ]. 2 • If Ex < ∞. Which definition is used is not particularly important in practice. Each value of the input signal must be rounded to the nearest of the 256 output values.2. Example..6 c J. • The average power of an image x[n.g. If no such N exists. We will focus on deterministic signals. However. • Random signals evolve over time in an unpredictable manner. .

and continuous-time. But for complex exponential signals we must allow the frequency F0 to be both positive and negative. 2004.t. i. Fessler.5 x (t) 0 a −0.e. the frequency F0 is usually taken to be nonnegative. The above relationships also hold for complex exponential signals xa (t) = A e(2πF0 t+φ) where by the Euler identity e±θ = cos θ ±  sin θ.5 1. • A2 Continuous-time sinusoidal signals with distinct (different) frequencies are distinct.3 Frequency There are similarities and differences between the meaning of frequency for continuous-time and discrete-time signals. 1.3. A=2.7 1. there will be more periods in a given time interval. • A3 Increasing the frequency F0 increases the rate of oscillation. θ=0..e. .. Ω=1.c J. i.5 −2 −10 −8 −6 −4 −2 0 t 2 4 6 8 10 Properties of analog sinusoidal signals. ∞ < t < ∞ • A is the amplitude • φ is the phase in radians • F0 is the frequency in Hz (cycles per second) Some books express the frequency in radians per second using Ω = 2πF0 . 13:10 (student version) 1.5. 2 A cos(Ω t + θ). May 27. If F 1 = F2 (and both have the same sign) then ∃t0 s. • A1 The signal xa (t) is periodic for any fixed value of F0 . xa (t + T0 ) = xa (t) where T0 = 1/F0 is the fundamental period of the signal.5 −1 −1.1 Continuous-Time Sinusoidal Signals Consider an analog continuous-time sinusoidal oscillation xa (t) = A cos(2πF0 t + φ). For sinusoidal signals.5 1 0. A cos(2πF1 t0 + φ) = A cos(2πF2 t0 + φ). Point: to begin to see similarities and differences between discrete.

f=1/12 1.5 −1 −1. θ=π/3 ω=2π f. • B1 A DT sinusoidal signal x[n] is periodic if and only if its frequency ω is 2π times a rational number.3. A=2. ω0 N = 2πM . . skip Sinusoidal discrete-time signal with frequency ω0 is periodic iff ∃N s. θ=π/3 ω=π/6.e. • • • • n is an integer variable called the sample number A is the amplitude φ is the phase in radians ω is the frequency in radians per sample Sometimes we express the frequency in cycles per sample using f .5 −2 −20 −15 −10 −5 0 n 5 10 15 20 Why periodic only for rational frequencies? Proof. ±2. Since cos is periodic with fundamental period 2π. i. i. ±1. cos(ω0 n + φ) = cos(ω0 (n + N ) + φ) = cos(ω0 n + φ + ω0 N ) .t. n = 0.5 −2 −20 −15 −10 −5 0 n 5 10 15 20 Properties of discrete-time sinusoidal signals. 13:10 (student version) 1.5 x(n) 0 −0.e. 2 A cos(ω n + θ). .5 x(n) 0 −0. N ∈ Z. 2004. where ω = 2πf.1. Thus the frequency must be a ratio of two integers..t. 2 A cos(ω n + θ).2 Discrete-Time Sinusoidal Signals A discrete-time sinusoidal signal may be expressed x[n] = A cos(ωn + φ).8 c J. May 27. .5 −1 −1.5 1 0. ∃ an integer M s. ω = 2πM/N for M. f=1/(4π) 1.5 1 0. and hence rational. Fessler.. A=2. or equivalently ω0 = 2πM/N .12 Picture of discrete-time sinusoid 1. the above relationship holds iff ω 0 N is an integer multiple of 2π. .

” Example. multiply by the sampling rate Ts = 1/Fs . May 27. If no such ratio. such as the period N . then ω0 2π is irrational and the DT sinusoidal signal is aperiodic. seconds).9 Skill: Finding the fundamental period of a DT sinusoidal signal. Then N will be the fundamental period (in samples). from units “samples” to time units (e. 2004. If ω2 = ω1 + k2π then cos(ω2 n + φ) = cos((ω1 + 2πk)n + φ) = cos(ω1 n + φ + 2πkn) = cos(ω1 n + φ) since cos is 2π periodic.c J. Hence we refer to such signals as aliases. Any DT sinusoidal signal with frequency outside the range 0 ≤ ω ≤ π is identical to a DT sinusoidal signal with a frequency within that range (possibly with the negative phase).. we usually take the frequency to be nonnegative. since they are “the same signal with a different name. Discrete-time sinusoidal signals with frequencies in the range 0 ≤ ω ≤ π are distinct. . Picture DT complex exponential signals: x[n] = A e(ωn+φ) For sinusoidal signals. we allow the frequency ω to be both positive and negative. • B2 DT sinusoidal signals with frequencies separated by an integer multiple of 2π are identical (indistinguishable). cos 19π n+ 7 9π n+ cos 7 π 3 π 3 = = 5π 5π π π n + 2πn + n+ = cos 7 3 7 3 −9π 5π π π n− n − 2πn − cos = cos 7 3 7 3 cos = cos 5π π n− 7 3 • B3 The highest rate of oscillation of a discrete-time sinusoid is attained when ω = π. To convert a quantity.g. Express ω0 = 2πM/N. Fessler. where M ∈ Z and N ∈ N and M and N have no common divisors. 13:10 (student version) 1. For complex exponential signals.

015 Three distinct CT sinusoidal signals whose DT samples are identical. Fessler.1. the instantaneous frequency is given by Ft = Example.01 0. 2004. = 2αt.005 0. meaning that the instantaneous frequency is increasing (linearly) with time.015 0. as usual.01 0.10 c J. This is d dt g(t) . then Example. dt = F0 . If g(t) = F0 t. then called a chirp signal. 13:10 (student version) Aliasing illustrated 10 5 x0(t) 0 −5 −10 0 10 5 x1(t) 0 −5 −10 0 10 5 x2(t) 0 −5 −10 0 Aliasing of sampled sinusoidal signals 0.015 0. Instantaneous frequency For a “sinusoidal” function of the form xa (t) = cos(2πg(t)). May 27. d dt g(t) d g(t). If g(t) = αt2 .005 t 0.01 0.005 0.

. • Coding the discrete-valued signal using a unique binary sequence for each element in the set of possible values.) Its reciprocal. Fs = 1/Ts is called the sampling rate or the sampling frequency. what is bit rate out of coder? bFs (bits/sample) (samples/sec) 1. at least conceptually. the signal must be converted into digital form. • Quantizing the sampled signal to form a discrete-time. . . xa (t) x[n] xq [n] • Sampling the analog signal at discrete time instants. A/D converters are often preceded by an anti-aliasing filter that is a low-pass filter with cutoff frequency appropriately coupled to the sampling rate of the A/D converter. and • we can exactly recover (in principle) the analog signal xa (t) from such samples using the following formula: ∞ xa (t) = n=−∞ x[n] 2Fmax sinc(2Fmax (t − n/Fs )) Fs where x[n] = xa (n/Fs ) and sinc(t) = The sampling rate Fs = 2Fmax sin(πt) . 13:10 (student version) 1.4. This process is called analog-to-digital (A/D) conversion and the corresponding devices are called A/D converters or ADCs.4.e. An A/D converter has the following components.4. Xa (F ) = 0 for |F | > Fmax .1 Sampling Analog Signals Ideal periodic sampling or uniform sampling is defined by x[n] = xa (nTs ) where Ts is the sampling period or sampling interval. But if xa (t) = sin(2πFmax t + θ). . then it is sufficient to sample at Fs ≥ 2Fmax . If signal quantized to 2b levels. i.4 Quantization of sinusoidal signals 1. Skim aliasing discussion for now. but not always. then we need Fs > 2Fmax . 2004. πt is called the Nyquist rate. May 27.c J. 9 for practical discussions of sampling.11 1. discrete-valued signal. i. Because of this property. The difference between the unquantized signal x[n] and the quantized signal x q [n] is called the quantization error. The values of x q [n] are from some finite set.e. 1.2 The Sampling Theorem Is there loss of information when sampling a continuous-time signals? Yes in general. 1. to form a discrete-time signal.4. then • it is sufficient to sample at any rate Fs > 2Fmax .4 Analog to Digital and Digital to Analog Conversion Before an analog signal can be processed by a digital system.. (See Ch. if the highest frequency in xa (t) is Fmax .4. Note: if Xa (F ) does not have any Dirac delta functions at ±Fmax . The following is the Nyquist sampling theorem. Fs /2 called folding frequency. Fessler.3 Quantization of continuous-amplitude signals Quantization of audio signals illustrated in first computer assignment. Analog signal Discrete-time signal Quantized signal → Sampler → → Quantizer → → Coder → 01011 . If an analog signal xa (t) is band-limited.5 Coding of quantized samples An n-bit code can represent 2n discrete signal values. 1.

. Skim text for the above 1.7 Analysis of digital signals and systems vs discrete-time signals and systems The quantization/coding step makes analysis complicated.4. Nevertheless. it is this connection that makes DSP useful in practice. Therefore we focus initially on discrete-time but continuous-valued signals. May 27. 1. Ω=1 a 15 10 5 xa(t) 0 −5 −10 −15 0T 1T 2T 3T 4T 5T t 6T 7T a 8T 9T 10T Discrete−time signal.4. disregarding the connection to the real-world analog signal xa (t). formed by sampling: x(n) = x (nT) 15 10 5 x(n) 0 −5 −10 −15 0 1 2 3 4 q 5 n 6 7 8 9 10 Digital signal x (n).12 c J. 2004. Continuous−Time Sinusoidal Signal: x (t) = 15 sin(Ω t + θ).1. Fessler. we will focus initially on analyzing discrete-time signals and systems. 13:10 (student version) 1. formed by quantizing x(n) 16 12 8 x(n) and xq(n) 4 0 −4 −8 −12 −16 0 1 2 3 4 5 n 6 7 8 9 10 .5 Summary For simplicity.. so we will return to it later.6 D/A conversion Example: CD players and PC sound cards.

Sign up to vote on this title
UsefulNot useful