0% found this document useful (0 votes)
44 views

C Sai Bhavana CSlab MATLAB

1) Two message signals at 4Hz and 5Hz were multiplied with carrier signals at 50Hz and 150Hz respectively to generate a frequency division multiplexed signal. 2) The multiplexed signal was passed through bandpass filters to recover each message signal individually. 3) Each recovered signal was then demodulated by multiplying with its carrier and passing through a lowpass filter, successfully recovering the original message signals.

Uploaded by

Anirudh Kamaraj
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)
44 views

C Sai Bhavana CSlab MATLAB

1) Two message signals at 4Hz and 5Hz were multiplied with carrier signals at 50Hz and 150Hz respectively to generate a frequency division multiplexed signal. 2) The multiplexed signal was passed through bandpass filters to recover each message signal individually. 3) Each recovered signal was then demodulated by multiplying with its carrier and passing through a lowpass filter, successfully recovering the original message signals.

Uploaded by

Anirudh Kamaraj
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/ 8

NATIONAL INSTITUTE OF TECHNOLOGY

WARANGAL

ELECTRONICS AND COMMUNICATION ENGINEERING

III Year, II Semester

CS lab report - I

Name: C SAI BHAVANA


Roll No. :184213

AIM: To develop a MATLAB program for Frequency Division Multiplexing of two


message signals.

TOOLS USED: MATLAB R2016a


Procedure:
1)Let the sampling frequency fs=1000;(fs>2*f)
2)Two sinusoidal signals with frequencies 4Hz and 5 Hz are generated as message signals.
3)Two sinusoidal signals with frequencies 50Hz and 150Hz are generated as carrier signals.
4)Message signals are multiplied with their corresponding carrier signals and added together
to generate a complex signal.
5)This message is passed through bandpass filter to achieve signal of desired range of
frequencies.
6)The output of bandpass filter is demodulated by multiplying with carrier wave and passing
through low pass filter
7)The output of lowpass filter is the recovered message signal which is proportional to input
message signal.
Explanation:

A modulated signal is obtained by multiplying message signal and its carrier wave. Two
modulated signals are added together to form FDM signal.

Figure: Block diagram for FDM

m1(t)c1(t)+m2(t)c2(t) is frequency division multiplexing signal.


There should not be any overlapping in independent spectra. To achieve modulated signal of
message signal 1, the FDM is passed though Bandpass filter.
The output of bandpass filter is demodulated by multiplying with carrier wave and then by
passing through Lowpass filter. The output of lowpass filter is recovered signal which is
proportional to input message signal.
Similarly, the second message signal is recovered.

MATLAB code:
clear all
close all
clc
fs=1000;%sampling frequency
t=0:1/fs:1;
a1=2;%amplitude of mesaage signal 1
f1=4;%frequency of message signal 1
m1=a1*cos(2*pi*f1*t);%message signal 1
a2=2;%amplitude of mesaage signal 2
f2=5;%frequency of message signal 2
m2=a2*cos(2*pi*f2*t);%message signal 2
%carrier signal generation
ac1=2;%amplitude of carrier signal 1
fc1=50;%frequency of carrier signal 1
c1=ac1*cos(2*pi*fc1*t);%carrier signal 1
ac2=2;%amplitude of carrier signal 2
fc2=150;%frequency ofcarrier signal 2
c2=ac2*cos(2*pi*fc2*t);%carrier signal 2
%composite signal
x=m1.*c1+m2.*c2;
figure(1);
plot(t,x);
xlabel('Time');
ylabel('Composite signal');
%Absolute frequency on X-axis vs.Magniitude on Y axis
N=length(x);
X=fftshift(fft(x,N));
f=fs*[-N/2:N/2-1]/N;
figure(2);
plot(f,abs(X));
xlabel('Absolute frequency');

ylabel('DFT values');
title('Composite signal spectrum');
%Recovering message signal 1
%Bandpass filter
[num den]=butter(5,[(fc1-f1)*2/fs (fc1+f1)*4/fs]);
bpf_1=filter(num,den,x);
%mixing
z1=2*bpf_1.*c1;
[num den]=butter(5,f1*4/fs);
rec1=filter(num,den,z1);
figure(3);
plot(t,rec1);
xlabel('Time');
ylabel('Recovered signal 1');
%Absolute frequency on X-axis vs.Magniitude on Y axis
N=length(rec1);
r1=fftshift(fft(rec1,N));
f=fs*[-N/2:N/2-1]/N;
figure(4);
plot(f,abs(r1));
xlabel('Absolute frequency');
ylabel('DFT values');
title('Spectrum of Recovered signal 1');

[num den]=butter(5,[(fc2-f2)*2/fs (fc2+f2)*4/fs]);


bpf_2=filter(num,den,x);
%mixing
z2=2*bpf_2.*c2;
[num den]=butter(5,f2*4/fs);
rec2=filter(num,den,z2);
figure(5);
plot(t, rec2);
xlabel('Time');
ylabel('Recovered signal 2');
%Absolute frequency on X-axis vs.Magniitude on Y axis
N=length(rec2);
r2=fftshift(fft(rec2,N));
f=fs*[-N/2:N/2-1]/N;
figure(6);
plot(f,abs(r2));
xlabel('Absolute frequency');
ylabel('DFT values');
title('Spectrum of Recovered signal 2');
GRAPHS:

Figure 1: Plot of composite signal

Figure 2: Frequency spectrum of composite signal


Figure 3: Recovered message signal 1

Figure 4: Frequency Spectrum of Recovered signal 1


Figure 5: Recovered signal 2

Figure 6: Frequency spectrum of recovered signal 2


RESULTS:
Message signals are recovered by using Frequency Division Multiplexing.

You might also like