Intelligent Automation & Soft Computing

Optimized ANFIS Model for Stable Clustering in Cognitive Radio Network

C. Ambhika1,* and C. Murukesh2

1Department of Information Technology, Velammal Institutute of Technology, Chennai, 600066, Tamilnadu, India
2Department of Electronics and Communication Engineering, Velammal Engineering College, Chennai, 600040, Tamilnadu, India
*Corresponding Author: C. Ambhika. Email: ambhikacphd123@gmail.com
Received: 05 January 2022; Accepted: 13 March 2022

Abstract: With the demand for wireless technology, Cognitive Radio (CR) technology is identified as a promising solution for effective spectrum utilization. Connectivity and robustness are the two main difficulties in cognitive radio networks due to their dynamic nature. These problems are solved by using clustering techniques which group the cognitive users into logical groups. The performance of clustering in cognitive network purely depends on cluster head selection and parameters considered for clustering. In this work, an adaptive neuro-fuzzy inference system (ANFIS) based clustering is proposed for the cognitive network. The performance of ANFIS improved using hybrid particle swarm and whale optimization algorithms for parameter tuning called PSWO. The consequent and antecedent parameters of ANFIS model are tuned by PSWO. The proper cluster heads from the network are identified using optimized ANFIS. The proposed optimized ANFIS based clustering model is analyzed in terms of number of clusters, number of common channels, reclustering rate and stability period. Simulation results indicate that proposed clustering effectively increase the stability of cluster with reduced communication overhead compared to other conventional clustering algorithms.

Keywords: ANFIS; cluster; cognitive; hybrid optimization; PSWO

1  Introduction

The fast development of wireless technology has progressively reduced the available spectrum. CR is introduced to offer higher spectral efficiency and improved user performance by integrating various spectrum sharing and allocation methodologies [1]. A few users that are involved in the CR namely Primary User (PU) and Secondary User (SU). The user can transmit data whenever there is a need called Primary User (PU). In contrast, the user can access or use a spectrum of PU user only when PU’s are in an idle condition called Secondary User (SU). The process of using an unused spectrum of a PU by the SU is called Spectrum sensing [2]. The allocation of spectrum for the users is a difficult task in the CR network.

Presently, multimedia applications require different and stringent Quality of Service (QoS) requirements. The poor coordination between primary and secondary user’s leads to QoS satisfied service has to be a doubtful and challenging one. The topology of the cognitive radio is divided into two categories: centralized and distributed. The communication overhead of the network is heavy due to its flexible topology. Clustering is a concept of grouping the nodes which is used to improve the node’s cooperation and to minimize the communication overhead of the fusion centre [3]. It involves grouping the nodes with close properties like the same location and interference level to the PU. The problem with traditional clustering methods is that these procedures assign a single channel for cluster communication, which leads to the re-clustering as soon as PU appears on that channel. Further, few of the previous clustering methods use the common control channel for control data exchange, which is not much reliable in the network with the spectrum shortage problem. For cluster head selection a smaller number of quality parameters are considered.

In this work, a new clustering based on ANFIS approach is proposed. From a literatures, fewer parameters were considered for cluster head selection and ignoring quality features. The proposed algorithm considers multiple parameters for cluster head selection. The parameters of ANFIS are adjusted by a hybrid Metaheuristic algorithm for effective Cluster Head (CH) selection and formation.

The structure of this work is divided as follows. The work from the previous studies in CR clustering is explained in Section 2. In the Section 3, the proposed work Preliminaries are discussed. Section 4 described the proposed CH selection approach. The results of Simulation are explained in Section 5. Lastly, the conclusion is drawn in the final Section 6.

2  Related Work

Currently, various clustering algorithms have been proposed for the cognitive network. Chen et al. [4] have proposed a clustering protocol which create a mesh network in an open spectrum sharing (OSS) called CogMesh. It forms a large-scale network by decentralized cluster-based architecture. It adopts network topology effectively for various environmental changes.

Awin et al. [5] have proposed an iterative algorithm to find optimal sensing time using a clustering algorithm called energy-efficient cluster-based spectrum sensing (CBSS). Clustering is performed based on transmission time and sensing time to achieve energy efficiency. Ben et al. [6] have presented a clustering method by considering the non-identical channel circumstances of secondary users. The influence of errors in transmitting signal analyzed for decision making in clustering. The outcome indicates that the performance of SNR is improved considerably due to the consideration of non-identical channel conditions. Caso et al. [7] have discussed a mobility aware clustering method for CR networks. The clusters are formed based on spectrum sensing consistency and mobility of the network. The lowest mobility node is confirmed as a CH for stable operation. The proposed mobility aware clusters improved in the throughput and energy efficiency without any overhead.

