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

Lecture 2

LEC 2
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)
4 views

Lecture 2

LEC 2
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/ 55

Digital Signal Processing

(CS202)
2022 – 2023

Lecture-2

Dr: Mary monir saied


Email: [email protected]
DSP Scenario
 Modern systems generally…….
 get a continuous-time signal from a sensor
 a continuous-time system modifies the signal
 Represent signals by a sequence of numbers (Sampling or
analog-to-digital conversions)
 Perform processing on these numbers with a digital processor
(Digital signal processing)
 and then (if desired) reconstruct analog signal from processed
numbers (digital-to-analog conversion)

2
DSP Scenario
 Analog input – analog output
 Digital recording of music
 Analog input – digital output
 Touch tone phone dialing
 Digital input – analog output
 Text to speech
 Digital input – digital output
 Compression of a file on computer

3
Why DSP?
 Digital data storage and transmission is much more
effective than in the analogue form
 Flexibility: processing functions can be altered or
adjusted
 Possibility of implementing much more complicated
processing functions than in analogue devices
 Efficient implementation of fast algorithms and
matrix-based processing
 Avery high accuracy and reliability is possible to
achieve
 Signal multiplexing: simultaneous (parallel)
processing 4
ANALOG TO DIGITAL (A/D)
CONVERSION
Analog to Digital Converter (ADC)

• Most signals of practical interest are analog in nature

Examples: Voice, Video, RADAR signals,


Transducer/Sensor output, Biological signals etc.

• So in order to utilize those benefits, we need to


convert our analog signals into digital

• This process is called A/D conversion

6
Analog to Digital Converter (ADC)

 Consists of 3 processes:
1. Sampling: Conversion from Continuous-Time,
Continuous-Amplitude signal to Discrete-Time,
Continuous-Amplitude signal.
2. Quantizing: Conversion from Discrete-Time,
Continuous-Amplitude signal to Discrete-Time,
Discrete-Amplitude signal.
3. Coding: Conversion from a Discrete-Time,
Discrete-Amplitude signal to an efficient Digital
data format.

7
Analog to Digital Converter (ADC)

8
9
Analog to Digital Converter (ADC)
1. Sample and Hold :
• Analog signal is continuous in time and continuous
in amplitude.

• It means that it carries infinite information of time


and infinite information of amplitude.

• Analog (continuous-time) signal has some value


defined at every time instant, so it has infinite
number of sample points.

10
Analog to Digital Converter (ADC)
1. Sample and Hold :
• It is impossible to digitize an infinite number of
points.

• The infinite points cannot be processed by the


digital signal (DS) processor or computer, since
they require an infinite amount of memory and
infinite amount of processing power for
computations.

• Sampling is the process to reduce the time


information or sample points.
11
Analog to Digital Converter (ADC)
1. Sample and Hold :
• The first essential step in analog-to-digital (A/D) conversion
is to sample an analog signal.

• This step is performed by a sample and hold circuit, which


samples at regular intervals called sampling intervals.

• Sampling can take samples at a fixed time interval.

• If x(t) is the input to the sampler, the output is x(nT), where T


is called the sampling interval or sampling period.

• After the sampling, the signal is called “discrete time


continuous signal” which is discrete in time and continuous in
amplitude.
12
Analog to Digital Converter (ADC)
1. Sample and Hold :

13
Analog to Digital Converter (ADC)
1. Sample and Hold :
 The sampling of a continuous time signal 𝑋𝑎 (t)
consists of keeping the information of the signal
𝑋𝑎 (t) once every 𝑇𝑆 second (sampling period).

sampling period, 𝑻𝑺

14
Sampling Theorem

15
Sampling Theorem
 It is possible to perfectly reconstruct a sampled
signal from its samples if the following condition is
met:
The sampling frequency 𝑭𝑺 is at least twice as
large as the maximum frequency 𝐹𝑀 of the signal.
 𝑭𝑺 ≥2 𝑭𝒎 (Shannon, Nyquis, 1940)
 e.g., Audio signal (to store in memory),
