Vous êtes sur la page 1sur 51

ETE 309

Digital Signal
Processing
Lecture-2
29th July,2008, Tuesday

ETE 309

Course Teacher
Sabbir Ahmed
Assistant Professor,
Dept. of Information
and
Communication Engineering (ICE)
Rajshahi University.

Text and Reference

Text
Signals and Systems
By
Simon Haykin and Barry Van Veen
Reference
Digital Signal Processing
Concepts and Applications

By
Bernerd Mulgrew, Peter Grant and John
Thompson
3

Course outline

Digital Signal Processing (DSP) and its benefits


Key DSP Operations
Real time signal processing
Applications
Fourier Series/Transform
Z Transform and its Applications
Correlation and Convolution
Filters
Spectrum Estimation and Analysis

Overview of Communication Systems

contd.

Analog (Continuous-time Approach) Signal Processing


Was dominant for many years.
Relies on analog circuit elements like resistors,
capacitors, inductors etc.
Based on solving differential equation that describe
natural systems
Real time solutions can be obtained.
Digital (Discrete-time Approach) Signal Processing
Is the present trend in signal processing.
Based on numerical computation and hence relies on
basic digital computer elements like adders,
multipliers, memory elements etc.
Requires greater circuit complexity and yet no
assurance of real time output.
5

Overview of Communication Systems

Advantages of Digital Approach over Analog


Signal Processing

contd.

Flexibility
Only change of software can change the
functionality of a hardware. (e.g. filter)
Repeatability
Normally does not suffer from external effects
like supply voltage or room temperature when
repeating the same tasks again and again.

Cost and size also have been remarkably


reduced due the phenomenal developments
in VLSI technology.
6

Classification of Signals

Signals can be classified as

Continuous-time and Discrete-time Signals


Even and Odd Signals
Periodic and Non-periodic Signals
Deterministic and Random Signals
Energy Signals and Power Signals

Continuous-time and Discrete-time Signals

Continuous-time signal
A signal x(t) that is defined for all values of time t.
x(t)

Arises naturally i.e. speech in voice, conversion


of sound or light into electrical signal (by means
of transducers, photocell) etc.
Classification of Signals (2)

Continuous-time and Discrete-time Signals

contd.

Discrete-time signal
A signal that is defined only at discrete
instants of time.
The independent variable only has discrete
values which are usually equally placed
Often derived from a continuous timesignal by sampling it at a uniform rate
Way of Representation
x[n] x mt , n 0,1,2,...
m Sampling int erval

Classification of Signals (3)

Fourier Representation of
Signals

10

ETE 309
Digital Signal
Processing
Lecture-3
3rd August,2008, Sunday

Fourier Representation of Signals

Signals can be represented as superposition of


weighted complex sinusoids.
Applying such a signal on an LTI systems gives an
output which is a weighted superposition of the
system response to individual complex sinusoids
This is an alternative expression for LTI system
input-output compared to the convolution
approach.
The study of signals and systems using sinusoidal
representation is called Fourier Analysis.

12

Complex Sinusoids and Frequency Response of LTI Sys.

Response of an LTI system to a sinusoid input


characterizes the behavior of the system.
It is obtained in terms of impulse response by
using convolution and a complex sinusoid.
Considering the output of a LTI system having a
impulse response h[n] for an unit amplitude
complex sinusoid x[n]=ejn, we can write

y[n] h[k]x[n k]
k

h[k]e j(n k )
k

e jn h[k]e jk
k

H(e j )e jn

where, H(e j ) h[k]e jk


k

H is only a function of frequency not of time


and is called the frequency response of the
system

13

Categories of Fourier Representation


Time
Property

Periodic

Continuous Fourier
Series
(t)

Discrete
[n]

Non-periodic

Fourier
Transform

(FS)

(FT)

DiscreteTime
Fourier
Series

Discrete-Time Fourier
Transform
(DTFT)

(DTFS)
14

