Abstract 1 Introduction 2 Background 3 Closed-Loop Reliability Control 4 Constrained-Aware Incremental Search 5 Implementation 6 Evaluation 7 Related Work 8 Discussion 9 Conclusion 10 Future Work References

Controlling Adaptive HARQ Erasure Coding for Real-Time Transport Under Channel Model Mismatch

Moritz Miodek ORCID Saarland Informatics Campus, Saarland University, Saarbrücken, Germany    Marlene Böhmer ORCID Saarland Informatics Campus, Saarland University, Saarbrücken, Germany    Thorsten Herfet ORCID Saarland Informatics Campus, Saarland University, Saarbrücken, Germany
Abstract

Networking is an essential component of real-time cyber-physical systems, and hence, networking problems are increasingly real-time problems. As these systems expand beyond single, controlled links, they require predictably reliable end-to-end communication primitives, effectively transferring their deadline constraints to the underlying multi-hop network. Standard transport protocols often optimize either only for latency (e.g., UDP) or for full reliability (e.g., TCP, QUIC), with the latter potentially leading to unbounded retransmission delays. Partial reliability bridges the gap between these extremes, offering configurable reliability within a bounded delay. To remain bandwidth-efficient and robust to dynamic network conditions, these schemes must abandon static forward error correction (FEC) and move toward adaptive loss recovery. A fundamental challenge is the model mismatch problem: real-time adaptive loss recovery schemes require simple, efficiently interpretable models to estimate network conditions, yet these models systematically underfit complex real-world network dynamics.

To provide robustness against this inherent underfitting, we present a closed-loop control architecture that applies an adaptive safety margin to the network estimates, ensuring the system meets a deadline-constrained reliability target. We frame this contribution within the Predictably Reliable Real-time Transport protocol (PRRT), which allows applications to configure a loss and deadline constraint. The control system observes the packet delivery deficit (packet debt) to quantify the extent to which the end-to-end packet-loss rate deviates from the application’s target loss rate. A compensated loss rate is then fed into a novel constraint-aware, anytime incremental search algorithm that derives a near-optimal Hybrid Automatic Repeat Request (HARQ) coding configuration that combines the benefits of proactive and reactive packet-loss recovery to satisfy the application’s loss and delay constraints. New to this search is its awareness of the encoding and decoding complexity of the resulting coding configurations. This allows devices to adaptively limit the search space to configurations within their computational capabilities, which is essential for constrained edge devices. We provide a new high-performance Rust reference implementation of PRRT and demonstrate that the system converges towards the target loss rate, even under model mismatch, while also quickly adapting to shifts in network conditions.

Keywords and phrases:
Real-time networks, transport protocol, HARQ, adaptive erasure coding, closed-loop control, anytime search, network reliability, model mismatch
Copyright and License:
[Uncaptioned image] © Moritz Miodek, Marlene Böhmer, and
Thorsten Herfet; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Networks → Network reliability
; Networks → Transport protocols ; Computer systems organization → Real-time systems
Supplementary Material:
Software  (Source Code): https://github.com/miodic/prrt/tree/ECRTS26AE [28]
  archived at Software Heritage Logo swh:1:dir:d4ef292e34301fb2063467cbd5ea523a35b63bf4
Supplementary Material:
Software  (ECRTS 2026 Artifact Evaluation approved artifact): https://doi.org/10.4230/DARTS.12.2.5
Editor:
Angeliki Kritikakou

1 Introduction

From collaborative robotics to industrial automation, safety-critical cyber-physical systems have increasingly strict requirements on their underlying communication [39]. In these systems, the value of information depends on its timeliness: a sensor reading that arrives after its deadline is effectively lost to the application.

The transport layer is a suitable abstraction layer to address this constraint, as it is the lowest layer with an end-to-end view of the transmission path and can be configured with the application’s reliability and deadline target constraints from above. Thus, the transport layer can effectively bridge the gap between the network transmission path (channel) dynamics and the application’s need for deadline-constrained partial reliability using an adaptive error-coding scheme. At the transport layer, data streams are encapsulated into packets, which may be dropped during network transit due to queueing loss or data corruption. The standard mechanisms for mitigating these packet losses are proactive Forward Error Correction (FEC) and reactive Automatic Repeat ReQuest (ARQ).

Although the User Datagram Protocol (UDP) [35] remains the standard choice for simple and low-latency communication over Internet Protocol (IP) networks, it lacks reliability and timeliness guarantees. Conversely, the Transmission Control Protocol (TCP) [7] utilizes purely reactive ARQ to achieve reliability111up to error-detection capabilities of the checksum, which is bandwidth-efficient (i.e. redundancy information minimizing), but undermines timeliness. The Real-time Transport Protocol (RTP) [37] provides a partial reliability extension [45] that supports static FEC to proactively treat packet losses, but does not specify an adaptation scheme. Consequently, implementations (e.g., libwebrtc) utilize conservative, bandwidth-inefficient code rates that operate significantly below the channel capacity. QUIC [19] supports unreliable transport with RFC 9221 [31], and delegates the complexity of implementing partial reliability to the application layer.

Optimal reliability under a hard deadline constraint is a problem of channel prediction [9, 23]. To approach channel capacity, a transport protocol must understand how the channel will behave in the near future. Optimally approaching channel capacity would require a perfect model of the channel’s behaviour, which is computationally infeasible. Instead, we rely on simpler models to estimate the current channel state and treat them as proxies for short-horizon channel behaviour. This directly aligns with the concept of channel coherence time, the time during which the channel state, as captured by our model, remains stationary. Because this assumption is never perfectly valid in real-world channels, we must introduce a mechanism to compensate for the mismatch between a transport-layer protocol’s channel model and the true channel behaviour, supporting an adaptive packet erasure coding scheme that robustly satisfies the application’s loss and delay constraints.

We present a contribution to the Predictably Reliable Real-time Transport protocol (PRRT) [15, 36, 32] by implementing a control loop, which applies a correction to the measured packet-loss rate to compensate for network dynamics beyond the capacity of the underlying loss estimator, similar to how feedback control scheduling manages unpredictable workloads in real-time systems [26, 8]. The controller adjusts its correction term based on the distance (packet debt) between the measured end-to-end loss rate and application target loss rate, ensuring global convergence under controllable network conditions. The corrected loss rate is used in the new incremental search, which finds valid, bandwidth-efficient Hybrid Automatic Repeat Request (HARQ) coding configurations within the system’s computational capabilities [46]. Overall, the system implements an adaptive reliability mechanism that reacts to local network disturbances and provides, compared to static FEC configurations, more consistent, bandwidth-efficient reliability across a wide range of network conditions.

Contributions

  1. 1.

    We develop a model-based control architecture for adaptive packet erasure coding that combines feedforward packet-loss estimation (modelled as piecewise independent and identically distributed (IID)), with integral debt-based correction to enable operation over non-IID loss distributions. The system remains responsive to dynamic network conditions while demonstrating consistent convergence to the application target loss rate.

  2. 2.

    We propose a novel constraint-aware anytime incremental search algorithm for HARQ coding configurations that, operating under the IID assumption, walks the Pareto frontier of the search space to find redundancy information (RI)-optimal FEC and near-optimal ARQ schedules.

  3. 3.

    We introduce a new high-performance, lock-free Rust reference implementation of PRRT that integrates the control loop and incremental search, serving as a reference implementation towards deadline-constrained, predictably-reliable real-time transport.

2 Background

This section introduces the Hybrid Automatic Repeat Request (HARQ) mechanism used in PRRT, including its reliability, latency, and redundancy considerations, and provides background for understanding the coding configuration search and the control loop in the subsequent sections.

In this work, we focus on UDP-like transport-layer protocols, whose protocol data units (PDUs) are datagrams. While these datagrams are passed to the network layer, which operates on packets, we assume each datagram fits within a single packet to avoid the complexity of fragmentation. Hence, we use the terms packet and datagram interchangeably.

The transport layer observes packet loss, referred to as erasures, over an end-to-end network channel between two applications. Unlike lower-layer error coding (e.g., in the 5G physical and link layers), which operates on bits, the transport layer operates on packets (or segments) and utilizes erasure coding to recover dropped packets. Specifically, erasure coding uses inter-packet coding to map a set of k source packets of equal length into a code block of n encoded packets, resulting in a code rate of k/n. We call this packet difference n−k the added redundancy. This is commonly expressed as the redundancy information (RI) ratio n−kk, where n−k≥0. Note that for packet coding, especially under a deadline constraint, k remains relatively small compared to typical values in lower-level error coding. In the following sections, we introduce a systematic erasure code that, instead of generating n new packets, keeps the initial k source packets intact and generates p=n−k additional parity packets. A code block is decodable if the receiver collects a sufficient number of packets to recover all k source packets. However, a major advantage of systematic codes is that any received source packet is usable without a decoding step.

2.1 Erasure Coding under a Hard Deadline Constraint

