Movatterモバイル変換


[0]ホーム

URL:


CN110049526A - Based on the method for data capture and system for improving cluster algorithm in WSN - Google Patents

Based on the method for data capture and system for improving cluster algorithm in WSN
Download PDF

Info

Publication number
CN110049526A
CN110049526ACN201910294339.XACN201910294339ACN110049526ACN 110049526 ACN110049526 ACN 110049526ACN 201910294339 ACN201910294339 ACN 201910294339ACN 110049526 ACN110049526 ACN 110049526A
Authority
CN
China
Prior art keywords
cluster head
node
algorithm
nodes
clustering algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910294339.XA
Other languages
Chinese (zh)
Inventor
段佳希
张永胜
张婕
黄晓翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Normal University
Original Assignee
Shandong Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Normal UniversityfiledCriticalShandong Normal University
Priority to CN201910294339.XApriorityCriticalpatent/CN110049526A/en
Publication of CN110049526ApublicationCriticalpatent/CN110049526A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本公开提出了WSN中基于改进分簇算法的数据收集方法及系统,针对一区域中布置有若干无线传感器构成的无线传感器网络,将LEACH法的簇头选举公式中阈值乘以系数G,该G值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;利用分簇的无线传感器网络实现数据的收集。本公开对LEACH分簇算法进行改进的优化算法,利用加权的方式使在多种情形下,分簇算法能够更好的适用于当前网络。

The present disclosure proposes a data collection method and system based on an improved clustering algorithm in WSN. For a wireless sensor network composed of several wireless sensors arranged in an area, the threshold in the cluster head election formula of the LEACH method is multiplied by a coefficient G, and the G The value is used to control the number of cluster head elections in different network structures, to realize the election of cluster head nodes from ordinary nodes; after the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, and determines the cluster head node. The members of the group complete the clustering process; use the clustered wireless sensor network to collect data. The present disclosure is an improved optimization algorithm for the LEACH clustering algorithm, and the clustering algorithm can be better applied to the current network in various situations by means of weighting.

Description

Translated fromChinese
WSN中基于改进分簇算法的数据收集方法及系统Data collection method and system based on improved clustering algorithm in WSN

技术领域technical field

本公开涉及无线传感器网络技术领域,特别是涉及WSN中基于改进分簇算法的数据收集方法及系统。The present disclosure relates to the technical field of wireless sensor networks, and in particular, to a data collection method and system based on an improved clustering algorithm in WSN.

背景技术Background technique

无线传感器网络(Wireless Sensor Networks,WSN)是众多以自组织形式存在的传感器节点构成的具有一定覆盖范围的网络。WSN被广泛的应用于数据监测领域,如在军事、国防、灾害防控以及移动支付、智能家居等方面。WSN从网络特性来看,传感器具有一定传输范围,数据的收发只能在有限范围内进行。WSN中的节点往往不能全部同时与汇聚节点交换数据,交换数据常以逐级传递的方式进行,因此利用分簇来进行数据传输值得探究。Wireless Sensor Networks (WSN) is a network with a certain coverage area composed of many sensor nodes in the form of self-organization. WSN is widely used in data monitoring fields, such as military, national defense, disaster prevention and control, mobile payment, smart home and so on. From the perspective of network characteristics of WSN, sensors have a certain transmission range, and data transmission and reception can only be carried out within a limited range. The nodes in the WSN often cannot exchange data with the sink node at the same time, and the exchange of data is often carried out in a step-by-step manner. Therefore, it is worth exploring the use of clustering for data transmission.

分簇算法是为了解决WSN中的数据传输效率问题,限制WSN中无线传感器传输效率的因素主要有能耗和计算能力两个方面。为保持网络的覆盖率和网络的联通度,通常的做法就是利用分簇算法选出一些合适的节点协助汇聚节点收集网络中的数据,再将数据统一交托给汇聚节点处理。但WSN网络往往受限于地理位置、传感器计算能力等因素,选择不到最合适的簇头节点。针对此问题,想到对分簇算法进行优化,使之更适用于WSN。The clustering algorithm is to solve the problem of data transmission efficiency in WSN. The factors that limit the transmission efficiency of wireless sensors in WSN mainly include two aspects: energy consumption and computing power. In order to maintain the coverage of the network and the degree of connectivity of the network, the usual method is to use the clustering algorithm to select some suitable nodes to assist the sink node to collect data in the network, and then entrust the data to the sink node for processing. However, the WSN network is often limited by factors such as geographical location and sensor computing capabilities, and the most suitable cluster head node cannot be selected. In response to this problem, I thought of optimizing the clustering algorithm to make it more suitable for WSN.

目前,国内外研究主要基于在传统的分簇算法上加入对地理位置、剩余能量等因素的考虑来达到局部优化的效果。传统WSN中的分簇算法有集中式、分布式和混合式三类。At present, the research at home and abroad is mainly based on the consideration of geographical location, residual energy and other factors in the traditional clustering algorithm to achieve the effect of local optimization. There are three types of clustering algorithms in traditional WSN: centralized, distributed and hybrid.

集中式算法中,比较典型的有LEACH-C算法和LEACH-F算法,前者通过收集网络内所有传感器的能量信息,经一定的算法计算,确定簇头;后者结合了退火算法,静态挑选部分节点作为簇头。集中式网络的优势在于基站只需具有运算能力,其余传感器节点只需传输数据无需进行数据处理。Among the centralized algorithms, LEACH-C algorithm and LEACH-F algorithm are more typical. The former determines the cluster head by collecting the energy information of all sensors in the network and calculating by a certain algorithm; the latter combines the annealing algorithm and statically selects the part. Nodes act as cluster heads. The advantage of a centralized network is that the base station only needs to have computing power, and the rest of the sensor nodes only need to transmit data without data processing.

分布式分簇算法中,最为经典的是由Wendi Rabiner Heinzelman,AnanthaChandrakasan,Hari Balakrishnan提出的LEACH分簇算法,主要思想是通过轮转的方式来进行簇头的选举,分布式网络的优势在于,减轻基站运算能力方面的负担,适合规模庞大的网络。Among the distributed clustering algorithms, the most classic is the LEACH clustering algorithm proposed by Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Hari Balakrishnan. The burden of computing power is suitable for large-scale networks.

混合式方法结合了集中式和分布式的特点,例如基于LEACH算法的LEACH-KED方法,主要思想是为能量、地理位置、与基站间距离三个因素赋予不同的权重,得出最适合作为簇头的传感器节点。The hybrid method combines the characteristics of centralized and distributed, such as the LEACH-KED method based on the LEACH algorithm. head sensor node.

发明人在研究中发现,WSN中分簇算法的研究主要是基于对传统分簇算法进行的某一方面的优化,以适应不同场景下的网络,使得网络的生命周期和传输效率最大化。The inventor found in the research that the research on the clustering algorithm in WSN is mainly based on the optimization of a certain aspect of the traditional clustering algorithm to adapt to the network in different scenarios, so as to maximize the network life cycle and transmission efficiency.

发明内容SUMMARY OF THE INVENTION

本说明书实施方式的目的是提供WSN中基于改进分簇算法的数据收集方法,在部分性能上可以大幅度的优于传统的分簇算法。The purpose of the embodiments of this specification is to provide a data collection method based on an improved clustering algorithm in WSN, which can be significantly better than the traditional clustering algorithm in some performances.

本说明书实施方式提供WSN中基于改进分簇算法的数据收集方法,通过以下技术方案实现:The embodiments of this specification provide a data collection method based on an improved clustering algorithm in WSN, which is achieved through the following technical solutions:

包括:include:

针对一区域中布置有若干无线传感器构成的无线传感器网络,包括1个汇聚节点及N个普通节点;A wireless sensor network composed of several wireless sensors is arranged in an area, including a sink node and N common nodes;

将LEACH法的簇头选举公式中阈值乘以系数G,该G值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;Multiply the threshold value in the cluster head election formula of the LEACH method by the coefficient G, the G value is used to control the number of cluster head elections in different network structures, and realize the election of cluster head nodes from common nodes;

选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;After the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, determines the group members of the cluster head node, and completes the clustering process;

利用分簇的无线传感器网络实现数据的收集。Data collection is realized by using clustered wireless sensor network.

本说明书实施方式提供WSN中基于改进分簇算法的数据收集系统,通过以下技术方案实现:The embodiments of this specification provide a data collection system based on an improved clustering algorithm in WSN, which is achieved through the following technical solutions:

包括一区域中布置有若干无线传感器构成的无线传感器网络,包括1个汇聚节点及N个普通节点;Including a wireless sensor network composed of a number of wireless sensors arranged in an area, including a convergence node and N common nodes;