DTFS or FS

If x[n] is a discrete-time signal with fundamental


period N (i,.e. fundamental frequency 0=2/N),
then we can represent x[n] by the DTFS as
[n] A[k]e jk0n
x
k

How many terms and weights?

15

How many terms and Weights

For DTFS
Complex sinusoids with discrete frequencies are
not always distinct since discrete complex

sinusoids are N periodic in the frequency


index k.
We have, ej(N+k)0n = ejN 0n ejk 0n = ej2n ejk 0n =
ejk 0n
A unique set of N distinct complex sinusoids
is obtained by letting frequency index k take
on any N consecutive values.
jk n
[n]
x

A[k]e

k N

In particular, k=0 to N-1 is sufficient


Again, for exploiting symmetries in x[n],
k=-N/2 to N/2-1 is ok when N is even.
16

How many terms and Weights

For FS
Continuous complex sinusoids with discrete frequencies
are always distinct.

(t) A[k]e jk0 t


x
k

17

DTFS

contd.

DTFS Weights or coefficients are calculated


using MSE method.
MSE

2
1

x
[
n
]

x
[
n
]

N k N

Expanding this expression eventually yields


At value of A[K] which minimizes MSE.

18

DTFS

contd.

The DTFS representation of periodic signal x[n]


with fundamental period N and fundamental
frequency 0=2/N is given by
N 1

x[n] X[k]e jk0n


k 0

where,

X[k]

1 N 1
jk0n
x[n]e
N n 0

are the DTFS coefficients of x[n]. x[n] are X[k] are


known as DTFS pair.
19

DTFS

contd.

Example

N=5, so 0=2/5

20

DTFS Example
X[k]

1 51
jk2n / 5
x[n]e
5 n 0

1
1 0.5e
5
1
1 0.5e
5
1
1 0.5e
5

contd.

1
x[0]e 0 x[1]e jk2 / 5 x[2]e jk 4 / 5 x[3]e jk 6 / 5 x[ 4]e jk8 / 5
5

0.5e jk8 / 5

jk2 / 5

0.5e jk2 .e jk2 / 5

jk2 / 5

0.5{cos(k2) j sin(k2)}.e jk2 / 5

1
1 0.5e jk2 / 5 0.5e jk2 / 5
5
1
X[k] 1 j sin(2k / 5)
5

jk2 / 5

21

DTFS Example

contd.

X[k]

1
1 j sin(2k / 5)
5

X[0] 0.2e 0

X[1] 0.2 j0.951 0.276e j0.760

X[2] 0.232e j0.531


X[3] 0.232e j0.531
X[ 4] 0.276e j0.760

22

DTFS Example

contd.

23

DTFS Example 2.

Example

N=6, so 0=2/6= /3

24

DTFS Example 2
X[k]

1 61
jkn / 3
x[n]e
6 n 0

1
x[0]e 0 x[1]e jk / 3 x[2]e jk2 / 3 x[3]e jk x[ 4]e jk 4 / 3 x[5]e jk5 / 3
6

1
1 2e
6

contd.

1
1 2e jk / 3 0 0 0 2e jk5 / 3
6
jk / 3

2e jk2 .e jk / 3
X[k]

1
1 4 cos(k / 3)
6

25

ETE 309
Digital Signal
Processing
Lecture-4
7th August,2008, Thursday

DTFS DeterminationAlterative Approach

Determination of X[k] by inspection.


Applicable when x[n], i.e., the original time-domain
signal is a real or complex sinusoids.
Method :

Step 1: Expand x[n] in terms of complex sinusoids


Step 2: Compare outcome of Step 2 with each term of
of the following equation
N 1

x[n] X[k]e jk0n


k 0

27

DTFS DeterminationAlterative Approach

Example

contd.

Time domain signal, x[n]=cos(n/3+)

Here 0=/3,so N=2/(/3)=6

x[n]

1 j( n / 3)
{e
e j( n / 3) }
2

