06.06.2022 Views

B. P. Lathi, Zhi Ding - Modern Digital and Analog Communication Systems-Oxford University Press (2009)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

318 SAMPLING AND ANALOG-TO-DIGITAL CONVERSION

Fi g

ure 6.43

Comparison

between the

original signal

and the PCM

signals after

low-pass filtering

to recover the

original

message.

0

Signal g(t) and filtered 16-PCM signal

-- Original

· - ' - Recovered

- 1

- 2 '----'------'----'-------'----_.__---'----'--""'-'--'------'----'

0 0.1 0.2 0.3 0.4 0.5 0.6 0.8 0.9

Time, second

Signal g(t) and filtered 4-PCM signal

-- Original

· - · - Recovered

0

- 1

-2 '----'------'----'-------'----_.__---'----'--"""",c._-'------'----'

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Time, second

s_DMout (l)=-Delta/2 ;

for k=2 : Num_it

xvar=s_DMout (k- 1) ;

s_DMout (k) =xvar+Delta*s ign ( s_down (k-1)-xvar) ;

end

s_DMout=kron ( s_DMout ,p_zoh) ;

else

warning ('Error ! ts/td is not an integer! ');

s_DMout= [l ;

end

end

To generate DM signals with different step sizes, we apply the same signal g(t) as used

in the PCM example. The MATLAB program ExDM . m applies three step sizes: L'. 1 = 0.2,

L'.2 = 2L'. 1 , and b.3 = 4L'. 1 .

% (ExDM.m)

% Example of sampling, quantization, and zero-order hold

clear;clf;

td=0 .002 ; %original sampling rate 500 Hz

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!