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

Slide-1 Introduction To Signal Processing

Digital Signal Processing is a course of computer science and engineering department in all countryies. This is the first chapter.

Uploaded by

musa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views

Slide-1 Introduction To Signal Processing

Digital Signal Processing is a course of computer science and engineering department in all countryies. This is the first chapter.

Uploaded by

musa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 104

Digital Signal Processing

Abu saleh Musa Miah


Assistant Professor,
Dept. of CSE, BAUST, Bangladesh
email: [email protected], tel: +8801734264899
web: www.baust.edu.bd/cse
Digital Signal Processing
www.tutorialcare.com/DSP

Textbook :
Digital signal processing - Principles, algorithms and
application (3nd Edition)
J G Proakis, D G Manolakis

Reference for experiment :


Slicer_Digital_Signal_Processing_Using_MATLAB_
3rd_Edition
Textbook for Shortcut Understanding :
Understanding Digital Signal Processing
Richard G.Lyons

2
What is DSP?

DSP=Digital +Signal processing


What is Signal?
 A time varying physical quantity (as a voltage, current, or magnetic field strength)
by which convey messages or information.

 Signal Characteristics:
◦ Signals are Physical Quantities:
◦ Signals are Measurable
◦ Signals are Analog
◦ Signals Contain Information.

 Examples:
◦ Weather [temperature]
◦ Temperature [oC]
◦ Pressure [Newtons/m2] or [Pa]
◦ Mass [kg]
◦ Speed [m/s]
◦ Acceleration [m/s2]
◦ Voltage [Volts]
◦ Current [Amps]
◦ Power [Watts]

Veton Këpuska Tuesday, July 13, 2021 4


Example of Signal

 𝑠 ( 𝑡 ) = 5 𝑡  𝑠 ( 𝑡 ) = 20 𝑡 2   S(x,y)=3x+2xy+10
1 2

Figure1: DC Signal.

f(t)=?
Example of Signal

f(t)=

f(t)=

Veton Këpuska Tuesday, July 13, 2021 6


Amplitude, Phase, Frequency

 The Amplitude is the height from the center line to the peak.

 Frequency is how often something happens per unit of time (per


"1").

 The Phase Shift is how far the function is shifted horizontally from
the usual position.

 The Period goes from one peak to the next (or from any point to
the next matching point):
Analog Signal

Amplitude
4
3
2

x(t) = 5 cos (2.pi.f.t)


1
0
-10 -5 -1 0 5 10
-2
-3
-4
-5

Phase 5

x(t) = 5 cos (2.pi.f.t +


1

-10 -5 -1 0 5 10

3.14)
-3

-5

Frequency 5

x(t) = 5 cos (3. 2.pi.f.t +


1

-10 -5 -1 0 5 10

3.14)
-3

-5
What is Processing?

 Analysis: Understanding the information carried by the


signal.

 Synthesis: creating a signal to contain the given information.

Veton Këpuska Tuesday, July 13, 2021 9


Why signals should be processed?

 Carriers of information Useful and unwanted


 Extracting, enhancing, storing and transmitting the useful
information
 Extract:
 Amplitude
 Phase
 Frequency
 Spectral Content

 How signals are being processed?---


 Analog Signal Processing vs.
 Digital Signal Processing
Dsignal processing (DSP)?
 Is a field of numerical mathematics that is concerned with the processing of
discrete signals

 Area of mathematics deals with the principles that underlie all digital systems

Analog input Signal Analog Analog output Signal


x(t) Signal Processor y(t)

Analog Signal Processing

A/D Digital D/A


Analog converter Signal Processor converter
Analog
input
output
Signal x(t)
Digital Signal Processing Signal y(t)
Typical Digital Signal Processing System

It consists of
• an analog filter called (anti-imaging) filter,
• an analog-to-digital conversion (ADC) unit,
• a digital signal (DS) processor,
• a digital-to-analog conversion (DAC) unit,
• and an analog filter called reconstruction (anti-image)
filter.

12
A/D & D/A Conversion

