Question: PULSE CODE MODULATION % Pcm_test.m % % M-file for Pulse Code Modulation / Demodulation and % Time Division Multiplexing % % EE 474 Communication Simulation

PULSE CODE MODULATION

% Pcm_test.m % % M-file for Pulse Code Modulation / Demodulation and % Time Division Multiplexing % % EE 474 Communication Simulation Tech & Lab % %%%%%%%%%%%%%%% Preparation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Simulation Parameters fs = 512; % sampling frequency dt = 1/fs; % sampling period t = 0:dt:2; % time axis Bm = 1; % sigmal bandwidth L = length(t); % vector length % PCM Parameters n = 3; % Number of bits M = 2^n; % Number of levels dV = 1; % Vin = ([1:M-1]-M/2)*dV % input signal bins Vout = ([0:M-1]-(M-1)/2)*dV % output (Quantized) signal bins Fs = 16; % PCM Sampling frequency (must satisfy Nyquist criteria) % Fs > 2*Bm ts = 0:1/Fs:2; % sampled time vector T = 1:fs/Fs:L; % sample points for PCM Ls = length(ts);% sampled vector length

mPCM = []; % empty set %%%%%%%%%% End of Preparation %%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%% MAIN PROGRAM %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % m = 4*cos(2*pi*Bm*t+pi/5); % Analog signal % Signal Compression, if needed, should be performed here r = fs/Fs; % We will need this ratio to evaluate % the PAM signal % Sampling: ms = m(T); % Sampled signal % Quantizing: for i = 1:Ls; % vin = ms(i); % We have 2^3 = 8 if vin

%%%%%%%%%%%%%%% Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% close all % figure(1) % subplot(3,1,1) % plot(t,m) %

hold % stem(ts,ms,k*) % plot(t,mPAM,r) % set(gca,YGrid,on) % xlabel(time [sec.]) % ylabel(Amplitude [Volt]) % legend(m(t),Sampled,Quantized (PAM),4) % % subplot(3,1,2) % plot(t,Qerr) % grid on % xlabel(time [sec.]) % ylabel(Amplitude [Volt])% legend(Quantization Error)% subplot(3,1,3) % stem(mPCM) % xlabel(binary digits) % ylabel(PCM) %

 PULSE CODE MODULATION % Pcm_test.m % % M-file for Pulse Code

PLEASE HELP ABOUT THE EXERCISES PART! THANK YOU

1. In the script given, no compression is applied. Apply a -law compression with =10, and perform PCM. Compare the results with the original figures. Comment on the quantization error as well. 2. Using a Low Pass Filter, try to obtain a better PAM signal and analyze filter output by plotting the message signal, filter output and error. Indicate filter characteristics such as, filter type, order, cut off frequency, and sketch its amplitude and phase responses

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!