所述无线传感器网络将LEACH法的簇头选举公式中阈值乘以系数G,该G值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;The wireless sensor network multiplies the threshold value in the cluster head election formula of the LEACH method by the coefficient G, and the G value is used to control the number of cluster head elections in different network structures, so as to realize the election of cluster head nodes from common nodes;

选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;After the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, determines the group members of the cluster head node, and completes the clustering process;

所述无线传感器网络利用分簇的簇头节点协助汇聚节点收集网络中的数据,再将数据统一传输给汇聚节点处理。The wireless sensor network utilizes clustered cluster head nodes to assist the sink node to collect data in the network, and then uniformly transmits the data to the sink node for processing.

与现有技术相比,本公开的有益效果是:Compared with the prior art, the beneficial effects of the present disclosure are:

本公开对LEACH分簇算法进行改进的优化算法,利用加权的方式使在多种情形下,分簇算法能够更好的适用于当前网络。The present disclosure is an improved optimization algorithm for the LEACH clustering algorithm, and the clustering algorithm can be better applied to the current network in various situations by means of weighting.

附图说明Description of drawings

构成本公开的一部分的说明书附图用来提供对本公开的进一步理解,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。The accompanying drawings that constitute a part of the present disclosure are used to provide further understanding of the present disclosure, and the exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure.

图1为本公开实施例子的LEACH分簇算法和DEEC分簇算法剩余能量对比图;Fig. 1 is the residual energy comparison diagram of LEACH clustering algorithm and DEEC clustering algorithm according to an embodiment of the disclosure;

图2为本公开实施例子的LEACH分簇算法和DEEC分簇算法传输效率对比图;2 is a comparison diagram of the transmission efficiency of the LEACH clustering algorithm and the DEEC clustering algorithm according to an embodiment of the present disclosure;

图3为本公开实施例子的WSN网络模型结构示意图;3 is a schematic structural diagram of a WSN network model according to an embodiment of the present disclosure;

图4为本公开实施例子的遗传算法流程图;4 is a flowchart of a genetic algorithm of an embodiment of the disclosure;

图5为本公开实施例子的LEACH算法、DEEC算法和改进LEACH算法的剩余能量对比示意图;5 is a schematic diagram of the residual energy comparison of the LEACH algorithm, the DEEC algorithm and the improved LEACH algorithm according to an embodiment of the present disclosure;

图6为本公开实施例子的LEACH算法、DEEC算法和改进LEACH算法的数据传输对比示意图。FIG. 6 is a schematic diagram of data transmission comparison between the LEACH algorithm, the DEEC algorithm, and the improved LEACH algorithm according to an embodiment of the present disclosure.

具体实施方式Detailed ways

应该指出,以下详细说明都是例示性的,旨在对本公开提供进一步的说明。除非另有指明,本公开使用的所有技术和科学术语具有与本公开所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the present disclosure. Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.

需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本公开的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that when the terms "comprising" and/or "including" are used in this specification, it indicates that There are features, steps, operations, devices, components and/or combinations thereof.

实施例子一Example 1

该实施例子首先介绍LEACH分簇算法,LEACH分簇算法,是无线传感器网络中的分布式分簇协议,全称“低能耗且自适应的分簇分层型协议”。LEACH算法运行过程可以看作两个不同的阶段:建立分簇阶段和数据传输阶段。基于能耗方面的考虑,数据传输的阶段的持续时间要远大于建立分簇的阶段的持续时间。分簇建立阶段大致可表述为如下三个过程:选定簇头节点,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员。This example first introduces the LEACH clustering algorithm, which is a distributed clustering protocol in wireless sensor networks, the full name of which is "low energy consumption and adaptive clustering layered protocol". The operation process of LEACH algorithm can be regarded as two different stages: the establishment of clustering stage and the data transmission stage. Based on the consideration of energy consumption, the duration of the phase of data transmission is much longer than that of the phase of establishing the cluster. The cluster establishment stage can be roughly described as the following three processes: selecting the cluster head node, the cluster head node broadcasts the sensor nodes within its coverage, and determines the group members of the cluster head node.

公式(1)中:p为当前周期内传感器节点被选取为簇头节点的概率,r为算法运行的周期数,G为最近的1/p算法运行周期中未当选簇头的传感器节点的集合。In formula (1): p is the probability that the sensor node is selected as the cluster head node in the current cycle, r is the number of cycles in which the algorithm runs, and G is the set of sensor nodes that have not been selected as the cluster head in the most recent 1/p algorithm running cycle .

在每个信息传输的周期里,选定簇头节点是分簇建立的第一步,首先,选取网络中的任一节点,LEACH算法会生成一个随机数,接着,根据概率公式计算出阈值T1(n),将生成的随机数与T1(n)进行对比,若生成的随机数小于T1(n),则当前无线传感器节点被选为簇头节点;反之,不被选为簇头节点。重复上述过程,直至所有节点都遍历一遍,网络周期中的全部簇头节点完全选定。In each cycle of information transmission, the selection of the cluster head node is the first step in the establishment of the cluster. First, select any node in the network, the LEACH algorithm will generate a random number, and then calculate the threshold T according to the probability formula1 (n), compare the generated random number with T1 (n), if the generated random number is less than T1 (n), the current wireless sensor node is selected as the cluster head node; otherwise, it is not selected as the cluster head node. head node. The above process is repeated until all nodes are traversed once, and all cluster head nodes in the network cycle are completely selected.

簇头节点对其覆盖范围内的传感器节点进行广播是分簇建立的第二步,当普通传感器节点被选为簇头节点后,向其覆盖范围内的传感器节点散布自身成为簇头节点的消息,使其他传感器节点发现自己。当其他传感器节点收到来自簇头节点的消息后,其他传感器节点选择信号强度最高的簇头节点作为自身的簇头节点,自己为该簇头节点的簇内成员,接着簇内传感器节点向簇头节点回馈消息,汇报自身与簇头节点间信号强度,完成分簇过程。The cluster head node broadcasts the sensor nodes within its coverage, which is the second step of cluster establishment. When a common sensor node is selected as the cluster head node, it broadcasts the message that it has become the cluster head node to the sensor nodes within its coverage. , enabling other sensor nodes to discover themselves. When other sensor nodes receive the message from the cluster head node, other sensor nodes select the cluster head node with the highest signal strength as their own cluster head node, and they are members of the cluster head node, and then the sensor nodes in the cluster send messages to the cluster head node. The head node returns a message, reports the signal strength between itself and the cluster head node, and completes the clustering process.

在另一实施例子中,公开了DEEC分簇算法,DEEC分簇算法基于LEACH分簇算法进行改进,它将网络剩余能量的考虑加入到了簇头选取的策略中。DEEC分簇算法和LEACH分簇算法的运行过程大体相似,区别在于DEEC分簇算法有对能耗的优化考虑。DEEC算法希望剩余能量多于网络中节点剩余能量平均值的节点更多的去承担簇头节点的工作,而网络中剩余能量少的反之。由于簇头节点比非簇头节点要消耗更大的能量,这样,能量高的节点更多地担任簇头节点就可以使得网络中的能耗趋于平均,从而减少单一节点能量过早耗尽的情况。In another embodiment, a DEEC clustering algorithm is disclosed, and the DEEC clustering algorithm is improved based on the LEACH clustering algorithm, which adds the consideration of the remaining energy of the network to the strategy of cluster head selection. The operation process of the DEEC clustering algorithm and the LEACH clustering algorithm are generally similar, the difference is that the DEEC clustering algorithm has optimization considerations for energy consumption. The DEEC algorithm hopes that the nodes with more residual energy than the average residual energy of the nodes in the network will undertake the work of the cluster head node more, and vice versa. Since the cluster head node consumes more energy than the non-cluster head node, more nodes with high energy act as the cluster head node can make the energy consumption in the network tend to be average, thereby reducing the premature exhaustion of the energy of a single node Case.

算法的运行原理与LEACH分簇算法类似,都是不断循环地进行分簇过程。不同之处是,DEEC算法分簇过程中除了需要知道当前所处的周期外,还需要知道网络中的当前周期下节点剩余能量和节点平均剩余能量。在选定簇头节点过程中,LEACH分簇算法中的每一轮循环的阈值T2(n)在DEEC算法中需乘以一个权重w=Ei/Ea其中,Ei是循环中当前节点的剩余能量,Ea是当前周期节点的平均剩余能量。这样即将LEACH算法融合了能耗因素方面的考虑。The operating principle of the algorithm is similar to that of the LEACH clustering algorithm, and the clustering process is continuously cyclically performed. The difference is that in the clustering process of the DEEC algorithm, in addition to knowing the current cycle, it is also necessary to know the node remaining energy and the average node remaining energy in the current cycle in the network. In the process of selecting a cluster head node, the threshold value T2 (n) of each round of the LEACH clustering algorithm needs to be multiplied by a weight w=Ei /Ea in the DEEC algorithm, where Ei is the current value in the cycle The remaining energy of the node, Ea is the average remaining energy of the node in the current period. In this way, the LEACH algorithm incorporates the consideration of energy consumption factors.

