1-Why digital control? 2- What is ADC ? Draw the electronic circuit. 3- Explain the effect of sampling time and the number of word length n on quantization error. 4- Calculate quantization error

EBK ELECTRICAL WIRING RESIDENTIAL
19th Edition
ISBN:9781337516549
Author:Simmons
Publisher:Simmons
Chapter25: Television, Telephone, And Low-voltage Signal Systems
Section25.3: Signal System
Problem 1R
icon
Related questions
Question

form the pic solve?

 

1-Why digital control?

2- What is ADC ? Draw the electronic circuit.

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

4- Calculate quantization error

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 6 steps with 8 images

Blurred answer
Knowledge Booster
Arithmetic Operation and Code Conversion in Number System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK ELECTRICAL WIRING RESIDENTIAL
EBK ELECTRICAL WIRING RESIDENTIAL
Electrical Engineering
ISBN:
9781337516549
Author:
Simmons
Publisher:
CENGAGE LEARNING - CONSIGNMENT