# I. Introduction ecause of a high bit error rate (BER) in wireless link due to attenuation, multipath fading and noise, data can be corrupted during transmission. To handle the errors, reduce energy consumption (especially in case of retransmissions) and to maintain the required quality of service (QoS), an impressive and efficient error control scheme is necessary. The system with error control scheme provides better BER performance relative to others for the same signal to noise ratio (SNR). The goal of an error control system is to determine the perfect output parameters (e.g. retransmission limit) given the input parameters (e.g. BER). The error control mechanisms should trade off complexity, buffering requirements and energy requirements (taking into account the required energy for both processing and communication) for the throughput and delay. However, it is usually impossible to provide a very high degree of error correction as some left over errors pass through [1]. Generally, the wireless channel is considered to be such that the samples of an additive noise are added to the modulated symbols and these noise samples are not related to the source. This model is comparatively straightforward to prove mathematically and comprises additive white Gaussian noise (AWGN) channels, flat Rayleigh fading channels and binary symmetric channels (BSC). In classical error correction and control (ECC) theory, the combination of modulation, noisy medium and demodulation is modeled as a discrete memoryless channel such as BCS that recognizes only a finite number of distinct signals. It is called memoryless because the probability of an error is assumed to be unrelated to all the occurrences of earlier errors. The binary transmission over an AWGN channel is modeled as BSC. The BSC channel is symmetric because the probability of receiving 1 when 0 is sent ( i.e. P(1 | 0) ) is same as the probability of receiving 0 when 1 is sent ( i.e. P(0 | 1) ). The BSC is defined by the parameter Pe, the probability of error where P(0 | 1) = P(1 | 0) = Pe and P(0 | 0) = P(1 | 1) = 1?Pe. Error control system should balance among the added redundancy, BER and the energy expenditure. However, error control is not a layer centric issue and can be conceived in any layer of the protocol stack. As retransmissions and coding consume significant amount of energy, it is essential to go for energy efficient error control schemes at the same time maintaining the required QoS. In WSNs, sensor nodes are essentially battery-powered and should operate without being attended for a relatively long time. In such cases, it is very difficult and even impossible to change or recharge batteries of sensor nodes [2]. Error control in WSN can broadly be achieved by Automatic Repeat Request (ARQ), Forward Error Correction (FEC), or a mixture of both i.e Hybrid ARQ (HARQ). In ARQ, if the packet is erroneous or lost, it is retransmitted until it is received to be error free. The error detection is usually realized through a cyclic redundancy check (CRC) code before retransmission. ARQ mechanism is used in both data link and higher layers (such as transport and application layers). The ARQ scheme uses positive acknowledgment (ACK) or negative acknowledgment (NACK) for expected or unexpected reception respectively. The transmitter would retransmit if it has not collected ACK within expiry time [3]. ARQ handles the issue of duplicate packets by maintaining sequence numbers for each packet. While ARQ is a straightforward applicable mechanism to avoid packet errors, it has noticeable limitations such as the retransmissions (that lead to an increase in energy expenditure) and delay that are unacceptable for the time critical applications. ARQ schemes are typically used in data networks where reliability of received packet is of foremost relevance than latency. ARQ is occasionally used with Global System for Mobile (GSM) communication to ensure data integrity. Although, ARQ provides an unfailing transmissions, it would be costly in poor channels where retransmissions cannot be avoided. FEC performs better in this case, but the extra bits prove to be expensive even when channel conditions are better. Redundancy is defined as the ratio of redundant bits to data bits i.e. r/d where r is the number of redundant bits and d is the number of data bits. HARQ schemes exploit the advantages of both FEC and ARQ [4] where sender transmits an encoded packet which is retransmitted if the destination was unable to correct errors. ARQ scheme can be used to provide with an assured QoS by persistent retransmissions until the data is successfully delivered. However, the performance of ARQ is closely associated with the channel conditions and probability of collisions. If the medium is in good condition and fairly loaded, then the retransmissions are rarely needed and ARQ can improve successful data delivery ratio. On the other hand, the delay, packet drop ratio and energy expenditure per successfully transmitted packet can rise to an unacceptable levels, especially for bound real delay time applications [5]. The idea behind the FEC mechanism is to avoid retransmission of the entire data packet in case of partial errors by including some extra bits in the packet. At the destination, this redundancy is then used to recover from errors. FEC is useful for one way channels where receiver does not have the privilege to request retransmission if an error was detected. FEC codes can be preferred for delay-sensitive traffic in WSNs. Also, the FEC coding algorithm must be simple and featherweight since sensor nodes are armed with very low clock rate processors [5]. In FEC, the energy required for encoding is negligible compared to that for decoding. The main limitation of FEC is the cost of extra bits that increase the packet size. Additionally FEC brings up encoding and decoding costs. Therefore FEC is mainly used in situations where retransmissions are comparatively expensive. Both ARQ and FEC are probabilistic ways and there is no deterministic way to guarantee the reliable transmission. ARQ is better for small frames and FEC for larger frames. # a) Related Works Many researchers tried to resolve the issues at physical and MAC layers in WSNs in the past. The work proposed in [6] compares and analyzes energy models and modulation schemes in WSNs. The metrics used in performance evaluation are energy consumption, throughput, average jitter and end to end delay. Both Mica-mote and Mica-Z energy models perform better with Amplitude Shift Keying (ASK) and Quadrature Phase Shift Keying (QPSK) but Binary Phase Shift Keying (BPSK) requires higher energy. The choice of modulation / demodulation techniques, filtering techniques, and frequency bands equally affect the energy consumption in WSNs. In the work [7], the researchers estimate the expected duration in which the quality of a specific link remains stable using the conditional distribution function of SNR of the received acknowledgment packets. This approach resulted in high packet delivery compared with the case where packets were transmitted without the knowledge of link quality fluctuations. The researchers in [8], discuss the limitations of applying FEC codes in industrial WSNs based on the lack of access to the PHY layer, the limited memory resource and the delay requirements. In order to examine the likliness of employing FEC codes in existing wireless sensor nodes, the researchers benchmark different types of FEC codes with the software implementation in terms of memory consumption and processing time. Evaluation results exhibit that low density parity check (LDPC) and Turbo codes as the state of the art FEC codes and are overwhelming to the wireless sensor nodes and fail to fulfill both memory and timing requirements. Repetition and Hamming codes can be considered due to the simplicity, but still not able to give the most satisfying performance. The RS (15,11) code is the most suitable FEC code among all the candidates with decent memory footprint and fast processing time. The work proposed in [9], does a comprehensive performance evaluation of ARQ, FEC, Erasure Coding (EC), linklayer hybrid FEC/ARQ, and cross-layer hybrid error control schemes over Wireless Multimedia Sensor Network (WMSNs) is performed. Performance metrics such as energy efficiency, frame Peak Signal-to-Noise Ratio (PSNR), frame loss rate, cumulative jitter, and delay-constrained PSNR are investigated. The results of analysis show how wireless channel errors can affect the performance of multimedia sensor networks and how different error control scenarios can be effective for those networks. The results also provide the required insights for efficient design of error control protocols in multimedia communications over WSNs. In [10], the researchers proposed an analytical energy efficiency model using adaptive error correction code (AECC) in wireless sensor networks in fading environments. To adapt energy efficiency of sensor node to channel variations, the packet length is tuned at the data link layer. The analysis is based on Mica2 sensor node where a look-up table of distance and correction code is adaptive installed in the node. Based on channel conditions, the sender can adjust the adequate BCH code required for the next transmission. The numerical results show that the AECC scheme can greatly improve the energy efficiency for the lengthy and under different message sizes over Rayleigh fading channel. The researchers in [11], analyze FEC code based on CRC and adaptive Multiple Input Multiple Output (MIMO) approach. The mathematical analysis and simulation results show that the proposed transmission control scheme performs better in terms of throughput, reliability, latency and energy efficiency compared to the FEC and MIMO approaches considered alone. In [12], the researchers have focussed on the energy efficiency of particular error control codes (ECC) in WSNs with the outcome that coding saves energy for short distances, but larger packet size results into stretched radio on time. Only the energy spent in encoding and decoding schemes is acknowledged. The researchers in [13], check out the energy spent for three different ECCs but only for precise platforms. Researchers in [14], have tried to resolve some of the MAC layer issues based on the combination of parameters such as message length, node energy and number of requests. Results analysis shows an improved performance in energy efficiency, optimal message length and throughput. The work mentioned in [15] presents an analysis of error control schemes in WSNs where ARQ, FEC, and HARQ are contrasted in terms of energy expenditure, delay, and packet error rate (PER). Here, the researchers proposed a technique called hop length expansion, where the reduced PER could be ventured by providing lengthy hops leading to fewer hops for a transmitted packet to reach its destination. In turn fewer hops would lead to increased energy efficiency and lower delay. But the lengthy hops affect the transmission power of radio. In [16], researchers analyse convolutional codes and consider the cost of decoder at the destination side and not the sum of computation cost, that rises with bigger packets in terms of energy expenditure. Researchers in their work [17] prove mathematically and from the simulation results that the energy skilfullness of ARQ scheme does not rely on the no of retransmissions. Researchers in [18], study Turbo codes in WSN and use parallel concatenated convolutional code circuit for encoding at source while the repetitious decoding is performed at the sink. Simulation tests performed for various SNRs, show progress in bit error rate and frame error rate. In [19], researchers correlate energy expenditure and error correction capacity of Reed-Solomon, and Hermitian codes. They inspect encoding in the initial node and competent decoding at the destination to conserve energy at relay nodes. The work proposed in [20] discusses convolution codes with changing rates to evaluate their energy expenditure in slow Rayleigh fading medium. Larger length of code incomparably reduces transmit power but the consumption of energy also increases exponentially with the increase in constraint length of the code. Encoding consumes slight amount of energy while decoding consumes significant amount of energy. In [21], different error control techniques are considered, but the investigation is focused on the question of optimal packet size for WSNs. In [22], the researchers applied the double binary convolutional turbo code to the 21451-5 architecture. To reduce the computational load in the turbo code decoder, a low complexity decoding solution has been proposed. At BER of 10?5, noise power of the proposed decoding scheme is reduced compared to the Log-MAP algorithm. The complexity of the compare, the shifting and the addition operations have reduced by 15.8%, 86.84% and 73.7% respectively. The proposed solution is a suitable error correction scheme with low decoding complexity that can be adopted. We observe that all the research works mentioned above concentrate mainly on error control schemes for a fixed and static environment and do not consider the varying channel error conditions. Therefore, we propose a channel adaptive error control scheme based on the changing channel conditions with respect to noise and error rate. Our approach is compared with 'ARQ Scheme With Adaptive Error Control' (ASAEC) [23] that discusses about an adaptive ARQ scheme as the channel state varies. # b) Our Contributions In our previous work, 'Priority based Slot Allocation for media access in Wireless Sensor Networks' (PSAWSN), the probability based priority scheme is used to allocate slots to competing nodes [24]. Limitations of this work are: 1) PSAWSN does not handle the dynamic and variable slot allocation based on the varying requirements from the nodes. 2) Error and flow control are not taken into account. 3) Effect of channel conditions on transmission quality, is not handled. To overcome some of these limitations, we propose a Dynamic and Channel Adaptive Error Control Scheme in Wireless Sensor Networks () that estimates the channel condition and controls the errors dynamically based on channel errors and noise power observed at the receiver. This allows error control strategy to vary depending on the channel conditions. Models have been designed for both the error and channel estimation. Analysis and simulation results for various message sizes and error conditions show that there is a performance improvement in terms of throughput and probability of retransmission compared to ASAEC. # c) Channel adaptive model using Markov chain A larger BER in the channel can lead to a high retransmission rate costing additional energy consumption. On the other hand, even for good channel conditions, the retransmission rate increases tremendously if there are more number of receivers. Choosing a fixed error control scheme may result in wastage of bandwidth during the normal behavior of the channel. That means the channel adaptive scheme that changes operating modes based on the error coditions and estimated noise in the channel, is required. Channel adaptive means formulating the error control strategies based on the error conditions prevailing in the channel. The channel adaptive error control schemes are required for reliable transmission and maintainance of the given QoS requirements. These error control schemes need to estimate the channel conditions in order to adjust the parameters dynamically based on the optimization criteria. The Markov chain can be used to esitmate the wireless channel error conditions as the use of such a model lies on its ability to capture the burstiness of the error process as well as to predict the future states of the channel based on its present state. That means, in order to track channel variations closely, reliable estimation of the channel state information should be carried out before applying the error correction mechanisms. The noise in the channel is measured in terms of signal to noise ratio (SNR) and through the estimated SNR of the channel, the required BER can be computed. Usually, the received signal can no longer be modeled as a deterministic signal in white Gaussian noise (WGN). Instead, it should be considered as a function of either the state of a Markov chain or of its state transition probability with known parameters observed in the WGN. Markov chain is a special kind of stochastic process where the outcome of an experiment depends only on the present state not on the preceding states. Markov chain is defined as the process with descrete set of states and can be observed when it passes through a BSC. It is a stochastic model describing the sequence of possible events in which the outcome of a given experiment can affect the outcome of the next experiment. In other words, future is independent of the past given the present. Apart from digital communications, Markov chain finds its applications in detection problems where the observed signal is a function of the states or transitions of a Markov chain. As shown in the figure 1, channel condition is estimated and the derived BER is divided into three ranges: lower, middle and higher. Depending on the BER range, error control scheme uses three modes to handle the erors. All the three modes are detailed in the figure . We have assumed low range of BER is from 10?9 to 10?12, mid range from 10?6 to 10?8 and high range from 10?3 to 10?5. For the low range, simple error control scheme without retransmission is used. For the middle range, error control scheme with retransmission is employed and for the high range, the error control is left to the upper layer. As BER depends on the SNR, its requirement is different for different services and systems. For instance, wireless link BER is less than 10?6 while optical BER is less than 10?12. On optical fiber link, the average BER is approximately 10?9 where as on a coaxial cable, the probability of bit errors is around 10?6. For a switched telephone line, these numbers are even higher between 10?4 and 10?5. Digitized voice can tolerate bit errors as high as 1 bit per thousand bits sent i.e 10?3. Computer data requires a BER of 10?6 to 10?12 (i.e. 1 per million to 1 per trillion) depending on the content. i. Markov chain model The Markov process starts in one of the states and moves successively from one state to another where each move is called a step. If the system currently in state Si, moves to state Sj at the next step with a probability Pi j , then this probability does not depend on the states the system was in before the current state. The probabilitiy Pi j is called the transition probability. As shown in the figure 2, the probability pj(n) = P(Xn = j) is the probability of the system to reach state j in n steps. Similarly, the probability pi j(m+n) is the probability of going from state i to j in (m+n) steps and is expressed in equation 1 # Figure 2: Marcov chain with transition probabilities where s is the number of states in the Markov chain and p is the transition probability from current to next state where as (1? p) is the probability to remain in the same state. Using these transition probabilities, one can establish an asymptotic formula for the capacity of a BSC as the noise parameter tends to zero. To capture the bursty nature of wireless networks, Markov chains have been extensively used to model the error sequences generated by a wireless channel where a BSC is associated with each state. TheMarkov chain provides a good approximation of the error process in fading channels. Here, the Markov state and transition probabilities between the states are assumed. As shown in the figure 3, the probability pj (n) = P(Xn = j) is the probability of the system to reach state j in n steps. For instance, p2(1) = P(X1 = 2) is the probability to reach state 2 from state 1 in one step. # Figure 3: Markov chain representation of errors The channel states associated with consecutive symbols are assumed to be the neighboring states for a slow fading channel where the SNR varies slowly as the symbol interval T increases. Each state describes the SNR level received as the interval T increases. In order to estimate the errors, we need to find out the expression for BER in terms of SNR using the standard deviation and mean. To estimate the BER, the system 47 Year 2017 ( ) E p i j (m + n) = s ? k=1 p ik (m)p k j (n) (1) 0 1 2 3 p 1?p q 1?q p(1?q) q(1?p) pq(1?p)(1?q) 0 1 2 ... S?1 p 1,2 p s?1,s?1 p p 1,1 0,0 2,2 p p 2,1 1,0 p p 0,1 should move from one state to another in both the directions from good to bad and vice versa. The type of random noise in a communication system that determines the BER of a circuit is the thermal noise which can well be described by additive white Gaussian (AWG) noise across a narrow frequency band. Even though it is possible to have other types of noise from the interfering signals that combine with thermal noise in the final BER, the type of noise addressed here is purely Gaussian. Because of the AWGN assumption, each noise source can be described by a single temperature. These temperatures are additive in nature so that the total noise energy, Ntotal in the system can be expressed as in the equation 2 N total = C b × T total (2) where Cb is Boltzmann's constant and Ttotal is the system noise temperature in Kelvin. Note that Ttotal is the sum of all the individual noise temperatures in the system normalized by the previous gains in the system. The Gaussian distribution provides with the probability to detect an observed value given the mean and the standard deviation of the measurement. To know the probability of a signal being misinterpreted (or in error) by the system, one just needs to know the number of standard deviations that is added or subtracted from the average signal level so that the signal can cross the threshold value. Then this number of standard deviations is related to the probability, (P) of an error occurring, using the Gaussian function as shown in equation 3 P = C × Q(x)(3) whereC is a constant that depends on the modulation and coding techniques used, x is the number of standard deviations of the detection level away from the mean signal level, and Q(x) (called the Q function) is the tail probability of the standard Normal distribution. In other words, Q(x) is the probability that a normal (Gaussian) random variable obtains a value larger than x standard deviations above the mean. This function is used to evaluate the error probability of transmission systems that are affected by the AWGN. Q(x) is defined in terms of error function (er f) in equation 4where the error function, er f is expressed as in the equation 5 The er f (x) also called the Normal distribution or the Gaussian error function is a special function of sigmoid shape that occurs in probability, statistics, and partial differential equations describing the diffusion. It is the cumulative distribution function (cdf) of Normal distribution with mean =0 and standard deviation =1. The signal Energy per bit divided by the Spectral noise density (Eb/N0) within the frequency band of measurement time (the time period of the bit), is a function of x. This ratio can be expressed as: Eb/N0 = Bx2 where B is a constant that depends on the modulation and coding schemes used. The probability of bit error is proportional to er f c(Eb/N0) where erfc is a complementory error function defined as (1?er f ). As the argument of er f c() increases, the probability of error also increases. Thus it is very important to have either high Eb or low N0 for good quality reception. Hence Eb/N0 is of the great importance and all BER and Symbol Error Rate (SER) curves are plotted against Eb/N0 for different forms of modulations such as BPSK, QPSK, and QAM, etc. These curves show the best performance that can be achieved across a digital link with a given amount of RF power and noise level in the system. Here, we have assumed BPSK modulation as it is the most robust of all the PSKs since it takes the highest level of noise or distortion to make the demodulator reach an incorrect decision. Since the number of bits for BPSK modulation is always one, the notations symbol energy (Es) and bit energy (Eb) can be used interchangeably. For BPSK, since Es=Eb, the probability of symbol error (Ps) and the probability of bit error (Pb) are the same. Therefore, expressing the Pb and Ps in terms of Q function and er f c, we will get the equation 6. It can be easily recognized that Pb is the BER or equivalently the SER for the optimum BPSK modulator. This is the best possible error performance that any BPSK modulator-demodulator can achieve in the presence of AWGN. Let 0 = SNRF0 < SNRF1 < SNRF2 < ... < SNRFn?1 = ¥ be the thresholds of the received SNR or fading at the states S0, S1, S2 ... Sn?1. The channel is said to be in the state S where S 2 0,1,2,3, ...S?1 if the received SNR is in the interval SNRFs and SNRFs+1. Associated with each state, there is a BSC with along with respective error probability. The Rayleigh fading results in exponentially distributed distortion of the received signal (SNRF) and the probability density function (pdf) of the SNRF, i.e. F(SNRF) which is given in the equation 7 # Global Q(x) = 1 2 [1 ? er f (x/ ? 2)](4)er f (x) = 2 ? ? x 0 e ?t 2 dt(5)P b = P s = Q[ ? 2E b /N 0 ] = 1 2 er f c[ (E b /N 0 )](6)F(SNRF) = 1 SNRF exp[?SNRF/SNRF](7)SNRF = a 2 × SNR (8) where SNRF is the average received SNR or fading and SNRF > 0. Assuming BPSK modulation, the expression for SNRF is given in the equation 8 where a is the magnitude of the fading coefficient or amplitude. By using Q, a and SNR, the expression for BER is given in the equation 9 To find the average BER, we need to compute the average with respect to the distribution of a i.e. FA(a) = 2ae?a2 where FA(a) is the analytical pdf of the fading amplitude. Therefore, the average BER over the limits 0 to ¥, can be expresse das given in the equation 10After solving the equation 10, we will get an expression for the average BER in terms of SNR as shown in the equation 11 BER = Q × a 2 × SNR = Q × ? SNRF(9)BER = ? 0 Q × a 2 × SNR × F A (a)da(10)BER = 1 2 [1 ? SNR/(2 + SNR)](11) The detailed procedure for the derivation of BER for BPSK, is given in the algorithm 1. Next subsection describes the BER error model by using the Binomial distribution. # ii. Error Model The number of errors in a message of length n bits, confirm to the Binomial distribution with n Bernouli trials and probability of success as the BER (note that an error is being treated here as 'success'). So the errors in the communication networks (BER) can be modeled by using the Binomial distribution. The Binomial distribution models the number of 'successes' in a number of independent Bernouli trials where each trial occurs with one of two outcomes: success or failure. The Binomial distribution is best suitable to model the BER as the number of bit errors can be represented by the number of successes. Similarly the number of bits in the codeword can be represented by the number of Bernouli trials conducted. Thus, the number of bit errors in the codeword can be modeled as the events that are 'successes' and the other correctly received bits (in the codeword) as 'failures'. The number Binomial coefficient that indicates the total number of possible ways by which one can get k errors out of n bits of the codeword. For a BSC channel with bit error probability BER, the packet error rate (PER) is given by equation 13where L is the message length in bits. The probability that m out of n packets need retransmission is expressed in the equation 14 # d) Algorithms Algorithm 1 explains the steps involved in estimating the channel condition in terms of errors and derives an expression for BER. Based on the level of this BER, appropriate operating modes become active to control the errors. These operating modes are detailed in the algorithm 2. The algorithm 3 details the steps at the receiver after receiving the frame from the sender. of bits in the codeword can be considered as the the number of Bernouli trials that can be either success (errors) or failure (without errors). In general, we can write the formula for finding the probability of getting k number of errors out of n total bits of data sent as shown in equation 12. As shown within the square brackets in equation 12, there is a computation of probability of occurrance of exactly k bit errors in an n bit codeword. This means that we want the probability of getting k errors with (n?k) bits (received without errors) because the probability of getting an error is actually one minus the probability of getting no error. The part is the P tot = n k [BER k (1 ? BER) n?k ](12)PER = 1 ? (1 ? BER) L(13)P RT x = n m [PER m (1 ? PER) n?m ](14) Algorithm 1 Channel Error Estimation Algorithm 1: Use Markov model to estimate SNR and BER at each state of the system. 2: for each S i in steps of 1 AND i = 0, i ? n do 3: Received Power at each state = |h 2 | × T p where h is fading coefficient and T p is the transmit power. # 4: Fading Coefficient h = ae ? and |h| = a where 'a' is the magnitude of fading coefficient h. # 5: Received Power at each state = a 2 P where 'a' is the magnitude of fading coefficient and P is the received power. # 6: Received SNR or fading, SNR F =a 2 P/? 2 = a 2 SNR 7: Average BER = ? 0 Q × ? a 2 × SNR × F A (a)da where Q(x) is the tail integration of normal Gaussian distribution i.e Q(x) = ? x 1 ? 2? e ?x 2 /2 dx. 8: F A =2ae ?a 2 is the probability density function of 'a'. # 9: Solve the equation in step 7 to derive an expression for BER. Calculate the SNR value for each state. 12: Calculate the BER value by using the corresponding SNR. Collect data packet from the upper layers. # 4: Estimate the error in the channel using algorithm 1 5: Depending on the BER estimated, Use one of the three methods. Use simple error control scheme without retransmission. # 8: Use simple code to make the frame = d + k where d represents data bits and k the redundant bits. # 9: Send the frame. Use error control scheme with retransmission. 13: Store the frame in the buffer for retransmission. 14: Start the timer for retransmission. 15: Send the frame and wait for ACK from the receiver. 16: if (ACKArrivalNoti f icationFromReceiver) then 17: Receive the ACK frame and send it to upper layer. Retransmit the frame. Receive the frame. # 5: if Are there redundant bits in the received frame then 6: Decode the frame. # 7: Separate redundant bits (n-d) from the frame 8: Calculate the redundant bits. # 9: Compare the received bits with the calculated bits. 10: Accept the frame if the codewords match else Reject the frame. if Check whether the frame is damaged or lost then 13: Accept the frame and send it to upper layer. Prepare the NACK and send it to the sender. # II. Simulation Parameters The proposed scheme is simulated using the following simulation inputs in C language. Message length ranging from L = 7 to 300 bits, bandwidth = 300kbps, BER in the range 10?1 to 10?3. Number of standarad deviations, x values in the range 0 to 4 and the SNR values in the range 0 to 10. The following performance parameters are assessed. ? Throughput: Throughput is expressed in terms of BER as shown in the equation 15 where L is the frame size in bits and K is the payload part (excluding redundant bits) of L and R is the transmission rate. ? Bit error rate: Bit error rate is the number of bit errors divided by the total number of transferred bits often expressed as a percentage. It is computed using the estimated SNR and is defined in equation 11 ? Probability of errors: It is defined as the probability with which the errors occur given the noise in the transmission medium and is expressed in equation 12 ? Probability of retransmission: This is the probability of occurence of retransmission in case of frame is lost or corrupted and is given in the equation 14. # III. Results Simulation results of the scheme using DCAECS are analyzed and compared with ASAEC in this section. # a) Analysis of Gaussian error function The graph in figure 4 shows the behavior of er f (x) as the values of x, the number of standard deviations vary. Note that er f (0)=0, and er f (¥)=1. The error function gets progressively better with larger values of x. Initially when x increases the error function (er f (x)) also increases. At some particular point, er f (x) touches the value 1 and remains constant there after. Similarly an increase in bandwidth allows an increase in data rate. This behaviour of BER is not handled in ASAEC. # c) Analysis of Throughput As shown in the figure 6, the throughput fluctuates for various SNR values for a fixed number of frame lengths. However the throughput increases as the SNR increases. This is because, as the SNR increases, the number of errors in the frame decreases thereby increasing the number of frames delivered thus increasing the throughput. The throughput is slightly more for DCAECS compared to ASAEC since in the case of ASAEC, the throughput increases with SNR slowly. In case of DCAECS, the throughput increases fast with various SNR values. # d) Analysis of Probability of Errors In figure 7, probability of errors is plotted against the number of errors for different frame lengths (10, 20 and 30 bits). As shown in the graph, the probability of errors decreases as the number of errors increase. For all the three frame lengths, the probability of error decreases fast initially, then remains almost constant as the number of errors increase. This shows that for larger frame lengths, the probabiblity of errors decreases tremendously. In ASAEC, the conductance of probability of errors against the number of errors for various message lengths is not taken care. As the frame length increases, the PRTx also increases slowly and remains constant at some point (L = 200bits). This plot indicates that PRTx initially increases and later remains stable as the frame length increases. the error and channel estimation where the expression for BER is derived. Error control strategy is formulated based on the observed BER levels. Simulation analysis has been done for BER, throughput, probability of retransmission, probability of errors and Guassian error function. Results for throughput, BER and probability of retransmission show an improved performance over ASAEC. # V. Acknowledgement Authors would like to thank Visvesvaraya Technological University (VTU), Karnataka, INDIA, for sponsoring the part of the project under VTU Research Scheme, grant no. VTU/Aca/2011-12/A-9/753, Dated: 5th May 2012. Algorithm 2 Sender algorithm1: while TRUE do2:if (RequestToSendFromU pperLayer) then3:Year 201750n kVolume XVII Issue II Version I( ) EGlobal Journal of Computer Science and Technology16: 17: else Use simple error control scheme without retransmission. 18: if 10 ?6 ? BER ? 10 ?8 then 19: Use error control scheme with retransmission. 20: else 21: if 10 ?3 ? BER ? 10 ?5 then 22: Request Upper layers to handle the errors 23: end if 24: end if 25: end if© 20 7 Global Journa ls Inc. (US) 1 © 2017 Global Journals Inc. (US) Year 2017 ( ) E Dynamic and Channel Adaptive Error Control Scheme in Wireless Sensor Networks * Dynamic and Channel Adaptive Error Control Scheme in Wireless Sensor Networks 2 ;MOskar Eriksson RCPatil Biradar IEEE International Conference on Networks, (ICON2012) Singapore 2011. 2012 A Survey on Routing Protocols in Wireless Sensor Networks * Energy EfficientWireless ATM design PHavinga GSmit MBos Journal on Mobile Networks and Applications 5 2 2000 * Error Control in Wireless Sensor Networks: A Cross Layer Analysis AkyildizVuran IEEE/ACM Transactions on Networking 2011 * QoS-aware MAC protocols for Wireless Sensor Networks: A Survey AykutYigitel CemOzlem Durmaz Incel Ersoy 2011 * Analysis of Energy Model and QoS in Wireless Sensor Networks under different modulation schemes RajeevSarvesh Kumar Singh Paulus IEEE International Conference for Convergence of Technology 2014 * A link quality estimation model for energy-efficient wireless sensor networks JianjunWen ZeeshanAnsar WaltenegusDargie IEEE International Conference on Communications (ICC) 2015 * Energy Efficiency Analysis of Error Control Schemes in Wireless Sensor Networks ZTian DFYuan Liang IEEE International conference 2008. 2008 * Low Power Channel Coding for Wireless Sensor Networks NashatAbughalieh KrisSteenhaut AnnNowe 17 th IEEE Symposium on Communications and Vehicular Technology 2010 * Analysis of a set of Error Correcting Schemes inmulti-hop Wireless Sensor Networks ShraddhaSrivastava ChristianSpagnol 2009 IEEE * Physical layer driven Protocol and Algorithm design for Energy Efficient Wireless Sensor Networks EShih AChandrakasan 2001 * Energy efficiency based Packet size Optimization in WSNs AkyildizSankarasubramaniam 2003 IEEE * Low Complexity Error Correction for ISO/IEC/IEEE 21451-5 Sensor and Actuator Networks MingZhan JunWu ZhiZhong Zhang IEEE Sensors Journal 15 5 2015 * ARQ Scheme With Adaptive Error Control HlaingMinn VijayKBhargava IEEE International conference 50 6 2001 * Priority based Slot Allocation for Media Access in WSNs MPatil RBiradar IEEE 2015 * Implementation and Evaluation of Error Control Schemes in Industrial Wireless Sensor Networks YonasHagos KanYu El 2011 IEEE * Error Control for Multimedia Communications in Wireless Sensor Networks: A comparative performance analysis YousofNaderi HamidRRabiee MohammadKhansari 2012 * Energy Efficiency Analysis of Adaptive Error Correction in Wireless Sensor Networks AGhaida KhalidwAl-Suhail Louis YTurki Abdallah International Journal of Computer Science Issues 9 2 2012 * Reliable Transmission Control Scheme Based on FEC Sensing and Adaptive MIMO for Mobile Internet of Things YongJin FengLi YaFan Journal of Communications 9 12 2014 * Error Control Coding in Low-Power Wireless Sensor Networks: When is ECC Energy-Efficient Howard IniewskiSchlegel EURASIP Journal on Wireless Communications and Networking 2006 * Performance Analysis of Error Control Codes for Wireless Sensor Networks YangBalakrishnan Jiang Kim International Conference on Information Technology 2007 * Error Control in Wireless Sensor Networks VuranAkyildiz 2010 John Wiley and Sons Ltd * Design Considerations for Energy Efficient Radios inWireless Microsensor Networks Shih Cho Lee ChandrakasanCalhoun Journal of VLSI Signal Processing 37 2004 * Media Access Control in Wireless Sensor Networks using Priority Index MPatil RCBiradar Indonesian Journal of Electrical Engineering and Computer Science 5 2 2017