Dcs Lab Manual
Dcs Lab Manual
AND COMMUNICATION
ENGINEERING
DIGITAL COMMUNICATION
LABORATORY MANUAL (08L710)
AIM:
To study the concept of scramblers and descramblers and
implement them using hardware and software tool.
SOFTWARE USED:
A system loaded with MATLAB.
THEORY:
SCRAMBLER:
In general a scrambler tends to make more random by removing
long strings of 0s and 1.Scrambling can be thought of helpful tool in
timing extraction by removing long strings of 0s in binary tool. This is
mainly used to prevent unauthorized access to data and is optimized
for that purpose.
Scramblers consist of a feedback shift register and the matching
descrambler has a feed- forward register. Each stage stores a bit and
delays it by one unit .Consider a sequence T to the scrambler then
S^
T^
T=T
T is delayed by n units
^ D
^ D
)T
)]T
to both sides of
S = [1^ F]T
where F= D
D
^ D 5
DESCRAMBLER:
To design descrambler at receiver we start with T, sequence
received at the scrambler from equation it follows that
S = [1^ F]T
3
5
S = T^( D ^ D )T
This is the equation where we generate the input sequences from the
received sequence T is readily implemented by descrambler. A single
detection error in reeived sequence T will affect the output bits in R
.Hence scrambling has disadvantages of causing multiple error for
single received bit error.
CIRCUIT DIAGRAM
Q1
Q2
Q3
Q4
Q5
Q3
Q4
Q5
Q1
PROCEDURE:
Q2
The circuit connections are given as shown in the figure 1.1 for
scrambler.
The flip-flop outputs are cleared by by setting FF (CLR).
Then for a given sequence of inputs the states of the flip-flop are
checked in accordance with the table and the output is verified.
The same procedure is repeated in implementation of
descrambler.
RESULT:
Thus scramblers and descramblers are studied and implemented
using hardware and software.
AIM:
To design and implement linear block codes and decode using
hardware and software.
COMPONENT:
IC 74LS138
IC 7404
IC 7486
Bread board
Trainer kit
Power supply
Wires
THEORY
CODER
d=(d1,d2,d3,dn)
For a general class of LBC, all the n digits of codeword are formed by
linear combination of data word.
A special call where the first k digits of the code word is same as the
data and the rest k-n digits are linear combination of the data word ie.,
called systematic code. The last k-n digits are parity erect digits.
The k*n matrix is called as the generator. It has identity parity check
matrix. All the elements are either 0 or 1.the codeword can be
expressed as
e=dG
Thus knowing the data we can calculate the check digits.
FIGURE 2.1 ENCODER CIRCUIT
d1
d2
d3
c1
c2
c3
c4
c5
c6
DECODING
From the coding equations Im is the identity matrix of order m. Let the
received word be R. due to channel noise it differs from C. The
hamming distance between R and C is the number of ones in e. But
because of possible channel errors RTH is usually a non zero value
indicating the occurrence of error. The non zero vector is called
syndrome defined as
S=RTH
The detector uses s to detect and correct errors.
RECIEVED BITS
SYNDROME
r1
r2
r3
r4
r5
r6
s1
s2
s3
RESULT
Thus linear block coder and decoder is implemented using software.
AIM
To design and implement cyclic coder and decoder using hardware and
software tool.
APPARATUS REQUIRED
IC 7486
IC 7474
IC7408
IC 7432
bread board, trainer kit, wires.
THEORY
A code c is cyclic code if
1. c is a linear code.
2. cyclic property is satisfied.
In a systematic code the first k digits are data and the last n-k digits
are check bits. The codeword c(x) is corresponding to the daya
polynomial d(x) is given by
C(x)=xn-k d(x)+p(x).
Where p(x) is the remainder by dividing xn-k d(x) by g(x).
d1
d2
d3
c1
c2
c3
c4
c5
c6
DECODER
Every valid code polynomial is a multiple of p(x).if an error during
transmission, the received polynomial r(x) will be a multiple of g(x).
FIGURE 3.2 CYCLIC DECODER
e2
e3
e4
e5
e6
s1
s2
s3
RESULT:
Thus the cyclic coder was implemented using software tools.
IC 7486
IC 7474
Bread board.
SOFTWARE
A system loaded with MATLAB 7.0.1.
THEORY
A convolution coder operates on the incoming message
continuously in a serial manner. The encoder of a binary convolution
n modulo 2
adder
DECODING
A viterbi algorithm is used for decoding the convolution code.
The input to the algorithm is the reason for preferring the trellis over
the tree is the number of nodes at any level of the trellis does not
continue to grow as the number of incoming message increases being
the constraint length.
TABLE:
ENCODING
Table:
CLK
I/P
S1
S2
S3
V1
V2
PROCEDURE
RESULT
Thus the convolution coder and decoder is done using software
and hardware tools.
COMPONENTS:
Delta sigma modulator kit
CRO
Power supply
A system loaded with Simulink.
THEORY:
Sample correlation used in DPCM is exploited in Delta sigma
modulation by over sampling at a rate greater than Nyquist rate. This
increases between adjacent samples which results in small prediction
error that can be encoded using one bit. The error can be a one bit
DPCM. Single bit error is typically a
mq
k[ ].
m[k-1]+ d q [k ]
mq [k1]=
mq [k-2]+ d q [k-1]
Therefore,
mq [k ]=
Assuming
mq [0]
mq
dq
[k-1]+
d q [k ]
[k-2]+
dq
[k-1]
=0
mq [k ]= d q [m]
0
PROCEDURE:
HARDWARE:
RESULT:
Thus delta sigma modulation is done with the help of Simulink and
Hardware.
AIM:
To design and implement differential pulse code modulation using
SIMULINK, MATLAB.
APPARATUS REQUIRED:
A system loaded with MATLAB.
THEORY:
In ordinary PCM no of bits are transmitted corresponding to the
level of signal. But in DPCM the difference between the present and
previous value is transmitted. There are basically two types of DPCM
.The first one is transmitting the difference
d[k]=m[k]-m[k-1];
Instead of m[k],d[k] is transmitted
m[k]=d[k]+m[k+1]
The chief advantage is the reduction in the no of bits transmitted and
the quantization error.
Type 2 is the estimate m[k] from previous sample
d[k]=m[k]- m [k ]
and m[k]=d[k]+
m [k ]
at the
receiver end.
Here prediction error is smaller using taylor series.
m[k+1]=m[k]+ t s m [t ]
PROCEDURE:
RESULT:
Thus differential pulse code modulation is implemented using
SIMULINK.
AIM:
To design and implement ADM modulation using MATLAB
SOFTWARE USED:
A system loaded with MATLAB
THEORY:
The delta modulation considers the sample values of present and the
one immediately preceding it. So if the value at present is greater, 1
is sent or else 0 is sent. The step size is constant. There is its greatest
disadvantage. When the sine wave steep or less varying the slope is
less, the error is high. So we go for adaptive delta modulation.
Here the size of the step is varied in accordance the input.
When the slope is steep the step size is increased. When the slope is
less, the width is increased. So the slope overload and granular noise
seen in delta modulation is avoided.
The following steps are to be considered while performing ADM
d min
d max
d min
and
d max
d max
d min
if b(nTs)= b(nTs-Ts)
g(nTs)= K
if b(nTs) b(nTs-Ts)
Output stage:
I/P
Demodulate
d signal
PROCEDURE
The input sine wave frequency and step size are got from user.
By comparing with the previous value if the step size is greater than
a threshold value, the result is scaled accordingly.
Else the step size is added if the present value is greater than
previous and vice versa. The modulated signal is plotted.
In demodulator using the value of the size,the sine wave is got
back.
RESULT
Thus adaptive delta modulation scheme is performed using MATLAB.
AIM:
To implement the various types of line codes such as unipolar,
bipolar and observe the power spectral densities of various line codes.
APPARATUS REQUIRED:
A PC loaded with MATLAB.
THEORY:
The output of the multiplexer is coded into electrical pulses or
waveforms for transmission .This is called Line coding. In ON-OFF code
1-p(t),
0-no pulse
In POLAR code
1-p(t),
0-(-p(t))
In BIPOLAR code
1-Alternate p(t) and p(t),
0-no pulse
The bipolar code is able to detect errors easily because the received
pulses will violate the bipolar rule when an error occurs.
When Full width pulses are used to code, the pulse amplitude is
held constant at a particular value .This is called as NRZ .When half
width pulse is used it is RZ scheme.
1
T b (F)]
1
n
( F )
T b n=
Tb
V) MANCHESTER CODING:
2
2
S(F)= A T b sinc (
F Tb
F T b
sinc 2 (
)
)
2
2
PROCEDURE:
The codes for URZ, UNRZ, BRZ, BNRZ, and MANCHESTER are
written in MATLAB.
The output and power spectral density of each type is plotted.
RESULT:
Thus different line coding schemes are implemented using
MATLAB and their PSDs are plotted.
AIM
The aim of the experiment is to study spread spectrum technologies.
SOFTWARE USED
A system loaded with MATLAB.
THEORY
The spread spectrum uses multiple access technique to use bandwidth
efficiently to avoid intentional and unintentional interferences. Spread
of spectrum is a technique whereby a modulated waveform is spread in
such a way as to generate expanded bandwidth signals that do not
interfere with other signals.
BPSK or OPSK modulation can be used for spread spectrum.
Spreading after modulation is same as spreading using PN-sequence
generator.
FHSS- Frequency Hopped Spread Spectrum has implementation
on concept familiar to that of DHSS. The hopping rate is higher than bit
rate, then it is Fast FHSS. If it is slower, then it is called Slow FHSS
where there are several bits per frequency hop.
DSSS SYSTEM
DSSS TRANSMITTER
DSSS RECEIVER
FHSS
TRANSMITTER
FHSS RECEIVER
PROCEDURE
Obtain the input binary sequence.
Apply DSSS to input for two different chip rates.
Plot the power spectral density and compare results.
Apply FHSS to input for two different hop sets.
Plot the power spectral density and compare results.
RESULT
Thus various spread spectrum technique is implemented using
MATLAB.
l(t) =
k (tkT )
k=N
k c (t kT )
k=N
p(nT) =
k c [(mk )T ]
k=N
p(nT) =
k c [(mk )T ]
k=N
{1,0,n=0
n 0
But since there are only (2N+1) adjustable co-efficients the ideal
condition can be approximated as,
p(nT) =
{1,0,n=0
n 0
The
The
The
The
RESULT
Thus tapped delay equalizer is done using MATLAB.
C0
C1
W-N
W-
(2N+1)
N+1
.
. . ... .
.
. . ... .
CN CN-1CN-2... C-N
.
. . ... .
.
. . ... .
C2N C2N-1 C2N-2 ...
C0
.
.
W0
.
.
0
0
.
.
1
.
.
0