| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Communications Toolbox |
| Contents | Index |
| Learn more about Communications Toolbox |
| On this page… |
|---|
You can use BERTool in conjunction with Simulink models to generate and analyze BER data. The Simulink model simulates the communication system whose performance you want to study, while BERTool manages a series of simulations using the model and collects the BER data.
Note To use Simulink models within BERTool, you must have a Simulink license. Communications Blockset software is highly recommended. The rest of this section assumes you have a license for both Simulink and Communications Blockset applications. |
To access the capabilities of BERTool related to Simulink models, open the Monte Carlo tab.

For further details about confidence intervals and curve fitting for simulation data, see Plotting Confidence Intervals and Fitting BER Points to a Curve, respectively.
This example illustrates how BERTool can manage a series of simulations of a Simulink model, and how you can vary the plot. The model is commgraycode, one of the demonstration models included with Communications Blockset software. The example assumes that you have Communications Blockset software installed.
To run this example, follow these steps:
Open BERTool and go to the Monte Carlo tab. The model's file name, commgraycode.mdl, appears as the Simulation M-file or model parameter. (If viterbisim.m appears there, select to indicate that Communications Blockset software is installed.)
Click Run.
BERTool loads the model into memory (which in turn initializes several variables in the MATLAB workspace), runs the simulation once for each value of Eb/N0, and gathers BER data. BERTool creates a listing in the data viewer.

BERTool plots the data in the BER Figure window.

To fit a curve to the series of points in the BER Figure window, select the box next to Fit in the data viewer.
BERTool plots the curve, as below.

To indicate the 99% confidence interval around each point in the simulation data, set Confidence Level to 99% in the data viewer.
BERTool displays error bars to represent the confidence intervals, as below.

Another example that uses BERTool to manage a series of Simulink simulations is in Example: Preparing a Model for Use with BERTool.
When you create a Simulink model for use with BERTool, you must set it up so that the simulation ends when it either detects a target number of errors or processes a maximum number of bits, whichever occurs first. To learn more about this requirement, see Requirements for Models; for an example, see Example: Preparing a Model for Use with BERTool.
After creating your Simulink model, set the target number of errors and the maximum number of bits in the Monte Carlo tab of BERTool.

Typically, a Number of errors value of at least 100 produces an accurate error rate. The Number of bits value prevents the simulation from running too long, especially at large values of Eb/N0. However, if the Number of bits value is so small that the simulation collects very few errors, the error rate might not be accurate. You can use confidence intervals to gauge the accuracy of the error rates that your simulation produces; the larger the confidence interval, the less accurate the computed error rate.
You can also click Stop in BERTool to stop a series of simulations prematurely.
![]() | Preparing Simulation Functions for Use with BERTool | Preparing Simulink Models for Use with BERTool | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |