Вы находитесь на странице: 1из 2

Department of Electronics and Telecommunication                                                                 Subject: Analog Communication 

 
EXPERIMENT NUMBER -
MATLAB: AM AND FM MODULATION
Aim: Generation of AM Signal in MATLAB

Apparatus: PC, MATLAB v7 or greater

Theory:

- MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment.


- It is a proprietary programming language developed by MathWorks Inc.
- MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms,
creation of user interfaces and interfacing with programs written in other languages like C, C++, Java,
Python etc.
- Although MATLAB is primarily intended for numerical computing, a number of optional toolboxes allow
for extended functionality.
- Generation of AM using MATLAB:
o In Amplitude Modulation, the amplitude of the carrier (VC) signal is varied with respect to the
instantaneous amplitude of the information signal (VM).
o To generate AM signal in MATLAB, we use the inbuilt function ammod.
o ammod:
Syntax:
 y = ammod(x,Fc,Fs) uses the message signal x to modulate a carrier signal with frequency
Fc (Hz) using amplitude modulation. The carrier signal and x have sample frequency Fs
(Hz). The modulated signal has zero initial phase and zero carrier amplitude, so the result is
suppressed-carrier modulation.
 The x, Fc, and Fs input arguments must satisfy Fs > 2(Fc + BW), where BW is the bandwidth
of the modulating signal x.
 y = ammod(x,Fc,Fs,ini_phase) specifies the initial phase in the modulated signal y in
radians.
 y = ammod(x,Fc,Fs,ini_phase,carramp) performs transmitted-carrier modulation instead
of suppressed-carrier modulation. The carrier amplitude is carramp.
o Example:
% Set the sample rate to 100 Hz. Create a time vector 100 seconds long
fs = 100;
t = (0:1/fs:100)';
% Set the carrier frequency to 10 Hz. Generate a sinusoidal signal.
fc = 10;
x = sin(2*pi*t);
% create DSB signal using ammod
y = ammod(x,fc,fs);

Pune Vidyarthi Griha’s College of Engineering and Technology Pune‐09 
 
Department of Electronics and Telecommunication                                                                 Subject: Analog Communication 
 
- Generation of FM in MATLAB:
o In Frequency Modulation, frequency of the carrier is varied with respect to the instantaneous
amplitude of information signal.
o To generate FM, we use inbuilt function fmmod
o fmmod:
Syntax:
 y = fmmod(x,Fc,Fs,freqdev) modulates the message signal x using frequency
modulation. The carrier signal has frequency Fc (Hz) and sampling rate Fs (Hz), where Fs
must be at least 2*Fc. The freqdev argument is the frequency deviation constant (Hz) of the
modulated signal.
 y = fmmod(x,Fc,Fs,freqdev,ini_phase) specifies the initial phase of the modulated
signal, in radians.
o Example:

% Set the sample rate and carrier frequency. Generate a time vector having a
duration of 0.2 s.
fs = 1000;
fc = 200;
t = (0:1/fs:0.2)';
% create sinusoidal signal
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
% set frequency deviation to 50Hz
fDev = 50;
% frequency modulation using fmmod
y = fmmod(x,fc,fs,fDev);

- Attach printouts of your code and output plot window.

Conclusion:
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________

Pune Vidyarthi Griha’s College of Engineering and Technology Pune‐09 
 

Вам также может понравиться