Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
25 views68 pages

DC Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views68 pages

DC Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Dhole Patil Education Society’s

Dhole Patil College of Engineering, Pune


Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.1

Title: Study of BPSK transmitter & receiver using suitable hardware setup/kit.

1. Aim: Study of BPSK transmitter & receiver using suitable hardware setup/kit..
2. CO 301.2: Analyze the performance of Phase Shift Keying digital modulation
technique in presence of AWGN noise.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to understand
concept of BPSK system and it’s spectral analysis.
5. Pre-requisites: Basic knowledge of BPSK and DSO
6. Appropriate Hardware and Software Tools:
BPSK Kit, CRO, connecting cables
7. Theory:
In the BPSK system where one phase of carrier is transmitted for ‘1’ and inverted
carrier is transmitted for digital ‘0’. Here if bit rate is “Tb’ then bandwidth required Is
‘2fb’. To reduce this bandwidth requirement QPSK can be used. For BPSK bandwidth
required is ‘fb’ i. e. half that of BPSK. ‘QPSK’ technique comes under ‘carrier modulation’.
‘Q’ in ‘QPSK’ represents quadrature i. e. four phases of carrier is transmitted depending
upon bit pattern. Incoming bit pattern is divided into ‘odd’ & ‘even’ bit patterns. Odd
pattern is multiplied by sine wave, & even pattern is multiplied by Cos wave. Sine & Cos
waves are 90 degree phase shifted. Now resulting two PSK’s are added & we get vector
addition output.
If odd bit is 0 & even bit is 1 we get 45 degree phase shifted carrier. If odd bit is
0 & even bit is 0 we get 135 degree phase shifted carrier. If odd bit is 1 & even bit is 0
we get 225 degree phase shifted carrier. If odd bit is 1 & even bit is 1 we get 315 degree
phase shifted carrier. In QPSK, two consecutive bits are stored & for resulting four
combinations of different phases of carrier are transmitted. By using ‘D’ flip- flop type
arrangement incoming bit pattern is divided into two bit patterns: odd pattern & even
pattern , for obtaining this, basic clock whose frequency is ‘fb’ is divided by two, resulting
odd & even clock frequencies are ‘fb/2 ‘& they are complementary. Each bit is stored for
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

2Tb time period. Odd pattern will have bit no. 1,3,5,7, etc. each stored for ‘2Tb’ & even bit
pattern will have bit no.2,4,6, etc. stored for ‘2 Tb’.
Block Diagram:

Figure1: BPSK Transmitter

Figure2: BPSK Receiver


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Figure3: BPSK Transmitter & Receiver (with DG)


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

8. Procedure
1. First apply any digital word by pushing push switches in data generator section.
2. This digital word is NRZ data, which can be observed at NRZ DATA output
terminal.
3. Connect CRO Channel-1 at Carrier Clock (Ck) socket and observe it.
______Waveform. (T1)
4. Connect CRO Channel-1 at Bit Clock (Bk) socket and
observe it. _______Waveform (T2)
5. Connect CRO Channel-1 at Word Clock (Wk) socket and observe it.
_______Waveform (T3)
6. Connect CRO Channel-1 at NRZ DATA (NRZ) socket and observe it .
_______Waveform (T4)
7. Connect CRO Channel-1 at I signal and CRO Channel-2 at Q signal and observe
there relationship. Prove that these are even and odd bit data by applying different
data by push switches. _______Waveform (T5)
_______Waveform (T6)
8. Connect CRO Channel-1 at RF Carrier socket (in Carrier generator section) and
observe it. _______Waveform (T7)
9. Connect CRO Channel 1 and 2 at ø1 and ø2 s ignal respectively (in carrier generator
section) and Observe their 90° out of phase relationship. _______Waveform (T8)
10. Now Connect CRO Channel 2 at the QPSK output of QPSK modulator.Connect
CRO channel 1 and RF carrier. Observe the relationship of QPSK signal with RF
carrier signal . ______Waveform (T9)
11. Observe QPSK output of respect to In phase (I) signal by triggering channel 1 by I
signal. _______Waveform (T10)
12. Observe recovered raw I and Q data signal at output of balanced demodulators.
13. Observe recovered raw I and Q datasignal at output of Matched filter .__Waveform
(T11)
14. Observe received pure NRZ data at the output data squarer
______Waveform (T12)
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

9. TEST POINT WAVEFORMS


T1. Carrier Clock Signal Ck (1.28 MHz): -

T2. Bit Clock Signal Bk (80 KHz): -

T3. Word clock Wk (10KHz): -

T4. NRZ Signal at NRZ terminal of Digital data generator: -


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T5. “I” Signal of Digital data generator: -

T6. “Q” Signal of Digital data generator: -

T7. R.F. Carrier signal at RF carrier terminal: -

T8. 0º In phase signal - ø1 and 90º out of phase signal ø2 in RF carrier generator : -

T9. QPSK modulated signal with reference to Input Digital data :-


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T10. QPSK modulated signal with reference to I signal: -

T11. Raw data recovered signal I and Q –

T12. Recovered NRZ Data: -

QPSK Modulated Output:


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

10. Observations:
• Bit pattern Amplitude A=
• Bit period (Tb)=
• Odd data time period 2Tb=
• Carrier frequency and amplitude=
• BW of BPSK=

Conclusion:
Thus we have studied BPSK transmitter & receiver using suitable hardware setup/kit.
Industry Reference:
The industrial applications of BPSK include the following.
• Satellite transmission of MPEG2 video,
• Cable modems,
• Videoconferencing,
• Cellular phone systems
Links to BPSK Details:
1. https://www.youtube.com/watch?v=BReFowU-6Gs
2. https://www.youtube.com/watch?v=9MATq44JFz4
3. https://www.youtube.com/watch?v=z6TccdsNqlI
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Questions:
1. With the help of block diagram and relevant expressions/waveforms
explain BPSK transmitter and receiver
2. Explain BPSK with mathematical expressions, spectral diagram, signal
space representation etc
3. Geometrical Representation of BPSK, Euclidian Distance, Advantages,
disadvantages and Applications of BPSK.

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.2

Title: Study of QPSK transmitter & receiver using suitable hardware setup/kit.

