Products & Services Solutions Academia Support User Community Company

Learn more about Communications Toolbox   

Creating a System

You attach a system to the Error Rate Test Console to run simulations and obtain error rate data. When you attach the system under test, you also register specific information to the test console in order to define the system's test inputs, test parameters, and test probes.

Creating a communications system for use with the Error Rate Test Console, involves the following steps.

You can see an example of a system file by opening MPSKSYSTEM.m, which resides in the following location:

matlab\toolbox\comm\comm\+commtest

Writing A Register Method

Using the register method, you register test inputs, test parameters, and test probes to the Error Rate Test Console. You register these items to the Error Rate Test Console using the registerTestInput, registerTestParameter, and registerTestProbe methods.

Registering Test Inputs

In order to run simulations, the system under test requests test inputs from the Error Rate Test Console. These test inputs provide data, driving simulations for the system under test.

A system under test cannot request a specific input type until you attach it to the Error Rate Test Console. Additionally, the specific input type must be registered to the test console.

Inside the register method, you call the registerTestInput(sys,inputName) method to register test inputs.

Registering Test Parameters

Test parameters are the system parameters for which the Error Rate Test Console obtains simulation results. You specify the sweep range of these parameters using the Error Rate Test Console and obtain simulation results for different system conditions.

The system under test registers a system parameter to the Error Rate Test Console, creating a test parameter. You register a test parameter to the Error Rate Test Console using the registerTestParameter(sys,name,default,validRange) method.

A parameter of type char becomes useful when defining system conditions. For example, in a communications system, a Channel parameter may be defined so that it takes values such as ‘Rayleigh', ‘Rician', or ‘AWGN'. Depending on the Channel char value, the system may filter transmitted data through a different channel. This allows the simulation of the system over different channel scenarios.

If the system registers a test parameter named ‘X' then the system must also contain a readable property named ‘X'. If not, the registration process issues an error. This process ensures that calling the getTestParameter method in debug mode returns the value held by the corresponding property.

Registering Test Probes

Test probes log the simulation data the Error Rate Test Console uses for computing test metrics, such as: number of errors, number of transmissions, and error rate. To log data into a probe, your communications system must register the probe to the Error Rate Test Console.

You register a test probe to the Error Rate Test Console using the registerTestProbe(sys,name) method.

You can define an arbitrary number of probes to log test data at several points within the system.

Writing a Setup Method

The Error Rate Test Console calls the setup method at the beginning of simulations for each new sweep point. A sweep point is one of several sets of simulation parameters for which the system will be simulated. Using the getTestParameter method of the system under test, the setup method requests the current simulation sweep values from the Error Rate Test Console and sets the various system components accordingly. The setup method sets the system to the conditions the current test parameter sweep values generate.

Writing a setup method for each communication system you create is not necessary. The setup method is optional.

Writing a Reset Method

Use the reset method to reset states of various system components, such as: objects, data buffers, or system flags. The Error Rate Test Console calls the reset method of the system:

Writing a reset method for each communication system you create is not mandatory. The reset method is optional.

Writing a Run Method

Write a run method for each communication system you create. The run method includes the core functionality of the system under test. At each simulation iteration, the Error Rate Test Console calls the run method of the system under test.

When designing a communication system, ensure at run time that your system sets components to the current simulation test parameter sweep values. Depending on your unique design, at run time, the communication system:

  


Free Early Verification Kit

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