<<

COURSE NAME DIGITAL PROCESSING

COURSE CODE: EC 701

Dr. Mrutyunjay Rout Dept. of and communication Engineering NIT Jamshedpur

NIT Jamshedpur 1 Course Description UNIT-I: DSP Preliminaries, Sampling, DT , sampling theorem in time domain, sampling of analog signals, recovery of analog signals, and analytical treatment with examples, mapping between analog to digital , representation of signals as vectors, concept of Basis function and orthogonality. Basic elements of DSP and its requirements, advantages of Digital over Analog . UNIT-II: Discrete Fourier Transform, DTFT, Definition, Frequency domain sampling , DFT, Properties of DFT, circular convolution, linear convolution, Computation of linear convolution using circular convolution, FFT, decimation in time and decimation in frequency using Radix-2 FFT algorithm, Linear filtering using overlap add and overlap save method, Introduction to Discrete Cosine Transform UNIT-III: Z transform, Need for transform, relation between Laplace transform and Z transform, between Fourier transform and Z transform, Properties of ROC and properties of Z transform, Relation between pole locations and time domain behaviour, causality and stability considerations for LTI systems, Inverse Z transform, Power series method, partial fraction expansion method, Solution of difference equations. UNIT-IV: IIR Filter Design, Concept of analog filter design (required for design), Design of IIR filters from analog filters, IIR filter design by approximation of derivatives filter design by impulse invariance method, Bilinear transformation method, warping effect. Characteristics of Butterworth filters, Chebyshev filters and elliptic filters, Butterworth filter design, IIR filter realization using direct form, cascade form and parallel form, Finite word length effect in IIR filter design. UNIT-V: FIR Filter Design, Ideal filter requirements, Gibbs phenomenon, windowing techniques, characteristics and comparison of different window functions, Design of linear phase FIR filter using windows and frequency sampling method. FIR filters realization using direct form, cascade form and lattice form, Finite word length effect in FIR filter design, Multirate DSP, Introduction to DSP Processor Concept of Multirate DSP, Sampling rate conversion by a non-integer factor, Design of two stage sampling rate converter, General Architecture of DSP, Introduction to Code composer studio, Application of DSP to Voice Processing, Music Processing, Image processing and Radar processing 2 NIT Jamshedpur Books

Text Books: 1. John G Proakis and Manolakis, “ Processing Principles, Algorithms and Applications”, Pearson, Fourth Edition, 2007. 2. S.Salivahanan, A. Vallavaraj, and C. Gnanapriya, “Digital Signal Processing”, TMH/McGraw Hill International, 2007. Reference Books: 1. S.K. Mitra, “Digital Signal Processing, A -Based Approach”, Tata Mc Graw Hill, 1998. 2. Ifaeachor E.C, Jervis B. W., “Digital Signal processing: Practical approach”, Pearson publication, Second edition, 2002. 3. Johny R. Johnson, Introduction to Digital Signal Processing, PHI, 2006.

NIT Jamshedpur 3 Lecture: 1-8

Introduction to Digital Signal Processing

NIT Jamshedpur 4 Lecture: 1-8 ➢ Signal processing emerged soon after World War I in the form of electrical filtering. ➢ With the invention of the digital computer and the rapid progress in VLSI technology during the 1960s, a new way of processing signals the signal processing is term as digital signal processing. ➢ Digital signal processors take the real world signals like audio, , speech etc., that have been sampled and quantized and then mathematically manipulate them. ➢ Signals need to be processed so that the information that they contain can be displayed, analyzed, or converted to another type of signal that may be of use.

NIT Jamshedpur 5 Lecture: 1-8 What is Signal? • Anything that carries information and represents as a function of independent variables such as time, space, temperature, pressure, etc. • Any physical quantity that can be varied in such a way as to convey information. • A signal is any quantity that depends on one or more independent variables.

NIT Jamshedpur 6 Lecture: 1-8 Example of Signal • A signal represents the strength of an electromagnetic wave that depends on one independent variable, namely time is a 1-D signal. • Image is a 2-D signal. • A video signal is a 3-D signal. • Natural signals: ✓ Signals produced by the brain and heart ✓ Signals originating in galaxies, astronomical images etc. ✓ Speech signals, sounds made by dolphins ✓ Signals produced by lightning, the atmospheric pressure etc. • Man-made signals: ✓ Signals originating from satellites, radio, telephone, TV ✓ Signals due to ECG, EEG etc. ✓ signals generate from musical instruments

NIT Jamshedpur 7 Lecture: 1-8 • Signal Processing: Process of operation in which the characteristics of a signal such as amplitude, shape, phase, frequency, etc. undergoes a change. OR Signal processing is the analysis, interpretation and manipulation of any signals like sound, images etc. • Types of signal processing: ✓ Analog Signal Processing ✓ Digital Signal Processing

