You are on page 1of 35

Experiment #07

To PRACTICE and implement the principles of Analog Modulation Scheme (Phase


Modulation) on MCM 24/EV and on MATLAB
Objective
The main objective of this experiment to understand the phase modulation

Equipment
 MCM 24/V
 Oscilloscope
 Wires
 Power supply

Explanation
Phase modulation
Phase modulation is a type of modulation where the phase of the carrier signal varies as per amplitude
variations of the message signal.

As the name implies, phase modulation, PM uses variations in phase for carrying the modulation.

As phase and frequency are interrelated, this relationship carries forwards into phase modulation
where it has many commonalities with frequency modulation. As a result the term angle
modulation is often use to describe both.
Phase modulation, PM is sometimes used for analogue transmission, but it has become the basis
for modulation schemes used for carrying data. Phase shoft keying, PSK is widely used for data
communication
Before looking at phase modulation it is first necessary to look at phase itself

The sine wave can also be represented by the movement of a point around a circle, the phase at
any given point being the angle between the start point and the point on the waveform as shown.
Also the phase advances as time progresses so points on the waveform can be said to have a
phase difference between them.

Phase modulation works by modulating the phase of the signal, i.e. changing the rate at which
the point moves around the circle. This changes the phase of the signal from what it would have
been if no modulation was applied. In other words the speed of rotation around the circle is
modulated about the mean value.

Forms of phase modulation


The list below gives some of the forms of phase shift keying that are used:

 PM - Phase Modulation
 PSK - Phase Shift Keying
 BPSK - Binary Phase Shift Keying
 QPSK - Quadrature Phase Shift Keying
 8 PSK - 8 Point Phase Shift Keying
 16 PSK - 16 Point Phase Shift Keying
 OPSK - Offset Phase Shift Keying
Phase Modulation Diagram

Applications
The applications of phase modulation include the following.

 This modulation is very useful in radio waves transmission, and it is an essential element in
several digital transmission coding schemes.
 Phase modulation is widely used for transmitting radio waves and is an integral element of many
digital transmission coding schemes that support an ample range of wireless technologies such
as GSM, Satellite television, and Wi-Fi.
 Phase modulation is used in digital synthesizers for generating waveform and signal
 PM is used for signal and waveform generation in digital synthesizers like Yamaha DX7 for
phase modulation synthesis implementation, and Casio CZ for sound synthesis which is known as
phase distortion.

Advantageand Disadvantages of Phase Modulation


The advantages of phase modulation include the The disadvantages of phase modulation include
following. the following.
 Phase modulation (PM) is a simple  Phase modulation needs two signals by a
contrasted to Frequency modulation phase variation among them. Through
(FM). this, both the two patterns are required
 It is used to find out the velocity of a like a reference as well as a signal.
target by removing Doppler data. The  This type of modulation requires
main benefit of this modulation is signal hardware which obtains more complex
modulation because it permits computer due to its conversion technique.
for communicating on high-speed using a  Phase ambiguity arrives if we exceed
telephone system. index pi radian of modulation (1800).
 And one more advantage of PM (phase  Phase modulation index can be enhanced
modulation) is improved immunity by employing frequency multiplier.
toward the noise.

Hardware
Software working

Conclusion

Comments:

Lab Instructor Signature:


Experiment #08

REPEAT the use of MATLAB to analyze and measure the Super heterodyne AM
receiver Parameters
Objective
The purpose of this lab to look at the functions performed by the super heterodyne AM receiver

Equipment
Software
 Matlab

Explanation
A super heterodyne receiver, often shortened to superhet, is a type of radio receiver that uses
frequency mixing to convert a received signal to a fixed intermediate frequency
A super heterodyne receiver uses signal mixing to convert the input radio signal into a steady
intermediate frequency (IF) that can be worked with more easily than the original radio signal
that has a different frequency, depending on the broadcasting station. The IF signal is then
amplified by a strip of IF amplifiers and then fed into a detector that outputs the audio signal into
an audio amplifier that powers the speaker. In this article, we will learn about the working of a
Super heterodyne AM
receiver or superhet for short with the help of a block diagram.