Shannon’s channel coding theorem [38] states that given a discrete memoryless channel, we can transmit information at a rate approaching the channel capacity arbitrarily close as the block-length of the block code approaches infinity, thus achieving high bandwidth efficiency. Such long block codes mean we also need a correspondingly long time to correct an error. If we consider hard deadlines, we instead want to correct errors within the deadline constraint to achieve some reliability in that limited time. Real-time systems, which impose hard deadlines, are therefore forced to operate away from the asymptotic regime and into the finite-blocklength regime. Thus, we have to accept the inherent gap between Shannon’s channel capacity and achievable rate [34], meaning that under a hard deadline constraint, we cannot correct every erasure pattern of the underlying channel. Still, the goal remains to approach the channel capacity as close as possible to efficiently use the channel network resources.

2.2 HARQ Erasure Coding Scheme

The core design philosophy of PRRT is to provide applications with datagram transport which satisfies a target packet loss rate (PT) under a hard deadline constraint (DT), while using minimal redundancy information (RI). To accomplish this, PRRT uses an adaptive HARQ erasure coding scheme that combines the benefits of FEC (low latency) and ARQ (RI efficiency). Adapting the erasure coding scheme requires observing and modelling the underlying channel. We choose a (piecewise) IID model with packet loss rate Pe as our intermediate representation. The choice of such a simple model is intentional: its low sample complexity allows us to quickly adapt to distribution shifts through frequent re-estimation, making more complex alternatives, such as the Simplified Gilbert-Elliott (SGE) model, unnecessary in practice (see Figure 4-A). Additionally, using a simple model is a requirement to sustain real-time performance on constrained devices, as deriving high-quality (e.g., low RI) coding configurations can be prohibitively costly when not optimized [15, 32].

Minimizing the RI is a core design objective of PRRT, which, with the addition of a hard deadline constraint, makes Maximum Distance Separable (MDS) codes a strong choice. MDS codes by construction are erasure codes that achieve the Singleton bound, which means given k source symbols and a block length n, resulting in p=n−k parity symbols, we can recover from any n−k=p erasures. This allows us to define the code rate of an MDS code as kn.

Specifically, PRRT uses a systematic MDS code over the field G⁢F⁢(28) with a k×n generator matrix G=[Ik|A], where A is a k×(n−k) Cauchy matrix with entries ai⁢j=1xi−yj with xi−yj≠0, 1≤i≤k, and 1≤j≤n−k. Since this MDS scheme operates over G⁢F⁢(28), its symbols are bytes. We can extend this to a packet erasure coding scheme by applying G byte-by-byte across the k source packets.

PRRT implements a scheduled hybrid erasure coding scheme, which defines a code schedule as the triplet (k,n,NP), over k source packets, block length n and ARQ parity schedule NP=[NP⁢[0],NP⁢[1],…,NP⁢[NC]]. The parity schedule describes the distribution of parity packets across ARQ cycles, with NP⁢[0] being proactive, and the total parity p satisfying p=∑i=0NCNP⁢[i]=n−k.

2.3 HARQ Configuration Characteristics

Finding the optimal coding schedule requires finding the schedule that incurs minimal redundancy information overhead while satisfying the application loss constraint PT and the application delay constraint DT. Thus, we need to define the duration, effective loss rate and redundancy information of PRRT’s HARQ coding configurations.

The total duration of a block depends on the arrival time of the first source packet and the application deadline constraint, as well as the round-trip time (RTT), which we split into an accumulation (FEC) and an ARQ phase (Adapted from [32] Equation 3.16) with

D=R⁢T⁢T+DR⁢S2+k⋅Ts+NP⁢[0]⋅PLRC⏟DF⁢E⁢C+∑c=1NC(DP⁢L+R⁢T⁢T+NP⁢[c]⋅PLRC+DR⁢S)⏟DA⁢R⁢Q

where Ts is the source packet interval, PL is the packet length, RC the datarate, DR⁢S the response delay of the receiver and DP⁢L the packet loss detection delay.

Given the IID channel model, we can compute the effective loss rate (Adapted from [32] Equation 3.17) of our coding schedule (k,n,NP) as

Pr⁢(k,n)=1k⁢∑i=1k∑j=max⁢(n−k+1,i)n−k+ii⋅(ki)⁢(n−kj−i)(nj)⏟Pd⁢(n,k,i,j)⋅(nj)⋅Pej⋅(1−Pe)n−j⏟Pm⁢(j,n,Pe) (1)

where Pd is the hypergeometric distribution, and Pm is the probability mass function of the binomial distribution.

We define the effective redundancy information of a coding configuration as the expected number of parity packets per source packet over the existing environment. The effective redundancy information of a schedule decays exponentially when ARQ cycles are available, since the probability of the next cycle triggering depends on the probability of the previous cycle c accumulating less than k packets Pf⁢a⁢i⁢l⁢(c). This directly corresponds to the incremental redundancy nature of ARQ schemes, which use exponentially lower RI than pure FEC schemes (Adapted from [32] Equation 3.11).

R⁢I⁢(k,NC,NP)=1k⋅NP⁢[0]+1k⋅∑c=1NCPf⁢a⁢i⁢l⁢(c−1)⋅NP⁢[c] (2)
Pf⁢a⁢i⁢l⁢(c)=∑j=n⁢[c]−k+1n⁢[c]Pm⁢(j,n⁢[c],Pe)with ⁢n⁢[c]=k+∑r=0cNP⁢[r].

3 Closed-Loop Reliability Control

Reliability under a deadline constraint fundamentally cannot correct every erasure pattern of an underlying communication channel. Instead, we allow applications to specify both their desired application deadline constraint (DT) and a target packet loss rate PT>0. Our objective is to satisfy the specified level of partial reliability in the existing environment, which includes a dynamic underlying communication channel between the sender and receiver applications. While our primary objective is reliability, we cannot achieve it by simply sending so much redundant data that it exhausts the shared underlying channel. We must satisfy the application constraints while minimizing the use of redundancy information (RI). PRRT incorporates this RI-minimization objective within its core architecture. First, the protocol adapts its code rate to the current channel state to meet Pr⁢(k,n)≤PT. Second, PRRT implements a scheduled HARQ scheme that combines latency-minimizing FEC with the redundancy efficiency of ARQ, while adhering to D≤DT. The scheme minimizes RI by shifting redundancy overhead to later transmission rounds, which occur with exponentially decreasing probability within the allowable delay budget. These two complementary mechanisms allow PRRT to operate efficiently.

To ensure we consistently meet the application constraints in real time across real-world channels, we design an adaptive erasure coding scheme that globally converges the end-to-end packet loss rate PE⁢2⁢E to the application target packet loss rate PT. This introduces a new orthogonal design objective, corresponding to the quality of convergence, which is dual to RI-efficiency. In this work, we focus primarily on the convergence property, while deferring to future work to discuss and build formal models of convergence quality.

3.1 The Model Mismatch Problem

Real-world packetized communication channels, especially IP networks, consist of many individual (next-hop) links that provide the foundation of the IP layer’s global routing. As a consequence, the network can grow almost indefinitely, and independently of the underlying physical implementation. However, while wired connections are relatively stable, wireless connections often implement their own stacks to provide the link reliability required for modern transport protocols to work efficiently. Congestion is a second, and arguably more prevalent, source of packet losses in IP networks. It is caused by the shared nature of communication links, which have a limited capacity and drop packets when saturated.

Due to these complex underlying channel dynamics, the channel process is not fully observable in such real-world networks. Moreover, even if we could fully observe it, recovering it exactly is computationally infeasible in general [13, 23]. Instead, we lean into the strengths of simple estimators, most notably the relatively low sample complexity of an IID Bernoulli process (Pe), to provide responsive, transient channel-state measurements. This results in modelling the channel as piecewise IID, where frequent re-estimation remains reasonably accurate across varying channel conditions. Our goal is to derive a value that represents the channel’s current (instantaneous) packet loss rate PI. PRRT estimates channel loss by observing the sequence numbers of arriving source packets at the receiver. This measure is designed to retain statistical significance regardless of the source packet interval Ts. While, from a channel-coherence perspective, the instantaneous packet loss rate PI would arguably be undefined when the passively observed slice of network behaviour is too small, we instead treat it as always defined, proportional to that slice.

This simple estimator for PI, individually fails to accurately capture long-term channel dynamics, including the low-packet-loss-rate domain and non-IID packet loss patterns. To address this model mismatch problem, we require a separate mechanism that stabilizes our system. Thus, we introduce a closed-loop controller that compensates for the limitations of the underlying model.

3.2 Integral Debt Control for Long-Term Reliability

Figure 1: Control architecture overview, showing how the control loop is connected to other components from a sender-application point of view. The network observability function keeps track of the end-to-end erasure rate PE⁢2⁢E, round-trip time R⁢T⁢T and current packet loss rate PE via feedback from the receiver. The controller uses these parameters to adjust PE, yielding the compensated or corrected packet-loss rate Pc⁢o⁢m⁢p. Finally, the incremental search uses Pc⁢o⁢m⁢p to derive the coding parameters (k,n,NP). The coding parameters instruct the coding function to collect k application data packets to generate p=n−k parity packets. The k systematic application packets are sent immediately, while the p parity packets are sent according to the HARQ-schedule NP through the network.

