Professional Documents
Culture Documents
LEC 1 - ADC Conversion-Ar
LEC 1 - ADC Conversion-Ar
DSP
Digital Signal Processing
كلية التكنولوجية
الصناعة والطاقة
محمود الجميس.د
صفحة ()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
كلية التكنولوجية
الصناعة والطاقة
Year’s
سنني
صفحة ()2
Mid-term
منتصف المدة
Lab
مخترب
Written
مكتوب
Total
المجموع
صفحة ()2
work
عمل
Exam
امتحان
صفحة ()2
Introduction to Signal
Processing
In this course, we will
)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
➢أنواع اإلشارات
)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
Sound wave
Digital Signal Processing
Sound wave
موجة صوتية
)10( صفحة
Digital Signal Processing
Image processing
Digital Signal Processing
Image processing
معالجة الصورة
)11( صفحة
Digital Signal Processing
Low-Pass
Filter
Digital Signal Processing
Low-Pass Filter
)12( صفحة
Digital Signal Processing
Analog
Digital
Digital Signal Processing
Analog
التناظرية
Digital
رقمي
صفحة ()13
Digital Signal Processing
functions
المهام
صفحة ()14
Digital Signal Processing
Digital Signal Processing
صفحة ()15
Introduction to Signal Processing
Discrete-time 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
Signal Processing
معالجة اإلشارات
Non-real-time
Real-time
)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
)19( صفحة
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
𝑥 ′ (𝑡) 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
)20( صفحة
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
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
⚫ sampling process
⚫ quantization process
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system Input and Output Channels
A/D Conversion
د/تحويل أ
من، والذي يشار إليه عادة بالرقمنة،يتكون التحويل من التناظري إىل الرقمي
صفحة ()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
A/D Conversion
د/تحويل أ
⚫samplingprocess
⚫ 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
A/D Conversion
د/تحويل أ
صفحة ()24
⚫samplingprocess
1
𝑓𝑠 =
𝑇
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system Input and Output Channels
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
Sampling 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
Basic Functional Blocks of real-time DSP system Input and Output Channels
Sampling frequency
)27( صفحة
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
Sampling frequency
Basic Functional Blocks of real-time DSP system Input and Output Channels
Sampling frequency
)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
Nyquist frequency
تردد نيكويست
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
anti-aliasing filter
فلرت تنعيم
)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
A/D Conversion
د/تحويل أ
⚫quantizationprocess
⚫عملية التكميم
صفحة ()31
Each sample is encoded B bits 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
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
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
التكميم والرتمزي
)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
التكميم والرتمزي
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.
Basic Functional Blocks of real-time DSP system Input and Output Channels
التكميم والرتمزي
The
ال
صفحة ()36
quantizing
التكميم
process
عملية
introduces
يقدم
)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,
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
التكميم والرتمزي
Example:
:مثال
صفحة ()37
If the input signal varies between 0 and 5 V,
، بتADC 12 باستخدام
. مليل فولت فقط19.5 مستوى دقة تصل إىل256 فيمكن أن يوفر، بتADC 8 إذا تم استخدام
)37( صفحة
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
A/D converter
Introduction to Signal Processing
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.
Basic Functional Blocks of real-time DSP system Input and Output Channels
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 التناظري ثم تحتفظ بهذه القيمة ببساطة لمدة
)39( صفحة
Introduction to Signal Processing
Basic Functional Blocks of real-time DSP system
Input and Output Channels
D/A conversion
D/A conversion
أ/تحويل د
صفحة ()40
Analog lowpass filter is used to reconstruct the signal
𝑓 برتدد القطع
)40( صفحة
Introduction to Signal
Processing
In this course, we will
)41( صفحة
Introduction to Signal Processing
Lab Example
Introduction to Signal Processing
Lab Example
مثال المخترب
)42( صفحة
Introduction to Signal Processing
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.
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.
مثال المخترب
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( صفحة