# Fuzzy Logic-Based Geographic Routing Protocol for Dynamic Wireless Sensor Networks
## 3 FLGR Protocol
### Selection Process Based on Fuzzy Logic
#### 3.5.1 Fuzzification of Node Parameters  
Fuzzification mainly refers to the fuzzification of attribute parameters through the subordinating degree function, to obtain the fuzzy set corresponding to the attribute. In general, the commonly used subordinating degree functions include the triangular subordinating degree function, trapezoidal subordinating degree function, sigmoid subordinating degree function and Gaussian subordinating degree function. As Gaussian subordinating degree function can satisfactorily show the gradual change characteristics of intermediate transitional nature and meet the human thinking mode well, it is selected in the fuzzification stage. The Gaussian subordinating degree function is denoted by \(\mu(x)\) in this paper.  
In the FLGR protocol, parameter \(D\) represents the distance between the CN and the EN, which can be divided into three fuzzy sets, namely, \"near, middle and far\". In this paper, the subordinating degree function of parameter \(D\) is as follows:  
\[\mu_{D\_near}(x)=\left\{\begin{array}{l}0,\quad x\leq 0\quad\text{or}\quad x>r \\ \\ e\dfrac{x^{2}}{2500},\qquad 0<x\leq r\end{array}\right. \tag{7}\]  
\[\mu_{D\_middle}(x)=\left\{\begin{array}{l}0,\quad x\leq 0\qquad\text{or} \quad x>r\\ \\ e\dfrac{(x-r/2)^{2}}{2500},\quad 0<x\leq r\end{array}\right. \tag{8}\]  
\[\mu_{D\_far}(x)=\left\{\begin{array}{l}0,\quad x\leq 0\quad\text{or}\quad x>r \\ \\ e\dfrac{(x-r)^{2}}{2500},\quad 0<x\leq r\end{array}\right. \tag{9}\]  
Figure 2: Distribution of the nodes in the CNR of node \(n_{2}\): (**a**) Optimal distribution; (**b**) worst distribution.  
Taking a communication radius of 250 m for example, Figure 3 shows the subordinating degree function of parameter \(D\).  
In the FLGR protocol, parameter \(\eta\) represents the intensive degree of the nodes in CNR, which can be divided into three fuzzy sets, namely, \"low, middle and high\". In this paper, the subordinating degree function of parameter \(\eta\) is as follows:  
\[\mu_{\eta\_low}(x)=\left\{\begin{array}{ccc}0,&x<0&or&x>9\\ \\ \dfrac{x^{2}}{4}&,&0\leq x\leq 9\end{array}\right. \tag{10}\]  
\[\mu_{\eta\_middle}(x)=\left\{\begin{array}{ccc}0,&x<0&or&x>9\\ \\ \dfrac{(x-4.5)^{2}}{4}&,&0\leq x\leq 9\end{array}\right. \tag{11}\]  
\[\mu_{\eta\_high}(x)=\left\{\begin{array}{ccc}0,&x<0&or&x>9\\ \\ \dfrac{(x-9)^{2}}{4}&,&0\leq x\leq 9\end{array}\right. \tag{12}\]  
Figure 4 shows the subordinating degree function of parameter \(\eta\).  
Figure 4: Subordinating degree function of parameter \(\eta\).  
Figure 3: Subordinating degree function of parameter \(D\) with \(r=250\).  
The parameter \(\Omega\) represents the distribution situation of the nodes in the CNR of CN, which can be divided into three fuzzy sets, namely, \"bad, middle, and excellent\". In this paper, the subordinating degree function of parameter \(\Omega\) is as follows:  
\[\mu_{\Omega\_excellent}(x)=\left\{\begin{array}{ll}0,\quad x\leq 0\quad or \quad x>1\\ \\ \dfrac{x^{2}}{e0.04},\qquad 0<x\leq 1\end{array}\right. \tag{13}\]  
\[\mu_{\Omega\_middle}(x)=\left\{\begin{array}{ll}0,\quad x\leq 0\quad or \quad x>1\\ \\ e\dfrac{(x-0.5)^{2}}{0.04}\,\quad 0<x\leq 1\end{array}\right. \tag{14}\]  
\[\mu_{\Omega\_bad}(x)=\left\{\begin{array}{ll}0,\quad x\leq 0\quad or \quad x>1\\ \\ e\dfrac{(x-1)^{2}}{0.04}\,\quad 0<x\leq 1\end{array}\right. \tag{15}\]  
Figure 5 shows the subordinating degree function of parameter \(\Omega\).