Table of Contents Author Guidelines Submit a Manuscript
Research Letters in Communications
Volume 2008 (2008), Article ID 546184, 4 pages
Research Letter

An Analytical Model for Optimum Byte-Level and Packet-Level FEC Assignment Using Buffer Dynamics

Department of Electrical and Computer Engineering, University of Calgary, Calgary, AB, Canada T2N 1N4

Received 8 January 2008; Accepted 18 March 2008

Academic Editor: Luca De Nardis

Copyright © 2008 Azfar Moid and Abraham O. Fapojuwo. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


This letter presents an analytical model that jointly exploits the buffer dynamics of both the sending and receiving nodes to find the optimum number of byte-level and packet-level forward error correction (FEC) units for real-time multimedia transmission over wireless networks. The proposed analytical model first provides an optimum number of FEC units required at the byte-level, and then chooses the number of FEC units at the packet-level based on current channel and network conditions. The accuracy of the proposed model is dependent on two parameters: the variable deadline-time at the byte-level and fixed round-trip time (RTT) delay at the packet-level. Numerical results demonstrate the effectiveness of the model in reducing the unrecoverable error probability, which is achieved when the byte-level FEC scheme is supplemented by the packet-level FEC scheme.

1. Introduction

In this letter, the problem of selecting the byte-level and packet-level forward error correction (FEC) combinations that increase the overall system efficiency and video quality is presented as a 0-1 knapsack optimization problem. We propose a dynamic programming (DP) based algorithm for selecting the byte-level and packet-level FEC units to minimize the effect of error-prone wireless channel and network losses. This approach is different from that of [1] by calculating the cost/throughout ratio (CTR) at both the byte and packet levels, instead of a single level considered in [1]. Moreover, unlike in [1] where the time parameter is kept constant, here we adopt a methodology that incorporates the variable time parameter in calculating CTR, which is a more realistic approach. The work presented in this letter also supplements the work in [2] by presenting an analytical model that proves the effectiveness of using packet-level FEC in conjunction with byte-level FEC schemes. The main contribution of this letter is the presentation of a DP-based model that utilizes the queuing dynamics of both the sending and receiving nodes of a wireless network in calculating the number of FEC redundancy units at both the byte and packet levels, in the context of video transmission over a wireless network.

2. Problem Formulation and Proposed Solution

Suppose that 𝑚𝑏 and 𝑀𝑝 are the particular FEC combinations chosen at the byte-level and packet-level, respectively, such that 𝑚𝑏=(𝑛,𝑘𝑏) and 𝑀𝑝=(𝑁𝑝,𝐾). Here, 𝑛 is the total number of bytes per packet after redundancy is added to a packet and 𝑘𝑏 is the original number of bytes per packet, such that 𝑛=𝑘𝑏+𝑏, and 𝑏 (0𝑏𝑛1) is the number of redundancy bytes added to a packet. Similarly, 𝑁𝑝 is the total number of packets in a video block after redundancy is added and 𝐾 represents the original number of packets in a video block, such that 𝑁𝑝=𝐾+𝑝, and 𝑝 (0𝑝𝐾) is the number of redundant packets added to a video block.

2.1. The Optimization Problem

Formally, the optimization problem is casted as a 0-1 knapsack problem, and is formulated as follows: min(0𝑏𝑛10𝑝𝐾)𝐸𝐷𝑚𝑏,𝑀𝑝𝐵subjectto(1)vid𝑚𝑏,𝑀𝑝𝐵max𝐵other,𝑚(2)𝑇𝑏,𝑀𝑝𝑇𝑑,(1) where 𝐸 [𝐷(,)] is the expectation of a block distortion. In (1), 𝐵vid(,) represents the number of video packets that contribute to the buffer occupancy, whereas 𝐵max and 𝐵other are, respectively, the maximum buffer size and number of nonvideo packets in the buffer at any given time. On the other hand, 𝑇(,) and 𝑇𝑑 are the time to transmit a video block and total time to render the block on a video player, respectively.

The expectation of the block distortion 𝐸 [𝐷(,)] can be calculated using the mean square error (MSE) between originally transmitted and received blocks: 𝐸𝐷𝑚𝑏,𝑀𝑝=𝐾𝑖=1𝐸𝑑𝑖=𝐾𝑖=11𝐸[𝑢𝑢𝑗=1𝑓𝑗,𝑖𝑓𝑗,𝑖2],(2)where 𝐸 [𝑑𝑖] is the expectation of the packet distortion, 𝑢 is the total number of pixels in a packet, and 𝑗 is the pixel index of the current packet. In (2), 𝑓 denotes the original image and 𝑓 represents the reconstructed image.

