Skip to content

mohit1997/Jamming_Detection

Repository files navigation

Jamming_Detection

  1. quantizer.py (v2 and v3 are different ways of detecting attacks, non learning based) will generate data for various input probability and then after quantization at the reciever, use basic algorithm to detect jamming attack assuming the receiver knows when there is any attack. Following curve is generated: Attack Detection Curve
  2. MI_calc/mi.py calculates the mutual information or capacity of the two tap channel with AWGN. Setting A=0 or A=1 flips between whether the second tap is being attacked or not.
  3. plots/hist.py generates the histogram of the mean of the recieved frame of symbols.
  4. KLdiv.py uses KL divergence to distinguish between two distributions.
  5. gen_data.py generates data for two taps where one tap is always attacked and one is never affected externally.
  6. train.py trains a neural network to detect jamming attack based on the data generated by running gen_data.py.

To train a neural network

  1. Edit gen_data.py by changing the following values
p = 0.4 # Input Probability Distribution Followed
SNR = 1.0 # SNR of the both the channels
N = 100000 # Number of samples transmitted from each channel
  1. Run python gen_data.py.

  2. Run python train.py

Requirements

  1. Python 2/3
  2. Matplotlib
  3. Tensorflow 1.8 (GPU/CPU)
  4. Keras 2.2.2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published