Lab Manual

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 50

EC8512

EX.NO. 1 AMPLITUDE MODULATION AND DEMODULATION

Fig.1.1Circuit Diagram for AM modulator

Fig.1.2Circuit Diagram for AM Demodulator – Envelope Detector

COMMUNICATION SYSTEMS LAB MANUAL Page 1


EC8512

EX.NO. 1 AMPLITUDE MODULATION AND DEMODULATION

AIM: -
To generate amplitude modulated wave and demodulate the AM wave using Envelope
Detector

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Transistor BC107 1
2. Diode IN4007 1
3. Function Generator 0-2MHz 2
4. DSO 100MHz 1
5. Resistor 50kΩ,15kΩ,10kΩ, Each 1
4.7k Ω, 1k Ω Each 1
6. Capacitor 470pF,100nF, Each 1
0.1mF
7. Probe 2
8. Bread Board 1
9. Regulated Power Supply 0-30v 1

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 demodulation circuit is used to recover the message signal from the incoming AM
wave at the receiver. An envelope detector is a simple and yet highly effective device that is well
suited for the demodulation of AM wave, for which the percentage modulation is less than
100%.Ideally, an envelope detector produces an output signal that follows the envelop of the input
signal wave form exactly; hence, the name.

PROCEDURE: -

1. Connect the circuit as per the diagram.


2. A modulating signal is given as input to the circuit.
3. Now increase the amplitude of the modulating signal to the required level.
4. The amplitude and the time duration of the modulating signal are observed using CRO.

COMMUNICATION SYSTEMS LAB MANUAL Page 2


EC8512

Message Signal

Carrier Signal

Amplitude Modulated wave

Demodulated wave

Fig.1.3 Model Graph

Tabular Column:

Sl.No Signal Amplitude Time Period


1 Message signal
2 Carrier signal
3 AM wave Vmax Vmin
4 Demodulated wave

COMMUNICATION SYSTEMS LAB MANUAL Page 3


EC8512

5. Finally the amplitude modulated output is observed from the output of amplitude
modulator stage and the amplitude and time duration of the AM wave are noted down.
6. Calculate the modulation index by using the formula and verify them. The final
demodulated signal is viewed using an CRO at the output. Also the amplitude and time
duration of the demodulated wave are noted down.

Calculation:

Modulation Index:
The modulation index m is calculated that indicates by how much the modulated variable varies
around its unmodulated level. It relates to the variations in the amplitude of the carrier signal.

The value of m is within the range of 1.

RESULT: -
Thus the amplitude modulated wave was generated and the modulation index is
verified. Also, the modulated wave is demodulated by passing through the envelope detector
circuit.

Modulation Index value:

COMMUNICATION SYSTEMS LAB MANUAL Page 4


EC8512

EX.NO. 2 FREQUENCY MODULATION

Fig.2.1Circuit Diagram

Fig.2.1Pin Diagram

COMMUNICATION SYSTEMS LAB MANUAL Page 5


EC8512

EX.NO. 2 FREQUENCY MODULATION

AIM: -
To construct a frequency modulation circuit using a sinusoidal input waveform and to
measure the Modulation Index.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. NE 566 1
2. Function Generator 0-2MHz 1
3. DSO 100MHz 1
4. Resistor 2.5kΩ, 5.6kΩ, Each 1
39kΩ
5. Capacitor 0.01μF 2
6. Probe 1
7. Bread Board 1
8. Regulated Power Supply + or - 12v 1

THEORY:
Frequency modulation (FM) is a method of impressing data onto an alternating-current
(AC) wave by varying the instantaneous frequency of the wave.

The NE/SE566 Function Generator is a general purpose voltage-controlled oscillator designed for
highly linear frequency modulation. The circuit provides simultaneous square wave and triangle
wave outputs at frequencies up to 1MHz. A typical connection diagram is shown in Figure 2.1 The
control terminal (Pin 5) must be biased externally with a voltage (Vc) in the range

Where VCC is the total supply voltage. In Figure 2, the control voltage is set by the voltage divider
formed with R2 and R3. The modulating signal is then AC coupled with the capacitor C2. The
modulating signal can be direct coupled as well, if the appropriate DC bias voltage is applied to
the control terminal. The frequency is given approximately by

and R1 should be in the range 2k< R1<20k. A small capacitor (typically 0.001uF) should be
connected between Pins 5 and 6 to eliminate possible oscillation in the control current source. The
value of C1 is 1nF.

COMMUNICATION SYSTEMS LAB MANUAL Page 6


EC8512

Fig.2.2 Model Graph

Tabular Column:-

