0% found this document useful (0 votes)
3 views39 pages

Pcs Lab Manual

The document is a lab manual for the Principles of Communication System Lab at AMC Engineering College, detailing various experiments conducted in the course. It covers topics such as basic signal generation, amplitude and frequency modulation, sampling and reconstruction, time division multiplexing, and pulse code modulation. Each experiment includes objectives, theoretical background, software used, programming details, and results.

Uploaded by

navyacr678
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
3 views39 pages

Pcs Lab Manual

The document is a lab manual for the Principles of Communication System Lab at AMC Engineering College, detailing various experiments conducted in the course. It covers topics such as basic signal generation, amplitude and frequency modulation, sampling and reconstruction, time division multiplexing, and pulse code modulation. Each experiment includes objectives, theoretical background, software used, programming details, and results.

Uploaded by

navyacr678
Copyright
© © All Rights Reserved
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/ 39

AMC ENGINEERING COLLEGE

DEPARTMENT OF ELECTRONICS AND


COMMUNICATION ENGINEERING

LAB MANUAL

Course Name : Principles of Communication System Lab

Code : BEC402

Semester : 4

Year : 2024-25

Scheme : 22

Faculty : Dr.GV.Aswini, Assistant Professor

Prof.Shwethaa.A.R, Assistant Professor


Sl. No Components

01 Basic Signals and Signal Graphing: a) unit Step, b) Rectangular, c) standard triangle

d) sinusoidal and e) Exponential signal.

02 Illustration of signal representation in time and frequency domains for a rectangular


pulse

03 Amplitude Modulation and demodulation: Generation and display the relevant


signals and its spectrums.

04 Frequency Modulation and demodulation: Generation and display the relevant


signals and its spectrums.

05 Sampling and reconstruction of low pass signals. Display the signals and its spectrum.

06 Time Division Multiplexing and demultiplexing.

07 PCM Illustration: Sampling, Quantization and Encoding

08 Generate a)NRZ, RZ and Raised cosine pulse, b) Generate and plot eye diagram

09 Generate the Probability density function of Gaussian distribution function.

10 Display the signal and its spectrum of an audio signal.


Experiment 1

Generation of basic signals and signal graphing

Aim:

To study the function of basic signals and signal graphing of a) unit Step,

b) Rectangular, c) standard triangle d) sinusoidal and e) Exponential signal.

Software Used:

Octave version 8.3

Theory:

a) Unit Step Signal (u(t)) – A signal that is zero for t<0t < 0t<0 and one for t≥0t \geq
0t≥0, commonly used to represent system activation.

b) Rectangular Signal – A pulse-like signal that remains constant for a specific duration
and zero otherwise, often used in switching operations.

c) Standard Triangle Signal – A piecewise linear signal that increases and then
decreases symmetrically, resembling a triangular shape.

d) Sinusoidal Signal – A periodic signal in the form of sine or cosine, fundamental to


AC waveforms and harmonic analysis.

e) Exponential Signal – A signal that grows or decays exponentially over time,


often appearing in system responses and natural processes.

Program:

unit step function


subplot(3,4,1);

t=-10:10;

y=[zeros(1,10),ones(1,11)];
stem(t,y);

title('unit step function');


xlabel('t(sec)');

ylabel('u(t)');
ramp function

subplot(3,4,3);
t=-10:0.5:10;

y=t;
stem(t,y);
title('ramp function');
xlabel('t(sec)');

ylabel('r(t)');

impulse function
subplot(3,4,2);
t=-10:10;

y=[zeros(1,10),ones(1,1),zeros(1,10)];
stem(t,y);

title('impulse function');
xlabel('t(sec)');
ylabel('i(t)');

rising exponential function

subplot(3,4,7);
t=linspace(-10,10);
y=exp(0.1*t);

plot(t,y);

title('rising exponential function');


xlabel('t(sec)');

ylabel('e(t)');

rectangular function
subplot(3,4,8);
t=-10:10;

y=[zeros(1,9),ones(1,3),zeros(1,9)];
stem(t,y);

title('rectangular function');
xlabel('t(sec)');

ylabel('r(t)');

cosine function
subplot(3,4,5);
t=linspace(-
10,10);
y=1+cos(t);

plot(t,y);

title('cosine function');
xlabel('t(sec)');

ylabel('c(t0');

sinc function

