diff --git a/simulations/awgn/.gitignore b/simulations/awgn/.gitignore new file mode 100644 index 0000000..e343d66 --- /dev/null +++ b/simulations/awgn/.gitignore @@ -0,0 +1,2 @@ +results/ +sim.py diff --git a/utils/simulations/awgn/Makefile b/simulations/awgn/Makefile similarity index 82% rename from utils/simulations/awgn/Makefile rename to simulations/awgn/Makefile index e58f3c6..b189403 100644 --- a/utils/simulations/awgn/Makefile +++ b/simulations/awgn/Makefile @@ -18,6 +18,7 @@ results/all.csv: $(PCAPFILES) %.pcap: sim.py @echo $@ mkdir -p results + export GR_CONF_DEFAULT_MAX_MESSAGES=123 $(eval REPETITION=$(shell python -c "print \"$@\".split(\"_\")[1]")) $(eval ENCODING=$(shell python -c "print \"$@\".split(\"_\")[2]")) $(eval SNR=$(shell python -c "print \"$@\".split(\"_\")[3]")) @@ -25,4 +26,5 @@ results/all.csv: $(PCAPFILES) @echo ENCODING=$(ENCODING) @echo SNR=$(SNR) ./sim.py --messages=$(MESSAGES) --encoding=$(ENCODING) --snr=$(SNR) --repetition=$(REPETITION) +#gdb -ex run -ex quit --args python ./sim.py --messages=$(MESSAGES) --encoding=$(ENCODING) --snr=$(SNR) --repetition=$(REPETITION) diff --git a/utils/simulations/awgn/parse.sh b/simulations/awgn/parse.sh similarity index 100% rename from utils/simulations/awgn/parse.sh rename to simulations/awgn/parse.sh diff --git a/utils/simulations/awgn/pdr.pdf b/simulations/awgn/pdr.pdf similarity index 76% rename from utils/simulations/awgn/pdr.pdf rename to simulations/awgn/pdr.pdf index 0827791..ce90045 100644 Binary files a/utils/simulations/awgn/pdr.pdf and b/simulations/awgn/pdr.pdf differ diff --git a/utils/simulations/awgn/plot.py b/simulations/awgn/plot.py similarity index 100% rename from utils/simulations/awgn/plot.py rename to simulations/awgn/plot.py diff --git a/utils/simulations/awgn/sim.grc b/simulations/awgn/sim.grc similarity index 86% rename from utils/simulations/awgn/sim.grc rename to simulations/awgn/sim.grc index c1be222..f25a90d 100644 --- a/utils/simulations/awgn/sim.grc +++ b/simulations/awgn/sim.grc @@ -108,6 +108,112 @@ 96000 + + analog_noise_source_x + + amp + 1 + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (916, 616) + + + _rotation + 90 + + + id + analog_noise_source_x_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + noise_type + analog.GR_GAUSSIAN + + + type + complex + + + seed + repetition + + + + blocks_add_xx + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (904, 496) + + + _rotation + 90 + + + id + blocks_add_xx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_inputs + 2 + + + vlen + 1 + + blocks_file_sink @@ -136,7 +242,7 @@ _coordinate - (40, 365) + (256, 388) _rotation @@ -152,7 +258,7 @@ unbuffered - True + False vlen @@ -183,7 +289,7 @@ _coordinate - (520, 568) + (688, 588) _rotation @@ -210,116 +316,6 @@ 1 - - blocks_null_sink - - alias - - - - bus_conns - [[0,],] - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (408, 424) - - - _rotation - 180 - - - id - blocks_null_sink_0 - - - type - complex - - - num_inputs - 1 - - - vlen - 1 - - - - channels_channel_model - - alias - - - - block_tags - False - - - comment - - - - affinity - - - - _enabled - True - - - epsilon - 1.0 - - - freq_offset - 0 - - - _coordinate - (704, 543) - - - _rotation - 0 - - - id - channels_channel_model_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - noise_voltage - 1 - - - seed - repetition - - - taps - 1.0 - - parameter @@ -337,7 +333,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (1016, 14) + (792, 11) _rotation @@ -396,7 +392,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (368, 543) + (512, 560) _rotation @@ -424,7 +420,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 - foo_periodic_msg_source + foo_random_periodic_msg_source alias @@ -447,7 +443,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (288, 181) + (392, 200) _rotation @@ -455,15 +451,15 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 id - foo_periodic_msg_source_0 + foo_random_periodic_msg_source_0 maxoutbuf 0 - msg - pmt.intern("".join([chr(random.randint(0,255)) for x in (lambda: (random.seed(repetition) == None) and range(pdu_len-24))()])) + msg_len + pdu_len - 24 minoutbuf @@ -475,12 +471,16 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 interval - interval + 5 quit True + + seed + repetition + foo_wireshark_connector @@ -506,7 +506,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (248, 373) + (464, 396) _rotation @@ -530,7 +530,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 - ieee802_11_ofdm_mac + ieee802_11_mac bss_mac [0xff, 0xff, 0xff, 0xff, 0xff, 0xff] @@ -557,7 +557,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (552, 216) + (720, 236) _rotation @@ -565,7 +565,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 id - ieee802_11_ofdm_mac_0 + ieee802_11_mac_0 maxoutbuf @@ -642,49 +642,6 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 import random - - parameter - - alias - - - - comment - message generation interval (in ms) - - - _enabled - True - - - _coordinate - (792, 21) - - - _rotation - 0 - - - id - interval - - - label - - - - short_id - - - - type - intx - - - value - 200 - - parameter @@ -744,7 +701,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (1032, 173) + (1048, 11) _rotation @@ -760,7 +717,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 short_id - + l type @@ -787,7 +744,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (216, 13) + (208, 11) _rotation @@ -803,7 +760,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 short_id - + r type @@ -877,7 +834,7 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 _coordinate - (568, 376) + (720, 408) _rotation @@ -895,28 +852,42 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 minoutbuf 0 + + bandwidth + 10e6 + chan_est - 0 + ieee802_11.LS encoding encoding + + frequency + 5.89e9 + sensitivity 0.56 - blocks_multiply_const_vxx_0 - channels_channel_model_0 + analog_noise_source_x_0 + blocks_add_xx_0 + 0 + 1 + + + blocks_add_xx_0 + wifi_phy_hier_0 0 0 - channels_channel_model_0 - wifi_phy_hier_0 + blocks_multiply_const_vxx_0 + blocks_add_xx_0 0 0 @@ -927,14 +898,8 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 0 - foo_periodic_msg_source_0 - foo_wireshark_connector_0 - out - in - - - foo_periodic_msg_source_0 - ieee802_11_ofdm_mac_0 + foo_random_periodic_msg_source_0 + ieee802_11_mac_0 out app in @@ -945,17 +910,11 @@ corresponds to BPSK 1/2, ..., 64-QAM 3/4 0 - ieee802_11_ofdm_mac_0 + ieee802_11_mac_0 wifi_phy_hier_0 phy out mac_in - - wifi_phy_hier_0 - blocks_null_sink_0 - 1 - 0 - wifi_phy_hier_0 foo_wireshark_connector_0