Alamouti code

To introduce Space Time Block Codes, we present The Alamouti code, an early space time code and still one of the most commonly used.
In this page, we discuss Alamouti code for 2transmitters-1receiver system(2x1) and 2transmitters-2receivers system(2x2).

                                                      ALAMOUTI 2X1

Encoding is done in the following manner:














            Y=HX+N ;                    Note: H is an Orthogonal Matrix.

            It is readily apparent that this is a rate-1 code. It takes two time-slots to transmit two symbols. The bit error rate (BER) of this STBC is equivalent to 2nR-branch maximal ratio combinig (MRC). This is a result of the perfect orthogonality between the symbols after receive processing — there are two copies of each symbol transmitted and nR copies received.

           This is a very special STBC. It is the only orthogonal STBC that achieves rate-1. That is to say that it is the only STBC that can achieve its full diversity gain without needing to sacrifice its data rate. Strictly, this is only true for complex modulation symbols. Since almost all constellation diagrams rely on complex numbers however, this property usually gives Alamouti's code a significant advantage over the higher-order STBCs even though they achieve a better error-rate performance.

Matlab Simulation
Alamouti Code for 2 transmitters and 1 receiver(2X1) in 16-QAM
          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.
First generate H matrix(Channel matrix) and then generate X matrix(16-QAM modulated input symbols) .
         Y=HX+N is the received matrix.

                                           DECODING OF ALAMOUTI 2X1 CODE
          For decoding Alamouti code, there are several methods like Zero Forcing(ZF), Minimum Mean Square Estimation(MMSE) ,Brute Force ML decoding etc..
          In the above mentioned decoding techniques ,ML decoding gives the best performance at the cost of maximum complexity when compared to other two.

As mentioned above Alamouti is an Orthogonal Code . So,the ML decoding simplifies to ZF decoding.

                                                              ZERO FORCING
     
         





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

Alamouti Code 2X1 16-Qam.m




















Now, we discuss the Alamouti code for two transmitters and two receivers.

                                                      ALAMOUTI 2X2
 We assume that the channel parameters remain constant during the two time slots.Encoding is done in the same manner as discussed in Alamouti 2X1 code.

Matlab Simulation
Alamouti Code for 2 transmitters and 2 receivers(2X2) in 16-QAM

In this 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.First generate H matrix(Channel matrix) and then generate X matrix(16-QAM modulated input symbols) .
         Y=HX+N is the received matrix. 

                                              DECODING OF ALAMOUTI 2X2 CODE
         This is similar to the decoding problem of Alamouti 2X1 Code.
As discussed earlier, the best performance is given by the brute force ML decoder which searches for the matrix X which minimizes the overall noise power.



          But, the orthogonality of H matrix ensures that the Brute force ML decoding simplifies to Zero forcing.

                                                         ZERO FORCING
          As discussed earlier 




 

Click the link below to view matlab code for Alamouti 16-QAM  2 Transmitters and 2 Receivers
Alamouti Code 16-QAM 2X2.m


Comparision Graph for 2X1 and 2X2 Alamouti Code for 16-QAM



Reference
A Simple Diversity Technique for Wireless Communication Siavash M Alamouti, IEEE Journal on selected areas in Communication, Vol 16, No, 8, October 1998


Related Posts
     Golden Code