其中,p为当前周期内传感器节点被选取为簇头节点的概率,r为算法运行的周期数,G为最近的1/p算法运行周期中未当选簇头的传感器节点的集合。Among them, p is the probability that the sensor node is selected as the cluster head node in the current cycle, r is the number of cycles in which the algorithm runs, and G is the set of sensor nodes that have not been selected as the cluster head in the most recent 1/p algorithm running cycle.

当簇头选取完成后,与LEACH算法相同,DEEC算法接着对当前循环中簇头节点覆盖范围内的传感器节点进行广播,传递自身成为簇头节点的信息。最后,当前循环中,传感器节点选择信号强度最高的簇头节点作为该簇的簇头并传递该节点剩余能量等信息,由簇头汇报给汇聚节点,汇聚节点对信息进行统一处理,得出本轮过后的网络中节点平均剩余能量。When the cluster head selection is completed, the same as the LEACH algorithm, the DEEC algorithm then broadcasts the sensor nodes within the coverage of the cluster head node in the current cycle, and transmits the information that it becomes the cluster head node. Finally, in the current cycle, the sensor node selects the cluster head node with the highest signal strength as the cluster head of the cluster and transmits information such as the remaining energy of the node, which is reported to the sink node by the cluster head. The average remaining energy of nodes in the network after the round.

在又一实施例中,通过前面对LEACH法和DEEC法的分析看出,DEEC法是考虑到剩余能量的因素,通过改变LEACH算法中簇头选举公式中阈值T1(n)的计算方式来对其进行优化。图1是对LEACH算法和DEEC算法剩余能量进行仿真,横坐标代表运行的周期数,最大值为5000,纵坐标代表在每一周期网络内节点总的剩余能量。In yet another embodiment, it can be seen from the previous analysis of the LEACH method and the DEEC method that the DEEC method takes the remaining energy into account, and changes the calculation method of the threshold T1(n) in the cluster head election formula in the LEACH algorithm. optimize it. Figure 1 is a simulation of the residual energy of the LEACH algorithm and the DEEC algorithm. The abscissa represents the number of running cycles, the maximum value is 5000, and the ordinate represents the total residual energy of nodes in each cycle network.

通过观察发现DEEC算法在前1000周期内剩余能量下降的比LEACH算法要快,对网络中的能量消耗大于LEACH算法,但在1000周期以后DEEC算法的能量消耗速率减缓。在1500周期左右,两个网络几乎同时消耗完剩余能量,说明在两种算法下,网络寿命的性能差别不大。Through observation, it is found that the residual energy of the DEEC algorithm decreases faster than the LEACH algorithm in the first 1000 cycles, and the energy consumption in the network is greater than that of the LEACH algorithm, but the energy consumption rate of the DEEC algorithm slows down after 1000 cycles. At about 1500 cycles, the two networks almost consumed the remaining energy at the same time, indicating that the performance of the network lifetime is not much different under the two algorithms.

但在日常生活中,由于WSN中的节点能量可以得到外来补充,所以网络运行过程中一般不存在传感器节点能量被耗尽的情况,也就是说现实生活中,网络工作在1000周期前LEACH算法在节省能耗上优于DEEC分簇算法。同时,本公开只统计了数据传输过程中的能量消耗,并未考虑网络进行计算时自身的能量消耗,由于DEEC算法是基于LEACH算法进行改进后得出的,DEEC算法需统计每一轮中所有传感器的剩余能量数据,每一轮中需增加一次数据收集的过程,其能耗势必会高于LEACH算法。However, in daily life, since the energy of nodes in WSN can be supplemented by external sources, there is generally no situation that the energy of sensor nodes is exhausted during network operation. That is to say, in real life, the network works before 1000 cycles. It is better than DEEC clustering algorithm in terms of energy saving. At the same time, this disclosure only counts the energy consumption during the data transmission process, and does not consider the energy consumption of the network itself during the calculation. Since the DEEC algorithm is improved based on the LEACH algorithm, the DEEC algorithm needs to count all the data in each round. For the remaining energy data of the sensor, a data collection process needs to be added in each round, and its energy consumption is bound to be higher than that of the LEACH algorithm.

图2是对LEACH算法和DEEC算法数据传输效率进行仿真,其中横坐标代表运行的周期数,最大值为5000,纵坐标代表汇聚节点接收到数据包的个数变化。Figure 2 is a simulation of the data transmission efficiency of the LEACH algorithm and the DEEC algorithm, where the abscissa represents the number of running cycles, the maximum value is 5000, and the ordinate represents the change in the number of packets received by the sink node.

通过观察发现,DEEC分簇算法在数据传输方面有着明显优势,它的数据传输量一直高于LEACH分簇算法接近两倍。Through observation, it is found that the DEEC clustering algorithm has obvious advantages in data transmission, and its data transmission volume is always nearly twice that of the LEACH clustering algorithm.

实施例子二Example 2

该实施例子公开了基于改进分簇算法的数据收集方法,本公开为研究无线传感器网络分簇算法,充分考虑到网络多样性的特点,令WSN中的传感器节点随机分布,构建数学模型,以供分簇算法的使用。This embodiment discloses a data collection method based on an improved clustering algorithm. In order to study the wireless sensor network clustering algorithm, the present disclosure fully considers the characteristics of network diversity, makes the sensor nodes in the WSN randomly distributed, and builds a mathematical model for Use of clustering algorithms.

在具体实施例子中,数据收集模型构建,参见附图3所示,首先,将模型构建在特定的地理环境中,这里将模型设置在一个具有一定大小和形状的区域,记为A,整个网络运行周期记为R。然后,在区域A中按一定的方式放置无线传感器,无线传感器的数量记为N+1,其中包括1个汇聚节点,记为I;N个普通节点,记为i;可以被选举为簇头节点的普通传感器记为c。In a specific embodiment, the data collection model is constructed, as shown in FIG. 3 . First, the model is constructed in a specific geographical environment, where the model is set in an area with a certain size and shape, denoted as A, the entire network The running period is denoted as R. Then, place wireless sensors in a certain way in area A. The number of wireless sensors is denoted as N+1, including 1 sink node, denoted as I; N ordinary nodes, denoted as i; can be elected as cluster heads The common sensor of the node is denoted as c.

接下来设置无线传感器节点i的初始能量信息,记为Ei。每一个无限传感器能量设置的公式如下:Next, set the initial energy information of the wireless sensor node i, denoted as Ei . The formula for each infinite sensor energy setting is as follows:

Ei=E0*(1+rand*a) (4)Ei =E0 *(1+rand*a) (4)

其中E0为能量均值;rand为0~1间的随机数;a代表能量波动范围。这样即可将传感器节点能量初始化在E0附近波动,满足网络模型中传感器异构的要求。最后,由于汇聚节点的位置在网络部署阶段会被指定,本模型将除汇聚节点外的其余的N个普通无线传感器节点随机分布在整张地图上。其中,xi、yi分别代表传感器的横、纵坐标。以上即可构建出一个具有一定大小和形状的地理区域,无线传感器数量为N+1个(其中包括1个汇聚节点和N个普通节点),无线传感器位置随机分布,无线传感器能量在一定范围内波动的WSN。Among them, E0 is the average energy value; rand is a random number between 0 and 1; a represents the energy fluctuation range. In this way, the energy of sensor nodes can be initialized to fluctuate around E0 to meet the requirements of sensor heterogeneity in the network model. Finally, since the location of the sink node will be specified in the network deployment stage, this model randomly distributes the rest of the N ordinary wireless sensor nodes except the sink node on the entire map. Among them, xi and yi represent the horizontal and vertical coordinates of the sensor, respectively. The above can construct a geographic area with a certain size and shape, the number of wireless sensors is N+1 (including 1 sink node and N common nodes), the positions of wireless sensors are randomly distributed, and the energy of wireless sensors is within a certain range Volatile WSN.

