DATE: 27-03-2017
PROCESS
To convert analogue to digital signal the following are the process:
1. Sampling
2. Quantization
3. Encoding
SAMPLING:
In this process the analogue signal is sampled over a period of time. To sample the analogue,
signal the continuous signal should be greater or equal to 2fmax i.e.; fs 2fmax.
QUANTIZATION:
It takes the sample analogue values and converts it to digital values. It is limited to 2-bits. There
are certain levels of Quantization. Quantization error increases with the decreasing the levels.
To calculate the quantization levels we use
2 where n = bits
hold on;
subplot(2,1,1);
plot(t,xCont,'b','linewidth',2);
hold on;
plot(tSamp,xSamp,'ko','linewidth',2);
subplot(2,1,2);
%% encoding of signal
y0 = dec2bin(x0,n); %Convert Decimal no. to Binary no.
y1 = x0*q;