x[n]

N 1

x[n] X[k]e jk0n

1 j jn / 3 1 j jn / 3
e e
e e
2
2

k 0
0

X[0]e X[1]e jn / 3 X[2]e j2n / 3 X[3]e jn X[ 4]e j4 n / 3 X[5]e j5n / 3 ...


x[ 0] 0

1
e j
2
x[2] 0
x[1]

x[3] 0
x[ 4] 0
x[5]

1
e j
2

28

Discrete Time Fourier Transform (DTFT)

DTFT used o represent a discrete time nonperiodic signal as a superposition of complex


sinusoids.
Unlike DTFS, DTFT has no restrictions on the
period of the sinusoids and thus involves a
continuum of frequencies on the interval - <<+
where have units of radians.
1
j jn
x[n]
d
X(e )e
2

X(e j ) x[n]e jn
n

29

DTFT contd.

Applicable for non-periodic discrete signal


Can be developed from DTFS by describing a nonperiodic signal as the limit of a periodic signal whose
fundamental period N is infinity.
We consider a non-periodic signal represented by one
period of a periodic signal which is centered at origin
and the fact that N takes the value of N approaching
infinity is taken in an asymmetric manner.
Let x[n] is defined as a non-periodic signal consisting
of one period of a periodic signal with period N=2M+1
as described by
x
[n], M n M

x[n]

0, n M
30

DTFT contd.
x[n]

-M

[n]
x

-M

2M+1

[n]
x[n] lim x
M

31

DTFT contd.

The DTFS representation of the periodic signal


M

[n] X[k]e jk0n


x
k M

M
1
[n]e jk0n
X[k]
x
2M 1 n M

The DTFS representation of the periodic signal can be rewritten


as
M
1
jk0n
X[k]
x[n]e
2M 1 n M

1
jk0n
X[k]
x[n]e
2M 1 n

32

DTFT contd.

Now a continuous function of Frequency ,X(e j) is defined whose


samples at k0 are equal to DTFS coefficients normalized by 2M+1

X[k] X(e jk0 ) /(2M 1)

X(e j ) x[n]e jn
n

So we get
[n]
x

