Sunteți pe pagina 1din 6

EXPERIMENT1

AIM:TostudyvariousAnalogmodulationtechniquesusingMatlab.

CommandUsed:

1.AmplitudeModulation
a)ammod:Foramplitudemodulation
y=ammod(x,Fc,Fs)Itusesthe message signalxtomodulateacarrier signalwith
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,sotheresultissuppressedcarriermodulation.

b)amdemod:Foramplitudedemodulation
z = amdemod(y,Fc,Fs) It demodulates the amplitude modulated signal y from a
carriersignalwithfrequencyFc(Hz).ThecarriersignalandyhavesamplefrequencyFs
(Hz). The modulated signal y has zero initial phase and zero carrier amplitude, so it
representssuppressedcarriermodulation.Thedemodulationprocessusesthelowpass
filterspecifiedby[num,den]=butter(5,Fc*2/Fs).

2.FrequencyModulation
a)fmmod:Forfrequencymodulation
y = fmmod(x,Fc,Fs,freqdev) It modulates the message signal x using frequency
modulation.ThecarriersignalhasfrequencyFc(Hz)andsamplingrateFs(Hz),where
Fsmustbeatleast2*Fc.Thefreqdevargumentisthefrequencydeviationconstant(Hz)
ofthemodulatedsignal.

b)fmdemod:Forfrequencydemodulation
z=fmdemod(y,Fc,Fs,freqdev)Itdemodulatesthemodulatingsignalzfromthecarrier
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
frequencydeviation(Hz)ofthemodulatedsignaly.

3.PhaseModulation
a)pmmod:Forphasemodulation
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
modulatedsignalinradians.

b)pmdemod:Forphasedemodulation
z=pmmod(y,Fc,Fs,phasedev)Itdemodulatesthephasemodulatedsignalyatthe
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
modulatedsignal,inradians.

4.SingleSidebandAmplitudeModulation

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
whichthelowersidebandisthedesiredsideband.Thecarriersignalandxhavesample
frequencyFs(Hz).It specifiestheinitialphaseof themodulatedsignalinradiansand
usestheuppersidebandasthedesiredsideband.

b)ssbdemod

z = ssbdemod(y,Fc,Fs) It demodulates the single sideband amplitude modulated


signalyfromthecarriersignalhavingfrequencyFc(Hz).Thecarriersignalandyhave
samplingrateFs(Hz).Themodulatedsignalhaszeroinitialphase,andcanbeanupper
orlowersidebandsignal.Thedemodulationprocessusesthelowpassfilterspecifiedby
[num,den]=butter(5,Fc*2/Fs).

Code:

1.AmplitudeModulation
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.FrequencyModulation
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.PhaseModulation
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.SingleSidebandAmplitudeModulation
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')

S-ar putea să vă placă și