Analog Signal Analog Signal Analog Output X(t) Processing Signal y(t) Analog Input Sample and A/D Digital Signal D/A Analog Signal Hold Converter Processor Converter Output X(t) Signal y(t) • Digital Signal processors (DSP) take real-world signals like audio, video, pressure, temperature etc. that have been digitized and then mathematically manipulate them NIT Jamshedpur 8 Lecture: 1-8 Components of a DSP System

NIT Jamshedpur 9 Lecture: 1-8 • Advantages of Digital Signal Processing: ✓Greater Accuracy ✓Cheaper ✓Ease of Data storage ✓Easy Operation ✓Flexibility ✓ • Limitations of Digital Signal Processing: ✓Antialiasing Filter ✓ limited by Sampling Rate ✓Quantization Error

NIT Jamshedpur 10 Lecture: 1-8 • Applications of Digital Signal Processing: ✓In Communication ✓Consumer Application (e.g., TV, FM radio etc.) ✓Image processing ✓In Biomedical ✓In Radar and ✓In Speech and Music

NIT Jamshedpur 11 Lecture: 1-8 • Any unwanted signal interfering with the main signal is termed as . So, noise is also a signal but unwanted. • Classification of Signals: Depending on the independent variables and the value of the function defining the signal.

1. Continuous-Time (CT) and Discrete-Time(DT) Signals 2. Continuous-valued and Discrete-valued Signals 3. Multichannel and Multidimensional Signals 4. Deterministic and Random Signals

NIT Jamshedpur 12 Lecture: 1-8 Continuous-Time (CT) and Discrete-Time (DT) Signals: • Continuous-Time (CT) Signal: ➢ A CT Signal is a signal that is defined at each and every instant of time. It can be represented as x(t), where t is the independent variable. ➢ This type of signal shows continuity both in amplitude and time. These will have values at each instant of time. Sine and cosine functions are the best example of Continuous time signal.

NIT Jamshedpur 13 Lecture: 1-8 Continuous-Time (CT) and Discrete-Time (DT) Signals: • Discrete-Time (DT) Signals: ➢ A DT signal is a signal that is defined at discrete instant of time. It can be represented as x(nT), where n is an integer and T is the time interval between two consecutive signal values (Sampling period). ➢ This type of signal shows continuity in amplitude but discrete in time. ➢ Relationship between time variables t and n of CT and DT signals.

NIT Jamshedpur 14 Lecture: 1-8 Representation of Discrete-Time (DT) Signals: • Graphical Representation

• Functional Representation

• Tabular Representation n … -3 -2 -1 0 1 2 3 … X[n] … 0 0 0 1 1 1 1 …

• Sequence Representation . . . 0 0 0 ณ1 1 1 1 . . . ↑

NIT Jamshedpur 15 Lecture: 1-8 • Continuous Valued and Discrete Valued Signals: ➢ Values of CT or DT signals can be continuous or discrete. ➢ If the signal takes on all possible values on a finite or an infinite range, it is said to be a Continuous valued signal. ➢ If the signal takes a set of discrete values, it is called Discrete valued signal. ➢ Continuous time and continuous valued : Analog signal. ➢ Continuous time and discrete valued: Quantized signal. ➢ Discrete time and continuous valued: Sampled signal. ➢ Discrete time and discrete values: Digital signal.

NIT Jamshedpur 16 Lecture: 1-8 Multichannel and Multidimensional Signals: • Multichannel Signal: ➢ Signal is generated from multiple sources. ➢ For example: Electrocardiography (ECG) 3 lead and 12 lead signal.

푥1(푡) 푥 푡 = 푥2(푡) 푥3(푡)

• Multidimensional Signal: ➢ If the signal is function of one independent variable is called one dimension signal otherwise the signal is called M-dimensional signal ➢ For example: Video signal, I(x,y,t) is a 3-Dimensional signal because I is the function of three independent variables (x,y,t).

NIT Jamshedpur 17 Lecture: 1-8 Deterministic and Random Signals: • Deterministic Signal: ➢ A signal is said to be deterministic if there is no uncertainty with respect to its value at any instant of time. Or, signals which can be defined exactly by a mathematical formula are known as deterministic signals. ➢ This signal is predicted at any time.

• Random Signal: ➢ A signal is said to be Random if there is uncertainty with respect to its value at some instant of time ➢ Random signals cannot be described by a mathematical equation. ➢ Random signals are modelled in probabilistic terms. NIT Jamshedpur 18 Lecture: 1-8 Standard Discrete-Time Signals: • Unit Step Sequence:

