Applies to: NetSim Pro v14/v15
Dynamic TDMA (DTDMA) evaluates each received packet using the received signal power, fading, interference, modulation, bandwidth, and packet size. It first obtains a bit error rate (BER) and then decides whether that packet is received without error or marked as errored.
| Term | Meaning in this context |
|---|---|
| BER | Probability that a transmitted bit is received incorrectly for the calculated radio conditions. |
| Packet error probability | Probability of a packet containing an error, derived from BER and packet length. |
| Observed PER | Ratio of errored packet receptions to all packet reception attempts measured from a simulation run. |
DTDMA does not expose a separate configurable PER property. NetSim calculates BER and uses it with the packet size to decide each packet's error status.
The DTDMA entry point for this processing is:
fn_NetSim_DTDMA_CalculatePacketError()It is implemented in:
<NetSim_Install_Directory>\src\Simulation\DTDMA\DTDMA_Phy.cWhen the BER model is SINR-BER_by_Table, DTDMA calls:
pb = get_BER_from_Table(sinr);The table-loading and lookup code is in:
<NetSim_Install_Directory>\src\Simulation\DTDMA\DTDMA_SINR_BER.cThe selected CSV file is read from the simulation IOPath. Its SINR values must be in ascending order. Blank lines, comments beginning with #, and a header containing SINR are skipped.
When forward error correction is enabled, DTDMA calls:
calculate_FEC_BER(
modulation,
codingRate,
receivedPower,
interferencePower,
bandwidth,
dataRate);When forward error correction is disabled, DTDMA calls:
calculate_BER(
modulation,
receivedPower,
interferencePower,
bandwidth);The declarations for the formula-based BER APIs are in:
<NetSim_Install_Directory>\src\Simulation\Include\ErrorModel.hTheir implementations belong to the internal NetSim framework and are not part of the editable DTDMA source.
After calculating BER, DTDMA calls:
fn_NetSim_Packet_DecideError(
pb,
packet->pstruPhyData->dPacketSize);The API is declared in:
<NetSim_Install_Directory>\src\Simulation\Include\Packet.hIt derives a packet-error probability from BER and packet length and then determines the outcome for that reception. Its implementation is part of the internal framework.
For a chosen receiver, link, application, or time interval, calculate:
Observed PER =
(Number of errored packet receptions) / (Total packet reception attempts)State the scope used for both counts. Mixing different receivers, applications, or time intervals can produce a misleading value.
| File | Role |
|---|---|
DTDMA\DTDMA_Phy.c | Calculates received power, interference, SINR, BER, and invokes the packet-error decision. |
DTDMA\DTDMA_SINR_BER.c | Loads and looks up the SINR-BER table. |
Include\ErrorModel.h | Declares SINR and formula-based BER APIs. |
Include\Packet.h | Declares the packet-error decision API. |