Procedure
As you can see the block diagram has 11 different stages, each stage has a specific function
which is explained below
 RF Filter: The first block is the ferrite rod antenna coil and variable capacitor combo, that
serves two purposes - RF is induced into the coil and the parallel capacitor controls the resonant
frequency of it, as ferrite antennas receive the best when the resonant frequency of the coil and
capacitor is equal to the station's carrier frequency – this way it acts as an input filter of the
receiver.
 Heterodyne Local Oscillator: The second block is the heterodyne, also known as the local
oscillator (LO). The frequency of the local oscillator is set, so either the sum or the difference of
the RF signal’s frequency and the LO’s frequency is equal to the IF used in the receiver (usually
around 455 kHz).
 Mixer: The third block is the mixer, the RF signal and the LO signal is fed to the mixer to
produce the desired IF. Mixers found in common AM receivers output the sum, the difference of
the LO and RF’s frequencies and the LO and RF signals themselves. Most often in simple
transistor radios, the heterodyne and the mixer are made using one transistor. In higher-quality
receivers and those that use dedicated integrated circuits, such as the TCA440, these stages are
separate, allowing for more sensitive reception due to the mixer outputting only the sum and
difference frequencies.
 First IF Filter: The fourth block is the first IF filter. In most AM receivers, it is a resonant circuit
placed in the collector of the mixer transistor with the resonant frequency equal to the IF
frequency. Its purpose is to filter off all signals with a frequency different from the IF frequency
because those signals are unwanted mixing products and don’t carry the audio signal of the
station we want to listen to.
 First IF Amplifier: The fifth block is the first IF amplifier. Gains of 50 to 100 in each IF stages
are common if the gain is too high, distortion can take place, and if the gain is too high, IF filters
are too close to each other and not properly shielded, parasitic oscillation can take place. The
amplifier is controlled by AGC (Automatic Gain Control) voltage from the demodulator.
 Second IF Filter: The sixth block is the second IF filter, just like the first one it is a resonant
circuit placed in the collector of the transistor. It only lets signals of the IF frequency – improving
selectivity.
 Second IF Amplifier: The seventh block is the second IF amplifier, it is practically the same as
the first IF amp except it is not controlled by AGC, as having too many AGC controlled stages,
increases distortion.
 Third IF Filter: the eighth block is the third IF filter, just like the first and the second one is a
resonant circuit placed in the collector of the transistor. It only lets signals of the IF frequency –
improving selectivity. It feeds the IF signal to the detector.
 Detector: The ninth block is the detector, usually in the form of a germanium diode or a diode-
connected transistor. It demodulates AM by rectifying the IF. On its output, there is a strong IF
ripple component that is filtered out by a resistor-capacitor low pass filter, so only AF component
remains, it is fed to the audio amp. The audio signal is further filtered to provide the AGC
voltage, like in a regular DC power supply.
 Audio Amplifier: The tenth block is the audio amplifier; it amplifies the audio signal and passes
it onto the speaker. Between the detector and the audio amplifier, a volume control potentiometer
is used.
 Speaker: The last block is the speaker (usually 8 ohms, 0.5W) that outputs audio to the user. The
speaker is sometimes connected to the audio amplifier through a headphone jack that disconnects
the speaker when headphones are plugged in.
Circuit diagram

Software performance
Result analysis
Conclusion

Comments:

Lab Instructor Signature:


Experiment #09

To implement and DEMONSTRATE the principles of Amplitude Shift Keying


(ASK) on MATLAB
Objective
To plot the wave form for Binary Amplitude Shift Keying (BASK) signal using MATLAB for a
stream of bits.
Equipment
Software

 Matlab

Explanation
Amplitude Shift Keying ASK is a type of Amplitude Modulation which represents the binary
data in the form of variations in the amplitude of a signal.
Any modulated signal has a high frequency carrier. The binary signal when ASK modulated,
gives a zero value for Low input while it gives the carrier output for High input
The following figure represents ASK modulated waveform along with its input