Controlling adaptive erasure coding requires us to bridge the gap between the most recent instantaneous channel-state estimations and the global objective of converging the end-to-end packet loss rate PE⁢2⁢E towards the target packet loss rate PT. First, we must consider the environment we operate in and the control inputs we have. Figure 1 gives an overview of the control architecture and shows how it arrives at the coding parameters (k,n,NP) by adapting to network conditions observed from feedback packets. The transport layer controller operates directly below the sender application, which also defines the target constraints, including the target packet loss rate. Time-related statistics, such as the R⁢T⁢T and source interval Ts, are also estimated at the sender-side transport layer. The packet loss estimation for the instantaneous channel packet loss rate PI and end-to-end packet loss rate PE⁢2⁢E is part of the receiver, and thus arrives at the sender via feedback with a delay of roughly R⁢T⁢T2. Note that PE⁢2⁢E is further delayed by our deadline constraint DT, since we consider a packet only lost after its deadline expires.

Due to the same reason, when applying a control decision to the erasure coding function, the effect on the control inputs is delayed by up to DT. As a result, we will split the controller into two decoupled parts: first, the observability function, which periodically tracks and updates the estimated packet loss rates from the receiver, and second, the control function, which operates at a slower rate of 2⋅R⁢T⁢T and computes the feed-forward term from the estimated packet loss in the upcoming erasure coding configuration search. It is important that the execution of the control function is triggered relative to some measure of R⁢T⁢T, or even DT, since we should wait for the effects of a configuration change to become observable before triggering the control function anew.

The controller adaptively converges PE⁢2⁢E towards PT by applying a force to the estimated local packet loss rate PE. The PE is our estimate of the channel’s current true packet loss rate, which must remain actionable across multiple magnitudes in packet loss rate and over the lifetime of the flow. Given a constant source packet interval Ts, lower packet loss rates naturally require much longer sampling periods. We track PE using a first-order infinite impulse response (IIR) filter PE⁢[n]=PE⁢[n−1]+αn⁢(PI⁢[n]−PE⁢[n−1]) with adaptive smoothing coefficient αn=PE⁢[n−1], and apply corrections for sample frequency and sample mass mismatch. PE acts as the model-estimated feed-forward term for our controller.

To continuously satisfy the target packet loss rate constraint PT, the control function must adjust PE to compensate for the accumulated error due to unmodelled channel dynamics and forward the adjusted probability to the coding configuration search. To address this, we use an integral (I) error term based on packet deviation – packet debt – in our controller. We define packet debt as the number of packet we miss to reach the target packet loss rate PT at control step i with DI⁢[i]=NSP⁢[i]⋅(PE⁢2⁢E⁢[i]−PT), where NS⁢P⁢[i] is the total number of source packets sent up to control step i, and PE⁢2⁢E⁢[i] the global end-to-end packet loss rate at step i. We refer to DI⁢[i] as an integral term in relation to PID control, as it represents the accumulated error in the packet loss rate across all previously transmitted packets up to step i. Unlike an error rate, the packet debt remains a consistent physical measure across the lifetime of the flow. This directly addresses the model-mismatch problem, since packet debt will increase when non-IID channel dynamics undermine the effectiveness of our IID erasure-coding configurations.

Furthermore, we complement the packet debt (I) with its packet-debt integral (II) term, DI⁢I⁢[i]=∑j=0iD⁢[j], which will, over time, absorb the persistent bias of the channel model. By isolating the steady-state error over time, we allow the packet debt (I) itself to converge towards zero. Besides improving convergence, this reduces the load on the packet debt term and effectively increases its margin for responding to transient events.

We apply the total packet debt DI⁢[i] at step i, and its accumulation DI⁢I⁢[i] to the feed-forward local packet loss rate PE in the logit (log-odds) domain. This allows us to perform meaningful adjustments across the entire probability space, as additive corrections in the logit domain correspond to proportional shifts in odds, which remain consistent at the probability extremes. The final compensated packet loss rate is defined as:

Pc⁢o⁢m⁢p=σ⁢[ln⁡(PE⁢[i]1−PE⁢[i])⏟Basis Logit+KI⋅DI⁢[i]⏟Debt Force+KI⁢I⋅DI⁢I⁢[i]⏟Bias Force]

where σ⁢(x)=(1+e−x)−1 is the sigmoid function, and KI,KI⁢I the gain for the correction logits. The debt force provides a strong, fast response, while the bias force is much slower and weaker to minimize oscillations. We define KI dynamically based on the current PE as KI=FI,m⁢a⁢x⋅PT/(S0⋅PE): if our estimated channel loss is low, we increase the gain, since packet losses are much rarer, which increases responsiveness to degrading channel conditions. On the other hand, when the packet loss rate is high, packet debt accumulates more quickly, justifying a smaller gain. The gain for the double integral KI⁢I is constant. Both compensation terms are clamped to their respective finite logit ranges. Additionally, we bound DI⁢I to prevent integrator windup.

The resulting compensated packet loss rate Pc⁢o⁢m⁢p is then forwarded to the coding configuration search, which, given the current channel, platform, and application constraints, translates it into a valid coding configuration.

4 Constrained-Aware Incremental Search

The coding configuration search, in simplified terms, defines the bridge between the (IID) input probability Pc⁢o⁢m⁢p and a HARQ coding configuration (k, n, NP). Previous work shows that the search space can be significantly reduced, primarily by existing time constraints, such as the application deadline constraint DT and source rate Ts, which place significant constraints on the length of the source packet accumulation phase and number of ARQ cycles [15, 32, 14]. In addition to the established constraints, we observe that coding configurations can be ordered by their computational efficiency defined by the MDS coding complexity of roughly Ck⁢p=O⁢(k⋅p), where p=n−k. For constrained devices with limited computational resources, it is imperative to use coding configurations that are both RI-efficient and efficient to code to prevent computational bottlenecks [32]. Thus, we introduce the max_kp constraint, which limits the search space to coding configurations with k⋅p≤max_kp.

We present the incremental search as a novel, anytime algorithm that efficiently traverses the Pareto boundary in increasing order of coding complexity to identify the configuration that satisfies the application constraints with minimal redundancy. Before describing the detailed algorithm, we first define the inputs and constraints that shape the search space. The application defines the target delay DT, target loss rate PT, and source packet interval Ts. The control function yields the (model-mismatch) compensated packet loss rate Pc⁢o⁢m⁢p, while the channel delay Da⁢v⁢g=R⁢T⁢T2 arrives unchanged from the channel observation function. Finally, we model several parts of our underlying platform: the response delay DR⁢S and packet loss detection delay DP⁢L are set in relation to the real-time capabilities of the underlying system, while the maximum coding block length nm⁢a⁢x=255 spans G⁢F⁢(28), further limiting the search space and enabling the use of pre-computed lookup tables. Additionally, we consider the max_kp constraint, which can be relaxed in response to MDS erasure encoding and decoding overhead to prevent compute bottlenecks.

The incremental search uses two alternative subroutines depending on whether the available time budget DT allows ARQ cycles. In case no such cycles are possible, we can use an optimized routine for finding a pure FEC coding configuration that is more efficient to compute compared to the general ARQ subroutine without loss of quality.

4.1 Delay-Constrained FEC Configuration Search

The FEC subroutine assumes that the available time budget does not allow for ARQ cycles. This assumption allows us to simplify the repair packet schedule NP to contain only proactive redundancy NP=[NP⁢[0]]. To find the valid coding parameters (k, n) that use minimal RI, we walk along the Pareto boundary defined by the effective packet loss rate (Eq. 1) and effective redundancy information (Eq. 2). The initial step finds the first valid coding configuration (k,n), where either k=1 or (n−k)=1. The first step is guaranteed to find a valid coding configuration if the search space has a solution, since it minimizes the coding complexity constraint Ck⁢p and contains the extremes: no redundancy required (k,n)=(1,1), maximum redundancy required (k,n)=(1,nm⁢a⁢x), and minimum redundancy required (k,n)=(min⁢(nm⁢a⁢x−1,km⁢a⁢x),1+min⁢(nm⁢a⁢x−1,km⁢a⁢x)). We can define km⁢a⁢x as

km⁢a⁢x=⌊DT−R⁢T⁢T+DR⁢S2−DA⁢R⁢QTs−1⌋

which is limited by the interaction between the delay constraint and the application source interval.222We subtract 1, since we assume at least one parity packet to exist. Otherwise, no redundancy is needed, and we can use (k=1,n=1). If we cannot find a configuration that satisfies the loss and delay constraints, then no such configuration exists, and the search returns this outcome.

