Stage 0: Receiver Group

The receiver group stage is not actually part of the dynamic pipeline that processes transmissions. However, it is considered part of the pipeline because it computes results that influence the behavior of radio transmissions. It is specified by the “rxgroup model” attribute of the radio transmitter.

When a radio transmission begins, the Simulation Kernel models the broadcast nature of radio by implementing multiple radio links between the transmitting channel and a set of receiver channels. Every transmitter channel maintains its own receiver group of channels that are possible candidates for receiving transmissions from that object. The purpose of the receiver group stage is to create an initial receiver group for each transmitter channel. The Simulation Kernel checks every possible transmitter-receiver channel pair, and creates a receiver group for each transmitter channel.

This presents a problem, however. Because transceiver characteristics can change dynamically during a simulation, it is often difficult to determine at the outset which receiver channels are appropriate destinations for a given transmitter channel. Therefore, the receiver group stage includes a receiver channel unless it can determine, in advance, that a receiver channel will never be an appropriate destination for a transmitter channel. During a simulation, subsequent pipeline stages can use dynamic criteria to determine a receiver channel’s eligibility for receiving a transmission. Possible reasons for disqualifying a receiver channel during simulation (despite its membership in the transmitting channel’s receiver group) include:

  • Disjunct frequency bands. A frequency band is defined by its base frequency and its bandwidth. If a transmitter channel and receiver channel’s frequency bands do not overlap, then the transmitter channel’s transmissions cannot affect the receiver channel—either as valid signals or as noise.
  • Physical separation. A transmitter channel and receiver channel can be too far apart to establish a radio link with a sufficiently strong signal. Establishing a radio link also depends on factors like the elevation of the transmitter and receiver antennas and the transmission signal’s power and frequency.
  • Antenna nulls. The pipeline models the gain patterns of transmitter and receiver antennas in pipeline stages 4 and 6, respectively. When directional antennas are used, these stages’ computed results might reduce the signal power significantly—so significantly that a simulation can reasonably ignore the effect of transmissions on the receiver channel in question.

In some network models, the Simulation Kernel can determine that certain transmitter–receiver channel pairs are absolutely unable to communicate. In such cases removing the receiver channel from the transmitter channel’s receiver group leads to faster simulations, because it eliminates the execution of pipeline stages known to have no effect. Because the receiver group stage is called at simulation time 0, however, its results should not depend on factors that can change during the simulation. Examples of such potentially “iffy” criteria are the initial distance between two mobile nodes and the initial frequencies assigned to transmitter and receiver channels (assuming that a model can dynamically change these frequencies). By default, the receiver channel is included in such cases, and all receiver groups remain static throughout the simulation; subsequent pipeline stages then use dynamic criteria to evaluate transmitter–receiver channel connectivity.

The Simulation Kernel requires that the receiver group stage procedure accept the object IDs of a transmitter channel and a receiver channel, respectively. The procedure should return an integer value (OPC_TRUE or OPC_FALSE) to the Kernel; this value indicates whether the receiver channel is an eligible destination, and should be included in the receiver group. Syntax requirements for this stage are specified in Figure 87.

Figure 87: Templates for Radio Transceiver Pipeline: Receiver Group Stage

Not MT-safe (will execute sequentially in a parallel simulation):

int
rx_group_template (Objid tx_channel_objid, Objid rx_channel_objid)
	{
	int result;
	FIN (rx_group_template (tx_channel_objid, rx_channel_objid))
	
	FRET (result)
	}

MT-safe (can execute in parallel in a parallel simulation):

int
rx_group_template_mt (OP_SIM_CONTEXT_ARG_OPT_COMMA Objid tx_channel_objid; Objid rx_channel_objid)

	{
	int result;

	FIN_MT (rx_group_template (tx_channel_objid, rx_channel_objid))
	
	FRET (result)
	}

You can use the Radio package of Kernel Procedures (described in Chapter 16 “Radio Package” on page 1) to change the default behavior of the receiver group stage, and dynamically change and recalculate receiver groups in response to simulation events. For example, you can remove a receiver channel from a receiver group if the receiver’s node becomes disabled in the course of a simulation. You can use the procedure op_radio_txch_rxgroup_compute() to calculate or recalculate a given channel’s receiver group (in essence, re-invoking the receiver group pipeline stage) at any time during a simulation. You can even “skip” the receiver group stage entirely, then create and update receiver groups as needed. (Skipping this pipeline stage involves setting the “rxgroup model” attribute to either dra_no_rxgroup or NONE instead of the default dra_rxgroup; this creates empty receiver groups for all transmitter channels.)

You can monitor changes in the number of receiver groups a receiver channel belongs to by enabling collection of the “receiver groups count” statistic for that channel (see “Built-In Wireless Statistics” on page 34).

Updating receiver groups dynamically can result in faster simulations, especially in network models with high levels of radio traffic. “Skipping” the pipeline stage and creating receiver groups as needed can also speed up simulations in networks with large numbers of transceiver channels.