# Chapter 15 : Spread Spectrum Modulation¶

## Example 15.1 Page No : 764¶

In :
import math

#Signal Power data rate fb  =  100 Kbps
fb  =  10.**5;

#Signal Strength Ps  =  1 mW
Ps  =  1*10.**(-3);

#Chip frequency fs  =  100 MHz
fs  =  10.**8;

#Noise Spectral Density n  =  2*10**(-9) W/Hz
n  =  2*10.**(-9);

#Jamming Signal power is Pj  =  1 W
Pj  =  1.;

#Procesmath.sing Gain P
P  =  fs/fb;
print 'Procesmath.sing Gain is ',P

#Bit Interval T
T  =  1/fb;
print 'Bit Interval is ',T,'s'

#Energy per bit Eb
Eb  =  Ps*T;
print 'Energy per bit is ',Eb

#Error Probability without jamming E_without_jamming
E_without_jamming  =  0.5*math.erfc((Eb/(n))**0.5);
print 'Error probability without jamming is %.4f'%E_without_jamming

#Error Probability with jamming E_jamming
E_jamming  =  0.5*math.erfc(((2*Ps*P)/(Pj))**0.5);
print 'Error probability jamming is %.4f'%E_jamming

Procesmath.sing Gain is  1000.0
Bit Interval is  1e-05 s
Energy per bit is  1e-08
Error probability without jamming is 0.0008
Error probability jamming is 0.0228


## Example 15.2 Page No : 764¶

In :
#Chip Rate fc  =  110 MHz
fc  =  10*10**6;
Tc  =  1./fc;

#Delay D  =  0.1 ms
D  =  0.1*10**-3;

#Speed of light c  =  3*10**8 Kmps
c  =  3*10**8;

#Estimated Dismath.tance d
d  =  0.5*c*D;

#Tolerance Tol
Tol  =  0.5*c*Tc;

print 'The target is between ',d-Tol,' metres and ',d+Tol,' metres of the source.'

The target is between  14985.0  metres and  15015.0  metres of the source.


## Example 15.3 Page No : 769¶

In :
#Number of Flip Flops N
N  =  13.;

#Maximal length of sequence L
L  =  2**N - 1;

#Upper Bound S
S  =  (L - 1)/N;

#No of basic sequences and mirror images
print 'No of basic sequences and mirror images is ',S/2

No of basic sequences and mirror images is  315.0