Given the initial valid configuration (ko⁢p⁢t,no⁢p⁢t), we can compute its effective redundancy information as R⁢IF⁢E⁢C=no⁢p⁢tko⁢p⁢t (Eq. 2 without ARQ). Any improvement to the RI must satisfy the ratio nn⁢e⁢wkn⁢e⁢w<no⁢p⁢tko⁢p⁢t. Assuming no⁢p⁢t−ko⁢p⁢t<ko⁢p⁢t, we can increment no⁢p⁢t to nn⁢e⁢w=no⁢p⁢t+1 and find the kn⁢e⁢w that satisfies no⁢p⁢t+1kn⁢e⁢w<no⁢p⁢tko⁢p⁢t, which results in jumping to kn⁢e⁢w>ko⁢p⁢t⁢(1+1no⁢p⁢t). After the RI-motivated jump, we perform a linear scan downwards from kn⁢e⁢w to find the largest k that satisfies the search constraints, and use that as our new optimal coding configuration. Once the search space is exhausted, the search returns the optimal (k,n), under the FEC-specific search constraints. The case for no⁢p⁢t−ko⁢p⁢t≥ko⁢p⁢t works analogously by incrementing ko⁢p⁢t and finding the corresponding nn⁢e⁢w−kn⁢e⁢w.

4.2 Delay-Constrained ARQ Configuration Search

Extending the search to ARQ increases search complexity by accounting for the number of repair packet cycles NC and their contents. ARQ is essential for reducing the effective redundancy information, as argued in Section 2.2. The number of available cycles is largely determined by the interaction between the channel R⁢T⁢T and the application delay constraint.

The nature of time-sensitive, real-world, hard-deadline constrained applications indicates a strong bias towards fewer cycles. Thus, to prevent search-space explosion, we limit the number of available ARQ cycles to NC,l⁢i⁢m, which results in NP⁢[0] as the proactive FEC cycle and NP⁢[1] to NP⁢[NC,l⁢i⁢m] reactive ARQ cycles. This ARQ cycle limit defaults to NC,l⁢i⁢m=5. We define the maximum number of possible ARQ cycles as

NC,m⁢a⁢x=m⁢i⁢n⁢((NC,l⁢i⁢m),⌊DT−DF⁢E⁢C,m⁢i⁢nDA⁢R⁢Q⁢[0]m⁢i⁢n⌋)

where DF⁢E⁢C,m⁢i⁢n=R⁢T⁢T+DR⁢S2+DP⁢L represents the delay of the trivial coding configuration (k,n,NP)=(1,1,[0]), and DA⁢R⁢Q⁢[0]m⁢i⁢n=R⁢T⁢T+DR⁢S represents the delay that a single ARQ cycle introduces, where DR⁢S is the response delay, and DP⁢L the packet loss detection delay.

Introducing a cycle limit significantly reduces the number of possible repair packet schedules NP, without losing the ability to tune the exponential RI gain within the available cycles. The effective redundancy information for ARQ coding configurations depends on the repair packet schedule NP as defined in Equation 2, which we can no longer use to “jump“ along the Pareto boundary. We instead follow it in incremental steps. Given the initial valid coding configuration described in the FEC section, we can compute its optimal schedule NP and its effective RI. Since (k,n,NP) satisfies the constraints, we can increment k to try reducing the RI. When the target packet loss rate constraint is not satisfied, we increase n and insert a new parity packet into NP at the position that minimizes the RI increase. The algorithm ends after at most nm⁢a⁢x steps. Each step involves a greedy search with complexity O⁢(k⋅NC2) due to the effective RI calculation, which sums the failure-probability tail. This results in a total complexity of the search of O⁢(n⋅k⋅NC2), or roughly O⁢(n2) with k≤n≤255, and assuming NC as a small constant NC≤5 in practice. We evaluate the runtime behaviour of the incremental search in Section 6.3 (Figure 5).

5 Implementation

Figure 2: PRRT system architecture overview, showing the packet flow of coding configuration (k=3,n=5,NP=[2]). PRRT sits between the application and IP layer and uses 6 threads. The Controller forwards and accumulates source packets (s⁢pi) in blocks (Bj), runs the Control Loop, including the Incremental Search, and observes the source interval Ts. The Sender forwards source packets to the underlying socket, schedules the Encoder’s encoding of code blocks and sending of the resulting parity packets (pi), and maintains the delay model of R⁢T⁢T and clock offset DO⁢f⁢f⁢s⁢e⁢t. The Receiver forwards source and parity packets and estimates the instantaneous channel packet loss rate PI. The ReceiveStore buffers source and parity packets until close to their deadlines, attempts reconstruction of missing source packets by triggering the Decoder, and maintains the end-to-end packet loss rate PE⁢2⁢E. Source packets are sent by the Sender Application with source packet interval Ts, and are delivered to the Receiver Application slightly before their deadline. Variables inside the grey-blue boxes are part of the observability function, and flow together in the Control loop. In the example, source packet 3, and parity packet 2 are dropped by the channel, which causes the ReceiveStore to reconstruct the missing source packet using parity packet 1.

We present a new reference implementation of PRRT333Supplementary Material: Software (Source Code) as a general-purpose, user-space library comprising roughly 6000 lines of Rust code. The transport layer implementation builds on top of a UDP socket and provides partially-reliable datagram transport to the application layer. The implementation further relies on the real-time capabilities of the underlying operating system, specifically targeting those provided by the Linux kernel. Figure 2 shows the multi-threaded architecture of the implementation, which relies on a system-provided high-resolution timer via the timerfd interface to enable time-predictable thread polling. This allows us to optimize the erasure coding function with bounded response and processing delays. We further implement real-time optimized data structures, such as a custom layered timewheel that enables polling threads to schedule processing tasks, and highly efficient sequence number stores based on bit arrays to efficiently track sequence number state using the popcnt instruction. State within the protocol is shared fine-grained, using lock-free atomic primitives, while the main packet data-path is built around the real-time ringbuffer rtrb444https://docs.rs/rtrb/0.3.2/rtrb/ (Accessed on 24.02.2026) crate, which implements a highly optimized bounded single-producer, single-consumer channel.

Beyond real-time performance and computational efficiency, we also prioritize reliability as a core characteristic, which Rust, as a programming language, facilitates. Rust combines the performance of C with memory-safety guarantees of a modern systems programming language. Rust enforces strict ownership and borrowing rules at compile-time to eliminate entire classes of memory bugs in safe Rust code, such as use-after-free or double-free, without a garbage collector. Furthermore, it provides the necessary and safe concurrency primitives that the reference implementation uses to orchestrate its inter-thread communication, and extends the standard library features with a rich ecosystem, such as rtrb, or system wrappers with libc555https://docs.rs/libc/0.2.182/libc/ (Accessed on 24.02.2026), timerfd666https://docs.rs/timerfd/1.6.0/timerfd/ (Accessed on 24.02.2026), and thread-priority777https://docs.rs/thread-priority/3.0.0/thread_priority/ (Accessed on 24.02.2026).

The final design objective concerns usability and configurability. We allow applications to modify compile-time constants, such as the sequence number or timestamp bit width. This allows the reference PRRT implementation to address specific operating challenges, such as limited processing and memory capabilities in micro-controllers. This is powered by a procedural macro for packet headers, which are generic over their containing field types that implement a bit-serialization trait that respects the bit-width constants, effectively showcasing Rust’s zero-cost abstraction capabilities.

Figure 2 shows the thread system architecture of the reference implementation. Source packets arrive at the sender side from the application, and travel via a rtrb channel to the controller thread. The controller thread is responsible for implementing the source packet accumulation phase, in which one source packet reference is immediately forwarded to the sender, and another reference is inserted into the currently accumulating code block. Once the block is filled, it is forwarded to the sender, and a new block is started. The controller further manages the coding configuration optimization function, which includes the packet debt-based controller, its periodic channel observation (10ms interval), and the incremental search to periodically adapt the HARQ code block configuration every 2⋅R⁢T⁢T. The sender receives both source packets, which are immediately forwarded to the underlying socket, and filled HARQ code blocks, which are scheduled within the sender’s time wheel according to their HARQ schedule. Later ARQ cycles are scheduled close to their respective cycle starts and are only coded if the acknowledged sequence numbers indicate missing packets for that block. The sender side also uses the receiver thread to receive feedback from the receiver side, which includes fresh instantaneous channel packet loss rates PI, the end-to-end packet loss rate PE⁢2⁢E, timestamps for the R⁢T⁢T estimation, and acknowledgements.

The receiver side consists of a single thread that receives packets from the underlying socket and processes them based on their type. Source packets trigger an immediate acknowledgement response, which includes the current receiver state and the acknowledged sequence number. Source and parity packets are forwarded to the receive store thread. The receive store thread is responsible for collecting all source and parity packets, decoding blocks to restore missing source packets, and delivering all received or reconstructed source packets to the application. The default delivery mode implements partial reordering, meaning source packets are delivered close to their deadlines, computed from their send time and the application’s target delay. When the flow starts, the sender has not yet received any feedback from the receiver, so it marks source packets with the desync and asap bit flags, which the receive store delivers as fast as possible, ignoring the specified deadline. Once feedback arrives, the sender can compute the clock offset DO⁢f⁢f⁢s⁢e⁢t between both sides and set an accurate receiver-side relative deadline. The clock-offset calculation is based on the PTP [18] 4-timestamp synchronization scheme, and does currently not account for drift due to frequent feedback updates.

