Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Modulations-Data Communication-Lab Assignmernt, Exercises of Data Communication Systems and Computer Networks

This lab work was assigned by Suraj Chauhan at Birla Institute of Technology and Science for Data Communication course. Its main points are: Important, Functions, Amplitude, Modulation, Frequency, Demodulation, Phase, Noise, Analog, Gaussian

Typology: Exercises

2011/2012

Uploaded on 07/07/2012

shakti
shakti 🇮🇳

4.4

(19)

100 documents

1 / 3

Toggle sidebar

Related documents


Partial preview of the text

Download Modulations-Data Communication-Lab Assignmernt and more Exercises Data Communication Systems and Computer Networks in PDF only on Docsity!

Data Communication Lab‐ 06

Date:5/13/

Important Functions

Amplitude Modulation

  • AMMOD Amplitude modulation. Y = AMMOD(X, Fc, Fs) uses the message signal X to modulate the carrier frequency Fc(Hz) using amplitude modulation. X and Fc have sample frequency Fs (Hz). The modulated signal has zero initial phase.
  • AMDEMOD Amplitude demodulation. Z = AMDEMOD(Y,Fc,Fs) demodulates the amplitude modulated signal Y from the carrier frequency Fc (Hz). Y and Fc have sample frequency Fs (Hz). Z = AMDEMOD(Y,Fc,Fs,INI_PHASE) specifies the initial phase (rad) of the modulated signal. Frequency Modulation
  • FMMOD Frequency modulation. Y = FMMOD(X,Fc,Fs,FREQDEV) uses the message signal X to modulate the carrier frequency Fc (Hz) and sample frequency Fs (Hz), where Fs > 2*Fc. FREQDEV (Hz) is the frequency deviation of the modulated signal.
  • FMDEMOD Frequency demodulation. Z = FMDEMOD(Y,Fc,Fs,FREQDEV) demodulates the FM modulated signal Y at the carrier frequency Fc (Hz). Y and Fc have sample frequency Fs (Hz).FREQDEV is the frequency deviation (Hz) of the modulated signal. Phase Modulation
  • PMMOD Phase modulation. Y = PMMOD(X,Fc,Fs,PHASEDEV) uses the message signal X to phase modulate the carrier frequency Fc (Hz). Fc and X have sample frequency Fs (Hz), where Fs >= 2*Fc. PHASEDEV (radians) is the frequency deviation of the modulated signal.
  • PMDEMOD Phase demodulation. Z = PMDEMOD(Y,Fc,Fs,PHASEDEV) demodulates the phase modulated signal Y at the carrier frequency Fc (Hz). Fc and Y have sample frequency Fs (Hz). PHASEDEV (Hz) is the frequency deviation of the modulated signal. Adding Noise AWGN Add white Gaussian noise to a signal. Y = AWGN(X,SNR) adds white Gaussian noise to X Examples Analog Modulation

If t measures time in seconds, then the vector x below is the result of sampling a sine wave 8000 times per second for 0.1 seconds. The vector y represents the modulated signal. Fs = 8000; % Sampling rate is 8000 samples per second. Fc = 300; % Carrier frequency in Hz t = [0:.1Fs]'/Fs; % Sampling times for .1 second x = sin(20pit); % Representation of the signal y = ammod(x,Fc,Fs); % Modulate x to produce y. figure; subplot(2,1,1); plot(t,x); % Plot x on top. subplot(2,1,2); plot(t,y)% Plot y below. Frequency Modulation The code below modulates a multichannel signal using fmmod and demodulates it using fmdemod.Fs = 8000; % Sampling rate of signal Fc = 3000; % Carrier frequency t = [0:Fs]'/Fs; % Sampling times s1 = sin(2pi300t)+2sin(2pi600t); % Channel 1 s2 = sin(2pi150t)+2sin(2pi900t); % Channel 2 x = [s1,s2]; % Two‐channel signal dev = 50; % Frequency deviation in modulated signal y = fmmod(x,Fc,Fs,dev); % Modulate both channels. z = fmdemod(y,Fc,Fs,dev); % Demodulate both channels. Phase Modulation The example samples an analog signal and modulates it. Then it simulates an additive white Gaussian noise (AWGN) channel, demodulates the received signal, and plots the original and demodulated signals. % Prepare to sample a signal for two seconds, at a rate of 100 samples per second. Fs = 100; % Sampling rate t = [0:2Fs+1]'/Fs; % Time points for sampling % Create the signal, a sum of sinusoids.

x = sin(2pit) + sin(4pit); Fc = 10; % Carrier frequency in modulation phasedev = pi/2; % Phase deviation for phase modulation y = pmmod(x,Fc,Fs,phasedev); % Modulate. y = awgn(y,10,'measured',103); % Add noise. z = pmdemod(y,Fc,Fs,phasedev); % Demodulate. % Plot the original and recovered signals. figure; plot(t,x,'k‐',t,z,'g‐'); legend('Original signal','Recovered signal'); Exercise Experiment with these functions and learn the formation of analog signals and modulation using phase, frequency and amplitude. Implement amplitude modulation and make your own amplitude modulator using the guidelines given below. 1 ‐create a source of digital data , use a binary vector the randint(x,y) function is used to make a binary vector of x rows, and y columns 2 ‐create a simple sinusoidal of any frequency , create a vector that holds samples of this sine wave, (use the examples given above) 3 ‐generate a vector t that contains time values of sampled data. 3 ‐use equation Asin(2pifct), 4 ‐draw a plot 5 ‐create function , test and show the results