Sl.No Signal Amplitude(V) Time Period(ms)


1 Message signal
2 Carrier signal
3 FM signal

COMMUNICATION SYSTEMS LAB MANUAL Page 7


EC8512

PROCEDURE: -

1. The circuit was connected as shown in the circuit diagram.


2. The free running frequency fo is measured at pin 3.
3. The modulating input is given to pin 5 through a coupling capacitor and the
corresponding changes in digital storage oscilloscope is noted.
4. For various amplitudes and the modulating signal, corresponding DSO readings were
noted.
5. Frequency deviation and modulation index were calculated.
6. Frequency modulated output was drawn on a graph sheet.

Calculation:

The Frequency modulation experiment demonstrates some of the principles of VCO operation
using the NE566 integrated circuit by implementing a Frequency Modulation Circuit.

Modulation Index: (𝛽)


The modulation index h is calculated that indicates by how much the modulated variable
varies around its unmodulated level. It relates to the variations in the frequency of the carrier signal.
∆𝒇
𝜷=
𝒇𝒎

Bandwidth:
𝑩𝑾 = 𝟐 ∗ (∆𝒇 + 𝒇𝒎 )

RESULT: -
Thus the FM modulation wave were generated and the obtained
Modulation index :
Bandwidth :

EX. NO. 3 TIME DIVISION MULTIPLEXING


COMMUNICATION SYSTEMS LAB MANUAL Page 8
EC8512

Fig.3.1Circuit Diagram

Fig.3.2 Model Graph

EX. NO. 3 TIME DIVISION MULTIPLEXING

COMMUNICATION SYSTEMS LAB MANUAL Page 9


EC8512

AIM: -
To study the process of time division multiplexing and to perform multiplex of two
set of signals.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quatity


1. CL 100 NPN 1
2. CK 100 PNP 1
3. Function Generator 0-2MHz 2
4. DSO 100MHz 1
5. Resistor 33k Ω 1
6. Probe 2
7. Bread Board 1
8. Regulated Power Supply 0-30v 1

THEORY:
The Sampling Theorem provides the basis for transmitting the information contained in a
band limited message signal m (t) as a sequence of samples of m(t) taken uniformly at a rate that
is usually slighter higher than the nyquist rate. An important feature of the sampling process is a
conservation of time. That is, the transmission the message samples engages the communication
channel s for only a fraction of the sampling interval on a periodic basis, and in this way some of
the time interval between adjacent samples is cleared for use by other independent message sources
on a time shared basis. We there by obtain a time division multiplexing (TDM) system, which
enables the joint utilization of a common communication channel by a plurality of independent
message sources without mutual interference among them.

The TDM system is highly sensitive to dispersion in the common channel, that is, to variations
of amplitude with frequency or lack of proportionality of phase with frequency. Accordingly,
accurate equalization of both magnitude and phase response of a channel is necessary to ensure a
satisfactory operation of the system. Unlike FDM, TDM is immune to nonlinearities in the

COMMUNICATION SYSTEMS LAB MANUAL Page 10


EC8512

Fig.3.3 Timing Diagram

Tabular Column:-

Sl.No Signal Amplitude Time Period


1. Message signal 1
2. Message signal 2
3. Clock Signal

channel as a source of cross talk. The reason for this is, the different message signals are not

COMMUNICATION SYSTEMS LAB MANUAL Page 11


EC8512

simultaneously applied to the channel. The primary advantage of TDM is that several channels of
information can be transmitted simultaneously over a single cable.

PROCEDURE: -
1. Connect the circuit as per the diagram
2. Give two different amplitudes inputs from function generated to the emitters of both the
transistors
3. Connect the common clock signal to the back of both the transistors and observed in the
CRO, we can see the wave form.
4. The output is taken from the collector of both the transistors and the waveform is plotted
in graph.
5. Their positions and identification can be highlighted by reducing the other signal
amplitudes to zero and then gradually increasing them to observe them occupying their
positions.

RESULT: -
Thus, the two different signals are interleaved in their respective time slots without
overlapping each other using a single channel.
EX. NO. 4 SIGNAL SAMPLING AND RECONSTRUCTION

COMMUNICATION SYSTEMS LAB MANUAL Page 12


EC8512

Fig.4.1Circuit Diagram

RECONSTRUCTION FILTER

EX. NO. 4 SIGNAL SAMPLING AND RECONSTRUCTION

COMMUNICATION SYSTEMS LAB MANUAL Page 13


EC8512

AIM: -
To analyze an implementation of a sample and hold (S/H) circuit..

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quatity