To find the process of obtaining this ASK modulated wave, let us learn about the working of
the ASK modulator.
The ASK modulated input signal is given to the Square law detector. A square law detector is one
whose output voltage is proportional to the square of the amplitude modulated input voltage. The
low pass filter minimizes the higher frequencies. The comparator and the voltage limiter help to
get a clean digital output.
ASK Modulator
The ASK modulator block diagram comprises of the carrier signal generator, the binary sequence
from the message signal and the band-limited filter. Following is the block diagram of the ASK
Modulator.
 The carrier generator, sends a continuous high-frequency carrier.
 The binary sequence from the message signal makes the unipolar input to be either High or Low.
 The high signal closes the switch, allowing a carrier wave.
 Hence, the output will be the carrier signal at high input.
 When there is low input, the switch opens, allowing no voltage to appear.
 Hence, the output will be low.
 The band-limiting filter, shapes the pulse depending upon the amplitude and phase characteristics
of the band-limiting filter or the pulse-shaping filter.

ASK Demodulator
There are two types of ASK Demodulation techniques. They are −
 Asynchronous ASK Demodulation/detection
 Synchronous ASK Demodulation/detection

Asynchronous ASK Demodulator Synchronous ASK Demodulator


The Asynchronous ASK detector consists of a Synchronous ASK detector consists of a Square
half- wave rectifier, a low pass filter, and a law detector, low pass filter, a comparator, and a
comparator. Following is the block diagram for voltage limiter. Following is the block diagram for
the same. the same.

Demodulation
ASK signal has a well-defined envelope. Thus it is amenable to demodulation by an
envelope detector. Some sort of decision-making circuitry is necessary for detecting the
message. The signal is recovered by using a correlator and decision making circuitry is
used to recover the binary sequence.

Applications
They are:
 Low-frequency RF applications.
 Home automation devices.
 Industrial networks devices.
 Wireless base stations.
 Tire pressuring monitoring systems.

Algorithm
ASK modulation
 Generate carrier signal.
 Start FOR loop
 Generate binary data, message signal(on-off form)
 Generate ASK modulated signal.
 Plot message signal and ASK modulated signal.
 End FOR loop.
 Plot the binary data and carrier.

ASK demodulation
 Start FOR loop
 Perform correlation of ASK signal with carrier to get decision variable
 Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
 Plot the demodulated binary data.

Software implementation
Output

Conclusion

Comments:

Lab Instructor Signature:


Experiment #10
To implement and DEMONSTRATE the principles of Phase Shift Keying (PSK) on
MATLAB
Objective
To plot the wave form for Binary Frequency Shift Keying (BFSK) signal using MATLAB for a
stream of bits
Equipment
Software
 Matlab

Explanation
PSK is a digital modulation scheme that conveys data by changing, or modulating, the phase of
a reference signal (the carrier wave). PSK uses a finite number of phases, each assigned a
unique pattern of binary digits. Usually, each phase encodes an equal number of bits. Each
pattern of bits forms the symbol that is represented by the particular phase. The demodulator,
which is designed specifically for the symbol-set used by the modulator, determines the phase of
the received signal and maps it back to the symbol it represents, thus recovering the original
data.
Phase Shift Keying
PSK is the digital modulation technique in which the phase of the carrier signal is changed by
varying the sine and cosine inputs at a particular time. PSK technique is widely used for wireless
LANs, bio-metric, contactless operations, along with RFID and Bluetooth communications.
Types
PSK is of two types, depending upon the phases the signal gets shifted. They are –

Binary Phase Shift Keying Quadrature Phase Shift Keying