13
Application Areas of DSP:
 EEG signal process
 Enhancement-noise filtering
 Coding, synthesis, and recognition
 Classification
 Speech signal processing,
 Enhancement-noise filtering
 Coding, synthesis, and recognition
 Classification
 Cardiac signals (ECG)
 Sonar and radar signal processing, ,
 Biomedical signal processing,
 Seismic data processing, etc.
Classification of Signal

1. Multichannel and Multidimensional Signals


2. Continuous Time vs. Discrete time signals
3. Continuous Valued versus Discrete Valued Signals
4. Deterministic Vs. Random Signals
5. Stationary vs Non-Stationary Signals.
Multichannel and Multidimensional Signals
 Signal is described by a function of one or more independent variables.
 The value of the function can be
 a real-valued scalar quantity,
 a complex-valued quantity
 S1(t)=Asin3πt is a real valued signal.
 However the signal S2.

is complex valued.

Multichannel: Collect more then


One sensor called multichannel
Signal.
Multichannel and Multidimensional
Signals
 Multidimensional: If the signal is a function of a single
independent variable. the signal is called a one-dimensional
signal.

 a signal is called M-dimensional if its value is a function


of M independent variables
Continuous vs Discrete
 The values of a continuous-time or discrete-time signaI can be continuous or discrete. If a
signal takes on all possible values on a finite or an infinite range. It is said to be continuous-
valued signal
 Discrete-time signals are defined only at certain specific values of time.
 Time instants need not be equidistant.
 But in practice they are usually taken at equally spaced intervals for computational
convenience and mathematical tractability.
Discrete-time signals

 The process of converting a continuous-valued signal into a discrete-


valued signal. called quantization
Deterministic Versus Random Signals

 Any signal that can be uniquely described by an explicit mathematical


expression, a table of data, or a well-defined rule is called deterministic.

 This term is used to emphasize the fact that all past, present. and future
values of the signal are known precisely, without any uncertainty.
Concept Frequency in CT and Discrete signal

 From physics we know that frequency is closely related to a


specific type of periodic motion called harmonic oscillation.

 which is described by sinusoidal functions.

 Periodicity
 Recall if a signal x(t) is periodic, then there exists a T>0 such
that x(t) =x(t+T) If no T>0 can be found, then x(t) is non-
periodic.
Continuous-Time Sinusoidal Signals

 A simple harmonic oscillation is mathematically :

   x ( t ) denotes an analog signal.


 A is the amplitude of the sinusoid.
 is the frequency in radians per second (radis), and
 is the phase in radians.

Instead of Omega, we often use the frequency F in cycles per second or


hertz (Hz).
Continuous-Time Sinusoidal Signals

Figure 1.10 Example of an analog sinusoidal signal.


Properties of C Sinusoidal Signals

 Al. For every fixed value of the frequency F, is periodic. Indeed. it


can easily be shown, using elementary trigonometry, that

where T, = 1/F is the fundamental period of the sinusoidal signal.

A2. Continuous-time sinusoidal signals with distinct (different)


frequencies are themselves distinct.

A3. Increasing the frequency F results in an increase in the rate of


oscillation of the signal, in the sense that more periods are included
in a given time interval.
Analog to Digital (A/D) Conversion
 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

25
Analog to Digital Conversion
A/D conversion can be viewed as a three step
process

26
Signals functions of time
Analog to Digital Conversion
A/D conversion can be viewed as a three step
process

28
Analog to Digital Conversion
Sample & Hold (Sampler)

 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.
29
Analog to Digital Conversion
Sample & Hold (Sampler)

 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. 30
Analog to Digital Conversion
Sample & Hold (Sampler)

 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.

 The length of the sampling interval is the same as the


sampling period, and the reciprocal of the sampling
period is the sampling frequency fs.
31
Analog to Digital Conversion
Sample & Hold (Sampler)

 After a brief acquisition time, during which a sample is


acquired, the sample and hold circuit holds the sample
steady for the remainder of the sampling interval.
 The hold time is needed to allow time for an A/D
