Расчёт BER для QPSK¶
Блок Error Rate Calculation вычисляет частоту ошибок по битам (bit error rate, BER). Используя этот блок, мы можем получить данные о BER для системы связи и провести анализ эффективности нашей системы. В этом примере мы рассмотрим простую модель QPSK приёмника и передатчика. Она показана на рисунке ниже.

Далее зададим вспомогательную функцию для запуска модели.
Out[0]:
run_model (generic function with 1 method)
Далее выполним инициализацию показателей отношения сигнала к шуму для нашей модели и объявим переменную битовой ошибки.
Теперь выполним запуск модели при разных значениях отношения сигнала к шуму.
Building...
Progress 0%
Progress 38%
Progress 100%
BER: 0.3271484375
Building...
Progress 0%
Progress 28%
Progress 100%
BER: 0.25244140625
Building...
Progress 0%
Progress 32%
Progress 100%
BER: 0.1611328125
Building...
Progress 0%
Progress 76%
Progress 100%
BER: 0.07275390625
Building...
Progress 0%
Progress 44%
Progress 100%
BER: 0.01904296875
Building...
Progress 0%
Progress 57%
Progress 100%
BER: 0.00244140625
Building...
Progress 0%
Progress 57%
Progress 100%
BER: 0.0
__Eb_No__: [-9, -6, -3, 0, 3, 6, 9]
_ber_ref_: [0.308, 0.239, 0.158, 0.079, 0.023, 0.002, 0.0]
ber_model: [0.327, 0.252, 0.161, 0.073, 0.019, 0.002, 0.0]
Вывод¶
Как видно на этом примере, чем выше отношение сигнала к шуму, тем меньше ошибка.
Здесь мы разобрали, как построить график BER для простой модели системы связи и узнали, как применить данный метод для проведения анализа системы.
Блоки, использованные в примере¶
{"id": "0f39dfa6-9259-4dfd-9ba9-33baf3427fa6", "data": [{"showlegend": false, "mode": "markers", "xaxis": "x", "colorbar": {"y": 0.7491319444444444, "title": {"text": ""}, "len": 0.38482884951881013, "x": 0.9960629921259843}, "name": "", "yaxis": "y", "legendgroup": "", "marker": {"symbol": "square", "color": "rgba(0, 154, 250, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "y": [0.30791047071507943, 0.23922871076767188, 0.1583683188095979, 0.07864960352514257, 0.022878407561085324, 0.0023882907809328075, 3.362722841961749e-05], "type": "scatter", "x": [-9, -6, -3, 0, 3, 6, 9]}, {"showlegend": false, "mode": "markers", "xaxis": "x", "colorbar": {"y": 0.7491319444444444, "title": {"text": ""}, "len": 0.38482884951881013, "x": 0.9960629921259843}, "name": "", "yaxis": "y", "legendgroup": "", "marker": {"symbol": "diamond", "color": "rgba(227, 111, 71, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "y": [0.3271484375, 0.25244140625, 0.1611328125, 0.07275390625, 0.01904296875, 0.00244140625, 0], "type": "scatter", "x": [-9, -6, -3, 0, 3, 6, 9]}, {"showlegend": true, "mode": "markers", "xaxis": "x2", "colorbar": {"y": 0.26822916666666663, "title": {"text": ""}, "len": 0.3848288495188102, "x": 0.9960629921259843}, "name": "Theoretical QPSK", "yaxis": "y2", "legendgroup": "Theoretical QPSK", "marker": {"symbol": "square", "color": "rgba(0, 154, 250, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "y": [0.30791047071507943, 0.23922871076767188, 0.1583683188095979, 0.07864960352514257, 0.022878407561085324, 0.0023882907809328075, 3.362722841961749e-05], "type": "scatter", "x": [-9, -6, -3, 0, 3, 6, 9]}, {"showlegend": true, "mode": "markers", "xaxis": "x2", "colorbar": {"y": 0.26822916666666663, "title": {"text": ""}, "len": 0.3848288495188102, "x": 0.9960629921259843}, "name": "Model QPSK", "yaxis": "y2", "legendgroup": "Model QPSK", "marker": {"symbol": "diamond", "color": "rgba(227, 111, 71, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "y": [0.3271484375, 0.25244140625, 0.1611328125, 0.07275390625, 0.01904296875, 0.00244140625, 0], "type": "scatter", "x": [-9, -6, -3, 0, 3, 6, 9]}], "config": {"showlegend": true, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "legend": {"yanchor": "auto", "xanchor": "auto", "bordercolor": "rgba(0, 0, 0, 1)", "bgcolor": "rgba(255, 255, 255, 1.000)", "borderwidth": 1, "tracegroupgap": 0, "y": 1, "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "title": {"font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}, "text": ""}, "traceorder": "normal", "x": 1}, "height": 400, "yaxis2": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [0, null], "range": [-4.888057003862415, -0.07050707181482652], "domain": [0.07581474190726151, 0.4606435914260717], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["10^-Inf", "10^NaN"], "zeroline": false, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "x2", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "BER", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgb(0, 0, 0)", "type": "log", "autorange": true}, "xaxis2": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [-7.5, -5, -2.5, 0, 2.5, 5, 7.5], "range": [-9.540000000000001, 9.540000000000001], "domain": [0.08143700787401574, 0.9960629921259843], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["-7.5", "-5.0", "-2.5", "0.0", "2.5", "5.0", "7.5"], "zeroline": false, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "y2", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "Eb/No (dB)", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgb(0, 0, 0)", "type": "linear"}, "annotations": [{"yanchor": "top", "xanchor": "center", "rotation": 0, "y": 1, "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 20}, "yref": "paper", "showarrow": false, "text": "Bit Error Rate (Linear Scale)", "xref": "paper", "x": 0.53875}, {"yanchor": "top", "xanchor": "center", "rotation": 0, "y": 0.5190972222222222, "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 20}, "yref": "paper", "showarrow": false, "text": "Bit Error Rate (Log Scale)", "xref": "paper", "x": 0.53875}], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"l": 0, "b": 20, "r": 0, "t": 20}, "width": 527.484375, "xaxis": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [-7.5, -5, -2.5, 0, 2.5, 5, 7.5], "range": [-9.540000000000001, 9.540000000000001], "domain": [0.08143700787401574, 0.9960629921259843], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["-7.5", "-5.0", "-2.5", "0.0", "2.5", "5.0", "7.5"], "zeroline": false, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "y", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgb(0, 0, 0)", "type": "linear"}, "yaxis": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [0, 0.1, 0.2, 0.30000000000000004], "range": [-0.009814453125000011, 0.336962890625], "domain": [0.5567175196850394, 0.9415463692038495], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["0.0", "0.1", "0.2", "0.3"], "zeroline": false, "tickfont": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 11}, "zerolinecolor": "rgba(0, 0, 0, 1)", "anchor": "x", "visible": true, "ticks": "inside", "tickmode": "array", "linecolor": "rgba(0, 0, 0, 1)", "showgrid": true, "title": {"text": "BER", "font": {"color": "rgba(0, 0, 0, 1)", "family": "sans-serif", "size": 15}}, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickcolor": "rgb(0, 0, 0)", "type": "linear"}}}