Tuesday, 24 September 2013

Fm Modulation Code

the Program for coding Freequency Modulation is

clc;
fs=1000;
fc=100;
t=[0:fs]/fs;
k=50;
x=sin(2*pi*t);
subplot(3,1,1);
plot(t,x);
title('message sigal');
xlabel('time');
ylabel('amplitude');
y=fmmod(x,fc,fs,k);
subplot(3,1,2);
plot(t,y);
xlabel('time');
ylabel('amplitude');
title('modulated signal');
z=fmdemod(y,fc,fs,k);
subplot(3,1,3);
plot(t,z);
xlabel('time');
ylabel('amplitude');
title('demodulated wave');


The Output for the above program is:

Wednesday, 4 September 2013

DSBSC Modulation Code

The program for  DSBSC Modulation is:

clc;
clr;
fs=2;
fc=50;
t=0:0.001:1;
x=sin(2*pi*fs*t);
y=sin(2*pi*fc*t);
subplot(2,2,1);
plot(t,x);
xlabel('time');
ylabel('amplitude');
title('message signal');
subplot(2,2,2);
plot(t,y);
xlabel('time');
ylabel('amplitude');
title('carrier signal');
z=x.*y;
subplot(2,2,3);
plot(z,t);
xlabel('time');
ylabel('amplitude');
title('DSBSC Modulated Waveform');
d=z./y;
subplot(2,2,4);
plot(t,d);
xlabel('time');
ylabel('amplitude');
title('Demodulated Wave');



The output of the code is given as follows:


Tuesday, 6 August 2013

Amplitude modulation Code in Matlab


Program

fs=500;
fc=50;
t=[0:2*fs]/fs;
x=2*sin(2*pi*t);
y=ammod(x,fc,fs);
z=fft(y);
f=[0:length(z)-1];
subplot(2,2,1);
plot(t,x);
xlabel('time');
xlabel('Freequency');
ylabel('amplitude');
title('Input Waveform');
subplot(2,2,2);
plot(f,y);
ylabel('amplitude');
title('modulated waveform');
subplot(2,2,3);
plot(f,z);
xlabel('Freequency');
ylabel('amplitude');
title('spectrum diagram');x= ammod(y,fc,fs);
subplot(2,2,4);
plot(t,x);
xlabel('time);
ylabel('amplitude);
title('demodulated waveform)




Output waveforms



SSB Modulator Internal Block Diagram





Internal Block diagram and Connections of SSB Modulator


Non Phase shifted Sinusoidal Input waveform - Message Signal

Non Phase shifted Sinusoidal Input waveform - Carrier Signal


Phase shifted Sinusoidal Input waveform - Message Signal


Phase shifted Sinusoidal Input waveform - Carrier Signal




Spectrum Analyser Block Properties



Spectrum Analyser Output




The Experiment

To perform this experiment first insert four sine wave blocks into the workspace

Then place two sine wave blocks together to a multiplier and the other two to another multiplier

In two of the sime wave blocks connected to the same multiplier change the inital phase reading to 90 degrees as shown in the source block parameters

Connect the outputs of the multipliers to an adder and the output of the adder to a spectrumm analyser

DSBSC using Internal Structure of blocks


DSBSC Internal Structure Block Diagram



Input Sine Wave 1 Parameters - Carrier Wave



Sine Wave Input Paraneters - Message Signal



Spectrum Analyser Output DSBSC

DSBSC


BLOCK DIAGRAM DSBSC MODULATOR


Source Block parameters



Modulator Properties DSBSC



DSBSC Modulated Wave

DSBSC Demodulator Blockset

DSBSC Demodulator Properties








DSBSC Demodulated Waveform

SSB MODULATION


MODULATOR BLOCKSET


SOURCE BLOCK PARAMETERS




MODULATOR PROPERTIES

MODULATED WAVE


DEMODULATION BLOCKSET


DEMODULATOR PROPERTIES WINDOW

DEMODULATED WAVEFORM