subplot(3,4,9);

t=linspace(-10,10);

y=sinc(2*pi*0.1*t); plot(t,y);
title('sinc function');
xlabel('t(sec)');

ylabel('sinc(t)');

falling exponential function

subplot(3,4,6);

t=linspace(0,10);
y=exp(-t);

plot(t,y);

title('falling exponential
function'); xlabel('t(sec)');
ylabel('e(t)');

sine function

subplot(3,4,4);

t=linspace(-10,10); y=sin(t);

plot(t,y);

title('sine function');
xlabel('t(sec)');

ylabel('s(t)');

triangular function

subplot(3,4,10);
t=-10:10;

output=((1-2*abs(t))/20);
plot(t,output);

Result :

Thus the study and analysis of the functions and graphing of basic signals, including a) Unit Step, b)
Rectangular, c) Standard Triangle, d) Sinusoidal, and e) Exponential signals, have been carried out
EXPERIMENT 2

ILLUSTRATION OF SIGNAL REPRESENTATION IN TIME AND FREQUENCY DOMAINS


FOR A RECTANGULAR PULSE

Aim:

To illustrate rectangular pulse signal in time and frequency domain.

Software Used:

Octave version 8.3

Theory:

A rectangular pulse is a fundamental signal widely used in signal processing and communication
systems. It has a well-defined width and amplitude in the time domain, and its frequency domain.
In Time-Domain Representation: A rectangular pulse is defined with a finite width and plotted.In
Frequency-Domain Representation: The Fast Fourier Transform (FFT) computes the signal’s
frequency spectrum.

Program:

t=-10:10;

y=[zeros(1,9),ones(1,3),zeros(1,9)]; subplot(2,1,1);

stem(t,y);

xlabel('time');

ylabel('amplitude');

title('rectangular pulse in time domain'); x=fft(y);

subplot(2,1,2);

plot(t,fftshift(abs(x))); xlabel('frequency');

ylabel('magnitude');

title('rectangular pulse in frequency domain');


Output:

Result:

Thus, rectangular pulse signal is illustrated in time and frequency domain.


Experiment 3
Amplitude Modulation and Demodulation
Aim:
To generate and display the relevant amplitude modulation and demodulation signal and its
spectrum
Software Used:
Octave

Theory:
Amplitude Modulation (AM) is a technique where the amplitude of a high-frequency carrier
signal is varied in proportion to the message signal (information signal). Amplitude
Demodulation is the process of extracting the original message signal from the modulated
carrier.
Program:
clc;
clear;
close all;
% Parameters
fm = 10;
fc = 100;
fs = 1000;
m = 0.5;
T = 1;
t = 0:1/fs:T;
% Signals
message = cos(2 * pi * fm * t);
carrier = cos(2 * pi * fc * t);
am_signal = (1 + m * message) .* carrier;
% Plot Signals
subplot(3,1,1); plot(t, message); title('Message Signal'); grid on;
subplot(3,1,2); plot(t, carrier); title('Carrier Signal'); grid on;
subplot(3,1,3); plot(t, am_signal); title('AM Modulated Signal'); grid on;
% Demodulation using Envelope Detection
demod_signal = abs(hilbert(am_signal));
figure; plot(t, demod_signal, t, message, '--');
title('Demodulated Signal'); grid on;
Output:
Result:
Thus amplitude modulation and demodulation of a signal and its spectrum is been generated
and displayed.
Experiment -4
Frequency Modulation and Demodulation
Aim:
To generate and display the relevant frequency modulation and demodulation signal and its
spectrum
Software Used:
Octave
Theory:
Frequency Modulation (FM) is a technique where the frequency of a carrier signal is
varied in proportion to the instantaneous amplitude of the message signal while keeping the
amplitude constant. FM demodulation is the process of extracting the original message signal
from the modulated waveform. Frequency modulation is achieved by integrating the message
signal and applying it to the carrier. The demodulation is achieved using the Hilbert transform
to extract the instantaneous phase, followed by differentiation.

Program:
clc;
clear;
close all;
% Parameters
fs = 1000; % Sampling frequency
T = 1; % Duration in seconds
t = 0:1/fs:T; % Time vector
Am = 1; % Amplitude of message signal
fm = 10; % Frequency of message signal
Ac = 1; % Amplitude of carrier signal
fc = 100; % Frequency of carrier signal
kf = 1000; % Frequency sensitivity factor
% Message signal
m = Am * sin(2 * pi * fm * t);

