# Opportunities and Challenges for Error Control Schemes for Wireless Sensor Networks: A Review
## 2 Error Control Scheme (ECS)
### Forward Error Correction (FEC)
#### 2.2.3 Encoding and Decoding Complexity  
The complexity of encoding and decoding operation in FEC depends on encoding and decoding algorithms, respectively. It also depends on the linearity of code. The encoding complexity of nonlinear block code is very complex as the block length increases. However, the encoding complexity of linear block code is significantly less than the nonlinear block codes for large block length. Therefore, the further discussion on complexity is only limited to linear codes. Commonly, the encoding operation is much straightforward than the decoding operation. Thus, the encoder operation at transmitter consumes significantly less power than the decoder operation at the receiver. Therefore, the power consumed by the encoder can be neglected during the energy analysis and ECS design [13; 14]. The encoding and decoding complexity of cyclic codes is simple and easy to implement because of the special algebraic properties of the codes. The encoding and decoding operation of cyclic codes can be implemented using basic digital components such as exclusive-OR gates, switches and shift registers. Similarly, the encoder of convolutional code is also very simple and can be implemented using shift registers. Therefore, they are considered as very energy efficient due to the simple operation and implementation methods. However, convolutional codes use different types of decoding algorithms including simple and complex decoding techniques. Therefore, cyclic codes (such as BCH and RS) and convolutional codes are considered favourably by researchers as energy consumption is the key issue in WSN applications. There are varieties of decoding algorithms and the complexity and performance of these decoding algorithm varies significantly. Therefore, there is a trade-off between the coding gain and the decoding complexity. The decoding algorithms can be broadly classified based on the type of ECC, the type of decoding technique used, and the channel input to decoder. For example, the decoding of Hamming codes can be performed by various decoding algorithms such as syndrome decoding [29]; Maximum  
Figure 4: Illustration of a non-systematic convolutional encoder at half rate. Figure 5: Turbo encoder. Likelihood (ML) decoding [30] either using decoding to the nearest codeword or Viterbi algorithm [31] using trellis; and Maximum A Posteriori (MAP) decoding with the BCJR algorithm [32]. In BCH and RS codes, the decoding operation is performed using the complex polynomial solver to find error position. Additionally, Viterbi decoding with trellis or MAP decoding or sequential decoding can be used for error detection and correction of convolutional codes. Another classification criteria for decoding algorithm is how decoding is performed; it can be iterative decoding and non-iterative decoding. The common examples of non-iterative decoding are: (a) Syndrome decoding and ML decoding using the nearest codeword for short block codes, (b) Algebraic decoding used in RS and BCH codes, and (c) Viterbi decoding and sequential decoding for convolutional codes. These non-iterative decoding algorithms are simple, easy to implement and fast but with inferior performance, whereas MAP decoding with the BCJR algorithm used in Turbo codes and Sum-Product Algorithm (SPA) or Belief Propagation (BP) [33] used in LDPCs are categorized into iterative decoding. These iterative decoding algorithms are complex (high consumption of energy), slow and hard to implement but with fantastic performance i.e., capacity approaching. Additionally, the decoding algorithms can be divided based on the input from the channel to the decoding algorithms. If the decoder receives the hard decision from the channel (either 0 or 1) and that information will be used during the decoding operation, then the decoder is called a hard-decision decoder--whereas, if the decoder receives the soft decision from the channel and those information is used during the decoding, then the decoder is called a soft decision decoder.