Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Need Source Code for Decoding _Using algorithm

Need Source Code for Decoding _Using algorithm

Scheduled Pinned Locked Moved C / C++ / MFC
algorithms
13 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U User 13229174

    Message-passing on the binary erasure channel

    Code word =[1 0 0 1 0 1]
    Y= [1 0 0 x x 1]

    Procedure DECODE(Y)

    I= 0 //Initialization
    For i= 1 :n do
    Mi=yi
    end for
    repeat

    for j= 1 :m do //Step 1: Check messages
    for all i ∈Bj do
    if all messages into check j other than M i are known then

    end if

    end for

    end for

    for i= 1 :n do //Step 2: Bit messages
    if Mi= ‘unknown’then

    Mi=Ej,i
    end if
    end if
    end for

    if all Mi known or I =Imax then //Test
    Finished

    else

    I=I+ 1
    end if

    until Finished

    end procedure

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    What is your question?

    U 1 Reply Last reply
    0
    • L Lost User

      What is your question?

      U Offline
      U Offline
      User 13229174
      wrote on last edited by
      #3

      I am working LDPC encoding and decoding for mini project work. With my effort i have completed LDPC encoding but struggling with LDPC decoding.

      Message-passing on the binary erasure channel

      Code word =[1 0 0 1 0 1]

      Y= [1 0 0 x x 1] // x = missing bit, need to find out the missing bit through Message-passing decoding algorithm.

      U 1 Reply Last reply
      0
      • U User 13229174

        I am working LDPC encoding and decoding for mini project work. With my effort i have completed LDPC encoding but struggling with LDPC decoding.

        Message-passing on the binary erasure channel

        Code word =[1 0 0 1 0 1]

        Y= [1 0 0 x x 1] // x = missing bit, need to find out the missing bit through Message-passing decoding algorithm.

        U Offline
        U Offline
        User 13229174
        wrote on last edited by
        #4

        Can anyone help me in writing C languageLDPC Decoding:Looking for logic using algorithm.-algo-png for decoding procedure. Please give me logic.

        L 1 Reply Last reply
        0
        • U User 13229174

          Can anyone help me in writing C languageLDPC Decoding:Looking for logic using algorithm.-algo-png for decoding procedure. Please give me logic.

          L Offline
          L Offline
          leon de boer
          wrote on last edited by
          #5

          The logic is available on wikipedia Low-density parity-check code - Wikipedia[^] You haven't written anything yet so have a go at writing the code and I am sure things will dawn on you.

          In vino veritas

          U 1 Reply Last reply
          0
          • L leon de boer

            The logic is available on wikipedia Low-density parity-check code - Wikipedia[^] You haven't written anything yet so have a go at writing the code and I am sure things will dawn on you.

            In vino veritas

            U Offline
            U Offline
            User 13229174
            wrote on last edited by
            #6

            I have already know that in Wikipedia, Low-density parity-check code is given but not the logic. I have gone through all the theory parts. Thanks for your logic.

            L 1 Reply Last reply
            0
            • U User 13229174

              I have already know that in Wikipedia, Low-density parity-check code is given but not the logic. I have gone through all the theory parts. Thanks for your logic.

              L Offline
              L Offline
              leon de boer
              wrote on last edited by
              #7

              If you have gone thru the problem them you should have already realized, you can't decode anything until you first sort out the type of encoding. LDPC isn't one thing it is a verbose description of any number of schemes it is an NP-complete code problem. So you may have read the wikipedia article but you don't understand it. Effectively you just asked us to help us build a vehicle and we don't know if it's a car, boat, truck, train, hovercraft or plane. Look all I can do is point you at GitHub - jontio/LDPC-4Qt: Forward Error Correction using LDPC codes with Qt C++[^] As it says the code on there is too slow and totally useless for any sort of real world use it will just get you to understand LDPC codes.

              In vino veritas

              U 1 Reply Last reply
              0
              • L leon de boer

                If you have gone thru the problem them you should have already realized, you can't decode anything until you first sort out the type of encoding. LDPC isn't one thing it is a verbose description of any number of schemes it is an NP-complete code problem. So you may have read the wikipedia article but you don't understand it. Effectively you just asked us to help us build a vehicle and we don't know if it's a car, boat, truck, train, hovercraft or plane. Look all I can do is point you at GitHub - jontio/LDPC-4Qt: Forward Error Correction using LDPC codes with Qt C++[^] As it says the code on there is too slow and totally useless for any sort of real world use it will just get you to understand LDPC codes.

                In vino veritas

                U Offline
                U Offline
                User 13229174
                wrote on last edited by
                #8

                Hi, I have completed my LDPC encoding part and got output. Now i switched over to LDPC decoding part. I know procedure of LDPC decoding very well, but in Coding part i am feel little bit difficult.

                P L 2 Replies Last reply
                0
                • U User 13229174

                  Hi, I have completed my LDPC encoding part and got output. Now i switched over to LDPC decoding part. I know procedure of LDPC decoding very well, but in Coding part i am feel little bit difficult.

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #9

                  If you know it very well, you should be able to write down the steps. Once you have the steps written down, you should then be able to further break them down into logical programming structures. You solve this just like any other programming problem by breaking it down and down until you have a clear understanding of what code needs to be written.

                  This space for rent

                  1 Reply Last reply
                  0
                  • U User 13229174

                    Hi, I have completed my LDPC encoding part and got output. Now i switched over to LDPC decoding part. I know procedure of LDPC decoding very well, but in Coding part i am feel little bit difficult.

                    L Offline
                    L Offline
                    leon de boer
                    wrote on last edited by
                    #10

                    So what form of the decoder are you trying to write? Some I am familiar with, others I am not. I don't claim to know every type of LDPC decoder on the planet. If you haven't chosen one then perhaps read an analysis .. this was done for the DVB-S2 specification [Investigation of LDPC code in DVB-S2]

                    In vino veritas

                    U 1 Reply Last reply
                    0
                    • L leon de boer

                      So what form of the decoder are you trying to write? Some I am familiar with, others I am not. I don't claim to know every type of LDPC decoder on the planet. If you haven't chosen one then perhaps read an analysis .. this was done for the DVB-S2 specification [Investigation of LDPC code in DVB-S2]

                      In vino veritas

                      U Offline
                      U Offline
                      User 13229174
                      wrote on last edited by
                      #11

                      I know concepts of message_passing decoding or bit_flipping decoding techniques. So i am trying C codes for message_passing decoding or bit_flipping decoding.

                      U 1 Reply Last reply
                      0
                      • U User 13229174

                        I know concepts of message_passing decoding or bit_flipping decoding techniques. So i am trying C codes for message_passing decoding or bit_flipping decoding.

                        U Offline
                        U Offline
                        User 13229174
                        wrote on last edited by
                        #12

                        Actually i am not getting about the type of decoder concerned with partially parallel or fully serial bcoz I have to implement the LDPC decoder with the help of belief propagation algorithm.In that process i have been provided with a H matrix,code word like [0 0 1 0 1 1] for a 4*6 matrix.The received word is r=[1 0 1 0 1 1] with a cross over probability of p=0.2. Now the steps which i have to follow for computation is as follows:- 1.in the first step using logp/1-p i have to find out the received word and it comes like r=[-1.3863,1.3863,-1.3863,1.3863,-1.3863,1.3863] 2.Since it is a 4*6 matrix M11=r1=-1.3863 and M31=r1=-1.3863 for i=2,M12=r2=1.3863 and M22=r2=1.3863 . . . . for i=6 M36=r6=-1.3863 and M46=r6=-1.3863 3.Extrensic information.It is calculated by using formula E11=log(1+tanh(M12/2)tanh(M14/2)/1-tanh(M12/2)tanh(M14/2)) Like that i have to calculate for eacha nd every node and finally a E matrix has been formed 4.calculation of LLR L1=r1+E11+E31=some value . . . . L6=some value finally on the basis of BPSK scheme Z=[0 0 1 0 1 1] 5.To check if Z is a valid codeword S=Z.H transpose if it comes like [0 0 0 0] then my code word is correct otherwise have to go for next iteration. Please tell me how should i proceed.Its a total mathematical calculation.I am stuck with the point of taking matrix as a input.If i take it as an array also then how should i calculate that tanh calculation.

                        L 1 Reply Last reply
                        0
                        • U User 13229174

                          Actually i am not getting about the type of decoder concerned with partially parallel or fully serial bcoz I have to implement the LDPC decoder with the help of belief propagation algorithm.In that process i have been provided with a H matrix,code word like [0 0 1 0 1 1] for a 4*6 matrix.The received word is r=[1 0 1 0 1 1] with a cross over probability of p=0.2. Now the steps which i have to follow for computation is as follows:- 1.in the first step using logp/1-p i have to find out the received word and it comes like r=[-1.3863,1.3863,-1.3863,1.3863,-1.3863,1.3863] 2.Since it is a 4*6 matrix M11=r1=-1.3863 and M31=r1=-1.3863 for i=2,M12=r2=1.3863 and M22=r2=1.3863 . . . . for i=6 M36=r6=-1.3863 and M46=r6=-1.3863 3.Extrensic information.It is calculated by using formula E11=log(1+tanh(M12/2)tanh(M14/2)/1-tanh(M12/2)tanh(M14/2)) Like that i have to calculate for eacha nd every node and finally a E matrix has been formed 4.calculation of LLR L1=r1+E11+E31=some value . . . . L6=some value finally on the basis of BPSK scheme Z=[0 0 1 0 1 1] 5.To check if Z is a valid codeword S=Z.H transpose if it comes like [0 0 0 0] then my code word is correct otherwise have to go for next iteration. Please tell me how should i proceed.Its a total mathematical calculation.I am stuck with the point of taking matrix as a input.If i take it as an array also then how should i calculate that tanh calculation.

                          L Offline
                          L Offline
                          leon de boer
                          wrote on last edited by
                          #13

                          You have totally lost me ... you are giving me the formulas tanh is a standard C/C++ function (C library function - tanh) You have the matrix coefficents and like you said the E matrix first coefficent is E11=log(1+tanh(M12/2)tanh(M14/2)/1-tanh(M12/2)tanh(M14/2)) So plug the numbers in and calculate your E matrix coefficents You do all your other calculations and then transpose the matrix .. you know C Program to Find Transpose of a Matrix] You need to explain this statement => "how should i calculate that tanh calculation". I simply don't get it tanh is a trig function like sine/cosine/tan and it just needs "#include " and you have it on any C/C++ compiler that meets the oldest C89 standard. You gave me coefficent values above so I know you know what M12,M14 are and you know what a 2 is. So I query why you ask me how do you do the tanh calculation, why didn't you ask me how you do the log calculation? What is the difference between those that is causing your problems?

                          In vino veritas

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups