im final year student,can you help me to check my turbo code coding because i cannot the error..can you give me your email, so i can sent my codingfor to check..
really hope your respond and help.
I read your code very carefully and I do agree with someone's comment below that your transition of ALPHA and BETA have some problem.
For example, this line ALPHA(4,i)=((GAMMA(4,j)*ALPHA(4,i-1))+(GAMMA(2,j+1)*ALPHA(2,i-1)));
The first term is incorrect, GAMMA(4,j) means current input is 0, ALPHA(4,i-1) means previous state is 11, it wont go to current state 11. But your final result is correct, which confused me a lot.
Thank you for useful source code but can you , but sir i have question about your code :
- how i can adapt your code in 4-QAM case.
(for my modulator and demodulator please refer to this source code Matlab :
n = 3e4; % Number of bits to process
M=4; % Size of signal constellation
hMod = modem.qammod(M); % Create a 4-QAM modulator
hMod.InputType = 'Bit'; % Accept bits as inputs
hMod.SymbolOrder = 'Gray'; % Accept bits as inputs
hDemod = modem.qamdemod(hMod); % Create a 4-QAM based on the modulator
% Modulate data :
x = randi([0 1],n,1); % Random binary data stream
tx = modulate(hMod,x);
% at receiver side :
rx_demod = demodulate(hDemod,tx);
Following what u have done for bpsk,i have written the code for qpsk ...but the results are not as per expected...i have two questions:a)Can we do the decoding for the two bits in qpsk independently of each other,exactly identical to bpsk?That is the alpha beta calculations will be the same but only in the calculation of gamma,there will be two aprioris because the two bits are independent...?Or will the two bits interfere with each other?According to me,they wont because they lie on separate axes
b)After LLR computation,how will the decision be taken i.e.will the bit error rate be given by ber(k,iter)=sum(abs(decoded_bits1-SystematicBits1)+abs(decoded_bits2-SystematicBits2)) where SystematicBits indicate two different bit streams?
I would really appreciate some help as I am not getting the expected results...or if u have the code for this ,will u be so kind as to share it?
Your code is clear for me, but I have questions as follows:
1. I want to use a higher order modulation like QPSK or 16QAM. So, in the receiver, the received signal should be passed through demapper block first. Then, we get the values of LLR_demapper (soft demodulation), which becomes the input for the turbo decoder. My point here is, at the moment, the input of turbo decoder is not the original received signal, some parameters in your code should be changed right ? Like, channel reliability, etc. How we can do it ?
2. Just a comment. I do agree with the guy who ask you about using 1/sqrt(2*1/3*SNR) instead of 1/sqrt(2*SNR) as in your code.
Hi Dear Yogesh,
I am trying to generalize your code for a 16 state code, but I have a problem with your alpha and beta functions, I think they are wrong, but the result is right, and I'm confused a little. I would appreciate if you would help me with this:
first as I look at the trellis and the gamma(1:4, 1:2) and I think alpha and beta should be like this:
thanks a lot..
one small quastion,,in your code of encoder u r calculating in loop C0 and C1 and with this C0 and C1 you are calculating Po ans P1..its clear..but at which stage of Encoder diagram you r calculating co and c1?this is not so clear for me--i mean after feedback value and input or where ?
can u plz clear it..i will be thankful t u.
thanks Yogesh..i habe read this paper..its good..but can u tell me from which BOOK you have used this formula...i mean Reference of Book or any paper..
and how u demodelate your singal,because R0,R1 R2 are demodulated...'?
your code is very well!! But there is a thing that I don't understand and it is: I don't understand as you encode P1 and P0. I have readed the description in page 2 and 3 of your paper, but I don't understand, Could you explain me it? And as you implements it in the code?
I have not checked if there is any difference in the performance if we use extrinsic information.
If you want to use extrinsic information, just substract the intrinsic term given on page 4 of
from aposteriori information.
As from your code, the information you exchanged between two decoders is the a-posteriori information not extrinsic information as in theory. Is there any difference in the performance ? If I want to use extrinsic information in this case, how I can ? Thanks.
from your PDF report, you mentioned that only extrinsic information is exchanged between two BCJR decoders. However, in your MATLAB code, I think the exchanged information is the a-posteriori information. Is it correct? Thanks.
Yogesh, you should divide the SNR by 3 because the SNR is defined with respect to the energy per information bit (Eb), and not per coded bit (Es). This code has a rate of 1/3, right? Therefore, you need to consider the code rate when you corrupt the signal by noise.
Eb/No=(1/rate)*Es/No = (1/rate)*(mu^2)/(2*sigma^2)
Hey Yogesh. Are you sure the SNR scaling is correct in the turbo.m file? You assume a certain SNR, but you apply the same value to R0, R1 and R2, which is incorrect because you have not considered the code rate. The correct thing would be the following: instead
you should have written
because your code rate is 1/3.
By doing as you did the corruption is very less and your output BER is smaller.
Hi Yogesh.. i have an something to ask. actually whenever i'm increasing the snr gap, that is i'm changing it to 0.2 interval.. i am getting peaks .. like the graphs is shooting up and then coming down.. i wanted to know that is normal behaviour of turbo codes... i am getting little confused and even getting stressed as i am using your code as my base start for my dissertation .. please do lemme know about it.. please i am hope to hear from you soon
let's suppose that i have value "A"
I want to multiply the encoded data by it and than add noise then dividing the result by the same value then decode the resulting data:
suppose my data is X , and nose is N;
I want to do the following
then add noise ss=s+N
then the data that will be decoded=ss./A
am doing project in increasing energy efficiency using turbo code.... i calculated Eb value for BPSK modulation... have to substitute the Eb value in turbo code.... how can i do it....
plz give me your ans to my mail id:
There are two encoders. Information bits are coded using convolution code for the first encoder and their permutation is coded using convolution code for the second encoder, but only one bit is used for second encoder. So RSC encoder is rate 1/3.
You have not downloaded 'parity_bit' function which is used by turbo.m . That's why this error is coming. Download all the other functions (alpha_1, beta_1,gamma_1, parity_bit, lappr) and then run turbo.m