# CERP: Cooperative and Efficient Routing Protocol for Wireless Sensor Networks
## 4 Cooperative Efficient Routing Protocol Formulation
### Problem Formulation  
In this subsection, we aim to choose the route between any source and the CH pair in the cluster that uses the least amount of energy [38]. This strategy utilizes the selective digital relaying (SDR) BEP criteria to reduce the transmission power consumption. To achieve this goal, BEP expressions are examined and developed for cooperative and non-cooperative communication channels [39]. In addition, the suggested optimization framework is described in great depth. In this paper, we focus on a WSN organized in clusters. Within each cluster, whose \(x\) and \(y\) coordinates are known and the locations and distances between each other, we assume that \(N\) nodes are dispersed randomly. Suppose any node in a cluster wishes to communicate with the CH, which is a node selected by a clustering algorithm such as LEACH [40] that is responsible for collecting the information captured by the cluster sensors and delivering them to the center of maintenance and supervision. We denote the source by \(S\) and the destination by \(CH\). Therefore, the signal goes via a series of connections before reaching its final goal. As illustrated in Figure 2, a relay \(R\) may take part by sending \(CH\), a duplicate of the original signal across a two-hop connection (where required). Therefore, in the second stage, \(R\) may work together to relay the signal from the source to \(CH\) using either an amplify-and-forward (AF) or decode-and-forward (DF) method. Then, the maximum ratio combining (MRC) method [39] is used to combine the incoming signals at the CH. For a comprehensive channel model, we combine the path-loss with a temporal fading channel model (Rayleigh fading), as illustrated in Figure 2:  
\[Y_{S,CH}=h_{S,CH}X_{S}+W_{S,CH}, \tag{1}\]  
\[Y_{R,CH}=h_{R,CH}X_{R}+W_{R,CH}, \tag{2}\]where \(Y_{S,CH}\) (\(Y_{R,CH}\)) is the received signal at \(CH\) from the source (the relay resp. ), \(X_{S}\) (\(X_{R}\)) is the transmitted signal from \(S\) (\(R\) resp. ), \(W_{S,CH}\) (\(W_{R,CH}\)) is an additive and white Gaussian noise with variance \(N_{0}\) and \(h_{i,k}\) are the channel path loss-Rayleigh fading coefficients with \([h_{(i,k)}^{2}]=d_{i,k}^{-A}\), with \(\alpha\) is the path-loss exponent, \([. ]\) is the statistical average operator and \(d_{i,k}\) is the distance between nodes in the cluster for \(i,k=0,\ldots,N-1\). Moreover, the signal's power perturbed by Rayleigh fading is exponentially distributed. Hence, the resulting signal-to-noise ratio (SNR) is also exponentially distributed. In this article, we draw a line between two distinct types of communication protocols, which are shown in Figure 2:  
* Direct link transmission from a source node \(S\) to the CH is an example of non-cooperative communication. It is denoted by the symbol \({}_{d}\) and is referred to as direct transmission and noted \({}_{d}\);
* With the aid of a relay node \(R\), a source node \(S\) may send data to the CH, and is referred to as cooperative communications, noted \({}_{c}\). The following formula gives the BEP a direct communication system in which a source node \(S\) sends data to the destination node CH through a channel with a slow and frequency-flat Rayleigh fading coefficient [39]:  
\[Pe_{d}(\epsilon)=\frac{1}{2}(1-\sqrt{\frac{1}{1+\frac{1}{\sigma_{SCH}^{2}}}}), \tag{3}\]  
where \(\sigma_{SCH}^{2}\) is the mean of the SNR, noted \(\gamma_{SCH}\), between source \(S\) and destination \(CH\) given by:  
\[f_{\gamma_{SCH}}(x)=\frac{1}{\sigma_{SCH}}\exp\{-\frac{x}{\sigma_{SCH}^{2}}\} \;\;\mathrm{where}\;\;\sigma_{SCH}^{2}=\frac{E_{d_{S}}^{b}}{d_{S,CH}^{a}N_{0}}. \tag{4}\]  
A generalized closed-form formulation of the BEP expressions for SDR systems is obtained and applied to a cooperative communication scheme in which a relay \(R\) is one of the \(N-2\) nodes inside the cluster.