Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 3
Amplitude 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