SlideShare a Scribd company logo
1 of 40
Digital Signal Processing
(DSP)
Fundamentals
Overview
• What is DSP?
• Converting Analog into Digital
– Electronically
– Computationally
• How Does It Work?
– Faithful Duplication
– Resolution Trade-offs
What is DSP?
• Converting a continuously changing
waveform (analog) into a series of discrete
levels (digital)
What is DSP?
• The analog waveform is sliced into equal
segments and the waveform amplitude is
measured in the middle of each segment
• The collection of measurements make up
the digital representation of the waveform
What is DSP?
0
0.22
0.44
0.64
0.82
0.98
1.11
1.2
1.24
1.27
1.24
1.2
1.11
0.98
0.82
0.64
0.44
0.22
0
-0.22
-0.44
-0.64
-0.82
-0.98
-1.11
-1.2
-1.26
-1.28
-1.26
-1.2
-1.11
-0.98
-0.82
-0.64
-0.44
-0.22
0
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
Converting Analog into Digital
Electronically
• The device that does the conversion is
called an Analog to Digital Converter
(ADC)
• There is a device that converts digital to
analog that is called a Digital to Analog
Converter (DAC)
Converting Analog into Digital
Electronically
• The simplest form of
ADC uses a resistance
ladder to switch in the
appropriate number of
resistors in series to
create the desired
voltage that is
compared to the input
(unknown) voltage
V-7
V-6
V-low
V-1
V-2
V-3
V-4
V-5
V-high
SW-8
SW-7
SW-6
SW-5
SW-4
SW-3
SW-2
SW-1
Output
Converting Analog into Digital
Electronically
• The output of the
resistance ladder is
compared to the
analog voltage in a
comparator
• When there is a match,
the digital equivalent
(switch configuration)
is captured
Analog Voltage
Resistance
Ladder Voltage
Comparator
Output Higher
Equal
Lower
Converting Analog into Digital
Computationally
• The analog voltage can now be compared with the
digitally generated voltage in the comparator
• Through a technique called binary search, the
digitally generated voltage is adjusted in steps
until it is equal (within tolerances) to the analog
voltage
• When the two are equal, the digital value of the
voltage is the outcome
Converting Analog into Digital
Computationally
• The binary search is a mathematical technique that
uses an initial guess, the expected high, and the
expected low in a simple computation to refine a
new guess
• The computation continues until the refined guess
matches the actual value (or until the maximum
number of calculations is reached)
• The following sequence takes you through a
binary search computation
Binary Search
• Initial conditions
– Expected high 5-volts
– Expected low 0-volts
– 5-volts 256-binary
– 0-volts 0-binary
• Voltage to be converted
– 3.42-volts
– Equates to 175 binary
Analog Digital
5-volts 256
0-volts 0
2.5-volts 128
3.42-volts Unknown
(175)
Binary Search
• Binary search algorithm:
• First Guess:
Analog Digital
5-volts 256
0-volts 0
128
3.42-volts unknown
NewGuessLow
LowHigh
=+
−
2
1280
2
0256
=+
−
Guess is Low
Binary Search
• New Guess (2):
Analog Digital
5-volts 256
0-volts 0
192
3.42-volts unknown
192128
2
128256
=+
−
Guess is High
Binary Search
• New Guess (3):
Analog Digital
5-volts 256
0-volts 0
160
3.42-volts unknown
160128
2
128192
=+
−
Guess is Low
Binary Search
• New Guess (4):
Analog Digital
5-volts 256
0-volts 0
176
3.42-volts
unknown
176160
2
160192
=+
−
Guess is High
Binary Search
• New Guess (5): Analog Digital
5-volts 256
0-volts 0
168
3.42-volts unknown
168160
2
160176
=+
−
Guess is Low
Binary Search
• New Guess (6): Analog Digital
5-volts 256
0-volts 0
172
3.42-volts unknown
172168
2
168176
=+
−
Guess is Low
(but getting close)
Binary Search
• New Guess (7):
Analog Digital
5-volts 256
0-volts 0
174
3.42-volts unknown
174172
2
172176
=+
−
Guess is Low
(but getting really,
really, close)
Binary Search
• New Guess (8):
Analog Digital
5-volts 256
0-volts 0
3.42-volts 175!
175174
2
174176
=+
−
Guess is Right On
Binary Search
• The speed the binary search is
accomplished depends on:
– The clock speed of the ADC
– The number of bits resolution
– Can be shortened by a good guess (but usually
is not worth the effort)
How Does It Work?
Faithful Duplication
• Now that we can slice up a waveform and
convert it into digital form, let’s take a look
at how it is used in DSP
• Draw a simple waveform on graph paper
– Scale appropriately
• “Gather” digital data points to represent the
waveform
Starting Waveform Used to
Create Digital Data
How Does It Work?
Faithful Duplication
• Swap your waveform data with a partner
• Using the data, recreate the waveform on a
sheet of graph paper
Waveform Created from Digital
Data
How Does It Work?
Faithful Duplication
• Compare the original with the recreating,
note similarities and differences
How Does It Work?
Faithful Duplication
• Once the waveform is in digital form, the
real power of DSP can be realized by
mathematical manipulation of the data
• Using EXCEL spreadsheet software can
assist in manipulating the data and making
graphs quickly
• Let’s first do a little filtering of noise
How Does It Work?
Faithful Duplication
• Using your raw digital data, create a new
table of data that averages three data points
– Average the point before and the point after
with the point in the middle
– Enter all data in EXCEL to help with graphing
Noise Filtering Using Averaging
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
Ave before/after
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Faithful Duplication
• Let’s take care of some static crashes that
cause some interference
• Using your raw digital data, create a new
table of data that replaces extreme high and
low values:
– Replace values greater than 100 with 100
– Replace values less than -100 with -100
Clipping of Static Crashes
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
eliminate extremes (100/-100)
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Resolution Trade-offs
• Now let’s take a look at how sampling rates
affect the faithful duplication of the
waveform
• Using your raw digital data, create a new
table of data and delete every other data
point
• This is the same as sampling at half the rate
Half Sample Rate
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
every 2nd
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Resolution Trade-offs
• Using your raw digital data, create a new
table of data and delete every second and
third data point
• This is the same as sampling at one-third
the rate
1/2 Sample Rate
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
every 3rd
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Resolution Trade-offs
• Using your raw digital data, create a new
table of data and delete all but every sixth
data point
• This is the same as sampling at one-sixth
the rate
1/6 Sample Rate
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
every 6th
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Resolution Trade-offs
• Using your raw digital data, create a new
table of data and delete all but every twelfth
data point
• This is the same as sampling at one-twelfth
the rate
1/12 Sample Rate
Raw
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
every 12th
-150
-100
-50
0
50
100
150
0 10 20 30 40
Time
Amplitude
How Does It Work?
Resolution Trade-offs
• What conclusions can you draw from the
changes in sampling rate?
• At what point does the waveform get too
corrupted by the reduced number of
samples?
• Is there a point where more samples does
not appear to improve the quality of the
duplication?
How Does It Work?
Resolution Trade-offs
Bit
Resolution
High Bit
Count
Good
Duplication
Slow
Low Bit
Count
Poor
Duplication
Fast
Sample Rate High Sample
Rate
Good
Duplication
Slow
Low Sample
Rate
Poor
Duplication
Fast

