The document outlines Experiment No-14, which involves simulating Delta Modulation using MATLAB. It includes the definition of a message signal, the initialization of Delta Modulation parameters, and a loop for generating the output DM signal. Additionally, it calculates the Mean Squared Error (MSE) between the original and approximated signals.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
12 views2 pages
Practical 14
The document outlines Experiment No-14, which involves simulating Delta Modulation using MATLAB. It includes the definition of a message signal, the initialization of Delta Modulation parameters, and a loop for generating the output DM signal. Additionally, it calculates the Mean Squared Error (MSE) between the original and approximated signals.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Practical 14
% Experiment No-14 : Simulation of Delta Modulation using MATLAB
clc; % Time Duration and Message Signal t = 0:2*pi/100:2*pi; % Time vector x = 5*sin(2*pi*t/5); % Define message signal with peak voltage 5V and frequency 5Hz plot(x); hold on; % Initialize Delta Modulation parameters y = [0]; % Output DM signal (stream of 1 or 0) xr = 0; % Output of Integrator (staircase approximation); initial value = 0 del = 0.4; % Stepsize for delta modulation % Delta Modulation loop for i = 1:length(x)-1 if xr(i) <= x(i) % If current sample greater than previous value d = 1; % Output of DM = 1 xr(i+1) = xr(i) + del; % Staircase approximation else d = 0; % If current sample less than previous value xr(i+1) = xr(i) - del; % Staircase approximation end y = [y d]; % Store the output DM value end % Plot the staircase approximated signal stairs(xr); hold off; % Calculate Mean Squared Error (MSE) MSE = sum((x - xr).^2) / length(x); disp(['MSE: ', num2str(MSE)]); % Output of DM signal disp('Output of DM:'); disp(y);