principles of digital signal processing, Study Guides, Projects, Research of Digital Signal Processing

My typed notes for principles of digital signal processing

Typology: Study Guides, Projects, Research

2017/2018

Uploaded on 02/26/2018

vishal-bhoria
vishal-bhoria 🇮🇳

1 document

1 / 125

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EC 6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING
What
is a
Signal
W
e
are all immersed
in
a sea
of
signals.
All
of us from the smallest
living
unit, a cell,
to
the most complex living organism(humans) are all time
time
receiving signals and are processing them. Survival of any living
o
rganism
depends upon processing the signals appropriately. What is signal?
To
d
ene
this
precisely
is
a dicult task. Anything which carries information
is
a
s
ig-
nal. In this
course we
will
learn some of the mathematical representations o
f
the signals, which
has been found very useful
in
making information pro
cess-
ing systems. Examples
of signals are human voice, chirping of birds,
smok
e
signals, gestures (sign
l
anguage),
fragrances of the owers.
Many of our
b
o
dy
functions are regulated by
chemical signals, blind people use sense of
t
ouc
h
.
Bees communicate
by
their
dancing pattern.Some examples of modern
high
speed signals are the voltage
charger
in a telephone wire, the electromagnetic
eld emanating from a transmitting
antenna,variation of light intensity
in
a
n
optical ber. Thus we see that there
is
an
almost endless variety
of
signals and a large number of ways
in
which signals are
carried from
on
place
t
o
another
p
lace.
In
this course we
will
adopt the following
denition for the signal:
A
s
ignal
is
a real (or complex) valued function of one or
more real
variable(s).
When the function depends on a single variable, the signal
is said to be
o
ne-
dimensional.
A
speech signal, daily maximum temperature,
annual
rainfall at
a place, are all examples
of
a one dimensional signal.When the
function
depends on two or more variables, the signal
is
said
to
be
m
u
ltidimensional.
An
image
is
representing
the
two dimensional signal,vertical
and horizon-
tal
coordinates representing the two dimensions.
Our
physical world
is
four
dimensional(three spatial and one
temporal).
What
is
signal
p
ro
cessing
By
processing we mean operating
in
some fashion on a signal to extract some
useful information.
For
example when we hear same thing we use our ears
and
auditory path ways
in
the brain to extract the information. The
signal is
processed
by
a system.
In
the example mentioned above the system
is
biological
in
nature. W
e
can use
an
electronic system to
try to
mimic
this
behavior. The
signal processor may be
an
electronic system, a
m
ec
hanical
system or even
it
might be a computer
program.The
word
digital in digital
signal processing means
that
the processing
is
done either by a digital
hardware or by a digital
computer.
Analog versus digital signal
p
ro
cessing
The signal processing operations involved
in
many applications
lik
e
c
omm
u
-
nication systems, control systems, instrumentation, biomedical signal
pro-
cessing etc can be implemented
in
two dierent
w
a
y
s
(1) Analog or continuous time method
a
nd
(2) Digital or discrete time
metho
d
.
The analog approach to signal processing was dominant for many years.
The
analog signal processing uses analog circuit elements such as resistors, ca-
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download principles of digital signal processing and more Study Guides, Projects, Research Digital Signal Processing in PDF only on Docsity!

 What is a Signal

We are all immersed in a sea of signals. All of us from the smallest living unit, a cell, to the most complex living organism(humans) are all time time receiving signals and are processing them. Survival of any living organism depends upon processing the signals appropriately. What is signal? To d efine this precisely is a difficult task. Anything which carries information is a s ig- nal. In this course we will learn some of the mathematical representations of the signals, which has been found very useful in making information pro cess- ing systems. Examples of signals are human voice, chirping of birds, smoke signals, gestures (sign language), fragrances of the flowers. Many of our b o dy functions are regulated by chemical signals, blind people use sense of t ouch. Bees communicate by their dancing pattern.Some examples of modern high speed signals are the voltage charger in a telephone wire, the electromagnetic field emanating from a transmitting antenna,variation of light intensity in a n optical fiber. Thus we see that there is an almost endless variety of signals and a large number of ways in which signals are carried from on place t o another p lace.In this course we will adopt the following definition for the signal: A s ignal is a real (or complex) valued function of one or more real variable(s).When the function depends on a single variable, the signal is said to be one- dimensional. A speech signal, daily maximum temperature, annual rainfall at a place, are all examples of a one dimensional signal.When the function depends on two or more variables, the signal is said to be mu ltidimensional. An image is representing the two dimensional signal,vertical and horizon- tal coordinates representing the two dimensions. Our physical world is four dimensional(three spatial and one temporal).

 What is signal p ro cessing

