18ECL67 Communication LAB MANUAL
18ECL67 Communication LAB MANUAL
18ECL67 Communication LAB MANUAL
NAME: ______________________________
USN: ________________________________
BATCH: _____________________________
List of Experiments
Sl Page
No.
Experiment
No.
PART-A
1. Amplitude Modulation and Detection. 1
2. Frequency modulation and Demodulation. 4
3. Pulse sampling, Flat Top Sampling and reconstruction. 8
4. TDM of two Band Limited Signals 14
5. FSK and PSK Generation & Detection 17
Measurement of Frequency, Guide Wavelength, Power ,VSWR, and
6. 26
Attenuation in Microwave Test Bench.
a. Determination of
b. Coupling, Isolation, Directivity Characteristics of Directional
8. Coupler.
32
c. Resonance Characteristics of Micro Strip Ring Resonator.
d. Power Division and Isolation of Micro Strip Power Divider.
PART-B
Simulate NRZ, RZ, Half-Sinusoid and Raised Cosine Pulses and
1. 43
Generate Eye Diagram for Binary Polar Signaling.
Outcomes
Understand the microwave signal measurement using VSWR and frequency meter.
Understand the characteristics and various losses associated with OFC channel.
communication systems.
Communication Lab (18ECL67) 2020-21
EXPERIMENT NO 1:
AMPLITUDE MODULATION & DEMODULATION USING
TRANSISTOR/ FET
AIM: a) To generate Amplitude Modulated wave & to calculate the modulation index.
COMPONENTS REQUIRED:
2 Diode OA79 1
10 kΩ - 2, 16 kΩ(DRB)
THEORY:
Amplitude modulation is defined as a process in which the amplitude of the carrier wave c(t) is
varied linearly with the instantaneous amplitude of the message signal m(t).The standard form the
amplitude modulated wave is defined as,
The Demodulation circuit is used to recover the message signal from the incoming AM wave at
the receiver. An Envelop detector is simple and yet highly effective device that is well suited for the
demodulation of AM wave for which the % of modulation is less than 100%.An Envelop detector
produces an output signal that follows the envelop of the input wave exactly.
𝑽𝒎𝒂𝒙 − 𝑽𝒎𝒊𝒏
Modulation index is defined as: 𝒎 = 𝑽𝒎𝒂𝒙 + 𝑽𝒎𝒊𝒏
PROCEDURE:
1. The circuit is connected as per the circuit diagram.
2. Switch on +12 V Vcc supply.
3. Apply sinusoidal signal of 1 kHz frequency and amplitude 2 Vpp as modulating signal and carrier
signal of frequency 11 kHz and amplitude 15 Vpp.
4. Now slowly increase the amplitude of the modulating signal up to 7V and note down values V max
and Vmin.
5. Calculate the modulation index using the equation.
6. Find the value of R from fm=1/2πRC taking C=0.01µF.
7. Connect the circuit diagram for Demodulation.
8. Feed the AM wave to the demodulator circuit and observe the output.
9. Note down the frequency and amplitude of the demodulated output waveform.
CIRCUIT DIAGRAM:
For Modulation:
For Demodulation:
EXPECTED WAVEFORMS:
OBSERVATION TABLE:
Modulation
S.No Am(volts) Vmax Vmin %m
Index ‘m’
RESULT:
EXPERIMENT NO 2:
FREQUENCY MODULATION USING IC 8038/2206 AND
DEMODULATION
AIM: Design and conduct a suitable experiment to generate a FM wave using IC 8038. Find the
modulation index and the bandwidth of operation (βT). To demodulate the frequency
modulated signal using FM detector.
COMPONENTS REQUIRED:
Sl. Name of Component Specification/Range Quantity
No.
1 FM Modulator & Demodulator IC8038 & LM 565 1
2 Diode OA79 1
4 Capacitors 10µF,0.001µF 1
THEORY:
Frequency modulation conveys information over a carrier wave by varying its instantaneous
frequency. An important concept in the understanding of FM is that of frequency deviation. The amount
of frequency deviation a signal experiences is a measure of the change in transmitter output frequency
from the rest frequency of the transmitter. The rest frequency of a transmitter is defined as the output
frequency with no modulating signal applied. For a transmitter with linear modulation characteristics,
the frequency deviation of the carrier is directly proportional to the amplitude of the applied modulating
signal. Thus an FM transmitter is said to have modulation sensitivity, represented by a constant, kf,
IC 8038 a waveform generator is used in F.M generation frequently. Modulated signal is given
by
IC is a 14 pin IC where pins 10,11,12 are used for sine wave adjust. Pin 2 gives sine wave
output the amplitude of this wave is 0.22VCC and VCC varies between ± 5v to ± 15v. This IC also
generates square wave and triangular wave. Pin 4 and 5 are used for duty cycle. An external capacitor
connected to pin 10 along with resistors connected to pin 5 and determines output frequency. Pin 8 is
used for F.M sweep input. Modulating signal is applied to pin8 sweep voltage should be within the
range 2/3 VCC < Vsweep < VCC. Where, VCC is total voltage. Sweep frequency of F.M is 10kHz. An
external capacitor connected to timing capacitor with timing resistors connected to 4 & 5 determines
the frequency of output waveforms.
PROCEDURE:
Modulation:
1. Apply ± 10v to IC 8038 and shorting pin no’s 7 and 8 observe output at 9, 3, 2 on CRO.
2. Measure sine wave amplitude and frequency at Pin 2.
3. Connect modulating signal of Vm = 5 v(p-p) and frequency of 800Hz to 1.5kHz between
pin 7 & 8, through R-C as shown.
4. Observe FM output at pin 2.
5. Draw output waveform.
6. Determine maximum phase deviations following steps are carried out.
a. Shot 7 and 8, without RC connects a variable DC supply.
b. Vary DC voltage from (0-6v) and observe frequency variation at pin 2.
c. Note down DC input and output frequency on CRO.
d. Draw graph of frequency v/s input voltage.
Demodulation:
1. Connections are made as per circuit diagram shown in figure below
2. Check the functioning of PLL (IC 565) by giving square wave to input and observing the output.
3. Frequency of input signal is varied till input and output are locked.
4. Now modulated signal is fed as input and observe the demodulated signal (output) on CRO.
5. Draw the demodulated waveform.
CIRCUIT DIAGRAM:
MODULATION
DEMODULATION
DESIGN:
1
Given frequency f = 25 kHz 𝑓= 5⁄ 𝑅 𝐶[1+(𝑅𝐵 ⁄
3 𝐴 2𝑅𝐴 −𝑅𝐵 )]𝑅𝐴
WAVEFORMS:
Modulation
TABULAR COLUMN:
EXPERIMENT NO 3:
PULSE SAMPLING, FLAT TOP SAMPLING AND RECONSTRUCTION
AIM: (a) To conduct an experiment to generate pulse sampling and to demodulate the same.
COMPONENTS REQUIRED:
THEORY:
CIRCUIT DIAGRAM:
DESIGN:
PROCEDURE:
1. Check the components/Equipment’s for their working condition.
2. Connections are made as shown in the circuit diagram
3. Apply the square wave carrier signal of 2V peak to peak amplitude of frequency
10 kHz.
4. Apply sine wave modulating signal of frequency f m = 100 Hz with 5V peak to peak amplitude
5. Observe the PAM waveform.
6. Observe the demodulated signal at the output of the low pass filter and note fo and Vo.
7. Repeat the above steps for fc = 2fm and fc<2fm.
Vo of Vo of
Sl. Sampling
fc (Hz) fm (Hz) demodulated demodulated
No. methods
signal in Volt signal in Hz
1 Under Sampling
fc<2fm
2 Nquist Rate
fc=2fm
3 Over Sampling
fc>2fm
EXPECTED WAVEFORM:
AIM: (b) To design a circuit for generating flat top samples and to verify Sampling theorem.
COMPONENTS REQUIRED:
Sl.
Particulars Range Quantity
No.
1 IC-4016/4051 1
2 Transistor SL100 -- 1
4 Capacitor 0.1µF 2
THEORY:
Flat top sampling is like natural sampling. In this sampling techniques, the top of the samples
remains constant and is equal to the instantaneous value of the message signal x(t) at the start of
sampling process. Sample and hold circuit is used in this type of sampling. Theoretically, the sampled
signal can be obtained by convolution of rectangular pulse p(t) with ideally sampled signal say y δ(t)
Nyquist Rate: It is the minimum sampling rate at which signal can be converted into samples and can
be recovered back without distortion.
CIRCUIT DIAGRAM:
DESIGN:
PROCEDURE:
4. Apply sine wave modulating signal of frequency fm = 100 Hz with 1.2 V peak to peak
amplitude and 0.6 dc shift.
5. Observe the output waveform.
6. Observe the demodulated signal at the output of the low pass filter and note fo and Vo.
7. Repeat the above steps for fc = 2fm and fc<2fm.
8. Connect the sampled output as a input to the demodulator input and reconstruct the original
message signal.
TABULAR COLUMN: Vc(p-p)= V Vm(p-p)= V
Vo of Vo of
Sl. Sampling fc fm
demodulated demodulated
No. methods (Hz) (Hz)
signal in Volt signal in Hz
Under Sampling
1
fc<2fm
Nquist Rate
2 fc=2fm
Over Sampling
3 fc>2fm
EXPECTED WAVEFORM:
RESULT: Flat top samples are generated and Sampling theorem is verified.
EXPERIMENT NO 4:
TIME DIVISION MULTIPLEXING AND DEMULTIPLEXING OF TWO BAND LIMITED
SIGNALS
COMPONENTS REQUIRED:
1 Transistor SL-100,SK-100 2
2 Op-amp IC-741 1
3 Resistors 1 𝑘Ω 1 𝑘Ω = 9
5 DSO - 1
6 Function Generator - 2
Theory:
TDM is a technique used for transmitting several message signals over a communication
channel by dividing the time frame into slots, one slot for each message signal. This is a digital
technique in which the circuit is highly modular in nature and provides reliable and efficient operation.
There is no cross talk in TDM due to circuit non-lineraties since the pulses are completely isolated. But
it also has its disadvantages, which include timing jitter and synchronization is required. In pulse-
amplitude modulation, the amplitude of a periodic train of pulses is varied in pro-portion to a message
signal. TDM provides an effective method for sharing a communication channel.
CIRCUIT DIAGRAM:
Modulation Circuit:
Demodulation Circuit:
PROCEDURE:
EXPERIMENT NO 5a:
AIM: To design an FSK system to transmit digital data using a suitable carrier and to demodulate the
signal using a suitable circuit .
COMPONENTS REQUIRED:
1 Transistor SL-100,SK-100 1
2 Op-amp IC-741 2
5 Diode IN4007 1
7 DSO - 1
8 Function Generator - 2
Theory:
FSK is one of the digital modulation techniques. Here the frequency of the carrier is switched
between two values. A sinusoidal of amplitude 'A' and frequency 𝑓𝐶1 is used to represent a binary '1'
and frequency 𝑓𝐶2 is used to represent binary '0'.
The FSK modulator use frequencies 𝑓𝐶1 and 𝑓𝐶2 as high and low frequencies respectively. The
inverter is placed before lower modulator hence at any time only one modulator is active. The band
pass filter is used for bandwidth limiting. Since the amplitude of FSK is constant, the noise as a
minimum effect on FSK. It is used in a low speed modem having a bitrate around 1200 bps the
detection of FSK is relatively simple. However, FSK needs more bandwidth, FSK uses two different
frequencies with sufficient difference between them. Hence bandwidth required for FSK is more.
CIRCUIT DIAGRAM:
Modulation Circuit:
DETECTION:
DESIGN:
Modulation:
Assume
𝐼𝐶𝑠𝑎𝑡 = 5 𝑚𝐴, ℎ𝑓𝑒(𝑚𝑖𝑛) = 30, 𝑉𝐶𝐸𝑠𝑎𝑡 = 0.2 𝑉 , 𝑉𝐵𝐸 = 0.7 𝑉
𝐼𝐶 5𝑚𝐴
𝐼𝐵 = = = 0.166 𝑚𝐴
ℎ𝑓𝑒 30
Demodulation:
Envelope Detector
1 1
< 𝑅𝐶 <
2𝜋𝑓𝑐 2𝜋𝑓𝑚
PROCEDURE:
CALCULATIONS:
𝛿𝑓
Modulation Index, β=
𝑓𝑚
WAVEFORMS:
RESULT:
EXPERIMENT NO 5a:
PSK GENERATION AND DETECTION
AIM: To design & demonstrate a BPSK system to transmit digital data using a suitable carrier and to
demodulate signal using a suitable circuit.
COMPONENTS REQUIRED:
1 Transistor SL-100,SK-100 1
2 Op-amp IC-741 3
5 Diode IN4007 1
7 DSO - 1
8 Function Generator - 2
Theory:
Phase shift keying is basically is a technique in which the phase of the carrier is changed in accordance
with the amplitude of the modulating signal. Here modulating signal is a binary signal that varies
between ‘0’ and ‘1’. The carrier has to be modulated in phase for either of the two conditions. ie., for
binary ‘1’ it should be 1800 out of phase with the previous phase and carrier should be 00 phase for
binary ‘0’ with respect to the previous phase.
CIRCUIT DIAGRAM:
Modulation Circuit:
Demodulation Circuit:
DESIGN :
Modulation:
Assume
𝐼𝐶𝑠𝑎𝑡 = 5 𝑚𝐴, ℎ𝑓𝑒(𝑚𝑖𝑛) = 30, 𝑉𝐶𝐸𝑠𝑎𝑡 = 0.2 𝑉 , 𝑉𝐵𝐸 = 0.7 𝑉
𝐼𝐶 5𝑚𝐴
𝐼𝐵 = = = 0.166 𝑚𝐴
ℎ𝑓𝑒 30
(𝑉𝑐 − 𝑉𝐶𝐸𝑠𝑎𝑡 ) (5 − 0.2)
𝑅𝐶1 = 𝑅𝐶2 = = = 0.96𝑘Ω = 1 𝑘Ω
𝐼𝐶 5𝑚𝐴
Demodulation:
𝑅 𝑅
1. Inverting Amplifer: 𝐶1 ′(𝑡) = − (𝑅𝑓 ) 𝐶1 (𝑡) Let Gain=1 So 𝑅𝑓 =say(10 kΩ)
1 1
𝑅 𝑅
2. Adder: 𝑉𝑡 = − (𝑅𝑓 ) [𝐹𝑆𝐾 + 𝐶1 ′(𝑡)] Let Gain=1 So 𝑅𝑓 =say(10 kΩ)
1 1
Envelope Detector
1 1
< 𝑅𝐶 <
2𝜋𝑓𝑐 2𝜋𝑓𝑚
1
𝑓𝑚 =
2𝜋𝑅𝐶
Let C=0.1µf,
1
𝑅= = 4.7𝑘Ω
2𝜋𝑓𝑚 𝐶
PROCEDURE:
WAVEFORMS:
RESULT:
EXPERIMENT N0 6:
AIM: Conduct an experiment to find Frequency, Guide Wavelength, Power, VSWR and Attenuation
in Microwave Test Bench.
Experimental Setup:
REFLEX
KLYSTRON
POWER
SUPPLY CRO / VSWR
Meter
PROCEDURE:
TO FIND VSWR:-
Using DSO
12. Measure maximum voltage Vmax and minimum voltage 𝑉𝑚𝑖𝑛 on DSO and calculate VSWR .
RESULT:
FORMULA USED:
𝑓𝑜 = ____________Hz
λ𝑐 = _____________𝑐𝑚
1 1 1
Hence = λ2 + λ2
λ2𝑜 𝑔 𝑐
(λ𝑔 λ𝑐 )
λ0 =
√λ𝑔2 + λ2𝑐
λ0 = __________𝑐𝑚.
So,
𝐶
𝑓𝑜 = = _________GHz
λ0
Vmin
Vmax
𝑃𝑂𝑊𝐸𝑅 = ____________________𝑑𝐵
EXPERIMENT NO 7:
EXPERIMENTAL SET UP :
MICROWAVE SOURCE
3 dB
ATTENUATOR
DETECTOR ACTIVE
FILTER
attenuator
Procedure:
1. Assemble the microwave set up as shown in the circuit diagram above.
2. Switch on the microwave source. Set the Frequency to 2.3 𝐺𝐻𝑍. Vary the RF power level knob
and observe the variation of power on VSWR meter.
3. Connect Transmitter antenna and Receiver antenna and measure the resonant frequency of antenna
using DSO and note down the value.
(2∗𝐷2 )
4. Keep the distance between antennas, atleast 𝑆 = [D-Maximum dimension of antenna].
λ𝑜
5. Align both antennas (E Plane/H Plane) in such a way that maximum power is obtained at 0 degrees.
6. Rotate the antenna clockwise in steps of 10 degrees and note power reading from VSWR meter for
each degree.
7. Plot radiation pattern on radiation graph and find 𝜃𝐸 𝑎𝑛𝑑 𝜃𝐻 .
8. Then calculate gain and directivity.
TABULAR COLUMN:
10
20
30
40
50
360
CALCULATION :
(32400)
(I) 𝐷 = (𝜃
𝐸 ∗ 𝜃𝐻 )
4𝜋𝑆 𝑃
( III ) Gain, 𝐺 = λ𝑜
√ 𝑃𝑅
𝑇
𝑃𝑅 =Received Power at 00
𝑃𝑅 =Transmitted Power without antennas at the resonant frequency.
(IV) Gain [𝐺 ] = 10 log(𝐺 ) 𝑑𝐵
RESULT :
(A) Directivity of the given antenna is
EXPERIMENT No-8:
DETERMINATION OF
a) COUPLING AND ISOLATION CHARACTERISTICS OF MICROSTRIP DIRECTIONAL
COUPLER
b) RESONANCE CHARACTERISTICS OF MICRO STRIP RING RESONATOR AND
COMPUTATION OF DIELECTRIC CONSANT OF SUBSTRATE
c) POWER DIVISION AND ISOLATION OF MICROSTRIP POWER DIVIDER
MICROWAVE VSWR
SOURCE
METER
( 2.2 GHz – 3GHz)
3 dB
ATTENUATOR DETECTOR
P Q
Procedure:
1. Assemble the microwave set up as shown in the circuit diagram above.
3. Switch on the microwave source. Set the Frequency to 2.2 𝐺𝐻𝑧. Vary the RF power level knob
and observe the variation of power on VSWR meter.
4. Vary RF power level knob till VSWR reading is −45𝑑𝐵𝑚. This is direct reading.
5. Vary the frequency in terms of 0.1𝐺𝐻𝑧 from 2.2 𝐺𝐻𝑧 to 2.7 𝐺𝐻𝑧 and note down power level
in VSWR meter for each frequency.
6. Tabulate above readings as P1 ( direct reading ).
7. Disconnect P and Q and connect micro strip directional coupler in between P & Q.
TABULAR COLUMN:
Result:
a) The coupling factor is
b). AIM: Measurement of resonance characteristics and dielectric constant of a substrate using a
micro strip ring resonator.
IMAGE :
Experimental set up :
MICROWAVE
SOURCE VSWR
( 2.2 GHz – 3GHz) METER
3 dB
ATTENUATOR DETECTOR
P Q
Procedure:
A] INITIAL SETTINGS OF MICROWAVE SOURCE :
3. Switch on the microwave source. Set the Frequency to 2.2 𝐺𝐻𝑧. Vary the RF power level knob
and observe the variation of power on VSWR meter.
4. Vary RF power level knob till VSWR reading is −45𝑑𝐵𝑚. This is direct reading.
5. Now disconnect P and Q. Connect P to one port of RING RESONATOR and Q to DETECTOR.
8. Vary the frequency from 2.2 𝐺𝐻𝑧 and observe increase power level in VSWR meter.
9. At particular frequency power level reachesa maximum value and starts to decrease.
TABULAR COLUMN:
SL No Frequency Power
(GHz) dB
GIVEN :
ℎ = 0.76𝑚𝑚 [𝐻𝑒𝑖𝑔ℎ𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑆𝑢𝑏𝑠𝑡𝑟𝑎𝑡𝑒] 𝑤=
1.84𝑚𝑚 [𝑊𝑖𝑑𝑡ℎ 𝑜𝑓 𝑡ℎ𝑒 𝐶𝑜𝑛𝑑𝑢𝑐𝑡𝑜𝑟]
𝜖𝑟 = 3.2 [𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝑑𝑖𝑒𝑙𝑒𝑐𝑟𝑖𝑐 𝐶𝑜𝑛𝑠𝑡𝑎𝑛𝑡]
[ii] 𝜖𝑟 =
c). AIM: Measurement of power division and isolation characteristics of a micro strip 3 𝑑𝐵 power
divider.
IMAGE :
MICROWAVE
SOURCE
( 2.2 GHz – 3GHz) VSWR
METER
3 dB
DETECTOR
ATTENUATOR
P Q
3. RANGE : NORMAL / 30 𝑑𝐵
4. VARIABLE GAIN: MAXIMUM
Procedure:
1. Assemble the microwave set up as shown in the circuit diagram above.
3. Switch on the microwave source. Set the Frequency to 2.2 𝐺𝐻𝑧 Vary the RF power level knob
and observe the variation of power on VSWR meter
4. Vary RF power level knob till VSWR reading is −45 𝑑𝐵𝑚. This is direct reading
5. Vary the frequency in terms of 0.1𝐺𝐻𝑧 from 2.2 𝐺𝐻𝑧 to 2.7 𝐺𝐻𝑧 and note down Power level
in VSWR meter for each frequency.
7. Disconnect P and Q and connect micro strip power divider in between P & Q
I. POWER DIVISION:
TABULAR COLUMN:
POWER DIVISION
POWER DIVISION B/W PORT 1 & PORT
FREQUENCY VSWR READINGS 3
B/W PORT 1 & PORT 2
( GHz)
1. Disconnect P and Q and connect micro strip POWER DIVIDER in between it.
TABULAR COLUMN:
Result:
A] The Power division is
PART B
EXPERIMENT NO 1
SIMULATE NRZ, RZ, HALF-SINUSOID AND RAISED COSINE PULSES AND GENERATE
EYE DIAGRAM FOR BINARY POLAR SIGNALING.
a) Binary Polar NRZ
h=[1 0 0 1 1 0 1 0 1 0];
n=1;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=-(t<n)-(t==n);
else
y=-(t<n)+(t==n);
end
d=plot(t,y);grid on;
title('Line code POLAR NRZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
else
if h(n+1)==0
y=(t<n)-1*(t==n);
else
y=(t<n)+1*(t==n);
end
d=plot(t,y);grid on;
title('Line code POLAR NRZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('one');
end
n=n+1;
%pause;
end
WAVEFORM
b) Binary Polar RZ
h=[1 0 0 1 1 0 1 0 1 0];
n=1;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=-(t<n-0.5)-(t==n);
else
y=-(t<n-0.5)+(t==n);
end
d=plot(t,y);grid on;
title('Line code BIPOLAR RZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
else
if h(n+1)==0
%y=(t>n-1)-2*(t==n);
y=(t<n-0.5)-1*(t==n);
else
%y=(t>n-1)+(t==n-1);
y=(t<n-0.5)+1*(t==n);
end
%y=(t>n-1)+(t==n-1);
d=plot(t,y);grid on;
title('Line code BIPOLAR RZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('one');
end
n=n+1;
%pause;
end
WAVEFORM
c) Half Sinusoid
Close all;
clc;
t = 0:0.2:2;
f=.5; % Input Signal Frequency
x=sin(2*pi*f*t); % Generate Sine Wave
x(x>0) = 0;
figure;
plot(t,x);
axis([xlim -1 1])
title(‘Half Sinusoid’);
WAVEFORM
clc;
clear all;
close all;
over = 16; % oversampling factor
subplot(2,1,1)
rolloff=.2;
pulse = rcosine(1,over,'sqrt',rolloff); %basic raised-cosine pulseshape
plot(pulse)
title('raised cosine Pulse rolloff=0.2');
rolloff2=0.5;
pulse1 = rcosine(1,over,'sqrt',rolloff2);
subplot(2,1,2)
plot(pulse1);
title('raised cosine Pulse rolloff=0.5');
WAVEFORM
e) Eye Diagram
%Eye Diagram
h=[1 0 0 1 1 0 1 0 1 0];
fs=10;
fd=1;
a=length(h);
delay=5;
r=0.5;
rcv=rcosflt(h,fd,fs,'fir/normal',r,delay);
f=fs/fd;
eyediagram(rcv,f);
WAVEFORM
EXPERIMENT NO 2
EXPERIMENT NO 3
Computations of the Probability of bit error for coherent binary ASK, FSK and
PSK for an AWGN Channel and Compare them with their Performance curves.
close all; clear all; clc;
% Initial Data
num_bit=100;%number of bit
data=round(rand(1,num_bit));%random bit generation (1 or 0)
SNRdB=0:10; % SNR in dB
SNR=10.^(SNRdB/10);
% Loop
for(k=1:length(SNRdB))%BER (error/bit) calculation for different SNR%
y=awgn(complex(data),SNRdB(k));
error_bask=0; error_bpsk=0; error_bfsk=0;
R=0;
M=[];
for(c=1:1:num_bit)
% BASK
if (y(c)>.5&&data(c)==0)||(y(c)<.5&&data(c)==1)%Decision logic acording to BASK
error_bask=error_bask+1;
M=[M ~data(c)];
else
M=[M data(c)];
end
% BFSK
Z(c)=real(y(c))-imag(y(c));
if ((Z(c)>0 && data(c)==0)||(Z(c)<0 && data(c)==1))%Decision logic acording to
BFSK
error_bfsk = error_bfsk+1;
M=[M ~data(c)];
else
M=[M data(c)];
end
% BPSK
if ((y(c)> 0 &&data(c)==0)||(y(c)< 0 &&data(c)==1))%Decision logic acording to
BPSK
error_bpsk=error_bpsk+1;
M=[M ~data(c)];
else
M=[M data(c)];
end
end
% Error Calculation
m_bask(k)=error_bask/num_bit; %Calculate error/bit
end
%Plots
%(BASK)
semilogy(SNRdB,m_bask,'--r','linewidth',2.5);
grid on
hold on
BER_th=(1/2)*erfc(.5*sqrt(SNR));
semilogy(SNRdB,BER_th,'r','linewidth',2.5),grid on,hold on;
title(' curve for Bit Error Rate verses SNR');
xlabel(' SNR(dB)');
ylabel('BER');
%(BFSK)
semilogy(SNRdB,m_bfsk,'-*b','linewidth',2.5);
grid on
BER_th=(1/2)*erfc(sqrt(SNR/2));
semilogy(SNRdB,BER_th,'b','linewidth',2.5),grid on,hold on;
title(' curve for Bit Error Rate verses SNR');
xlabel(' SNR(dB)');
ylabel('BER');
%(BPSK)
semilogy(SNRdB,m_bpsk,'--g','linewidth',2.5);
grid on
BER_th=(1/2)*erfc(sqrt(SNR));
semilogy(SNRdB,BER_th,'g','linewidth',2.5),grid on,hold on;
title(' curve for Bit Error Rate verses SNR');
xlabel(' SNR(dB)');
ylabel('BER');
Output Waveform
EXPERIMENT NO 4a
clc;
clear;
close all;
x=[1 0 1 0 1 0 1 0 ];
disp('input bits');
disp(x);
x1(1)=bitxor(1,x(1));
for i=2:8
x1(i)=bitxor(x1(i-1),x(i));
end
x1=[1,x1];
% disp('coded bits');
% disp(x1(2:9));
t = linspace(0,.9,900);
y = sin(2*pi*50*t);
signal=zeros(1,length(t));
for i=1:length(x1)
if x1(i)==1
signal(1,i*100-99:i*100)=1;
y1(1,i*100-99:i*100)=signal(1,i*100-99:i*100).*y(1,i*100-99:i*100);
else
signal(1,i*100-99:i*100)=-1;
y1(1,i*100-99:i*100)=signal(1,i*100-99:i*100).*y(1,i*100-99:i*100);
end
end
subplot(311);plot(t,signal),axis([0 .9 -2 2]),grid on;
xlabel('time in seconds'); ylabel('amplitude');title('coded input signal')
subplot(312);plot(t,y),axis([0 .9 -2 2]),grid on;
xlabel('time in seconds'); ylabel('amplitude');title('carrier');
subplot(313);plot(t(1:900),y1),axis([0 .9 -2 2]),grid on;
xlabel('time in seconds'); ylabel('amplitude');title('DPSK modulated wave');
% Demodulation of DPSK
for i=1:9
z1(i,:)=y1(100*(i-1)+1:100*i);
end
q1(1)=1;
for i=2:9
q1(i)=sum(z1(i,:).*z1(1,:));
if(q1(i)>0)
q(i-1)=1;
else
q(i-1)=0;
end
end
% disp('recovered bits');
% disp(q);
d1(1)=bitxor(1,q(1));
for i=2:8
d1(i)=bitxor(q(i-1),q(i));
end
disp('decoded data');
disp(d1);
WAVEFORM
EXPERIMENT NO 4b
clc;
clear all;
close all;
Tb=1;
t=0:(Tb/100):Tb;
fc=1;
c1=sqrt(2/Tb)*cos(2*pi*fc*t);
c2=sqrt(2/Tb)*sin(2*pi*fc*t)
N=8;
m=rand(1,N);
t1=0;
t2=Tb;
for i=1:2:(N-1)
t=[t1:(Tb/100):t2];
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
odd_sig(i,:)=c1.*m_s;
if m(i+1)>0.5
m(i+1)=1;
m_s=ones(1,length(t));
else
m(i+1)=0;
m_s=-1*ones(1,length(t));
end
even_sig(i,:)=c2.*m_s;
qpsk=odd_sig+even_sig;
subplot(3,2,4);
plot(t,qpsk(i,:));
title('QPSK Signal');
xlabel('t------->');
ylabel('s(t)');
grid on;
hold on;
t1=t1+(Tb+0.01);
t2=t2+(Tb+0.01);
end
hold off;
subplot(3,2,1);
stem(m);
title('Binary Data bits');
xlabel('n------>');
ylabel('b(n)');
grid on;
subplot(3,2,2);
plot(t,c1);
title('Carrier Signal-1');
xlabel('t------->');
ylabel('c1(t)');
grid on;
subplot(3,2,3);
plot(t,c2);
title('Carrier Signal-2');
xlabel('t------->');
ylabel('c2(t)');
grid on;
t1=0;
t2=Tb;
for i=1:N-1
t=[t1:(Tb/100):t2]
x1=sum(c1.*qpsk(i,:));
x2=sum(c2.*qpsk(i,:));
if (x1>0 & x2>0)
demod(i)=1;
demod(i+1)=1;
elseif (x1>0 & x2<0)
demod(i)=1;
demod(i+1)=0;
elseif (x1<0 & x2<0)
demod(i)=0;
demod(i+1)=0;
elseif (x1<0 & x2>0)
demod(i)=0;
demod(i+1)=1;
end
t1=t1+(Tb+0.01);
t2=t2+(Tb+0.01);
end
subplot(3,2,5);
stem(demod);
title('QPSK Demodulated Bits');
xlabel('n------->');
ylabel('b(n)');
grid on;
WAVEFORM