Вы находитесь на странице: 1из 54

Dr.

Jameel Ahmed
Department of Electrical Engineering

HITEC University
March 2, 2013
Contents

1 Introduction to Digital Signal Processing

Analog Signal Processing Versus Digital Signal


2 Processing

3 Classification of Signals

4 Analog to Digital Conversion

Comparison Between Continuous-Time & Discrete-


5 Time Sinusoids

6 Characteristics of Discrete-time Sinusoids

2 March 2, 2013
Introduction To DSP

 Signal
A signal is any physical quantity that varies with time, space or any
other independent variable or variables.
 Processing
Performing certain operations on a signal to extract some useful
information
 Digital
The word digital in digital signal processing means that the
processing is done either by a digital hardware or by a digital
computer.

3 March 2, 2013
Digital Signal Processing

 Digital Signal Processing is a processing of a signal using


digital techniques with the aid of digital hardware and/or
some kind of computing device.

 Digital Signal Processor is a digital computer or processor


that is designed especially for signal processing applications.

4 March 2, 2013
Cont…

 Multichannel & Multidimensional Signals

 Let ,where k=1,2,3 denotes the electrical signal from the kth
sensor as a function of time, the set of p=3 signals can be
represented by a vector , where

 Such vector signals are referred as Multichannel Signals.

5 March 2, 2013
Cont…

 If the signal is a function of single independent variable, it is


called one-dimensional signal, where as if its value is a
function of M independent variables, it is called M-
Dimensional Signal.

 Multi-channel, Multi-dimensional color TV signal

6 March 2, 2013
Cont…

 Real-Valued & Complex-Valued Signals

 The value of the function can be a real-valued scalar


quantity, a complex-valued quantity, or perhaps a vector.
 Example:

 Is a real-valued signal.

 Is a complex-valued signal.

7 March 2, 2013
Limitations of Analog Signal
Processing

 Accuracy limitations due to

 Component tolerances

 Undesired nonlinearities

 Limited repeatability due to

 Tolerances

 Changes in environmental conditions

• Temperature

• Vibration

8 March 2, 2013
Cont…

 Sensitivity to electrical noise

 Limited dynamic range for voltage and currents

 Inflexibility to changes

 Difficulty of storing information

9 March 2, 2013
Advantages of DSP

 Accuracy can be controlled by choosing word length

 Repeatable

 Sensitivity to electrical noise is minimal

 Dynamic range can be controlled using floating point numbers

 Flexibility can be achieved with software implementations

 Digital storage is cheap

 Digital information can be encrypted for security

1
March 2, 2013
Limitations of DSP

 Sampling causes loss of information

 A/D and D/A requires mixed-signal hardware

 Limited speed of processors

 Quantization and round-off errors

1
March 2, 2013
Classification of Signals

Signal

Continuous Discrete
Continuous- Discrete-
Valued Valued
Time Signal Time Signal
Signal Signal

1
March 2, 2013
Cont…

 Continuous-Time Signal

 Function of time

 Finite or Infinite values

13 March 2, 2013
Cont…

 Discrete-Time Signal

 Function of n (number of samples)

 Finite or Infinite values

14 March 2, 2013
Cont…

 Continuous-Valued Signal

 Infinite values

 Function of time or n

15 March 2, 2013
Cont…

 Discrete-Valued Signal

 Finite values

 Function of time or n

16 March 2, 2013
A/D & D/A Conversion

Analog Analog
A/D Digital Signal D/ A
input output
Convertor Processor Convertor
signal signal

Digital Digital
input output
signal signal

17 March 2, 2013
Cont…

Input Band Pass


Sampler Quantizer Coding
signal Filter

Analog Discrete- Quantized Digital


signal Time signal signal signal
01001...

18 March 2, 2013
Example Of Quantization
Example # 4:

