You are on page 1of 153

Faculty of Technological

Industry and Energy

DSP
Digital Signal Processing

Dr. Mahmoud Elgamasy


Faculty of Technological

‫كلية التكنولوجية‬

Industry and Energy

‫الصناعة والطاقة‬

Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Dr. Mahmoud Elgamasy

‫ محمود الجميس‬.‫د‬
‫صفحة (‪)1‬‬
Faculty of Technological
Industry and Energy

DSP
Digital Signal Processing
Year’s Mid-term Lab Written Total
work Exam
45 30 30 45 150
Faculty of Technological

‫كلية التكنولوجية‬

Industry and Energy

‫الصناعة والطاقة‬

Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Year’s

‫سنني‬
‫صفحة (‪)2‬‬
‫‪Mid-term‬‬

‫منتصف المدة‬

‫‪Lab‬‬

‫مخترب‬

‫‪Written‬‬

‫مكتوب‬

‫‪Total‬‬

‫المجموع‬
‫صفحة (‪)2‬‬
‫‪work‬‬

‫عمل‬

‫‪Exam‬‬

‫امتحان‬

‫صفحة (‪)2‬‬
Introduction to Signal
Processing
In this course, we will

➢Implement Experiments in lab.


➢Understand C language in programming DSP system
➢Use Matlab programming to implement DSP algorithms
➢Perform calculations for DSP algorithms
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

In this course, we will

‫في هذه الدورة سوف نقوم‬

➢Implement Experiments in lab.

.‫➢تنفيذ التجارب في المخترب‬

➢Understand C language in programming DSP system

DSP ‫ في برمجة نظام‬C ‫➢فهم لغة‬


‫صفحة (‪)3‬‬
➢Use Matlab programming to implement DSP algorithms

DSP ‫ لتنفيذ خوارزميات‬Matlab ‫➢استخدام برمجة‬

➢Perform calculations for DSP algorithms