1. IC 741 1
2. Function Generator 0-2MHz 3
3. DSO 100MHz 1
4. Resistor 33k Ω 1
5. Probe 2
6. Bread Board 1
7. Regulated Power Supply 0-30v 1

THEORY:
The analog signal can be converted to a discrete time signal by a process called sampling.
The sampling theorem for a band limited signal of finite energy can be stated as,
‘’A band limited signal of finite energy, which has no frequency component higher than W
Hz is completely described by specifying the values of the signal at instants of time separated by
1/2W seconds.’’

It can be recovered from the knowledge of samples taken at the rate of 2W per second.
In the Circuit, the switching rate is controlled by a clock signal whose frequency should satisfy the
Nyquist sampling criterion. The switch is a FET whose gate is controlled by the clock pulse.
Buffers are placed at the input and output to isolate the circuit.

When the switch S is closed, the capacitor C is charged to the value of the input voltage,
the sample stage. Afterwards the switch is opened and the capacitor retains its charge, the hold
stage. Signal is reconstructed after passing the sampled signal into the low pass filter.

COMMUNICATION SYSTEMS LAB MANUAL Page 14


EC8512

Fig.4.2 Model Graph

Tabular Column:-

Sl.No Signal Amplitude Time Period


1. Message signal
2. Clock Signal
3. Sampled
4. Reconstructed Signal

COMMUNICATION SYSTEMS LAB MANUAL Page 15


EC8512

PROCEDURE: -

1. Connect the circuit as per the diagram.


2. Give the continuous time message signal from the functional generator.
3. Connect the clock signal to the Gate of FET and observe the sampled signal in the CRO.
Analyze by varying the clock signal frequency.
4. The sampled waveform can be reconstructed by passing it through an low pass filter.

RESULT: -
Thus the continuous-time signals are sampled and then signals are reconstructed from the samples
at the receiver side.

EX.NO.5 PULSE CODE MODULATION

COMMUNICATION SYSTEMS LAB MANUAL Page 16


EC8512

Fig 5: Block Diagram

Formula:

Symbol error rate = No. of symbols in error after detection / No. of symbols transmitted

Theoretical SNR (dB) = 6n+1.72

EX.NO.5 PULSE CODE MODULATION

COMMUNICATION SYSTEMS LAB MANUAL Page 17


EC8512

AIM:
To study the SNR performance of Pulse Code Modulation (PCM)

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY

Pulse code modulation (PCM) is a digital scheme for transmitting analog data. The
signals in PCM are binary; that is, there are only two possible states, represented by logic 1
(high) and logic0 (low). Using PCM, it is possible to digitize all forms of analog data, including
full-motion video, voices, music, telemetry, and virtual reality. To obtain PCM from an analog
waveform at the source of a communications circuit, the analog signal amplitude is sampled at
regular time intervals. The sampling rate, or number of samples per second, is several times
the maximum frequency of the analog waveform in cycles per second or hertz. The
instantaneous amplitude of the analog signal at each sampling is rounded off to the nearest of
several specific, predetermined levels. This process is called quantization. The number at each
level can be represented by three, four, five, or six binary digits (bits) respectively. The output
of a pulse code modulator is thus a series of binary numbers, each represented by some power
of 2bits.

At the destination of the communications circuit, a pulse code demodulator converts the
binary numbers back into pulses having the same quantum levels as those in the modulator.
These pulses are further processed to restore the original analog waveform.

PROGRAM:

COMMUNICATION SYSTEMS LAB MANUAL Page 18


EC8512

clc; clear all; close all;

OSR=1024; % Over samping rate


Am=2;
fm=1000; %Input signal frequency
fs=OSR*2*fm; %Sampling frequency

n=0:2*fs/fm; % define the sample numbers


x=Am*cos(2*pi*fm*n/fs); %generation of the sinusoidal signal

MM=[2,4,8,16,32,64,128,256]; %Number of levels in the quantisation


Mlen=length(MM);

for ii=1:Mlen
M=MM(ii)
nbit(ii)=ceil(log(M)/log(2)); % number of bits used for quantisation

delta=2*Am/(M-1) % step size


qv=[-Am:delta:Am]; % quantisation values
y=round((x+Am)/delta)*delta-Am; %quantised value

bn=[-Am+delta/2:delta:Am-delta/2]; % boundary values

t=n/fs;
figure;
plot(t,x,'r-'); %ploting analog signal
title('Input and Sampled signals'); xlabel('time in seconds'); ylabel('amplitude');
axis([t(1), t(end), -1.1*Am, 1.1*Am])
hold on;
stairs(t,y,'b-') % ploting staircase signal- sampled signal
legend('Original Signal ','PCM wave')

