0

I have 100 SNR (signal to noise ratio),

    SNR=[32.48873121,21.11297791,15.04042054,15.03765931,14.9860986,14.70063992,14.0914781,12.63557416,11.90471529,10.66141951,10.61423996,8.872149307,7.489301489,7.409686903,5.356321373,4.42000844,4.137654873,3.884999624,3.784549782,3.348447225,3.285491969,3.197460245,2.848888812,2.160133333,1.915260409,1.563950453,1.329209884,1.191461459,0.790756594,0.611525663,0.575573311,0.140882111,-0.036497656,-0.111073002,-0.258210049,-0.848790033,-1.25026649,-1.446774222,-2.080726269,-2.359212956,-2.516335413,-2.595010771,-3.063688167,-3.257431493,-3.283558882,-3.351236489,
-3.466831795,-3.665976748,-3.821897741,-4.51332461,-4.564700129,-4.718940301,-4.79394587,-4.85247625,-5.000716016,-5.129179148,-5.393944029,-5.499661228,-5.550047619,-5.671860615]

For this particular SNR i have found BLER (block error rate) by using the following code:

SNR_L = [-8 -6 -4 -2];
L = [0.1231 0.0366 0.0082 0.0014]; 
logL=log10(L);
p=polyfit(SNR_L,logL,1);
semilogy(SNR_L,L,'k-s');
grid on;

for i=1:100
BLER(i)=p(1,2)+p(1,1)*SNR(i);
end

Here i am using the graph that i find from this code-semilogy(SNR_L,L,'k-s').As i am using polyfit and degree=1 then i find 2 coefficient,like y=a0+a1x.So to find BLER I am using this code BLER(i)=p(1,2)+p(1,1)*SNR(i). As I am finding 100 SNR that's why finally I use for loop to find 100 BLER for corresponding SNR.

But I cannot get right BLER for positive SNR. From my point of view if SNR is high then i will get very low BLER but i get high BLER.

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
user2663126
  • 101
  • 12
  • 2
    For those of us not interested in Googling, can you please define the acronyms you use? Furthermore, can you post the formula for BLER? Also, you say you have 60 SNR but your loop goes to 100 SNR... are you getting an error from that? – darthbith Sep 25 '13 at 13:28
  • 1
    Please try executing your calculation step by stap and analyze the results, then state where your intermediate results start deviating from your expactation (and how). You can do this by selecting the lines one by one and hitting f9. – Dennis Jaheruddin Sep 25 '13 at 13:33
  • I am using circular viterbi decoder curve to find BLER – user2663126 Sep 25 '13 at 13:33
  • running `plot(SNR,BLER)` after running your script shows a decreasing plot, i.e., increasing SNR leads to decreasing BLER, so why do you think you get high BLER? – Mohsen Nosratinia Sep 25 '13 at 14:07
  • Why do you say the BLER is high? That depends on your propagation channel. For example, if you have a fading channel you could expect high BLER values. Which channel model do you use? And which convolutional code? On the other hand, I would say your BLER values are too _low_ for your SNR values. How can you get only 12% of blocks wrong with an SNR of -8 dB? – Luis Mendo Sep 25 '13 at 14:46
  • I am using circular viterbi decoder curve.To generate a reference curve i am using this code SNR_L = [-8 -6 -4 -2]; L = [0.1231 0.0366 0.0082 0.0014]; logL=log10(L); p=polyfit(SNR_L,logL,1); semilogy(SNR_L,L,'k-s'); grid on; from this curve it seems that if SNR is high then BLER is low. – user2663126 Sep 25 '13 at 14:59
  • Yes: high SNR implies low BLER, and that is seen in the curve. So what's the problem exactly? – Luis Mendo Sep 25 '13 at 15:28
  • If your answers are not what you're expecting, it may be because you're extrapolating from values you determined using polyfit with only four points which cover only a small part of the range of your actual SNR values. I don't know much about BLER but I'm pretty sure that's a mildly bad idea. – nkjt Sep 25 '13 at 15:52
  • @Luis Mendo .. actually i want to get all the y-axis (BLER) value using the x axis value (SNR). To get the y-axis value i have written the code BLER(i)=p(1,2)+p(1,1)*SNR(i); is it okay? If it is okay then why the value that i have obtained is not matching with the curve? – user2663126 Sep 25 '13 at 16:23

1 Answers1

0

The problem may be that you are mixing plot and semilogy. If you do the following, the curves match:

plot(SNR_L,logL,'k-s');
hold on
plot(SNR,BLER);

Note that the y axis is log10 of BLER, not BLER. You can label the axis with BLER values with

set(gca,'yticklabel', 10.^get(gca,'ytick'))

See resulting figure.

enter image description here

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147