Authors:
- Mahdi Atallah
- Youssef Boughizane
- Yuri Chlebny
- Thomas Muller
Link to pdf file: Project description
- Split the message into blocks of
kbits. - Encode each block with the method described in exercise 3.
- Concatenate the encoded blocks to form the transmitted signal.
- Send the signal through a channel.
- Receive the signal and decode it block by block using the method described in exercise 3.
-
Choosing
$k$ : Let us first notice that the size of transmitted message is given by:len(message)$= n = 2^{k-1} \cdot \frac{240}{k}$ . Therefore, knowing that$n \leq 500000$ and$k>0$ and we find:$$2^{k-1} \cdot \frac{240}{k} \leq 500000 \iff \frac{2^{k-1}}{k} \leq \frac{6250}{3}$$ By numerically testing values, we find that the biggestkthat satisfies the above inequality isk = 16. Therefore, we must choose$0 < k \leq 16$ . We choose$k = 12$ since it respects the bounds and empirically doesn't take too much time to compute. -
Choosing
$\mathcal{E}$ :$$||x||^2 < 40960 \iff \frac{240}{k} \mathcal{E} < 40960 \iff \mathcal{E} < 2048$$ We chose$\mathcal{E} = 2025$ . -
We have the following upper bound for a single chunk:
$$p_e < \exp(-\frac{1}{8}(1-\frac{2\ln(2)}{A})^2Ak)$$ . Therefore, by the union bound, we have the following upper bound for the whole message:$$\mathbb{P}_e \leq \frac{240}{k}\exp(-\frac{1}{8}(1-\frac{2\ln(2)}{A})^2Ak)$$ . Plugging in our chosen values for$k$ and$\mathcal{E}$ , we find$\mathbb{P}_e \leq 0.04$
You need to run the file full_design,py in order to run the code.
Two command line arguments are required:
--modefollowed by the chosen mode (local,clientorerror_prob)- "local" mode is used to send a message on a simulated local channel.
- "client" mode is used to send a message to the provided server.
- "error_prob" mode is used to test the error probability of the channel(locally).
--input_stringfollowed by the message you want to send. If not provided, the default message is"saluttoutlemonde40charscestlaviehuhuhu12". Not required in the "error_prob" mode.
Examples :
python full_design.py --mode local --input_string "1234567890123456789012345678901234567890"python full_design.py --mode client --input_string "1234567890123456789012345678901234567890"python full_design.py --mode error_prob
transmitter.py: receives a message, encodes as described and outputs it to a file "client/transmitted_signal.txt" ("local/transmitted_signal.txt" in client mode). This file is then passed to the channel.receiver.py: receives the signal from the channel, decodes it and outputs the decoded message to a file "client/received_message.txt" ("local/received_message.txt" in client mode).full_design.py: main file that describes the full communication system i.e runs the transmitter, channel and receiver.