𝐹𝑚 = 3.5 KHz  𝑭𝑺 =7KHz at least. (𝑻𝑺 =142 µs),
𝑭𝑺 ≥ 7KHz

Fs = 1/Ts is the sampling rate given in samples per


second
16
The Sampling Theorem and Aliasing

𝑭𝑺 =11𝑭𝒎 𝑭𝑺 =3.3𝑭𝒎

17
The Sampling Theorem and Aliasing

𝑭𝑺 =1.05𝑭𝑴 𝑭𝑺 =1.05𝑭𝑴

18
The Sampling Theorem and Aliasing

Example of Aliasing
in the time domain of
various sinusoidal
signals ranging from
10 kHz to 80 kHz with
a sampling frequency
Fs = 40 kHz.

19
Analog to Digital Converter (ADC)
2. Quantization
Quantization: The process of converting discrete-time continuous valued
signal into discrete-time discrete valued (digital) signal

3. Coding
We need to encode each sample value in order to store it in b bits
memory location.

But as b is limited, we have to consider a finite values of samples.

For example
If b = 2 , we can have 2b=4 different possible sample values.
If b = 4, we can have 2b=16 different possible sample values.
20
Analog to Digital Converter (ADC)
2. Quantization

21
Representation of Discrete Signals

22
Representation of Discrete Signals

23
Important Discrete Time Signals

 The basic digital functions (signal or sequence) are

Unit Impulse
Unit Step
Rectangular Signal
Ramp Signal
Real value exponential
Sinusoidal Signal

24
1. Unit Impulse Function

• The unit impulse function δ[n] has an amplitude of zero


at all samples except n = 0, where it has the value 1.
• Every digital signal can be written as a sum of impulse
functions, using the amplitude at each sample.
25
Example: Determine the following:
a) δ[0]
b) δ[3]
c) δ[-2]
Answers

a) δ[0] = 1

b) δ[3] = 0

c) δ[-2] = 0

26
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = 4δ[n]

27
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = -2δ[n]

28
Shifted Unit Impulse Function
Example: Draw the following signals:

a) x[n] = δ[n - 2]

b) x[n] = δ[n + 2]

29
Shifted Unit Impulse Function
Example: Draw the following signals:

x[n] = δ[n - 3]

30
1. Unit Impulse Function
 Hence, the unit impulse signal can be used as a
basic building block for the construction &
representation of other signals.

e.g., x[n] = δ[n+1]+2δ[n]+0.5δ[n-1]+3δ[n-3]


𝑥[𝑛] = 𝑥 𝑘 𝛿[𝑛 − 𝑘]
𝑘=−∝

31
1. Unit Impulse Function
Example: write a function to describe the signal in the figure.

x[n] = δ[n] + δ[n-1] + δ[n-2] + δ[n-3]


32
1. Unit Impulse Function
Example: write a function to describe the signal in the figure.

x[n] = 4δ[n] - 2δ[n-1] + 3δ[n-2] - δ[n-3]


33
2. Unit Step Function

34
2. Unit Step Function
Example: Determine the values of the following
a) u[-1], b) u[0], c) u[1]

Answers

a) u[-1] = 0
b) u[0] = 1
c) u[1] = 1

35
Scaled Step Function
Example: Draw the signal x[n] = 3u[n]

36
Shifted Step Function
Example: Draw the signal (a) x[n] = u[n - 2]
(b) x[n] = u[n + 2]

37
2. Unit Step Function
Example: Draw the signal x[n] = u[-n]

38
2. Unit Step Function

39
2. Unit Step Function
Example: Draw the signal
x[n] = u[n] + 2u[n - 2]
2

40
2. Unit Step Function
Example: Draw the signal x[n] = u[n] - u[n - 3]

41
3. Rectangular Signal

42
4. Ramp Signal

r[n] = nu[n]

43
5. Real value exponential

44
6. Sinusoidal Signal

45
Do time shift then time scaling 46
Example:
A discrete-time signal x[n] is defined as:

47
Thank You

55

You might also like