Dai et al. [8] have proposed a resource allocation method using the clustering technique. The clustering of nodes is done by calculating mutual interference degrees for every node. The stability and spectrum utilization rate of the network are increased by proper clustering and CH selection. Dutta et al. [9] have introduced a CR clustering technique using the performance parameters of Signal to Noise and Interference Ratio (SINR) and Expected Transmission Time (ETT). The cluster formation reduces unnecessary data packet transmission and network delay.

Hossen et al. [10] have proposed a Q-learning based clustering for CR networks. For every node, Q value degree is calculated to estimate a channel quality. Then, clusters are formed by considering the energy and distance of the node. Q value-based clustering improves cluster stability and reduces the interference level of the network. Javed et al. [11] have proposed a hybrid artificial intelligence technique for cognitive clustering and size adjustment. The scalability of the network improves by applying reinforcement learning. The proposed clustering approach shows that reduces the clustering times effectively when compared to other clustering methods. Li et al. [12] have presented two types of clustering algorithms to improve the common channel of clusters. The purpose of re clustering is avoided by an increasing number of common channels. Simulation results indicate that proposed clustering achieves higher stability and lower routing overhead when compared to the prior techniques. Liu et al. have [13] proposed a similar channel availability based clustering is known as Spectrum Opportunity-based Clustering (SOC). It considers the clustering problem as a bipartite graph problem and allows mapping to tradeoff between cluster size and common channels.

Mansoor et al. [14] have introduced a clustering protocol by considering the factors of the spatial variations of spectrum availability. Derived a new factor for CH selection named CH Determination Factor (CHDF). Implementation results show that proposed clustering achieving higher efficiency than existing protocols. Benmammar et al. [15] have proposed a k-hop clustering in CR. The local connectivity degree and channel connectivity degree were used to find cluster membership. Simulation results show that 35% to 45% more common channels were achieved as compared to prior methods. Misra et al. [16] have discussed a CR clustering algorithm using k-means. The networks are grouped to form a cluster using connectivity degree.

Osman et al. [17] have presented a hybrid clustering protocol named Load Balanced Spectrum and Transmission Range Aware Clustering (LB-STRAC). It considers both load balancing and transmission range for cluster construction. The cluster head eligibility factor was derived and used for selecting the proper cluster head. Compared to other protocols, LB-STRAC achieves higher common channels and equal load distribution among clusters.

Saleem et al. [18] have proposed a cluster-based routing protocol for a CR network to reduce the flooding of routing overheads. Also, presented a protocol SMART using an artificial intelligence-based reinforcement learning approach. Implementation results proved that the proposed SMART reduces SUs’ interference level and selects more cluster heads from the clusters. Sharma et al. [19] have introduced a new cluster head rotation algorithm by considering fading and shadowing effects. The new cluster head selection criteria involve energy threshold, false alarm probabilities and SNR. The selection methods improve coordination between secondary users and increase spectrum utilization effectively



An adaptive neuro-fuzzy inference system is a type of neural network which combines both fuzzy and neural network logic. It inherits the features of both and is considered to be a universal estimator. The inference system is constructed based on a set of fuzzy IF–THEN rules used for learning nonlinear functions

There are two kinds of fuzzy inference systems can be performed: Takagi_Sugeno and Mamdani. Normally, Takagi-Sugeno system is preferred due to its efficiency and flexibility. Adaptive learning techniques are used to adjust fuzzy membership functions to train the data. The minimum error occurred in training and data testing compared to ANN and Fuzzy system. The learning capacity of the ANFIS system can be improved by best parameter tuning and settings. Various premise and consequent parameter tuning algorithms have been proposed for tuning ANFIS parameters. But, concurrent parameter tuning and rule optimization is a complex tasks. ANFIS rules engine consist of both potential and nonpotential rules. Rules which powerfully used for decision making. Nonpotential rules are considered weak rules that should be removed to reduce an overall computational cost. To reduce computational complexity and to increase the accuracy of the ANFIS system, a proper optimization algorithm is needed for training and tuning.

In this work, the parameters of ANFIS system are optimized using hybrid PSO and WO algorithms. The adaptive parameters of premise and consequent parameters positioned at the layers of fuzzification layer and defuzzification layer respectively. In conventional PSO, the solution starts with a random solution. Conversely, the hybrid PSOWO start the initial solution with the help of WO. The outcome of PSO improved by the exploration capabilities of WO.


PSO is one of the Meta-heuristic optimization methods that are motivated by the bird flocking social behavior or fish schooling behavior of searching food [20]. Initially, all the particles were created randomly in the solution search space. The particle’s best position and velocity in the swarm are stored in memory for reference. All the particles update their position and velocity using the following equation:

x¯n+1i=x¯ni+v¯n+1i, (1)

v¯n+1i=ωv¯ni+c1r1(p¯nix¯ni)+c2r2(p¯ngx¯ni) (2)

where r1 and r2 are the random numbers varied among 0 to 1. i denotes the particle in a swarm. W is the inertia weighting parameter. x¯ and v¯ are the position and velocity factors respectively. pg denotes the best solution stored in memory .c1 and c2 are the coefficients used as an optimization parameter.


Whale optimization is also an optimization technique based on nature-motivated [21]. This WO is based on the strategy of bubble-net hunting of humpback whales. The best solution identification procedure of WO is divided into three phases: prey Encircling, Bubble-net attacking technique (exploitation phase) and prey Search (exploration phase). In WO, the position very closer to the prey is considered the best position. The searching of best location formulated as:

D=|C.X(t)X(t)| (3)

X(t+1)=X(t)A.D (4)

where XandX are position vector and position vector of best solution respectively. AandC are the coefficient vectors calculated as follows :

A=2a.ra (5)

C=2.r (6)

In the phase of exploration, the whale’s position is generated randomly without using the best solution. The expression for position updating in the exploration phase is formulated as:

D=|C.XrandX| (7)

X(t+1)=XrandA.D (8)

where ,X rand denotes the random position vector or a random whale. The above position updating equation represents the higher exploration capability of WO optimization.

Hybrid PSWO

The PSO algorithm was successfully applied to all real-world problems due to its easy operation and fast searching speed. But, the PSO algorithm falls to the local optimum easily when solving the large computational problem. The drawback of PSO is solved by integrating with WO. In WO, the best solution is achieved by a hyper-cube mechanism with the highest exploration/exploitation ability. This ability is used to solve the falling local minima problem of PSO.

The guidance of WO is utilized to direct particle positions instead of random motion. The operation of PSO was improved by the WO algorithm. The proposed hybrid PSOWO algorithm is given in algorithm 1.


4  Proposed Optimized ANFIS Based Clustering

In this work, the consequent and antecedent (premise) parameters of ANFIS are tuned by PSWO. In conventional ANFIS, a least-square estimator (LSE) is used to change the parameters of the then-part in the forward transfer and gradient descent (GD) algorithm used to tune the membership settings as a means of backpropagation. In the proposed ANFIS, the PSOWO is used to tune both forward transfer and backpropagation parameters as shown in Fig. 1. I1, I2, I3 and I4 are the input of the ANFIS model for cluster head selection.


Figure 1: PSWO optimized ANFIS

The proposed clustering algorithm is classified into two stages: CH selection and cluster formation. The CH selection process selects CH using the following parameters: the number of common channels, location, distance and average channel capacity. By the process of one-hop and two-hop neighbor discovery, the node can calculate parameters for cluster head selection.

Average Channel Capacity (Ccap)

This work assumes all the nodes are equipped with GPS for location identification. The distance and link gain between nodes is calculated using GPS location. The capacity Ccap of one channel from SUa to SUb can be achieved by the Shannon channel capacity which is given in below:

Ccap=BWlog2(1+Pijhijη) (9)

where BW is the bandwidth of the channel and η is the power spectral density of Gauss noise. hij is the link gain between two nodes.

Quality (Qab)

The duration of common channel usage between two nodes is used to measure quality. The communication duration is evaluated that depends on summing the values of all channels. The higher value of time indicates that the channel quality between two nodes is good.

Distance between Nodes (Dab)

The distance between nodes calculated by using GPS outputs

The number of common channels (Ncom)