关于遗传算法(Genetic Algorithm)是一种通过模拟自然界中优胜劣汰过程搜索全局最优解的方法,也是模拟达尔文遗传学机理中的生物进化过程和达尔文生物进化论中的自然选择的计算模型。对于遗传算法,首先要创建一个初始种群,然后通过适应度函数计算出对当前环境的适应度,从而实现模仿自然界中生物内部优胜劣汰的进化过程。它通过适应度函数一次次计算,再进行一次次筛选,将符合要求的个体留下,逐步接近全局最优解,遗传算法流程图参见附图4所示。About Genetic Algorithm is a method to search for the global optimal solution by simulating the process of survival of the fittest in nature. For the genetic algorithm, an initial population is first created, and then the fitness to the current environment is calculated through the fitness function, so as to realize the evolution process of imitating the survival of the fittest in nature. It calculates the fitness function again and again, and performs screening again and again, leaving the individuals that meet the requirements, and gradually approaching the global optimal solution. See Figure 4 for the flowchart of the genetic algorithm.

本公开的实施例子中利用遗传算法对分簇算法的改进,由于传统的LEACH分簇算法和DEEC分簇算法没有对不同网络进行适应性配置,簇头选举公式自始至终也不会因网络不同而产生适应性变化,相对死板。这里希望针对不同网络,通过改变簇头选举公式中的阈值使网络中的每一轮簇头数量和网络结构产生一些适应性的改变。In the embodiment of the present disclosure, the genetic algorithm is used to improve the clustering algorithm. Since the traditional LEACH clustering algorithm and the DEEC clustering algorithm do not have adaptive configuration for different networks, the cluster head election formula will not be generated from the beginning to the end due to different networks. Adaptive change, relatively rigid. It is hoped that for different networks, by changing the threshold in the cluster head election formula, the number of cluster heads and the network structure in each round of the network will have some adaptive changes.

原有的DEEC法就是通过改变LEACH法中簇头选举公式中的阈值对网络的性能产生影响。由此得到启发,通过修改LEACH法的簇头选举公式中的阈值来提升网络性能。本公开考虑将LEACH法的簇头选举公式中阈值乘以一个0到2间的系数M,这个M,值用来控制对于不同网络结构中的簇头选举数量。如令M=0.8,即网络中的簇头在当前条件下会减少;令M=1.2则是网络中的簇头在当前条件下增多。从0到2中如何选取M值才会对网络产生好的影响,这就需要利用优化算法进行筛选。故此问题转化为一个求取全局最优解的问题,目的是挑出一个0到2间的权值,使得网络更加适应不同的节点资源和地理位置分配,网络的性能达到最佳。The original DEEC method affects the performance of the network by changing the threshold in the cluster head election formula in the LEACH method. Inspired by this, the network performance is improved by modifying the threshold in the cluster head election formula of the LEACH method. The present disclosure considers multiplying the threshold in the cluster head election formula of the LEACH method by a coefficient M between 0 and 2, and this M value is used to control the number of cluster head elections in different network structures. For example, if M=0.8, the cluster heads in the network will decrease under the current conditions; if M=1.2, the cluster heads in the network will increase under the current conditions. How to choose the M value from 0 to 2 will have a good impact on the network, which requires the use of optimization algorithms for screening. Therefore, this problem is transformed into a problem of finding the global optimal solution. The purpose is to pick out a weight between 0 and 2, so that the network can better adapt to different node resources and geographical location allocation, and the performance of the network can be optimal.

这里,既可以通过优化算法对网络中的每一节点进行优化,也可以针对分簇算法的中的一些重要变量进行优化,两者均能达到减小能耗的目的,本公开选择后者,原因是WSN中无线传感器节点的数量非常庞大,若对整个网络中所有节点进行优化,那么遗传算法进行优化时总的分簇算法的时空复杂度都会非常高,现有的计算条件不允许。对于后者的优化,受DEEC分簇算法的启发,认为该算法对LEACH算法的簇头选择公式(1)中阈值T1(n)进行改动,将能耗、数据传输效率、簇头选择等因素结合考虑,得到了很好的效果。但LEACH分簇算法的簇头选择公式,对于不同的网络并不一定全部适合,因此,对T2(n)进行乘以一定大小的系数,使之更适合当前网络。这个系数通过遗传算法求取,将问题转化为一个求取全局最优解的数学问题。Here, each node in the network can be optimized by an optimization algorithm, and some important variables in the clustering algorithm can also be optimized, both of which can achieve the purpose of reducing energy consumption, the present disclosure chooses the latter, The reason is that the number of wireless sensor nodes in WSN is very large. If all nodes in the entire network are optimized, the time and space complexity of the total clustering algorithm will be very high when the genetic algorithm is optimized, which is not allowed by the existing calculation conditions. For the latter optimization, inspired by the DEEC clustering algorithm, it is believed that the algorithm changes the threshold T1(n) in the cluster head selection formula (1) of the LEACH algorithm, and considers factors such as energy consumption, data transmission efficiency, and cluster head selection. Combined with consideration, a very good effect has been obtained. However, the cluster head selection formula of the LEACH clustering algorithm is not necessarily suitable for different networks. Therefore, multiply T2(n) by a coefficient of a certain size to make it more suitable for the current network. This coefficient is obtained by genetic algorithm, which transforms the problem into a mathematical problem to obtain the global optimal solution.

实施例子三Example three

该实施例子公开了算法仿真例子,首先介绍地图及传感器相关参数设置,需将模型构建在一定地理环境中,因此设置了一个200*200的地图模型。整个网络运行周期记为R,周期的最大值R=5000,数据传输将在这5000个周期中进行仿真。设无线传感器的数量为N=101,其中包括1个汇聚节点I和100个普通无线传感器节点i。考虑到现实中汇聚无线传感器网络中的汇聚节点往往位于网络的最中心的位置,将本模型汇聚节点设置在坐标为(100,100)的地图中心,其余的100个普通节点随机分布在整张地图。This embodiment discloses an example of algorithm simulation. First, the map and sensor-related parameter settings are introduced. The model needs to be built in a certain geographical environment, so a 200*200 map model is set. The entire network operation cycle is denoted as R, the maximum value of the cycle is R=5000, and the data transmission will be simulated in these 5000 cycles. Assume that the number of wireless sensors is N=101, including 1 sink node I and 100 ordinary wireless sensor nodes i. Considering that the sink node in the convergence wireless sensor network is often located in the most central position of the network in reality, the sink node of this model is set at the center of the map whose coordinates are (100, 100), and the remaining 100 ordinary nodes are randomly distributed in the whole map. map.

接着,设置无线传感器节点的初始能量信息,每一个无限传感器i有不同的能量,能量设置方法如下,根据公式(4):EA=E0*(1+rand*a),取E0的值为0.5;rand为0~1间的随机数;a为0.05,由此初始化实现传感器节点能量在0.5附近波动。最后,将除汇聚节点外的100个无线传感器节点i随机分布在地图上。传感器节点横、纵坐标分别为xi=rand*200,yi=rand*200,其中rand取0~1间的随机数。Next, set the initial energy information of the wireless sensor node, each infinite sensor i has different energy, the energy setting method is as follows, according to formula (4): EA =E0 *(1+rand*a), take E0 The value is 0.5; rand is a random number between 0 and 1; a is 0.05, thus initializing the sensor node energy to fluctuate around 0.5. Finally, 100 wireless sensor nodes i except the sink node are randomly distributed on the map. The horizontal and vertical coordinates of the sensor nodes are respectively xi =rand*200, yi =rand*200, where rand is a random number between 0 and 1.

损耗模型参数设置及模型相关评价指标,实验中,需对节点能量进行具体的数值计算,当前周期内所有节点的剩余能量总和EA计算公式如下:Loss model parameter setting and model-related evaluation indicators. In the experiment, the node energy needs to be calculated numerically. The calculation formula of the total residual energy EA of all nodes in the current cycle is as follows:

EA=∑(Ei-EL) (5)EA =∑(Ei -EL ) (5)

当前节点i的剩余能量改为Et,无线传感器节点i的初始能量信息为Ei,EL为当前周期传输数据所消耗的能量,其中EL的计算公式如下:The remaining energy of the current node i is changed to Et, the initial energy information of the wireless sensor node i is Ei , andEL is the energyconsumed by the current period of data transmission, where the calculation formula of EL is as follows:

当d<d0时,When d<d0 ,

EL=L*(ETX+ERX)+L*Efs*d2 (6)EL =L*(ETX +ERX )+L*Efs *d2 (6)

当d≥d0时,When d≥d0 ,

EL=L*(ETX+ERX)+L*Efs*d4 (7)EL =L*(ETX +ERX )+L*Efs *d4 (7)

其中d为两数据传输节点间的距离,d0为距离阈值,计算公式如下:Among them, d is the distance between two data transmission nodes, and d0 is the distance threshold. The calculation formula is as follows:

