Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Theory: Pulse code modulation (PCM) converts an analog signal to digital format by three separate processes: sampling, quantizing, and coding. The analog signal is first

Theory: Pulse code modulation (PCM) converts an analog signal to digital format by three separate processes: sampling, quantizing, and coding. The analog signal is first sampled to obtain an instantaneous value of signal amplitude at regularly spaced intervals; the sample frequency is determined by the Nyquist sampling theorem. Each sampled amplitude is then approximated by the nearest level selected from a discrete set of quantization levels. Procedure:

1. Write the coding to encode an analog message as display in Figure 1. Run the coding, then record and observe the output.

2. Write the coding to decode the message as display in Figure 2. Run the coding, then record and observe the output.

3. Repeat step 1-2 for lower and higher sampling value by changing the value of frequency sampling, fs. Compare the output for encode and decode part with the result in step 1 and 2.

4. Repeat step 1-2 for lower and higher quantization steps by changing the value of quantization level. Compare the output for encode and decode part with the result in step 1 and 2.

image text in transcribed

1

image text in transcribed

F = 2; ES = 20; Tg = 1/3; ESS = 1.e4; Tas - 1/fss; It - 0:Ts3:2-Tss; d = Ts/40:19:2+T8/40; - pulstran(t, d, 'tectpuls',1/(fs*40)); msin (2 pi*f*t)+1.1; ms - m.p; cm - quant (ms, 2/16); em - 8 (cm): b = 1: for i=1:length (em) if ((((1>1) 66 (em (1) --em (1-1))) || (1==1)) (em (1) -=0)) x (3) - m (1) -1; 1+1; end Jend z = dec2bin (X, 5); z = z': zz(:): 2 - str2num(z) : s = 2 (')-1; Tb - 2/length(s); Fb - 0.5/Tb; BL - Tb/Tas; y = ones (BL, 1); it - 5*y*s; bit - bit(); bit - bit'; Polar Nez bit stream Figure (1): subplot (2,1,1) plot(t,m,'b',c,m,''); Legend ('Analog Mag', 'Sampled Mag') grid: label('t -->'); ylabel('Amplitude): axis ([0 2 0 2.25]); subplot (2,1,2) plot(t,ms, 'k',,m,'I'); legend (Sampled Msg', 'Quantized Msg') grid; xlabel('t -->'); ylabel ('Amplitude); axis ([0 2 0 2.25]); b = bit(cel (Tb/ (TS)) : (Tb/s): length (bit)); b = (+5)/10; 1 = length(b): for 1 - 1:1/5 4 - rb (51)-4:5*1): num2 str() x1 (1) bin.dec 19): e (1) x1(A)+1; end ee/ yi - ones (1, ceal(Ta/40)/T5)): y2 - zeroak, (18/193)-length (y2)); y3 = [yi y2); y3 = y3': al = y3e: Sampled simal from Encoded Signal mal = ml() Filtering Sampled Signal In, w] = butcoxd(1/783, (+1)/83,.6, 4); [a,b] = butter in, w, 'low'); m = filter (a,b,mal): Im = rm50; Recieved Orignal Signal figure (2): subplot(2,1,1) plot(t, em, 'b') xlabel('t -->'); vlabel ("Amplitude) title('Leveled Me): grid; axis ([0 2-0.5 16.5]): subplot (2,1,2) plot(t,bit,'*') xlabel('t- vlabell'Anpitude"); title('POLAR NRZ ENCODED' ); grid; axis ([0 2 -5.25 5.25]); figure (3): subplot (2,1,1) plot(t,ml, 'b'); title('Recovered sampled Mag) grid; xlabel('t-->') ylabel('mplitude'); axis ([0 2 0 2.251); subplot (2,1,2) plot(t,m,'b'): title('Recovered inolog Mac') grid; xlabel('t -->'); ylabel(Amplitude'); axis ( [0 2 0 2.251); Figure 2 Decode message

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

Students also viewed these Databases questions

Question

Identify and control your anxieties

Answered: 1 week ago

Question

Understanding and Addressing Anxiety

Answered: 1 week ago