Engee documentation

EngeeComms.BernoulliBinaryGenerator

Generates random binary numbers using a Bernoulli distribution.

Library

EngeeComms

Block

Bernoulli Binary Generator

Description

System object EngeeComms.BernoulliBinaryGenerator generates random binary numbers using a Bernoulli distribution. Use this system object to generate random bits of data to simulate digital communication systems and obtain performance indicators such as bit error rate.

Bernoulli distribution with parameter gives zero with probability and one with probability . The Bernoulli distribution has an average value and variance . The ProbabilityOfZero parameter sets the value of the variable and can be any real number in the range [0, 1].

To generate random binary numbers using the Bernoulli distribution, follow these steps:

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

  2. 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

  • bergen = EngeeComms.BernoulliBinaryGenerator() — creates a system object for generating random binary numbers using the Bernoulli distribution usage bergen with properties by default.

    Example:

    bergen = EngeeComms.BernoulliBinaryGenerator()
  • bergen = EngeeComms.BernoulliBinaryGenerator(Name=Value) — creates a system object bergen with the specified properties as a pair Name=Value, where Name — the name of the property, and Value — 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:

    bergen = EngeeComms.BernoulliBinaryGenerator(InitialSeed=5)

Arguments

Output arguments

Out — output signal

+ scalar | vector | the matrix

Details

The output signal returned as a scalar, vector, or matrix.

Типы данных

Float64, Int64

Properties

# InitialSeed — initial value
Int64 integer

Details

Initial value for the random number generator as a non-negative integer. If the InitialSeed property is a constant, the resulting sequence will be repeated.

Dependencies

To use this parameter, set the property SourceOfInitialSeed property to Parameter.

# ProbabilityOfZero — output probability of zero
Scalar / vector of real numbers

Details

The probability of getting zero on the output must be in the range [0, 1].

The number of elements in the ProbabilityOfZero parameters corresponds to the number of independent channels output from the system object. Bernoulli distribution with the parameter gives zero with probability and one with probability .

# SourceOfInitialSeed — initial value source
String

Details

Source of initial value for the random number generator in the form:

  • Parameter - the system object sets the initial value of the random number generator in the * property.InitialSeed*.

# SamplesPerFrame — counts per output frame
Int64 integer

Details

Counts per frame as a positive integer indicating the number of counts per frame in one output data channel.

# OutputDataType — output data type
String

Details

Selects the data type for the output signal type.

Data types

Int64

Methods

Common to all system objects

step!

Run the algorithm of the system object

release!

Allow changing the value of the system object property