Draw the electroni

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

1 What is ADC ? Draw the electronic circuit.

2- Explain the effect of sampling time and the number of word length n on quantization error.

3- Calculate quantization 

Software Used: MATLAB
1-Enter the program in this page. This is a simple program to demonstrate the effect of
quantization on the accuracy of digital signals.
2-Adjust the number of bits, n, and observe the effect on the quantization error.
3-Draw the Sampled signal versus Quantized signal for sampling frequency fs=20 Hz with
(n=3, 8 &10) and repeated with fs=10 Hz.
% This program quantizes a signal to n bits.
% It demonstrates, in simple terms, the operation of a typical
ADC.
% This code assumes the signal is between -1 and +1.
clc
clear
close all
n=3;
Tsample
ts =
0/0/0/0/
= 0.05; %%%% 2)0.1,,,Tsample (11fs)
0:Tsample:2;
X = sin (2*pi*1*ts) ; % sampled digital signal
%x-sawtooth (2*pi*1*ts); %...you might wish to try a sawtooth
waveform
xn1 = x + 1; %Signal is shifted, now 0 to 2
xn2
=
of bits
xn3 = floor(xn2); %Signal is quantized, floor rounds number
down to integer
xn4=xn3/(2^(n-1)); %Signal is scaled back down, now 0 to 2
(quantized)
xn5=xn4-1; %Shift signal down (rounding) % Quantized signal
figure (1)
hold on;
stem(x, 'b'); %%%%% Sampled signal
hold on;
stem(xn5, 'r'); %%%%% quantized signal
legend('exact', 'quantized')
title(sprintf('Sampled signal versus Quantized signal'));
hold off
xerror = X xn5; % % quantization error.
figure (2)
stem(xerror,'g');
title(sprintf('Quantization Error'));
ylim ( [0 1])
-0.2
Sampled signal versus Quantized signal
8
8
M
-0.4
% Number of ADC bits; n=3, 8, 10
-0.6
xn1*2^(n-1); %Signal is scaled to ADC range, n = number
-0.8
-1
0
5
10
exact
quantized
Fig.4: Sampled signal versus Quantized signal
for n=3 & Ts=0.05
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
15
Quantization Error
20
25
30
35
40
Fig.5: Quantization Error
for n=3 & Ts=0.05
Transcribed Image Text:Software Used: MATLAB 1-Enter the program in this page. This is a simple program to demonstrate the effect of quantization on the accuracy of digital signals. 2-Adjust the number of bits, n, and observe the effect on the quantization error. 3-Draw the Sampled signal versus Quantized signal for sampling frequency fs=20 Hz with (n=3, 8 &10) and repeated with fs=10 Hz. % This program quantizes a signal to n bits. % It demonstrates, in simple terms, the operation of a typical ADC. % This code assumes the signal is between -1 and +1. clc clear close all n=3; Tsample ts = 0/0/0/0/ = 0.05; %%%% 2)0.1,,,Tsample (11fs) 0:Tsample:2; X = sin (2*pi*1*ts) ; % sampled digital signal %x-sawtooth (2*pi*1*ts); %...you might wish to try a sawtooth waveform xn1 = x + 1; %Signal is shifted, now 0 to 2 xn2 = of bits xn3 = floor(xn2); %Signal is quantized, floor rounds number down to integer xn4=xn3/(2^(n-1)); %Signal is scaled back down, now 0 to 2 (quantized) xn5=xn4-1; %Shift signal down (rounding) % Quantized signal figure (1) hold on; stem(x, 'b'); %%%%% Sampled signal hold on; stem(xn5, 'r'); %%%%% quantized signal legend('exact', 'quantized') title(sprintf('Sampled signal versus Quantized signal')); hold off xerror = X xn5; % % quantization error. figure (2) stem(xerror,'g'); title(sprintf('Quantization Error')); ylim ( [0 1]) -0.2 Sampled signal versus Quantized signal 8 8 M -0.4 % Number of ADC bits; n=3, 8, 10 -0.6 xn1*2^(n-1); %Signal is scaled to ADC range, n = number -0.8 -1 0 5 10 exact quantized Fig.4: Sampled signal versus Quantized signal for n=3 & Ts=0.05 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 15 Quantization Error 20 25 30 35 40 Fig.5: Quantization Error for n=3 & Ts=0.05
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY