SlideShare a Scribd company logo
EXPERIMENT-8
AIM OF THE EXPERIMENT-
Using MATLAB generate a carrier and a modulating signal.Modulate the carrier using FM.Show the
waveform in time domain and analyze it in frequency domain.Repeat the simulation for modulating
signal being sine,square and sawtooth signals.
SOFTWARE REQUIRED-
MATLAB
PROGRAM CODE-
1)(FM OF SINE WAVE)
clc;
clear all;
close all;
t=0:0.00001:0.1;
Em=1;
Ec=2;
b=50;
fm=50;
fc=1000;
k=10000;
% Ploting Baseband signal waveform
x=Em*cos(2*pi*fm*t);
subplot(5,1,1)
plot(x)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Baseband signal waveform')
% Ploting Carrier signal waveform
y=Ec*cos(2*pi*fc*t);
subplot(5,1,2)
plot(y)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Carrier signal waveform')
% Ploting Wideband Frequency modulated waveform
z=Ec*cos((2*pi*fc*t)+b*sin(2*pi*fm*t));
subplot(5,1,3)
plot(z)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Frequency modulated waveform')
%Ploting NBFM
r=Ec*cos(2*pi*fc*t)-Ec*k*((Em/2*pi*fm)*sin(2*pi*fm*t)).*sin(2*pi*fc*t)
subplot(5,1,4)
plot(r)
0 2000 4000 6000 8000 10000 12000
Time
-1
0
1
Amplitude
Baseband signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Carrier signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Frequency modulated waveform
0 2000 4000 6000 8000 10000 12000
-2
0
2
106
2)(FM OF SAWTOOTH WAVE)
clc;
clear all;
close all;
t=0:0.00001:0.1;
Em=1;
Ec=2;
b=50;
fm=50;
fc=1000;
k=10000;
% Ploting Baseband signal waveform
x=Em*sawtooth(2*pi*fm*t);
subplot(4,1,1)
plot(x)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Baseband signal waveform')
% Ploting Carrier signal waveform
y=Ec*cos(2*pi*fc*t);
subplot(4,1,2)
plot(y)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Carrier signal waveform')
% Ploting Wideband Frequency modulated waveform
z=Ec*cos((2*pi*fc*t)+b*sawtooth(2*pi*fm*t));
subplot(4,1,3)
plot(z)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Frequency modulated waveform')
%Ploting Spectrum of FM
w=abs(fft(z));
subplot(4,1,4)
plot(w)
xlabel('Frequency')
ylabel('Amplitude')
grid on
title('Spectrum of FM')
0 2000 4000 6000 8000 10000 12000
Time
-1
0
1
Amplitude
Baseband signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Carrier signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Frequency modulated waveform
0 2000 4000 6000 8000 10000 12000
Frequency
0
5000
10000
Amplitude
Spectrum of FM
3)FM OF SQUARE WAVE
clc;
clear all;
close all;
t=0:0.00001:0.1;
Em=1;
Ec=2;
b=50;
fm=50;
fc=1000;
k=10000;
% Ploting Baseband signal waveform
x=Em*square(2*pi*fm*t);
subplot(4,1,1)
plot(x)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Baseband signal waveform')
% Ploting Carrier signal waveform
y=Ec*cos(2*pi*fc*t);
subplot(4,1,2)
plot(y)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Carrier signal waveform')
% Ploting Wideband Frequency modulated waveform
z=Ec*cos((2*pi*fc*t)+b*square(2*pi*fm*t));
subplot(4,1,3)
plot(z)
xlabel('Time')
ylabel('Amplitude')
grid on
title('Frequency modulated waveform')
%Ploting Spectrum of FM
w=abs(fft(z));
subplot(4,1,4)
plot(w)
xlabel('Frequency')
ylabel('Amplitude')
grid on
title('Spectrum of FM')
0 2000 4000 6000 8000 10000 12000
Time
-1
0
1
Amplitude
Baseband signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Carrier signal waveform
0 2000 4000 6000 8000 10000 12000
Time
-2
0
2
Amplitude
Frequency modulated waveform
0 2000 4000 6000 8000 10000 12000
Frequency
0
5000
10000
Amplitude
Spectrum of FM
CONCLUSION-
The experiment was completed successfully and we modulated carrier signal by FM and also
analyzed the signals in frequency domain.

More Related Content

PDF
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
PDF
Conitunous Time Modulation.pdf
PDF
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
PDF
Exam 6 commlab 18_119_ei0292
PDF
Experiment3_DCS-21BEC0384Adityabonnerjee
PDF
Amplitude Modulation with Double Side band with Carrier Method
PDF
Matlab 2
PDF
Generating PM wave
EE443 - Communications 1 - Lab 3 - Loren Schwappach.pdf
Conitunous Time Modulation.pdf
EE443 - Communications 1 - Lab 1 - Loren Schwappach.pdf
Exam 6 commlab 18_119_ei0292
Experiment3_DCS-21BEC0384Adityabonnerjee
Amplitude Modulation with Double Side band with Carrier Method
Matlab 2
Generating PM wave

Similar to FM Frequency Modulation Codes Matlab.docx (20)

DOCX
AGC PROGRAM.docx
PDF
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DOC
Analog Communication Engineering Lab Manual
DOC
Analog Communication Lab Manual
PDF
Matlab fair-record-model
PDF
Modulation techniques matlab_code
PDF
EEP306: Quadrature amplitude modulation
DOCX
Basic simulation lab manual1
PPT
Amplitute modulation
PPT
Amplitute modulation
DOC
Dsp manual
PDF
Fast Fourier Transform (FFT) of Time Series in Kafka Streams
DOCX
PDF
Comm lab manual_final
PDF
Comm lab manual_final-1
PDF
Dsp Lab Record
DOCX
ACS 22LIE12 lab Manul.docx
DOCX
Fourier series example
PDF
Reconstruction
PDF
1568973267 effect of multi-tone
AGC PROGRAM.docx
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
Analog Communication Engineering Lab Manual
Analog Communication Lab Manual
Matlab fair-record-model
Modulation techniques matlab_code
EEP306: Quadrature amplitude modulation
Basic simulation lab manual1
Amplitute modulation
Amplitute modulation
Dsp manual
Fast Fourier Transform (FFT) of Time Series in Kafka Streams
Comm lab manual_final
Comm lab manual_final-1
Dsp Lab Record
ACS 22LIE12 lab Manul.docx
Fourier series example
Reconstruction
1568973267 effect of multi-tone
Ad

Recently uploaded (20)

PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Well-logging-methods_new................
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Construction Project Organization Group 2.pptx
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
737-MAX_SRG.pdf student reference guides
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Current and future trends in Computer Vision.pptx
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Artificial Intelligence
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Automation-in-Manufacturing-Chapter-Introduction.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Well-logging-methods_new................
Embodied AI: Ushering in the Next Era of Intelligent Systems
Construction Project Organization Group 2.pptx
Fundamentals of Mechanical Engineering.pptx
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Sustainable Sites - Green Building Construction
R24 SURVEYING LAB MANUAL for civil enggi
737-MAX_SRG.pdf student reference guides
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Current and future trends in Computer Vision.pptx
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Internet of Things (IOT) - A guide to understanding
CYBER-CRIMES AND SECURITY A guide to understanding
Artificial Intelligence
Ad

FM Frequency Modulation Codes Matlab.docx

  • 1. EXPERIMENT-8 AIM OF THE EXPERIMENT- Using MATLAB generate a carrier and a modulating signal.Modulate the carrier using FM.Show the waveform in time domain and analyze it in frequency domain.Repeat the simulation for modulating signal being sine,square and sawtooth signals. SOFTWARE REQUIRED- MATLAB PROGRAM CODE- 1)(FM OF SINE WAVE) clc; clear all; close all; t=0:0.00001:0.1; Em=1; Ec=2; b=50; fm=50; fc=1000; k=10000; % Ploting Baseband signal waveform x=Em*cos(2*pi*fm*t); subplot(5,1,1) plot(x) xlabel('Time') ylabel('Amplitude') grid on title('Baseband signal waveform') % Ploting Carrier signal waveform y=Ec*cos(2*pi*fc*t); subplot(5,1,2) plot(y) xlabel('Time')
  • 2. ylabel('Amplitude') grid on title('Carrier signal waveform') % Ploting Wideband Frequency modulated waveform z=Ec*cos((2*pi*fc*t)+b*sin(2*pi*fm*t)); subplot(5,1,3) plot(z) xlabel('Time') ylabel('Amplitude') grid on title('Frequency modulated waveform') %Ploting NBFM r=Ec*cos(2*pi*fc*t)-Ec*k*((Em/2*pi*fm)*sin(2*pi*fm*t)).*sin(2*pi*fc*t) subplot(5,1,4) plot(r)
  • 3. 0 2000 4000 6000 8000 10000 12000 Time -1 0 1 Amplitude Baseband signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Carrier signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Frequency modulated waveform 0 2000 4000 6000 8000 10000 12000 -2 0 2 106 2)(FM OF SAWTOOTH WAVE) clc; clear all; close all; t=0:0.00001:0.1; Em=1; Ec=2; b=50; fm=50; fc=1000; k=10000; % Ploting Baseband signal waveform x=Em*sawtooth(2*pi*fm*t); subplot(4,1,1)
  • 4. plot(x) xlabel('Time') ylabel('Amplitude') grid on title('Baseband signal waveform') % Ploting Carrier signal waveform y=Ec*cos(2*pi*fc*t); subplot(4,1,2) plot(y) xlabel('Time') ylabel('Amplitude') grid on title('Carrier signal waveform') % Ploting Wideband Frequency modulated waveform z=Ec*cos((2*pi*fc*t)+b*sawtooth(2*pi*fm*t)); subplot(4,1,3) plot(z) xlabel('Time') ylabel('Amplitude') grid on title('Frequency modulated waveform') %Ploting Spectrum of FM w=abs(fft(z)); subplot(4,1,4) plot(w) xlabel('Frequency') ylabel('Amplitude') grid on title('Spectrum of FM')
  • 5. 0 2000 4000 6000 8000 10000 12000 Time -1 0 1 Amplitude Baseband signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Carrier signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Frequency modulated waveform 0 2000 4000 6000 8000 10000 12000 Frequency 0 5000 10000 Amplitude Spectrum of FM 3)FM OF SQUARE WAVE clc; clear all; close all; t=0:0.00001:0.1; Em=1; Ec=2; b=50; fm=50; fc=1000; k=10000; % Ploting Baseband signal waveform x=Em*square(2*pi*fm*t);
  • 6. subplot(4,1,1) plot(x) xlabel('Time') ylabel('Amplitude') grid on title('Baseband signal waveform') % Ploting Carrier signal waveform y=Ec*cos(2*pi*fc*t); subplot(4,1,2) plot(y) xlabel('Time') ylabel('Amplitude') grid on title('Carrier signal waveform') % Ploting Wideband Frequency modulated waveform z=Ec*cos((2*pi*fc*t)+b*square(2*pi*fm*t)); subplot(4,1,3) plot(z) xlabel('Time') ylabel('Amplitude') grid on title('Frequency modulated waveform') %Ploting Spectrum of FM w=abs(fft(z)); subplot(4,1,4) plot(w) xlabel('Frequency') ylabel('Amplitude') grid on title('Spectrum of FM')
  • 7. 0 2000 4000 6000 8000 10000 12000 Time -1 0 1 Amplitude Baseband signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Carrier signal waveform 0 2000 4000 6000 8000 10000 12000 Time -2 0 2 Amplitude Frequency modulated waveform 0 2000 4000 6000 8000 10000 12000 Frequency 0 5000 10000 Amplitude Spectrum of FM CONCLUSION- The experiment was completed successfully and we modulated carrier signal by FM and also analyzed the signals in frequency domain.