0% found this document useful (0 votes)
6 views

dsp2

Uploaded by

abhipsha783
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

dsp2

Uploaded by

abhipsha783
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Digital Signal Processing

Dr. Shekha Rai

Department of Electrical Engineering


National Institute of Technology Rourkela
India

1 / 28
Discrete time signal

Discrete time sequence

Basic operations on Discrete time signals

Transformation of independent variable

2 / 28
Discrete time sequence

Discrete time signal → defined only for integer values of n

An infinite duration x(n) is represented as

x(n) = {..., x(−2), x(−1), x(0), x(1), x(2), ....} (1)


where ↑ denotes value of signal x(n) at n = 0

samples to the right of arrow are positive values of n

samples to the left of arrow are negative values of n

3 / 28
Discrete time sequence

x(n) = {..., −2, 1.1, 3, −2.3, 1, ....} (2)



x(0) =?, x(−1) =?, x(1) =?

4 / 28
Discrete time sequence

x(n) = {..., −2, 1.1, 3, −2.3, 1, ....}



Here, x(0) = 3, x(−1) = 1.1, x(1) = −2.3

Real signal → x(n) is real for all values of n

Complex signal → x(n) is complex for one or more values of n

x(n) = xr (n) + jxi (n) (3)

5 / 28
Discrete time sequence

Finite-length signal → defined for finite intervals of time

N1 ≤ n ≤ N2 (4)

Length of the signal is

N = N2 − N1 + 1 (5)

N-point signal→ A length N discrete time signal consist of N


samples

x(n) = {−3, −2, 1, 0, 2, −3, −1, 0, 2, 1} (6)



Here N2 = 5, N1 = −4; Then, N = N2 − N1 + 1 = 10

6 / 28
Discrete time sequence

Infinite-length signal → Consider a finite-length signal by


assigning 0 values to samples for n < N1 and n > N2
Zero-padding → lengthening a signal by adding zero-valued
samples-appending with zeros
Right-sided signal

x(n) = 0 n < N1 (7)


Left-sided signal

x(n) = 0 n > N2 (8)


Causal signal
x(n) = 0 n<0 (9)
Anticausal signal

x(n) = 0 n≥0 (10)

7 / 28
Basic operations

Signal Addition-Adding the sample values of two signals to form


a new signal

y(n) = x(n) + w(n) (11)


Scalar Addition-Adding a scalar value to each sample of x(n)

y(n) = α + x(n) (12)

Scalar Multiplication-Multiplying a scalar value to each sample


of x(n)
y(n) = αx(n) (13)

8 / 28
Basic operations

Signal Multiplication-

Product of two signals on sample by sample basis-modulation


Forming a finite length signal from infinite length signal by
multiplying the infinite length signal with finite length
sequence-window

Forming finite length sequence- windowing- used in design of


digital filters
y(n) = x(n)w(n) (14)

9 / 28
Examples

Given 2 signals,
w(n) = {1.5, 2, 3.4, −5, 10}

x(n) = {2.2, 3, 2, 4.2, 8}



find the length of the signals and range. Also find
(a) y1 (n) = w(n) + x(n)

(b) y2 (n) = 3 + x(n)

(c) y3 (n) = w(n)x(n)

10 / 28
Examples

Length of the signal= 5


Range −1 ≤ n ≤ 3
(a) y1 (n) = w(n) + x(n)

Solution:
y1 (−1) = w1 (−1) + x1 (−1) = 1.5 + 2.2 = 3.7
y1 (0) = w1 (0) + x1 (0) = 2 + 3 = 5
y1 (1) = w1 (1) + x1 (1) = 3.4 + 2 = 5.4
y1 (2) = −0.8
y1 (3) = 18

y1 (n) = {3.7, 5, 5.4, −0.8, 18}


11 / 28
Examples

(b) y2 (n) = 3 + x(n)

Solution:
y2 (−1) = 3 + x2 (−1) = 3 + 2.2 = 5.2
y2 (0) = 3 + x2 (0) = 3 + 3 = 6
y2 (1) = 5
y2 (2) = 7.2
y2 (3) = 11

y1 (n) = {5.2, 6, 5, 7.2, 11}


12 / 28
Examples