n x(n)
Discrete-time signal (Truncation) (Rounding) (Rounding)
0 1 1.0 1.0 0.0
1 0.9 0.9 0.9 0.0
2 0.81 0.8 0.8 -0.01
3 0.729 0.7 0.7 -0.029
4 0.6561 0.6 0.7 0.0439
5 0.59049 0.5 0.6 0.00951
6 0.531441 0.5 0.5 -0.031441
7 0.4782969 0.4 0.5 0.0217031
8 0.43046721 0.4 0.4 -0.03046721
9 0.387420489 0.3 0.4 0.012579511
10 0.34867844 0.3 0.3 0.04867844
11 0.313810596 0.3 0.3 0.013810596
12 0.282429536 0.2 0.3 0.017570463
19 March 2, 2013
Quantization

 Quantization converts a signal continuous in amplitude into a


signal discrete in amplitude.

 Quantization error: The error introduced in representing the


continuous-valued signal by a finite set of discrete value levels is
called Quantization error or Quantization noise.

 Range Of Quantization Error:

20 March 2, 2013
Cont…

 Quantization Levels:
The values allowed in the digital signal are
called the Quantization Levels.

Number of Quantization Levels = L

 Resolution: The distance ∆ between two successive quantization


levels is called the Quantization Step Size or Resolution.

21 March 2, 2013
Cont…

 Dynamic Range: It is the difference between and .


If the dynamic range is fixed, increasing the number of quantization
levels L results in a decrease of the quantization step size

 SQNR: It is the ratio of the signal power to the noise power.


SQNR is expressed in decibel as

22 March 2, 2013
Coding

 In the coding process, each discrete value is represented by a b-bit


binary sequence.

L=13 and b=4

23 March 2, 2013
Cont…

n x(n) Code
Truncated
0 1.0 0000
1 0.9 0001
2 0.8 0010
3 0.7 0011
4 0.6 0100
5 0.5 0101
6 0.5 0101
7 0.4 0110
8 0.4 0110
9 0.3 0111
10 0.3 0111
11 0.3 0111
12 0.2 1000

24 March 2, 2013
Cont…

0000

0001

0010

0011

0100

0101

0110

0111

1000
0 2 4 6 8 10 12
25 March 2, 2013
Continuous-Time Signal

 Continuous-Time Signals (Analog signal) are defined for


every value of time.

 It is represented as a function of time.

26 March 2, 2013
Discrete-Time Signal

 Discrete-Time Signals are defined only at certain specific


values of time.

 It is represented as a function of n (number of samples).

27 March 2, 2013
Sampling

28 March 2, 2013
Cont…

 Continuous Signal

 Discrete Signal

 where

 T = Sampling Period
 Fs = Sampling Frequency (Hz) = Sampling Rate (Samples / Second)

29 March 2, 2013
Cont…

Comparing the above equation with

where T = 1

where ƒ is the normalized frequency

As

30 March 2, 2013
Aliasing

31 March 2, 2013
Example #1

a) Determine the minimum sampling rate required to avoid aliasing.

b) Suppose that the signal is sampled at the rate of 200Hz, what is the
discrete-time signal obtained after sampling ?

c) Suppose that the signal is sampled at the rate of 75Hz, what is the
discrete-time signal obtained after sampling ?

32 March 2, 2013
Solution

a) The frequency of the analog signal is F=50 Hz. Hence


minimum sampling rate required to avoid aliasing is
Fs=2F .So Fs=100Hz.

b) If the signal is sampled at Fs=200Hz the discrete time signal is

33 March 2, 2013
Cont…

c) If the signal is sampled at Fs=75Hz the discrete time signal is

34 March 2, 2013
Cont…

35 March 2, 2013
Example # 2

 Consider the analog signal

What is the Nyquist rate of this signal?

36 March 2, 2013
Solution

 The frequencies present in the given signal are

F1=50Hz F2=125Hz F3=30Hz


Thus
Fmax=125Hz and Fs 2Fmax
S0 the Nyquist rate is
FN= 2Fmax=250Hz

37 March 2, 2013
Example # 3

Consider the following two signals which are sampled at 40 Hz.