qe=x-y;
snr(ii)=10*log10((x*x')/(qe*qe'));
end

Nbits=0:log10(max(MM))/log10(2)
snr_ideal=6*Nbits+1.72
figure;
plot(nbit, snr,'b',Nbits, snr_ideal,'r');
legend('Measured','Theoritical ')
title('SNR Vs No. of bits used for quantisation');
xlabel('No. of bits'); ylabel('SNR in dB');

COMMUNICATION SYSTEMS LAB MANUAL Page 19


EC8512

ALGORITHM:

1. Generate a sinusoidal wave with higher sampling rate and estimate the signal power
2. Identify the quantization values and their boundaries of quantization levels with
respect to number of levels
3. Using above, quantise the samples of the sinusoidal wave
4. Find the error between quantised signal and the original signal
5. Find error power and calculate the SNR for the respective number of output levels
6. Change the number of levels and repeat the steps 2-5.
7. Estimate theoretical SNR
8. Plot SNR vs number of bits and compare the results

Observation:
No. of bits:
SNR:

RESULT:

Thus SNR performance of Pulse Code Modulation (PCM) was studied using Matlab
software.
EX.NO.6 DELTA MODULATION AND DEMODULATION

COMMUNICATION SYSTEMS LAB MANUAL Page 20


EC8512

Fig.6.1 BLOCK DIAGRAM

Fig.6.2 MODEL GRAPH

EX.NO.6 DELTA MODULATION AND DEMODULATION

COMMUNICATION SYSTEMS LAB MANUAL Page 21


EC8512

AIM:
To design and simulate the delta modulation and demodulation process using Matlab
software.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY

A 1-bit DPCM coder is known as a delta modulator (DM). In other words, DM codes the
differences in the signal amplitude instead of the signal amplitude itself. Yet another name for DM
is pulse width modulation. A delta-modulation encoder is shown in Figure 1; it is known as a single
integration modulator.

The input signal is compared to the integrated output pulses and the delta (difference)
signal is applied to the quantizer. The quantizer generates a positive pulse when the difference
signal is negative, and a negative pulse when the difference signal is positive. This difference
signal moves the integrator step by step closer to the present value input, tracking the derivative
of the input signal.

A delta modulation decoder has to integrate the modulated signal and low pass filter the
output of the integrator as shown in figure 6.1

PROGRAM:

COMMUNICATION SYSTEMS LAB MANUAL Page 22


EC8512

clc; clear all; close all;


% Message Signal
a=2;
t=0.2*pi/50:0.1:2*pi;
x=a*sin(t);
L=length(x);
subplot(4,1,1); plot(x,'r'); axis([0 L -3 3]);
grid on;
legend('Message signal');
title('Message Signal');

% Delta Modulation
delta=0.2;
xn=0;
for i=1:L
if x(i)>xn(i)
d(i)=1;
xn(i+1)=xn(i)+delta;
else
d(i)=0;
xn(i+1)=xn(i)-delta;
end
end
subplot(4,1,2); plot(x,'r'); axis([0 L -3 3]);
hold on; stairs(xn);
grid on;
legend('Message signal','Stair case approximated signal');

% Delta DeModulation
yn=0;
for i=1:length(d)
if d(i)==0
yn(i+1)=yn(i)-delta;
else
yn(i+1)=yn(i)+delta;
end
end
subplot(4,1,3); stairs(d,'black'); axis([0 L -3 3]); grid on;
legend('Delta Modulation');
title('Delta Modulation');
subplot(4,1,4); plot(yn,'b'); axis([0 L -3 3]); grid on;
legend('Demodulation Signal');
title('Delta Demodulation');

ALGORITHM:

COMMUNICATION SYSTEMS LAB MANUAL Page 23


EC8512

RESULT:
Thus, the Delta modulation and demodulation process was simulated and executed.

EX.NO.7 LINE CODING SCHEMES

COMMUNICATION SYSTEMS LAB MANUAL Page 24


EC8512

Program:

binarysize=input(' Enter no of bits required to transmit :');


sample=50;
binary=randint(1,binarysize,2);

%% Message
output=[];

for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample)];
else
output=[output zeros(1,sample)];
end
end
subplot(3,3,1)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' Message');

%% NRZ Unipolar
output=[];

for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample)];
else
output=[output zeros(1,sample)];
end
end
subplot(3,3,2)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' NRZ Unipolar');

%% NRZ polar
output=[];
for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample)];
else
output=[output -1*ones(1,sample)];
end
end

EX.NO.7 LINE CODING SCHEMES

COMMUNICATION SYSTEMS LAB MANUAL Page 25


