BER calculation for QPSK¶
The Error Rate Calculation block calculates the bit error rate (BER). Using this block, we can obtain the BER for the communication system and analyse the performance of our system. In this example, we will look at a simple QPSK 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": "6e790fcc-513b-4df9-85b0-7c7e3035ed12", "data": [{"showlegend": true, "mode": "markers", "xaxis": "x", "colorbar": {"title": {"text": ""}}, "name": "QPSK", "zmin": null, "yaxis": "y", "legendgroup": "QPSK", "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.427734375, 0.41455078125, 0.39501953125, 0.3701171875, 0.3203125, 0.27685546875, 0.21435546875, 0.1611328125, 0.08056640625, 0.02490234375, 0.00634765625], "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.006293945312500021, 0.44037597656250005], "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": 1544.53125}}