% Carrier signal
c = Ac * sin(2 * pi * fc * t);
% Frequency Modulation
s = Ac * cos(2 * pi * fc * t + kf * cumsum(m) / fs);
% Frequency Demodulation using Phase Detector and Differentiation
inst_phase = unwrap(angle(hilbert(s))); % Extract instantaneous phase
demod_raw = diff(inst_phase) * fs / (2 * pi * kf); % Differentiate phase to get frequency
% Low-pass filter for smoothing
[b, a] = butter(5, (fm * 2) / fs, 'low');
demod = filtfilt(b, a, [demod_raw demod_raw(end)]); % Match original signal length
% Plot signals
figure;
subplot(4,1,1);
plot(t, m);
title('Message Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(4,1,2);
plot(t, c);
title('Carrier Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(4,1,3);
plot(t, s);
title('FM Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
subplot(4,1,4);
plot(t, demod);
title('Demodulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

Output:

Result:
Thus, frequency modulation and demodulation of a signal and its spectrum is been generated
and displayed.
Experiment 5
Sampling and reconstruction of low pass signals
Aim:
To perform sampling and reconstruction of low pass signals and also to display the signals
and its spectrum.
Software Used:
Octave version 8.3
Theory:
Sampling
Sampling is the process of converting a continuous-time signal into a discrete-time signal by
taking periodic samples at a fixed interval. According to the Nyquist sampling theorem, a
signal can be perfectly reconstructed if it is sampled at a rate at least twice its highest
frequency component (Nyquist rate)
fs≥2fm
If the sampling rate is lower than this, aliasing occurs, causing distortion in the reconstructed
signal.
Reconstruction
Reconstruction is the process of converting the discrete-time samples back into a continuous-
time signal. This is typically achieved using an ideal low-pass filter that removes higher
frequency components introduced during sampling and retains only the original frequency
components of the signal. Proper sampling and reconstruction ensure accurate signal recovery
without distortion.

Program:
% Sampling and Reconstruction of a Low-Pass Signal
% Original Signal
fs = 1000; % Sampling frequency
t = 0:1/fs:0.05; % Time vector
f_signal = 50; % Signal frequency
x = sin(2*pi*f_signal*t); % Original signal
subplot(3,1,1); plot(t, x, 'b'); title('Original Signal'); grid on;
% Sampling of Signal
fs_sampled = 200; % Lower sampling rate
t_sampled = 0:1/fs_sampled:0.05;
x_sampled = sin(2*pi*f_signal*t_sampled); % Sampled Signal
subplot(3,1,2); stem(t_sampled, x_sampled, 'r'); title('Sampled Signal'); grid on;
% Reconstruction of Signal
x_reconstructed = interp1(t_sampled, x_sampled, t, 'spline'); % Reconstructed Signal
subplot(3,1,3); plot(t, x_reconstructed, 'g'); title('Reconstructed Signal'); grid on;
figure;

Output:

Result:
Thus, the sampling and reconstruction of low-pass signals were carried out, and their signal
and spectrum were displayed.
Experiment -6
Time Division Multiplexing and Demultiplexing
Aim:
To perform time division multiplexing and demultiplexing for two different signals
Software Used:
Octave version 8.3
Theory:
Time Division Multiplexing (TDM) is a technique used in telecommunications and data
transmission where multiple signals share the same communication channel by dividing time
into separate slots. Each signal gets a dedicated time slot, ensuring that multiple signals can
be transmitted over the same medium without interference.
Time Division Multiplexing (TDM):
TDM works by assigning each signal a specific time slot in which it can transmit data. The
process happens so fast that it appears as if all signals are being transmitted simultaneously.
Time Division Demultiplexing (TDM):
Demultiplexing is the reverse process of multiplexing, where a demultiplexer (DEMUX)
extracts individual signals from the combined transmission based on their designated time
slots.
Program:
clc;
clear;
close all;
x = 0:0.5:4*pi;
sig1 = 8 * sin(x);
l = length(sig1);
sig2 = 8 * triang(l)';
% Transposed to match dimensions
% Plot Original and Sampled Signals
figure;
subplot(2,2,1);
plot(sig1);
grid on;
title('Sinusoidal Signal'); xlabel('Samples'); ylabel('Amplitude');
subplot(2,2,2); plot(sig2); grid on; title('Triangular Signal'); xlabel('Samples');
ylabel('Amplitude');
subplot(2,2,3); stem(sig1); grid on; title('Sampled Sinusoidal Signal'); xlabel('Samples');
ylabel('Amplitude');
subplot(2,2,4); stem(sig2); grid on; title('Sampled Triangular Signal'); xlabel('Samples');
ylabel('Amplitude');
% Time Division Multiplexing (TDM)
n = min(length(sig1), length(sig2)); % Ensure both signals have the same sample count
sig = [sig1(1:n); sig2(1:n)];
tdmsig = reshape(sig, 1, []);
figure;
stem(tdmsig); grid on; title('TDM Signal'); xlabel('Samples'); ylabel('Amplitude');
% Demultiplexing
demux = reshape(tdmsig, 2, []);
sig3 = demux(1, :);
sig4 = demux(2, :);
figure;
subplot(2,1,1); plot(sig3); grid on; title('Recovered Sinusoidal Signal'); xlabel('Samples');
ylabel('Amplitude');
subplot(2,1,2); plot(sig4); grid on; title('Recovered Triangular Signal'); xlabel('Samples');
ylabel('Amplitude');
Output:
Result:
Thus, time division multiplexing and demultiplexing was performed using two different
signals.
Experiment -7
PCM Illustration: Sampling, Quantization and Encoding
Aim:
To perform pulse code modulation using sampling, quantization and encoding.
Software Used:
Octave version 8.3
Theory:
PCM (Pulse Code Modulation) is a digital signal processing technique used to convert an
analog signal into a digital format. It involves three main steps:
1. Sampling – The continuous analog signal is sampled at discrete time intervals,
typically at a rate determined by the Nyquist theorem (at least twice the highest
frequency of the signal).
2. Quantization – The sampled values are approximated to the nearest level within a
finite set of discrete levels. This introduces quantization error.
3. Encoding – The quantized values are then converted into binary code for digital
representation and transmission.

Program:
% PCM Illustration: Sampling, Quantization, and Encoding
clc;
clear;
close all;
% Generate a Continuous Signal
fs = 1000; t = 0:1/fs:1; f = 5; x = sin(2*pi*f*t);
% Sampling
fs_sampled = 20;
ts = 0:1/fs_sampled:1;
x_sampled = sin(2*pi*f*ts);

% Quantization
num_levels = 8;
q_step = 2 / num_levels;
x_quantized = round(x_sampled / q_step) * q_step;
% Encoding
encoded_values = dec2bin((x_quantized - min(x_quantized)) / q_step, log2(num_levels));
% Plot results
figure;
subplot(3,1,1); plot(t, x, 'b', ts, x_sampled, 'ro'); grid on; title('Sampling');
subplot(3,1,2); stem(ts, x_quantized, 'g'); grid on; title('Quantization');
subplot(3,1,3); stem(ts, x_quantized, 'g');
text(ts, x_quantized, encoded_values, 'VerticalAlignment', 'bottom');
grid on; title('Encoding');
Output:

Result:
Thus, pulse code modulation using sampling, quantization and encoding was performed.
Experiment 8
Generate a) NRZ, RZ and Raised cosine pulse, b) Generate and plot eye diagram
Aim:
a) To generate Non-Return-to-Zero (NRZ), Return-to-Zero (RZ), and Raised Cosine pulse
signals.
b) To generate and plot the Eye Diagram for different line coding schemes or filters.
Software Used:
Octave version 8.3
Theory:
Pulse Shaping:
Pulse shaping is a technique used in digital communication to control the spectral
characteristics of the transmitted signal, reducing intersymbol interference (ISI) and
improving bandwidth efficiency.
 NRZ (Non-Return-to-Zero):