The IEEE 802.11 medium access control (MAC) standard defines an automatic repeat request (ARQ) mechanism where acknowledgments and timeouts are used to achieve reliable data transmission. If the maximum number of ARQ retries is set to 𝑅max, the perceived error-free probability at the application layer is given by 𝛿correct=𝑅max𝑟=1𝛿1𝛿𝑟1=1𝛿𝑅max,(3) where 𝛿 is the probability of error for transmitted packets over the lossy wireless channel, and 𝑟 is the index of number of retries. The value of 𝑅max is limited for practical purposes, so that the packet transmission delay will not exceed the tolerable delay limit for a video packet. The average number of transmission attempts until a packet is successfully transmitted is given by 𝐸𝑅=𝑅max𝑟=1𝑟𝛿1𝛿𝑟1.(4)If round-trip time (RTT) is denoted by 𝑇RTT, and packet transmission time is denoted by 𝑇𝑝, the total time to transmit a video block is then calculated by 𝑇𝑚𝑏,𝑀𝑝𝑇=𝑁RTT𝐸𝑅1+𝑇𝑝.(5)

2.2. Dynamic Programming (DP-) Based Solution

Because of the NP-hardness of 0-1 knapsack optimization problems [3], suboptimal solutions can be found using DP-based techniques. The time complexity of the DP algorithms is pseudopolynomial, which is acceptable even for real-time multimedia streaming applications [4]. The computation time can be minimized by limiting the size of a packet and the maximum number of packets in a video block. The first step of DP-based algorithm is to calculate the number of redundant FEC bytes per packet that can minimize the CTR.

Let 𝐻(𝑖) denote the number of packets in the playback buffer of the receiving node, right after the playback of the 𝑖th video packet, where 𝑖=1,2,. To avoid underflow of the playback buffer, we define a deadline-time (𝑇𝑐) within which the next video packet should arrive. 𝑇𝑐 can be written as 𝑇𝑐(𝑖)=𝐻(𝑖)𝑓𝑝,(6) where is the average number of packets in a video frame, and 𝑓𝑝 denotes the video frame rate in frames/second. By extending the work of [1] to the byte-level FEC, the CTR for a packet transmission is defined as CTR(𝑖)=𝑞𝑇𝑐1(𝑖)+𝑟𝑛𝑤𝑛,𝑘𝑏.(7)Here, 𝑞 (0𝑞1) is the cost-time product of transmitting a packet and 𝑟 (0𝑟1) is the cost per transmitted byte. In (7), 𝑤(𝑛,𝑘𝑏) is the score of the FEC combination (𝑛,𝑘𝑏). Assuming that the channel remains stationary during the transmission of one packet, the score is defined as the total goodput of a selected (𝑛,𝑘𝑏) strategy. Now, the CTR can be written as CTR(𝑖)=𝑞𝑇𝑐1(𝑖)+𝑟𝑛𝑘𝑏𝑃𝑟𝑛,𝑘𝑏,(8) where Pr(𝑛,𝑘𝑏) is the probability that an (𝑛,𝑘𝑏) code is successful (i.e., at most 𝑛-𝑘𝑏 bytes are in error). Let 𝜀 denote the bit error rate (BER) of the channel and, assuming bit error occurs randomly and independently, the byte error rate (𝜌) can be calculated as 𝜌=1(1𝜀)8. Finally, Pr(𝑛,𝑘𝑏) is calculated by Pr(𝑛,𝑘𝑏)𝑛𝑖=𝑘𝑏𝑛𝑖1𝜌𝑖𝜌𝑛𝑖.(9) For a given packet size 𝑛 , and the current channel conditions, a search is made to find the minimum number of FEC bytes required per packet for which the throughput is maximized (i.e., minimize the CTR). The search is stopped when the minimum point of CTR is reached.

The second step of the DP-based algorithm is to calculate 𝑝, the optimum number of redundant FEC packets required for each video block with combination 𝑀𝑝. At the packet-level FEC, a fixed RTT is considered in [1], but there is a requirement for a variable RTT because the network loading changes in real-time and channel conditions are not known a priori. As the video packet arrival rate 𝑉(𝑡) at the sending node is known and, for a given channel rate 𝐶(𝑡), the buffer occupancy 𝐵full(𝑡) of the sending node can be determined as 𝐵full(𝑡)=𝑡0𝑉(𝜏)𝐶(𝜏)𝑑𝜏.(10) Here, we postulate that the number of redundant FEC packets can be calculated as 𝐾𝑒𝑝(𝑡)=1(𝐵full(𝑡))/𝜂𝑒𝐵max/𝜂.(11) An exponential function is assumed here such that the number of redundant packets decreases exponentially with time to prevent network congestion due to too many FEC packets, where 𝜂 is the control parameter. These redundant FEC packets are added to the video block if and only if the second constraint in (1) is met, that is, 𝑇(𝑚𝑏,𝑀𝑝)𝑇𝑑. Otherwise, the algorithm sequentially takes the values of 𝑝1,𝑝2, until the second constraint is met. This shows that the optimum number of FEC packets is not constant but time-dependent, which is critical for real-time applications.