公式6、7、8中参数L、ETX、ERX、Efs、Emp含义及在MATLAB中的设置如下:数据包的长度L=4*103;发射单位报文损耗能量ETX=50*10-9;接收单位报文损耗能量ERX=50*10-9;自由空间能量Efs=10*10-12;衰减空间能量Emp=0.0013*10-13;由于EA统计当前周期内所有节点的剩余能量之和,对分簇算法来说,相同周期数内所有节点的EA值越大,算法性能越优良。本公开通过统计一定周期内汇聚节点接收到的数据包数量S的大小来衡量网络的数据传输效率。一定周期内汇聚节点收到的数据包越多,数据传输效率越高。同时还选取了负载均衡度来衡量分簇算法簇头分配的合理与否,它主要衡量的是不同簇头的簇内成员数间的差别,若簇内成员数差距过大,则分簇算法不合理。负载均衡度的具体计算公式如下:The meanings of parameters L, ETX , ERX , Efs , and Emp in formulas 6, 7 and 8 and their settings in MATLAB are as follows: the length of the data packet L=4*103 ; the transmission unit message loss energy ETX = 50*10-9 ; energy consumption of the received unit message ERX =50*10-9 ; free space energy Efs =10*10-12 ; attenuation space energy Emp= 0.0013*10-13 ;The sum of the remaining energy of all nodes in the cycle, for the clustering algorithm, the larger the EA value of all nodes in the same cycle number, the better the algorithm performance. The present disclosure measures the data transmission efficiency of the network by counting the size of the number of data packets S received by the sink node in a certain period. The more data packets received by the sink node within a certain period, the higher the data transmission efficiency. At the same time, the load balance degree is also selected to measure the reasonableness of the cluster head allocation of the clustering algorithm. It mainly measures the difference between the number of members in the clusters of different cluster heads. If the difference in the number of members in the cluster is too large, the clustering algorithm unreasonable. The specific calculation formula of the load balance degree is as follows:

其中,nc是簇头节点的数量,Xi是当前簇头节点的簇内成员个数,u是网络内所有簇头节点的平均簇头数。对于WSN来说,LBF越大网络性能越优良。Among them, nc is the number of cluster head nodes, Xi is the number of cluster members in the current cluster head node, and u is the average number of cluster heads of all cluster head nodes in the network. For WSN, the larger the LBF, the better the network performance.

仿真实验及分析,本次实验通过Matlab 2017b仿真平台完成,通过仿真我们希望能够得出网络生命周期的对比图和网络数据传输速率的对比图。利用Matlab中的矩阵运算,生成多个传感器变量,每一行代表不同的传感器,每一列代表传感器不同的性能数据,包括了每一个传感器的地理位置坐标,每一个传感器的剩余能量,每一个传感器在网络中是否为簇头节点。通过Matlab将这些数据综合到一个矩阵之中,方便了数据的归类和处理。此外利用Matlab中plot()等作图函数,完成对网络的剩余能量对比图和数据传输对比图的绘制,直观的展示出各个分簇算法的性能差异。Simulation experiments and analysis, this experiment is completed through the Matlab 2017b simulation platform. Through simulation, we hope to get a comparison chart of the network life cycle and a comparison chart of the network data transmission rate. Using the matrix operation in Matlab, multiple sensor variables are generated, each row represents a different sensor, and each column represents different performance data of the sensor, including the geographic location coordinates of each sensor, the remaining energy of each sensor, and each sensor in Whether it is a cluster head node in the network. These data are integrated into a matrix through Matlab, which facilitates the classification and processing of the data. In addition, using the plotting functions such as plot() in Matlab, the residual energy comparison diagram and the data transmission comparison diagram of the network are completed, and the performance difference of each clustering algorithm is visually displayed.

在一实施例子中,公开了基于改进分簇算法的数据收集策略实现:由于WSN的网络形式繁多,LEACH算法的簇头选举公式中阈值T1(n)不一定适合所有场景下网络的分簇,本公开受DEEC法启发,考虑网络本身的差异性,通过对T2(n)加权一个M值使其适合于新的网络。虽然DEEC分簇算法已对LEACH算法有了一定改进,但DEEC分簇算法仍未对不同的网络环境进行适应,故本公开是在DEEC分簇算法上进行改进,对DEEC分簇算法的阈值计算公式(2)中T2(n)进行加权M优化。In one embodiment, the implementation of the data collection strategy based on the improved clustering algorithm is disclosed: due to the variety of network forms of WSN, the threshold T1 (n) in the cluster head election formula of the LEACH algorithm is not necessarily suitable for the clustering of the network in all scenarios. , the present disclosure is inspired by the DEEC method, considers the difference of the network itself, and makes it suitable for the new network by weighting T2(n) with an M value. Although the DEEC clustering algorithm has improved the LEACH algorithm to a certain extent, the DEEC clustering algorithm has not yet adapted to different network environments. Therefore, the present disclosure improves the DEEC clustering algorithm and calculates the threshold value of the DEEC clustering algorithm. T2 (n) in formula (2) is optimized by weighted M.

本公开的重点在于如何使用遗传算法优化LEACH算法。首先,本公开选取汇聚节点接收到全部数据包的数量作为适应度计算函数。将遗传代数设置为100代,染色体长度为10,每一代取DEEC算法进行10个周期的运算,通过得到的数据计算出汇聚节点在一个周期内接收到的数据包数量S。S作为适应度计算函数的函数值。在每一代中挑选适应度计算函数值最大的个体进行遗传,生成下一代的种群。直到100代遗传代数运行完毕,最终得出的M值便是最适合当前网络的T2(n)的加权值。将得出来的M值加权至T2(n),完成对分簇算法的优化,并进行5000周期的仿真,得出仿真结果。The focus of this disclosure is on how to optimize the LEACH algorithm using the Genetic Algorithm. First, the present disclosure selects the number of all data packets received by the sink node as the fitness calculation function. The genetic algebra is set to 100 generations, and the chromosome length is 10. Each generation uses the DEEC algorithm to perform 10 cycles of operations, and the number of packets S received by the sink node in one cycle is calculated from the obtained data. S is the function value of the fitness calculation function. In each generation, the individual with the largest fitness calculation function value is selected for inheritance, and the next generation population is generated. Until 100 generations of genetic algebras are run, the final M value is the weighted value of T2 (n) that is most suitable for the current network. The obtained M value is weighted to T2 (n), the optimization of the clustering algorithm is completed, and 5000 cycles of simulation are carried out to obtain the simulation results.

由于适应度计算函数的选取是针对数据传输效率进行的,因此判断优化效果的指标也应为数据传输效率。同时,本公开还从其他层面探讨了改进分簇的性能,包括,剩余能量变化的分析来反映算法执行过程中能量消耗的情况;算法的负载均衡度来反映算法执行过程中的簇头分配情况。基于LEACH算法的具体程序如下:Since the selection of the fitness calculation function is based on the data transmission efficiency, the indicator for judging the optimization effect should also be the data transmission efficiency. At the same time, this disclosure also discusses improving the performance of clustering from other aspects, including the analysis of remaining energy changes to reflect the energy consumption during the execution of the algorithm; the load balance degree of the algorithm to reflect the cluster head allocation during the execution of the algorithm. . The specific procedure based on the LEACH algorithm is as follows:

实施例子四Example 4

为了使得本领域技术人员能够更加清楚地了解本公开的技术方案,以下将结合具体的实施例与对比例详细说明本公开的技术方案。In order to enable those skilled in the art to understand the technical solutions of the present disclosure more clearly, the technical solutions of the present disclosure will be described in detail below with reference to specific embodiments and comparative examples.

三种分簇算法在仿真运行过程中的剩余能量变化的对比,具体仿真结果如图5所示:图中横坐标表示运行周期数,纵坐标表示网络中所有节点剩余能量之和。分析可知LEACH分簇算法的能量消耗是三者中最慢的,曲线斜率最小且几乎保持不变,能量在第2000周期左右被完全消耗。而DEEC分簇算法,其能量消耗过程在0至1000周期时比LEACH分簇算法快,曲线比LEACH分簇算法陡峭,且斜率几乎保持不变。1000周期到2300周期曲线斜率开始减缓,能量完全被消耗的时间点在2300周期左右。改进LEACH分簇算法,其能量消耗过程几乎和DEEC分簇算法所得结果保持一致。The comparison of the residual energy changes of the three clustering algorithms in the simulation operation process, the specific simulation results are shown in Figure 5: the abscissa in the figure represents the number of operating cycles, and the ordinate represents the sum of the remaining energy of all nodes in the network. The analysis shows that the energy consumption of the LEACH clustering algorithm is the slowest among the three, the curve slope is the smallest and almost unchanged, and the energy is completely consumed around the 2000th cycle. The DEEC clustering algorithm, its energy consumption process is faster than the LEACH clustering algorithm from 0 to 1000 cycles, the curve is steeper than the LEACH clustering algorithm, and the slope is almost unchanged. The slope of the curve from 1000 cycles to 2300 cycles begins to slow down, and the time point when the energy is completely consumed is around 2300 cycles. The energy consumption process of the improved LEACH clustering algorithm is almost the same as that of the DEEC clustering algorithm.