Overall, the reference implementation aims to provide a foundation that can be expanded over time to include more advanced features and support for other platforms. The generic packet header implementation provides a very flexible way to add or modify header fields to the protocol, or even introduce new packet types. Furthermore, the current Linux-only system interfaces, such as the timer or UDP socket via libc, are implemented as wrappers and can thus be extended to support other platforms. For example, we integrate a DTLS socket into the reference implementation, providing confidentiality and integrity for both the application data and the PRRT packet headers.

6 Evaluation

We evaluate the erasure-coding functionality of the PRRT reference implementation, focusing on the closed-loop reliability controller and the incremental HARQ configuration search. We assess the following three main objectives:

  1. 1.

    Convergence: We show how the reference implementation successfully converges the end-to-end packet loss rate PE⁢2⁢E to the target packet loss rate PT, under the hard deadline constraint DT.

  2. 2.

    Model mismatch: We demonstrate the robustness of the controller over a non-IID channel, and show the system dynamically adjusts its coding parameters to evolving channel conditions, including over a non-IID Simplified Gilbert-Elliott (SGE) channel with high correlation. Additionally, we show that the system adaptively minimizes the effective redundancy information (RI) and exhibits capacity-approaching performance.

  3. 3.

    Search performance: We assess the execution time of the incremental HARQ configuration search over a comprehensive set of channel conditions, and compare its RI-efficiency to a full-search equivalent baseline over different ARQ cycle limits NC_LIMIT.

All experiments were executed on a computer with a Ryzen 9 5950x (Zen3) and 32 GB DDR4 RAM, running Linux with the 6.6.51-gentoo-dist kernel. To evaluate the reference implementation, we run the protocol by sending packets from a sender application to a receiver application over the local loopback network interface888Supplemental Material: Software (Evaluation Artefacts). The channel parameters are set using Linux traffic control999https://wiki.linuxfoundation.org/networking/iproute2 (Accessed on 24.02.2025) (t⁢c) with the NetEm [16] (Network Emulator) module. All experiments introduce a symmetric delay between sender and receiver, and configure an asymmetric Gilbert-Elliott channel loss model101010https://man.archlinux.org/man/core/iproute2/tc-netem.8.en#gemodel (Accessed 24.02.2026), which only operates on the forward path from the sender to the receiver. With this, we emulate a network environment with a stable reverse path, motivated by the observation that data packets consume more total bandwidth and are thus more likely to be dropped by the network. This setup helps us evaluate how the PRRT reference implementation interacts with its controller under various channel conditions without limiting its observability. The PRRT reference implementation is configured with the default profile, with 24-bit sequence numbers, 48-bit timestamps, and a thread polling interval of 50⁢μ⁢s. We use relatively small payloads of 50 bytes to minimize the disturbances of packet processing. The Rust code is compiled in release mode.

6.1 Convergence

First, we evaluate whether the reference implementation converges under a static IID channel-loss model. We configure the channel R⁢T⁢T=20⁢m⁢s, and use a true channel erasure (packet loss) rate of Pe=10−3, which equates to one loss every one thousand packets. We configure the application target delay to DT=100⁢m⁢s, a target erasure rate PT=10−5, and send one packet every Ts=20⁢μ⁢s microseconds (50000 packets per second) using thread spinning to ensure a constant source rate. In total, we send 6 million packets, resulting in a flow duration of 2 minutes.

Refer to caption
Figure 3: IID channel long-term convergence behaviour of a stable IID channel, with debt overlay. The packet loss rates use the shared logarithmic scale on the left, while the packet debt uses the linear scale on the right. The true average channel erasure rate Pe and target erasure rate PT are defined by the environment and the application, respectively. The end-to-end erasure rate PE⁢2⁢E, and channel erasure rate PE are observed by the controller, while the packet debt, and corrected erasure rate represent part of the internal controller state.

Figure 3 shows the evolution of the end-to-end erasure rate PE⁢2⁢E observed by the controller, as well as the local channel erasure rate PE, the compensated erasure rate Pc⁢o⁢m⁢p, and the packet debt over time. The channel erasure rate PE in the plot represents the currently observed channel packet loss rate. It is initialized one magnitude above the target erasure rate PT, which in this example is an underestimation, causing the initial HARQ coding configuration to be insufficient. As a result, once the first PE⁢2⁢E measurements of the receiver arrive, the controller computes a positive packet debt. This positive debt directly impacts the corrected erasure rate Pc⁢o⁢m⁢p, causing it to spike to stabilize the packet debt. After four seconds, the observability function converges to the true channel erasure rate Pe, we see the packet debt decrease, and Pc⁢o⁢m⁢p converges towards PE. For the remainder of the flow, we see that individual packet losses cause Pc⁢o⁢m⁢p to continue oscillating around PE, reacting aggressively to each packet loss. Overall, the end-to-end erasure rate PE⁢2⁢E converges to the target erasure rate PT, while the flow remains responsive to small changes in packet debt.

6.2 Dynamic Channel with Model Mismatch

Second, we evaluate how the reference implementation responds to a dynamic channel and to non-IID channel dynamics. We configure the channel round-trip time to a static R⁢T⁢T=20⁢m⁢s. Next, we observe four phases of packet loss rate. The first phase acts as a stabilisation baseline with a packet loss rate of 0.01 over a static IID channel. The second phase represents a sudden distribution shift that degrades the channel to a packet loss rate of 0.05. The third phase uses a non-IID Simplified Gilbert-Elliott (SGE) channel model with a packet loss rate of 0.01 and a strong correlation of ρ=0.7. The fourth phase repeats the baseline and removes the correlation of the third phase. We configure the application target delay to DT=100⁢m⁢s, with a target erasure rate PT=10−3, and send one packet every Ts=20⁢μ⁢s (50000 packets per second) using thread spinning to ensure a constant source rate. Every phase lasts for 400000 packets, except the third model-mismatch phase, which lasts for 800000 packets, thus a total of 2 million packets. The higher packet loss rate makes the channel more responsive, helping us better visualize the controller’s long-term behaviour.

Refer to caption
Figure 4: Dynamic channel redundancy information evolution. The figure is split into two subplots. The upper plot (A) shows various packet loss rates and their interactions with packet debt, while the lower one (B) shows the RI evolution of the same execution. The packet loss rates and RI use the shared logarithmic scale on the left, while the packet debt uses the linear scale on the right. The end-to-end erasure rate PE⁢2⁢E, and channel erasure rate PE are observed by the controller, while the packet debt, and corrected erasure rate represent part of the internal controller state. The true average channel erasure rate Pe and target erasure rate PT are defined by the environment. The controller RI represents the expected redundancy information used by the current schedule. The true local RI is computed as an exponential moving average of this ratio with α=0.01. The true average channel erasure rate Pe is fixed at 10−2 in phases 1, 3, 4, and 5⋅10−2 in phase 2.

Figure 4-A shows the evolution of the end-to-end erasure rate PE⁢2⁢E observed by the controller, as well as the local channel erasure rate PE, the corrected erasure rate Pc⁢o⁢m⁢p, and the packet debt over time. Compared to the previous scenario, the initial guess for the channel packet loss rate, set to one (Odds-) magnitude above the target erasure rate PT, is accurate, resulting in a much smoother start. Due to the higher packet loss rate, we can see how the packet debt varies significantly more and is also significantly larger. This showcases the effectiveness of the dynamic gain of the debt term. When the packet loss rate is high, we apply a weaker force per observed packet debt. We see one of these spikes at the beginning of the second phase, where the loss rate spikes from 0.01 to 0.05. Note that the channel observation function reacts to this change first, and slightly later the packet debt increases, due to its delay by roughly one target delay DT. This makes the controller highly responsive at higher packet loss rates, since the local channel erasure rate PE adapts more quickly.

The third phase shows how the controller reacts to a non-IID SGE model with correlation ρ=0.7. The packet debt now exhibits increased volatility, with large packet-loss spikes and long periods where the debt steadily decreases. At the same time, the controller observes a more variable, yet still accurate, average channel erasure rate PE around the true erasure rate Pe. We can clearly see the gap between PE and Pc⁢o⁢m⁢p, which compensates for the channel mismatch, and keeps the end-to-end erasure rate PE⁢2⁢E close to the target packet loss rate, effectively preventing it from diverging.

Figure 4-B shows the effective redundancy on the channel. While phases 1, 2, and 4 without correlation behave as expected, we can clearly see that in phase 3, the true local RI deviates significantly from the controller’s expected redundancy information. The controller computes the expected RI using Pc⁢o⁢m⁢p, which Figure 4-A confirms to be consistently higher than PE during this mismatch phase. However, the true local RI, which is measured by counting the actual number of packets on the wire, remains close to Pe. This is in part due to the efficiency of ARQ. In this scenario, the strong correlation of the SGE channel introduces bursty packet losses, leading to longer continuous lossless or lossy transmission periods than in an IID channel. To correct these localized erasure patterns, we must use a higher code rate. However, this is balanced by ARQ, which transmits redundancy reactively when needed, causing little overhead during loss-free periods. This causes the true local RI to closely follow the evolution of the true average channel erasure rate Pe, and thus close to the channel capacity, although with clearly visible variability.

6.3 Incremental Search

Third, we evaluate the controller’s incremental search execution time and RI efficiency across a range of common network parameters (Table 1), which covers a wide range of real-world network deployments. We generate a random search input sample by randomly selecting one magnitude per parameter of Table 1, and multiplying it with a floating point number 1≤f<10. Finally, we set the response delay DR⁢S=4⋅DP⁢o⁢l⁢l⁢i⁢n⁢g=200⁢μ⁢s, which defines how long the receiver takes to respond with a feedback packet, receive delay DR⁢C⁢V=4⋅DP⁢o⁢l⁢l⁢i⁢n⁢g=200⁢μ⁢s, which approximates the time a packet takes to travel from receiver thread to application, packet loss detection delay DP⁢L=0.2⋅R⁢T⁢T, which defines how long we wait for the subsequent ARQ cycles to trigger, and RC=inf Mbps, which assumes the channel to not rate-limit. We consider a random search input valid if a coding configuration exists that satisfies the application constraints.

Table 1: Randomised channel and application parameter magnitudes. Adapted from [32] Table 3.2.
Parameter Orders of Magnitude Unit
PT 10−3,10−4,10−5 rate
pe 10−1,10−2,10−3,10−4 rate
DT 100,101,102 ms
R⁢T⁢T 100,101,102 ms
Ts 10−1,100,101 ms
Table 2: Global average RI difference from the introduced greedy incremental search compared to an optimal (non-greedy) variant, across cycle limit mismatches. First, Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m gives the average difference in redundancy information between the incremental search and the optimal search with equal/matching ARQ cycle count NC,l⁢i⁢m. Second, Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m+1 gives the average difference between the incremental search and the optimal search, where the optimal search has an additional ARQ cycle available.
NC_LIMIT (NC,l⁢i⁢m) 0 1 2 3 4 5 6 7
Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m 0 2.3e-7 8.0e-7 6.0e-7 4.3e-7 7.9e-7 8.4e-7 1.2e-6
Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m+1 1.1 1.5e-1 5.3e-2 2.6e-2 1.5e-2 9.5e-3 6.4e-3 4.5e-3

Table 2 shows the difference between the incremental search, which relies on a greedy, incremental schedule construction, and a non-greedy, full-search-like variant that rebuilds the schedule from scratch every step. Every datapoint was generated from 2.5 million random valid configurations sampled from Table 1, and shows the total average RI difference between the greedy vs non-greedy variant. Since we only compare the effect of replacing a non-greedy schedule construction with the introduced greedy incremental search, the FEC case (Δ⁢RI0,0) matches exactly. In all other compared cases (Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m), the RI difference is minimal. When we instead compare the incremental search to its non-greedy search with an additional cycle in Δ⁢RINC,l⁢i⁢m,NC,l⁢i⁢m+1, we observe a much larger RI difference, favouring the extended cycle limit. Moreover, we observe that this difference decreases as the cycle count increases. For example, incrementing the cycle limit from 2 to 3 yields a 5.3e-2 RI improvement averaged across the entire dataset, while incrementing the cycle limit from 5 to 6 only improves the total average RI by roughly 9.5e-3. This confirms that increasing the cycle limit eventually results in marginal gains. The default cycle limit of NC,l⁢i⁢m=5 provides a good balance between limiting the search space and providing RI-efficient coding configurations.

Refer to caption
Figure 5: CDF of the incremental search execution time with the default fixed coding complexity max_kp=2048, and varying ARQ-cycle limits NC_LIMIT. The CDF shows the execution time for 1 million random, valid search inputs, with each sample averaged over 10 runs.

Figure 5 shows the execution time cumulative distribution function (CDF) of the incremental search with fixed coding complexity max_kp=2048 constraint, and different cycle limits NC_LIMIT={0,5,9}, from pure FEC, to the default limit and an extended limit. The coloured vertical lines in the plot indicate the 99.9th percentile for each NC_LIMIT configuration. The blue line represents the CDF of the execution time of the FEC subroutine. We clearly observe a disconnected group, indicating that the search returned the trivial solution: the channel is sufficiently good to satisfy the target packet-loss-rate constraint without coding. Additionally, the FEC subroutine is significantly faster than the ARQ subroutines, as indicated by the upper 50% of slower execution times. The 99.9th percentile for the FEC subroutine is 41.3us, while the maximum cycle limit of 5 takes 155⁢μ⁢s, and 9 takes 187⁢μ⁢s. Overall, on a desktop computer, the search takes a fraction of the typical RTT, making it fast enough. Because of its anytime nature, we can introduce a hard search-time limit after the initial incremental search step, yielding predictable worst-case execution times. However, doing so will result in configurations that perform suboptimally in RI efficiency, causing computationally bound devices to spend more time coding. Hence, for computationally constrained devices, it is more effective to aggressively lower max_kp, as this bounds both the coding configuration search space and the coding complexity.

The evaluations confirm that the new reference implementation’s control loop converges the end-to-end packet loss rate PE⁢2⁢E towards the target packet loss rate PT, even under model mismatch, and shows how both the packet debt and packet debt integral impact the corrected packet loss rate Pc⁢o⁢m⁢p. Additionally, the incremental search performs near optimal compared to its non-greedy alternative, and fast enough to stay below common RTT values to support a real-time adaptive erasure coding scheme.

7 Related Work

The Predictably Reliable Real-time Transport protocol (PRRT) was originally proposed by Gorius [15] with the vision of providing applications a communication primitive that guarantees a minimum level of reliability within a deadline (timeliness), while at the same time minimizing redundancy information (RI) usage.

While it is possible to maximize any two of these goals, optimally solving all three is not possible and requires trade-offs [36]. To address some of these limitations, PRRT uses a hybrid erasure coding (HARQ) scheme that efficiently leverages incremental redundancy information when the application’s constraints allow it. Pereira [32] addresses one of the remaining challenges of finding an efficient HARQ-coding configuration search algorithm, and contributes numerous incremental advances [33, 43, 14] from the full search [15]. However, all of these advances rely on the piecewise IID channel-loss estimation function, which fails to meet the application loss constraint globally, particularly over non-IID real-world channels.

Control-theoretic approaches have a long history in transport protocol design and are most commonly associated with congestion control. For example, TCP’s AIMD congestion control [20, 6] is among the earliest works to integrate a feedback-driven adaptation loop. BBR [3] is a more modern example that explicitly models the network path as a controlled system, using continuously updated estimates of bottleneck bandwidth and RTT, to pace transmissions and bound inflight data near the bandwidth-delay product. Besides network congestion, feedback control systems have been successfully used to stabilize task scheduling for real-time operating systems [26, 8]. Fewer works exist that use control loops for adaptive erasure coding schemes. Park [30] describes AFEC, which uses a control loop to adjust the code-rate of a pure FEC scheme. The evaluation of AFEC further discusses issues related to self-induced congestion, feedback delay and sensitivity around the optimal operating point.

Generally, transport protocols fall into one of three categories on the reliability-timeliness tradeoff. Fully reliable protocols like TCP [7] and QUIC [19] are not timely due to potentially unbounded retransmission delays, although some work aims to minimize their impact with proactive FEC [11, 27, 17, 10, 21]. Unreliable transport, such as UDP [35] or QUIC’s datagram extension [31], minimizes latency but provides no reliability or timeliness within a deadline constraint and delegates erasure coding to the application layer. Finally, partially reliable transport layer protocols, such as RTP [37] with FlexFEC [45] or WebRTC [1], balance reliability and timeliness and are primarily used in multimedia streaming and cyber-physical control applications. While WebRTC implements a truly adaptive erasure coding scheme, it is purpose-built for multimedia streaming, integrating proactive forward erasure coding (FEC) with specific codec features, such as packet loss concealment in the Opus audio codec [42]. This makes it difficult to use for general applications. RTP with the FlexFEC extensions allows applications to define their own proactive FEC coding parameters, providing configurable reliability. However, (optimally) adapting this parameter is difficult and wasteful. Applications will likely use as much redundancy as they deem reasonable and will not dynamically match this parameter to the channel condition, which, especially for proactive FEC, results in significant redundancy overhead.

Finally, there exists a family of promising adaptive erasure coding schemes based on deep neural networks [12, 40, 5], which directly predict FEC code-rates based on current and recent channel conditions. This makes them a significant improvement over the previously mentioned fixed-FEC schemes. Furthermore, Chen et. al. [4], and Li et. al.[24] takes a similar multimedia-integrated approach to WebRTC and optimizes for smooth video playback, using reinforcement learning or LSTMs to control an FEC erasure-coding scheme to maximize perceived video quality.

8 Discussion

8.1 Control

Recent machine learning approaches for real-time communication protocols show promising results by directly predicting channel parameters, such as FEC code rates, or more multimedia-specific statistics, such as packet prioritization. While these schemes work reasonably well in practice, they themselves act as black boxes due to their deep neural network architectures. This makes them challenging to use for safety-critical systems [25], which prefer interpretable components that benefit from more robust system integration. Furthermore, PRRT shows that extending proactive FEC with reactive ARQ can significantly improve RI efficiency, although it requires traversing a significantly more complex, discrete coding configuration space than pure FEC. Due to this complexity, directly predicting near-optimal HARQ-coding configurations is brittle and costly, requiring larger neural networks and search-space regularization [14].

To address these concerns and remain real-time viable, PRRT prioritizes using efficient, deterministic core algorithms built on existing domain knowledge to find predictable, and reliable solutions (incremental search). However, deterministic algorithms often rely on unrealistic assumptions to remain efficient, thereby underfitting the complexity of real-world dynamics. Similar to how feedback control scheduling uses miss ratios to compensate for unpredictable execution times due to hardware complexities like caching and branching [26], PRRT bridges this gap with a control loop that compensates for loss-model mismatch by using packet debt as the central metric.

To better understand the behaviour of this control loop, we turn to the concept of controllability. Control theory defines controllability in terms of a system’s ability to reach desired states (e.g., PT) via its inputs (e.g., PE⁢2⁢E). This poses a challenge in our case due to the complex nature of real-world networks, leaving us with a black box to work with. As a result, we cannot define controllability in the general sense here and instead defer to the application to specify the bounds the protocol must respect during operation. If PRRT finds a channel uncontrollable, we defer quality of service adjustments to the application, mirroring how elastic task models [2] and adaptive bitrate streaming [41, 44] operate. In this work, we require only that the measured end-to-end packet loss rate converge to the target packet loss rate, which is sufficient to show controllability in a broad sense. We defer to future work to build more formal models of convergence quality.

Overall, combining the mathematically reliable incremental search with a dynamic stability mechanism in the control loop offers a principled solution to provide predictably reliable, timely, and RI-efficient packet transport.

8.2 HARQ Search

The key insight in designing efficient search algorithms for the HARQ coding configuration search is to restrict the search space. Previous work [32] favours a hybrid deep learning approach that predicts the parameter k using a time-predictable deep neural network, followed by an optimized deterministic algorithm to derive the final valid coding configuration. While this approach works in practice, it hides much of the complexity within the neural network black box and comes with several downsides. For example, to achieve fast inference times, the network is trained on a smoothed dataset that accepts any good k, which results in coding configurations with suboptimal RI efficiency. Consequently, the search objective is no longer to find the optimal k, which changes the search complexity not just for the neural network, but also for its deterministic counterparts.

The incremental search leans into this relaxed, near-optimal objective and introduces coding complexity as an orthogonal optimization objective to the RI-efficiency. For now, the incremental search implements this as a hard limit with the max_kp parameter, although we can co-optimize the objectives to provide a more explicit balance between energy and RI-efficiency. Pereira [32] confirms that in many cases, there are numerous coding configurations that are within a few percentage points of the lowest achievable RI, which the incremental search is designed to traverse efficiently. Instead of searching for the optimal configuration directly or exhaustively, the incremental search quickly finds a valid configuration and then greedily improves it, incrementally increasing the allowed coding complexity at each step. Furthermore, compared to the black-box neural network that predicts any of the valid k candidates, the incremental search can use a heuristic to bias, or restrict the available k to ones that result in coding configurations that are efficient to encode and decode with the max_kp parameter. This has significant impacts on the efficiency and viability of PRRT for resource-constrained devices and provides a mechanism to properly pace the flow when encoding or decoding bottlenecks occur. Additionally, the incremental search is designed as an anytime algorithm [46]; the first step will always find a valid configuration if one exists, allowing us to interrupt the algorithm at any time after this first step to obtain a predictable worst-case execution time, similar to what neural networks offer. That said, this has limited use for the PRRT reference implementation, which optimizes its coding configuration at roughly 2⋅R⁢T⁢T, orders of magnitude slower than a single search execution.

9 Conclusion

In this work, we demonstrated that a control loop can compensate for the inherent underfitting of piecewise IID channel estimators, allowing for predictable reliability across non-IID channels. We introduce packet debt as a physical measure of accumulated reliability failures, enabling the control loop to reliably satisfy the application loss constraint and compensate for the inherent model mismatch of the piecewise IID assumption. The controller thus acts as the stability mechanism, which enables us to utilize the incremental search algorithm to find RI-efficient coding configurations within the computational constraints of the underlying platform.

The evaluation of our Rust implementation confirms the validity of this approach. The control loop consistently meets the application constraints, even under model mismatch, and remains responsive to sudden shifts in channel distribution. Furthermore, we demonstrate the channel-capacity-approaching properties of PRRT’s HARQ erasure-coding function in scenarios where the environment and constraints permit ARQ cycles, especially over non-IID channels. Our approach provides a path toward safe, predictably reliable transport for real-time cyber-physical systems without requiring computationally prohibitive channel modelling or black-box deep neural networks.

10 Future Work

While the current system is designed to converge the end-to-end packet loss rate towards the application target packet loss rate, several open challenges remain, specifically regarding the quality of convergence.

10.1 Convergence Quality

The controller architecture enables us to design and formalise the convergence behaviour. For example, simple convergence, such as demonstrated by this paper, leads to oscillations around the target packet loss rate. The quality of convergence concerns itself with such oscillations, how to reduce them, and how to safely approach the target packet loss rate from below. Furthermore, we can consider satisfying the target packet loss rate over shorter time, or sample windows. This would require us to modify our original convergence objective to bias towards, e.g., controlling packet-loss spikes. Generally speaking, stricter requirements will incur some level of redundancy overprovisioning, reflecting the inherent cost of stronger piecewise reliability guarantees.

10.2 Congestion and Active Inference

Finally, PRRT must implement a measure to prevent congestion collapse [22, 30]. Compared with elastic transport-layer protocols such as TCP, PRRT’s response to congestion is more nuanced, as it is designed to continuously satisfy its application constraints. This uniquely limits our ability to reduce PRRT’s data rate, as doing so would violate these application constraints. Instead, we plan to implement a function to estimate the value or efficiency of redundancy packets during protocol operation. If this value becomes negative or very small, we can reduce the number of parity packets, as they degrade the channel more than they benefit our erasure coding function. This approach is based on PRRT’s active role in the channel, which satisfies a precondition for active inference and causal discovery.