1. Aim: Study of QPSK transmitter & receiver using suitable hardware setup/kit..
2. CO 301.2: Analyze the performance of Phase Shift Keying digital modulation
technique in presence of AWGN noise.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to understand
concept of QPSK system and it’s spectral analysis.
5. Pre-requisites: Basic knowledge of QPSK and DSO
6. Appropriate Hardware and Software Tools:
QPSK Kit, CRO, connecting cables
7. Theory:
In the BPSK system where one phase of carrier is transmitted for ‘1’ and inverted
carrier is transmitted for digital ‘0’. Here if bit rate is “Tb’ then bandwidth required Is
‘2fb’. To reduce this bandwidth requirement QPSK can be used. For QPSK bandwidth
required is ‘fb’ i. e. half that of BPSK. ‘QPSK’ technique comes under ‘carrier modulation’.
‘Q’ in ‘QPSK’ represents quadrature i. e. four phases of carrier is transmitted depending
upon bit pattern. Incoming bit pattern is divided into ‘odd’ & ‘even’ bit patterns. Odd
pattern is multiplied by sine wave, & even pattern is multiplied by Cos wave. Sine & Cos
waves are 90 degree phase shifted. Now resulting two PSK’s are added & we get vector
addition output.
If odd bit is 0 & even bit is 1 we get 45 degree phase shifted carrier. If odd bit is
0 & even bit is 0 we get 135 degree phase shifted carrier. If odd bit is 1 & even bit is 0
we get 225 degree phase shifted carrier. If odd bit is 1 & even bit is 1 we get 315 degree
phase shifted carrier. In QPSK, two consecutive bits are stored & for resulting four
combinations of different phases of carrier are transmitted. By using ‘D’ flip- flop type
arrangement incoming bit pattern is divided into two bit patterns: odd pattern & even
pattern , for obtaining this, basic clock whose frequency is ‘fb’ is divided by two, resulting
odd & even clock frequencies are ‘fb/2 ‘& they are complementary. Each bit is stored for
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

2Tb time period. Odd pattern will have bit no. 1,3,5,7, etc. each stored for ‘2Tb’ & even bit
pattern will have bit no.2,4,6, etc. stored for ‘2 Tb’.
Block Diagram:

Figure1: QPSK Transmitter

Figure2: QPSK Receiver


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

8. Procedure
1. First apply any digital word by pushing push switches in data generator section.
2. This digital word is NRZ data, which can be observed at NRZ DATA output
terminal.
3. Connect CRO Channel-1 at Carrier Clock (Ck) socket and observe it.
______Waveform. (T1)
4. Connect CRO Channel-1 at Bit Clock (Bk) socket and
observe it. _______Waveform (T2)
5. Connect CRO Channel-1 at Word Clock (Wk) socket and observe it.
_______Waveform (T3)
6. Connect CRO Channel-1 at NRZ DATA (NRZ) socket and observe it .
_______Waveform (T4)
7. Connect CRO Channel-1 at I signal and CRO Channel-2 at Q signal and observe
there relationship. Prove that these are even and odd bit data by applying different
data by push switches. _______Waveform (T5)
_______Waveform (T6)
8. Connect CRO Channel-1 at RF Carrier socket (in Carrier generator section) and
observe it. _______Waveform (T7)
9. Connect CRO Channel 1 and 2 at ø1 and ø2 s ignal respectively (in carrier generator
section) and Observe their 90° out of phase relationship. _______Waveform (T8)
10. Now Connect CRO Channel 2 at the QPSK output of QPSK modulator.Connect
CRO channel 1 and RF carrier. Observe the relationship of QPSK signal with RF
carrier signal . ______Waveform (T9)
11. Observe QPSK output of respect to In phase (I) signal by triggering channel 1 by I
signal. _______Waveform (T10)
12. Observe recovered raw I and Q data signal at output of balanced demodulators.
13. Observe recovered raw I and Q datasignal at output of Matched filter .__Waveform
(T11)
14. Observe received pure NRZ data at the output data squarer
______Waveform (T12)
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

9. TEST POINT WAVEFORMS


T1. Carrier Clock Signal Ck (1.28 MHz): -

T2. Bit Clock Signal Bk (80 KHz): -

T3. Word clock Wk (10KHz): -

T4. NRZ Signal at NRZ terminal of Digital data generator: -

T5. “I” Signal of Digital data generator: -


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T6. “Q” Signal of Digital data generator: -

T7. R.F. Carrier signal at RF carrier terminal: -

T8. 0º In phase signal - ø1 and 90º out of phase signal ø2 in RF carrier generator : -

T9. QPSK modulated signal with reference to Input Digital data :-

T10. QPSK modulated signal with reference to I signal: -


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T11. Raw data recovered signal I and Q –

T12. Recovered NRZ Data: -

QPSK Modulated Output:


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

10. Observations:
• Bit pattern Amplitude A=
• Bit period (Tb)=
• Odd data time period 2Tb=
• Carrier frequency and amplitude=
• BW of QPSK=

Conclusion:
Thus we have studied QPSK transmitter & receiver using suitable hardware setup/kit.

Industry Reference:
The industrial applications of QPSK include the following.
• Satellite transmission of MPEG2 video,
• Cable modems,
• Videoconferencing,
• Cellular phone systems
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

QR Code
https://www.youtube.com/watch?v=c1z9LiRpxLk

Questions:
1. With the help of block diagram and relevant expressions/waveforms explain QPSK
transmitter and receiver
2. Explain QPSK with mathematical expressions, spectral diagram, signal space
representation, Bandwidth..
3. Difference Coherent and non-coherent Detector
4. Applications of QPSK

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.3

Title: Study of DSSS transmitter and receiver using suitable hardware setup/kit.

1. Aim: Study of DSSS transmitter and receiver using suitable hardware setup/kit.
2. CO 301.4: Evaluate the performance of digital modulation techniques with spread
spectrum system.

3. ELO-1:

4. Objectives: After performing this experiment, Students will be able to understand the
concept of generation and detection of DSSS-BPSK.
5. Pre-requisites: Basic knowledge of spread spectrum modulation techniques
6. Appropriate Hardware and Software Tools:
DSSS Kit, CRO, connecting cables
7. Theory:
Spread spectrum is based on signaling schemes which greatly expands the transmitted
spectrum relative to the data rate. Spread spectrum is useful when it is necessary for the system to
resist external interference, to operate at low spectral energy, to provide multiple access
capability without external control & to provide a secure channel inaccessible to the outside
listeners. The main principle of spread spectrum communication is that the bandwidth occupancy
is much higher than usual. Because of this much larger bandwidth, the power spectral density is
lower in the channel, the signal looks like a noise. The spreading is done by combining the data
signal with code signal which is independent of the transmitted data message. The various types
of modulation techniques employed in spread spectrum are
1] Direct Sequencing 2] Frequency Hoping 3] Time Hoping 4] Hybrid Methods.
Direct sequence:
Spread Spectrum techniques were and are still used in military applications, because of
their high security, and their less susceptibility to interference from other parties. In this
technique, multiple users share the same bandwidth, without significantly interfering with each
other. The spreading waveform is controlled by a Pseudo-Noise (PN) sequence, which is a binary
random sequence. This PN is then multiplied with the original baseband signal, which has a lower
frequency, which yields a spread waveform that has a noise like properties. In the receiver, the
opposite happens, when the pass band signal is first demodulated, and then despreads using the
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