By processing we mean operating in some fashion on a signal to extract some useful information. For example when we hear same thing we use our ears and auditory path ways in the brain to extract the information. The signal is processed by a system. In the example mentioned above the system is biological in nature. We can use an electronic system to try to mimic this behavior. The signal processor may be an electronic system, a m echanical system or even it might be a computer program.The word digital in digital signal processing means that the processing is done either by a digital hardware or by a digital computer.

 Analog versus digital signal p ro cessing

The signal processing operations involved in many applications like c ommu - nication systems, control systems, instrumentation, biomedical signal pro- cessing etc can be implemented in two different ways

(1) Analog or continuous time method a nd (2) Digital or discrete time metho d. The analog approach to signal processing was dominant for many years. The analog signal processing uses analog circuit elements such as resistors, ca-

pacitors, transistors, diodes etc. With the advent of digital computer and later microprocessor, the digital signal processing has become dominant now a d ays. The analog signal processing is based on natural ability of the analog system to solve differential equations the describe a physical system. The s olution are obtained in real time. In contrast digital signal processing relies on nu merical calculations. The method may or may not give results in real t ime. The digital approach has two main advantages over analog a pproach (1) Flexibility: Same hardware can be used to do various kind of signal pro cessing operation,while in the core of analog signal processing one has to design a system for each kind of op eration. (2) Repeatability: The same signal processing operation can be rep e ated again and again giving same results, while in analog systems there may b e parameter variation due to change in temperature or supply voltage. The choice between analog or digital signal processing depends on applica tion. One has to compare design time,size and cost of the implement ation.

 Classification of signals

As mentioned earlier, we will use the term signal to mean a real or c omplex valued function of real variable(s). Let us denote the signal by x ( t ). The variable t is called independent variable and the value x of t as dep endent variable. We say a signal is continuous time signal if the independent va riable t takes va l u es in an int erva l.

For ex a m p le t ԑ ( −∞, ∞ ) , or t ԑ [0 , ∞ ] or t ԑ

[ T 0 , T 1 ] The independent variable t is referred to as time,even though it may not b e actually time. For example in variation if pressure with height t refers ab ove mean sea level. When t takes a vales in a countable set the signal is called a discrete time signal. For example T (^) ԑ { 0 , T , 2 T, 3 T , 4 T , ...} or t (^) ԑ {... − 1 , 0 , 1 , ...} or t (^) ԑ { 1 / 2 , 3 / 2 , 5 / 2 , 7 / 2 , ...} etc.

For convenience of presentation we use the notation x[n] to denote discrete time signal. Let us pause here and clarify the notation a bit. When we write x ( t ) it h a s two meanings. One is value of x at time t and the other is the pairs( x ( t ) , t ) allowable value of t. By signal we mean the second interpretation. To keep this distinction we will use the following notation: {x ( t ) } to denote the con- tinuous time signal. Here {x ( t ) } is short notation for {x ( t ) , t I } where I is the set in which t takes the value. Similarly for discrete time signal we will use the notation {x [ n ] } , where {x [ n ] } is short for {x [ n ] , n I }. Note that in {x ( t ) } and {x [ n ] } are dummy variables ie. {x [ n ] } and {x [ t ] } refer to t he same signal. Some books use the notation x [ · ] to denote {x [ n ] } and x [ n ] t o denote value of x at time n · x [ n ] refers to the whole waveform,while x [ n ] refers to a particular

