EngeeComms.ErrorRateCalculation
Calculates a bit or character error in the input data.
| Library |
|
| Block |
Description
System object EngeeComms.ErrorRateCalculation compares the input data from the transmitter with the input data from the receiver. The object calculates the error rate as a current statistic by dividing the total number of unequal pairs of data elements by the total number of input data elements from the same source.
You can use this system object to calculate the error rate by characters or bits, since it does not take into account the magnitude of the difference between the elements of the input data. If the input arguments are bits, then the object calculates the bit error rate. If the input arguments are characters, then the object calculates the character error rate.
To compare the input data from the transmitter with the input data from the receiver, follow these steps:
-
Create an object EngeeComms.ErrorRateCalculation and set its properties.
-
Call an 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 the data from the transmitter with the input data from the receivererrcalcwith properties by default.Example:
errcalc = EngeeComms.ErrorRateCalculation() -
errcalc = EngeeComms.ErrorRateCalculation(Name=Value)— creates a system objecterrcalcwith the specified properties as a pairName=Value, whereName— the name of the property, andValue— appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their by default values.Example:
errcalc = EngeeComms.ErrorRateCalculation(ReceiveDelay=5)
Arguments
Input arguments
Tx — transmitted data
+
scalar | column vector
Details
The transmitted data is in the form of a scalar or column vector.
| 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 should have the same size and data type. |
| Типы данных |
|
Rx — received data
+
scalar | column vector
Details
The received data is in the form of a scalar or column vector.
| Типы данных |
|
Output arguments
Out — difference between transmitted and received data
+
column vector
Details
The difference between the transmitted and received data returned in the form of a column vector [R; N; S], where:
-
R— error rate. -
N— the number of errors. -
S— the number of samples being compared.
Dependencies
To use this argument, set the property to OutputData value Port.
| Типы данных |
|
Properties
#
ReceiveDelay —
received signal delay
Int64 integer
Details
The number of samples by which the received data lags behind the transmitted data in the form of a non-negative integer. Use this property to align the samples for comparison in the transmitted and received input data vectors.
| Data types |
|
#
ResetPort —
enabling the input argument Rst
Logical
Details
Turn on the Rst input port.
#
ComputationMode —
The comparison method
String
Details
Specify a method for comparing data samples:
-
Entire frame— compare all the samples of the received data with the samples of the transmitted frame.Data types String
#
StopSimulation —
stopping the simulation
Logical
Details
The simulation stops after the specified number of errors or comparisons.
#
OutputData —
data output method
String
Details
Specify the data output method.
#
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 behavior of both input signals.
| Data types |
|