A method and system for optimizing the generation of PathCost values between neighboring nodes in a ZigBee network
By calculating the communication success rate and optimizing LQI combined with RSSI, the problem of poor correlation between LQI and RSSI under co-channel interference in the Zigbee network is solved, and the optimization of Path Cost in the AODVjr algorithm is realized to avoid interfering nodes and improve routing stability.
Patent Information
- Application Number
- CN202210338984.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-04-01
AI Technical Summary
The method of mapping RSSI to LQI in the existing Zigbee network is ineffective in the case of co-channel interference, resulting in increased bit error rates and high packet loss rates, and cannot effectively correlate changes in LQI and RSSI.
By selecting a time window of a certain length to calculate the communication success rate between a node and its neighbor nodes, the LQI is calculated based on the EWMA statistical formula and RSSI, and the Path Cost is calculated based on the Routing Cost to optimize routing selection in the AODVjr algorithm.
In a co-channel interference environment, LQI and RSSI are effectively correlated to reduce the cost of corresponding neighbor nodes, allowing the AODVjr algorithm to avoid interfered nodes and improve the stability of routing connections.
Smart Images

Figure CN114650623B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ZigBee optimization technology, and in particular to an optimization method and system for generating PathCost values between neighboring nodes in a ZigBee network. Background Art
[0002] Common routing algorithms used in Zigbee networks include Cluster-Tree algorithm and AODVjr algorithm. AODVjr algorithm is a simplified version of AODV algorithm. Mesh network uses AODVjr algorithm to maintain routing, in which link loss depends on LQI (link quality indication) between two connected routing points. However, many chips supporting Zigbee baseband on the market do not support LQI detection. When the routing algorithm is used, it simply uses RSSI (received signal strength indication) between two points to map to LQI. This method is very ineffective in the presence of co-channel interference, because in the case of co-channel interference, a significant increase in bit error rate will cause LQI to deteriorate, but the RSSI received by the device will not deteriorate, that is, changes in LQI are not associated with changes in RSSI, which will cause the packet loss of routing connections to increase significantly. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an optimization method and system for generating PathCost values between neighboring nodes in a ZigBee network, thereby solving the shortcomings of the existing method of simply mapping RSSI between two points to LQI.
[0004] The object of the present invention is achieved by the following technical solution: an optimization method for generating PathCost values between neighboring nodes in a ZigBee network, the optimization method comprising:
[0005] Select a time window T of a certain length and calculate the communication success rate Ct between the node and its neighbor nodes within the time window T;
[0006] The latest communication success rate between each node and its neighboring nodes is calculated by the EWMA statistical formula Pt=λCt+(1-λ)Pt-1, where Pt is the latest statistical success rate, Ct is the statistical success rate in the latest time window, Pt-1 is the previous statistical success rate, and λ is the weight of the statistical success rate in the latest time window;
[0007] When the AODVjr algorithm is running to maintain the route, the LQI is calculated based on the latest communication success rate Pt and RSSI;
[0008] According to the Routing Cost calculation formula Calculate the path cost used by the AODVjr algorithm.
[0009] The communication success rate Ct between the node and the neighboring nodes in the calculation time window T is specifically calculated by the formula Ct=Tsuccess / Ttotal*100, where Ct is the communication success rate between the node and the neighboring nodes, Tsuccess is the data packet sent successfully in the time window T, and Ttotal is all the data packets sent in the time window T.
[0010] The LQI is calculated using the formula LQI = Pt*(Rt-Rmin) / (Rmax–Rmin)*255, where Pt is the success rate obtained by the latest EWMA statistics, Rt is the receiving RSSI of the latest data packet, Rmin is the receiving sensitivity RSSI of the chip, and Rmax is the saturated RSSI of the chip.
[0011] The invention discloses an optimization system for generating PathCost values between neighboring nodes in a ZigBee network. The system comprises a communication success rate calculation module, an EWMA statistical calculation module, an LQI calculation module and a Cost calculation module. The communication success rate calculation module is used to calculate the communication success rate Ct between a node and a neighboring node within a time window T. The EWMA statistical calculation module is used to calculate the latest communication success rate between each node and the neighboring node in combination with EWMA statistics according to the communication success rate Ct obtained by the communication success rate calculation module. The LQI calculation module is used to calculate the LQI in combination with the latest communication success rate Pt calculated and RSSI when running an AODVjr algorithm to maintain routing. The Cost calculation module is used to calculate the Path Cost used by the AODVjr algorithm according to a Routing Cost calculation formula.
[0012] The present invention has the following advantages: an optimization method and system for generating PathCost values between neighboring nodes in a ZigBee network. When there is co-frequency interference in the environment, the obtained LQI will be associated with the RSSI, so that the corresponding neighbor node Cost is reduced, so that the AODVjr algorithm can avoid the interfered nodes when acquiring the routing link. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided below in conjunction with the drawings is not intended to limit the scope of protection of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application. The present invention is further described below in conjunction with the drawings.
[0015] The routing algorithm of Zigbee Mesh network AODVjr (Ad-Hoc On-Demand Distance Vector Junior, a simplified version of on-demand distance vector routing) is that the source node sends RREQ (routing request), and the neighboring nodes near the source node forward the RREQ, and establish a reverse route based on the optimal Path Cost. When the RREQ reaches the target node, the target node replies with RREP and forwards it back to the source node in unicast mode, and a forward route is established in this process; among them, the key parameter for establishing the route is the Path Cost between neighboring nodes.
[0016] like Figure 1 As shown, the present invention introduces a method of mapping LQI by combining statistical success rate with RSSI to replace the single RSSI mapping LQI, wherein a real-time example involves an optimization method for generating PathCost values between neighboring nodes in a ZigBee network, the optimization method comprising:
[0017] S1. Select a time window T of a certain length and calculate the communication success rate Ct between the node and the neighboring node within the time window T; wherein, the time window T is selected to calculate the communication success rate when the window T is greater than 20 seconds and the data packet interaction reaches more than 10 times.
[0018] S2. The latest communication success rate between each node and its neighboring nodes is calculated by the EWMA statistical formula Pt=λCt+(1-λ)Pt-1, where Pt is the latest statistical success rate, Ct is the statistical success rate in the latest time window, Pt-1 is the previous statistical success rate, and λ is the weight of the statistical success rate in the latest time window. The larger the weight, the stronger the timeliness of the data. Among them, 20%, 25%, and 45% can be recommended as the preferred values for selecting λ.
[0019] S3, when running the AODVjr algorithm to maintain the route, the LQI is calculated based on the latest communication success rate Pt calculated and the RSSI;
[0020] S4. According to the Routing Cost calculation formula Calculate the PathCost used by the AODVjr algorithm.
[0021] Furthermore, the communication success rate Ct between the node and the neighboring nodes in the time window T is calculated by the formula Ct=Tsuccess / Ttotal*100, where Ct is the communication success rate between the node and the neighboring nodes, Tsuccess is the data packet sent successfully in the time window T, and Ttotal is all the data packets sent in the time window T.
[0022] Furthermore, LQI is calculated by the formula LQI=Pt*(Rt-Rmin) / (Rmax–Rmin)*255, where Pt is the success rate obtained by the latest EWMA statistics, Rt is the receiving RSSI of the latest data packet, Rmin is the receiving sensitivity RSSI of the chip, and Rmax is the saturated RSSI of the chip.
[0023] Another embodiment of the present invention relates to an optimization system for generating PathCost values between neighboring nodes in a ZigBee network, which includes a communication success rate calculation module, an EWMA statistical calculation module, an LQI calculation module and a Cost calculation module; the communication success rate calculation module is used to calculate the communication success rate Ct between a node and a neighboring node within a time window T; the EWMA statistical calculation module is used to calculate the latest communication success rate between each node and the neighboring node based on the communication success rate Ct obtained by the communication success rate calculation module and in combination with EWMA statistics; the LQI calculation module is used to calculate the LQI based on the latest communication success rate Pt calculated and RSSI when running the AODVjr algorithm to maintain the route; the Cost calculation module is used to calculate the Path Cost used by the AODVjr algorithm according to the Routing Cost calculation formula.
[0024] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A method for optimizing the generation of PathCost values between neighboring nodes in a ZigBee network, characterized in that: The optimization method comprises: Select a time window T of a certain length and calculate the communication success rate Ct between the node and its neighbor nodes within the time window T; The latest communication success rate between each node and its neighboring nodes is calculated by the EWMA statistical formula Pt=λCt+(1-λ)Pt-1, where Pt is the latest statistical success rate, Ct is the statistical success rate in the latest time window, Pt-1 is the previous statistical success rate, and λ is the weight of the statistical success rate in the latest time window; When the AODVjr algorithm is running to maintain the route, the LQI is calculated based on the latest communication success rate Pt and RSSI. LQI = Pt*(Rt-Rmin) / (Rmax–Rmin)*255, where Pt is the success rate obtained by the latest EWMA statistics, Rt is the receiving RSSI of the latest data packet, Rmin is the receiving sensitivity RSSI of the chip, and Rmax is the saturated RSSI of the chip. According to the Routing Cost calculation formula Calculate the path cost used by the AODVjr algorithm.
2. The optimization method for generating PathCost values between neighboring nodes in a ZigBee network according to claim 1, characterized in that: The communication success rate Ct between the node and the neighboring nodes in the calculation time window T is specifically calculated by the formula Ct=Tsuccess / Ttotal*100, where Ct is the communication success rate between the node and the neighboring nodes, Tsuccess is the data packet sent successfully in the time window T, and Ttotal is all the data packets sent in the time window T.
3. The optimization method for generating PathCost values between neighboring nodes in a ZigBee network according to claim 1, characterized in that: The LQI is calculated using the formula LQI = Pt*(Rt-Rmin) / (Rmax–Rmin)*255, where Pt is the success rate obtained by the latest EWMA statistics, Rt is the receiving RSSI of the latest data packet, Rmin is the receiving sensitivity RSSI of the chip, and Rmax is the saturated RSSI of the chip.
4. An optimization system for generating PathCost values between neighboring nodes in a ZigBee network, characterized by: It includes a communication success rate calculation module, an EWMA statistical calculation module, an LQI calculation module and a Cost calculation module; the communication success rate calculation module is used to calculate the communication success rate Ct between a node and a neighboring node within a time window T; the EWMA statistical calculation module is used to calculate the latest communication success rate between each node and a neighboring node based on the communication success rate Ct obtained by the communication success rate calculation module and in combination with EWMA statistics; The LQI calculation module is used to calculate the LQI according to the latest communication success rate Pt calculated and the RSSI when the AODVjr algorithm is running to maintain the route; the Cost calculation module is used to calculate the Path Cost used by the AODVjr algorithm according to the Routing Cost calculation formula; Select a time window T and calculate the communication success rate Ct between the node and its neighbor nodes within the time window T; The latest communication success rate between each node and its neighboring nodes is calculated by the EWMA statistical formula Pt=λCt+(1-λ)Pt-1, where Pt is the latest statistical success rate, Ct is the statistical success rate in the latest time window, Pt-1 is the previous statistical success rate, and λ is the weight of the statistical success rate in the latest time window; When the AODVjr algorithm is running to maintain the route, the LQI is calculated based on the latest communication success rate Pt and RSSI; LQI = Pt*(Rt-Rmin) / (Rmax–Rmin)*255, where Pt is the success rate obtained by the latest EWMA statistics, Rt is the receiving RSSI of the latest data packet, Rmin is the receiving sensitivity RSSI of the chip, and Rmax is the saturated RSSI of the chip; According to the Routing Cost calculation formula Calculate the path cost used by the AODVjr algorithm.
Citation Information
Patent Citations
Wireless sensor network data transmission method
CN102984780A
Multi-hop ad-hoc-network anti-interference routing method based on link quality factor
CN105407516A
Dynamic wireless resource distribution algorithm based on load balancing
CN108076486A
Routing method, routing device and sensor
CN109600812A
Method and system for realizing global optimization of AODV routing, and medium
CN111614559A