converter to generate a digital code that best
corresponds to the analog sample.
 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.
32
Analog to Digital Conversion
Sample & Hold (Sampler)

33
Analog to Digital Conversion
Sample & Hold (Sampler)
Figure below shows an analog (continuous-
time) signal (solid line) defined at every point
over the time axis (horizontal line) and
amplitude axis (vertical line).
Hence, the analog signal contains an infinite
number of points.

34
Analog to Digital Conversion
Sample & Hold (Sampler)
 Each sample maintains its voltage level

during the sampling interval 𝑻 to give the


ADC enough time to convert it.
 This process is called sample and hold.

35
Sampling Rate/Sampling Theorem
Determines the highest frequency that you can
represent with a digital signal.
Sampling/Nyquist Theorem:

Sampling rate must be at least twice as high as


the highest frequency you want to represent.

If the highest frequency contained in an analog signal xa(t) is Fmax. And the signal
is sampled at a rate Fs >= 2Fmax, then xa(t) can be exactly recovered from its
sample values.
The sampling rate, F >=2F is called the Nyquist rate.
Nyquist–Shannon Sampling Theorem

The sampling theorem guarantees that an


analogue signal can be perfectly recovered as
long as the sampling rate is at least twice as
large as the highest-frequency component of
the analogue signal to be sampled.

37
ADC: Step1: Sampling Analog
Signal
  Sampling rate is number of samples per second.

 Where is the discrete time signal obtained by “ taking


sample of the analog signal every T second.

Sampling Rate:   (1.4.1)


 The time interval between samples is called the sampling interval  
 (1.4.2)

There exists a relationship between the frequency variable F for analog


signals and the frequency variable f for discrete-time signals.
Sampling
Relationship between the frequency of analog signal
and the frequency of discrete-time signal
 To establish relationship consider an analog signal

when, sampled periodically at a rate of samples per second


So (i) could be written as

…..(ii)
= A cos ()
t=nT
T=1/Fs
the general equation of discrete time f=FT
sinusoidal signals we
X(n)=A*cos(2*pi*f*n)
find ,
f=FT
f = ………(iii) [relation]
Relationship between the frequency of analog signal
and the frequency of discrete-time signal
 
f=FT
f = ………(iii) [relation]

We can write equivalently


(iv)
  T h e relation in (iii) justifies the name relative or normalized
frequency , which is some times used to describe the frequency
variable f.
From the harmonic oscillation we know
-∝<F<∝
-∝<<∝ (v)

the situation is different for discrete-time sinusoids. From Section


1.3.2 we recall that
Relationship between the frequency of analog signal
and the frequency of discrete-time signal
 -
………(vi)
Now substituting from (iii) into (iv) into (vi) where sample rate

Or equivalently

 Thus we find that the frequency F of continuous time sinusoidal signals when
sampled at a rate of must fall in the above range.
  We also can find that if the max frequency of discrete time sinusoidal is f then
with a sampling rate
ADC: Step1: Sampling Analog Signal
  Since the highest frequency in a discrete-time signal is or .
 It with a sampling rate ,
 The corresponding highest values of F

Fs>=Fmax*2

FS=Sampling Rate

Fmax=Maximum Frequency
Difference between Continuous and
Discrete time signal
Properties of Discrete time Signals
A discrete-time sinusoidal signal may be expressed as

  A is the amplitude of the sinusoid.


 w is the frequency in radians per sample. and is the phase in
radians.

 If instead of we use the frequency variable defined by

We can rewrite the equation:

Figure 1.12 shows a sinusoid with frequency w = /6 radians per sample


(f = & cycles per sample) and phase 6 = 17/3.
Discrete time Sinusoidal Signals
Properties of Discrete time Sinusoidal Signals

B1. A discrete-time sinusoid is periodic only if its frequency. f is a


rational number. When

Proof:
Properties of Discrete time Sinusoidal Signals

 
B2. Discrete-time sinusoids whose frequencies are separated by an integer
multiple of are identical.
Properties of Discrete time Sinusoidal Signals

