Академический Документы
Профессиональный Документы
Культура Документы
Where p(t) is the basic pulse shape and is assumed to be of rectangular form. This
type of modulation is usually used with binary phase-shift-keyed (BPSK) information.
The real transmitted signal is
() *()() (
)}
(1)
(2)
DSSS BPSK with Jamming Signal 11
Department of Electronics and Communication, LMCST
Since T
c
is chosen so that T
b
>>T
c
, then relative to the bandwidth of the BPSK
information signal, the bandwidth of the DS BPSK signal is effectively increased by the
ratio T
b
=T
c
.
1.3.1 Signal Transmission Method
Direct-sequence spread-spectrum transmissions multiply the data being transmitted
by a "noise" signal. This noise signal is a pseudorandom sequence of 1 and 1 values, at a
frequency much higher than that of the original signal. The resulting signal
resembles white noise. However, this noise-like signal can be used to exactly reconstruct
the original data at the receiving end, by multiplying it by the same pseudorandom
sequence (because 1 1 = 1, and 1 1 = 1). This process, known as "de-spreading",
mathematically constitutes a correlation of the transmitted PN sequence with the PN
sequence that the receiver believes the transmitter is using. The resulting effect of
enhancing signal to noise ratio on the channel is called process gain. This effect can be
made larger by employing a longer PN sequence and more chips per bit, but physical
devices used to generate the PN sequence impose practical limits on attainable processing
gain.
If an undesired transmitter transmits on the same channel but with a different PN
sequence (or no sequence at all), the de-spreading process results in no processing gain for
that signal. This effect is the basis for the code division multiple access (CDMA) property
of DSSS, which allows multiple transmitters to share the same channel within the limits of
the cross-correlation properties of their PN sequences.
DSSS BPSK with Jamming Signal 12
Department of Electronics and Communication, LMCST
1.3.2 PN Sequence
A pseudo noise(PN) sequence is a periodic binary sequence with a noise like
waveform that is usually generated by means of a feed back shift register. A feed back
shift register consist of an ordinary shift register made up of number of flip flops and a
logic circuit that are inter connected to form a multiloop feedback circuit. The flip flops in
the shifT register are regulated by a single timing clock. The logical circuit in feedback
shift register forms a boolean function.
Fig 1.3.1 Structure of a PN Sequence Generator
In CDMA communication system, for each channel the base station generates a
unique code that changes for every connection. The base station adds together all the
coded transmissions for every subscriber. The subscriber unit correctly generates its own
matching code and uses it to extract the appropriate signals.
g
r
g
r-1
g
r-2
g
0
g
1
m
r-1
m
r-2
m
0
DSSS BPSK with Jamming Signal 13
Department of Electronics and Communication, LMCST
In order for all this to occur, the pseudo-random code must have the following
properties:
It must be deterministic. The subscriber station must be able to independently
generate the code that matches the base station code.
It must appear random to a listener without prior knowledge of the code (i.e. it has
the statistical properties of sampled white noise).
The cross-correlation between any two codes must be small (see below for more
information on code correlation).
The code must have a long period (i.e. a long time before the code repeats itself).
A maximal length sequence is a simple shift register generator (SSRG) is a shift
register generator in which all feedback signals are returned to a single input.The sequence
generated by an N-stage SSRG is a maximal length sequence if it has length 2N-1.
The properties are:
Maximal length sequences have pseudorandomness properties
2
N-1
ones and 2
N-1
1 zeros
Balanced runs, except there is no run of N zeros
Binary valued autocorrelation function equal to 1 if M equals 0 and -1/N
otherwise.
1.3.3 Code Correlation
In this context, correlation has a specific mathematical meaning. In general the
correlation function has these properties:
It equals 1 if the two codes are identical
It equals 0 of the two codes have nothing in common
DSSS BPSK with Jamming Signal 14
Department of Electronics and Communication, LMCST
Intermediate values indicate how much the codes have in common. The more they
have in common, the harder it is for the receiver to extract the appropriate signal. There
are two correlation functions:
Cross-Correlation: The correlation of two different codes. As weve said, this should
be as small as possible.
Auto-Correlation: The correlation of a code with a time-delayed version of itself. In
order to reject multi-path interference, this function should equal 0 for any time delay
other than zero.
The receiver uses cross-correlation to separate the appropriate signal from
signals meant for other receivers, and auto-correlation to reject multi-path interference.
1.3.4 Pseudo-Noise Spreading
The coded Information data modulates the pseudo-random code, as shown in given
fig 1.6.
Fig 1.3.2 Spreading of the sequence
DSSS BPSK with Jamming Signal 15
Department of Electronics and Communication, LMCST
Some terminology related to the pseudo-random code:
Chipping Frequency (fc): the bit rate of the PN code.
Information rate (fi): the bit rate of the digital data.
Chip: One bit of the PN code.
Epoch: The length of time before the code starts repeating itself (the period
of the code). The epoch must be longer than the round trip propagation
delay (The epoch is on the order of several seconds).
1.3.5 Code Acquisition and Lock
The receiver generates its own complex PN code that matches the code generated
by the transmitter. However, the local code must be phase-locked to the encoded data.
1.3.6 Correlation and Data Despreading
Once the PN code is phase-locked to the pilot, the received signal is sent to a
correlator that multiplies it with the complex PN code, extracting the actual data. It is
shown in fig 1.7.
Fig 1.3.3 Despreading of the signal
DSSS BPSK with Jamming Signal 16
Department of Electronics and Communication, LMCST
Thus the local PN random generator that generates the PN waveform at the
receiver used for despreading must be aligned (synchronized) to within one chip of the PN
waveform of the received DS=BPSK signal. This is accomplished by employing some sort
of search algorithm which typically steps the local PN waveform sequentially in time by a
fraction of a chip (e.g., half a chip) and at each position searches for a high degree of
correlation between the received and local PN reference waveforms. The search terminates
when the correlation exceeds a given threshold, which is an indication that the alignment
has been achieved. After bringing the two PN waveforms into coarse alignment, a tracking
algorithm is employed to maintain ne alignment.
DSSS BPSK with Jamming Signal 17
Department of Electronics and Communication, LMCST
2. PROPOSED METHOD
2.1 AIM
Our aim is to carry out the baseband simulation of a DSSS communication system,
including the transmitter and receiver end and to estimate the bit error rate (BER). This
DSSS system uses BPSK modulation in AWGN channel. Performance comparison
between a basic BPSK and DSSS system is to be done. Further we wish to extend these
comparisons to evaluate the performance of the above two systems to sinusoidal jamming
interference. The antijamming characteristics and the processing gain of the DSSS system
is further explored for different values of jamming power; which is proportional to the
square of the amplitude of the jamming signal.
2.2 MOTIVATION FOR BASEBAND SIMULATION
The baseband description of the transmitted signal is very convenient because it is
more compact than the passband signal as it does not include the carrier component while
retaining all relevant information.
DSSS BPSK with Jamming Signal 18
Department of Electronics and Communication, LMCST
2.2.1 Pass Band System
S
1
(t)
S
Q
(t)
(
) (
)
Fig 2.2.1 Pass Band System
2.2.2 Baseband Equivalent System
Fig 2.2.2 Equivalent baseband diagram
The passband system can be interpreted as follows to yield an equivalent system
that employs only baseband signals:
baseband equivalent transmitted signal:
S(t) = S
I
(t) j S
Q
(t)
h
p
(t)
LPF
LPF
N
P
(t)
R
P
(t)
S
P
(t)
(
) (
)
R
1
(t)
R
Q
(t)
+
+
x x
x
x
h
p
(t)
+
N
P
(t)
R
P
(t)
S
P
(t)
(3)
DSSS BPSK with Jamming Signal 19
Department of Electronics and Communication, LMCST
baseband equivalent channel with complex valued impulse response: h(t).
baseband equivalent received signal:
R(t) = R
I
(t) j R
Q
(t).
complex valued, additive Gaussian noise: N(t)
Thus it can be summarized as follows
The baseband equivalent channel is much simpler than the passband model.
o Up and down conversion are eliminated.
o Expressions for signals do not contain carrier terms.
The baseband equivalent signals are easier to represent for simulation.
o Since they are low-pass signals, they are easily sampled.
No information is lost when using baseband equivalent signals.
Standard, linear system equations hold:
R(t) = s(t) h(t) +n(t)
R(f) = S(f ) H(f) +N(f )
(4)
(5)
(6)
DSSS BPSK with Jamming Signal 20
Department of Electronics and Communication, LMCST
2.3. PERFORMANCE EVALUATION OF THE SYSTEM
2.3.1 Processing Gain
Fig 2.3.1 Processing Gain
In a spread spectrum system, the process gain is the ratio of the spread bandwidth
to the unspread bandwidth. It is usually expressed in decibels (dB).The process gain does
not reduce the effects of wideband thermal noise. It can be shown that a direct sequence
spread spectrum (DSSS) system has exactly the same bit error behavior as a non-spread
spectrum system with the same modulation format. Thus, on an additive white Gaussian
noise (AWGN) channel without interference, a spread system requires the same
transmitter power as an unspread system, all other things being equal. PG helps to
measure the performance advantage of spread spectrum against narrow band waveforms.
Figure 2.3 illustrates the concept of processing gain for DS waveforms as seen at
the receiver end. The unspread signal is the narrowband PSK signal before applying the
widebandmodulation. The spread signal is with the addition of the wideband modulation
utilizing the PN code. It is apparent that the spread signal is wider in frequency BW but
with lower powerspectral density per Hz.
DSSS BPSK with Jamming Signal 21
Department of Electronics and Communication, LMCST
The spread signal is actually shown to be close to the noise floor.PG for a DS
system can be visualized as the jamming margin that exists as the difference between the
unspread and spread waveforms. The primary benefit of processing gain is its contribution
towards interference resistance. The PN code spreads the transmitted signal in bandwidth
and it makes it less susceptible to narrowband interference within the spread BW. The
receiver of a DS system can be viewed as unspreading the intended signal and at the same
time spreading the interfering waveform.
The processing gain is equal to the ratio of the chipping frequency to the data
frequency:
There are two major benefits from high processing gain:
Interference rejection: the ability of the system to reject interference is directly
proportional to PG.
System capacity: the capacity of the system is directly proportional to PG.
2.3.2. Antijamming Characteristics
Fig 2.3.2 Antijamming Characteristics
(7)
DSSS BPSK with Jamming Signal 22
Department of Electronics and Communication, LMCST
One of the most important application of spread spectrum techniques is that of
resistance to intentional interference or jamming.
( ) ( ) (
)
A predictor jammer observes the SS signal and via computational capabilities
breads the PN-code. It uses this knowledge of the code to predict the PN-code choice
made by the SS system and allocates its resources to jam that choice .The predictor
jammers ability to break the PN-code is a function of the code type and not a function of
the SS technique used. A follower jammer observes the PN-code choice made by the SS
system and allocates its resources to jam that choice . To be effective the follower jammer
must determine the PN-code choice, generate the appropriate jamming signal, and deliver
that jamming signal to the receiver prior to the receiver switching to the next PN-code
choice. The goal of a jammer is to disturb the communication of his adversary.
The goals of the communicator are to develop a jam-resistant communication
system under the following assumptions.
Complete invulnerability is not possible
Complete invulnerability is not possible bands, timing, traffic etc.
The jammer has no a priori knowledge of the PN spreading code
Protection against jamming waveforms is provided by purposely making the
information-bearing signal occupy a bandwidth far in excess of the minimum bandwidth
necessary to transmit it. This has the effect of making the transmitted signal assume a noise-
like appearance so as to blend into background.
(8)
DSSS BPSK with Jamming Signal 23
Department of Electronics and Communication, LMCST
2.3.3. SNR vs E
b
/N
0
Signal-to-Noise (SNR) is probably the most common and well understood
performance measure characteristic of a digital communication system. Most often this is
measured at the output of the receiver and is thus directly related to the data detection
process itself.
Signal-to-noise ratio is a term for the power ratio between a signal (meaning ful
information) and the background noise:
where Ps is average signal power and Pn is average noise power, and A is root mean
square (RMS) amplitude for signal and noise (for example, typically, RMS voltage).
E
b
/N
0
(the energy per bit to noise power spectral density ratio) is an important
parameter in digital communication or data transmission. It is a normalized signal-to-noise
ratio (SNR) measure, also known as the "SNR per bit".
(
where, E
b
Energy per bit
Power Spectral
Density
(10)
(9)
DSSS BPSK with Jamming Signal 24
Department of Electronics and Communication, LMCST
2.3.4. Bit Error Rate
The bit error rate or bit error ratio (BER) is the number of bit errors divided by the
total number of transferred bits during a studied time interval. BER is a unit less
performance measure, often expressed as a percentage. The bit error probability p
e
is
the expectation value of the BER. The BER can be considered as an approximate estimate
of the bit error probability. This estimate is accurate for a long time interval and a high
number of bit errors
.
Bit error Rate, sometimes bit error ratio (BER) is the most fundamental measure of
system performance. That is, it is a measure of how well bits are transferred end-to-end.
While this performance is affected by factors such as signal-to-noise and distortion,
ultimately it is the ability to receive information error-free that defines the quality of the
link .Bit error ratio (BER) is the number of bits received in error, divided by the total
number of bits received. It is the percentage of bits that have errors relative to the total
number of bits received in a transmission, usually expressed as ten to a negative power.
For example, a transmission might have a BER of 10-5, meaning that on average, 1 out of
every of 100,000 bits transmitted exhibits an error. The BER is an indication of how often
a packet or other data unit has to be retransmitted because of an error. If the BER is higher
than typically expected for the system, it may indicate that a slower data rate would
actually improve overall transmission time for a given amount of transmitted data since
the BER might be reduced, lowering the number of packets that had to be resent.
The BER can be considered as an approximate estimate of the bit error probability.
This estimate is accurate for a long time interval and a high number of bit errors.
DSSS BPSK with Jamming Signal 25
Department of Electronics and Communication, LMCST
In a noisy channel, the BER is expressed as a function of the normalized carrier-to-
noise ratio measure denoted E
b
/N
0
, (energy per bit to noise power spectral density ratio),
or Es/N0 (energy per modulation symbol to noise spectral density).
For example, in the case of BPSK modulation and AWGN channel, the BER as
function of the E
b
/N
0
is given by:
2.3.5 ERFC
It is the Complementary error function, defined as
()
2.3.6. Q function
Formally, the Q-function is defined as
()
In statistics, the Q-function is the tail probability of the standard normal
distribution. In other words, Q(x) is the probability that a normal (Gaussian) random
variable will obtain a value larger than x standard deviations above the mean.
(11)
(12)
(13)
DSSS BPSK with Jamming Signal 26
Department of Electronics and Communication, LMCST
Other definitions of the Q-function, all of which are simple transformations of the
normal cumulative distribution function, are also used occasionally. Because of its relation
to the cumulative distribution function of the normal distribution; the Q-function can also
be expressed in terms of the error function, which is an important function in applied
mathematics and physics. The Q-function can be expressed in terms of the error function,
or the complementary error function, as
()
The error function is closely related to the Q-function, which is the tail probability
of the standard normal distribution. The Q-function can be expressed in terms of the error
function as
() (
)
2.3.7. E
b
/N
0
vs. BER for a basic BPSK system in AWGN Channel
Consider a BPSK system in AWGN channel with energy per bit E
b
and noise
power spectral density N
0
/ 2. Here let us assume E
b
=1 unit.
Let us take
We know the bit error rate for BPSK in AWGN is given by
(14)
(15)
(16)
DSSS BPSK with Jamming Signal 27
Department of Electronics and Communication, LMCST
() ()
where Q( ) denotes the Q function
Probability of Error is given by ,
Since Eb=1 we have
( )
2.3.8. E
b
/N
0
vs. BER for a DSSS system in AWGN Channel
The bit error rate of a DSSS system for Eb=1 in AWGN channel is given by
( )
(17)
(18)
(19)
(20)
(21)
DSSS BPSK with Jamming Signal 28
Department of Electronics and Communication, LMCST
2.4. HIGH LEVEL DESIGN
Fig 2.4.1 High Level Design of DSSS
2.4.1 Transmitter
The data that we are applying will be in binary form. The information rate is R
bps, and the bit interval is T
b
==1/R seconds. For this purpose binary data generator is
provided. In modulator section the date that is generated is BPSK modulated. Binary
Phase Shift Keying (BPSK) is a type of phase modulation using 2 distinct carrier phases to
signal ones and zeros. BPSK is the simplest form of PSK. It uses two phases which are
separated by 180 and so can also be termed 2-PSK.
DSSS BPSK with Jamming Signal 29
Department of Electronics and Communication, LMCST
It does not particularly matter exactly where the constellation points are
positioned, and, in this figure, they are shown on the real axis, at 0 and 180. This
modulation is the most robust of all the PSKs since it takes serious distortion to make the
demodulator reach an incorrect decision. It is, however, only able to modulate at
1bit/symbol. Each modulated BPSK is spread into N chips by a DS spreader according to
random data pattern generally PN sequence generator. The PN sequence has much higher
data rate than information sequence. The information sequence is logically modulo 2
added with the PN sequence. The bandwidth of any digital system is inversely
proportional to duration of transmitted pulse. Because the transmitted DSSS chips are N
times narrower than information data bits, the bandwidth of DSSS signal is N times larger
than signal without spreading.
2.4.2 Channel
In the channel section a White Gaussian noise and a high power, high frequency
sinusoidal jamming signal are added to the signal. Additive White Gaussian Noise
(AWGN) is the statistically random radio noise characterized by a wide frequency range
with regards to a signal in a communications channel. The basic idea behind combatting
jamming channels is to increase the dimensionality of the signal. By increasing the
dimensionality of the signal in jamming environments, we force the jammer to transmit
power in each of the dimensions. The signal can then randomly choose a limited number
of the dimensions in which to transmit.
DSSS BPSK with Jamming Signal 30
Department of Electronics and Communication, LMCST
2.4.3 Receiver
The DSSS transmitter uses a locally generated PN code generator and de spreader
also called as receiver correlator to separate the desired coded information from all
possible signals. A DSSS is a special matched filter hat responds to signal that are
encoded with a PN code that matches its own PN code.
This correlator does not respond to manmade or natural noise and interference. The
peak of autocorrelation function is used to detect the transmitted bit. Autocorrelation
refers to correlating a bit pulse with itself. This involves multiplying the bit pulse with a
delayed version of itself and integrating the product over the pulse duration.
The DS despread signal is then demodulated with BPSK demodulator. Then the
signal is detected and it is compared with that of the binary data and with the help of error
counter error is noted.
2.4.4. PN Synchronization
In a spread spectrum system, the generated PN code at the receiver end must be
aligned to the received PN sequence, otherwise, the PN code misalignment will result in
ineffective de-spreading of the signal. Synchronization is usually accomplished first by an
acquisition of the initial PN code alignment and then followed by a tracking process to
eliminate a possible new phase shift introduced to the received signal during the signal
reception process. Without synchronization, the spread spectrum will appear as noise and
ineffective de-spreading will be achieved at the receiver end. Therefore, synchronization
of the PN code is crucial for data reception .Interference is added to the spread spectrum
signal during transmission through the channel. The characteristics of the interference
depend to a large extent on its origin. Usually the interference is categorized as being
either broadband or narrowband relative to the bandwidth of the information bearing
signal, and either continuous in time or pulsed in time.
DSSS BPSK with Jamming Signal 31
Department of Electronics and Communication, LMCST
3. APPLICATIONS
Used by European Galileo satellite navigation systems and The United States GPS
systems
DS-CDMA (Direct-Sequence Code Division Multiple Access) is a multiple access
scheme based on Direct-sequence spread spectrum, by spreading the signals from/to
different users with different codes. It is the most widely used type of CDMA.
Used in Cordless phones operating in the 900 MHz, 2.4 GHz and 5.8 GHz bands
Used in IEEE 802.11b 2.4 GHz Wi-Fi, and its predecessor 802.11-1999 used in
automatic meter reading.
Used in IEEE 802.15.4 (PHY and MAC layer for ZigBee)
Used in Satellite navigation
Used in Radio-controlled model vehicles
Miltary application such as antijam communication and low probability of
intercept(lpi)
Low probability of detection underwater acoustic communications
DSSS BPSK with Jamming Signal 32
Department of Electronics and Communication, LMCST
4. BENEFITS
Avoiding interception
In military communications, interception of hostile communications is commonly
used for various operations such as identification, jamming, surveillance or
reconnaissance. The successful interceptor usually measures the transmitted power in the
allocated frequency band. Thus, spreading the transmitted power over a wider band
undoubtedly lowers the power spectral density, and thus hides the transmitted information
within the background noise. The intended receiver recovers the information with the help
of system processing gain generated in the spread process. However, the unintended
receiver does not get the advantage of the processing gain and consequently will not be
able to recover the information. Because of its low power level, the spread spectrum
transmitted signal is said to be a low probability of interception (LPI) signal.
Privacy of transmission
The transmitted information over the spread-spectrum system cannot be recovered
without knowledge of the spreading code sequence. Thus, the privacy of individual user
communications is protected in the presence of other users. Furthermore, the fact that
spreading is independent of the modulation process gives the system some flexibility in
choosing from a variety of modulation schemes.
DSSS BPSK with Jamming Signal 33
Department of Electronics and Communication, LMCST
Resistance to fading
In a multipath propagation environment, the receiver acquires frequent copies of
the transmitted signal. These signal components often interfere with each other causing
what is commonly described as signal fading.
The resistance of the spread-spectrum signals to multipath fading is brought about
by the fact that multipath components are assumed to be independent. This means that if
fading attenuates one component, the other components may not be affected, so that
unfaded components can be used to recover the information.
Accurate low power position finding
The distance (range) between two points can be determined by measuring the time
in seconds, taken by a signal to move from one point to the other and back. This technique
is exploited in the Global Positioning System (GPS). Since the signal travels at the speed
of light (310
8
meters/sec)
Range in meters = 310
8
It is clear from the above expression that the accuracy of the transit time
measurement determines the ultimate range accuracy. In practice, the transit time is
determined by monitoring the correlation between transmitted and received code
sequences. The transit time can be computed by multiplying the code duration by the
number of code bits needed to align the two sequences. Clearly, higher resolution requires
code symbols to be narrow which means high code rates. Thus, the sequences are selected
to provide the required resolution so that if the code sequence has N chips, each with
duration Tc seconds, then:
(22)
(23)
DSSS BPSK with Jamming Signal 34
Department of Electronics and Communication, LMCST
Maximum range = 1.5NTc 10
8
meters
The range resolution requires the chip duration Tc to be small so that sequence
chip rate is as high as possible. On the other hand, maximum range requires a long
sequence (i.e. N is large) so that many chips are transmitted in a single sequence period.
The GPS system consists of twenty-four satellites orbiting the earth along six
orbital planes, spaced 60 degrees apart with nominally four satellites in each orbit. These
clusters of satellites provide any user with visibility of five to eight satellites from any
point on earth. The position, in 3-D, of a moving receiver and its speed can be measured
using signals received from at least four satellites. GPS provides two services. The precise
positioning service uses very long code sequence at a code rate of 10.23 MHz. The
standard positioning service, on the other hand, uses a shorter code (1023 bits) at a rate of
1.023 MHz. Each satellite is identified by a different phase of the short code.
Improved multiple access scheme
Multiple access schemes are designed to facilitate the efficient use of a given
network resource by a group of users. Conventionally, there are two schemes in use: the
Frequency Division Multiple Access (FDMA), and the Time Division Multiple Access
(TDMA). In FDMA, the radio spectrum is shared between the users such that a fraction of
the channel is allocated to each user at a time. On the other hand, in TDMA, each user is
able to access the whole of the spectrum at a unique time slot. The spread spectrum offers
a new network access scheme due to the use of unique code sequences. Users transmit and
receive signals with access interference that can be controlled or even minimized.
DSSS BPSK with Jamming Signal 35
Department of Electronics and Communication, LMCST
5. SOFTWARE USED
5.1 MATLAB SOFTWARE
MATLAB is a high-level language and interactive environment for numerical
computation, visualization, and programming. Using MATLAB, you can analyze data,
develop algorithms, and create models and applications. The language, tools, and built in
math functions enable you to explore multiple approaches and reach a solution than with
spreadsheets or traditional programming languages, such as C/C++ or Java. You can use
MATLAB for a range of applications, including signal processing and communications,
image and video processing, control systems, test and measurement, computational
finance, and computational biology. More than a million engineers and scientists in
industry and academia use MATLAB, the language of technical computing. It was written
originally to provide easy access to matrix software developed by LINPACK (linear
system package) and EISPACK (Eigen system package) projects. MATLAB is therefore
built on a foundation of sophisticated matrix software in which the basic element is matrix
that does not require pre dimensioning MATLAB includes a variety of tools for efficient
algorithm development, including:
Command Window Lets you interactively enter data, execute commands and
programs, and display results.
MATLAB Editor Provides editing and debugging features, such as setting
breakpoints and stepping through individual lines of code.
Code Analyzer Automatically checks code for problems and recommends
modifications to maximize performance and maintainability.
MATLAB Profiler Measures performance of MATLAB programs and identifies
areas of code to modify for improvement.
DSSS BPSK with Jamming Signal 36
Department of Electronics and Communication, LMCST
5.2 TYPICAL USE OF MATLAB
1. Math and computation
2. Algorithm development
3. Data acquisition
4. Data analysis, exploration and visualization
5. Scientific and engineering graphics
5.3 THE MAIN FEATURES OF MATLAB
High-level language for numerical computation, visualization, and application
development.
Interactive environment for iterative exploration, design, and problem solving.
Mathematical functions for linear algebra, statistics, Fourier analysis, filtering,
optimization, numerical integration, and solving ordinary differential equations.
Built-in graphics for visualizing data and tools for creating custom plots.
Development tools for improving code quality and maintainability and maximizing
performance.
Tools for building applications with custom graphical interfaces.
Functions for integrating MATLAB based algorithms with external applications
and languages such as C, Java, .NET, and Microsoft Excel.
Two-and three dimensional graphics for plotting and displaying data
A complete online help system
Powerful, matrix or vector oriented high level programming language for
individual applications.
Toolboxes available for solving advanced problems in several application areas
DSSS BPSK with Jamming Signal 37
Department of Electronics and Communication, LMCST
5.4 THE MATLAB SYSTEM
The MATLAB system consists of five main parts:
5.4.1 Development Environment
This is the set of tools and facilities that help you use MATLAB functions and
files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop
and Command Window, a command history, an editor and debugger, and browsers for
viewing help, the workspace, files, and the search path.
5.4.2 The MATLAB Mathematical Function Library
This is a vast collection of computational algorithms ranging from elementary
functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions
like matrix inverse, matrix Eigen values, Bessel functions, and fast Fourier transforms.
5.4.3 The MATLAB Language
This is a high-level matrix/array language with control flow statements, functions,
data structures, input/output, and object-oriented programming features. It allows both
"programming in the small" to rapidly create quick and dirty throw-away programs, and
"programming in the large" to create large and complex application programs.
DSSS BPSK with Jamming Signal 38
Department of Electronics and Communication, LMCST
5.4.4 Graphics
MATLAB has extensive facilities for displaying vectors and matrices as graphs, as
well as annotating and printing these graphs. It includes high-level functions for two-
dimensional and three-dimensional data visualization, image processing, animation, and
presentation graphics. It also includes low-level functions that allow you to fully
customize the appearance of graphics as well as to build complete graphical user
interfaces on your MATLAB applications.
5.4.5 The MATLAB Application Program Interface (API)
This is a library that allows you to write C and FORTRAN programs that interact
with MATLAB. It includes facilities for calling routines from MATLAB (dynamic
linking), calling MATLAB as a computational engine, and for reading and writing MAT-
files.
DSSS BPSK with Jamming Signal 39
Department of Electronics and Communication, LMCST
6. SIMULATION IN MATLAB
6.1 PARAMETERS FOR THE SYSTEM SIMULATION
System Specifications:
BPSK modulation, b {1,1} with equal probabilities
Square Pulses
integrate-and-dump receiver front-end
correlation receiver
Symbol period, T=1sec
Normalized received symbol energy, E
s
=1
Number of symbol=10
5
AWGN with zero mean and power spectral density
PN sequence of length 7 and 31
Performance Measure:
Bit-error rate as a function of E
b
/N
0
for DSSS system
BER vs. E
b
/N
0
of DSSS system as a function of sinusoidal jamming interference
amplitude.
DSSS BPSK with Jamming Signal 40
Department of Electronics and Communication, LMCST
6.2 SIMULATION RESULTS
Fig 6.2.1 Comparison between theoretical DSSS system and simulated baseband DSSS
system for PN of length 7
Fig 6.2.2 Comparison between theoretical DSSS system and simulated baseband DSSS
system for PN of length 31
DSSS BPSK with Jamming Signal 41
Department of Electronics and Communication, LMCST
Fig 6.2.3 Performance comparison between an ideal BPSK system and DSSS system in
presence of sinusoidal jamming interference
Fig 6.2.4 Plot for different values of jamming amplitude with PN length 7
DSSS BPSK with Jamming Signal 42
Department of Electronics and Communication, LMCST
Fig 6.2.5 Plot for different values of jamming amplitude with PN length 31
Fig 6.2.6 Performance plot of DSSS for different lengths of PN sequence
DSSS BPSK with Jamming Signal 43
Department of Electronics and Communication, LMCST
7. OBSERVATIONS
The theoretical probability of error vs. E
b
/N
0
(given in section 2.4.8) curve of a
DSSS system is plotted. This is done by using qfunc( )in MATLAB. This curve is
compared with the plot of probability of error vs. E
b
/N
0
of the baseband DSSS system we
simulated. The fig 6.1 represents this comparison. From the figure it is clear that the
simulated output is perfectly matching with the theoretical values.
We can also observe that the performance of DSSS BPSK is more reliable than a
basic BPSK modulated system. For E
b
/N
0
= -5 dB it is seen that the probability of error for
DSSS system is only 210
-2
while for basic BPSK it is 210
-1
.
Next objective was to evaluate the performance of the system when sinusoidal
jamming signal is added. In baseband system it is done by adding the amplitude of the
jamming sinusoid to the transmitted system. When sinusoidal jamming signal is added to
BPSK modulated system, the data cannot be retrieved reliably. This is evident from fig
6.3. since for a particular value of E
b
/N
0
the probability of error is very low for DSSS
BPSK when compared to BPSK. For Example, for E
b
/N
0
=0 dB, the probability of error for
DSSS system is 10
-4
and that of BPSK is 210
-1
.
The probability of error vs. E
b
/N
0
curve is plotted for different values of jamming
signal power. As the jamming power increases the probability of error also increases.
Hence as the amplitude of this interference increases, the curve is shifted upwards. For
example in fig 6.5 it is observed that if jamming power is doubled for E
b
/N
0
= 0 dB, BER
is increased from 10
-4
to 410
-4
.
DSSS BPSK with Jamming Signal 44
Department of Electronics and Communication, LMCST
An important parameter that affects the probability of error to a great extend is the
spreading factor, ie, the length of PN sequence. As the length of PN sequence increases
we can see that the probability of error decreases. Figure 6.6 shows the DSSS system for a
PN sequence of different lengths. From the figure it is seen that there has been an
improvement of probability of error from 10
-1
to 210
-4
for say E
b
/N
0
= 0 dB. This result
corroborates the fact that, when PN sequence of higher length is multiplied with the data
sequence, the data is transmitted like a high frequency noise and thus resists jamming
interference and noise.
DSSS BPSK with Jamming Signal 45
Department of Electronics and Communication, LMCST
8. CONCLUSIONS
In this project we have done the baseband simulation for complete DSSS system
and the performance characteristics (E
b
/N
o
vs. probability of error) is plotted. It is found
that this baseband simulation of DSSS system result is matching with the theoretical
equation for a PN sequence based BPSK system. Further we have added sinusoidal
jamming interference to the above system and obtained the performance comparison
results of a basic BPSK system and a DSSS system. We found that the DSSS system is
relatively insusceptible to sinusoidal jamming interference than BPSK system. We had
also carried out the above simulation with PN sequence of different length.
DSSS BPSK with Jamming Signal 46
Department of Electronics and Communication, LMCST
REFERENCE
[1] Dixon, Robert C. Spread Spectrum Systems. John Wiley and Sons, 1984
[2] Barnes, G.R. "Spread Spectrum Wireless Links," Fourth European Conference on
RadioRelay Systems, 39-44 (October 1993).
[3] Sklar, Bernard. Digital Communications Fundamentals and Applications. Prentice
Hall.
[4] R. A. Scholtz M. K. Simon, J. K. Omura and B. K. Levitt, Spread Spectrum
Communications Handbook, NY: McGraw-Hill, 1994
[5] Sung-Ming Wu,Guu Chang Yang,Cheng Yan Chang, A Two-Level FH-CDMA
Scheme for Wireless Communication Systems over Fading Channels, IEEE
Trans. On Commun., Vol. 59, No. 1, pp.38-44, January 2011.
[6] Sen,I Matolak,W.G Reduced-complexity bandwidth efficient multitone direct
sequence spread spectrum Vol. 59, No. 1, pp.131-134, April 2004.
[7] Lu RuiMin Ye GanHua ; Ma JinLing ; Li YongChao ; Huang Wei A
Numerical Comparison Between FHSS and DSSS in Satellite Communication
Systems with On Board Processing, pp.1-4, October 2009
[8] Y. Zhang, M. G. Amin, and A. R. Lindsey, Anti-jamming GPS receivers based on
bilinear signal distributions, in Proc. IEEE Military Commun. Conf., Vienna, VA,
Oct. 2001.
DSSS BPSK with Jamming Signal 47
Department of Electronics and Communication, LMCST
APPENDIX
close all;
clear all;
datal=100000;
pnl=7
A=.5
a0=1
a1=0
a2=1
for i=1:pnl % PN sequence generation
y=a2
d=xor(a0,a2)
a2=a1
a1=a0
a0=d
pn(1,i)=y
end
% pn=2*[ 1 0 1 0 0 1 1]-1
neg=-pn % negative of PN sequence
d=randint(datal,1,2); % data generation
for i1=1:datal % multiplying the data with PN Sequence
if d(i1)==0
trn(i1,:)=[neg'];
else
trn(i1,:)=[pn'];
end
end
pp = trn';
pp = pp(:);
ebno=-18;
for loop=1:25 % Adding Noise
z=10^(ebno/10);
No=1/z;
noisesignal=sqrt(No/2);
noise=noisesignal*randn(1,datal*pnl);
y1=pp'+noise;
y=y1+A; % Adding sinusoidal Jamming interference
% signal(equal to Amplitude in Baseband)
e1=1;
for i=1:datal % Retrieving the data
s=0;
i1=1;
for j1=e1:e1+pnl-1 % Integration & dump operation
s=s+(y(j1)*pn(i1));
i1=i1+1;
end
DSSS BPSK with Jamming Signal 48
Department of Electronics and Communication, LMCST
s=s/pnl;
if s>0 % Decision making
data(i)=1;
else
data(i)=0;
end
e1=(pnl*i)+1;
end
[num_error,er_rate]= symerr(d,data'); % Measuring BER
errbit1(loop)=er_rate;
snr1(loop)=ebno;
ebno=ebno+1;
end
ebno = -18:6; % Ideal curve using qfunction
z = 10.^(ebno/10);
ber= qfunc(sqrt(2*z));
spreading_factor = 7;
berpn = qfunc(sqrt(2*z*spreading_factor));
m=2
y=pskmod(d,m);
j=-18;
for i=1:25
yn1=awgn(y,j);
yn=yn1+A; % Adding Jamming interference to BPSK
yr= pskdemod(yn,m);
[num_error,er_rate]= symerr(d,yr);
errbit(i)=er_rate;
snr(i)=j;
j=j+1;
end
% Plotting of the results
semilogy(ebno,ber,'c-',ebno,errbit,'y-',ebno,berpn,'r-,ebno,errbit1,'k-
');
axis([-18 6 .00001 1]);
grid on
title('Probability of error Vs SNR Curve')
legend('Ideal BPSK','BPSK with Noise','Ideal DSSS','DSSS BPSK')
xlabel('Signal to Noise ratio')
ylabel('Probablity of error')