Golden Code

Golden Code is a 2×2 algebraic perfect space-time code with unprecedented performance based on the Golden number (1+√5)/2. It is a full-rate, full-diversity Space-Time code for 2 transmit and 2 receive antennas, for the coherent MIMO channel. In this page, we discuss Golden code for 2transmitters-1receiver system(2x1) and 2transmitters-2receivers system(2x2).

Properties
  1. Full-rank : the determinant of the difference of 2 codewords is always different from 0.
  2. Full-rate : the four degrees of freedom of the system are used, which allows to send 4 information symbols.
  3. Non-vanishing determinant: The minimum determinant of the Golden Code is 1/5.
  4. Cubic shaping : each layer is carved from a rotated version of Z[i]^2.
  5. The spectral efficiency is  2log2(M) bits/s/Hz.

Encoding

The codewords X of the Golden Code are 2x2 complex matrices of the following form :









G is the  Generator matrix for Golden Code and Z is the martix containing real and imaginary parts of modulated symbols as rows.

This process is general for any  linear STBC.

 


Golden 2X1

Once we generate the encoded 16-QAM symbols, we transmit those symbols as shown in the fig. below. h1 and h2 are impulse responses of the two channels whose envelopes follows Rayleigh distribution.





We decode the received signal using Brute Force ML Decoding.

Matlab Simulation

            In this case, 2 channels are involved in every time slot whose channel impulse responses follow Rayleigh distribution.i.e h=x+iy; where x and y are Gaussian random variables. Generate H matrix(Channel matrix) and then X matrix(4-QAM modulated input symbols) .
          
          Y=HX+N is the received matrix, where H ={hij} is the 2x2 channel matrix with complex fading coefficients and N the 2x2 complex Gaussian noise matrix.
The channel matrix can be expanded into an 4x8 real-valued H matrix.

The received vector becomes Y = HGZ + N. where Y is the received matrix., where N is the real Gaussian noise vector,G is the Generator matrix and Z is the transmitted symbol matrix.

ML Decoding
              The best performance is given by the brute force ML decoder which searches for the matrix X which minimizes the overall noise power.
i.e.
 





But the ML decoder has a very high complexity in MIMO channels.
Despite this disadvantage, ML decoder is deployed in the case of 2X1Golden Code considering its performance.

Click the link below to view matlab code for Golden 4-QAM  2 Transmitters and 1 Receiver

Golden Code(4-QAM) 2X1
 
 Golden 2x2
Once we generate the encoded 16-QAM symbols, we transmit those symbols as shown in the fig. below. h1 and h2 are impulse responses of the two channels whose envelopes follows Rayleigh distribution.



 

We decode the received signal using Brute Force ML and Sphere Decoding techniques and then we compare the results.


Matlab Simulation

             Here,unlike 2X1 case, 4 channels are involved in every time slot whose channel impulse responses follow Rayleigh distribution.i.e h=x+iy; where x and y are Gaussian random variables. Generate H matrix(Channel matrix) and then X matrix(4-QAM modulated input symbols) .
          
             Y=HX+N is the received matrix, where H ={hij} is the 2x2 channel matrix with complex fading coefficients and N the 2x2 complex Gaussian noise matrix.
The channel matrix can be expanded into an 8x8 real-valued H matrix.

 


The received vector becomes
Y = HGZ + N. where Y is the received matrix., where N is the real Gaussian noise vector,G is the Generator matrix and Z is the transmitted symbol matrix.
We decode the received signal using Brute Force ML decoding and Sphere decoding.We conclude by comparing these two decoding techniques.

ML Decoding
                                           The best performance is given by the brute force ML decoder which searches for the matrix X which minimizes the overall noise power.i.e. 






But the ML decoder has a very high complexity in MIMO channels.
To compare the performances of a Brute force ML decoder and a sphere, an simulation of a Brute force ML decoder is also provided in this page.
                                                   To lower the complexity, a new type of decoding method called sphere decoding can be used. The sphere decoding algorithm has near ML performance with reasonably low complexity.

The Sphere Decoding Algorithm
                           The principle of sphere decoding algorithm is to search the closest constellation point to the received signal with in a sphere of some initial radius. If a point is found and if the distance between the centre and the point is less than the radius, the radius is updated to that distance and the  process is continued  till only one point is left in the sphere. That will be the closest constellation point to the received point. If a point is not found  initially, then the sphere radius is incremented and the same process is followed.

Let B=HG.
So,    Y = BZ + N. where Y is the received matrix.

We perform Gram-Schmidt orthonormalization of the columns of B ( QR decomposition of B )
to get
               B = QR
where R is an upper triangular matrix with positive diagonal elements and Q is a unitary matrix.
Let R = {r ij}.



The algorithm is presented for a fixed radius below.



To implement this algorithm in 4-QAM

                                          A Note On The Complexities





Click the link below to view matlab code for Golden Code 4-QAM  2 Transmitters and 2 Receiver using ML and Sphere Decoder

Golden Code(4-QAM) 2X2

 

Comparing Brute Force ML and Sphere decoding techniques.

 


 
Related Posts
     Alamouti Code

18 comments:

  1. Hey! Thank you for the really nice code. It is the only matlab code that i have found for encoding and decoding the golden code! I'am working with Alamouti and The Golden Code in my diploma thesis.

    Does anyone have an idea how to augment the 2x2 golden code matlab script to the BPSK, 16-QAM and 64-QAM case?

    With best regards
    David

    ReplyDelete
    Replies
    1. Dear David,
      Could you please send me matlab codes for sphere decoder for 4QAM and Alamouti decoder
      thanks

      Delete
  2. @David.
    Yes, you can augment the code for any M-ary QAM constellation, by changing brute force decoding part. Here,in our code of 4-QAM (2X2) we run the loop for 256 times(for ii=0:255). For M-ary QAM signal constellations you have to run it M^M times.

    ReplyDelete
    Replies
    1. "For M-ary QAM signal constellations you have to run it M^M times." Why?

      Delete
  3. hi,

    firstly, thank you for sphere decoding code.
    can you send me of matlab code for "sphere decoding without Golden code" ?

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. hey! i have a doubt in theory
    how the noise and channel matrix be a 2X2 matrix for 2X1 golden code since there are only 2 channels so only 2 noise and channel functions will be considered
    Also, give 2X2 H and N matrix elements

    ReplyDelete
  6. hey! can any one tell me how to prove the above properties

    ReplyDelete
  7. how muc time is required for compilation of 2*2 Golden code

    ReplyDelete
  8. thanks a lot for providing good codes

    I in need of Golden code for DSCDMA system please upload

    ReplyDelete
  9. Thanks for the code.
    Can you provide code for repetition coding

    ReplyDelete
  10. Thanks for the code.
    Can you provide code for repetition coding

    ReplyDelete
  11. Please,could you send me matlab code for sphere decoder for 4QAM

    ReplyDelete
  12. Please, could you send me Sphere decoder for 4-QAM matlab code.
    Thank you very much

    ReplyDelete
  13. Hi
    Can you any one help me in my research
    MIMO channel capacity improvement employing coding techniques

    ReplyDelete
  14. Hi
    Can you any one help me in my research
    MIMO channel capacity improvement employing coding techniques

    ReplyDelete
  15. Can you give me a matlab code for Golden code in AWGN channel instead of Rayleigh fading channel ?

    ReplyDelete