EC8512

AIM:
To write a MATLAB program to study the different types of line encoding schemes.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY:

UNIPOLAR:
In unipolar format (also known as on-off signaling), symbol 1 is represented by a transmitting
pulse, whereas symbol 0 is represented by switching off the pulse. When the pulse occupies the
full duration of a symbol, the unipolar format is said to be of the nonreturn-to-zero (NRZ) type.
When it occupies a fraction (usually one-half) of the symbol duration, it is said to be return-to-zero
(RZ) type.

POLAR:
In polar format, a positive pulse is transmitted for symbol 1, and a negative pulse for symbol 0.
Unlike unipolar waveform, a polar waveform has no DC component, provided that the 0s and 1s
in the input data occur in equal proportion.

BIPOLAR:
In bipolar format (also known as pseudoternary signaling), positive and negative pulses are used
alternately for the transmission of 1s, and no pulses for the transmission of 0s.

MANCHESTER:
In Manchester format (also known as bi phase baseband signaling), symbol 1 is represented by
transmitting a positive pulse for one-half of the symbol duration, followed by a negative pulse

subplot(3,3,3)

COMMUNICATION SYSTEMS LAB MANUAL Page 26


EC8512
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' NRZ polar');

%% NRZ Bipolar
output=[];
temp=1;
for i=1:1:binarysize
if binary(i) == 1
output=[output temp*ones(1,sample)];
temp=-1*temp;
else
output=[output zeros(1,sample)];
end
end
subplot(3,3,4)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' NRZ Bipolar');

%% RZ Unipolar
output=[];

for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample/2) zeros(1,sample/2)];
else
output=[output zeros(1,sample)];
end
end
subplot(3,3,5)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' RZ Unipolar');

%% RZ polar
output=[];

for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample/2) zeros(1,sample/2)];
else
output=[output -1*ones(1,sample/2) zeros(1,sample/2)];
end
end
subplot(3,3,6)

COMMUNICATION SYSTEMS LAB MANUAL Page 27


EC8512

for the remaining half of the symbol duration; for symbol 0, these two pulses are transmitted in
reverse order. It has no DC component.

Figure: Line Coding

COMMUNICATION SYSTEMS LAB MANUAL Page 28


EC8512
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' RZ polar');

%% RZ Bipolar
output=[];
temp=1;
for i=1:1:binarysize
if binary(i) == 1
output=[output temp*ones(1,sample/2) zeros(1,sample/2)];
temp=-1*temp;
else
output=[output zeros(1,sample)];
end
end
subplot(3,3,7)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' RZ Bipolar');

%% Manchester
output=[];
for i=1:1:binarysize
if binary(i) == 1
output=[output ones(1,sample/2) -1*ones(1,sample/2)];
else
output=[output -1*ones(1,sample/2) ones(1,sample/2)];
end
end
subplot(3,3,8)
plot(output);
axis([0 binarysize*sample -2 2]);
grid on;
xlabel(' samples');
ylabel('amplitude');
title(' Manchester');

COMMUNICATION SYSTEMS LAB MANUAL Page 29


EC8512

RESULT
Thus, the MATLAB program for different types of line encoding process is written and
executed.

COMMUNICATION SYSTEMS LAB MANUAL Page 30


EC8512

EX.NO.8 FSK, PSK AND DPSK SCHEMES

Figure 8.1 Digital Modulation Model Graph

COMMUNICATION SYSTEMS LAB MANUAL Page 31


EC8512

EX.NO.8 FSK, PSK AND DPSK SCHEMES

AIM:
To design the digital modulations techniques and simulate it using simulink.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY
BPSK is a method for modulating a binary signal onto a complex waveform by shifting the
phase of the complex signal. In digital baseband BPSK, the symbols 0 and 1 are modulated to the
complex numbers exp(jt) and -exp(jt), respectively, where t is a fixed angle.

Frequency-shift keying (FSK) is a standard modulation technique in which a digital signal


is modulated onto a sinusoidal carrier whose frequency shifts between different values.

Differential Phase Shift Keying or DPSK modulation signal records changes in a binary
stream. Changes in bits will result in a π phase shift. Phase-shift keyed signals cannot be detected
incoherently as they use coherent detection. A coherent detector has two inputs for which one is a
reference signal and the other is the modulated signal to be demodulated. However in this case a
partially coherent detection is used here where a one-bit delay is use.

COMMUNICATION SYSTEMS LAB MANUAL Page 32


EC8512

COMMUNICATION SYSTEMS LAB MANUAL Page 33


EC8512

Formula:
Generation: 𝑠(𝑡) = 𝑠𝑖1 𝜑1 (𝑡)
1, 𝑏𝑖 = 1
𝑠𝑖1 = {
−1, 𝑏𝑖 = 0

2𝐸
𝜑1 (𝑡), = √ 𝑇 𝑏 cos(2𝜋𝑓𝑐 𝑡) , 0 ≤ 𝑡 < 𝑇𝑏 ,
𝑏

Detection:
𝑇
𝑥𝑖 = ∫0 𝑏 𝑠(𝑡) 𝜑1 (𝑡)𝑑𝑡,

1, 𝑥 ≥ 0
𝑏̂ = { 𝑖
0, 𝑥𝑖 < 0

Algorithm: ( BPSK Signal)


Generation:
1. Generate binary random number over a desired length (minimum of 10);
2. Select bit rate and generate polar NRZ wave for random bit sequence
a. Generate a impulse train with period equal to bit period
b. Replace the impulse polarity in accordance with si1.
c. Generate a pulse with a length equal to bit period
d. Convolve the pulse with the impulse train that will yield NRZ wave
3. Select bit energy and generate the carrier signal 𝜑1 (𝑡).
4. Multiply the polar NRZ wave with the carrier signal to obtain the BPSK signal si(t)
Detection
5. Multiply the si(t) with the local copy of 𝜑1 (𝑡) and integrate over one bit period.
6. Sample the sum at end each bit period and obtain xi1.
7. Detect the transmitted bits as “1” if xi is greater than zero and as “0” ” if xi is lesser than zero.

COMMUNICATION SYSTEMS LAB MANUAL Page 34


EC8512

COMMUNICATION SYSTEMS LAB MANUAL Page 35


EC8512

Formula:
Generation: 𝑠(𝑡) = 𝑠𝑖1 𝜑1 (𝑡) + 𝑠𝑖2 𝜑2 (𝑡)
1
𝑠𝑖1 [ ], 𝑏𝑖 = 1
[𝑠 ] = { 0
𝑖2 0
[ ], 𝑏𝑖 = 0
1

2𝐸
𝜑1 (𝑡), = √ 𝑇 𝑏 cos(2𝜋𝑓𝑐1 𝑡) , 0 ≤ 𝑡 < 𝑇𝑏 ,
𝑏

2𝐸
𝜑2 (𝑡), = √ 𝑇 𝑏 cos(2𝜋𝑓𝑐2 𝑡) , 0 ≤ 𝑡 < 𝑇𝑏 ,
𝑏
Detection:
𝑇
𝑥𝑖1 = ∫0 𝑏 𝑠(𝑡) 𝜑1 (𝑡)𝑑𝑡,

𝑇
𝑥𝑖2 = ∫0 𝑏 𝑠(𝑡) 𝜑2 (𝑡)𝑑𝑡,
𝑙 = 𝑥𝑖1 − 𝑥𝑖2

1, 𝑙 ≥ 0
𝑏̂ = {
0, 𝑙 < 0

Algorithm: (BFSK Signal)


Generation:
1. Generate binary random number over a desired length (minimum of 10);
2. Select bit rate and generate unipolar NRZ wave for random bit sequence
a. Generate a impulse train with period equal to bit period
b. Replace the impulse polarity in accordance with bi.
c. Generate a pulse with a length equal to bit period
d. Convolve the pulse with the impulse train that will yield unipolar NRZ wave
3. Select bit energy and generate the carrier signal 𝜑1 (𝑡).
4. Generate the inverted output for the unipolar NRZ wave by using NOT.
5. Multiply the unipolar NRZ wave with the carrier signal 𝜑1 (𝑡) and multiply the inverted
unipolar NRZ wave with the carrier signal 𝜑2 (𝑡). Add the two streams to obtain the BfSK
signal si(t)
Detection
6. Multiply the si(t) with the local copy of 𝜑1 (𝑡) and integrate over one bit period.
7. Sample the sum at end each bit period and obtain xi1.
8. Again multiply the si(t) with the local copy of 𝜑2 (𝑡) and integrate over one bit period.
9. Sample the sum at end each bit period and obtain xi2.
10. Subtract xi2 from xi1 to get l.
11. Detect the transmitted bits as “1” if l is greater than zero and as “0” ” if l is lesser than zero.

RESULT
Thus, the different digital modulation techniques- BFSK,BPSK and DPSK was designed
and simulated.

COMMUNICATION SYSTEMS LAB MANUAL Page 36


EC8512

EX.NO.9 ERROR CONTROL SCHEMES

Formula:

Bit error rate = No. of bits in error after detection / No. of bits transmitted

Program:

clc; clear all; close all;

n=7; k=4;
blk_nos=20000;
Nbits=blk_nos*k; % Number of bits in simulation

snrdB=[0:10];

P= [ 1 1 0 ; % Parity Matrix
0 1 1 ;
1 1 1 ;
1 0 1];
In= eye(4); % Identity Matrix
Ink=eye(3);
G=[P,In]; % Generator Matrix
H=[Ink, P']; % Parity Check Matrix
errpat=[ 0 0 0 0 0 0 0 ;
1 0 0 0 0 0 0 ;
0 1 0 0 0 0 0 ;
0 0 1 0 0 0 0 ;
0 0 0 1 0 0 0 ;
0 0 0 0 1 0 0 ;
0 0 0 0 0 1 0 ;
0 0 0 0 0 0 1 ];
syndrom=errpat*H';

bs=randint(1, Nbits, 2); % message bit generation


m=reshape(bs, k,[] )'; % Blocking of bits into 4 bits in each block

x=mod( m*G, 2); % Generating Codeword


ct=reshape(x', 1,[]); % Transmitted bit sequence
ctx=ct;
ctx(ct==0)=-1;

COMMUNICATION SYSTEMS LAB MANUAL Page 37


EC8512

EX.NO.9 ERROR CONTROL SCHEMES

AIM:
To study the BER performance of Linear Block Code using matlab software

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

Theory:

The input to the encoder is binary information sequence at a rate R bits/sec. There are
mainly two types of channel encoding techniques namely Block coding and Convolutional coding.
In block coding, a block of k information bits is encoded into a block of n bits known as codeword
(n>k). So for k bits there could be total 2k possible code words. The code rate defined as the ratio
Rc= k/n is a measure of amount of redundancy introduced by block coding.

In convolution coding each k bit information symbol to be encoded and transformed into
n bit called as codeword such that n>k and transformation is a function of the last L information
symbols where L is the constraint length of the code. The codeword can be generated using finite
state shift register approach. Thus code rate Rc would be same as that of block codes. Hence a
good code is the one that ensure a certain error correcting capability at minimum Rc or maximum
output encoder rate R/Rc.

COMMUNICATION SYSTEMS LAB MANUAL Page 38


EC8512

for ii=1:length(snrdB)
snr(ii)=10^(snrdB(ii)/10)
r=awgn(ctx, snr(ii), 'measured');
cr=r;
cr(r>=0)=1;
cr(r<=0)=0;
y=reshape(cr', n, [])';
s=mod( y*H', 2);
e0=[];
for jj=1:blk_nos
for kk=1:2^(n-k)
if(syndrom(kk,:)==s(jj,:))
ro_match=kk;
break;
end
end
e0=[e0; errpat(ro_match,:)];
end
xcat=mod( y+e0, 2);
mcat=xcat(:, n-k+1:end);
bcat=reshape(mcat', 1,[]);
BER_wo_EC(ii)=length(find(ct~=cr))/length(ct)
BER_with_EC(ii)=length(find(x~=xcat))/length(ct)
end
semilogy(snr, BER_with_EC, 'r*-', snr, BER_wo_EC, 'b-+')
legend('BER_with_EC', 'BER_wo_EC,');
xlabel('SNR (dB)'); ylabel('BER'); title('BER Performance of Linear Block
Code');

Fig 9: BER Performance of Linear Block Code

COMMUNICATION SYSTEMS LAB MANUAL Page 39


EC8512

Algorithm:

1. Generate binary random bits to the desired length


2. Convert them into block of 7 bits to form it as message block
3. Generate generator matrix
4. Multiply the message block with generator matrix and get codeword blocks
5. Convert back codeword blocks into bit stream.
6. Generate noise to yield the required SNR with respect to the energy in the codeword bit
stream.
7. Decode the codeword without error detection and correction. Compare the decoded bits
with transmitted and calculate BER without error control
8. Convert the codeword bit stream into blocks again. Apply parity check matrix to calculate
syndrome
9. Identify the respective error pattern and add with codeword to generate error corrected
codeword
10. Separate message words and get the output message bit stream. Compare this input
message bit stream and calculate BER with error control
11. Repeat the steps 6-10 for different SNR and plot BER Vs SNR curve with and without
error control coding

Observation:
Number of blocks on simulation :
Number of bits used:
Message word length =
Codeword length =
Generator Matrix=

Parity Check Matrix =

SNR:
BER (w/o EC):
BER (with EC):

RESULT
Thus, the BER performance of Linear Block Code using matlab software was performed
and coding gain obtained for 10−4 BER is

COMMUNICATION SYSTEMS LAB MANUAL Page 40


EC8512

EX.NO.10 SPREAD SPECTRUM COMMUNICATION

Figure 10.1: Direct Sequence Spread Spectrum

Figure 10.2: Spread Spectrum

COMMUNICATION SYSTEMS LAB MANUAL Page 41


EC8512

EX.NO.10 SPREAD SPECTRUM COMMUNICATION

AIM:
To design and simulate the operation of equivalent base-band binary phase shift keying
(BPSK) direct sequence spread spectrum (DS/SS) system.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY
A system may be required to provide a form of secure communication in a hostile
environment such that the transmitted signal is not easily detected or recognized by unwanted
listeners. This requirement is fulfilled by a signaling technique called “Spread-Spectrum
modulation”.

The definition of spread spectrum may be stated in two parts:


1. Spread Spectrum is a means of transmission in which the data of interest occupies a
bandwidth in excess of the minimum bandwidth necessary to send the data.

2. The spectrum spreading is accomplished before transmission through the use of a code that
is independent of the data sequence. The same code is used in the receiver to de-spread the
received signal so that the original data may be recovered.

In a direct sequence spread spectrum technique, two stages of modulation are used. First, the
incoming data sequence is used to modulate a wideband code. This code transforms the
narrowband data sequence into a noise-like wideband signal. The resulting wideband signal
undergoes a second modulation using a phase shift keying technique.

COMMUNICATION SYSTEMS LAB MANUAL Page 42


EC8512

COMMUNICATION SYSTEMS LAB MANUAL Page 43


EC8512

Figure 10.3: Direct Sequence Spread Spectrum (Simulink)

RESULT

COMMUNICATION SYSTEMS LAB MANUAL Page 44


EC8512

Thus the equivalent base-band binary phase shift keying (BPSK) direct sequence spread
spectrum (DS/SS) system is designed and simulate.

EX.NO.11 EQUALIZATION – LMS ALGORITHMS

COMMUNICATION SYSTEMS LAB MANUAL Page 45


EC8512

EX.NO.11 EQUALIZATION – LMS ALGORITHMS

AIM:
To design and simulate the operation of equivalent base-band binary phase shift keying
(BPSK) direct sequence spread spectrum (DS/SS) system.

APPARATUS REQUIRED: -

Sl. No Name of the Apparatus Range Quantity


1. Desktop Computer 1
2. Matlab software 1

THEORY

Adaptive equalization is the technique used to reliably transmit data through a


communication channel. Ideally, if the channel is ideal (without and channel distortion and
additive noise), we can demodulate the signal perfectly at the output without causing any error.
However, in practice, all the channels are non-ideal and noisy in nature. So, to recover the original
signal after demodulation, an equalization filter that minimizes the error between original
transmitted signal and demodulated is used.

Several algorithms like Least Mean Square (LMS), Recursive Least Mean Square (RLMS),
Normalized Least Mean Square (NLMS) etc., has been proposed to perform this operation of
equalization.

COMMUNICATION SYSTEMS LAB MANUAL Page 46


EC8512

PROGRAM

LMS ALGORITHM
clc;
clear all;
close all;
d=[ 0 1 0 1 1 ];
t=linspace(0,10,1000);
n=length(t);
b=2*d-1; % Convert unipolar to bipolar
Nsb=n/length(d)% Number of samples per bit
bb=repmat(b',1,Nsb)% replicate each bit Nsb times
bw=bb'; % Transpose the rows and columns
bw=bw(:)' ; % Data sequence samples
x=bw+randn[‘,length(d)*0.01];%adding noise
w=zeros(1,n)
mu=0.2;
for i=1:n
e(i)=bw(i)-w(i)*x(i);
w(i+1)=w(i)+(mu*e(i)*x(i));
end
for i=1:n
y(i)=w(i).*bw(i);
end
subplot(2,2,1),plot(bw);
ylabel('original signal');
subplot(2,2,2),plot(x);
ylabel('signal added with noise');
subplot(2,2,3),plot(e);
ylabel('error');
subplot(2,2,4),plot(y);
ylabel('adaptive equalizer output');

COMMUNICATION SYSTEMS LAB MANUAL Page 47


EC8512

RESULT

COMMUNICATION SYSTEMS LAB MANUAL Page 48


EC8512

Thus the distortion introduced by the channel on the transmitted signal on the received
samples are mitigated using LMS algorithm.

Rough Work

COMMUNICATION SYSTEMS LAB MANUAL Page 49


EC8512

Rough Work

COMMUNICATION SYSTEMS LAB MANUAL Page 50

You might also like