(c) y1 (n) = w(n)x(n)

Solution:
y3 (−1) = w3 (−1)x3 (−1) = 1.5 × 2.2 = 3.3
y3 (0) = w3 (0)x3 (0) = 2 × 3 = 6
y3 (1) = w3 (1)x3 (1) = 3.4 × 2 = 6.8
y3 (2) = −21
y3 (3) = 80

y3 (n) = {3.3, 6, 6.8, −21, 80}


13 / 28
Transformation of independent variable

Time shifting: A signal x(n) may be shifted in time by replacing


the independent variable n by n ± n0

n0 → shifting factor

+ → advanced-left shift

− → delayed-right shift

for CT → x(t) is shifted by t ± t0

amplitude is not changed

14 / 28
Transformation of independent variable
Time shifting

Example: If
x(n) = {2, 3, 2, 1, 3}

Find and sketch (a) x(n − 1) (b) x(n + 1) if
Solution:
x(0)=2;
x(1)=1;
x(2)=3;
x(-1)=3;
x(-2)=2;

15 / 28
Transformation of independent variable
Time shifting

2.5

2
x(n)

1.5

0.5

0
−2 −1 0 1 2
n

Figure: Reference signal

16 / 28
Transformation of independent variable
Time shifting

(a) x(n − 1) Shifting the signal to the right by 1 sample

2.5

2
x(n−1)

1.5

0.5

0
−1 0 1 2 3
n

Figure: Right shift

x(n − 1) = {2, 3, 2, 1, 3}
↑ 17 / 28
Transformation of independent variable
Time shifting

(a) x(n + 1) Shifting the signal to the left by 1 sample

2.5

2
x(n+1)

1.5

0.5

0
−3 −2 −1 0 1
n

Figure: Left shift

x(n − 1) = {2, 3, 2, 1, 3}
↑ 18 / 28
Transformation of independent variable
Time shifting

0.8

0.6

0.4

0.2

0
−1 0 1 2 3 4 5
t

Figure: Shifting of continuous signal

19 / 28
Transformation of independent variable
Time scaling

Time scaling- increasing or decreasing the signal length


Decimation
Decreasing the signal length by discarding the signal samples

Decimation operator by integer M on a signal x(n) consist of


keeping every M th sample and discarding (M − 1) samples in
between

y(n) = x(Mn)

↓M

20 / 28
Transformation of independent variable
Decimation

Figure: Decimation of a signal

21 / 28
Transformation of independent variable
Time scaling

Interpolation
Increasing the signal length by inserting zeros between signal
samples
Interpolation operator by integer L on a signal x(n) consist of
inserting (L − 1) zero-valued samples between each two
consecutive samples of x(n)

y(n) = x(n/L) for n = 0, ±L, ±2L......, else y(n) = 0


↑L

22 / 28
Transformation of independent variable
Interpolation

Interpolation
Increasing the signal length by inserting zeros between signal
samples
Interpolation operator by integer L on a signal x(n) consist of
inserting (L − 1) zero-valued samples between each two
consecutive samples of x(n)

y(n) = x(n/L) for n = 0, ±L, ±2L......, else y(n) = 0


↑L

23 / 28
Interpolation

Example: Let

x(n) = {1, 3, 4, −2, 5}



Generate interpolated signal z(n) = x( 3n )

Solution:
z(n) = x( n3 )
z(−2) = x( −2
3 )=0

z(−1) = x( −1
3 )=0

z(0) = x( 03 ) = 4
z(1) = x( 13 ) = 0
z(2) = x( 23 ) = 0

24 / 28
Interpolation

z(3) = x( 33 ) = −2
z(4) = x( 43 ) = 0
z(5) = x( 53 ) = 0
z(6) = x( 63 ) = 5

z(n) = {1, 0, 0, 3, 0, 0, 4, 0, 0, −2, 0, 0, 5}

25 / 28
Multiple choice questions

Which of the following operations may give a completely


different signal?

1 Time-shifting

2 Decimation

3 Interpolation

26 / 28
Multiple choice questions

Which of the following operations may give a completely


different signal?

1 Time-shifting

2 Decimation

3 Interpolation

Answer (2)

27 / 28
Thank You

28 / 28

You might also like