DSP ‫➢إجراء العمليات الحسابية لخوارزميات‬

)3( ‫صفحة‬
Introduction to Signal
Processing
Points to be discussed:

➢ DSP meaning
➢DSP applications
➢Types of signals
➢Types of signal processing
➢Basic Functional Blocks of DSP system
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Points to be discussed:

:‫النقاط اليت سيتم مناقشتها‬

➢ DSP meaning

DSP ‫➢ معىن‬

➢DSP applications

DSP ‫➢تطبيقات‬
‫صفحة (‪)4‬‬
➢Types of signals

‫➢أنواع اإلشارات‬

➢Types of signal processing

‫➢أنواع معالجة اإلشارات‬

➢Basic Functional Blocks of DSP system

DSP ‫➢الكتل الوظيفية األساسية لنظام‬

)4( ‫صفحة‬
Digital Signal Processing

In most cases, the signals originate as sensory data from the real world:
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

In most cases, the signals originate as sensory data from the real world:

:‫ تنشأ اإلشارات كبيانات حسية من العالم الحقيقي‬،‫في معظم الحاالت‬

)5( ‫صفحة‬
Digital Signal Processing

In most cases, the signals originate as sensory data from the real world:

DSP

DSP is the mathematics, the algorithms, and the techniques used to manipulate
these signals after they have been converted into a digital form.

Digital signal processing (DSP) involves developing algorithms that can be used
to enhance a signal in a particular way or extract some useful information from
it.
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

In most cases, the signals originate as sensory data from the real world:

:‫ تنشأ اإلشارات كبيانات حسية من العالم الحقيقي‬،‫في معظم الحاالت‬

DSP is the mathematics, the algorithms, and the techniques used to manipulate these
signals after they have been converted into a digital form.
‫ هي الرياضيات والخوارزميات والتقنيات المستخدمة لمعالجة هذه اإلشارات بعد تحويلها‬DSP
.‫إىل نموذج رقمي‬

)6( ‫صفحة‬
Digital signal processing (DSP) involves developing algorithms that can be used to
enhance a signal in a particular way or extract some useful information from it.
‫) تطوير خوارزميات يمكن استخدامها لتعزيز اإلشارة‬DSP( ‫تتضمن معالجة اإلشارات الرقمية‬
.‫بطريقة معينة أو استخراج بعض المعلومات المفيدة منها‬

)6( ‫صفحة‬
Digital Signal Processing
‫‪Digital Signal Processing‬‬

‫معالجة اإلشاراة الرقمية‬

‫صفحة (‪)7‬‬
Digital Signal Processing

Radar

Transmit

DSP Receive
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Radar

‫رادار‬

Transmit

‫نقل‬

Receive

‫يستلم‬
‫صفحة (‪)8‬‬
Digital Signal Processing

Military Sonar

Sound wave
‫‪Digital Signal Processing‬‬

‫معالجة اإلشاراة الرقمية‬

‫‪Military Sonar‬‬

‫السونار العسكري‬

‫‪Sound wave‬‬

‫موجة صوتية‬

‫صفحة (‪)9‬‬
Digital Signal Processing

Audio Processing Application

Sound wave
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Audio Processing Application

‫تطبيق معالجة الصوت‬

Sound wave

‫موجة صوتية‬

)10( ‫صفحة‬
Digital Signal Processing

Image processing
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Image processing

‫معالجة الصورة‬

)11( ‫صفحة‬
Digital Signal Processing

Electrical Signals Filtering

Low-Pass
Filter
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Electrical Signals Filtering

‫تصفية اإلشارات الكهربائية‬

Low-Pass Filter

‫مرشح تمرير منخفض‬

)12( ‫صفحة‬
Digital Signal Processing

Electrical Signals Filtering

Analog

Digital
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Electrical Signals Filtering

‫تصفية اإلشارات الكهربائية‬

Analog

‫التناظرية‬

Digital

‫رقمي‬
‫صفحة (‪)13‬‬
Digital Signal Processing

Electrical Signals Filtering

• The accuracy of analog circuits is limited due to the component


tolerances and the variation in its values.

• Analog circuits are not flexible. For example, to modify the


frequency response of the above filter.

• analog circuits are not suited for implementing mathematical


functions
Digital Signal Processing

‫معالجة اإلشاراة الرقمية‬

Electrical Signals Filtering

‫تصفية اإلشارات الكهربائية‬

The accuracy of analog circuits is limited due to the component

‫دقة الدوائر التناظرية محدودة بسبب المكون‬

tolerances and the variation in its values.

.‫التفاوتات والتباين في قيمها‬


‫صفحة (‪)14‬‬
Analog circuits are not flexible. For example, to modify the

‫ لتعديل‬،‫ عىل سبيل المثال‬.‫الدوائر التناظرية ليست مرنة‬

frequency response of the above filter.

.‫استجابة الرتدد للمرشح أعاله‬

• analog circuits are not suited for implementing mathematical

‫• الدوائر التناظرية غري مناسبة لتنفيذ العمليات الحسابية‬

functions

‫المهام‬
‫صفحة (‪)14‬‬
Digital Signal Processing
‫‪Digital Signal Processing‬‬

‫معالجة اإلشاراة الرقمية‬

‫صفحة (‪)15‬‬
Introduction to Signal Processing

Signals can be divided into three categories

Continuous-time signals Discrete-time signals Digital signals


Analog signals
Analog signals are defined continuously in time and have an infinite range of
amplitude values.
Discrete-time signals are defined only at a particular set of time instances and
have a continuous range of values.

Digital signals have discrete values in both time and amplitude.


Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Signals can be divided into three categories

‫يمكن تقسيم اإلشارات إىل ثالث فئات‬

Continuous-time signals Analog signals

‫إشارات الوقت المستمر اإلشارات التناظرية‬

Discrete-time signals

‫إشارات زمنية منفصلة‬


‫صفحة (‪)16‬‬
Digital signals

‫اإلشارات الرقمية‬

Analog signals are defined continuously in time and have an infinite range of
amplitude values.
‫يتم تعريف اإلشارات التناظرية بشكل مستمر في الوقت المناسب ولها نطاق ال نهائي من قيم‬
.‫السعة‬
Discrete-time signals are defined only at a particular set of time instances and have a
continuous range of values.
‫يتم تعريف إشارات الوقت المنفصل فقط في مجموعة معينة من الحاالت الزمنية ولها نطاق‬
.‫مستمر من القيم‬

)16( ‫صفحة‬
Digital signals have discrete values in both time and amplitude.

.‫اإلشارات الرقمية لها قيم منفصلة في كل من الوقت والسعة‬

)16( ‫صفحة‬
Introduction to Signal Processing

Signal Processing

Non-real-time Real-time

Non-real-time signal processing involves manipulating signals that have already


been collected and digitized. The need for the result is not a function of real
time.
Real-time signal processing places stringent demands on DSP hardware and
software design to complete predefined tasks within a certain time frame.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Signal Processing

‫معالجة اإلشارات‬

Non-real-time

‫غري الوقت الحقيقي‬

Real-time

‫في الوقت الحاىل‬


‫صفحة (‪)17‬‬
Non-real-time signal processing involves manipulating signals that have already been
collected and digitized. The need for the result is not a function of real time.
‫تتضمن معالجة اإلشارات في غري الوقت الفعيل معالجة اإلشارات اليت تم جمعها ورقمنتها‬
.‫ إن الحاجة إىل النتيجة ليست وظيفة في الوقت الحقيقي‬.‫بالفعل‬
Real-time signal processing places stringent demands on DSP hardware and software
design to complete predefined tasks within a certain time frame.
DSP ‫تضع معالجة اإلشارات في الوقت الفعيل متطلبات صارمة عىل تصميم أجهزة وبرامج‬
.‫إلكمال المهام المحددة مسبًق ا خالل إطار زمين معني‬

)17( ‫صفحة‬
Introduction to Signal Processing

DSP algorithms
DSP algorithms can be developed, analyzed, and simulated using high-level
language and software tools such as C and MATLAB. The performance of the
algorithms can be verified using the personal computer.

There are limitations, however. For example the bandwidth of a DSP system is
limited by the sampling rate and hardware peripherals.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

DSP algorithms

DSP ‫خوارزميات‬
DSP algorithms can be developed, analyzed, and simulated using high-level language
and software tools such as C and MATLAB. The performance of the algorithms can be
verified ‫عالية‬
using‫وبرمجيات‬
the personal computer.
‫أدوات لغة‬ ‫ وتحليلها ومحاكاتها باستخدام‬DSP ‫يمكن تطوير خوارزميات‬
.‫ يمكن التحقق من أداء الخوارزميات باستخدام الكمبيوتر الشخيص‬.MATLAB‫ و‬C ‫المستوى مثل‬

)18( ‫صفحة‬
There are limitations, however. For example the bandwidth of a DSP system is limited
by the sampling rate and hardware peripherals.
‫ عىل معدل أخذ‬DSP ‫ يقترص عرض النطاق الرتددي لنظام‬،‫ عىل سبيل المثال‬.‫ولكن هناك قيود‬
.‫العينات واألجهزة الطرفية‬

)18( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لنظام‬

)19( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels

Input signal conditioning

𝑥 ′ (𝑡) is an analog signal and is picked up by an appropriate electronic sensor that converts
pressure, temperature, and sound into electrical signals.
For example, a microphone can be used to pick up sound signals. The sensor output 𝑥 ′ (𝑡) is
amplified with gain value 𝑔.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لنظام‬

Input and Output Channels

‫قنوات اإلدخال واإلخراج‬

Input signal conditioning

‫تكييف إشارة اإلدخال‬


‫صفحة (‪)20‬‬
𝑥′(𝑡) is an analog signal and is picked up by an appropriate electronic sensor that
converts pressure, temperature, and sound into electrical signals.
‫𝑥 عبارة عن إشارة تناظرية يتم التقاطها بواسطة مستشعر إلكرتوني مناسب يحول الضغط‬′(𝑡)
.‫ودرجة الحرارة والصوت إىل إشارات كهربائية‬
For example, a microphone can be used to pick up sound signals. The sensor output 𝑥′
(𝑡) is amplified with gain value
‫ تم تضخيم خرج‬.‫ يمكن استخدام الميكروفون اللتقاط اإلشارات الصوتية‬،‫عىل سبيل المثال‬
‫𝑥 بقيمة الكسب‬′(𝑡) ‫المستشعر‬

)20( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels

Input signal conditioning

The gain value 𝑔 is determined such that 𝑥(𝑡) has a dynamic range that matches the ADC.
For example, if the peak-to-peak range of the ADC is ±5 volts, then 𝑔 may be set so that the
amplitude of signal 𝑥(𝑡) to the ADC is scaled between ±5 volts.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لنظام‬

Input and Output Channels

‫قنوات اإلدخال واإلخراج‬

Input signal conditioning

‫تكييف إشارة اإلدخال‬


‫صفحة (‪)21‬‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
A/D Conversion

Analog-to-digital conversion, commonly referred as


digitization, consists of

⚫ sampling process
⚫ quantization process
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

A/D Conversion

‫د‬/‫تحويل أ‬

Analog-to-digital conversion, commonly referred as digitization, consists of

‫ من‬،‫ والذي يشار إليه عادة بالرقمنة‬،‫يتكون التحويل من التناظري إىل الرقمي‬
‫صفحة (‪)22‬‬
⚫samplingprocess

‫⚫ عملية أخذ العينات‬

⚫quantization process

‫⚫عملية التكميم‬

)22( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
A/D Conversion

⚫ sampling process
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

A/D Conversion

‫د‬/‫تحويل أ‬

⚫samplingprocess

‫⚫ عملية أخذ العينات‬


‫صفحة (‪)23‬‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP
Input and Output Channels
A/D Conversion

⚫ sampling process

1- The signal 𝑥(𝑡) is sampled at uniformly spaced instants of time, 𝑛𝑇, where 𝑛 is a positive
integer and 𝑇 is the sampling period in seconds. The sampling process converts an analog signal
into a discrete-time signal 𝑥 𝑛𝑇 . This is done by ‘sample and hold’ circuit, which maintains the
sampled level until the next sample is taken.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لـ‬

Input and Output Channels

‫قنوات اإلدخال واإلخراج‬

A/D Conversion

‫د‬/‫تحويل أ‬
‫صفحة (‪)24‬‬
⚫samplingprocess

‫⚫ عملية أخذ العينات‬


1- The signal 𝑥(𝑡) is sampled at uniformly spaced instants of time, 𝑛𝑇, where 𝑛 is a
positive integer and 𝑇 is the sampling period in seconds. The sampling process
‫ حيث 𝑛 عدد‬،𝑛𝑇 ،‫ تم أخذ عينة من اإلشارة )𝑡(𝑥 في لحظات زمنية متباعدة بشكل منتظم‬-1
converts an analog signal into a discrete-time signal 𝑥 𝑛𝑇 . This is done by ‘sample
‫ تقوم عملية أخذ العينات بتحويل اإلشارة‬.‫صحيح موجب و𝑇 هي فرتة أخذ العينات بالثواني‬
and hold’ circuit, which maintains the sampled level until the next sample is taken.
،"‫ ويتم ذلك عن طريق دائرة "أخذ العينة واالحتفاظ بها‬. 𝑥 𝑛𝑇 ‫التناظرية إىل إشارة زمنية منفصلة‬
.‫واليت تحافظ عىل مستوى العينة حىت يتم أخذ العينة التالية‬
)24( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Sampling frequency

1
𝑓𝑠 =
𝑇
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Sampling frequency

‫تردد أخذ العينات‬

)25( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Sampling Conditions
In order to represent an analog signal 𝑥 𝑡 by
a discrete-time signal 𝑥 𝑛𝑇 , two conditions
must be met:

1- The analog signal 𝑥 𝑡 must be bandlimited by the bandwidth of the signal 𝑓𝑀 . 𝑓𝑀 is the
maximum frequency component in the analog signal.
2- The sampling frequency, 𝑓𝑠 , must be at least twice the maximum frequency component 𝑓𝑀 .
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Sampling Conditions

‫رشوط أخذ العينات‬

In order to represent an analog signal 𝑥 𝑡 by

‫لتمثيل اإلشارة التناظرية 𝑡𝑥‏ بواسطة‬


‫صفحة (‪)26‬‬
a discrete-time signal 𝑥 𝑛𝑇 , two conditions

‫ رشطان‬، 𝑥 𝑛𝑇 ‫إشارة زمنية منفصلة‬

must be met:

:‫يجب أن تتحقق‬

1- The analog signal 𝑥 𝑡 must be bandlimited by the bandwidth of the signal 𝑓𝑀. 𝑓𝑀
is the maximum frequency component in the analog signal.
‫𝑀𝑓 هو‬. 𝑓𝑀 ‫ يجب أن تكون اإلشارة التناظرية 𝑡𝑥 محدودة النطاق بعرض نطاق اإلشارة‬-1
.‫مكون الرتدد األقىص في اإلشارة التناظرية‬

)26( ‫صفحة‬
2- The sampling frequency, 𝑓𝑠, must be at least twice the maximum frequency
component 𝑓𝑀.
.𝑓𝑀 ‫ عىل األقل ضعف مكون الرتدد األقىص‬،𝑓𝑠 ‫ يجب أن يكون تردد أخذ العينات‬-2

)26( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Sampling frequency

Example: Given a sampling rate for a


specific application, find the sampling period:
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Sampling frequency

‫تردد أخذ العينات‬

Example: Given a sampling rate for a

a ‫ بالنظر إىل معدل أخذ العينات لـ‬:‫مثال‬


‫صفحة (‪)27‬‬
specific application, find the sampling period:

:‫ ابحث عن فرتة أخذ العينات‬،‫تطبيق محدد‬

)27( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Sampling frequency

Example: Given a sampling rate for a


specific application, find the sampling period:
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Sampling frequency

‫تردد أخذ العينات‬

Example: Given a sampling rate for a

a ‫ بالنظر إىل معدل أخذ العينات لـ‬:‫مثال‬


‫صفحة (‪)28‬‬
specific application, find the sampling period:

:‫ ابحث عن فرتة أخذ العينات‬،‫تطبيق محدد‬

)28( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Nyquist frequency
The minimum sampling frequency 𝑓𝑠 =2 𝑓𝑀
is the Nyquist rate.
𝑓𝑠
The Nyquist frequency 𝑓𝑁 = (folding frequency)
2
𝑓
The frequency interval is [0 𝑠]
2

When an analog signal is sampled at sampling frequency 𝑓𝑠 , The frequency components higher
𝑓𝑠 𝑓𝑠
than are fold back to the range [0 ].
2 2
This undesired effect is known as aliasing where the original analog signal can not be
recovered from the sampled data.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Nyquist frequency

‫تردد نيكويست‬

The minimum sampling frequency 𝑓𝑠=2 𝑓𝑀 is the Nyquist rate.

.‫=𝑠𝑓 هو معدل نيكويست‬2 𝑓𝑀 ‫الحد األدنى لتكرار أخذ العينات‬


‫صفحة (‪)29‬‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
anti-aliasing filter
For most practical applications, the incoming
analog signal may not be bandlimited and the
signal has significant energies outside the
highest frequency of interest.

To guarantee that the theorem is fulfilled, an anti-aliasing filter is used to band-limit the
input signal.
𝑓𝑠
anti-aliasing filter is analog low pass filter with the cut-off frequency 𝑓𝑐𝑢𝑡_𝑜𝑓𝑓 ≤ 2
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

anti-aliasing filter

‫فلرت تنعيم‬

For most practical applications, the incoming

‫ واردة‬،‫بالنسبة لمعظم التطبيقات العملية‬


‫صفحة (‪)30‬‬
analog signal may not be bandlimited and the

‫قد ال تكون اإلشارة التناظرية محدودة النطاق و‬

signal has significant energies outside the

‫اإلشارة لديها طاقات كبرية خارج‬

highest frequency of interest.

.‫أعىل تردد من الفائدة‬

To guarantee that the theorem is fulfilled, an anti-aliasing filter is used to band-limit


the input signal.
.‫ يتم استخدام مرشح مضاد للتعرجات لتحديد النطاق إلشارة الدخل‬،‫ولضمان استيفاء النظرية‬
‫صفحة (‪)30‬‬
anti-aliasing filter is analog low pass filter with the cut-off frequency 𝑓

𝑓 ‫مرشح منع التعرج هو مرشح تمرير منخفض تناظري برتدد القطع‬

)30( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP
Input and Output Channels
A/D Conversion

⚫ quantization process
Each sample
is encoded
B bits ADC
0 1 ... … … … .. B
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP Input and Output Channels

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج‬

A/D Conversion

‫د‬/‫تحويل أ‬

⚫quantizationprocess

‫⚫عملية التكميم‬
‫صفحة (‪)31‬‬
Each sample is encoded B bits ADC

ADC ‫يتم ترمزي كل عينة ببت‬

)31( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP
Input and Output Channels
A/D Conversion

⚫ quantization process
Each sample
000001 is encoded
2𝐵 levels 000010
000011 B bits ADC
000100 0 1 ... … … … .. B
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP Input and Output Channels

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج‬

A/D Conversion

‫د‬/‫تحويل أ‬

⚫quantizationprocess

‫⚫عملية التكميم‬
‫صفحة (‪)32‬‬
2𝐵 levels

2𝐵 ‫مستويات‬

Each sample

‫كل عينة‬

is encoded

‫تم ترمزيه‬

B bits ADC

B ADC ‫بتات‬
‫صفحة (‪)32‬‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP
Input and Output Channels
A/D Conversion

⚫ quantization process

2- The amplitude of each discrete-time sample is quantized into one of the 2𝐵 levels, where B is
the number of bits the ADC has to represent for each sample. The discrete amplitude levels are
represented (encoded) into distinct binary words 𝑥(𝑛) with a fixed word length B. The binary
sequence 𝑥(𝑛) is the digital signal.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP Input and Output Channels

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج‬

A/D Conversion

‫د‬/‫تحويل أ‬

⚫quantizationprocess

‫⚫عملية التكميم‬
‫صفحة (‪)33‬‬
2- The amplitude of each discrete-time sample is quantized into one of the 2𝐵 levels,
where B is the number of bits the ADC has to represent for each sample. The discrete
amplitude
‫البتات اليت‬levels
‫هو عدد‬areBrepresented (encoded)
‫ حيث‬،2𝐵 ‫مستويات‬ ‫في أحد‬into‫منفصلة‬
distinct‫زمنية‬
binary words
‫عينة‬ 𝑥(𝑛) with
‫سعة كل‬ ‫قياس‬ a fixed
‫ يتم‬-2
word
‫ ثنائية‬length
‫ كلمات‬B.
‫في‬The binary sequence
‫المنفصلة‬ 𝑥(𝑛) is)‫(تشفري‬
‫مستويات السعة‬ the digital signal.
‫تمثيل‬ ‫ يتم‬.‫ لكل عينة‬ADC ‫يجب أن يمثلها‬
.‫ والتسلسل الثنائي )𝑛(𝑥 هو اإلشارة الرقمية‬.B ‫ممزية )𝑛(𝑥 بطول كلمة ثابت‬
)33( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Quantizing and Encoding
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Quantizing and Encoding

‫التكميم والرتمزي‬

)34( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Quantizing and Encoding
It is assumed that the discrete-time signal
𝑥(𝑛𝑇) has infinite wordlength, while the
digital signal values 𝑥(𝑛) only have a limited
B-bit.

If the word length of an ADC is B bits, there are different 2𝐵 values (levels) that can be used to
represent a sample. The entire continuous amplitude range is divided into 2𝐵 subranges.
Quantization is a process that represents an analog-valued sample 𝑥(𝑛𝑇) with its nearest level
that corresponds to the digital signal 𝑥 𝑛 by a finite number of bits.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Quantizing and Encoding

‫التكميم والرتمزي‬

It is assumed that the discrete-time signal

‫ومن المفرتض أن إشارة الوقت المنفصلة‬


‫صفحة (‪)35‬‬
𝑥(𝑛𝑇) has infinite wordlength, while the

‫ بينما‬،‫)𝑇𝑛(𝑥 له طول كلمات ال نهائي‬

digital signal values 𝑥(𝑛) only have a limited

‫قيم اإلشارة الرقمية )𝑛(𝑥 محدودة فقط‬

B-bit.

.‫ب بت‬

)35( ‫صفحة‬
g
used to represent a sample. The entire continuous amplitude range is divided into 2𝐵
subranges.
‫استخدامها‬Quantization is a process
‫مختلفة يمكن‬ that represents
2𝐵 )‫(مستويات‬ ‫فهناك قيم‬ an،Banalog-valued
‫ هو بت‬ADC ‫كلمة‬ sample
‫)𝑇𝑛(𝑥طول‬
‫إذا كان‬
with its nearest
‫التكميم‬ .‫هما 𝐵‏‬level that‫نطاقني‬
‫فرعيني‬ corresponds to the‫المستمرة‬
‫بالكامل إىل‬ digital signal
‫السعة‬𝑥𝑛 by a‫وينقسم‬
‫مدى‬ finite number of
.‫لتمثيل العينة‬
bits.
‫هو عملية تمثل عينة ذات قيمة تناظرية )𝑇𝑛(𝑥 بأقرب مستوى لها يتوافق مع اإلشارة الرقمية‬
.‫𝑛 𝑥 بعدد محدود من البتات‬
)35( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Quantizing and Encoding
The quantizing process introduces
errors that can not be removed.

′°′ represents the discrete-time signal


′′ represents the digital signal
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Quantizing and Encoding

‫التكميم والرتمزي‬

The

‫ال‬
‫صفحة (‪)36‬‬
quantizing

‫التكميم‬

process

‫عملية‬

introduces

‫يقدم‬

errors that can not be removed.

.‫األخطاء اليت ال يمكن إزالتها‬


‫صفحة (‪)36‬‬
′°′ represents the discrete-time signal′′ represents the digital signal

‫ تمثل اإلشارة الرقمية‬′′‫ إشارة الوقت المنفصلة‬′°′ ‫تمثل‬

)36( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Quantizing and Encoding
Example:
If the input signal varies between 0 and 5 V,

using 12-bit ADC,


The ADC has 212 levels (4096 levels),
The least significant bit (LSB) would corresponds to 1.22 mV resolution.

If 8-bit ADC is used, 256 levels can only provide up to 19.5 mV resolution.
With more quantization levels, the analog signal is represented accurately.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

Quantizing and Encoding

‫التكميم والرتمزي‬

Example:

:‫مثال‬
‫صفحة (‪)37‬‬
If the input signal varies between 0 and 5 V,

،‫ فولت‬5‫ و‬0 ‫إذا كانت إشارة الدخل ترتاوح بني‬

using 12-bit ADC,

،‫ بت‬ADC 12 ‫باستخدام‬

The ADC has 212 levels (4096 levels),

،)‫ مستوى‬4096( ‫ مستوى‬212 ‫ عىل‬ADC ‫يحتوي‬

The least significant bit (LSB) would corresponds to 1.22 mV resolution.

.‫ مليل فولت‬1.22 ‫) مع دقة تبلغ‬LSB( ‫تتوافق البتة األقل أهمية‬


‫صفحة (‪)37‬‬
If 8-bit ADC is used, 256 levels can only provide up to 19.5 mV resolution.

.‫ مليل فولت فقط‬19.5 ‫ مستوى دقة تصل إىل‬256 ‫ فيمكن أن يوفر‬،‫ بت‬ADC 8 ‫إذا تم استخدام‬

With more quantization levels, the analog signal is represented accurately.

.‫ يتم تمثيل اإلشارة التناظرية بدقة‬،‫مع المزيد من مستويات التكميم‬

)37( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
A/D converter
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لنظام‬

A/D converter

‫د‬/‫محول أ‬

)38( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
D/A conversion
Most DACs are zero-order-hold, which means they convert
the binary input to the analog level and then simply hold
that value for T seconds until the next sampling instant.

Therefore, the DAC produces a staircase shape analog


waveform 𝒚′ (𝒕).
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system Input and Output Channels

‫ في الوقت الفعيل‬DSP ‫الكتل الوظيفية األساسية لقنوات اإلدخال واإلخراج لنظام‬

D/A conversion

‫أ‬/‫تحويل د‬

)39( ‫صفحة‬
Most DACs are zero-order-hold, which means they convert the binary input to the
analog level and then simply hold that value for T seconds until the next sampling
instant. ‫ مما يعين أنها تقوم بتحويل اإلدخال الثنائي إىل‬،‫ عبارة عن ترتيب صفري‬DACs ‫معظم‬
‫المستوى‬
.‫ ثانية حىت لحظة أخذ العينات التالية‬T ‫التناظري ثم تحتفظ بهذه القيمة ببساطة لمدة‬

Therefore, the DAC produces a staircase shape analog waveform 𝒚′

′𝒚 ‫ شكل موجة تناظرية عىل شكل سلم‬DAC ‫ تنتج‬،‫لذلك‬

)39( ‫صفحة‬
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
D/A conversion

Analog lowpass filter is used to reconstruct the signal


𝑓
with cut-off frequency 𝑓𝑐𝑢𝑡−𝑜𝑓𝑓 ≤ 𝑠
2

It is known as anti-imaging filter (smoothing filter) where


it smoothes the staircase signal and round off the corners
of the staircase signal and make it smoother.
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Basic Functional Blocks of real-time DSP system

‫ في الوقت الحقيقي‬DSP ‫الكتل الوظيفية األساسية لنظام‬

Input and Output Channels

‫قنوات اإلدخال واإلخراج‬

D/A conversion

‫أ‬/‫تحويل د‬
‫صفحة (‪)40‬‬
Analog lowpass filter is used to reconstruct the signal

‫يتم استخدام مرشح الرتدد المنخفض التناظري إلعادة بناء اإلشارة‬

with cut-off frequency 𝑓

𝑓 ‫برتدد القطع‬

)40( ‫صفحة‬
Introduction to Signal
Processing
In this course, we will

➢Implement Experiments in lab.


➢Understand C language in programming DSP system
➢Use Matlab programming to implement DSP algorithms
➢Perform calculations for DSP algorithms
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

In this course, we will

‫في هذه الدورة سوف نقوم‬

➢Implement Experiments in lab.

.‫➢تنفيذ التجارب في المخترب‬

➢Understand C language in programming DSP system

DSP ‫ في برمجة نظام‬C ‫➢فهم لغة‬


‫صفحة (‪)41‬‬
➢Use Matlab programming to implement DSP algorithms

DSP ‫ لتنفيذ خوارزميات‬Matlab ‫➢استخدام برمجة‬

➢Perform calculations for DSP algorithms

DSP ‫➢إجراء العمليات الحسابية لخوارزميات‬

)41( ‫صفحة‬
Introduction to Signal Processing

Lab Example
Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬

Lab Example

‫مثال المخترب‬

)42( ‫صفحة‬
Introduction to Signal Processing
Lab Example

ARM Cortex M3 Module

An analog-to-digital converter with a resolution of 12 bits is built into


the LPC1768.
The maximum conversion rate of the ADC is some 200 kHz.

There are separate result registers for each of the eight ADC channels. On the ARM Cortex-M3
module, two analog inputs are provided for use in experiments.

The ADC can be used in continuous conversion mode or can be triggered by an interrupt.
Analog-to-digital conversion can be triggered either by a start command from the main
program software or in response to a timer or external interrupt event.
An analog-to-digital converter with a resolution of 12 bits is built into the LPC1768.

.LPC1768 ‫ بت في‬12 ‫تم تضمني محول تمثييل إىل رقمي بدقة‬

The maximum conversion rate of the ADC is some 200 kHz.

.‫ كيلو هرتز‬200 ‫ هو حوايل‬ADC ‫الحد األقىص لمعدل التحويل لـ‬

ARM Cortex M3 Module

M3 ‫وحدة أرم كورتكس‬

Introduction to Signal Processing

‫مقدمة لمعالجة اإلشارات‬


‫صفحة (‪)43‬‬
Lab Example

‫مثال المخترب‬

There are separate result registers for each of the eight ADC channels. On the ARM
Cortex-M3 module, two analog inputs are provided for use in experiments.
‫ يتم‬،ARM Cortex-M3 ‫ في وحدة‬.‫ الثماني‬ADC ‫توجد سجالت نتائج منفصلة لكل قناة من قنوات‬
.‫توفري مدخلني تناظريني الستخدامهما في التجارب‬

)43( ‫صفحة‬
The ADC can be used in continuous conversion mode or can be triggered by an
interrupt. Analog-to-digital conversion can be triggered either by a start command
‫ يمكن‬.‫ في وضع التحويل المستمر أو يمكن تشغيله عن طريق المقاطعة‬ADC ‫يمكن استخدام‬
from the main program software or in response to a timer or external interrupt event.
‫تشغيل التحويل من التناظري إىل الرقمي إما عن طريق أمر بدء من برنامج الربنامج الرئييس أو‬
.‫استجابة لمؤقت أو حدث مقاطعة خارجي‬
)43( ‫صفحة‬

You might also like