1 , n ≥ 0 u [ n ] = { 0 , n < 0

Graphically this is as shown b elow u [ n ]

1 .................

.......... (^) -3 -2 -1 0 1 2 3 4 ................^ n

(c) Exponential sequence: The complex exponential signal or sequence x [ n ] is defined by

x [ n ] = C αn

where C and α are, in general, complex numbers. Note that by writing α = ^ , we can write the exponential sequence as x [ n ] = c eβ^ n.

Real exponential signals: If C and α are real, we can have one of the s everal type of behavior illustrated b elow

.......... n (^) {x [ n ] = αn (^) , α > 1 } .......... n (^) {x [ n ] = αn (^) , 0 < α < 1 } .......... n {x [ n ] = αn^ , − 1 < α < 0 } .......... n {x [ n ] = αn^ , α < − 1 } if |α| > 1 the magnitude of the signals grows exponentially, whlie if |α| < 1, we have decaying exponential. If α is positive all terms of {x [ n ] } have same sign, but if α is negative the sign of terms in {x [ n ] } alternates.

(d)Sinusoidal Signal: The sinusoidal signal {x [ n ] } is defined by

x [ n ] = A cos( w 0 n + φ )

Euler’s relation allows us to relate complex exponentials and sinu soids.

ej^ w^0 n^ = cos w 0 n + j sin w 0 n

and (^) n

A cos( w 0 n + φ ) =1/2 { A e jφe j w^0 n^ + A e−j φ^ e−jw^0 n ﴿

Introduction to DSP

A signal is any variable that carries information. Examples of the types of signals of interest are Speech (telephony, radio, everyday communication), Biomedical signals (EEG brain signals), Sound and music, Video and image,_ Radar signals (range and bearing).

Digital signal processing (DSP) is concerned with the digital representation of signals and the use of digital processors to analyse, modify, or extract information from signals. Many signals in DSP are derived from analogue signals which have been sampled at regular intervals and converted into digital form. The key advantages of DSP over analogue processing are Guaranteed accuracy (determined by the number of bits used), Perfect reproducibility, No drift in performance due to temperature or age, Takes advantage of advances in semiconductor technology, Greater exibility (can be reprogrammed without modifying hardware), Superior performance (linear phase response possible, and_ltering algorithms can be made adaptive), Sometimes information may already be in digital form. There are however (still) some disadvantages, Speed and cost (DSP design and hardware may be expensive, especially with high bandwidth signals) Finite word length problems (limited number of bits may cause degradation).

Application areas of DSP are considerable: _ Image processing (pattern recognition, robotic vision, image enhancement, facsimile, satellite weather map, animation), Instrumentation and control (spectrum analysis, position and rate control, noise reduction, data compression) _ Speech and audio (speech recognition, speech synthesis, text to Speech, digital audio, equalisation) Military (secure communication, radar processing, sonar processing, missile guidance) Telecommunications (echo cancellation, adaptive equalisation, spread spectrum, video conferencing, data communication) Biomedical (patient monitoring, scanners, EEG brain mappers, ECG analysis, X-ray storage and enhancement).

UNIT I

DISCRETE FOURIER TRANSFORM

1.1 Discrete-time signals

A discrete-time signal is represented as a sequence of numbers:

Here n is an integer, and x[n] is the nth sample in the sequence. Discrete-time signals are often obtained by sampling continuous-time signals. In this case the nth sample of the sequence is equal to the value of the analogue signal xa(t) at time t = nT:

The sampling period is then equal to T, and the sampling frequency is fs = 1/T. x[1]

For this reason, although x[n] is strictly the nth number in the sequence, we often refer to it as the nth sample. We also often refer to \the sequence x[n]" when we mean the entire sequence. Discrete-time signals are often depicted graphically as follows:

(This can be plotted using the MATLAB function stem.) The value x[n] is unde_ned for no integer values of n. Sequences can be manipulated in several ways. The sum and product of two sequences x[n] and y[n] are de_ned as the sample-by-sample sum and product respectively. Multiplication of x[n] by a is de_ned as the multiplication of each sample value by a. A sequence y[n] is a delayed or shifted version of x[n] if

with n0 an integer. The unit sample sequence

is defined as

This sequence is often referred to as a discrete-time impulse, or just impulse. It plays the same role for discrete-time signals as the Dirac delta function does for continuous-time signals. However, there are no mathematical complications in its definition. An important aspect of the impulse sequence is that an arbitrary sequence can be represented as a sum of scaled, delayed impulses. For example, the

Sequence can be represented as

In general, any sequence can be expressed as

The unit step sequence is defined as

Thus the sequence for the complex exponential

with frequency is exactly the same as that for the complex exponential with frequency more

generally; complex exponential sequences with frequencies where r is an integer are indistinguishable From one another. Similarly, for sinusoidal sequences

In the continuous-time case, sinusoidal and complex exponential sequences are always periodic. Discrete- time sequences are periodic (with period N) if x[n] = x[n + N] for all n:

Thus the discrete-time sinusoid is only periodic if which requires that

The same condition is required for the complex exponential

Sequence to be periodic. The two factors just described can be combined to reach the conclusion that there are only N distinguishable frequencies for which the Corresponding sequences are periodic with period N. One such set is

1.2 Discrete-time systems

A discrete-time system is de_ned as a transformation or mapping operator that maps an input signal x[n] to an output signal y[n]. This can be denoted as

Example: Ideal delay

Memoryless systems A system is memory less if the output y[n] depends only on x[n] at the Same n. For example, y[n] = (x[n]) 2 is memory less, but the ideal delay

Linear systems A system is linear if the principle of superposition applies. Thus if y1[n] is the response of the system to the input x1[n], and y2[n] the response to x2[n], then linearity implies

Additivity:

Scaling:

These properties combine to form the general principle of superposition

If the system is additionally time invariant, then the response to _[n -k] is h[n -k]. The previous equation then becomes

This expression is called the convolution sum. Therefore, a LTI system has the property that given h[n], we can _nd y[n] for any input x[n]. Alternatively, y[n] is the convolution of x[n] with h[n], denoted as follows:

The previous derivation suggests the interpretation that the input sample at n = k, represented by

is transformed by the system into an output sequence. For each k, these sequences are superimposed to yield the overall output sequence: A slightly different interpretation, however, leads to a convenient computational form: the nth value of the output, namely y[n], is obtained by multiplying the input sequence (expressed as a function of k) by the sequence with values h[n-k], and then summing all the values of the products x[k]h[n-k]. The key to this method is in understanding how to form the sequence h[n -k] for all values of n of interest. To this end, note that h[n -k] = h[- (k -n)]. The sequence h[-k] is seen to be equivalent to the sequence h[k] rejected around the origin

Since the sequences are non-overlapping for all negative n, the output must be zero y[n] = 0; n < 0:

1.3 Introduction to DFT

The discrete-time Fourier transform (DTFT) of a sequence is a continuous function of !, and repeats with period 2_. In practice we usually want to obtain the Fourier components using digital computation, and can only evaluate them for a discrete set of frequencies. The discrete Fourier transform (DFT) provides a means for achieving this. The DFT is itself a sequence, and it corresponds roughly to samples, equally

spaced in frequency, of the Fourier transform of the signal. The discrete Fourier transform of a length N signal x[n], n = 0; 1; : : : ;N - 1 is given by

An important property of the DFT is that it is cyclic, with period N, both in the discrete-time and discrete- frequency domains. For example, for any integer r,

since Similarly, it is easy to show that x[n + rN] = x[n], implying periodicity of the synthesis equation. This is important | even though the DFT only depends on samples in the interval 0 to N -1, it is implicitly assumed that the signals repeat with period N in both the time and frequency domains. To this end, it is sometimes useful to de_ne the periodic extension of the signal x[n] to be To this end, it is sometimes useful to de_ne the periodic extension of the signal x[n] to be x[n] = x[n mod N] = x[((n))N]: Here n mod N and ((n))N are taken to mean n modulo N, which has the value of the remainder after n is divided by N. Alternatively, if n is written in the form n = kN + l for 0 < l < N, then n mod N = ((n))N = l:

1

0

(^1 2) / N

k

j kn N n Xke N

x

---- periodic function (period N )

x ( t ) --- general function

 sampling and inverse transform

xn --- periodic function

T
k

X^ k (^ k ^2  line spectrum)

 

1

0

2 /

N

n

j kn N Xk xne

period function (period N)

1.4 Properties of the DFT

Many of the properties of the DFT are analogous to those of the discrete-time Fourier transform, with the notable exception that all shifts involved must be considered to be circular, or modulo N. Defining the

DFT pairs and

Properties

  1. Linearity : Ax ( n ) By ( n ) AX ( k ) BX ( k )

2. Time Shift:

k m N

j km N x n m X k e X k W   (  ) ( )  ( ) 2  /

3. Frequency Shift:

( ) ( ) 2 / x n e X k m j km N   

  1. Duality : ( ) ( )

1 N xnXk

why? 

 

1

0

( ) ( )^2 /

N

m

X k x m e j^  mk N

 

1

0

( ( )) ( )^2 /

N

n

DFT X n X n e j^  nk N

DFT of x(m)

 

 

  

1

0

2 /

2 ( )/ 2 / 2 /

1

0

2 ( )/

( )

1 ( )

( )

1

( ) ( )

N

k

j kn N

j k N n N j kN N j kn N

N

k

j k N n N

X k e N

x n

e e e

X k e N

x n x N n

  

( ) ( )

1 ( ( ))

1

0

1 2 / X ne x k N

DFT N X n

N

n

j nk N     

  

5. Circular convolution

   

1

0

( ) ( ) ( ) ( ) ( ) ( )

N

m

x m y n m x n y n X k Y k circular convolution

6. Multiplication

 

   

1

0

1 1

( ) ( ) ( )

( ) ( ) ( ) ( ) ( ) ( )

N

m zn xn yn

new sequence

x n y n N X mY k m N X k Y k 

7.Parseval‟s Theorem

 

1

0

1 2

1

0

2 | ( )| | ( )|

N

k

N

n

x n N X k

8.Transforms of even real functions:

x er ( n ) Xer ( k )

(the DFT of an even real sequence is even and real )

9. Transform of odd real functions:

x or ( n ) jXoi ( k )

(the DFT of an odd real sequence is odd and imaginary )

10. z(n) = x(n) + jy(n)

z(n)Z(k) = X(k) + jY(k)

Example 1-1 :

cos( / 2 ) sin( / 2 ) 0 , 1 , 2 , 3

( ) ( ) ( ) / 2

  

  

n j n n

z n xn jyn e jn

 

2 3 1 2

1

0

1

0

2

1

0

1 2 1

k

N k

X k X k X k

k

N k

W

X k X k x nW x nW

N

n

nk N

N

n

nk N

N

n

nk N

x n N

N e Ne N

N k e

N

x k e

N

x n

c

j nk N

N

k

j nk N

N

k

j nk N

N

k

j nk N c

3

2 /

1

0

2 /

1

0

2 2 /

1

0

2 / 3 3

 

1.5 Convolution: Linear convolution of two finite-length sequences Consider a sequence x1[n] with length L points, and x2[n] with length P points. The linear convolution of the

sequences, Therefore L + P 􀀀1 is the maximum length of x3[n] resulting from the Linear convolution.

1.6 Circular Convolution: The N-point circular convolution of x1[n] and x2[n] is

It is easy to see that the circular convolution product will be equal to the linear convolution product on the interval 0 to N 􀀀 1 as long as we choose N - L + P +1. The process of augmenting a sequence with zeros to make it of a required length is called zero padding.

1.7 Filtering methods based on DFT

1. DFT Algorithm

  ^ 

1

0

2 /

1

0

2 /

N

n

j N nk

N

n

j kn N

X k x ne x n e

 

Denote

j N WN e  2 /  , then

1

0

( ) ( )

N

n

nk X k xnWN

Properties of

m WN :

(1) ( ) 1 , 1

(^0 2) / 0 0 2        NjN

j N WN e e W e