37 comments:

  1. what version of matlab have you used?
    i use 7.14 and i get errors for randint and other functions

    ReplyDelete
    Replies
    1. Sorry for the late reply... I have used matlab version 7.10 (R2010a)

      Delete
  2. what is the function of kron?
    can you explain its role?
    if you change to QPSK, what will be the difference?

    Thanks

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

    ReplyDelete
  4. what about if h1 and h2 channels envelops follow Rician distribution, there will be any change to the current code?

    ReplyDelete
    Replies
    1. yes, you have to change the part of generation on h1 and h2. In the current code we have generated a complex gaussian with real and imag parts following normal distribution, but for Rician according to the parameter you need to vary real and imag parts.

      Delete
  5. thank you for helping. Could you please explain this code line by line ?

    ReplyDelete
  6. can you please provide us 4X4 MIMO matlab code. Because we are doing our project in MIMO SYSTEMS..Struggling to get output in changes we made for 4x4 mimo...

    ReplyDelete
  7. Hi there, I was wondering how would I implement OFDM with Alamouti, for a 2x1 MISO system?

    ReplyDelete
  8. Hi Mr Aragorn,
    If I want to change the modulation to 64-QAM, what should I change in your code?

    I've just changed the Average Constellation power to 48.

    ReplyDelete
  9. Hello Sir

    Can you please advice how can I implement OFDM with Alamouti for 2x2 MIMO System

    ReplyDelete
  10. hello sir
    i have question,,, when i run your code alamouti 2x2 QAM in matlab 7.1 error happened especially in part transmitter y3=modulate(modem.qammod(M),x); it said that "undefined variable 'modem' or class 'modem.qammod'"
    can you please explain to me why it happened? thankyou sir!

    ReplyDelete
  11. I need Matlab code for MIMO-OFDM with n no of antennas and rayleigh channel, V-blast.

    ReplyDelete
  12. i need matlab code for mimo system using stbc code....plzz reply soon

    ReplyDelete
  13. Efficient space–frequency block coded pilot-aided
    channel estimation method for multiple-input–
    multiple-output orthogonal frequency division
    multiplexing systems over mobile frequency-selective
    fading channels"... can any one help the matlab code for this IEEE paper.its urgent plz help transmitter code.

    ReplyDelete
  14. i need matlab code for ofdm- mimo system using stbc code.please

    ReplyDelete
    Replies
    1. Did you guys get the code? Ineed it

      Delete
    2. if you get the code then please tell me. i also need the same

      Delete
  15. can u please tell me why 10*log10(20) is used with snr

    ReplyDelete
  16. why modem.qammod(M) and y1=modulate(modem.qammod(M),x); are not working on my matlab.

    ReplyDelete
    Replies
    1. Have u found modem.qammod(M) and y1=modulate(modem.qammod(M),x)? If so, can you please send that to me? thanks!

      Delete
  17. Looking for MIMO Antenna Manufacturer, Mimo-antenna.net is well-known antenna manufacture & supplier from china offers best products at lowest price.

    ReplyDelete
  18. can you post the decoding process ?

    ReplyDelete
  19. Can any one give me the code for turbo code and convolution code comparisoms in alamouti 2×1

    ReplyDelete
  20. Can anyone give me 4x4 stbc code.It will be very much helpful.

    ReplyDelete
  21. Hello sir,
    can u give me the code of distributed space time block codes

    ReplyDelete
  22. HOW TO EXTRACT RESOURCE ELEMENTS FROM THE EQUALIZED RESOURCE GRID FOR 16QAM DEMODULATION?

    ReplyDelete
  23. Code white systemNorth American health-care facilities classifies Code White as an event of actual or potential abusive/violent/aggressiv.

    ReplyDelete
  24. Can anyone give me the code 3 ✖️2 and 2✖️3 alamouti code ,thanks in advance

    ReplyDelete
  25. www.llbeanvisa.com activate - Nice detail in this post. You've explained things on a basic level with graphs and charts to help us understand.

    ReplyDelete
  26. Great way to express the knowledgeable content. Hoping to continue this effort in future. Thanks for sharing.
    Payteamhealths
    www.getmyollocard.com
    www.myindigocard.com

    ReplyDelete
  27. y2=tg2+10^(-(snr(i)-10*log10(20))/20)*N1;

    I need to ask how to obtain this relation. what will be its form for BPSK, QPSK, 4-QAM etc?. Main point that I want to understand is addition of normalizing factor

    ReplyDelete
  28. Hey i think that its a brilliant article for real.
    fun games to play is similar to yours in terms of engagement.

    ReplyDelete