Description

The Transmitter Packet Corruption Error Model introduces configurable packet corruption to a Transmitter component. This model simulates bit errors that occur during data transmission due to channel noise, interference, or hardware imperfections. By attaching this model to a transmitter, users can evaluate system robustness to data corruption and test error detection and correction mechanisms at higher protocol layers.


Example Use Cases

  • Protocol Validation: Test checksums, CRCs, and error correction codes under realistic corruption conditions.
  • Link Margin Analysis: Evaluate communication system performance with degraded signal quality.
  • Fault Injection Testing: Systematically introduce errors to verify system resilience.
  • Monte Carlo Studies: Characterize mission reliability under varying corruption probabilities.

Module Implementation

The packet corruption error model is attached to a Transmitter component and controls the probability that individual packets are corrupted before transmission.

Corruption Probability

The model exposes a single parameter, the packet corruption fraction , which defines the probability that any given packet will be corrupted:

When , no packets are corrupted. When , every packet is corrupted.

Corruption Mechanism

When the model is active, the parent transmitter uses to determine whether each packet should be corrupted. For each packet, a uniform random value is generated:

If corruption occurs, the transmitter flips a single random bit within the packet data. The bit flip is performed by selecting a random byte index and bit position , then applying an XOR operation:

This single-bit error is sufficient to invalidate most checksums and CRCs, causing the packet to fail validation at the receiver.


Assumptions/Limitations

  • Only a single bit is flipped per corrupted packet; multi-bit errors are not modelled.
  • The corruption probability is applied per-packet, not per-bit.
  • Bit errors are uniformly distributed across the packet; burst errors are not modelled.
  • The model does not distinguish between different error sources (noise, interference, hardware faults).
  • Retransmission and error recovery must be handled at higher protocol layers.
  • Detaching the model from a transmitter resets the corruption probability to zero.