EXPERIMENT 1 AIM: To study various Analog modulation techniques using Matlab. Command Used: 1. Amplitude Modulation a) ammod:‐ For amplitude modulation y = ammod(x,Fc,Fs) Æ It 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. b) amdemod:‐ For amplitude de‐modulation z = amdemod(y,Fc,Fs) Æ It demodulates the amplitude modulated signal y from a carrier signal with frequency Fc (Hz). The carrier signal and y have sample frequency Fs (Hz). The modulated signal y has zero initial phase and zero carrier amplitude, so it represents suppressed carrier modulation. The demodulation process uses the lowpass filter specified by [num,den] = butter(5,Fc*2/Fs). 2. Frequency Modulation a) fmmod:‐ For frequency modulation y = fmmod(x,Fc,Fs,freqdev) Æ It 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. b) fmdemod:‐ For frequency de‐modulation z = fmdemod(y,Fc,Fs,freqdev) Æ It demodulatesthe modulating signal z from the carrier signal using frequency demodulation. 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 (Hz) of the modulated signal y. 3. Phase Modulation a) pmmod:‐ For phase modulation y = pmmod(x,Fc,Fs,phasedev) Æ It modulates the message signal x using phase modulation. The carrier signal has frequency Fc (hertz) and sampling rate Fs (hertz), where Fs must be at least 2*Fc. The phasedev argument is the phase deviation of the modulated signal in radians. b) pmdemod:‐ For phase de‐modulation z = pmmod(y,Fc,Fs,phasedev) Æ It demodulates the phase modulated signal y at the carrier frequency Fc (hertz). z and the carrier signal have sampling rate Fs (hertz), where Fs must be at least 2*Fc. The phasedev argument is the phase deviation of the modulated signal, in radians. 4. Single Sideband Amplitude Modulation a) ssbmod y = ssbmod(x,fc,fs,ini_phase,'upper') Æ It uses the message signal x to modulate a carrier signal with frequency Fc (Hz) using single sideband amplitude modulation in which the lower sideband is the desired sideband. The carrier signal and x have sample frequency Fs (Hz). It specifies the initial phase of the modulated signal in radians and uses the upper sideband as the desired sideband. b) ssbdemod z = ssbdemod(y,Fc,Fs) Æ It demodulates the single sideband amplitude modulated signal y from the carrier signal having frequency Fc (Hz). The carrier signal and y have sampling rate Fs (Hz). The modulated signal has zero initial phase, and can be an upper‐ or lower‐sideband signal. The demodulation process uses the lowpass filter specified by [num,den] = butter(5,Fc*2/Fs). Code: 1. Amplitude Modulation fs=3000
% Sampling rate is 3000 samples per second.
fc=300
% Carrier frequency in Hz
t=[0:0.1*fs]'/fs
% Sampling times for .1 second
x=sin(2*pi*t*10)
% Representation of the signal
plot(t,x)
subplot(3,1,1)
plot(t,x)
y=ammod(x,fc,fs) % Modulate x to produce y.
subplot(3,1,2)
plot(t,y)
z=amdemod(y,fc,fs)
subplot(3,1,3)
plot(t,z)
subplot(3,1,1)
title('Amplitude Signal')
subplot(3,1,2)
title('Modulated Signal')
subplot(3,1,3)
title('Demodulated Signal')
2. Frequency Modulation Fs = 2000;
% Sampling rate is 8000 samples per second.
Fc = 100;
% Carrier frequency in Hz
freqdev = 40
f = 20
% frequency of original signal is 20Hz
t = [0:.1*Fs]/Fs; % Sampling times for .1 second
x = sin(2*pi*f*t); % Representation of the signal
y = fmmod(x,Fc,Fs,freqdev)
subplot(3,1,1);
plot(t,x); title('Signal')
subplot(3,1,2);
plot(t,y)
title('Modulated Signal')
z = fmdemod(y,Fc,Fs,freqdev)
subplot(3,1,3)
plot(t,z)
title('Demodulated Signal')
3. Phase Modulation Fs = 8000;
% Sampling rate is 8000 samples per second.
Fc = 200;
% Carrier frequency in Hz
f = 30
% frequency of original signal is 30Hz
t = [0:.1*Fs]/Fs;
% Sampling times for .1 second
x = sin(2*pi*f*t);
% Representation of the signal
y = pmmod(x,Fc,Fs,10)
subplot(3,1,1);
plot(t,x);
title('Signal')
subplot(3,1,2);
plot(t,y)
title('Modulated Signal')
z = pmdemod(y,Fc,Fs,10)
subplot(3,1,3)
plot(t,z)
title('Demodulated Signal')
4. Single Sideband Amplitude Modulation Fs = 3000;
% Sampling rate is 8000 samples per second.
Fc = 300;
% Carrier frequency in Hz
f = 10
% frequency of original signal is 10Hz
initialphase = 0
t = [0:.1*3000]/3000;
% Sampling times for .1 second
x = sin(2*pi*f*t);
% Representation of the signal
y = ssbmod(x,Fc,Fs,initialphase,'upper'); % Modulate x to produce y.
subplot(3,1,1);
plot(t,x);
title('Signal')
subplot(3,1,2);
plot(t,y)
title('Modulated Signal')
z = ssbdemod(y,Fc,Fs)
subplot(3,1,3)
plot(t,z)
title('Demodulated Signal')
© Copyright 2026 Paperzz