modem.oqpskmod for BER

爷,独闯天下 提交于 2019-12-24 12:10:05

问题


hi can anyone show how to use the modem.oqpskmod for BER. thanks!

    h = modem.oqpskmod
    y = modulate(h, values);
    g = modem.oqpskdemod(h)
    z = demodulate(g, y)

let's assume that i have array called values which contains only 1s and 0s. my question is how would i calculate BER? of course if above my code is correct.


回答1:


Based on this Wikipedia page, you simply have to compute the number of incorrect bits and divide by the total number of transferred bits to get the bit error rate (BER). If values is the unmodulated input signal and z is the output signal after modulation and demodulation, you can compute it like this:

BER = sum(logical(values(:)-z(:)))/numel(values);

EDIT: I modified the above code just in case you run into two situations:

  • If z has values other than 0 and 1.
  • If z is a different size than values (i.e. row vector versus column vector).

I don't know if you are ever likely to come across these two situations, but better safe than sorry. ;)



来源:https://stackoverflow.com/questions/2179737/modem-oqpskmod-for-ber

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!