BER calculation for BPSK¶
The Error Rate Calculation block calculates the bit error rate (BER). Using this block, we can get the BER data for the communication system and analyse the efficiency of our system. In this example, we will look at a simple BPSK receiver and transmitter model. It is shown in the figure below.

Next, let's define an auxiliary function to run the model.
Out[0]:
run_model (generic function with 1 method)
Next, we initialise the signal-to-noise ratios for our model and declare the bit error variable.
Now let's run the model at different values of signal-to-noise ratio.
Conclusion¶
As you can see from this example, the higher the signal to noise ratio, the smaller the error.
Here we have shown how to plot BER for a simple model of a communication system and how to apply this method to analyse the system.
{"id": "ba85e0a7-66dd-49c2-a0c4-f15601d2e57c", "data": [{"showlegend": true, "mode": "markers", "xaxis": "x", "colorbar": {"title": {"text": ""}}, "name": "BPSK", "zmin": null, "yaxis": "y", "legendgroup": "BPSK", "marker": {"symbol": "circle", "color": "rgba(0, 154, 250, 1.000)", "line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "size": 8}, "zmax": null, "y": [0.4501953125, 0.4189453125, 0.40234375, 0.36328125, 0.28515625, 0.23046875, 0.12890625, 0.068359375, 0.0166015625, 0.00390625, 0], "type": "scatter", "x": [1, 3, 5, 7, 10, 12, 15, 17, 20, 23, 25], "zaxis": null, "z": null, "metadata": {"shouldEnableSmartZoom": false, "smartZoomParams": {"minCount": 25000, "maxCount": 11, "currentCount": 11}}}], "config": {"showlegend": true, "xaxis": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [5, 10, 15, 20, 25], "range": [0.27999999999999936, 25.72], "domain": [0.05100612423447069, 0.9934383202099737], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["5", "10", "15", "20", "25"], "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"}, "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "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": "BER", "xref": "paper", "x": 0.5222222222222223}], "height": 400, "margin": {"l": 0, "b": 20, "r": 0, "t": 20}, "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "yaxis": {"showticklabels": true, "gridwidth": 0.5, "tickvals": [0, 0.1, 0.2, 0.30000000000000004, 0.4], "range": [-0.013505859375000012, 0.46370117187500004], "domain": [0.03762029746281716, 0.9415463692038496], "mirror": false, "tickangle": 0, "showline": true, "ticktext": ["0.0", "0.1", "0.2", "0.3", "0.4"], "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": "", "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"}, "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}, "width": 345.09375}}