0% found this document useful (0 votes)
25 views15 pages

LAB1 and 2

The document describes experiments to understand amplitude modulation, frequency modulation, and digital modulation techniques. It includes: 1) An experiment on amplitude modulation and demodulation that generates a message signal, carrier signal, and modulated signal using MATLAB code. It plots the signals and demodulates the modulated signal. 2) An experiment on frequency modulation that generates a message signal, carrier signal, and frequency modulated signal using MATLAB code. It plots the signals and explains frequency modulation. 3) An overview of digital modulation techniques including ASK, FSK, PSK, and QPSK. It provides theory and MATLAB code to generate and plot signals for ASK and FSK modulation.

Uploaded by

viswanathrd45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views15 pages

LAB1 and 2

The document describes experiments to understand amplitude modulation, frequency modulation, and digital modulation techniques. It includes: 1) An experiment on amplitude modulation and demodulation that generates a message signal, carrier signal, and modulated signal using MATLAB code. It plots the signals and demodulates the modulated signal. 2) An experiment on frequency modulation that generates a message signal, carrier signal, and frequency modulated signal using MATLAB code. It plots the signals and explains frequency modulation. 3) An overview of digital modulation techniques including ASK, FSK, PSK, and QPSK. It provides theory and MATLAB code to generate and plot signals for ASK and FSK modulation.

Uploaded by

viswanathrd45
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

EXPERIMENT 1

(a) Perform an experiment to understand the concept of amplitude modulation and


demodulation

AIM AND OBJECTIVE:

The aim and objective of this experiment is to understand the concept of amplitude modulation
and demodulation.

THEORY:

An amplitude modulation (AM) technique is used in electronics communication, mostly to


transmit radio waves with messages. An amplitude modulation, the amplitude (signal strength) of
the wave is varied in proportion to that of the message signal, such as an audio signal. This
technique contrasts with angle modulation, in which either the frequency of the carrier wave is
varied, as in frequency modulation, or its phase, as in phase modulation.

Amplitude Modulation refers to a modulation procedure in which the amplitude of the carrier
varies with respect to the instantaneous value of the modulating signal. A primary motivation for
modulation in the context of communications would be to facilitate the transmission of this
information-carrying signal over a communication channel or radio station via a specified
passband.
MATLAB CODES

% Amplitude Modulation (AM)


clc;clear all;close all;
% Signal parameters
fs = 1000; % Sampling frequency (Hz)
fc = 100; % Carrier frequency (Hz)
fm = 10; % Message signal frequency (Hz)
amplitude = 1; % Message signal amplitude

% Time vector
t = 0:1/fs:1;

% Message signal
message_signal = amplitude * sin(2*pi*fm*t);

% Carrier signal
carrier_signal = sin(2*pi*fc*t);

% Modulated signal
modulated_signal = (1 + message_signal) .* carrier_signal;

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

subplot(3,1,2);
plot(t, carrier_signal);
title('Carrier Signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,3);
plot(t, modulated_signal);
title('Modulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');

% Amplitude Demodulation (AM)

% Demodulated signal
demodulated_signal = abs(hilbert(modulated_signal)); % Envelope detection

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

subplot(2,1,2);
plot(t, demodulated_signal);
title('Demodulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');

RESULTS:

We first generate a message signal and a carrier signal. The message signal is a sine wave with a
frequency of fm (message signal frequency) and an amplitude of amplitude. The carrier signal is
also a sine wave with a frequency of fc (carrier frequency).

For modulation, we multiply the message signal with the carrier signal, modulating the
amplitude of the carrier wave based on the message signal. This creates the modulated signal.

The code plots the message signal, carrier signal, and modulated signal in the first set of
subplots. In the second set of subplots, it shows the modulated signal and the demodulated
signal.
Fig. 1. Amplitude Modulation

Fig. 2. Amplitude Demodulation

Questions:

1. Define Modulation and Modulation index.

2. Explain why modulation is necessary.

3. What is amplitude modulation? Define the types of amplitude modulation.

4. What is the bandwidth of AM signal?

5. What is overmodulation in AM?

6. What is the RF range in which AM is used?


(b) Perform an experiment to understand the concept of frequency Modulation

AIM AND OBJECTIVE

The aim and objective of this experiment is to understand the concept of frequency Modulation.

THEORY:

Frequency modulation (FM) is a modulation technique used in telecommunications and


broadcasting to encode information onto a carrier wave by varying its frequency. In FM, the
frequency of the carrier wave is changed in accordance with the modulating signal, which is the
input signal carrying the information to be transmitted. The process of frequency modulation
involves -Modulating signal, Frequency Deviation, Mixing and Transmission.

To recover the original modulating signal at the receiving end, the process of demodulation is
performed. The demodulation of Frequency modulated signal involves the following steps-
Reception, Frequency Discrimination, De-emphasis, filtering and lastly amplification and
decoding.
clc
clear all
close all
t = 0:0.001:1; %upto 1000 samples
vm = 5; % amplitude of message signal
vc = 5; % amplitude of carrier signal
fM = 8; % message frequency
fc = 100; % carrier frequency
m = 10; % modulation index
% vm = input('Enter Amplitude (Message) = ');
% vc = input('Enter Amplitude (Carrier) = ');
% fM = input('Enter Message frequency = ');
% fc = input('Enter Carrier frequency = ');
% m = input('Enter Modulation Index = ');
msg = vm*sin(2*pi*fM*t);
subplot(3,1,1); %plotting message signal
plot(t,msg);
xlabel('Time');
ylabel('Amplitude');
title('Message ');

carrier = vc*sin(2*pi*fc*t);
subplot(3,1,2); %plotting carrier signal
plot(t,carrier);
xlabel('Time');
ylabel('Amplitude');
title('Carrier Signal');

y = vc*cos(2*pi*fc*t+m.*sin(2*pi*fM*t));
subplot(3,1,3);%plotting FM (Frequency Modulated) signal
plot(t,y);
xlabel('Time');
ylabel('Amplitude');
title('FM Signal');

RESULT:

In this code, we first generate a message signal, which is a sine wave with a frequency of fm
(message signal frequency) and an amplitude of amplitude.

For modulation, we use frequency modulation by adding the integral of the message signal to the
carrier signal. The modulation index (β) determines the extent of frequency deviation based on
the amplitude of the message signal.

The modulated signal is plotted in the second subplot.

Fig. 3. Frequency Modulation

Questions

1. What is angle modulation? What are the types of angle modulation?

2. Give the carson’s rule.

3. List the type of FM. Differentiate between NBFM and WBFM.

4. What is the role of Bessel function table in FM?

5. Define frequency deviation.

6. How is PLL used in FM?

7. Explain the role of FM in communication. (application)

8. What is the RF (radio frequency) range in which FM is used?


EXPERIMENT 2
Digital Modulation & Demodulation – ASK, FSK, BPSK, QPSK (MATLAB)

AIM AND OBJECTIVE The aim and objective of this experiment is to understand the concept
of Digital Modulation & Demodulation – ASK, FSK, PSK and QPSK.

Theory:

1. Amplitude Shift Keying (ASK):

Amplitude Shift Keying is a digital modulation scheme where the amplitude of a carrier signal is
varied to represent different digital symbols. In ASK, two amplitude levels are used to represent
binary data. Typically, one amplitude level represents '0', and the other represents '1'. The carrier
signal is switched between these two levels based on the binary data being transmitted.

2. Frequency Shift Keying (FSK):

Frequency Shift Keying is a digital modulation scheme where the frequency of a carrier signal is
varied to represent different digital symbols. In FSK, two different carrier frequencies are used,
each representing one of the binary symbols. The carrier frequency is switched between these
two frequencies based on the binary data being transmitted.

3. Phase Shift Keying (PSK):

Phase Shift Keying is a digital modulation scheme where the phase of a carrier signal is changed
to represent different digital symbols. In PSK, the carrier signal is divided into discrete phase
shifts, each representing a specific symbol. The most common form of PSK is Binary Phase Shift
Keying (BPSK), where two phase shifts (typically 0 degrees and 180 degrees) represent binary
'0' and '1', respectively.

4. Quadrature Phase Shift Keying (QPSK):

Quadrature Phase Shift Keying is an extension of PSK that allows for the transmission of two
bits per symbol. In QPSK, the carrier signal is divided into four phase shifts: +45, +135, -45, and
-135 degrees. Each combination of two bits is mapped to one of the phase shifts, enabling the
transmission of four different symbols. QPSK uses two carrier signals, typically in quadrature
(90 degrees out of phase) with each other, to encode the in-phase and quadrature components of
the signal.

In all of these modulation schemes, the transmitted signal is modulated with the digital
information to encode it into specific characteristics of the carrier signal, such as amplitude,
phase, or frequency. At the receiver, the demodulation process extracts the encoded information
from the received signal by detecting and interpreting the modulation characteristics. This
involves techniques such as carrier recovery, symbol synchronization, and decision-making
based on received signal parameters. The choice of modulation scheme depends on various
factors such as the desired data rate, bandwidth requirements, noise performance, and system
complexity. Each scheme has its advantages and trade-offs, and the appropriate choice depends
on the specific application and communication system requirements.

MATLAB CODES

1 ) ASK
clear;
clc;
b = input('Enter the Bit stream \n '); %b = [0 1 0 1 1 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
for j = i:.1:i+1
bw(x(i*100:(i+1)*100)) = b(i);
end
end
bw = bw(100:end);
sint = sin(2*pi*t);
st = bw.*sint;
subplot(3,1,1)
plot(t,bw)
%xlabel('Time');
%ylabel('digital data');
title('Digital Message ');
grid on ; axis([0 n -2 +2])
subplot(3,1,2)
plot(t,sint)
title('Carrier Signal');
grid on ; axis([0 n -2 +2])
subplot(3,1,3)
plot(t,st)
title('ASK signal ');
grid on ; axis([0 n -2 +2])
Enter input bit stream [0 1 0 1 1 1 0]

Fig. ASK output waveform


2) FSK MATLAB CODES
clear;
clc;
b = input('Enter the Bit stream \n '); %b = [0 1 0 1 1 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
if (b(i) == 0)
b_p(i) = -1;
else
b_p(i) = 1;
end
for j = i:.1:i+1
bw(x(i*100:(i+1)*100)) = b_p(i);
end
end
bw = bw(100:end);
wo = 2*(2*pi*t);
W = 1*(2*pi*t);
sinHt = sin(wo+W);
sinLt = sin(wo-W);
st = sin(wo+(bw).*W);
subplot(4,1,1)
plot(t,bw)
title('Digital message')
grid on ; axis([0 n -2 +2])
subplot(4,1,2)
plot(t,sinHt)
title('Carrier frequency for logic 1')
grid on ; axis([0 n -2 +2])
subplot(4,1,3)
plot(t,sinLt)
title('Carrier frequency for logic 0')
grid on ; axis([0 n -2 +2])
subplot(4,1,4)
plot(t,st)
grid on ; axis([0 n -2 +2])
title('fsk waveform')

Enter the Bit stream [0 1 0 1 1 1 0]

Fig. FSK output


3 ) BPSK Simulink model (Modulator and demodulator)

Fig. BPSK Simulink Model


1. Set Random Integer Generator to 2 since it is BPSK

2. Set AWGN and Sine wave as follows:


Fig. Output of the scope.
4 ) QPSK Modulation and Demodulation (in Simulink)

Steps:

1. To open Simulink Library, type slLibraryBrowser in command window. Click on the


following icon to create a new blank Simulink model or type Simulink in command window

or to open library browser

2. Follow the path to select information source (right click and Add block to model or drag and
drop) Random Integer Generator

set size to 4 since it is QPSK


3. Follow the path to select QPSK modulator and demodulator

use gray code for QPSK demodulator also.

4. Follow the path to select channel AWGN channel

5. Follow the path to select Error rate calculation and Constellation diagram

, set it to

6. Follow the path to select Display and Scope (double click on Scope, select File>Number of
input ports >2)

7. To select Product, Add, Sine Wave follow

8. To select Complex To Real follow

9. To make cosine wave, make the following parameters in sine wave block
(Sine wave) (cosine wave)

10. To prevent overlapping in Scope, select View>Layout> select column or row wise

11. Connect all the components and run the model

Fig. 1 Output of Scope displaying Transmitted bits and demodulated bits.

It has 4 levels of 0 (00), 1 (01) , 2 (10) and 3 (11) representing 4 levels of QPSK. Transmitted bit
is received and demodulated correctly. The QPSK modulated wave is obtained from the second
scope as follows
Fig. 2. Input Waveform and QPSK modulated wave

Fig. 3. Constellation diagram at SNR = 10dB


Questions

1. Explain ASK, FSK, BPSK, QPSK and QAM.

2. Give the Baud and Bandwidth of the above digital modulation schemes.

3. Draw the constellation diagram of BPSK and QPSK.

4. Check the different symbols that are possible at the output of a 8-PSK and16-PSK.

5. Give some applications of QPSK modulation.

6. Represent the binary data sequence 1 0 1 1 0 0 1 0 with the resulting waveform using ASK,
FSK and PSK digital modulation techniques.

You might also like