Then find,
a) Discrete-Time signal?
b) Is there any aliasing, if so find Alias signal?
c) Find the minimum sampling rate to avoid Aliasing?

38 March 2, 2013
Solution

a)

So and

39 March 2, 2013
Cont…

Similarly

40 March 2, 2013
Comparison Between Continuous
Time and Discrete Time Signal

Continuous Time Discrete Time

 x(t) = A cos(Ωt +θ ) , - ∞ < t < ∞  x (n) = A cos(ω n+ θ) - ∞ < n< ∞


 Ω = 2π F -∞ < Ω < ∞  ω =2π f -π ≤ ω ≤ π

Where Where
A= Amplitude A = Amplitude
Ω = Frequency (radian/ second) ω = Frequency (radian/sample)
θ=Phase θ = Phase
F=cycles/second -∞ < F < ∞ f = cycles/sample -1/2 ≤ f ≤ 1/2

41 March 2, 2013
Characteristics of Analog
Sinusoidal Signal

 For every fixed value of F, x(t) is periodic. i.e. x(t)=x(t+T)

 Continuous-time sinusoidal signal with distinct(different)


frequencies are themselves distinct.

 Increasing the frequency(F) results in increased rate of oscillations.

42 March 2, 2013
Characteristics of Discrete Time
Sinusoid

 A Discrete-time sinusoid is periodic if its frequency f is a


rational number.

 Discrete-time sinusoids whose frequencies are separated by an


integer multiple of 2π are identical.

 The highest rate of oscillation in a discrete-time sinusoid is


attained when ω = π ( or ω = -π) or, equivalently f=1/2

(or f= -1/2).

43 March 2, 2013
Cont…

 A Discrete-time sinusoid is periodic if its frequency “f “is a


rational number.

Rational

44 March 2, 2013
Cont…

 Discrete-time sinusoids whose frequencies are separated by an


integer multiple of 2π are identical.
 Consider the sinusoid
It follows

Where

are indistinguishable(i.e. identical).

 The sinusoids having the frequency |𝝎|>𝝅 are the alias of


the corresponding sinusoid with frequency |𝝎|<𝝅.
45 March 2, 2013
Cont…

 The highest rate of oscillation in a discrete-time sinusoid is


attained when ω = π ( or ω = -π) or, equivalently f=1/2
(or f= -1/2).

46 March 2, 2013
Cont…

 The highest rate of oscillation in a discrete-time sinusoid is


attained when ω = π ( or ω = -π) or, equivalently f=1/2
(or f= -1/2).

47 March 2, 2013
Cont…

 If is greater than , then the original signal will repeat itself.


Also is also called alias of . Due to this property it
is difficult to distinguish between signals.

 Range for discrete time signal will become

48 March 2, 2013
Example

 x (n) = A cos(ω n+ θ)
Where
 ω = π/6 and θ=π/3
 f = 1/12 cycles per sample

49 March 2, 2013
Digital Signal & Analog Signal

 Digital Signals

Digital Signals are discrete-time signals having a


set of discrete values.

 Analog Signals

Analog signals are defined for every value of time


and they take on values in the continuous interval.

50 March 2, 2013
Analog To Digital Converter

 An Analog-to-Digital converter (ADC) is a device that converts an


analog voltage into a digital number.

 Steps of A/D Conversion:

 Sampling.

 Quantization.

 Coding.

51 March 2, 2013
Digital To Analog Converter

 A Digital-to-Analog converter (DAC) converts a digital number


to an analog voltage.

 Steps of D/A Conversion:

 Decoding.

 Quantization.

 Sampling.

52 March 2, 2013
Cont…

Digital
Decoding Quantizer Sampler Band Pass
signal
Filter

01001... Decoded Quantized Discrete- Analog


signal signal Time signal signal

53 March 2, 2013
Cont…

b) Since both signals are same, so we can say that is an


alias of .

c) To avoid aliasing we apply Nyquist Criteria which states that the


sampling frequency should be double the original signal.

54 March 2, 2013