digital signal - ksu · to reduce statistical noise for small number of samples ... li tan, digital...

Post on 16-May-2020

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Digital Signal

1CEN543, Dr. Ghulam Muhammad

King Saud University

Continuous time

Co

nti

nu

ou

s am

plit

ud

e

Discrete time

Co

nti

nu

ou

s am

plit

ud

eDiscrete

time

Dis

cret

e am

plit

ud

e

Analog Signal

Discrete-time Signal

Digital Signal

CEN543, Dr. Ghulam Muhammad King Saud University

2

A digital signal processing scheme

DSP (Digital Signal Processing)

To avoid aliasing for sampling

Analog to Digital Converter

Digital to Analog Converter To avoid aliasing

for sampling

Computer / microprocessor / micro controller/ etc.

CEN543, Dr. Ghulam Muhammad King Saud University

3

Some Applications of DSP

• Noise removal from speech.Noisy Speech

Clean Speech

CEN543, Dr. Ghulam Muhammad King Saud University

4

Some Applications of DSP

• Signal spectral analysis.

Time domain Frequency domain

Single tone: 1000 Hz

Double tone: 1000 Hz and 3000 Hz

CEN543, Dr. Ghulam Muhammad King Saud University

5

Some Applications of DSP

• Noise removal from image.

CEN543, Dr. Ghulam Muhammad King Saud University

6

Some Applications of DSP

• Image enhancement.

CEN543, Dr. Ghulam Muhammad King Saud University

7

Summary Applications of DSP

Digital speech and audio:

• Speech recognition• Speaker recognition• Speech synthesis• Speech enhancement • Speech coding

Digital Image Processing:

• Image enhancement • Image recognition• Medical imaging• Image forensics• Image coding

Multimedia:• Internet audio, video, phones• Image / video compression• Text-to-voice & voice-to-text• Movie indexing

……..

CEN543, Dr. Ghulam Muhammad King Saud University

8

For a given sampling interval T, which is defined as the time span between two sample points, the sampling rate is given by

samples per second (Hz).

For example, if a sampling period is T = 125 microseconds, the sampling rate isdetermined as fs =1/125 s or 8,000 samples per second (Hz).

Tf s

1

Sampling

CEN543, Dr. Ghulam Muhammad King Saud University

9

Sampling - Theorem 2 / 23

7 / 23 22/ 23

CEN543, Dr. Ghulam Muhammad King Saud University

10

Sampling - Theorem

The sampling theorem guarantees that an analog signal can be in theoryperfectly recovered as long as the sampling rate is at least twice as large asthe highest-frequency component of the analog signal to be sampled.

The condition is:

For example, to sample a speech signal containing frequencies up to 4 kHz, theminimum sampling rate is chosen to be at least 8 kHz, or 8,000 samples persecond.

CEN543, Dr. Ghulam Muhammad King Saud University

11

Sampling - Theorem

Sampling interval T= 0.01 sSampling rate fs= 100 HzSinusoid freq. = 4 cycles / 0.1

= 40 Hz

Sampling condition is satisfied, so reconstruction from digital to analog is possible.

Do this by yourself!

CEN543, Dr. Ghulam Muhammad King Saud University

12

Sampling Process

In frequency domain:

Xs(f): Sampled spectrumX(f): Original spectrumX(fnfs): Replica spectrum

CEN543, Dr. Ghulam Muhammad King Saud University

13

Sampling Process

Original spectrum

Original spectrum plus its replicas

Original spectrum plus its replicas

Original spectrum plus its replicas

Reconstruction not possible

Minimum requirement for Reconstruction

CEN543, Dr. Ghulam Muhammad King Saud University

14

Shannon Sampling Theorem

For a uniformly sampled DSP system, an analog signal can be perfectlyrecovered as long as the sampling rate is at least twice as large as thehighest-frequency component of the analog signal to be sampled.

The minimum sampling rate is called the Nyquist rate Half of the sampling frequency is called the folding frequency.