This is also called as 2-phase PSK or Phase This is the phase shift keying technique, in which
Reversal Keying. In this technique, the sine wave the sine wave carrier takes four phase reversals
carrier takes two phase reversals such as 0° and such as 0°, 90°, 180°, and 270°.
180°. If this kind of techniques are further extended,
BPSK is basically a Double Side Band PSK can be done by eight or sixteen values also,
Suppressed Carrier DSBSCDSBSC modulation depending upon the requirement
scheme, for message being the digital
information.
BPSK Demodulator QPSK Demodulator
The block diagram of BPSK demodulator consists The QPSK Demodulator uses two product
of a mixer with local oscillator circuit, a bandpass demodulator circuits with local oscillator, two
filter, a two-input detector circuit. The diagram is band pass filters, two integrator circuits, and a 2-
as follows bit parallel to serial converter. Following is the
diagram for the same.

Algorithm
Initialization commands

PSK modulation
 Generate carrier signal.
 Start FOR loop
 3.Generate binary data, message signal in polar form
 Generate PSK modulated signal.
 Plot message signal and PSK modulated signal.
 End FOR loop.
 Plot the binary data and carrier.

PSK demodulation
 Start FOR loop Perform correlation of PSK signal with carrier to get decision variable
 Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
 Plot the demodulated binary data.
Summary of Analog modulation techniques

Software implementation
Output

Conclusion
Experiment #11
To implement and DEMONSTRATE principles of Quadrature Phase Shift Keying (QPSK)
Objective
To plot the wave form for Quadrature Phase Shift Keying (QPSK) signal using MATLAB for a stream
of
bits.

Equipment
Software
 Matlab

Explanation
QAM: Quadrature Amplitude Modulation combines amplitude & phase changes to give
additional capacity & is widely used for data communications. 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.
Quadrature Phase Shift Keying (QPSK) is the digital modulation technique.

Quadrature Phase Shift Keying (QPSK) is a form of Phase Shift Keying in which two bits are
modulated at once, selecting one of four possible carrier phase shifts (0, Π/2, Π, and 3Π/2).
QPSK perform by changing the phase of the In-phase (I) carrier from 0° to 180° and the
Quadrature-phase (Q) carrier between 90° and 270°. This is used to indicate the four states of a
2-bit binary code. Each state of these carriers is referred to as a Symbol.

Quadrature Amplitude Modulation, QAM utilizes both amplitude and phase components to
provide a form of modulation that is able to provide high levels of spectrum usage efficiency.

Block diagram of QPSK Transmitter QPSK Receiver:


The I/p binary sequence b(t) is represented in QPSK receiver consists of a pair of correlators with
polar from with symbols 1 & 0 represented as common I/P & supplied with locally generated
+√E/2 and signal c1 (t) & c2 (t). The correlator output, x1, &
-√E/2. This binary wave is demutiplexed into two
separate binary waves consisting of odd & even x2 are each compared with a threshold of zero
numbered I/P bits denoted by b1 (t) & b2 (t). b1 volts. If x1 > 0, decision is made in favor of
(t) & b2(t) are used to modulate a pair of symbol ‘1’ for upper channel and if x1 > 0,
quadrature carrier. The result is two PSK decision is made in favor of symbol 0. Parallely if
waves .These two binary PSK waves are added to x2 >0, decision is made in favor of symbol 1 for
produce the desired QPSKsignal lower channel if
x2

Algorithm
Initialization commands

QPSK modulation
 Generate quadrature carriers.
 Start FOR loop
 Generate binary data, message signal (bipolar form)
 Multiply carrier 1 with odd bits of message signal and carrier 2 with even bits of message signal
 Perform addition of odd and even modulated signals to get the QPSK modulated signal
 Plot QPSK modulated signal.
 End FOR loop.
 Plot the binary data and carriers.

QPSK demodulation
 Start FOR loop
 Perform correlation of QPSK modulated signal with quadrature carriers to get two
decision variables x1 and x2.
 Make decision on x1 and x2 and multiplex to get demodulated binary data.
 If x1>0and x2>0, choose ‘11’. If x1>0and x2<0, choose ‘10’. If x1<0and x2>0, choose ‘01. If
 x1<0and x2<0, choose ‘00’.
 End FOR loop
 Plot demodulated data