same PN waveform. An important factor here is the synchronization between the two generated
sequences.
m’ (t) = d (t) * g (t)
where p (t) = PN sequence random sequence signal
m (t) =input bit pattern signal to be spread
m’ (t) = Spreaded signal
Tb= input bit pattern bit period
Tc= pn sequence one bit time ie chip period
Fb=1/Tb is bit rate
Fc=1/Tc is chip rate
N=no of chips of Tb is = Tb/Tc
The bit rate ‘fc’ of g(t) is usually much greater than the bit rate ‘fb’ of d(t) so that, g(t) is
chops bits of d(t) into chips & so rate of g(t) is called as chip rate fc & bit rate is fd. The
spectrum is spread by ratio fc/fd.

Pseudo Noise (PN)


As we mentioned earlier, PN is the key factor in DS-SS systems. A Pseudo Noise or
Pseudorandom sequence is a binary sequence with an autocorrelation that resembles, over a
period, the autocorrelation of a random binary sequence . It is generated using a Shift Register,
and a Combinational Logic circuit as its feedback. The Logic Circuit determines the PN words. N
is the Maximum–Length PN sequence. Some properties of the Maximum–Length sequences are:
In each period of a maximum–length sequence, the number of 1s is always one more than the
number of 0s. This is called the Balance property.
Among the runs of 1s and 0s in each period of such sequence, one–half the runs of each kind are
of length one, one–fourth are of length two, one–eighth are of length three, and so on. This is
called the Run property.

Figure: PN sequence generator shift register


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

The Autocorrelation function of such sequence is periodic and binary valued. This is
called the Correlation property.
A block diagram of a Maximum–Length PN generator is shown in figure with a 4–
bit register and one modulo–2 adder. This has a period of 15 bits ie N=15.
Direct Sequence - Spread Spectrum
In Direct Sequence-Spread Spectrum the baseband waveform is multiplied by the PN
sequence. After spreading, the signal is modulated called as Direct sequence spread spectrum
(DS-SS) and transmitted. The most widely modulation scheme is BPSK (Binary Phase Shift
Keying).

where m(t) is the data sequence, p(t) is the PN spreading sequence, fc is the carrier
frequency, and . is the carrier phase angle at t=0. Each symbol in m(t) represents a data
symbol and has a duration of Ts . Each pulse in p(t) represents a chip, and has a duration of
Tc. The transitions of the data symbols and chips coincide such that the ratio Ts to Tc is an
integer. The waveforms m(t) and p(t) are shown in fig. The resulting spread signal is then
modulated using the BPSK scheme. The carrier frequency fc should have a frequency at
least 5 times the chip frequency p(t).

DSSS Transmitter Block Diagram


In the demodulator section, we simply reverse the process. We Demodulate the
BPSK signal first, Low Pass Filter the signal, and then dispread the filtered signal, to obtain
the original message. The process is described by the following equations:
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

As shown above, when we multiply two cosine signals together, we will obtain two
expressions, one of which has twice the frequency of the original message. And this part can
be removed by a LPF. The output is mss(t) as shown in figure. This design is based on
Coherent Detection BPSK, so we don’t have to worry about carrier synchronization issues.
As for the PN sequence in the receiver, it should be an exact replica of the one used
in the transmitter, with no delays, cause this might cause severe errors in the incoming
message.

Figure: DS-SS Reciever


After the signal gets multiplied with the PN sequence, the signal dispreads, and we
obtain the original bit signal m(t), that was transmitted.
8. Procedure:
1. Connect CRO Channel-1 at Carrier Clock (Ck) socket and observe it.
_______Waveform (T1)
2. Connect CRO Channel-1 at Bit Clock (Bk) socket and observe it _______Waveform
(T2)
3. Connect CRO Channel at RF Carrier socket. Observe the waveforms..
_______Waveform (T3)
4. Connect CRO Channel-1 at NRZ DATA (NRZ) socket and observe it.
_______Waveform (T4)
5. Connect CRO Channel-2 at PN signal and observer it. _______Waveform (T5)
6. Connect NRZ data to Spreading code mixture block by wire
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

7. Observe Spreading Code signal. _______Waveform (T6)


8. Observe DSSS signal with reference to NRZ data and Spreading code signals.
_______Waveform (T7)
9. Observe recovered spreading code at o/p of DSSS demodulator _______Waveform
(T8)
10. Observe filtered spreading code at o/p of Low pass filter. _______Waveform (T9)
11. Keep noise level at minimum.
12. Observe received pure NRZ data at the output of Comparator. ______Waveform
(T10)

9. Test Point Waveforms


T1. Carrier Clock Signal:

T2. Bit Clock Signal:

T3. R.F. Carrier signal at RF carrier Terminal:

T4. NRZ Signal at NRZ terminal of Digital Data generator:


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T5. PN Signal:

T6. Spreading Code (SP) Signal - PN + Data:

T7. DSSS Signal:

T8. Recovered Spreading Code Signal:


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

T9 Filtered SP Code at O/P of LPF:

T10. Received NRZ Output at Comparator:

10. Observations:
Sr.No A Tb A PN seq N=Tb/Tc Ac Fc
of NRZ of NRZ Of PN Chip (carrier) Of
data data Period Carrier
Tc

Conclusion:
Thus we have studied DSSS transmitter and receiver using suitable hardware setup/kit.

Industry Reference:
• CDMA cellphone technology: The DSSS technique was used to provide a multiple
access scheme that was used for 3G cellophane technology. Each mobile used a
different access code or spreading code and this enabled multiple users to access the
base station on the same frequency.
• GNSS: Satellite based navigation systems use DSSS as this gives a signal gain by
spreading the signal out over a wide bandwidth. It also enables different satellites to
use the same channel without mutual interference.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

QR Code
https://www.youtube.com/watch?v=MqnzaHsQ90U

Questions:
1. With the help of block diagram and suitable expressions, explain the generation and
reception of direct sequence spread spectrum signal using BPSK modulation.
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
2. Explain processing gain, anti-jamming property, jamming margin and low
imperceptibility for spread spectrum techniques.
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
Name of Students: -----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.4

Title: Study of FHSS transmitter and receiver using suitable hardware


setup/kit.
1. Aim: Study of FHSS transmitter and receiver using suitable hardware setup/kit.
2. CO 301.4: Evaluate the performance of digital modulation techniques with spread
spectrum system.

3. ELO-1:

4. Objectives: After performing this experiment, Students will be able to understand the
concept of generation and detection of FHSS-BFSK.
5. Pre-requisites: Basic knowledge of spread spectrum modulation techniques
6. Appropriate Hardware and Software Tools:
FHSS Kit, CRO, connecting cables
7. Theory:
In Frequency Hoping Spectrum, available channel bandwidth is broken into a large
number of non-overlapping frequency slots. Data is modulated onto time-varying, Pseudo
random carrier frequencies. Transmitter “hops” between different narrowband Channels with
centre frequency fi, and bandwidth B (instantaneous bandwidth). Spectrum BW (bandwidth)
over which hopping occurs is called the total hopping. Data sent by hopping transmitter carrier
to seemingly random channels which are known only to desired receiver. On each channel, data
bursts are sent using conventional narrowband modulation hopping period/hop duration . There
are generally two types of hopping schemes employed in FHSS
Fast Hopping: In this scheme the hopping rate is kept equal to or greater than the Data rate. The
hopping rate should not be many time faster than the data rate. Generally it can be 2-3 times
faster than the data rate.
Slow Hopping: In this scheme the hopping rate is kept lower than the data rate. Also, the
data rates which can be supported by FHSS system are quite lower than the data rates
supported by DSSS systems.
.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

8. Procedure:
1. Connect the power supply to ST2117 trainer board but do not switch ON the Power
supply until all the connections is made.
2. Now connect ‘4 KHz’ clock signal from the ‘Clock Section’ to the ‘Data clock’
Socket of the ‘Clock Inputs’ section. This clock will drive the data generators.
3. Connect ‘8 KHz’ clock signal from the ‘Clock Section’ to the ‘PRNS Clock’ Socket
of the ‘Clock Inputs’ section. This clock will drive PRN sequence Generators.
4. Connect inputs of the feedback XOR gate of ‘PRN Sequence 1’ to any two Sockets
of the linear shift register.
5. Connect inputs of the feedback XOR gate of ‘PRN Sequence 2’ to any two Sockets
of the linear shift register. Remember that these taping positions should be different
from the one used in PRN sequence generator 2.
6. Connect ‘Data 1 O/P’ of ‘Data Generator 1’ to the ‘Data I/P’ of one of the two BFSK
modulators under ‘Frequency Synthesis’ section. Connect the ‘PRNS 1 O/P’ of the
‘PRN Sequence 1’ generator to the input of Frequency synthesizer .
7. Connect ‘Data 2 O/P’ of ‘Data Generator 2’ to the ‘Data I/P’ of the second BFSK
modulators under ‘Frequency Synthesis’ section. Connect the ‘PRNS 2 O/P’ of the
‘PRN Sequence 2’ generator to the input of second Frequency Synthesizer.
8. Now connect the output of BFSK modulators and frequency synthesizers to their
respective modulators as indicated by the dashed lines.
9. Connect the outputs of the modulators to the respective inputs of the multiplexer.
10. Now switch ON the power supply.
11. Observe the data outputs of data generators and PRN sequence output of PRN
sequence generators.
12. Observe the outputs of BFSK modulators and frequency synthesizers.
13. Observe the final multiplexed (composite) FHSS signal at the output of the
multiplexer.
14. To demodulate the user data, connect the multiplexed FHSS signal to the input of
FHSS demodulator.
15. Now apply the output of that frequency synthesizer for which the corresponding data
has to be recovered from the multiplexed data.
16. Make rest of the connections as shown in the connection diagram.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

17. Observe the final output and verify that the demodulator demodulates that channel
data whose corresponding frequency synthesizer output is applied to the
demodulator.
18. Follow the same procedure for slow hopping scheme by changing the data rate and
PRN sequence rate as shown in the table above for slow hopping scheme.
9. Test Point Waveforms

10. Observations:
Sr.No A Tb A PN seq N=Tb/Tc Ac Fc
of NRZ of NRZ Of PN Chip (carrier) Of
data data Period Carrier
Tc
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Conclusion:
1. The system efficiently multiplexes and demultiplexes the channels using separate
PRN sequence driven Frequency synthesizer output for both the channels.
2. The receiver recovers the data of that particular channel, whose frequency
synthesizer output is used for demodulation at the demodulator end.
Industry Reference:
1. In 900 MHz and 2.4 GHz, FHSS provides a low-power, long-range alternative to Wi-
Fi, Bluetooth, LoRa or Zigbee.
2. FHSS products enable mission-critical applications including unmanned ground and
aerial systems, real-time monitoring and remote site automation, and other IIoT edge
applications.
3. They are also used by OEMs to integrate secure, industrial-grade wireless technology
within their innovations.
QR Code
https://www.youtube.com/watch?v=PUQMKrtUYz8

Questions:
1. What are the two common spread spectrum techniques used to transmit signal.
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
--------
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

2. What is frequency Hopping method


------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
--------

3. Draw the block diagram of FH-SS system transmitter and receiver. Write the
functional names inside the blocks and input output signal of each block
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------

Name of Students: -----------------------------


Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.5

Title: Simulation study of Performance of M-ary PSK .

1. Aim: Simulation study of Performance of M-ary PSK .


2. CO 301.2: Analyze the performance of Phase Shift Keying digital modulation technique in
presence of AWGN noise.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to

1. Calculate BER of M-Ary PSK with different values of SNR.


2. Compare the simulation result of BER with theoretical value

5. Pre-requisites: Basic knowledge of MATLAB


6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
The word binary denotes two-bits. M just denotes a digit that resembles to the number
of conditions, levels, or combinations possible for a given number of binary variables. This is
the type of digital modulation method used for data transmission in which in its place of one-
bit, two or more bits are transmitted at a time. As a single signal is used for multiple bit
transmission, the channel bandwidth is reduced. N bits are grouped, so that in this N bit
symbols, extending over the time NTb. There re 2N =M possible symbols.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Transmitter

At the transmitter the bit stream is applied to serial to parallel converter. The converter
stores N bits of a symbol. These N bits are then presented at once on N output lines in parallel
of the converter. The converted output unchanging for the duration NTb of symbol during
which time the converter is assembling a new group of N bits. For each symbol time , the
converter output is updated. The converter output is applied to a D/A converter. The D/A
converter output is voltage which depends on the symbol Sm (m=0,1,….M-1). Finally D/A
converter output is applied as a control input to a special type of constant amplitude sinusoidal
signal source whose phase Фm is determined by V(Sm). The output is fixed amplitude
sinusoidal wave form whose phase a one to one correspondence to the assembled N-bit
symbol. This phase can change once per symbol time.
Receiver:
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

The demodulation technique employed is Synchronous demodulation. The scheme for


