## 2 Background and Related Works  
In the concept of balancing power consumption and improving data security in wireless sensor networks, many studies have improved these two parts separately. Few studies have considered these two parts equally in terms of finding a technique that combines them [26; 29]. One of these methods relates to the concept of Trust between WSN nodes. Therefore, to clarify these concepts, we first need to explain the WSNs' infrastructure. 6 LoWPAN is one of the most common protocols used to manage wireless sensor networks. The WSN nodes are distributed in the form of an Ad-hoc network and it relies on IPv6 in the process of adding IPs. In addition to adopting the hierarchical model in building the network topology. Moreover, RPL is used in the process of routing data to and from the Access Point (AP) [7]. AES is also used in the encryption process between data [8]. Figure 1 shows a standard 6 LoWPAN architecture. Therefore, in the 6 LoWPAN standard, the protocol operates in different working environments, some of which are dangerous or miniature places inside the human body. Consequently, maintaining the lifetime of the network along with providing security is one of the necessary things in these networks. In this section, we review some studies that have improved the work of the wireless sensor network by saving energy and supporting data security. The clustering method is one of the most common methods that save power to WSN nodes by maintaining the distance and signal strength between adjacent nodes when  
Figure 1: 6 LoWPAN infrastructure. connected [31]. Processing the WSN nodes when the distance between them is as wide as possible leads to increased power consumption especially in mobile node environments [32]. In [19], the authors split the network into a set of layers until it ends in the root, which is the AP. Each layer is divided into clusters that are identical in structure. These groups share data using two heads (CHs) to balance the energy of each group. Moreover, in [20], the authors used various factors such as the node's power level, the node's motion angle and the distance between the node and the AP to choose the CH node. Continuously in the process of optimizing the process of clustering method, the [33] has implemented an improved routing protocol to determine the ideal CH cluster and the actual collaborative data. Their proposal always selects the CH node with the highest energy parameter without consideration for other important matters. In [26], the authors proposed a new clustering method for 6 LoWPAN mobile networks based on various factors such as node power level, number of adjacent nodes in a particular area and distance between adjacent nodes to reduce nodes' power consumption during communication. Next, the authors balance node security and power through an automated encryption level. Regarding linking Trust models with clustering methods to develop secure and energy-efficient models. The authors in [29] proposed a lightweight trust algorithm (LTA). This algorithm was based on the mutual monitoring of nodes using several parameters such as data packet, control packet and event. The traditional aging factor was used to determine the trust score of each node. It gave good results in identifying some types of attacks, such as the black hole, but it is slow in responding to the attack. Moreover, authors in [34] calculated the reliability of the nodes (vehicles) using various parameters such as connection duration, security level and centrality. Sensors in vehicles adapt the level of security through the level of confidence in neighbouring cells and vehicles. However, the vehicle is central to these sensors (WSN nodes) and can perform complex operations on several security levels. In addition, work in [35] performed a machine learning method to calculate the trust level for each neighbouring sensor (vehicles). Furthermore, A quantified trust accessibility model was presented by [30]. According to the authors, the future of IoT is based on trust.