Engee documentation

EngeeComms.ErrorRateCalculation

Calculates a bit or character error in the input data.

Library

EngeeComms.

Block

Error Rate Calculation

Description

The system object EngeeComms.ErrorRateCalculation compares input data from the transmitter with input data from the receiver. The object calculates the error rate as a running statistic by dividing the total number of unequal pairs of data items by the total number of input data items from the same source.

You can use this system object to calculate the error rate by character or bit because it does not consider the magnitude of the difference between input data items. If the input arguments are bits, the object calculates the error rate on a bit-by-bit basis. If the input arguments are characters, the object calculates the character error rate.

To compare the input data from the transmitter with the input data from the receiver, perform the following steps:

  1. Create an object EngeeComms.ErrorRateCalculation and set its properties.

  2. Call the object with arguments as if it were a function.

To learn more about how to work with system objects, see Engee system objects.

Syntax

Creation

  • errcalc = EngeeComms.ErrorRateCalculation() creates a system object to compare data from the transmitter with input data from the receiver errcalc with by default properties.

    Example:

    errcalc = EngeeComms.ErrorRateCalculation()
  • errcalc = EngeeComms.ErrorRateCalculation(Name=Value) creates a errcalc system object with the specified Name property set to the specified Value value. You can specify additional arguments as a name-value pair in any order (Name1=Value1,…​,NameN=ValueN).

    Example:

    errcalc = EngeeComms.ErrorRateCalculation(ReceiveDelay=5)

Usage

  • outsignal = errcalc(insignal) compares the input data from the transmitter with the input data from the receiver, as specified by errcalc. The result is returned in outsignal.

Arguments

Input arguments

Tx — transmitted data
scalar | vector-column

Details

Transmitted data as a scalar or vector-column.

If you specify Tx or Rx input as a scalar, the block compares this value with all elements of the other input. If you specify both inputs as vectors, they must have the same size and data type.
Типы данных

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Rx — received data
scalar | vector-column

Details

Received data as a scalar or vector-column.

Типы данных

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Output arguments

Out -. difference between transmitted and received data
`vector-column

Details

The difference between the transmitted and received data returned in the form of a vector-column [R; N; S], where:

  • R - error rate.

  • N - number of errors.

  • S - number of samples to be compared.

Dependencies

To use this argument, set the property OutputData property Port.

Типы данных

Float64

Properties

# ReceiveDelay — resulting signal delay
Int64 integer

Details

The number of samples by which the received data lags behind the transmitted data as a non-negative integer. Use this property to align the samples for comparison in the transmitted and received input data vectors.

Типы данных

Int64

# ResetPortdescription missing
Logical

Details

Description missing

# ComputationMode — comparison method
String

Details

Specify the method of comparing data samples:

  • Entire frame - compare all samples of received data with samples of transmitted frame.

    Типы данных

    String

# StopSimulation — simulation stop
Logical

Details

Stops the simulation after a specified number of errors or comparisons.

# OutputData — data output method
String

Details

Specify the method of data output.

# ComputationDelay — calculation delay
Int64 integer

Details

The number of data samples that the object ignores at the beginning of the comparison as a non-negative integer. Use this property to ignore the transient behaviour of both input signals.

Типы данных

Int64

Methods

Common for all system objects

step!

Start the system object’s operating algorithm