Matlab performances

Output

Conclusion

Comments:
Experiment #12

To observe and implement the principles of Quadrature Phase Shift Keying (PSK)
SHOW the plots using MATLAB with the help of constellation diagram with Noise
addition.
Objective
Main objective is to understand how noise effect the phase shift keying

Equipment
Software

 Matlab

Explanation
Constellation diagrams are an important tool in an engineer’s arsenal when determining
whether or not a digitally modulated radio-frequency (RF) signal is behaving correctly, and
troubleshooting the underlying issues when it is not.
Most digital modulation schemes involve a discrete number of symbols which are used to
convey information. These symbols are mapped to a discrete set of magnitude and phase values
on the I/Q plane, which are referred to as constellation points. Modulation schemes with greater
numbers of constellation points are able to transmit more information per symbol, as the more
symbols there are in a given modulation scheme, the greater number of bits a single symbol can
represent

The constellation diagram is useful because it displays both the ideal (reference) signal and the
actual measured signal on the same plot. The ideal signal locations of a constellation diagram are
pre-defined generically depending on the modulation format chosen
Let

In Fig. 6, the 64 white circles represent the ideal magnitude and phase for each of the 64 symbols
used in 64QAM. The red dots represent the measured signal’s magnitude and phase for each of
the 64 symbols. Using constellation diagrams in this context, it is easy to visualize when a signal
is performing well and when it is not.

Quadrature Phase Shift Keying (QPSK) is a form of phase modulation technique, in which two
information bits (combined as one symbol) are modulated at once, selecting one of the four
possible carrier phase shift states.
Plotting constellation diagram
Now that we have constructed a function for raised cosine pulse shaping filter, the next step is to
generate modulated waveforms (using QPSK, O-QPSK and π/4-DQPSK schemes), pass them
through a raised cosine filter having a roll-off factor, say α = 0.3 and finally plot the
constellation. The constellation for MSK modulated waveform is also plotted.

Noise is unwanted signal which affects the wanted signal .it is an random signal
If noise causes the point representing a sample to stray into the region representing another symbol ,
the demodulator will misidentify that sample as the other symbol, resulting in a symbol error.

Source of noise
Internal noise External noise
• Due to random movement of electrons • Man-made noise and natural resources
in electronic circuit. • External noise comes from sources over
• Electronic components in a receiver such as which we have little or no control
resistors, diodes, and transistors are major sources • Industrial sources
of internal noise • motors, generators, manufactured equipment
• Thermal (agitation) noise • Atmospheric sources / static electricity
• Shot noise • speaker when there is no signal present
• Transit time noise

How to determine noise level in communication system?


 Noise effect can be determined by measuring: - Signal to Noise Ratio, SNR for analog
system - Noise Factor, F - Noise Temperature, Te . - probability of error or bit error rate,
BER for digital system
 To determine the quality of received signal at the receiver or an antenna, SNRiis used.
 SNR o is always less than SNRi, due to the facts that the existence of noise in the
receiver itself. In the receiver usually constitute a process of filtering, demodulation
and amplification.

Type of Noise
 The are several types of noise, among them are:
 Atmospheric
 Extraterrestrial (Cosmic & Solar)
 Thermal Noise
 White Noise
 Shot Noise
 Quantization Noise

Noise calculation
Matlab performance
QPSK constellation diagram /noise addition

Modulate and Demodulate QPSK Signal in AWGN

Conclusion

Comments:

Lab Instructor Signature:


Experiment #13
EXECUTE the Shanon Fano coding with MATLAB
Objective
Understand the working of Shannon fano coding
Explanation
WHAT IS SHANNON FANO CODING?
Shannon Fano Algorithm is an entropy encoding technique for lossless data compression of
multimedia. Named after Claude Shannon and Robert Fano, it assigns a code to each symbol
based on their probabilities of occurrence. It is a variable-length encoding scheme, that is, the
codes assigned to the symbols will be of varying length.
HOW DOES IT WORK?
The steps of the algorithm are as follows:
 Create a list of probabilities or frequency counts for the given set of symbols so that the