➢ The unit step sequence can be written in terms of delayed impulses as ∞ 푢 푛 = 훿 푛 + 훿 푛 − 1 + 훿 푛 − 2 + ⋯ = σ푘=0 훿[푛 − 푘]

• Unit Sample Sequence (Impulse Sequence):

NIT Jamshedpur 19 Lecture: 1-8 Standard Discrete-Time Signals: • Unit Ramp Sequence:

• Exponential Sequence: ➢ Exponential sequence are important in representing and analyzing liner time invariant systems. ➢ An exponential signal can either have exponentially rising or falling amplitude depending upon its exponent value. ➢ The general form of an exponential sequence is given by 푥 푛 = 훼푛 ∀ 푛 . ➢ If α is real then the sequence is real.

NIT Jamshedpur 20 Lecture: 1-8 • Exponential Sequence:

NIT Jamshedpur 21 Lecture: 1-8 • Exponential Sequence: ➢ When “α” is complex, a more general case to consider is the complex exponential sequence: 푥 푛 = 퐴훼푛 where 훼 = 훼 푒푗휔표 and A = 퐴 푒푗φ

푥 푛 = 퐴훼푛 = 퐴 푒푗φ |훼|푛푒푗휔표푛 = 퐴 |훼|푛푒푗(휔표푛+φ) Polar form 푛 푛 = 퐴 |훼| cos (휔표푛 + φ) + 푗 퐴 |훼| sin (휔표푛 + φ) =Re 푥(푛) + 푗퐼푚 푥(푛) ➢ If 훼 < 1, the real and imaginary part of the sequence magnitude oscillate with exponentially decaying envelopes. ➢ If 훼 > 1, the real and imaginary part of the sequence magnitude oscillate with exponentially growing envelopes.

NIT Jamshedpur 22 Lecture: 1-8 • Exponential Sequence:

NIT Jamshedpur 23 Lecture: 1-8 • Exponential Sequence: ➢ When 훼 =1, x(n) is referred to as the discrete-time complex sinusoidal sequence and has the form:

푥(푛) = 퐴 cos (휔표푛 + φ) + 푗 퐴 sin (휔표푛 + φ) ➢ For complex sinusoidal sequence, the real and imaginary part of the sequence magnitude oscillate with constant envelopes.

NIT Jamshedpur 24 Lecture: 1-8 Operation on Discrete-Time Signals: • Signal processing is a group of basic operations applied to an input signal resulting in another signal as the output.

• The basic set of operations are: ➢ Time Shifting DT input DT Output Operation ➢ Time Scaling Signal Signal ➢ Time Reversal X(n) y(n) ➢ Signal Multiplier ➢ Signal Addition

NIT Jamshedpur 25 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Shifting: The name suggests, the shifting of a signal in time. This is done by adding or subtracting an integer quantity of the shift to the time variable in the function. • Subtracting a fixed positive quantity from the time variable will shift the signal to the right (delay) by the subtracted quantity. • Adding a fixed positive amount to the time variable will shift the signal to the left (advance) by the added quantity. DT input DT Output Delay k Signal Signal X(n) y(n)=x(n-k)

DT input DT Output Advance k Signal Signal X(n) y(n)=x(n+k)

NIT Jamshedpur 26 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Shifting (Delay): Right Shifting

DT input DT Output Delay k Signal Signal X(n) y(n)=x(n-k)

푥[n]= 0 0.25 0.75 ณ1 0.75 0.25 0 푥[n-3]= ณ0 0.25 0.75 1 0.75 0.25 0 ↑ ↑ NIT Jamshedpur 27 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Shifting (Advance): Left Shifting

DT input DT Output Advance k Signal Signal X(n) y(n)=x(n+k)

푥[n]= ณ1 2 3 4 푥[n+1]= 1 ณ2 3 4 ↑ ↑ NIT Jamshedpur 28 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Scaling: Time scaling compresses or dilates a signal by multiplying the time variable by some quantity. • If the quantity is greater than one, the signal becomes narrower and the operation is called decimation. • If the quantity is less than one, the signal becomes wider and the operation is called expansion or interpolation, depending on how the gaps between values are filled. DT input DT Output Time Scaling Signal Signal Compress the signal x(n) k=2 X(n) y(n)=x(2n)

DT input DT Output Time Scaling Signal Signal k=1/2 Expand the signal x(n) X(n) y(n)=x(n/2)

NIT Jamshedpur 29 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Scaling (Compress): Signal becomes narrower

DT input DT Output Time Scaling Signal Signal k=2 X(n) y(n)=x(2n)

푥[n]= 0 0.25 0.75 ณ1 0.75 0.25 0 푥[2n]= 0 0 0.25 ณ1 0.25 0 0 ↑ ↑ NIT Jamshedpur 30 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Scaling (Expand): Signal becomes narrower