More Related Content

Similar to Digital signal processing fundamentals

digital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptxdigital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptxabelllll
 
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Ra'Fat Al-Msie'deen
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer visionEran Shlomo
 
lecture11-analog.pptx
lecture11-analog.pptxlecture11-analog.pptx
lecture11-analog.pptxlucia401709
 
Machine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedMachine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedOmid Vahdaty
 
Number systems
Number systemsNumber systems
Number systemsKumar
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptxLibanMohamed26
 
Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1khairulhuda242
 
Nearest Neighbor Customer Insight
Nearest Neighbor Customer InsightNearest Neighbor Customer Insight
Nearest Neighbor Customer InsightMapR Technologies
 
Digital electronics
Digital electronicsDigital electronics
Digital electronicscallr
 

Similar to Digital signal processing fundamentals (20)

digital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptxdigital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptx
 
microprocessor
microprocessormicroprocessor
microprocessor
 
Enar short course
Enar short courseEnar short course
Enar short course
 
chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
 
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
 
5954987.ppt
5954987.ppt5954987.ppt
5954987.ppt
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer vision
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
lecture11-analog.pptx
lecture11-analog.pptxlecture11-analog.pptx
lecture11-analog.pptx
 
Realtime Analytics
Realtime AnalyticsRealtime Analytics
Realtime Analytics
 