In NRZ signaling, the signal level remains constant throughout the bit interval. It does
not return to zero between bits, making it bandwidth efficient but more susceptible to
synchronization issues.
 RZ (Return-to-Zero):
In RZ signaling, the signal returns to zero in the middle of each bit period. This provides
better synchronization but occupies more bandwidth compared to NRZ.
 Raised Cosine Pulse:
The raised cosine filter is widely used for pulse shaping in digital communication. It
minimizes ISI while effectively utilizing bandwidth. The roll-off factor (α) controls the
excess bandwidth.
Eye Diagram:
An eye diagram is a graphical representation of a digital signal from an oscilloscope. It
is used to evaluate the quality of the signal in the presence of noise, timing jitter, and ISI. The
"eye" opening provides insight into the optimal sampling time and the signal integrity.

Program:
MATLAB Program to Generate and Plot an NRZ Signal
% Define the binary data sequence
data = [1 0 1 1 0 0 1 0 1]; % Example binary sequence
% Parameters for the signal
data = [1 0 1 1 0 0 1 0 1];
bit_rate = 1; % Bit rate in bits per second
bit_duration = 1 / bit_rate; % Duration of each bi
% Define time vector for one bit duration
samples_per_bit = 100; % Number of samples per bit (adjustable)
t_bit = linspace(0, bit_duration, samples_per_bit);
% Initialize NRZ signal
nrz_signal = [];
% Generate NRZ signal
for bit = data
if bit == 1
nrz_signal = [nrz_signal ones(1, samples_per_bit)]; % High level for '1'
else
nrz_signal = [nrz_signal zeros(1, samples_per_bit)]; % Low level for '0'
end
end
% Time vector for the entire signal
t = linspace(0, bit_duration * length(data), length(nrz_signal));
plot(t, nrz_signal, 'LineWidth', 2);
ylim([-0.5 1.5]);
xlabel('Time (s)');
ylabel('Amplitude');
title('NRZ Signal');
grid on;
Output:

MATLAB Program to Generate and Plot an RZ Signal


% Input data and parameters
data = [1 0 1 1 0 0 1 0 1];
bit_rate = 1;
bit_duration = 1 / bit_rate;
samples_per_bit = 100;
t_bit = linspace(0, bit_duration, samples_per_bit);
% Initialize RZ signal
rz_signal = [];
% Generate RZ signal (High for half duration for '1', zero otherwise)
for bit = data
if bit == 1
high_half = ones(1, samples_per_bit / 2);
low_half = zeros(1, samples_per_bit / 2);
rz_signal = [rz_signal high_half low_half];
else
rz_signal = [rz_signal zeros(1, samples_per_bit)];
end
end
% Time vector for the full signal
t_rz = linspace(0, bit_duration * length(data), length(rz_signal));
% Plot RZ waveform
figure;
plot(t_rz, rz_signal, 'b', 'LineWidth', 1.5);
xlabel('Time (s)');
ylabel('Amplitude');
title('Return-to-Zero (RZ) Signal');
grid on;
ylim([-0.2 1.2]);

Output:
Generate and plot eye diagrams
% Generate random binary data
data_length = 1000;
data = randi([0, 1], 1, data_length);

% Parameters
samples_per_symbol = 10;
bit_rate = 1;
bit_duration = 1 / bit_rate;

% Generate NRZ waveform


nrz_signal = [];
for bit = data
if bit == 1
nrz_signal = [nrz_signal ones(1, samples_per_symbol)];
else
nrz_signal = [nrz_signal zeros(1, samples_per_symbol)];
end
end

% Define eye span (e.g., 2 bits per segment)


eye_span = 2;
samples_per_eye = eye_span * samples_per_symbol;

% Number of overlapping segments to extract


num_eyes = floor(length(nrz_signal) / samples_per_symbol) - (eye_span - 1);

% Create matrix to hold eye segments


eye_data = zeros(samples_per_eye, num_eyes);
% Extract overlapping segments
for i = 1:num_eyes
start_idx = (i - 1) * samples_per_symbol + 1;
end_idx = start_idx + samples_per_eye - 1;
if end_idx <= length(nrz_signal)
eye_data(:, i) = nrz_signal(start_idx:end_idx);
end
end

% Plot the eye diagram


figure;
plot(eye_data, 'b');
title('Eye Diagram (NRZ)');
xlabel('Sample Index');
ylabel('Amplitude');
grid on;
Output:
Result:
NRZ and RZ signals were successfully generated and plotted.
NRZ maintained constant levels, while RZ returned to zero mid-bit.
The eye diagram showed a clear eye opening, indicating good signal quality.
Experiment -9
Generate the Probability Density Function of Gaussian Distribution Function
Aim:
To generate the probability density function of gaussian distribution function.
Software Used:
Octave version 8.3
Theory:
The Probability Density Function (PDF) of a Gaussian distribution describes how the values
of a continuous random variable are distributed. It shows the likelihood of a random variable
taking a particular value. The Gaussian PDF is a bell-shaped, symmetric curve centered at the
mean, with its spread determined by the standard deviation. The total area under the curve is 1,
representing total probability.
Mathematically,

Program:
clear all;
close all;
clc;
x = 0:0.01:2; % Range of x values
n = 1; % Mean
sd = 2; % Standard deviation
% Compute Gaussian PDF
g = (1 / (sd * sqrt(2 * pi))) * exp(-(x - n).^2 / (2 * sd^2));
% Plot
plot(x, g, 'b', 'LineWidth', 2);
xlabel('x');
ylabel('Amplitude');
title('Gaussian distribution function');
grid on;

Output:

Result:
Thus, the probability density function of gaussian distribution function is generated.
Experiment -10
Display the signal and its spectrum of an audio signal
Aim:
To generate and display the signal and its spectrum of an audio signal.
Software Used:
Octave version 8.3
Theory:
An audio signal is a representation of sound, typically in the form of a time-varying voltage or
current that corresponds to the air pressure variations of the sound wave. Audio signals are
generally analog in nature, but they can also be represented digitally for processing and
analysis.
In signal processing, analyzing both the time-domain and the frequency-domain characteristics
of an audio signal is essential. The time-domain representation shows how the signal amplitude
varies with time, while the frequency-domain representation (or spectrum) reveals the different
frequency components present in the signal.
The frequency analysis is typically done using the Fourier Transform. For digital signals, the
Fast Fourier Transform (FFT) algorithm is used to efficiently compute the Discrete Fourier
Transform (DFT). The FFT decomposes a signal into its constituent sinusoidal components,
allowing us to observe which frequencies are present and their relative amplitudes.
Key concepts involved:
 Sampling: The process of converting an analog signal into a digital signal by taking
discrete samples.
 Nyquist Theorem: To avoid aliasing, the sampling rate must be at least twice the
maximum frequency present in the signal.
 FFT: A mathematical algorithm that transforms a time-domain signal into its frequency-
domain representation.
By displaying the time-domain waveform and the frequency spectrum of an audio signal, one
can analyze its content, such as pitch, tone quality, and noise characteristics. This is particularly
useful in audio engineering, music processing, and speech analysis applications.
Program:

% Load audio file

audioFile = 'your_audio_file.wav'; % Change this to your audio file path [y, Fs] =
audioread(audioFile);

% Plot the time-domain signal t = (0:length(y)-1) / Fs; figure;

subplot(2, 1, 1);

plot(t, y);
title('Time-Domain Signal'); xlabel('Time (s)'); ylabel('Amplitude');

% Compute the spectrum N = length(y);

Y = fft(y);

f = (0:N-1) * Fs / N;

% Plot the spectrum subplot(2, 1, 2);

plot(f, abs(Y)); title('Frequency Spectrum'); xlabel('Frequency (Hz)'); ylabel('Magnitude');

xlim([0, Fs/2]); % Display only positive frequencies

% You can also use the following line to display the spectrum in dB scale

% plot(f, 20*log10(abs(Y)));

% ylabel('Magnitude (dB)');

% Adjust plot grid on;

Output:

Result:

Thus, the signal and its spectrum of an audio signal was generated and displayed.
CONTENT BEYOND SYLLABUS
Pre-emphasis and De-emphasis
Aim:
To study the effect of pre-emphasis and de-emphasis circuits on a modulated signal and to
observe the improvement in signal-to-noise ratio (SNR) after passing through these circuits.
Software Used:
Octave version 8.3
Theory:
In communication systems, especially frequency modulation (FM), pre-emphasis and de-
emphasis techniques are used to reduce the effect of noise in the transmitted signal.
 Pre-emphasis is the process of amplifying the high-frequency components of the
message signal before transmission. This is done because high-frequency components
are more susceptible to noise.
 The pre-emphasis circuit is typically a high-pass filter that increases the amplitude of
higher frequencies.
 De-emphasis is the reverse process applied at the receiver end, where the high-
frequency components are attenuated to restore the original signal. The de-emphasis
circuit is typically a low-pass filter.
Program:
clc;
clear;

% Parameters
fs = 10000; % Sampling frequency
t = 0:1/fs:1-1/fs; % Time vector