ttttx 100cos300sin1050cos3)(

Problem: Find the Nyquist rate for the following signal.

The maximum frequency present is 150 Hz = fmax.

Therefore Nyquist rate = 2× fmax = 300 Hz.

Solution:

CEN543, Dr. Ghulam Muhammad King Saud University

15

Problem:Example 1

Solution:

Using Euler’s identity,

Hence, the Fourier series coefficients are:

CEN543, Dr. Ghulam Muhammad King Saud University

16

Example 1 – contd.

a.

b. After the analog signal is sampled at the rate of 8,000 Hz, thesampled signal spectrum and its replicas centered at thefrequencies nfs, each with the scaled amplitude being 2.5/T

Replicas, no additional information.

CEN543, Dr. Ghulam Muhammad King Saud University

17

Signal Reconstruction

CEN543, Dr. Ghulam Muhammad King Saud University

18

Signal Reconstruction

Perfect reconstruction is not possible, even if we use ideal low pass filter.

Aliasing

CEN543, Dr. Ghulam Muhammad King Saud University

19

Example 2Problem:

Solution:Using the Euler’s identity:

CEN543, Dr. Ghulam Muhammad King Saud University

20

Example 2 – contd.

a.

b.The Shannon sampling theory condition is satisfied.

CEN543, Dr. Ghulam Muhammad King Saud University

21

Example 3Problem:

Solution:

a.b.

CEN543, Dr. Ghulam Muhammad King Saud University

22

Example 4Problem: Consider the analog signal ttttx 12000cos106000sin52000cos3)(

(a) What is the Nyquist rate for this signal?(b) What is the discrete-time signal after sampling it at Fs = 5000 samples/s?(c) What is the analog signal y(t) that we reconstruct from the samples if we use

ideal interpolation?

Solution: KHzFKHzFKHzF 6 ,3 ,1 321 (a)Max.

Nyquist rate = 2×6K Hz = 12K Hz.

(b)

nn

nnn

nnn

nnn

F

nxnTxnx

s

5

22sin5

5

12cos13

5

12cos10

5

22sin5

5

12cos3

5

112cos10

5

212sin5

5

12cos3

5

62cos10

5

32sin5

5

12cos3

)()(

(c)

ttty 4000sin52000cos13)(

Alias

23

Decomposition and Synthesis

Any signal can be decomposed into additive components, and the component signals can be added (synthesis) to produce the original signal.

CEN543, Dr. Ghulam Muhammad King Saud University

24

Decomposition-1

Impulse decomposition:

N samples signal is decomposed into N component signals each containing N samples.

Zero

A component signal contains one point from the original signal, with the remainder of the values being zero.

Step decomposition:

k-th component signal, xk[n], contains zeros for points through 0 to k-1, while the remaining points have a value equal to x[k] – x[k-1].

CEN543, Dr. Ghulam Muhammad King Saud University

Impulse decomposition Step decomposition

25

Even/Odd decomposition:

2

][][][

2

][][][

nNxnxnx

nNxnxnx

o

e

Mirror image around x[N/2]. x[0] and x[N/2] are equal to original value. Others like: x[N/2+1] = x[N/2-1].

Even symmetry:

Odd symmetry:

Negative mirror image around x[N/2]. x[0] and x[N/2] are equal to zero.

Others like: x[N/2+1] = -x[N/2-1].

Odd positions are zero!

Even positions are zero!

Decomposition-2

You can check the result by using the following formula:

][][][ nxnxnx oe

CEN543, Dr. Ghulam Muhammad King Saud University

26

Fourier Decomposition

N point signal

(N/2)+1 cosine signals, each with N points

(N/2)+1 sine signals, each with N points

Zero!

Zero!

So, total N significant signals!

CEN543, Dr. Ghulam Muhammad King Saud University

CEN543, Dr. Ghulam Muhammad King Saud University

27

Example 5

Problem:

Answer:

A signal is defined as x[n]={2, 3, 5, -2, -3, -5, -2, 2}; Find the result of even / odd decomposition. Index starts from 0.

Even symmetry: xe = {2, 2.5, 1.5, -3.5, -3, -3.5, 1.5, 2.5}

Odd symmetry: xo = {0, 0.5, 3.5, 1.5, 0, -1.5, -3.5, -0.5}

CEN543, Dr. Ghulam Muhammad King Saud University

28

Sinusoid Drawing

44 ,4

2sin)(

tttx

29

Mean and Standard Deviation

1

0

1 N

iix

NMean:

1

0

2)(1

1 N

iix

NStandard Deviation:

Mean = DC Value

S.D. = How the signal fluctuates around Mean (AC)

To reduce statistical noise for small number of samples

CEN543, Dr. Ghulam Muhammad King Saud University

30

Histogram

More sample produces smoother histogram

1

0

M

ii

HN

M = Number of points in the histogram

i

M

i

M

ii

HiN

iHN

21

0

1

0

)(1

1

1

Mean and S.D. using histogram:

CEN543, Dr. Ghulam Muhammad King Saud University

31

Histogram, pmf, pdf

Look at the values along y-axis

Discrete

Continuous

CEN543, Dr. Ghulam Muhammad King Saud University

32

Waveforms and pdfs

Look at the pdf of random noise.

It is Gaussian!

CEN543, Dr. Ghulam Muhammad King Saud University

33

Histogram Bins

The range 0-4 is divided by 600 in (b) and by 8 in (c).

Poor resolution in vertical axis: (b).

Poor resolution in horizontal axis: (c).

Using more samples makes better resolution.

Look at the vertical axis

CEN543, Dr. Ghulam Muhammad King Saud University

34

Normal Distribution (Gaussian)

2

)( xexy Basic shape: 2

2

2

)(

2

1)(

x

exPEquation for normal distribution:

: Mean

: Standard Deviation

The normalization term is to make the area under curve = 1

CEN543, Dr. Ghulam Muhammad King Saud University

35

Digital Noise Generation

Uniform distribution: one RND function (0~1)

Two times RND functions and add

Twelve times RND functions and add

Central Limit Theorem:

A sum of random numbers becomes normally distributed as more and more of the random numbers are added together.

Gaussian

For each sample:

S.D. desired : mean, desired:

)6(12

1~0

RND

CEN543, Dr. Ghulam Muhammad King Saud University

CEN543, Dr. Ghulam Muhammad King Saud University

36

Figure Acknowledgement

Most of the figures are taken from the following books:

Li Tan, Digital Signal Processing, Fundamentals and Applications, Elsevier, 2008.

Steven W. Smith, Digital Signal Processing: A Practical Guide for Engineers and Scientists, Newnes, Elsevier, 2003.

top related