Machine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data DemystifiedMachine Learning Essentials Demystified part2 | Big Data Demystified
Machine Learning Essentials Demystified part2 | Big Data Demystified
 
Number systems
Number systemsNumber systems
Number systems
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx
 
Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1Week 12 Dimensionality Reduction Bagian 1
Week 12 Dimensionality Reduction Bagian 1
 
Lecture_4.ppt
Lecture_4.pptLecture_4.ppt
Lecture_4.ppt
 
1015 track2 abbott
1015 track2 abbott1015 track2 abbott
1015 track2 abbott
 
1030 track2 abbott
1030 track2 abbott1030 track2 abbott
1030 track2 abbott
 
Nearest Neighbor Customer Insight
Nearest Neighbor Customer InsightNearest Neighbor Customer Insight
Nearest Neighbor Customer Insight
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Digital signal processing fundamentals

  • 2. Overview • What is DSP? • Converting Analog into Digital – Electronically – Computationally • How Does It Work? – Faithful Duplication – Resolution Trade-offs
  • 3. What is DSP? • Converting a continuously changing waveform (analog) into a series of discrete levels (digital)
  • 4. What is DSP? • The analog waveform is sliced into equal segments and the waveform amplitude is measured in the middle of each segment • The collection of measurements make up the digital representation of the waveform
  • 6. Converting Analog into Digital Electronically • The device that does the conversion is called an Analog to Digital Converter (ADC) • There is a device that converts digital to analog that is called a Digital to Analog Converter (DAC)
  • 7. Converting Analog into Digital Electronically • The simplest form of ADC uses a resistance ladder to switch in the appropriate number of resistors in series to create the desired voltage that is compared to the input (unknown) voltage V-7 V-6 V-low V-1 V-2 V-3 V-4 V-5 V-high SW-8 SW-7 SW-6 SW-5 SW-4 SW-3 SW-2 SW-1 Output
  • 8. Converting Analog into Digital Electronically • The output of the resistance ladder is compared to the analog voltage in a comparator • When there is a match, the digital equivalent (switch configuration) is captured Analog Voltage Resistance Ladder Voltage Comparator Output Higher Equal Lower
  • 9. Converting Analog into Digital Computationally • The analog voltage can now be compared with the digitally generated voltage in the comparator • Through a technique called binary search, the digitally generated voltage is adjusted in steps until it is equal (within tolerances) to the analog voltage • When the two are equal, the digital value of the voltage is the outcome
  • 10. Converting Analog into Digital Computationally • The binary search is a mathematical technique that uses an initial guess, the expected high, and the expected low in a simple computation to refine a new guess • The computation continues until the refined guess matches the actual value (or until the maximum number of calculations is reached) • The following sequence takes you through a binary search computation
  • 11. Binary Search • Initial conditions – Expected high 5-volts – Expected low 0-volts – 5-volts 256-binary – 0-volts 0-binary • Voltage to be converted – 3.42-volts – Equates to 175 binary Analog Digital 5-volts 256 0-volts 0 2.5-volts 128 3.42-volts Unknown (175)
  • 12. Binary Search • Binary search algorithm: • First Guess: Analog Digital 5-volts 256 0-volts 0 128 3.42-volts unknown NewGuessLow LowHigh =+ − 2 1280 2 0256 =+ − Guess is Low
  • 13. Binary Search • New Guess (2): Analog Digital 5-volts 256 0-volts 0 192 3.42-volts unknown 192128 2 128256 =+ − Guess is High
  • 14. Binary Search • New Guess (3): Analog Digital 5-volts 256 0-volts 0 160 3.42-volts unknown 160128 2 128192 =+ − Guess is Low
  • 15. Binary Search • New Guess (4): Analog Digital 5-volts 256 0-volts 0 176 3.42-volts unknown 176160 2 160192 =+ − Guess is High
  • 16. Binary Search • New Guess (5): Analog Digital 5-volts 256 0-volts 0 168 3.42-volts unknown 168160 2 160176 =+ − Guess is Low
  • 17. Binary Search • New Guess (6): Analog Digital 5-volts 256 0-volts 0 172 3.42-volts unknown 172168 2 168176 =+ − Guess is Low (but getting close)
  • 18. Binary Search • New Guess (7): Analog Digital 5-volts 256 0-volts 0 174 3.42-volts unknown 174172 2 172176 =+ − Guess is Low (but getting really, really, close)
  • 19. Binary Search • New Guess (8): Analog Digital 5-volts 256 0-volts 0 3.42-volts 175! 175174 2 174176 =+ − Guess is Right On
  • 20. Binary Search • The speed the binary search is accomplished depends on: – The clock speed of the ADC – The number of bits resolution – Can be shortened by a good guess (but usually is not worth the effort)
  • 21. How Does It Work? Faithful Duplication • Now that we can slice up a waveform and convert it into digital form, let’s take a look at how it is used in DSP • Draw a simple waveform on graph paper – Scale appropriately • “Gather” digital data points to represent the waveform
  • 22. Starting Waveform Used to Create Digital Data
  • 23. How Does It Work? Faithful Duplication • Swap your waveform data with a partner • Using the data, recreate the waveform on a sheet of graph paper
  • 24. Waveform Created from Digital Data
  • 25. How Does It Work? Faithful Duplication • Compare the original with the recreating, note similarities and differences
  • 26. How Does It Work? Faithful Duplication • Once the waveform is in digital form, the real power of DSP can be realized by mathematical manipulation of the data • Using EXCEL spreadsheet software can assist in manipulating the data and making graphs quickly • Let’s first do a little filtering of noise
  • 27. How Does It Work? Faithful Duplication • Using your raw digital data, create a new table of data that averages three data points – Average the point before and the point after with the point in the middle – Enter all data in EXCEL to help with graphing
  • 28. Noise Filtering Using Averaging Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude Ave before/after -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 29. How Does It Work? Faithful Duplication • Let’s take care of some static crashes that cause some interference • Using your raw digital data, create a new table of data that replaces extreme high and low values: – Replace values greater than 100 with 100 – Replace values less than -100 with -100
  • 30. Clipping of Static Crashes Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude eliminate extremes (100/-100) -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 31. How Does It Work? Resolution Trade-offs • Now let’s take a look at how sampling rates affect the faithful duplication of the waveform • Using your raw digital data, create a new table of data and delete every other data point • This is the same as sampling at half the rate
  • 32. Half Sample Rate Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude every 2nd -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 33. How Does It Work? Resolution Trade-offs • Using your raw digital data, create a new table of data and delete every second and third data point • This is the same as sampling at one-third the rate
  • 34. 1/2 Sample Rate Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude every 3rd -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 35. How Does It Work? Resolution Trade-offs • Using your raw digital data, create a new table of data and delete all but every sixth data point • This is the same as sampling at one-sixth the rate
  • 36. 1/6 Sample Rate Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude every 6th -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 37. How Does It Work? Resolution Trade-offs • Using your raw digital data, create a new table of data and delete all but every twelfth data point • This is the same as sampling at one-twelfth the rate
  • 38. 1/12 Sample Rate Raw -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude every 12th -150 -100 -50 0 50 100 150 0 10 20 30 40 Time Amplitude
  • 39. How Does It Work? Resolution Trade-offs • What conclusions can you draw from the changes in sampling rate? • At what point does the waveform get too corrupted by the reduced number of samples? • Is there a point where more samples does not appear to improve the quality of the duplication?
  • 40. How Does It Work? Resolution Trade-offs Bit Resolution High Bit Count Good Duplication Slow Low Bit Count Poor Duplication Fast Sample Rate High Sample Rate Good Duplication Slow Low Sample Rate Poor Duplication Fast