A packet arriving at the network can be lost due to two independent reasons: first, it is dropped due to limited buffer capacity at the sending node; or second, the packet cannot be recovered by the byte-level FEC combination (i.e., more than 𝑛-𝑘𝑏 bytes are in error). The lost packets can be recovered by the packet-level FEC scheme, if the number of lost packets is no more than 𝑁𝑝𝐾, otherwise the video block is said to be lost. Let 𝑃𝑑 denote the probability of a packet drop due to limited buffer capacity, the probability of unrecoverable error (i.e., the video block is permanently lost), denoted by 𝑃ER, is then given as 𝑃ER=𝑁𝑝𝑖=𝑁𝑝𝐾+1𝑁𝑝𝑖Pr𝑛,𝑘𝑏1𝑃𝑑𝑁𝑝𝑖1𝑃𝑟𝑛,𝑘𝑏1𝑃𝑑𝑖,(12) where Pr(𝑛,𝑘𝑏) is defined in (9). In (12), 𝑖 represents the erroneous packets which are not recoverable by packet-level FEC and contribute to the permanent loss of a video block.

3. Numerical Results

Figure 1 shows the number of redundant FEC bytes required for each packet when the channel condition varies from bad to good (i.e., BER varies from 101 to 105). Three packet sizes are considered (i.e., 𝑛=500, 1000, 2000 bytes) because the IEEE 802.11 standard allows variable packet sizes with the maximum MAC service data unit (MSDU) size of 2304 bytes. Without loss of generality, we set 𝑞=1 and 𝑟=1 in (7). The frame rate is set to 30 frames/sec (to emulate the television quality video) and we assume that, on the average, the video frame size is of 5 packets (i.e., =5), to include the effects of all I-, P-, and B-type video frames. To achieve the desired delay objective for video packets, the maximum number of retries (𝑅max) is set to 4. The number of redundant FEC bytes for which the CTR value is minimized in (8) is determined. By comparing different channel conditions in Figure 1, it is evident that the number of redundant FEC bytes required under bad channel conditions is much higher than that required under good channel conditions, as expected.

Figure 1: Number of FEC bytes required to minimize the CTR.

To further show the effectiveness of using FEC combinations at both the byte-level and packet-level, consider a scenario where the channel is bad (i.e., BER=102), and the packet loss due to sending side’s buffer overflow is not very significant (i.e., 𝑃𝑑=103). This is a typical scenario where the sending node has enough buffer capacity but unable to transmit packets due to bad channel condition. Figure 2 shows the comparison of byte-level and packet-level FEC combinations (individually and jointly) for reducing the probability of unrecoverable error. Here, we have considered one video block of 8 video packets, that is, 𝐾=8, and the packet size is fixed at 500 bytes. As determined from Figure 1, when BER=102, the number of redundancy bytes required to minimize the CTR is 54, hence (500, 446) combination is selected at the byte-level. The probability of unrecoverable error can be further reduced from 5.1×102 at packet-level combination (8, 8) to 3.3×105 at packet-level combination (10, 8), as shown in Figure 2, by selecting the optimum packet-level FEC combination allowed by the second constraint in (1). Figure 2 confirms that implementing the FEC at only one level is not good enough for error correction and hence should be supplemented by the FEC implementation at the other level.

Figure 2: 𝑃ER for different packet-level FEC combinations.

The probability of unrecoverable error for the DP-based algorithm proposed in this letter was compared with the corresponding result for the algorithm presented in [2], assuming 𝑛=500, BER=102, 𝑃𝑑=103, and 𝐾=8. It is seen from Figure 3 that, under the different packet combinations considered, the probability of unrecoverable error for the DP-based algorithm is lower than that of the algorithm presented in [2]. The CTR model used in the DP-based algorithm introduces a lower bound on the number of FEC bytes, this translates to a better error recovery at the packet-level, thus resulting in lower probability of unrecoverable error.

Figure 3: Comparison of the 𝑃ER of the proposed DP(-based) algorithm and the algorithm presented in [2].

4. Conclusion

It is concluded that optimum byte-level and packet-level FEC assignment in conjunction with buffer dynamics results in lower probability of unrecoverable error. This translates to high-transmission quality, a desirable requirement for both wireless service subscribers and providers.


The authors acknowledge the support of TRLabs, Natural Sciences and Engineering Research Council (NSERC) Canada and the University of Calgary.


  1. L. Libman and A. Orda, “Optimal packet-level FEC strategies in connections with large delay-bandwidth products,” IEEE Transactions on Wireless Communications, vol. 5, no. 7, pp. 1645–1650, 2006. View at Publisher · View at Google Scholar
  2. T.-W. A. Lee, S.-H. G. Chan, Q. Zhang, W.-W. Zhu, and Y.-Q. Zhang, “Optimal allocation of packet-level and byte-level FEC in video multicasting over wired and wireless networks,” in Proceedings of the IEEE Global Telecommunicatins Conference (GLOBECOM '01), vol. 3, pp. 1994–1998, San Antonio, Tex, USA, November 2001.
  3. S. Martello and P. Toth, Knapsack Problems: Algorithms and Computer Implementations, Wiley-Interscience Series in Discrete Mathematics and Optimization, John Wiley & Sons, New York, NY, USA, 1990.
  4. G. Cheung, W.-T. Tan, and C. Chan, “Reference frame optimization for multiple-path video streaming with complexity scaling,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 17, no. 6, pp. 649–662, 2007. View at Publisher · View at Google Scholar