LEACH算法的簇头选举策略完全依照概率进行,故节点在整个算法模拟过程中被选为簇头的概率几乎不受其它因素影响,致使能量消耗随机进行,算法运行前期可能会将某一节点重复多次选举为簇头节点,导致该节点能量消耗过快提前死亡,网络中能量分布不均衡。算法运行后期被选为簇头的节点可能被选在周围分布能量被耗尽的节点中,导致该节点无法完全发挥簇头节点的作用,能量消耗自然偏低。The cluster head election strategy of the LEACH algorithm is completely based on probability, so the probability of a node being selected as a cluster head during the entire algorithm simulation process is almost unaffected by other factors, resulting in random energy consumption, and a node may be repeated in the early stage of the algorithm. Multiple elections as the cluster head node cause the node to die prematurely due to excessive energy consumption, and the energy distribution in the network is unbalanced. The node selected as the cluster head in the later stage of the algorithm operation may be selected among the nodes whose distributed energy is exhausted, resulting in that the node cannot fully play the role of the cluster head node, and the energy consumption is naturally low.

DEEC分簇算法和改进LEACH分簇算法则是基于节点剩余能量的考虑,某种程度上削弱了网络中的节点被重复选举为簇头节点的可能性。使得网络中的簇头选举过程尽量优先考虑剩余能量多的簇头,使得网络的数据传输平稳进行,能量消耗更为合理。三种分簇算法在仿真运行过程中的数据传输量变化的对比,具体仿真结果如图6所示:图中横坐标表示运行周期数,纵坐标表示汇聚节点收到数据包的总个数。对LEACH算法,其在5000周期内传输的数据量最少,约为1*104个,数据传输在2000周期左右停止;对DEEC分簇算法,其在5000周期内传输的数据量约为2.2*104个,高于LEACH分簇算法,低于本公开改进LEACH分簇算法,数据传输在2300周期左右停止;对改进LEACH分簇算法,其在5000周期内传输的数据量约为2.4*104个,为三者中最高,数据传输在2300周期左右停止,上述三种算法数据传输停止点均与图5中能量被完全消耗的时间点相符The DEEC clustering algorithm and the improved LEACH clustering algorithm are based on the consideration of the remaining energy of nodes, which to some extent weakens the possibility of nodes in the network being repeatedly elected as cluster head nodes. It makes the cluster head election process in the network give priority to the cluster head with more remaining energy as much as possible, so that the data transmission of the network is carried out smoothly and the energy consumption is more reasonable. The comparison of the data transmission changes of the three clustering algorithms during the simulation operation, the specific simulation results are shown in Figure 6: the abscissa in the figure represents the number of running cycles, and the ordinate represents the total number of data packets received by the sink node. For the LEACH algorithm, the amount of data transmitted in 5000 cycles is the least, about1 *104, and the data transmission stops around 2000 cycles; for the DEEC clustering algorithm, the amount of data transmitted in 5000 cycles is about 2.2* 104 , higher than the LEACH clustering algorithm, lower than the improved LEACH clustering algorithm of the present disclosure, the data transmission stops at about 2300 cycles; for the improved LEACH clustering algorithm, the amount of data transmitted in 5000 cycles is about 2.4*104 , which is the highest among the three, and the data transmission stops at about 2300 cycles. The data transmission stop points of the above three algorithms are consistent with the time points when the energy is completely consumed in Figure 5.

LEACH分簇算法未考虑能量方面因素,使得网络簇头选举完全依据概率进行,不能将网络的能量合理分配,数据传输效率低下。DEEC分簇算法能较好的依照网络的剩余能量分布,合理安排网络的剩余能量,提高网络运行过程中数据传输效率。本公开提到的改进LEACH分簇算法,不仅融合了DEEC分簇算法的对剩余能量方面的考虑,并且将一些潜在的因素加之考量,使算法达到更加适应当前网络的效果。三种算法的负载均衡度LBF对比如表1所示:The LEACH clustering algorithm does not consider energy factors, so that the network cluster head election is completely based on probability, the energy of the network cannot be reasonably allocated, and the data transmission efficiency is low. The DEEC clustering algorithm can better distribute the residual energy of the network, reasonably arrange the residual energy of the network, and improve the data transmission efficiency during the network operation. The improved LEACH clustering algorithm mentioned in this disclosure not only incorporates the remaining energy considerations of the DEEC clustering algorithm, but also considers some potential factors to make the algorithm more suitable for the current network. The load balancing degree LBF comparison of the three algorithms is shown in Table 1:

表1 LEACH算法、DEEC算法和改进LEACH算法的负载均衡度对比Table 1 Comparison of load balance between LEACH algorithm, DEEC algorithm and improved LEACH algorithm

以上数值均为5000周期的负载均衡度的平均值,是每一轮的负载均衡度求和再除以总轮数5000得出来的。可以看出,LEACH分簇算法的负载均衡度最高,效果最好。DEEC分簇算法的负载均衡度远不如LEACH分簇算法,但仍高于本公开提到的改进LEACH分簇算法。分析其原因,LEACH分簇算法簇头选举是一个随机过程,每个传感器节点被分为簇头节点的概率相当,每个周期内簇头节点簇内成员的数量相当,故其负载均衡度高。而DEEC分簇算法,在运行过程中优先选择剩余能量多的传感器节点作为簇头。簇头选择具有一定的定向性,随机性减少,导致边缘的传感器节点担任簇头的时候周围的节点可能已经死亡,簇内成员减少,致使和非边缘的传感器节点担任簇头时的簇内成员个数有着较大差异。The above values are the average of the load balance degree of 5000 cycles, which is obtained by summing the load balance degree of each round and dividing it by the total number of rounds of 5000. It can be seen that the LEACH clustering algorithm has the highest load balance and the best effect. The load balancing degree of the DEEC clustering algorithm is far inferior to that of the LEACH clustering algorithm, but still higher than the improved LEACH clustering algorithm mentioned in this disclosure. Analyzing the reasons, the cluster head election of the LEACH clustering algorithm is a random process. The probability of each sensor node being divided into cluster head nodes is equal, and the number of members in the cluster head node in each cycle is equal, so its load balance is high. . In the DEEC clustering algorithm, the sensor node with more remaining energy is preferentially selected as the cluster head during the running process. The cluster head selection has a certain directionality, and the randomness is reduced, which leads to the fact that the surrounding nodes may have died when the edge sensor node acts as the cluster head, and the number of members in the cluster decreases, resulting in the non-edge sensor node acting as the cluster head. The numbers are quite different.

随着WSN的日益发展,WSN中的传感器节点不断增多,传感器的异构现象更加频繁,势必不会存在一种适应全部网络的分簇算法。在这种情况下,我们试图寻找一种能够对各种分簇算法进行优化的方法,使在多种情形下,分簇算法能够更好的适用于当前网络。本公开受到基于LEACH分簇算法的改进算法——DEEC分簇算法的启发,形成一种全新的对于LEACH分簇算法的改进思路,选择用遗传算法作为对LEACH分簇算法进行改进的优化算法,设计并仿真实现了WSN网络模型,对模型中参数进行了严谨的设置以及数学推导。在此模型上对三种分簇算法的网络性能进行了仿真验证并对仿真结果进行了系统分析。证明了改进LEACH分簇在部分性能上确实可以大幅度的优于传统的分簇算法,即本公开提出改进LEACH分簇算法是有效的。With the increasing development of WSN, the number of sensor nodes in WSN is increasing, and the heterogeneous phenomenon of sensors is more frequent, so there is bound to be no clustering algorithm suitable for all networks. In this case, we try to find a method that can optimize various clustering algorithms, so that the clustering algorithm can be better applicable to the current network in many situations. Inspired by an improved algorithm based on the LEACH clustering algorithm, the DEEC clustering algorithm, the present disclosure forms a brand-new improvement idea for the LEACH clustering algorithm, and selects the genetic algorithm as the optimization algorithm for improving the LEACH clustering algorithm. The WSN network model is designed and simulated, and the parameters in the model are rigorously set and mathematically deduced. Based on this model, the network performance of the three clustering algorithms is verified by simulation and the simulation results are systematically analyzed. It is proved that the improved LEACH clustering algorithm can indeed greatly outperform the traditional clustering algorithm in some performances, that is, the improved LEACH clustering algorithm proposed in the present disclosure is effective.