References

  • [1] Harald T. Alvestrand. Overview: Real-Time Protocols for Browser-Based Applications. RFC 8825, January 2021. doi:10.17487/RFC8825.
  • [2] Giorgio C Buttazzo, Giuseppe Lipari, and Luca Abeni. Elastic task model for adaptive rate control. In Proceedings 19th IEEE Real-Time Systems Symposium (Cat. No. 98CB36279), pages 286–295. IEEE, 1998. doi:10.1109/REAL.1998.739754.
  • [3] Neal Cardwell, Yuchung Cheng, C Stephen Gunn, Soheil Hassas Yeganeh, and Van Jacobson. BBR: congestion-based congestion control: Measuring bottleneck bandwidth and round-trip propagation time. ACM Queue, 14(5):20–53, 2016. doi:10.1145/3012426.3022184.
  • [4] Ke Chen, Han Wang, Shuwen Fang, Xiaotian Li, Minghao Ye, and H Jonathan Chao. Rl-afec: adaptive forward error correction for real-time video communication based on reinforcement learning. In Proceedings of the 13th ACM Multimedia Systems Conference, pages 96–108, 2022. doi:10.1145/3524273.3528184.
  • [5] Sheng Cheng, Han Hu, Xinggong Zhang, and Zongming Guo. Deeprs: Deep-learning based network-adaptive fec for real-time video communications. In 2020 IEEE International Symposium on Circuits and Systems (ISCAS), pages 1–5. IEEE, 2020. doi:10.1109/ISCAS45731.2020.9180974.
  • [6] Dah-Ming Chiu and Raj Jain. Analysis of the increase and decrease algorithms for congestion avoidance in computer networks. Computer Networks and ISDN systems, 17(1):1–14, 1989. doi:10.1016/0169-7552(89)90019-6.
  • [7] Wesley Eddy. Transmission Control Protocol (TCP). RFC 9293, August 2022. doi:10.17487/RFC9293.
  • [8] Johan Eker, Per Hagander, and Karl-Erik Årzén. A feedback scheduler for real-time controller tasks. Control Engineering Practice, 8(12):1369–1378, 2000. doi:10.1016/S0967-0661(00)00086-1.
  • [9] M. Feder, N. Merhav, and M. Gutman. Universal prediction of individual sequences. IEEE Transactions on Information Theory, 38(4):1258–1270, 1992. doi:10.1109/18.144706.
  • [10] Simone Ferlin, Stepan Kucera, Holger Claussen, and Özgü Alay. Mptcp meets fec: Supporting latency-sensitive applications over heterogeneous networks. IEEE/ACM Transactions on Networking, 26(5):2005–2018, 2018. doi:10.1109/TNET.2018.2864192.
  • [11] Pablo Garrido, Isabel Sanchez, Simone Ferlin, Ramon Aguero, and Ozgu Alay. rquic: Integrating FEC with QUIC for robust wireless communications. In 2019 IEEE Global Communications Conference, GLOBECOM 2019, Waikoloa, HI, USA, December 9-13, 2019, pages 1–7. IEEE, IEEE, 2019. doi:10.1109/GLOBECOM38437.2019.9013401.
  • [12] Jason Gerard, David C Bonilla, Abdelhak Bentaleb, and Sandra Céspedes. Optimizing quality and energy efficiency in webrtc with ml-powered adaptive fec. In 2024 IEEE International Conference on Multimedia and Expo Workshops (ICMEW), pages 1–6. IEEE, 2024. doi:10.1109/ICMEW63481.2024.10645390.
  • [13] Denisa Ghita, Can Karakus, Katerina Argyraki, and Patrick Thiran. Shifting network tomography toward a practical goal. In Proceedings of the 2011 Conference on Emerging Networking Experiments and Technologies, Co-NEXT ’11, Tokyo, Japan, December 6-9, 2011, pages 1–12. ACM, 2011. doi:10.1145/2079296.2079320.
  • [14] Pablo Gil Pereira, Kai Vogelgesang, Moritz Miodek, Andreas Schmidt, and Thorsten Herfet. Deepsharq: hybrid error coding using deep learning. Journal of Reliable Intelligent Environments, 9(3):283–301, 2023. doi:10.1007/s40860-023-00207-7.
  • [15] Manuel Gorius. Adaptive delay-constrained internet media transport. PhD thesis, Universität des Saarlandes, 2012. doi:10.22028/D291-26414.
  • [16] Stephen Hemminger. Network emulation with netem. In Proc. Linux Conference Australia, 2005. URL: https://www.academia.edu/download/80898529/netem-shemminger.pdf.
  • [17] Kilian Holzinger, Daniel Petri, Stefan Lachnit, Marcel Kempf, Henning Stubbe, Sebastian Gallenmüller, Stephan Günther, and Georg Carle. Forward error correction and weighted hierarchical fair multiplexing for HTTP/3 over QUIC. In 2025 IFIP Networking Conference, Limassol, Cyprus, 26-30 May 2025, pages 1–9. IFIP Open Digital Library, 2025. URL: https://opendl.ifip-tc6.org/db/conf/networking/networking2025/1571124971.pdf.
  • [18] IEEE. Ieee standard for a precision clock synchronization protocol for networked measurement and control systems, 2020. doi:10.1109/IEEESTD.2020.9120376.
  • [19] Jana Iyengar and Martin Thomson. QUIC: A UDP-Based Multiplexed and Secure Transport. RFC 9000, May 2021. doi:10.17487/RFC9000.
  • [20] Van Jacobson. Congestion avoidance and control. ACM SIGCOMM computer communication review, 18(4):314–329, 1988. doi:10.1145/52324.52356.
  • [21] MinJi Kim, Jason Cloud, Ali ParandehGheibi, Leonardo Urbina, Kerim Fouli, Douglas Leith, and Muriel Médard. Network coded TCP (CTCP). CoRR, abs/1212.2291, 2012. doi:10.48550/arXiv.1212.2291.
  • [22] Nicolas Kuhn, Emmanuel Lochin, François Michel, and Michael Welzl. Forward Erasure Correction (FEC) Coding and Congestion Control in Transport. RFC 9265, July 2022. doi:10.17487/RFC9265.
  • [23] Ming Li and Paul Vitányi. An Introduction to Kolmogorov Complexity and Its Applications, 4th Edition. Springer, 4th edition, 2019. doi:10.1007/978-3-030-11298-1.
  • [24] Pengcheng Li, Kaiguo Yuan, Xiaoyong Li, and Mengyang Zhang. An adaptive forward error correction method based on deep learning for real-time video transmission. In 2024 3rd International Conference on Big Data, Information and Computer Network (BDICN), pages 92–96. IEEE, 2024. doi:10.1109/BDICN62775.2024.00024.
  • [25] Sizhe Liu, Rohan Wagle, James H. Anderson, Ming Yang, Chi Zhang, and Yunhua Li. Autonomy Today: Many Delay-Prone Black Boxes. In Rodolfo Pellizzoni, editor, 36th Euromicro Conference on Real-Time Systems (ECRTS 2024), volume 298 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:27, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ECRTS.2024.12.
  • [26] Chenyang Lu, John A Stankovic, Sang H Son, and Gang Tao. Feedback control real-time scheduling: Framework, modeling, and algorithms. Real-Time Systems, 23(1):85–126, 2002. doi:10.1023/A:1015398403337.
  • [27] François Michel, Quentin De Coninck, and Olivier Bonaventure. Quic-fec: Bringing the benefits of forward erasure correction to quic. In 2019 IFIP Networking Conference (IFIP Networking), pages 1–9. IEEE, 2019. doi:10.23919/IFIPNetworking.2019.8816838.
  • [28] Moritz Miodek. prrt. Software, swhId: swh:1:dir:d4ef292e34301fb2063467cbd5ea523a35b63bf4 (visited on 2026-06-16). URL: https://github.com/miodic/prrt/tree/ECRTS26AE, doi:10.4230/artifacts.26730.
  • [29] Moritz Miodek. prrt-eval-artifacts. Software, swhId: swh:1:dir:4aa211a02e8d8f61b01c0b56c4a77685b0fd7ab9 (visited on 2026-06-16). URL: https://github.com/miodic/prrt-eval-artifacts/tree/ECRTS26AE, doi:10.4230/artifacts.26732.
  • [30] Kihong Park and Wei Wang. AFEC: an adaptive forward error correction protocol for end-to-end transport of real-time traffic. In Proceedings of the International Conference On Computer Communications and Networks (ICCCN 1998), October 12-15, 1998, Lafayette, Louisiana, USA, pages 196–207. IEEE, IEEE Computer Society, 1998. doi:10.1109/ICCCN.1998.998777.
  • [31] Tommy Pauly, Eric Kinnear, and David Schinazi. An Unreliable Datagram Extension to QUIC. RFC 9221, March 2022. doi:10.17487/RFC9221.
  • [32] Pablo Gil Pereira. Predictable Data Transport: A Delay and Energy Perspective. PhD thesis, Universität des Saarlandes, 2024. doi:10.22028/D291-42391.
  • [33] Pablo Gil Pereira, Andreas Schmidt, and Thorsten Herfet. Deephec: Hybrid error coding using deep learning. In 2022 18th European Dependable Computing Conference (EDCC), pages 17–24. IEEE, 2022. doi:10.1109/EDCC57035.2022.00015.
  • [34] Yury Polyanskiy, H Vincent Poor, and Sergio Verdú. Channel coding rate in the finite blocklength regime. IEEE Transactions on Information Theory, 56(5):2307–2359, 2010. doi:10.1109/TIT.2010.2043769.
  • [35] Jon Postel. User Datagram Protocol. RFC 768, August 1980. doi:10.17487/RFC0768.
  • [36] Andreas Schmidt. Cross-layer Latency-Aware and -Predictable Data Communication. PhD thesis, Universität des Saarlandes, 2019. doi:10.22028/D291-30851.
  • [37] Henning Schulzrinne, Stephen L. Casner, Ron Frederick, and Van Jacobson. RTP: A Transport Protocol for Real-Time Applications. RFC 3550, July 2003. doi:10.17487/RFC3550.
  • [38] Claude E Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423, 1948. doi:10.1002/j.1538-7305.1948.tb01338.x.
  • [39] Meryem Simsek, Adnan Aijaz, Mischa Dohler, Joachim Sachs, and Gerhard Fettweis. 5g-enabled tactile internet. IEEE Journal on selected areas in communications, 34(3):460–473, 2016. doi:10.1109/JSAC.2016.2525398.
  • [40] Tailai Song, Paolo Garza, Michela Meo, and Maurizio M Munafò. Dex: Deep learning-based throughput prediction for real-time communications with emphasis on traffic extremes. Computer Networks, 249:110507, 2024. doi:10.1016/j.comnet.2024.110507.
  • [41] Thomas Stockhammer. Dynamic adaptive streaming over http– standards and design principles. In Proceedings of the second annual ACM conference on Multimedia systems, pages 133–144, 2011. doi:10.1145/1943552.1943572.
  • [42] Jean-Marc Valin, Koen Vos, and Timothy B. Terriberry. Definition of the Opus Audio Codec. RFC 6716, September 2012. doi:10.17487/RFC6716.
  • [43] Kai Vogelgesang, Pablo Gil Pereira, and Thorsten Herfet. Sharq: Scheduled harq for time-and loss-rate-sensitive networks. In 2023 IEEE 20th Consumer Communications & Networking Conference (CCNC), pages 640–643. IEEE, 2023. doi:10.1109/CCNC51644.2023.10060294.
  • [44] Xiaoqi Yin, Abhishek Jindal, Vyas Sekar, and Bruno Sinopoli. A control-theoretic approach for dynamic adaptive video streaming over http. In Proceedings of the 2015 ACM conference on special interest group on data communication, pages 325–338, 2015. doi:10.1145/2785956.2787486.
  • [45] Mo Zanaty, Varun Singh, Ali C. Begen, and Giridhar Mandyam. RTP Payload Format for Flexible Forward Error Correction (FEC). RFC 8627, July 2019. doi:10.17487/RFC8627.
  • [46] Shlomo Zilberstein. Using anytime algorithms in intelligent systems. AI Magazine, 17(3):73–83, 1996. doi:10.1609/aimag.v17i3.1232.