% Generate a signal: low + high frequency components


x = sin(2*pi*300*t) + 0.5*sin(2*pi*3000*t);

% Add white Gaussian noise


x_noisy = x + 0.2*randn(size(t));

% Pre-emphasis filter: y[n] = x[n] - alpha * x[n-1]


alpha = 0.95;
pre_emphasized = filter([1 -alpha], 1, x_noisy);

% De-emphasis filter: y[n] = x[n] + alpha * y[n-1]


de_emphasized = filter(1, [1 -alpha], pre_emphasized);

% Plotting the signals


figure;

subplot(3,1,1);
plot(t(1:1000), x_noisy(1:1000));
title('Original Signal with Noise');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,2);
plot(t(1:1000), pre_emphasized(1:1000));
title('After Pre-emphasis');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,3);
plot(t(1:1000), de_emphasized(1:1000));
title('After De-emphasis (Recovered Signal)');
xlabel('Time (s)');
ylabel('Amplitude');

sgtitle('Pre-emphasis and De-emphasis Simulation');


Output:

Result:
The experiment successfully demonstrated the functioning of pre-emphasis and de-emphasis
circuits. It was observed that:
 High-frequency noise was effectively reduced after applying the de-emphasis filter.
 The original signal was recovered with improved signal-to-noise ratio (SNR),
validating the effectiveness of these techniques in communication systems.
Pulse Position Modulation
Aim:
To generate and analyze a Pulse Position Modulated (PPM) signal using a given message signal
and to study the demodulation process to recover the original signal.
Software Used:
Octave version 8.3
Theory:
Pulse Position Modulation (PPM) is a type of digital pulse modulation technique where the
position of a pulse is varied according to the amplitude of the message signal, while the
amplitude and width of the pulse remain constant.
 In PPM, the time delay (position) of each pulse with respect to a reference pulse is
proportional to the amplitude of the modulating signal.
 PPM is derived from Pulse Width Modulation (PWM), and it is typically generated
by first generating a PWM signal and then converting it to PPM.
 One of the main advantages of PPM is that it is less affected by noise in the
transmission channel compared to other modulation techniques like PAM or PWM,
since the information is encoded in the time position rather than in amplitude or width.
 PPM is commonly used in applications such as optical communication, remote
control systems, and wireless communication.
Program:
clc; clear;

% Parameters
fm = 5; % Message frequency (Hz)
fs = 1000; % Sampling frequency (Hz)
t = 0:1/fs:1; % Time vector (1 second duration)
Am = 1; % Message amplitude

% Generate message signal (sinusoidal) msg =


Am * sin(2 * pi * fm * t);

% Parameters for PPM


fs_ppm = 50; % PPM sampling frequency
Ts = 1/fs_ppm; % Sampling period
pulse_width = 0.002; % Width of each pulse
num_samples = length(t);
samples_per_slot = round(Ts * fs); % Samples per time slot
max_shift = round(samples_per_slot / 3); % Max position shift for pulse

% Normalize message to get time shift


msg_norm = (msg - min(msg)) / (max(msg) - min(msg)); % Normalize between 0 and 1
time_shift = round(msg_norm * max_shift); % Convert to sample shift

% Generate PPM signal


ppm = zeros(1, num_samples);
for i = 1:samples_per_slot:num_samples - samples_per_slot
slot_start = i;
pulse_pos = slot_start + time_shift(floor(i)+1); % Pulse position in the slot
if pulse_pos + pulse_width*fs < num_samples
ppm(pulse_pos : pulse_pos + round(pulse_width*fs)) = 1;
end
end

% Plotting
figure;
subplot(2,1,1);
plot(t, msg);
title('Message Signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(2,1,2);
plot(t, ppm);
title('Pulse Position Modulated (PPM) Signal');
xlabel('Time (s)');
ylabel('Amplitude');
ylim([-0.2 1.2]);

sgtitle('PPM Modulation');

Output:

Result:

The experiment successfully demonstrated the generation and demodulation of a PPM signal. It
was observed that:

 The position of each pulse varied according to the message signal amplitude.

 The demodulated output closely resembled the original message signal, validating
the effectiveness of PPM.

 The experiment confirmed that PPM offers better noise immunity compared to PAM
and PWM, especially in time-critical digital communication systems.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy