Interference Management Project's source files
There are c++ source files written by senior communication engineers and Matlab source files written by Lawrence and Kyle.
This instruction will tell you:
- What is this project about?
- About C++ source files
- About Matlab source files
- How to take advantage of Sockeye
To be continued
These .cpp
file should be executed under Linux. You can find an old spare laptop to install a Linux, or install VM into your Windows computer, or you can install subsystem into your Windows.
It is not hard to install linux, there are bunch of videos on youtube teaching how to install Linux. Here are instructions for how to install Itpp library after you get your Linux system.
-
- Intructions can be found on IT++ website.
- Ubuntu 18.04 is not tested for installing or compiling.
$ wget https://sourceforge.net/projects/itpp/files/itpp/4.3.1/itpp-4.3.1.tar.bz2 $ bzip2 -cd itpp-4.3.1.tar.bz2 | tar xf - $ cd itpp-4.3.1 $ mkdir build $ cd build // install cmake and g++ in case they are not installed $ sudo apt update $ sudo apt install cmake $ sudo apt install g++ $ sudo apt install libitpp-dev
Right now you can compile
.cpp
file which using functions from itpp library. To test that, you can draft a test code.$ cd $HOME/<YOUR_USER_NAME>/itpptest $ vim itpptest.cpp
In this
itpptest.cpp
file type in:#include<itpp/itcomm.h> #include<iostream> using namespace itpp; using std::cout; using std::endl; int main(){ BPSK bpsk; cout<<"Hello it++ library"<<endl; return 0; }
Next, is the compiling and linking part,
$ g++ `itpp-config --cflags` -o itpptest itpptest.cpp `itpp-config --libs`
After this step, there should be an executable file,
itpptest
in itpptest folder$ ./itpptest
You should see:
Hello it++ library
-
If you installed Ubuntu on your old spare laptop, it is easier to install itpp library.
- Install Synaptic Package Manager onto your Ubuntu
- Search for *it++ *
- Install all the packages from the results.
Or, you can follow the instructions from this video
After installing ITPP on your Linux, we should compile the source file from SWSC.zip
In SWSC folder, there is one called update, under this folder:
$ vim makefile
Type in:
SWSC:
g++ -c main_swsc_single.cpp
g++ -c turbo_rev.cpp
g++ -c nit_coding.cpp
g++ `itpp-config --cflags` -o program main_swsc_single.o turbo_rev.o nit_coding.o `itpp-config --libs`
Next, in command line:
$ make SWSC
$ ls
You should see a file named program
, which is an executable file made by makefile.
Then,
$ ./program 512 1024 6 4.6 0.2 4000
After about 2 min, the result of this simulation will be shown.
Generate LDPC code ---> Treat Interference as Noise ---> P2P SWCM ---> 2-user SWSC vs. IAN
-
ldpc_gen.cpp
This file is an example on IT++ sourceforge.
It can generate different LDPC code and store them into .it files.
The rate of these LDPC codes are all 0.5, but the component code rate may differ. Also, some of them are regular, others are irregular.
$ make ldpc_gen $ ./ldpc_gen
-
ldpc_gen_regular
Generating customized LDPC regularcode.
e.g. To generate a LDPC code with code Near =� 1024, component convolutional code K = 3, N = 6.
$ make ldpc_gen_regular $ ./ldpc_gen_regular 1024 3 6
-
IAN
-
point 2 point process showing below:
message --> LDPC encoding --> modulation --> AWGN --> demodulation --> LDPC decoding
-
2 user transmit messages following the above process, and one interferes the other.
e.g. One code (2048_3_6) interfered by another (2048_3_8) and INR is 10dB.
$ make IAN $ ./IAN LDPC_code_2048_3_6_R.it LDPC_code_2048_3_8_R.it 10
-
-
SWCM_p2p
message --> LDPC encoding --> SWCM encoding --> modulation --> AWGN --> demodulation --> LDPC & SWSC decoding
e.g. Transfer one message encoded by LDPC(2048_3_6) and SWCM through AWGN, SNR = 10dB, block_num = 20
$ make SWSC_p2p $ ./SWSC_p2p LDPC_code_2048_3_6_R.it 10 20
-
SWSC_IAN
One message transferred through SWCM channel, the other normal transmission would interfere SWCM channel.
e.g. one LDPC code (2048_3_6) go through SWCM channel and another code(1024_3_6) interferes the former. (Ratio of Nvar MUST be 2:1)
$ make SWSC_IAN $ ./SWSC_IAN LDPC_code_2048_3_6_R.it LDPC_code_1024_3_6_R.it 8 20
ldpc_gen:
g++ `itpp-config --cflags` -o ldpc_gen ldpc_gen.cpp `itpp-config --libs`
ldpc_simulation:
g++ `itpp-config --cflags` -o ldpc_simulation LDPC_simulation.cpp `itpp-config --libs`
ldpc_gen_test:
g++ `itpp-config --cflags` -o ldpc_gen_test ldpc_gen_test.cpp `itpp-config --libs`
ldpc_simu_test:
rm -rf ldpc_simu_test
g++ `itpp-config --cflags` -o ldpc_simu_test ldpc_simu_test.cpp `itpp-config --libs`
ldpc_gen_regular:
g++ `itpp-config --cflags` -o ldpc_gen_regular ldpc_gen_regular.cpp `itpp-config --libs`
test:
g++ `itpp-config --cflags` -o test test.cpp `itpp-config --libs`
SWSC:
g++ -c -g SWSC.cpp
g++ -c -g SWSC_LDPC_SIMU.cpp
g++ `itpp-config --cflags` -o SWSC SWSC.o SWSC_LDPC_SIMU.o `itpp-config --libs`
IAN:
g++ `itpp-config --cflags` -o IAN IAN_LDPC_SIMU.cpp `itpp-config --libs`
# SWSC:
# g++ `itpp-config --cflags` -o SWSC SWSC.cpp `itpp-config --libs`
Most of the MATLAB based simulation follow the same process but different functions compared with C++ files. Unlike C++ file, MATLAB file is easy to compile. Since this README file is run as a specification of how to compile and run these source files, I don't waste much explanation here for the MATLAB source file.
You can find how we do simulation either from the annotation in the source files or in my report.
Here is the user manual for UBC Sockeye Server.
As the simulation scaling up, we may use this powerful server to run our source files. Yet, we haven't gone that far.