实施例子五Example 5

本说明书实施方式提供WSN中基于改进分簇算法的数据收集系统,通过以下技术方案实现:The embodiments of this specification provide a data collection system based on an improved clustering algorithm in WSN, which is achieved through the following technical solutions:

包括一区域中布置有若干无线传感器构成的无线传感器网络,包括1个汇聚节点及N个普通节点;Including a wireless sensor network composed of a number of wireless sensors arranged in an area, including a convergence node and N common nodes;

所述无线传感器网络将LEACH法的簇头选举公式中阈值乘以系数M,该M值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;The wireless sensor network multiplies the threshold value in the cluster head election formula of the LEACH method by the coefficient M, and the M value is used to control the number of cluster head elections in different network structures, so as to realize the election of cluster head nodes from common nodes;

选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;After the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, determines the group members of the cluster head node, and completes the clustering process;

所述无线传感器网络利用分簇的簇头节点协助汇聚节点收集网络中的数据,再将数据统一传输给汇聚节点处理。The wireless sensor network utilizes clustered cluster head nodes to assist the sink node to collect data in the network, and then uniformly transmits the data to the sink node for processing.

在具体实施例子中,汇聚节点将数据传输至上位机、远程服务器、控制中心或控制终端等可接收该数据的电子终端。In a specific embodiment, the sink node transmits the data to an electronic terminal that can receive the data, such as a host computer, a remote server, a control center, or a control terminal.

可以理解的是,在本说明书的描述中,参考术语“一实施例”、“另一实施例”、“其他实施例”、或“第一实施例~第N实施例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。It is to be understood that, in the description of this specification, referring to the description of the terms "an embodiment", "another embodiment", "other embodiment", or "the first embodiment to the Nth embodiment" etc. means A particular feature, structure, material, or characteristic described in connection with this embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials and characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included within the protection scope of the present disclosure.

Claims (10)

Translated fromChinese
1.WSN中基于改进分簇算法的数据收集方法,其特征是,包括:1. A data collection method based on an improved clustering algorithm in the WSN, characterized in that it includes:针对一区域中布置有若干无线传感器构成的无线传感器网络,将LEACH法的簇头选举公式中阈值乘以系数G,该G值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;For a wireless sensor network composed of several wireless sensors arranged in an area, multiply the threshold value in the cluster head election formula of the LEACH method by the coefficient G, and the G value is used to control the number of cluster head elections in different network structures. The node elects the cluster head node;选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;After the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, determines the group members of the cluster head node, and completes the clustering process;利用分簇的无线传感器网络实现数据的收集。Data collection is realized by using clustered wireless sensor network.2.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,无线传感器网络所构建的数据模型为:2. the data collection method based on improved clustering algorithm in WSN as claimed in claim 1, is characterized in that, the data model that wireless sensor network is built is:在一个具有一定大小和形状的区域,记为A,整个网络运行周期记为R;In an area with a certain size and shape, denoted as A, the entire network operating cycle is denoted as R;然后,在区域A中按一定的方式放置无线传感器,无线传感器的数量记为N+1,其中包括1个汇聚节点;N个普通节点;可以被选举为簇头节点的普通传感器记为c;Then, place wireless sensors in a certain way in area A, the number of wireless sensors is denoted as N+1, including 1 sink node; N ordinary nodes; ordinary sensors that can be elected as cluster head nodes are denoted as c;设置无线传感器节点的初始能量信息;Set the initial energy information of the wireless sensor node;将除汇聚节点外的其余的N个普通无线传感器节点随机分布在整张地图上。The rest of the N ordinary wireless sensor nodes except the sink node are randomly distributed on the whole map.3.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,利用遗传算法选取G值,使得无线传感器网络适应不同的节点资源和地理位置分配。3. The data collection method based on improved clustering algorithm in WSN as claimed in claim 1, is characterized in that, utilize genetic algorithm to select G value, make wireless sensor network adapt to different node resource and geographical location allocation.4.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,无线传感器网络中,当前周期内所有节点的剩余能量总和为所有节点当前周期的剩余能量与当前周期传输数据所消耗的能量之差的求和。4. the data collection method based on improved clustering algorithm in WSN as claimed in claim 1 is characterized in that, in wireless sensor network, the residual energy summation of all nodes in the current cycle is the residual energy of all nodes current cycle and the current cycle The sum of the differences in energy consumed to transmit data.5.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,无线传感器网络中,当前周期传输数据所消耗的能量与两数据传输节点间的距离相关。5 . The data collection method based on improved clustering algorithm in WSN according to claim 1 , wherein, in the wireless sensor network, the energy consumed by the current periodic data transmission is related to the distance between two data transmission nodes. 6 .6.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,利用一定周期内汇聚节点接收到的数据包数量S的大小来衡量网络的数据传输效率;6. the data collection method based on improved clustering algorithm in WSN as claimed in claim 1, is characterized in that, utilizes the size of the data packet quantity S that the convergence node receives in a certain period to measure the data transmission efficiency of network;选取负载均衡度来衡量分簇算法簇头分配的合理与否,它主要衡量的是不同簇头的簇内成员数间的差别。The load balance degree is selected to measure the reasonableness of the cluster head allocation of the clustering algorithm. It mainly measures the difference between the number of members in the cluster of different cluster heads.7.如权利要求3所述的WSN中基于改进分簇算法的数据收集方法,其特征是,利用遗传算法选取G值的过程为:7. the data collection method based on improved clustering algorithm in WSN as claimed in claim 3, is characterized in that, utilizes genetic algorithm to select the process of G value as:选取汇聚节点接收到全部数据包的数量作为适应度计算函数:Select the number of all data packets received by the sink node as the fitness calculation function:将遗传代数、染色体长度分别进行参数设置,每一代取DEEC算法进行若干个周期的运算,通过得到的数据计算出汇聚节点在一个周期内接收到的数据包数量S,S作为适应度计算函数的函数值;Set the parameters of genetic algebra and chromosome length respectively, each generation takes the DEEC algorithm to perform several cycles of operations, and calculates the number of data packets S received by the sink node in one cycle through the obtained data, and S is used as the fitness calculation function. function value;在每一代中挑选适应度计算函数值最大的个体进行遗传,生成下一代的种群,直到设定代遗传代数运行完毕,最终得出的G值便是最适合当前网络的T2(n)的加权值,将得出来的G值加权至T2(n),完成对分簇算法的优化。In each generation, the individual with the largest fitness calculation function value is selected for inheritance, and the population of the next generation is generated until the genetic algebra of the set generation is completed, and the final G value is the most suitable T2 (n) of the current network. Weighting value, weighting the obtained G value to T2 (n) to complete the optimization of the clustering algorithm.8.如权利要求1所述的WSN中基于改进分簇算法的数据收集方法,其特征是,8. the data collection method based on improved clustering algorithm in WSN as claimed in claim 1 is characterized in that,在选定簇头节点过程中,LEACH分簇算法中的每一轮循环的阈值T2(n)在DEEC算法中需乘以一个权重w=Ei/Ea,其中,Ei是循环中当前节点的剩余能量,Ea是当前周期节点的平均剩余能量,p为当前周期内传感器节点被选取为簇头节点的概率,r为算法运行的周期数,G为最近的1/p算法运行周期中未当选簇头的传感器节点的集合。In the process of selecting the cluster head node, the threshold value T2 (n) of each round cycle in the LEACH clustering algorithm needs to be multiplied by a weight w=Ei /Ea in the DEEC algorithm, where Ei is the cycle The remaining energy of the current node, Ea is the average remaining energy of the node in the current cycle, p is the probability that the sensor node is selected as the cluster head node in the current cycle, r is the cycle number of the algorithm running, G is the most recent 1/p algorithm running The collection of sensor nodes that are not elected as cluster heads in the cycle.9.WSN中基于改进分簇算法的数据收集系统,其特征是,包括一区域中布置有若干无线传感器构成的无线传感器网络,包括1个汇聚节点及N个普通节点;9. A data collection system based on an improved clustering algorithm in WSN, characterized in that it includes a wireless sensor network composed of a number of wireless sensors arranged in an area, including 1 convergence node and N common nodes;所述无线传感器网络将LEACH法的簇头选举公式中阈值乘以系数G,该G值用来控制对于不同网络结构中的簇头选举数量,实现从普通节点选举簇头节点;The wireless sensor network multiplies the threshold value in the cluster head election formula of the LEACH method by the coefficient G, and the G value is used to control the number of cluster head elections in different network structures, so as to realize the election of cluster head nodes from common nodes;选定簇头节点后,簇头节点对其覆盖范围内的传感器节点进行广播,确定簇头节点的组内成员,完成分簇过程;After the cluster head node is selected, the cluster head node broadcasts the sensor nodes within its coverage, determines the group members of the cluster head node, and completes the clustering process;所述无线传感器网络利用分簇的簇头节点协助汇聚节点收集网络中的数据,再将数据统一传输给汇聚节点处理。The wireless sensor network utilizes clustered cluster head nodes to assist the sink node to collect data in the network, and then uniformly transmits the data to the sink node for processing.10.如权利要求9所述的WSN中基于改进分簇算法的数据收集系统,其特征是,所述汇聚节点将数据传输至上位机、远程服务器、控制中心或控制终端。10 . The data collection system based on an improved clustering algorithm in WSN according to claim 9 , wherein the convergence node transmits data to a host computer, a remote server, a control center or a control terminal. 11 .
CN201910294339.XA2019-04-122019-04-12Based on the method for data capture and system for improving cluster algorithm in WSNPendingCN110049526A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910294339.XACN110049526A (en)2019-04-122019-04-12Based on the method for data capture and system for improving cluster algorithm in WSN

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910294339.XACN110049526A (en)2019-04-122019-04-12Based on the method for data capture and system for improving cluster algorithm in WSN

Publications (1)

Publication NumberPublication Date
CN110049526Atrue CN110049526A (en)2019-07-23

Family

ID=67277063

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910294339.XAPendingCN110049526A (en)2019-04-122019-04-12Based on the method for data capture and system for improving cluster algorithm in WSN

Country Status (1)

CountryLink
CN (1)CN110049526A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110536373A (en)*2019-08-132019-12-03江苏大学A kind of optical-wireless sensor network clustering method based on copula theory
CN111093201A (en)*2019-12-232020-05-01内蒙古大学 A wireless sensor network and its clustering method
CN111586789A (en)*2020-05-192020-08-25北京理工大学 A data transmission method, device, computer equipment and storage medium
WO2021051859A1 (en)*2019-09-182021-03-25上海海事大学Adaptive genetic algorithm-based clustering and routing method for wireless sensor network
CN113099508A (en)*2021-03-162021-07-09西南民族大学Random centralized self-organizing clustering method and system for wireless mobile node
CN117729518A (en)*2023-11-212024-03-19山东科技大学Wireless sensor network clustering method based on improved swan optimization algorithm
CN118075814A (en)*2024-04-192024-05-24上海创蓝云智信息科技股份有限公司Network message transmission method based on master node control

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102547904A (en)*2012-02-282012-07-04山东大学Leach protocol-based cluster head election improved algorithm
CN103024849A (en)*2012-09-272013-04-03西安电子科技大学LEACH (Low-energy Adaptive Clustering Hierarchy)-based wireless sensor network clustering method
CN103338492A (en)*2013-05-202013-10-02山东大学Heterogeneous wireless sensor network clustering method based on DEEC (distributed energy-efficient clustering) method
CN103607746A (en)*2013-12-022014-02-26中国联合网络通信集团有限公司Method for realizing routing through wireless sensing nodes
CN104411000A (en)*2014-12-152015-03-11南昌航空大学Method for selecting cluster head of hierarchical routing protocol in wireless sensor network
EP2991393A1 (en)*2004-12-222016-03-02Wirepas OyNode device for a wireless sensor network
CN106102075A (en)*2016-08-252016-11-09广东工业大学The cluster-dividing method divided based on hierarchical region in radio sensing network and system
CN109413710A (en)*2018-11-262019-03-01珠海格力电器股份有限公司Clustering method and device of wireless sensor network based on genetic algorithm optimization

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP2991393A1 (en)*2004-12-222016-03-02Wirepas OyNode device for a wireless sensor network
CN102547904A (en)*2012-02-282012-07-04山东大学Leach protocol-based cluster head election improved algorithm
CN103024849A (en)*2012-09-272013-04-03西安电子科技大学LEACH (Low-energy Adaptive Clustering Hierarchy)-based wireless sensor network clustering method
CN103338492A (en)*2013-05-202013-10-02山东大学Heterogeneous wireless sensor network clustering method based on DEEC (distributed energy-efficient clustering) method
CN103607746A (en)*2013-12-022014-02-26中国联合网络通信集团有限公司Method for realizing routing through wireless sensing nodes
CN104411000A (en)*2014-12-152015-03-11南昌航空大学Method for selecting cluster head of hierarchical routing protocol in wireless sensor network
CN106102075A (en)*2016-08-252016-11-09广东工业大学The cluster-dividing method divided based on hierarchical region in radio sensing network and system
CN109413710A (en)*2018-11-262019-03-01珠海格力电器股份有限公司Clustering method and device of wireless sensor network based on genetic algorithm optimization

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110536373A (en)*2019-08-132019-12-03江苏大学A kind of optical-wireless sensor network clustering method based on copula theory
CN110536373B (en)*2019-08-132022-10-28江苏大学 A clustering method for optical wireless sensor networks based on copula theory
WO2021051859A1 (en)*2019-09-182021-03-25上海海事大学Adaptive genetic algorithm-based clustering and routing method for wireless sensor network
CN111093201A (en)*2019-12-232020-05-01内蒙古大学 A wireless sensor network and its clustering method
CN111586789A (en)*2020-05-192020-08-25北京理工大学 A data transmission method, device, computer equipment and storage medium
CN113099508A (en)*2021-03-162021-07-09西南民族大学Random centralized self-organizing clustering method and system for wireless mobile node
CN117729518A (en)*2023-11-212024-03-19山东科技大学Wireless sensor network clustering method based on improved swan optimization algorithm
CN118075814A (en)*2024-04-192024-05-24上海创蓝云智信息科技股份有限公司Network message transmission method based on master node control
CN118075814B (en)*2024-04-192024-07-09上海创蓝云智信息科技股份有限公司Network message transmission method based on master node control

Similar Documents

PublicationPublication DateTitle
CN110049526A (en)Based on the method for data capture and system for improving cluster algorithm in WSN
Bagci et al.An energy aware fuzzy unequal clustering algorithm for wireless sensor networks
Yousefi et al.An energy-efficient artificial bee colony-based clustering in the internet of things
CN104618997B (en)A kind of data aggregation method based on non-uniform grid
Kour et al.Hybrid energy efficient distributed protocol for heterogeneous wireless sensor network
CN106102075B (en)Cluster-dividing method and system based on hierarchical region division in wireless sensor network
Li et al.Battery-friendly relay selection scheme for prolonging the lifetimes of sensor nodes in the Internet of Things
Fu et al.Modeling and optimizing the cascading robustness of multisink wireless sensor networks
CN107820321B (en)Large-scale user intelligent access method in narrow-band Internet of things based on cellular network
CN105246097A (en) A Lifetime Optimization Method for Wireless Sensor Networks with Mobile Sink Nodes
CN110225569A (en)A method of based on the WSNs clustering and multi-hop Routing Protocol for improving particle swarm algorithm
CN118250766B (en) Node sleep scheduling method for wireless sensor networks based on clustering optimization
CN105813161A (en)Clustering routing method of micropower wireless sensor network based on energy difference
FarahaniEnergy Consumption Reduction in Wireless Sensor Network Based on Clustering
CN119485685A (en) Ad hoc dynamic networking method and system based on MAC layer
Hussain et al.Genetic algorithm for energy-efficient trees in wireless sensor networks
Ramadhan et al.Modified combined leach and pegasis routing protocol for energy efficiency in iot network
CN112987789A (en)Unmanned aerial vehicle cluster network topology design method for improving Leach protocol
CN118158766A (en) Data transmission method, device, computer equipment and storage medium
Sivakumar et al.Dynamic Energy-Efficient Clustering Algorithms Using Advanced Metaheuristics for Prolonged Network Lifetime in Wireless Sensor Networks
Saidu et al.An enhanced leach routing algorithm for energy conservation in a wireless sensor network
CN114189877A (en)5G base station-oriented composite energy consumption optimization control method
CN111601354B (en)Cluster first-choice lifting and self-adaptive clustering method and system for towering structure monitoring
CN113938978A (en) A Reinforcement Learning-Based Pathfinding Method for Heterogeneous Wireless Sensors
CN108513332B (en) A kind of cluster routing method and system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20190723


[8]ページ先頭

©2009-2025 Movatter.jp