B3. The highest rate of oscillation in a discrete-time sinusoid is attained


Nyquist–Shannon Sampling Theorem

50
Nyquist–Shannon Sampling Theorem

Examples

51
Nyquist–Shannon Sampling Theorem
Example: For the following analog signal, find the Nyquist sampling
rate, also determine the digital signal frequency and the digital
signal

52
Nyquist–Shannon Sampling Theorem

Example: Find the sampling frequency of the following


signal.

So sampling frequency should be

53
Nyquist–Shannon Sampling Theorem

Exercise

Determine the Nyquist sampling rate of a signal


x(t) = 3sin(5000t + 17o)

54
Difference between Continuous and
Discrete time signal
Example:

• Consider the analog signal

x a (t )  3 cos 50t  10 sin 300t  cos100t


• What is the sampling rate?
Solution:

• In the signal:
• F1=25Hz, F2=150Hz, F3=50Hz
• So, Fmax = 150Hz
• According to sampling theorem
• Fs >= 2Fmax=300 Hz
• So sampling rate is FS >= 2Fmax >= 300Hz.
Oversampling:

• If the sampling rate is Fs > 2Fmax then it is called


oversampling.
Undersampling:
• If the sampling rate is Fs < 2Fmax then it is called
Undersampling.
Aliasing:
• Aliasing refers to an effect that causes
different signals to become indistinguishable
(or aliases of one another) when sampled.
• Aliasing occurs when a system is measured at
an insufficient sampling rate.
Figure: The blue color shows aliased Signal while the
green shows the original signal.
Recovery of a sampled sine wave for
different sampling rates
Aliasing: signal ambiguity in FD

What happens if sampling rate not high


enough? A high frequency signal

sampled at too low a rate

looks like …

… a lower frequency signal.

That’s called aliasing or foldover. An ADC has a


low-pass anti-aliasing filter to prevent this.
Synthesis software can cause aliasing.
Aliasing

64
Aliasing
How many hertz can the human eye see?

 Most don't notice unless it is under 50 or 60 Hz.

 Generally, people notice when the frame-rate is


less than the refresh rate of the display.

 Depending on the type of CRT, you couldn't see


flicker at 30 Hz or you could still see it at 120
Hz.

65
Aliasing
 When the minimum sampling rate is not respected,
distortion called aliasing occurs.

 Aliasing causes high frequency signals to appear as


lower frequency signals.

 To be sure aliasing will not occur, sampling is always


preceded by low pass filtering.

 The low pass filter, called the anti-aliasing filter,


removes all frequencies above half the selected
sampling rate.

66
Aliasing
 Figure illustrates sampling a 40 Hz sinusoid
 The sampling interval between sample points is

T = 0.01 second, and the sampling rate is thus


fs = 100 Hz.
 The sampling theorem condition is satisfied

67
Aliasing
 Figure illustrates sampling a 90 Hz sinusoid
 The sampling interval between sample points is

T = 0.01 second, and the sampling rate is thus


fs = 100 Hz.
 The sampling theorem condition is not satisfied

68
Aliasing

69
Sampling Effect in Time Domain

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.

70
Time & Frequency Domains
• There are two complementary signal descriptions.
• Signals seen as projected onto time or frequency domains.

71
Time & Frequency Domains

72
Sampling Rate
Sampling Rate
Sampling Rate
Sampling Rate
Sampling Rate
Common Sampling Rates

Which rates can represent the range of


frequencies audible by (fresh) ears?
Sampling Rate Uses
44.1 kHz (44100) CD, DAT
48 kHz (48000) DAT, DV, DVD-Video
96 kHz (96000) DVD-Audio
22.05 kHz (22050) Old samplers

Most software can handle all these rates.


Quantizer
 After the sampling, the discrete time continuous
signal still carry infinite information (can take any
value) in terms of amplitude.

 Quantization is the process to reduce infinite


information of the amplitude.

 Quantizer do the conversion of discrete time