The stability is mainly depending on the number of the common channel between two SU’s. The increased number of common channels can group a greater number of cluster members and avoid the re-clustering of a network.

This four-parameter is given as an input for the ANFIS model. The eligible cluster heads are identified with the proposed ANFIS model. The proposed CH selection process is explained in the following algorithm steps and Fig. 2.



Figure 2: The proposed CH selection process

Cluster formation

After CH selection, the CH node sends a message to neighbour nodes to become cluster member. The node joined to the CH by calculating a Euclidean distance between member to CH node in terms of distance and common channel.

5  Simulation Results

The proposed optimized ANFIS clustering is simulated using MATLAB. The nodes are deployed randomly with an area of 10km2. The parameter setting used for simulation is given in the Tab. 1. For a fair comparison, the proposed method compared with well-known algorithms of CogMesh, K-means, RARE and Q learning protocols. The performance parameters for the comparison are the number of common channels, number of clusters, packet transmission delay, average cluster lifetime and overhead ratio.


The performance of a number of common channels as a function of an increasing number of secondary users is given in Fig. 3. The proposed ANFIS based clustering achieves a higher number of common channels clusters even when an increasing number of secondary users. Due to the consideration of common channel as a clustering factor, the proposed method helps increase network stability.


Figure 3: Number of SU vs. number of common channels

Fig. 4 shows the analysis of the number of cluster formations is increased with the count of secondary users. The number of cluster count increases if the user count increases. The proposed algorithms maintain constant clusters count to form a more common channel in a cluster.


Figure 4: Number of SU vs. number of clusters

The packet transmission analysis of the proposed algorithm as a function of data flow rates is given in Fig. 5. In all methods, the delay of the routing path increases when the rate increases flow. Compared to other methods, the proposed methods show lesser delay than others. Due to the consideration of distance as a clustering parameter, the proposed method effectively handles routing delay.


Figure 5: Data flow rates vs. packet transmission delay

Fig. 6 shows the overhead ratio analysis of the proposed method as a function of data flow rate. All the other methods show a higher overhead ratio due to the requirement of more intermediate nodes to transmit a packet. The proposed method forms quality clusters with more common channels. So, the overhead ratio is considered very small compared to other methods.


Figure 6: Data flow rates vs. overhead ratio

Fig. 7 observed that proposed clustering produces a higher cluster lifetime. Because it considers both quality and average channel capacity. Compared to other methods, ANFIS based clustering forms stable clusters and the possibility of reclustering is very less. The results show that the proposed ANFIS model achieved a 33% common channel increment rate, 24% transmission delay rate reductions, 55% communication overhead rate reductions and 42% lifetime improvements reductions than the existing methods.


Figure 7: Cluster lifetime analysis

6  Conclusion

This work presented an optimized ANFIS based clustering algorithm for the cognitive network. To solve the spectrum sharing difficulty of a network, a clustering algorithm with the consideration of quality, distance and common channels has been proposed. Lastly, to verify the proposed clustering efficiency, simulation is conducted and compared with the state-of-the-art clustering techniques. The results observed that the proposed optimized ANFIS clustering was better in terms of stability, cluster lifetime, delay and common channels.

Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.


 1.  H. Li and Z. Han, “Dogfight in spectrum: Combating primary user emulation attacks in cognitive radio systems,” IEEE Transaction on Wireless Communication, vol. 10, no. 1, pp. 274–283, 2011. [Google Scholar]

 2.  S. Haykin, “Cognitive radio: Brain-empowered wireless communications,” IEEE Journal on Selected Areas in Communications, vol. 23, no. 2, pp. 201–220, 2005. [Google Scholar]

 3.  X. Xu, J. Bao, Y. Wang and L. Li, “A spectrum sensing data falsification countermeasure strategy in energy-efficient CRN,” in 2016 8th Int. Conf. on Wireless Communications & Signal Processing (WCSP), Yangzhou, China, 2016. [Google Scholar]

 4.  T. Chen, H. Zhang, G. M. Maggio and I. Chlamtac, “CogMesh: A cluster-based cognitive radio network,” Proceedings of IEEE DySPAN, Dublin, Ireland, pp. 168–178, 2007. [Google Scholar]

 5.  F. A. Awin, E. Abdel-Raheem and M. Ahmadi, “Designing an optimal energy efficient cluster-based spectrum sensing for cognitive radio networks,” IEEE Communications Letters, vol. 20, no. 9, pp. 1884–1887, 2016. [Google Scholar]

 6.  M. Ben Ghorbel, H. Nam and M. S. Alouini, “Cluster-based spectrum sensing for cognitive radios with imperfect channel to cluster-head,” in 2012 IEEE Wireless Communications and Networking Conf. (WCNC), Paris, France, pp. 1012–1023, 2012. [Google Scholar]

 7.  G. Caso, H. Soleimani, L. De Nardis and Di Benedetto, “SENSIC: Mobility-aware cluster-based cooperative spectrum sensing for cognitive radio networks,” in 2014 IEEE Int. Conf. on Ultra-WideBand (ICUWB), Paris, France, pp. 323–332, 2014. [Google Scholar]

 8.  J. Dai and S. Wang, “Clustering-based spectrum sharing strategy for cognitive radio networks,” IEEE Journal on Selected Areas in Communications, vol. 1, no. 1, pp. 1–10, 2016. [Google Scholar]

 9.  N. Dutta, H. K. Sarma and A. Srivastava, “SINR based clustering protocol for cognitive radio ad hoc network (CRAHN),” in 2014 Int. Conf. on Information Technology, Bhubaneswar, India, pp. 96–103, 2014. [Google Scholar]

10. M. A. Hossen and S. J. Yoo, “Q-Learning based multi-objective clustering algorithm for cognitive radio ad hoc networks,” IEEE Access, vol. 1, no. 1, pp. 1–10, 2019. [Google Scholar]

11. Z. Javed, K. L. Yau and A. Mohamad, “RL-Budget: A learning-based cluster size adjustment scheme for cognitive radio networks,” IEEE Access, vol. 6, no. 1, pp. 1055–1072, 2018. [Google Scholar]

12. D. Li and J. Gross, “Robust clustering of ad-hoc cognitive radio networks under opportunistic spectrum access,” in 2011 IEEE Int. Conf. on Communications (ICC), Kyoto, Japan, pp. 63–75, 2011. [Google Scholar]

13. S. Liu, L. Lazos and M. Krunz, “Cluster-based control channel allocation in opportunistic cognitive radio networks,” IEEE Transactions on Mobile Computing, vol. 11, no. 10, pp. 1436–1449, 2012. [Google Scholar]

14. N. Mansoor, A. K. Islam and M. Zaree, “RARE: A spectrum aware cross-layer mac protocol for cognitive radio ad-hoc networks,” IEEE Access, vol. 6, no. 1, pp. 22210–22227, 2018. [Google Scholar]

15. B. Benmammar, M. H. Taleb and F. Krief, “Diffusing-CRN k-means: An improved k-means clustering algorithm applied in cognitive radio ad hoc networks,” Wireless Networks, vol. 23, no. 6, pp. 1849–1861, 2016. [Google Scholar]

16. R. Misra, R. N. Yadav and V. Dosapati, “On robust k-hop clustering in ad-hoc cognitive radio networks,” in 2016 Twenty Second National Conference on Communication (NCC), Guwahati, India, pp. 10.-23, 2016. [Google Scholar]

17. M. M. Osman, S. K. Yusof and N. N. Abd Malik, “Load balanced clustering algorithm for cognitive radio ad hoc networks,” in 2018 2nd Int. Conf. on Telematics and Future, Kuching, Malaysia, pp. 452–460, 2018. [Google Scholar]

18. Y. Saleem, K. L. Yau and H. Mohamad, “Clustering and reinforcement-learning-based routing for cognitive radio networks,” IEEE Wireless Communications, vol. 24, no. 4, pp. 146–151, 2017. [Google Scholar]

19. P. Sharma and V. Abrol, “Optimized cluster head selection & rotation for cooperative spectrum sensing in cognitive radio networks,” in 2013 Tenth Int. Conf. on Wireless and Optical Communications Networks (WOCN), Bhopal, India, pp. 812–820, 2013. [Google Scholar]

20. D. Wang, D. Tan and L. Liu, “Particle swarm optimization algorithm: An overview,” Soft Computing, vol. 22, no. 1, pp. 387–408, 2018. [Google Scholar]

21. S. Mirjalili and A. Lewis, “The whale optimization algorithm,” Advances in Engineering Software, vol. 95, no. 1, pp. 51–67, 2016. [Google Scholar]

images This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.