DT input DT Output Time Scaling Signal Signal k=1/2 X(n) y(n)=x(n/2)

푥[n]= 0 0.25 0.75 ณ1 0.75 0.25 0 푥[2n]= 0 0 0.25 ณ1 0.25 0 0 ↑ ↑ NIT Jamshedpur 31 Lecture: 1-8 Operation on Discrete-Time Signals: • Time Reversal: This operation is the reversal of the time axis, or flipping the signal over the y-axis. • Folding the sequence x[n] about n=0. • Mathematically, it is expressed as x[-n] DT input Time Reversal DT Output Signal Signal X(n) y(n)=x(-n)

푥[n]= −3 − 2 − 1 ณ0 1 2 3 푥[2n]= 3 2 1 ณ0 − 1 − 2 − 3 ↑ ↑ NIT Jamshedpur 32 Lecture: 1-8 Operation on Discrete-Time Signals:

• Time –Scaling and Time- Shifting operations are not commutative. • Time-Reversal and Time-Shifting operations are not commutative. • Time –Scaling and Time-Reversal operations are commutative. • All above operations are based on transformations of the independent variable i.e., discrete time n.

NIT Jamshedpur 33 Lecture: 1-8 Sequence of Operations: Step 1: First delay or advance the signal i.e., first operation is the Time-Shifting. Step 2: Perform Time-Scaling and/or Time-Reversal on the shifted signal 푆ℎ푖푓푡 푏푦 푘 푓표푙푑 푥(푛) = 푆ℎ푖푓푡 푏푦 푘 푥(−푛) = 푥(−푛 + 푘)

퐹표푙푑 푆ℎ푖푓푡 푏푦 푘 푥(푛) = 퐹표푙푑 푥(푛 − 푘) = 푥(−푛 − 푘)

푄푢푒푠푡푖표푛: 푆푘푒푡푐ℎ 푥 −푛 + 2 푎푛푑 푥 −푛 − 2 푤ℎ푒푛 푥 푛 = ณ2 1 3 5 8 ↑

NIT Jamshedpur 34 Lecture: 1-8 Operation on Discrete-Time Signals: • Scalar Multiplication (Amplitude Scaling): The signal x(n) is multiplied by a scalar factor ‘a’.

DT input a DT Output Signal Signal X(n) y(n)=a. x(n)

• For Example: If 푥 푛 = ณ2 1 3 5 8 and a = 2 then 푦 푛 = ณ4 2 6 10 16 ↑ ↑

NIT Jamshedpur 35 Lecture: 1-8 Operation on Discrete-Time Signals: • Signal Multiplier: Multiplication of two signals to form another sequence.

DT input a DT Output Signal Signal X(n) y(n)=a. x(n)

• For Example: If 푥 푛 = ณ2 1 3 5 8 and a = 2 then 푦 푛 = ณ4 2 6 10 16 ↑ ↑

NIT Jamshedpur 36 Lecture: 1-8 Sampling Process • To be able to process a continuous valued continuous-time i.e analog signal by a digital processor, we must first sample it to generate a discrete-time signal the quantize it to get a quantized discrete-time signal. • A sampling system comprises three main components: ✓ Sampler ✓ Quantizer ✓ Encoder

NIT Jamshedpur 37 Lecture: 1-8 Sampling Process • Sampling is defined as, “The process of measuring the instantaneous values of continuous-time signal in a discrete form.” • Sample is a piece of data taken from the whole data which is continuous in the time domain. • When a source generates an analog signal and if that has to be digitized, having 1s and 0s i.e., High or Low, the signal has to be discretized in time. This discretization of analog signal is called as Sampling.

NIT Jamshedpur 38 Lecture: 1-8 Sampling Process • To discretize the signals, the gap between the samples should be fixed. That gap can be termed as a sampling period Ts. 1 • 푆푎푚푝푙푖푛푔 퐹푟푒푞푢푒푛푐푦 = = 푓푠 푇푠 • The sampling rate fs denotes the number of samples taken per second, or for a finite set of values. • For an analog signal to be reconstructed from the digitized signal, the sampling rate should be highly considered. The rate of sampling should be such that the data in the message signal should neither be lost nor it should get over-lapped. Hence, a rate was fixed for this, called as Nyquist rate. • The sampling theorem, which is also called as Nyquist theorem, delivers the theory of sufficient sample rate in terms of bandwidth for the class of functions that are bandlimited.

• 푓푠 = 2퐵 • The sampling theorem states that, “a signal can be exactly reproduced if it is sampled at the rate fs which is greater than twice the maximum frequency B.”

NIT Jamshedpur 39