M
1
jk0
)e jk0n
X(e
2M 1 k M

And using the relationship 0=2/(2M+1)


[n]
x

Applying limit

1 M
jk0
)e jk0n 0
X(e
2 k M

1 M
jk0
[n] lim
x[n] lim x
)e jk0n 0
X(e
M
M 2 k M
33

DTFT contd.

Applying rectangular rule of approximation to an integral

Finally

1
j jn
x[n]
d
X(e )e
2

1
j jn
x[n]
d
X(e )e
2
X(e

) x[n]e jn
n

Here x[n] has been represented by a superposition of weighted discrete-time


sinusoids, where the superposition is the integral and weight on each sinusoid is

1
X(e j )d
2
34

Condition for existence of DTFT


X(e

) x[n]e jn
n

If

x[n]

Or If

x[n]

35

DTFT of a Rectangular Pulse


X[n]

-M

Defined by
1, M n M

x[n]

0, n M

36

DTFT of a Rectangular Pulse

The DTFT representation


X(e

contd.

) 1e jn
n M

Using change of variable as m=n+M


X(e
X(e

X(e

) e j(mM)
m0

jM

2M

)e

jM

2M

jm
e

m 0

1 e j(2M 1)
j

, 0,2,4....

1e
2M 1, 0,2,4....

37

DTFT of a Rectangular Pulse

Now a continuous function of Frequency ,X(e j) is defined whose


samples at k0 are equal to DTFS coefficients normalized by 2M+1

X[k] X(e jk0 ) /(2M 1)

X(e j ) x[n]e jn
n

So we get
[n]
x

M
1
jk0
)e jk0n
X(e
2M 1 k M

And using the relationship 0=2/(2M+1)


[n]
x

contd.

Applying limit

1 M
jk0
)e jk0n 0
X(e
2 k M

1 M
jk0
[n] lim
x[n] lim x
)e jk0n 0
X(e
M
M 2 k M
38

DTFT of a Rectangular Pulse

contd.

Only considering the first scenario


X(e

X(e

)e

)e

jM

1 e j(2M 1)
1 e j

e j(2M 1) / 2 (e j(2M 1) / 2 e j(2M 1) / 2 )

jM

X(e

e j / 2 ( e j / 2 e j / 2 )

e j(2M 1) / 2 e j(2M1) / 2
( e j / 2 e j / 2 )

X(e j )
U sin g L'Hospital's rule

lim

sin((2M 1) / 2)
sin( / 2)

0, 2, 4 ,...

X(e j )

sin((2M 1) / 2)
2M 1
sin( / 2)
39

ETE 309
Digital Signal
Processing
Lecture-5
11th August,2008, Monday

DTFT Example
X(e

) u[n]e

jn

Find the DTFT of x[n]=nu[n]

n e jn
n 0

1
1 e j

, for 1

1
1 cos j sin
X(e j )

1
(1 2 cos )1 / 2
2

arg{ X(e j )} tan 1 1sin


cos

41

DTFT Example

42

DTFT Example

43

DTFT Example

44

DTFT Example
Find the DTFT of x[n]=2(3)nu[-n]

X(e j ) 2(3)n u[n]e jn


n

2 (3e j )n
n

(3e j ) (3e j )1
1 3e

an1 an2 1
u sin g a
,a 1
1a
k n1
n2

3e j
1 3e j
2
1
1 e j
3

45

Fourier Representation Properties

Periodicity
DTFS and DTFT are periodic
Since complex sinusoids are 2-periodic functions
of frequency.
That is, discrete-time sinusoids whose frequency
differ by integer multiples of 2 are identical.

46

Fourier Representation Properties

contd.

Linearity
All Fourier representations are linear in nature
DTFT

z[n] ax[n] by[n] Z(e j ) aX(e j ) bY(e j )


z[n] ax[n] by[n]

DTFS,0

Z(k) aX[k] bY[k]

This property is used to find Fourier representations of


signals that are constructed as sums of signals whose
representations are already known.

47

Fourier Representation Properties

contd.

Symmetry
Fourier
Representation

Real-valued
Time Signal

Imaginary
Valued Time
Signal

DTFS and
DTFT

Magnitude
Spectrum
even function
and Phase
spectrum
odd function

Magnitude
Spectrum odd
function and
Phase
spectrum
even function
48

Fourier Representation Properties

contd.

Convolution Property
Considering the convolution of two non-periodic continuoustime signal x(t) and h(t), we define y(t) as
y(t) h(t) x(t)

y(t) h()x(t )d

Now, expressing x(t-) in terms of its FT, we can write


x(t )

1
j( t )
d
X( j)e
2

Substituting Fourier representation of x(t-) into the


expression of y(t), we get

jt j
y(t) h()
X
(
j

)
e
e
d

1
j
y(t)
h
(

)
e
d X( j)e jt d

2

49

Fourier Representation Properties

contd.

Convolution Property
Now, remembering that the inner integral is FT of h(), we
can write

1
j t
j
y(t)
d
H( j)X( j)e d Since H( j) h()e
2

1
j t
Re calling, y(t)
Y( j)e d
2
We find, Y( j) H( j)X( j)

Finally,

FT

y(t) h(t) x(t) Y( j) X( j)H( j)

Convolution in time domain is equivalent to


multiplication in frequency domain
50

Fourier Representation Properties

contd.

Convolution Properties
FT

x(t) h(t) X( j)H( j)


FS,0

x(t) h(t) TX[k]H[k]


DTFT

x[n] h[n] X(e


x[n] h[n]

DTFS,0

)H(e

NX[k]H[k]
51

Vous aimerez peut-être aussi