Professional Documents
Culture Documents
CERTIFICATE
This is to certify that the OOPS with JAVA programming assignment titled
“Simulation of Frequency-hopping spread spectrum” has been carried out
ANANYA G.M (1BM17CS015), ANJALI NAIR (1BM17CS016),
BATTULA PRAGATI (1BM17CS019) and DIKSHA JAIN (1BM17CS024) during the
academic year 2018-2019.
DECLARATION
Chapter 2: Screenshots
1.1 Objective
1.2 Introduction
1. Connections
CLASS: Server
This class is used to establish a port to port connection. The frequency
information and the modulated stream are read from text files and sent
to the client (demodulator).
CLASS: Client
This class receives the frequency information and modulated stream
from the server (modulator) and stores it in text files.
2. Signals
CLASS: DigitalSignal
The digital signal represents the binary data using NRZL scheme. This
class extends JPanel, paintComponent method is used to draw the
signal. Threads are used to animate the digital signal by making the
thread sleep at regular interval and updating the digital sequence to be
painted, repaint method is called after every update.
CLASS: Analog Signal
In the class, the carrier signal is generated. Sine wave equation is used
to obtain the data points for the wave according to the set frequency
sequence and period. This class extends JPanel. PaintComponent
method is used to draw the signal. Threads are used to animate the
analog signal by making the thread sleep at regular interval and
updating the data points to be painted. Repaint method is called after
every update.
3. Graphs
CLASS: FHSSGraph
FHSS graph is a hopping graph which represents the various frequencies
used as carrier at different intervals of time. The class extends JPanel
and paintComponent method is used to plot this graph.
4. Random frequencies
CLASS: RandomNumberGenerator
This class generates random numbers using the function:
Xn+1 = (a*Xn + b)mod m
The current system time in milliseconds is used as a seed for this
function.
CLASS: PseudoRandomCodeGenerator
This class generates a random frequency sequence within a pre-defined
range of frequencies using the generateRandom method of the
RandomNumberGenerator class.
5. Input
CLASS: InputReader
InputReader takes in the binary data and period from the user. Swings
are used to create the textboxes and the button and add them to a
JPanel. Event listener is used to validate the input data. Action listener
is added to the button and the inputs are stored.
6. Modulator
CLASS: ModulateSignal
Frequency-shift keying (FSK) Modulation is done here. The output of a
FSK modulated wave is high in frequency for a binary high input and is
low in frequency for a binary low input. The modulated frequency
stream is then written out to a file “ModulatedStream.txt”.
7. Demodulator
CLASS: DemodulateSignal
This class reads the frequency information and modulated streams
from their respective text files and obtains the bit stream by
demodulating the modulated stream.
8. Main
CLASS: ModulatorMain
This class puts together all the functionalities required by the
modulator. It creates a JFrame and places all the JPanels thereby,
creating a user interface. This is used to display the input taken from
the user, input signal, carrier signal, modulated signal and FHSS graph.
The modulated stream is then sent to the demodulator by the Server
class using a port to port connection.
CLASS: DemodulatorMain
This class puts together all the functionalities required by the
demodulator. It creates a JFrame and places all the JPanels thereby,
creating a user interface. The Client class receives modulated stream
from the modulator. The demodulated stream is then displayed along
with its NRZL representation.
Chapter 2: SCREEN SHOTS
Modulator:
Demodulator:
Chapter 3: NEW LEARNINGS FROM THE PROGRAMMING
ASSIGNMENT
Our project deal with transmitting data over a single channel. This
project can be further modified to include many channels of data
transmission by multiplexing the signals.
An encryption algorithm can be applied over spreading codes, to
improve the security of FHSS.
The project can be modified to send different kinds of data like images,
text messages, etc.