LDPC Code Simulation
by Shaikh Faisal Zaheer
09 Nov 2005
(Updated 27 Dec 2005)
MATLAB code for LDPC (Low-Density Parity-Check) Codes simulation over the AWGN channel.
|
Watch this File
|
| File Information |
| Description |
The zip file contains
1. A 128x256 Regular (3,6) H matrix (if you need to simulate other codes, need to write your own code for generating those parity check matrices). The file '128x256regular_v6.mat' is for those using Matlab 6.5.
2. Files for LDPC code simulation over the AWGN channel.
3. Matlab-based and C-based (C-mex file)implementation of the LDPC decoder. The main simulation script contains the commands for the use of both decoders (there are 2 C-based decoders and one Matlab based). The commands for the decoder that are going to be used need to "uncommented", and those for the other decoder need to be "commented".
3a. To compile the C-mex file, need to install a C compiler (I have used Miscosoft Visual C++ 6.0). Then have to go to the Matlab command window and do
">>mex -setup" (then go through the steps of selecting the desired compiler).
Then do:
">>mex decode_ldpc.cpp" (or ">>mex decode_ldpc_new.cpp"). This will produce a "dll" file by the name of "decode_ldpc.dll" (or "decode_ldpc_new.dll"), and this can then be used by the main script for simulation. I am including already compiled "dll" files which work with Maltab 7.0 (and Matlab 6.5). However if the included "dll" files do not work for you then you have to compile the "*.cpp" files using the method explained above.
3b. The Matlab code uses "Sparse" implementation for the various matrices, and is therefore makes efficient use of memory (this makes some difference if you -like me- use a standard PC for simulation and are using large H matrices that have block length greater than 3000). However if memory and CPU power and not your limitations then the C-based decoder is much faster.
4. The bit errors are counted over the entire code word. The main script needs to be modified for counting bit errors if a systematic matrix is being used.
5. The modulation used is BPSK.
To run a simulation
1. Open the script file by the name of
"generic_simulator_nonsys.m"
2. Load a H (parity-check) matrix
3. Set the SNR range
4. Set maximum number of decoder iteration, and maximum number of errored codewords to count for each SNR point (must be at least 30 for reliable estimate, the papers show results for 100-200 codeword errors. OUCH!!!).
5. Select the C-based OR Matlab-based LDPC decoder.
5A. The decoder "decode_ldpc_new" is much faster than "decode_ldpc" (the difference in speed increases with block length).
6. Run the script and wait for the results :) . |
| MATLAB release |
MATLAB 7 (R14)
|
| Other requirements |
Microsoft Visual C++ 6.0 (or later version) to compile C-mex file (which is the C-based LDPC decoder). |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (51) |
| 13 Nov 2005 |
aravind ramanujam
|
|
|
| 30 Nov 2005 |
sudheer reddy
|
|
|
| 30 Dec 2005 |
Alberto Lopes
|
|
|
| 31 Dec 2005 |
Falah Zawahemah
|
|
|
| 31 Dec 2005 |
Cindy Zhang
|
|
|
| 16 Jan 2006 |
daner riau
|
|
|
| 23 Jan 2006 |
Ahmed Youssof
|
|
|
| 06 Feb 2006 |
m khob
|
|
|
| 07 Feb 2006 |
aaron hsieh
|
|
|
| 19 Feb 2006 |
Marcos Müller
|
|
|
| 19 Mar 2006 |
Chhay Kong
|
|
|
| 18 Apr 2006 |
Dai Brian
|
|
|
| 18 Jun 2006 |
LILIAM RODRIGUEZ
|
|
|
| 22 Jun 2006 |
Yang Xiao
|
|
|
| 09 Sep 2006 |
César Carmona Tapia
|
|
|
| 15 Sep 2006 |
xue lian
|
|
|
| 16 Sep 2006 |
Rajdeep Singh
|
|
|
| 27 Sep 2006 |
hi how r u
|
|
|
| 09 Oct 2006 |
hrishikesh tapse
|
|
|
| 29 Oct 2006 |
Farzad Talebi
|
|
|
| 12 Nov 2006 |
shahla motadi
|
|
|
| 17 Nov 2006 |
Hrishikesh Tapse
|
|
|
| 12 Jan 2007 |
qin xing
|
|
|
| 04 Feb 2007 |
Mo Wen
|
|
|
| 22 Feb 2007 |
Samuele Bandi
|
|
|
| 21 Mar 2007 |
Rossi Enrico
|
|
|
| 25 Mar 2007 |
w wj
|
|
|
| 02 Apr 2007 |
sarada devi
|
|
|
| 02 Apr 2007 |
santhosh rajiv
|
|
|
| 02 Jul 2007 |
Ma hao
|
|
|
| 10 Aug 2007 |
Nguyen Danh Khoa
|
|
|
| 10 Aug 2007 |
nguyen Danh Khoa
|
|
|
| 27 Aug 2007 |
abc edd
|
|
|
| 21 Sep 2007 |
Mo Hoq
|
|
|
| 19 Dec 2007 |
Jesada Sartthong
|
|
|
| 06 Mar 2008 |
kalpesh patel
|
|
|
| 14 Mar 2008 |
Hendra setiawan
|
|
|
| 27 May 2008 |
thuyoanh pham
|
|
|
| 12 Jun 2008 |
xia gj
|
|
|
| 10 Jul 2008 |
Sabah Sewan
|
|
|
| 30 Jul 2008 |
kashif malik
|
|
|
| 04 Aug 2008 |
FAISAL ZAHEER
|
|
|
| 15 Sep 2008 |
Lishin Wang
|
|
|
| 19 Sep 2008 |
feng x xiaojing
|
|
|
| 14 Nov 2008 |
gaddam hemanth
|
|
|
| 15 Mar 2010 |
subhashini gupta
|
|
|
| 15 Mar 2010 |
Deep
|
|
|
| 04 Apr 2010 |
zhao long
|
|
|
| 05 Apr 2010 |
subhashini gupta
|
|
|
| 09 Jul 2011 |
vaggelis1989
|
|
|
| 19 Aug 2011 |
Khandaker Mahmood
|
|
|
| Updates |
| 13 Dec 2005 |
The code for LDPC code simulation has now been enhanced. The C-Mex based LDPC decoder is now at least twice as fast as before (the old code is still included). |
| 27 Dec 2005 |
The update contains a bug fix: the program part for finding 1's in the H matrix for input to the new C-based decoder used the 'hist' function, which sometimes caused an error This problem has now been fixed. |
|
Contact us at files@mathworks.com