relative frequency of occurrence of each symbol is known.
 Sort the list of symbols in decreasing order of probability, the most probable ones to the left and
least probable to the right.
 Split the list into two parts, with the total probability of both the parts being as close to each
other as possible.
 Assign the value 0 to the left part and 1 to the right part.
 Repeat steps 3 and 4 for each part, until all the symbols are split into individual
subgroups. The Shannon codes are considered accurate if the code of each symbol is unique.

EXAMPLE:
The given task is to construct Shannon codes for the given set of symbols using the
Shannon-Fano lossless compression technique.
Step:

Tree:
1. Upon arranging the symbols in decreasing order of probability:

P(D) + P(B) = 0.30 + 0.2 = 0.58

and,

P(A) + P(C) + P(E) = 0.22 + 0.15 + 0.05 = 0.42

And since the almost equally split the table, the most is divided it the blockquote table isblockquotento

{D, B} and {A, C, E}

and assign them the values 0 and 1 respectively.

2. Now, in {D, B} group,

P(D) = 0.30 and P(B) = 0.28

which means that P(D)~P(B), so divide {D, B} into {D} and {B} and assign 0 to D
and 1 to B. Step:
3. In {A, C, E} group,

P(A) = 0.22 and P(C) + P(E) = 0.20

So the group is divided into

{A} and {C, E}

and they are assigned values 0 and 1 respectively.

4. In {C, E} group,

P(C) = 0.15 and P(E) = 0.05

So divide them into {C} and {E} and assign 0 to {C} and 1 to {E}
Tree

The Shannon codes for the set of symbols are:

Matlab performance
Output

conclusion

Comments:

Lab Instructor Signature:


Experiment #14
CONDUCT an experiment to implement the Huffman Encoding and Decoding in
MATLAB
Objective
The main purpose of this experiment is to understand the principle Huffman Encoding and decoding

Explanation
Huffman Coding-
l Huffman Coding is a famous Greedy Algorithm.
l It is used for the lossless compression of data.
l It uses variable length encoding.
l It assigns variable length code to all the characters.
l The code length of a character depends on how frequently it occurs in the given text.
l The character which occurs most frequently gets the smallest code.
l The character which occurs least frequently gets the largest code.
l It is also known as Huffman Encoding.

Prefix Rule
l Huffman Coding implements a rule known as a prefix rule.
l This is to prevent the ambiguities while decoding.
l It ensures that the code assigned to any character is not a prefix of the code assigned to any other
character.

Major Steps in Huffman Coding-


There are two major steps in Huffman Coding-
l Building a Huffman Tree from the input characters.
l Assigning code to the characters by traversing the Huffman Tree

Huffman Tree-
The steps involved in the construction of Huffman Tree are as follows-
Step-01:
l Create a leaf node for each character of the text.
l Leaf node of a character contains the occurring frequency of that character.

Step-02:
l Arrange all the nodes in increasing order of their frequency value.

Step-03:
l Considering the first two nodes having minimum frequency
l Create a new internal node.
l The frequency of this new node is the sum of frequency of those two nodes.
l Make the first node as a left child and the other node as a right child of the newly created node.

Step-04:
l Keep repeating Step-02 and Step-03 until all the nodes form a single tree.
l The tree finally obtained is the desired Huffman Tree.

Time Complexity-
The time complexity analysis of Huffman Coding is as follows-

l extractMin () is called 2 x (n-1) times if there are n nodes.


l As extractMin () calls minHeapify (), it takes O(logn) time.

Thus, Overall time complexity of Huffman Coding becomes


O(nlogn). Here, n is the number of unique characters in the given

text.

Software implementation

Encoding (using numarical values )

Encoding & decoding (using alaphatic )

Conclusion

Comments:

Lab Instructor Signature:

You might also like