generating carrier at the demodulator is known as carrier recovery circuit. Carrier recovery
circuit consists of a device to rise the received signal to the Mth power, A BPF whose pass
band is centered around Mfo, a frequency divider. Only the wave forms of the signals at the
outputs of carrier recovery circuit are relevant not their amplitudes. The recovered carrier is
then multiplied with the received signal Which is then applied to integrators. The integrators
extend their integration over the same time period again bit synchronizer is needed. The
integrator outputs are voltages whose amplitudes are proportional to the TsPe and TsPo
respectively and change at the symbol rate. Finally TsPe and TsP0 are applied to A/D converter
which reconstructs the digital N bit signal which constitutes the transmitted signal.

8. MATLAB Code:
clc;
clear all;
close all;
k=input('enter the no of bits');
M = 2^k; %size
N = k*10^3; % number of symbols
% k = log2(M); % b/symbol

a = [0:M-1]*2*pi/M; % phase values

SNRdB = [0:2:20]; % SNR range

sdB = SNRdB + 10*log10(k);

% Mbinary to Gray code conversion

b = [0:M-1];

map =bitxor(b,floor(b/2));
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

[tt ind] = sort(map);

c = zeros(1,N);

for i = 1:length(SNRdB)

bits = rand(1,N*k,1)>0.5; % random 1's and 0's

% binary to decikal
bin2DecMatrix = ones(N,1)*(2.^((k-1):-1:0)) ;
shape= reshape(bits,k,N).';

% decimal to binary
G= (sum(shape.*bin2DecMatrix,2)).';

% Gray code mapping


dec = ind(G+1)-1; %
ph= dec*2*pi/M;

% modulation
d= exp(1i*ph);
s = d;

% AWGN

n = 1/sqrt(2)*(randn(1,N) + 1i*randn(1,N));

% reciever
r = s + 10^(-sdB(i)/20)*n;

% demodulation
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

e = angle(r);

% phase

e(e<0) = e(e<0) + 2*pi;

c = 2*pi/M*round(e/(2*pi/M)) ;

c(c==2*pi) = 0;
cd = round(c*M/(2*pi));

% Decimal to Gray conversion

f = map(cd+1);
cb = dec2bin(f,k) ;

cb = cb.';
cb = cb(1:end).';
cb = str2num(cb).' ;

% errors
Err(i) = size(find(bits- cb),2);

end
sBer=Err/(N*k);
tBer =(1/k)*erfc(sqrt(k*10.^(SNRdB/10))*sin(pi/8));
% plot
figure
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

semilogy(SNRdB,tBer,'rs-','LineWidth',2);
hold on
grid on
semilogy(SNRdB,sBer,'kx-','LineWidth',2);

legend('theory', 'simulation');
xlabel('SNR dB')
ylabel('Bit Error Rate')
title('BER VS SNR M-PSK')

-------------------OUTPUT----------------

Conclusion:
Thus we have performed simulation study of Performance of M-ary PSK .

Industry Reference:
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

The industrial applications of M-Ary PSK include the following.


• This method is broadly used for bio-metric, wireless LAN along with wireless
communications like Bluetooth and RFID.
• Local Oscillator.
• Optical Communications.
• Multi-channel WDM.
• Delay & add demodulator.
• Nonlinear effects for WDM transmission.
QR Code
Strings in C
https://www.youtube.com/watch?v=AOkR5AHp7H0

Questions:
1. Explain M-ary PSK system with the help of transmitter and receiver.
2. What is bandwidth requirement of M-Ary PSK
3. Draw and Explain signal space representation of 8-ary PSK

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.6

Title: Simulation study of Performance of M-ary QAM.

1. Aim: Simulation study of Performance of M-ary QAM.


2. CO 301.3: Compare the performance parameters of digital modulation techniques for
transmission and reception of signal.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to

1. Calculate BER of M-Ary QAM with different values of SNR.


2. Compare the simulation result of BER with theoretical value

5. Pre-requisites: Basic knowledge of MATLAB


6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
Quadrature Amplitude Modulation, QAM is a signal in which two carriers shifted in
phase by 90 degrees (i.e. sine and cosine) are modulated and combined. As a result of their
90° phase difference they are in quadrature and this gives rise to the name. Often one signal
is called the In-phase or “I” signal, and the other is the quadrature or “Q” signal. The
resultant overall signal consisting of the combination of both I and Q carriers contains of
both amplitude and phase variations. In view of the fact that both amplitude and phase
variations are present it may also be considered as a mixture of amplitude and phase
modulation.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Fig. 1. Generation of QASK Signal

Fig. 2. QASK Receiver

8. MATLAB Code:
clc;
clear all;
close all;
N = 4*10^3; % number of symbols
M = 16; % size
k = log2(M); % bits/symbol
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

% for 16-QAM
Re = [-(2*sqrt(M)/2-1):2:-1 1:2:2*sqrt(M)/2-1];
Im = [-(2*sqrt(M)/2-1):2:-1 1:2:2*sqrt(M)/2-1];
k_QAM = 1/sqrt(10);
bdB = 3:1:13; % SNR range
sdB = bdB + 10*log10(k);
% binary to gray code
a = [0:k-1];
map = bitxor(a,floor(a/2));
[tt ind] = sort(map);
for i = 1:length(bdB)
c = rand(1,N*k,1)>0.5; % random 1's and 0's
d = reshape(c,k,N).';
bd = ones(N,1)*(2.^((k/2-1):-1:0)) ; % conversion from binary to decimal
% real
cRe = d(:,(1:k/2));
e = sum(cRe.*bd,2);
f = bitxor(e,floor(e/2));
% imaginary
cIm = d(:,(k/2+1:k));
g = sum(cIm.*bd,2);
h = bitxor(g,floor(g/2));
% mapping the Gray coded symbols into constellation
modRe = Re(f+1);
modIm = Im(h+1);
% constellation
mod = modRe + 1i*modIm;
s = k_QAM*mod;
% noise
n = 1/sqrt(2)*[randn(1,N) + 1i*randn(1,N)];
% reciever
r = s + 10^(-sdB(i)/20)*n;
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