continuous valued signal into a discrete-time
discrete-value signal.

 The value of each signal sample is represented by a


value selected from a finite set of possible values. 79
Analog to Digital Conversion
Quantizer

 The A/D converter chooses a quantization level


for each analog sample.

 Number of levels of quantizer is equal to L = 2N

 An N-bit converter chooses among 2N possible


quantization levels.

 So 3 bit converter has 8 quantization levels, and


4 bit converter has 8 quantization levels. 80
Quantization

  
Converting a discrete time continuous amplitude signal into a digital signal called
quantization.
 Sampling converts the analog signal into discrete value of samples
 The values of these sample depends on the sampling instants.
 We denote quantizer operation on the sample as
 Let denote the sequence of quantized samples at the output of the quantize
hence

 Difference between the quantized value and actual sample value


is called quantization error,
 We illustrate the quantization process with an example. Let us consider the

discrete time signal


Explain quantization of continuous –
amplitude signal

A between two successive quantization levels is called the quantization


step size or resolurion.
Quantization Error

 The quantization error e,(n) in rounding is limited to the range of,


that is,

In other words, the instantaneous quantization error cannot exceed


half of the quantization step
Explain quantization of continuous –
amplitude signal

  represent the maximum and minimum value of x(n)
If
and L is the number of quantization levels then

 . Quantization noise can be reduced by increasing L.


 Quantization is an irreversible process

 Provided example =1,=0 and 11, which leads to =0.1.


 Increasing the quantization levels L results in a decrease of the step
size. Error decrease and accuracy increase.
Analog to Digital Conversion
4-bit Quantizer

85
Analog to Digital Conversion
4-bit Quantizer

86
Quantization Error
 The error caused by representing a continuous-valued
signal (infinite set) by a finite set of discrete-valued
levels.

 The larger the number of quantization levels, the


smaller the quantization errors.

 The quantization error is calculated as the difference


between the quantized level and the true sample level.

 Most quantization errors are limited in size to half a


quantization step Q or Δ .
87
3 Step: Assigning Codes to Zones
A/D

  converter assigns a unique binary number to each quantization
level.
 If we have L levels we need at least L different binary numbers.
 With word length of b bits we can create different binary numbers.
 Hence L

 The number of bits required to encode the zones, or the number of


bits per sample as it is commonly referred to, is obtained as follows:
nb = log2 L

 Given our example, nb = 3

 The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100,
101, 110, and 111
Quantization Error
 Suppose a quantizer operation given by Q(.)
is performed on continuous-valued samples
x[n] is given by Q(x[n]), then the quantization
error is given by

89
Analog to Digital Conversion
 Lets consider the signal which is to be quantized.

In the figure, we can see that there is a difference


between the original signal (Blue Line) and the
quantized signal (Red Lines). This is the error
produced while quantization 90
Analog to Digital Conversion
Quantization error can be reduced, however, if
the number of quantization levels is increased
as illustrated in the figure

91
Analog to Digital Conversion
Quantization of unipolar data (maximum error
= full step)

92
Analog to Digital Conversion
Quantization of unipolar data (maximum error
= half step)

93
Analog to Digital Conversion
Example: Analog pressures are recorded using a pressure
transducer as voltages between 0 and 3 V. The signal must be
quantized using a 3-bit digital code. Indicate how the analog
voltages will be covered to digital values.

The quantization step size is


Q = 3 V/23 = 0.375 V

The half of quantization step is


0.1875 V

94
Analog to Digital Conversion
Quantization of bipolar data (maximum error =
half step)

95
Three-bit A/D Conversion

96
Assigning Codes to Zones
Coding

•Process of converting the sampled continuous-Valued signals into


discrete-valued data

©Alex Doboli 2006


After Quantization
Quantization of sinusoidal signal
Quantization
Digital Signal
 Consider an audio signal with a voltage range between -10 and +10
 Assume the audio waveform has already been time sampled, as
shown
Summary

10
3
Summary

10
4

You might also like