% demodulation
r_re = real(r)/k_QAM;
r_im = imag(r)/k_QAM;
% rounding off
m = 2*floor(r_re/2)+1;
m(m>max(Re)) = max(Re);
m(m<min(Re)) = min(Re);
n= 2*floor(r_im/2)+1;
n(n>max(Im)) = max(Im);
n(n<min(Im)) = min(Im);
% To Decimal conversion
oRe = ind(floor((m+4)/2+1))-1;
oIm = ind(floor((n+4)/2+1))-1;
% To binary string
pRe = dec2bin(oRe,k/2);
pIm = dec2bin(oIm,k/2);
% binary string to number
pRe = pRe.';
pRe = pRe(1:end).';
pRe = reshape(str2num(pRe).',k/2,N).' ;
pIm = pIm.';
pIm = pIm(1:end).';
pIm = reshape(str2num(pIm).',k/2,N).' ;
% counting errors for real and imaginary
Err(i) = size(find([cRe- pRe]),1) + size(find([cIm - pIm]),1) ;
end
sBer = Err/(N*k);
tBer = (1/k)*3/2*erfc(sqrt(k*0.05*(10.^(bdB/10))));
% plot
figure
semilogy(bdB,tBer,'rs-','LineWidth',2);
hold on
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

semilogy(bdB,sBer,'kx-','LineWidth',2);
grid on
legend('theory', 'simulation');
xlabel('SNR dB')
ylabel('Bit Error Rate')
title('BER VS SNR')
-------------------OUTPUT----------------

Conclusion:
Thus we have performed simulation study of Performance of M-ary QAM.
Industry Reference:
The industrial applications of M-Ary PSK include the following.
• 64 QAM and 256 QAM are often used in digital cable television and cable modem
applications.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

• In the UK, 16 QAM and 64 QAM are currently used for digital terrestrial television
using Digital Video Broadcasting.
• In the US, 64 QAM and 256 QAM are the mandated modulation scheme for digital
cable as standardized by the SCTE in the standard ANSI/SCTE 07 2000.
• Variants of QAM are used for many wireless and cellular technology applications.
• QAM is being used in optical fiber system as bit rates increases; QAM16 and
QAM64 can be optically emulated with a 3-path interferometer.
QR Code
https://www.youtube.com/watch?v=MAZHck0oWZA

Questions:
1. Write a short note on signal space representation of 16 QAM. Comment on its
Euclidian distance.
2. With the help of neat block diagram, mathematical expressions, waveforms, explain
the scheme to generate and detect 16 QAM.

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.7

Title: Simulation Study of performance of BPSK receiver in presence of noise.

1. Aim: Simulation Study of performance of BPSK receiver in presence of noise.


2. CO 301.2: Analyze the performance of Phase Shift Keying digital modulation
technique in presence of AWGN noise.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to

1. Calculate BER of BPSK with different values of SNR.


2. Compare the simulation result of BER with theoretical value

5. Pre-requisites: Basic knowledge of MATLAB


6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
In BPSK the transmitted signal is a sinusoid of fixed amplitude. It has one fixed
phase when the data is at one level and when the data is at other level the phase is different
by 180 degree.
0 1 1 0 1 0 0 1

BPSK Transmitter:
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

BPSK Receiver
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

8. MATLAB Code:
Initialization of Data and variables
clc;
clear all;
close all;
nr_data_bits=8192;
b_data=(randn(1,nr_data_bits))>.5;
b=[b_data];
d=zeros(1,length(b));
for n=1:length(b)
if(b(n)==0)
d(n)=exp(j*2*pi);
end
if(b(n)==1)
d(n)=exp(j*pi);
end
end
disp(d)
bpsk=d;
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

figure(1);
plot(d,'o');
axis([-2 2 -2 2]);
grid on;
xlabel('real');
ylabel('imag');
title('BPSK constellation');
SNR=0:24;
BER1=[];
SNR1=[];
for SNR=0:length(SNR);
sigma=sqrt(10.0^(-SNR/10.0));
snbpsk=(real(bpsk)+sigma.*randn(size(bpsk)))+i.*(imag(bpsk)+sigma*randn(size(bpsk)));
figure(2);
plot(snbpsk,'o');
axis([-2 2 -2 2]);
grid on;
xlabel('real');
ylabel('imag');
title('Bpsk constellation with noise');
r=snbpsk;
bhat=[real(r)<0];
bhat=bhat(:)';
bhat1=bhat;
ne=sum(b~=bhat1);
BER=ne/nr_data_bits;
BER1=[BER1 BER];
SNR1=[SNR1 SNR];
end
figure(3);
semilogy(SNR1,BER1,'-*');
grid on;
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

xlabel('SNR=Eb/No(db)');
ylabel('BER');
title('Simulation of BER for BPSK ');
legend('BER-simulated');

-------------------OUTPUT----------------

Conclusion:
Thus we have performed Simulation Study of performance of BPSK receiver in
presence of noise.
Industry Reference:
The industrial applications of M-Ary PSK include the following.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

• The 6 and 9 Mbit/s modes use OFDM modulation where each sub-carrier is BPSK
modulated.
• Because of its simplicity, BPSK is appropriate for low-cost passive transmitters, and
is used in RFID standards such as ISO/IEC 14443 which has been adopted for
biometric passports, credit cards such as American Express's ExpressPay, and many
other applications.
QR Code
https://www.youtube.com/watch?v=c1z9LiRpxLk

Questions:
1. Explain BPSK expression, signal space, spectral characteristics, waveforms
generations and reception.
2. Explain BPSK spectrum and bandwidth of BPSK.

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.8

Title: Simulation study of various Entropies and mutual information in a communication system.

1. Aim: Simulation study of various Entropies and mutual information in a


communication system.
2. CO 301.5: Examine a communication system using information theoretic approach.

3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to write a
program for determination of entropies and mutual information of a given channel
5. Pre-requisites: Basic knowledge of MATLAB
6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
Information – The probability denotes likeliness or the certainty of occurrence of any
event. A less probable event is rarer and so it contains more information. Thus, if n event of
lower probability occurs, it conveys more information than occurrence of an event of larger
probability. If ‘p’ is the probability of occurrence of the message symbol and ‘1’ is the
information received from the message, then; Information , I = log2(1/p). If the base is 2,
unit of information is bit.
Entropy (Average information) : Suppose there are m different msg m1, m2, m3,
…….mm having probabilities p1, p2,p3, …..pm. suppose a sequence of L message is
transmitted. If L is very large then we can say that msg of m are transmitted.
I1= p1[log2 (1/p1)]
I2= p2[log2 (1/p2)]
…..
Im= pm[log2 (1/pm)]
Thus the total information is
Itotal = I1+I2+……….+ Im
Entropy (H) = IL (total)
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Where IL (total)= total information of no. of messages.


Information Rate: It is given by
R= r*H bits/sec
Where R= Rate at which msgs are generated
H = Entropy
8. MATLAB Code:
Program: for entropy and Mutual Information for different channels
% %prgm for entropy and MI for noise free channel
clc;
clear all;
close all;
i=input('Enter no. of elements=');
q=input('Enter joint probabilities matrix=');
sum=0;
%probability P(x)
for n=1:i
w=0;
for m=1:i
p(n)=w+q(n,m)
w=p(n);
end
end
disp('P(x):');
disp(p);
% entropy H(x)
for n=1:i
H=sum+(p(n)*log2(1/p(n)));
sum=H;
end
disp('H(x): ');
disp(H);
%conditional probability matrix
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

for n=1:i
for m=1:i
a(n,m)=q(n,m)/p(n);
end
end
disp('P(Y/X):');
disp(a);
% entropy H(Y/X)
d=0;
for n=1:i
for m=1:i
if(a(n,m)>0)
H1=d+(q(n,m)*log2(1/a(n,m)));
d=H1
end
end
end
disp('H(Y/X):');
disp(H1);
% MI
m=H-H1;
disp('MI=');
disp(m);
% probability P(Y)
for n=1:i
w=0;
for m=1:i
s(n)=w+q(m,n);
w=s(n);
end
end
disp('P(Y):');
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

disp(s);
% entropy H(Y)
k=0;
for n=1:i
H2=k+(s(n)*log2(1/s(n)));
k=H2;
end
disp('H(Y): ');
disp(H2);
Conclusion:
Thus we have studied various Entropies and mutual information in a communication
system.
Industry Reference:
The industrial applications of M-Ary PSK include the following.
• Dispatching of Automatic Guided Vehicles (AGV)
• Ranking and selection of simulated systems based on the mean performance measure
• Comparison between random variables based on cumulative probability
distributions.
QR Code

https://www.youtube.com/watch?v=98BAo8L-
o6s

Questions:
1. What is entropy? What are the properties of entropy?.
2. Explain mutual information
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.9

Title: Simulation study of Source Coding technique.

1. Aim: Simulation study of Source Coding technique.


2. CO 301.5: Simulation study of Source Coding technique.
3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to write a
program for Huffman Coding Technique
5. Pre-requisites: Basic knowledge of MATLAB
6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
Huffman coding is a popular method for compressing data with variable‐length
codes. Given a set of data symbols (an alphabet) and their frequencies of occurrence
(or, equivalently, their probabilities), the method constructs a set of variable‐length
codewords with the shortest average length and assigns them to the symbols.
Huffman coding serves as the basis for several applications implemented on popular
platforms. The Huffman method is somewhat similar to the Shannon–Fano method,
proposed independently by Claude Shannon and Robert Fano in the late 1940s .It
generally produces better codes, and like the Shannon–Fano method, it produces the best
variable‐length codes when the probabilities of the symbols are negative powers of 2.
The main difference between the two methods is that Shannon–Fano constructs its codes
from top to bottom (and the bits of each codeword are constructed from left to right), while
Huffman constructs a code tree from the bottom up (and the bits of each codeword are
constructed from right to left).
The algorithm starts by building a list of all the alphabet symbols in
descending order of their probabilities. It then constructs a tree, with a symbol at every leaf,
from the bottom up. This is done in steps, where at each step the two symbols with smallest
probabilities are selected, added to the top of the partial tree, deleted from the list, and
replaced with an auxiliary symbol representing the two original symbols. When the list is
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

reduced to just one auxiliary symbol (representing the entire alphabet), the tree is
complete. The tree is then traversed to determine the codes of the symbols.
The steps of Huffman coding algorithm are given below:
1. Arrange the source symbols in increasing order of heir probabilities.
2. Take the bottom two symbols & tie them together as shown in Figure 1. Add the
probabilities of the two symbols & write it on the combined node. Label the
two branches with a ‘1’ & a ‘0’ as depicted in Figure 1.
3. Treat this sum of probabilities as a new probability associated with a new symbol.
Again pick the two smallest probabilities, tie them together to form a new
probability. Each time we perform the combination of two symbols we reduce the
total number of symbols by one. Whenever we tie together two probabilities
(nodes) we label the two branches with a ‘0’ & a ‘1’.
4. Continue the procedure until only one procedure is left (& it should be one if
your addition is correct). This completes the construction of the Huffman Tree.
5. To find out the prefix codeword for any symbol, follow the branches from the final
node back to the symbol. While tracing back the route read out the labels on the
branches. This is the codeword for the symbol.
The Huffman is an instantaneous uniquely decodable block code. It is a block code
because each source symbol is mapped into a fixed sequence of code symbols. It is
instantaneous because each codeword in a string of code symbols can be decoded without
referencing succeeding symbols. That is, in any given Huffman code, no codeword is
a prefix of any other codeword. And it is uniquely decodable because a string of
code symbols can be decoded only in one way. Thus any string of Huffman encoded
symbols can be decoded by examining the individual symbols of the string in left to
right manner. Because we are using an instantaneous uniquely decodable block code,
there is no need to insert delimiters between the encoded pixels.
8. MATLAB Code:
clc;
clear all;
close all;
code_length=0;
x=input('Enter number of symbols: ');
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

for m=1:x
symbols(m)=input('Enter the symbol number: ');
p(m)=input('Enter the probability: ');
end
Hx=0
for m=1:x
[dict,avglen]=huffmandict(symbols,p)
hcode=huffmanenco(m,dict)
dsig = huffmandeco(hcode,dict)
code_length=length(hcode)
Hx=Hx+(p(m)*(-log(p(m)))/(log(2)));
end
display(Hx);
Efficiency=(Hx/avglen)*100
Disp(Efficiency);
Conclusion:
Thus we have studied simulation of Huffman coding technique
Industry Reference:
1. They are used for transmitting fax and text.
2. They are used by conventional compression formats like PKZIP, GZIP, etc.
QR Code
https://www.youtube.com/watch?v=CKbgVHg0w1U
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Questions:
1. What is Huffman coding?
2. What are the limitations of Huffman coding?
3. Why Huffman encoding process is not unique?

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

EXPERIMENT NO.10

Title: Simulation Study of Linear Block codes.

1. Aim: Simulation Study of Linear Block codes.


2. CO 301.5: Simulation Study of Linear Block codes.
3. ELO-1:

4. Objectives: After performing this experiment, the learner will be able to perform
encoding and decoding of linear block codes.
5. Pre-requisites: Basic knowledge of MATLAB
6. Appropriate Hardware and Software Tools:
• Personal desktop computer with windows XP/vista or any higher version
• Turbo C compiler.
7. Theory:
Error detection is the ability to detect the presence of errors caused by noise or other
impairments during transmission from the transmitter to the receiver. Error correction is the
additional ability to reconstruct the original, error-free data. There are two basic ways to
design the channel code and protocol for an error correcting system.

Linear block codes are conceptually simple codes that are basically an extension of single-
bit parity check codes for error detection. A single-bit parity check code is one of the most
common forms of detecting transmission errors. This code uses one extra bit in a block of n
data bits to indicate whether the number of 1s in a block is odd or even. Thus, if a single
error occurs, either the parity bit is corrupted or the number of detected 1s in the information
bit sequence will be different from the number used to compute the parity bit: in either case
the parity bit will not correspond to the number of detected 1s in the information bit
sequence, so the single error is detected. Linear block codes extend this notion by using a
larger number of parity bits to either detect more than one error or correct for one or more
errors. Unfortunately, linear block codes, along with convolutional codes, trade their error
detection or correction capability for either and width expansion or a lower data rate, as will
be discussed in more detail below. We will strict our attention to binary codes, where both
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

the original information and the corresponding code consist of bits taking a value of either 0
or 1.
ENCODING

DECODING:-
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

8. MATLAB Code:
clc
clear all
close all
% Use a [7,4] Hamming code.
%k = 3; n = 2^m-1; m = n-k;
%[H, G] = hammgen(k); % Produce parity-check matrix.
k=input('Enter no of message bits k');
n=input('Enter no of code bits n');
G=zeros(k,n);
G(:,1:k)=eye(k);
disp('Enter Parity matrix k x n-k');
for i=1:k
for j=1:n-k
G(i,j+k)=input('');
end
end
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

d=0:2^k-1;
db=dec2bin(d);
for i=1:2^k
for j=1:k
dbb(i,j)=str2num(db(i,j));
end
end
c(1:2^k,:)=rem(dbb(1:2^k,:)*G,2);
wt=sum(c,2);
H=[G(:,k+1:n)' eye(n-k)];
trt = syndtable(H); % Produce decoding table.
disp('Enter recd vector');
for i=1:n
recd(1,i)=input('');
end
syndrome = rem(recd * H',2);
syndrome_de = bi2de(syndrome,'left-msb'); % Convert to decimal.
disp(['Syndrome = ',num2str(syndrome_de),...
' (decimal), ',num2str(syndrome),' (binary)']);
corrvect = trt(1+syndrome_de,:); % Correction vector
%Now compute the corrected codeword.
correctedcode = rem(corrvect+recd,2);
Industry Reference:
Linear block codes are widely used in
1. Satellite and deep space communication.
2. Digital audio and video transmissions.
3. Computer memory.
QR Code

Questions:
Q.1 What is the definition of a linear block code?
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

Q.2 If we want to be able to detect two-bit errors, what should be the minimum
Hamming distance?
Q.3 In a codeword, we add two redundant bits to each 8-bit data word. Find the number
of (a) Valid codeword(b) Invalid codeword
Q.4 What is the minimum distance in linear block codes?
Q.5 What is the Hamming distance for each of the following codewords?
(a) (10000, 00000) (b) (10101, 10000) (c) (00000, 11111) (d) (00000, 00000)
Any linear blend of codewords is likewise a code word only. So in coding, a linear

code is a mistake correcting code. Linear codes are generally partitioned into block

codes and convolutional codes, despite the fact that turbo codes can be viewed as a

half breed of these two sorts. Linear codes take into account more productive

encoding and deciphering calculations than different codes.

Linear codes are utilized in forward mistake adjustment and are applied in methods

for techniques for sending symbols (e.g., bits) on a communications channel so that,

if mistakes occur in the communication, some mistakes can be amended or

recognized by the beneficiary of a message block. The code words in a linear block

code are blocks of symbols that are encoded utilizing a greater number of symbols

than the first incentive to be sent.

Let us see the MATLAB/Octave code for Linear Block Code.:


Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

ctave:1> % Given H Matrix


H = [1 0 1 1 1 0 0;
1 1 0 1 0 1 0;
0 1 1 1 0 0 1]

k = 4;
n = 7;

% Generating G Matrix

% Taking the H Matrix Transpose


P = H';

% Making a copy of H Transpose Matrix


L = P;

% Taking the last 4 rows of L and storing


L((5:7), : ) = [];

% Creating a Identity matrix of size K x K


I = eye(k);

% Making a 4 x 7 Matrix
G = [I L]

% Generate U data vector, denoting all information sequences


no = 2 ^ k

% Iterate through an Unit-Spaced Vector


for i = 1 : 2^k

% Iterate through Vector with Specified Increment


% or in simple words here we are decrementing 4 till we get 1
for j = k : -1 : 1
if rem(i - 1, 2 ^ (-j + k + 1)) >= 2 ^ (-j + k)
u(i, j) = 1;
else
u(i, j) = 0;
end

% To avoid displaying each iteration/loop value


echo off;
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

end
end

echo on;
u

% Generate CodeWords
c = rem(u * G, 2)

% Find the min distance


w_min = min(sum((c(2 : 2^k, :))'))

% Given Received codeword


r = [0 0 0 1 0 0 0];
r

p = [G(:, n - k + 2 : n)];

%Find Syndrome
ht = transpose(H)

s = rem(r * ht, 2)

for i = 1 : 1 : size(ht)
if(ht(i,1:3)==s)
r(i) = 1-r(i);
break;
end
end

disp('The Error is in bit:')


disp(i)
disp('The Corrected Codeword is :')
disp(r)

Result:

H =
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

1 0 1 1 1 0 0
1 1 0 1 0 1 0
0 1 1 1 0 0 1

G =

1 0 0 0 1 1 0
0 1 0 0 0 1 1
0 0 1 0 1 0 1
0 0 0 1 1 1 1

no = 16
u =

0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1

c =

0 0 0 0 0 0 0
0 0 0 1 1 1 1
0 0 1 0 1 0 1
0 0 1 1 0 1 0
0 1 0 0 0 1 1
0 1 0 1 1 0 0
0 1 1 0 1 1 0
0 1 1 1 0 0 1
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

1 0 0 0 1 1 0
1 0 0 1 0 0 1
1 0 1 0 0 1 1
1 0 1 1 1 0 0
1 1 0 0 1 0 1
1 1 0 1 0 1 0
1 1 1 0 0 0 0
1 1 1 1 1 1 1

w_min = 3
r =

0 0 0 1 0 0 0

ht =

1 1 0
0 1 1
1 0 1
1 1 1
1 0 0
0 1 0
0 0 1

s =

1 1 1

warning: colon arguments should be scalars


The Error is in bit:
4
The Corrected Codeword is :
0 0 0 0 0 0 0
Conclusion:
Thus we have studied encoding and decoding of linear block codes.
Dhole Patil Education Society’s
Dhole Patil College of Engineering, Pune
Department of Electronics and Telecommunication Engineering

https://www.youtube.com/watch?v=DfSvzkgUNNs

Name of Students:-----------------------------
Roll No: ------------------------------------------

Prof. Dr. B. E. Shinde


Subject Teacher

You might also like