A method for optimizing the frame length of LoRa ad hoc networks using subtractive clustering fuzzy inference
By dynamically adjusting the time slot parameter Q to be estimated in the LoRa self-organizing network and combining it with the ANFIS model for prediction and optimization, the problems of low time slot utilization and high overall power consumption in the existing technology are solved, and more efficient network performance and data transmission are achieved.
Patent Information
- Application Number
- CN202311603126.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-28
AI Technical Summary
The existing LoRa self-organizing network suffers from low time slot utilization, low network throughput, and high overall power consumption. This is mainly due to the high collision probability and frequent broadcast notifications caused by the time slot selection method of adjusting the estimated time slot parameter Q with a fixed step size in the existing technology.
A LoRa self-organizing network frame length optimization method using subtractive clustering fuzzy inference is proposed. By dynamically adjusting the time slot parameter Q to be estimated, and combining it with the ANFIS model, the time slot parameter is predicted and optimized. The weight function and fuzzy inference system are used to improve the efficiency of time slot resource utilization and reduce the probability of collision.
It significantly improves the utilization rate of time slot resources, reduces the overall power consumption and collision probability of the network, and optimizes network performance and data transmission efficiency.
Smart Images

Figure CN117615435B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of wireless communication technology, wireless ad hoc networks and computing intelligence technology, specifically a method for optimizing the frame length of LoRa ad hoc networks using subtractive clustering fuzzy inference. Background Technology
[0002] In recent years, with the development and popularization of wireless communication technology and the rise of the "Internet of Everything" wave, people have increasingly higher requirements for wireless ad hoc networks. Unlike wireless cellular communication networks, which require fixed base stations and equipment to forward data and provide user services, wireless ad hoc network nodes can freely form networks and communicate without the need for base stations, greatly reducing power consumption and costs and overcoming geographical limitations. Therefore, they are widely used in monitoring fields such as power grids, agriculture, and underground mines. Currently, mainstream IoT communication technologies include Bluetooth, ZigBee, and WiFi. These technologies operate at higher frequencies, resulting in short wavelengths and poor diffraction capabilities. In application scenarios with many obstructions, the signal is significantly reduced, failing to achieve good communication results.
[0003] Low Power Wide Area Network (LPWAN) is an Internet of Things (IoT) technology designed to address the challenges of short transmission distances and high power consumption in IoT communication. LoRa (Long Range) technology, developed by Semtech in the US, is a novel radio spread spectrum modulation technology and a representative of LPWAN. It features low power consumption, long range, and low cost. Furthermore, LoRa operates in the Sub-GHz frequency band, offering stronger diffraction and penetration capabilities, and is widely used in emergency communication and smart monitoring. However, LoRa technology lacks a unified networking scheme and communication protocol, and the standard LoRaWAN protocol has several shortcomings, posing challenges to its promotion and application.
[0004] The anti-collision algorithm in the existing 18000-6C standard protocol is an Aloha algorithm based on the time slot parameter Q to be estimated. It is mainly used in Radio Frequency Identification (RFID) systems to solve the collision problem between tags (terminal nodes). The specific algorithm flow is as follows:
[0005] First, the gateway node sends a "Query" command to start a loop, containing the time slot timing value Q. Upon receiving the "Query" command, the terminal node will operate within the range [0, 2...]. QA random value between -1 and [-1] is selected and loaded into its own counter. Tags with a selected random value of zero should immediately switch to the acknowledgment state; tags with a non-zero value should switch to the arbitration state and wait for either a "QueryRep" (decrement the counter value) or a "QueryAdjust" (reset the estimated time slot parameter Q) command. When the current time slot ends, the gateway node will send a "QueryRep" command to decrement the counter values of all tags, or send a "QueryAdjust" command to set a new time slot timing value Q, in order to re-identify the terminal node.
[0006] The shortcomings and problems of existing technologies:
[0007] (1) Low time slot utilization: Existing technologies mostly adopt a time slot selection method that adjusts the time slot parameter Q to be estimated with a fixed step size, resulting in a total of 2 time slots. Q It is difficult to accurately and quickly adapt to the number of terminal nodes, which can easily lead to a high probability of collisions, and has the problems of low time slot utilization and low network throughput.
[0008] (2) High overall power consumption of self-organizing network: Existing technologies require the estimation time slot parameter Q to be increased or decreased after each time slot ends, resulting in frequent broadcast notifications. Furthermore, all terminal nodes need to repeatedly apply for time slots, leading to high overall power consumption of self-organizing network. Summary of the Invention
[0009] To address the shortcomings of the existing technologies, this invention proposes a subtractive clustering fuzzy inference method for optimizing the frame length of LoRa ad hoc networks. This method aims to improve the utilization efficiency of time slot resources and reduce the probability of collisions, thereby optimizing network performance and data transmission efficiency.
[0010] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0011] The LoRa ad hoc network frame length optimization method based on subtractive clustering fuzzy inference, as described in this invention, is applied to an ad hoc network environment composed of N′ LoRa nodes, where the N′ LoRa nodes include one gateway node and N′-1 terminal nodes; wherein all N′-1 terminal nodes are within the communication range of the gateway node, and the LoRa ad hoc network time slot scheduling includes the following steps:
[0012] Step 1: The gateway node allocates a time slot for the terminal node to join the network in the current i-th frame period;
[0013] Step 1.1: The gateway node broadcasts "Query(Q)" to N′-1 terminal nodes. i The ")" instruction is used to allocate network access for N′-1 terminal nodes in the current i-th frame period. Two time slots of equal size Ts ; where Q i Q represents the time slot parameter to be estimated within the i-th frame period. i The value range of Q is (0, 15]. i Let be a positive integer; let the frame length of the current i-th frame period be...
[0014] Step 1.2: In the current i-th frame period, if any terminal node receives "Query(Q)", i The query command ")" will then be used in Randomly select an integer within the range and store it in its own time slot counter SC;
[0015] Step 2: In the current i-th frame period, the terminal node requests to occupy a time slot;
[0016] Step 2.1: Define the current time slot as the u-th time slot and initialize u = 0; define The pre-adjustment time slot parameters to be estimated are for the u-th time slot within the i-th frame period. It is a floating-point positive number;
[0017] Step 2.2: If any terminal node receives the "QueryRep" reporting command, its own counter SC value is decremented by 1; otherwise, the SC value remains unchanged.
[0018] Step 2.3: Any terminal node checks if its own counter SC value is 0; if it is 0, the corresponding terminal node sends its own ID to the gateway node to request to occupy the u-th time slot; otherwise, it does not send an ID.
[0019] Step 3: In the current i-th frame period, when the u-th time slot ends, the gateway node determines whether an ID was received in the u-th time slot; if no ID was received, the u-th time slot is marked as an idle time slot, and the total number of idle time slots S is set. e,i Increment by 1; if one and only one ID is received, mark the u-th time slot as a successful time slot and increment the total number of successful time slots S. s,i Increment by 1; if two or more IDs are received, mark the u-th slot as a collision slot and increment the total number of collision slots S. c,i Add 1;
[0020] Step 4: Adjust the parameters of the time slot to be estimated based on the current time slot marker. Make preliminary adjustments;
[0021] Step 4.1: Use equation (1) to obtain the weight ω of the u-th time slot in the current i-th frame period. i,u :
[0022] ω i,u= a·log2(b·S c,i +c·S e,i +d·S s,i +κ) (1)
[0023] In equation (1), a and κ are positive parameters; b, c, and d are three weighting coefficients;
[0024] Step 4.2: Use equation (2) to obtain the pre-adjustment time slot parameters for the (u+1)th time slot in the current i-th frame period. And add it to the historical database;
[0025]
[0026] In equation (2), c′ is the adjustment step size;
[0027] Step 4.3: The gateway node determines whether the end condition of the i-th frame period has been met. If it has, then execute step 4.4; otherwise, proceed to step 2.2 for sequential execution.
[0028] Step 4.4: Based on the current pre-adjusted time slot parameters to be estimated Q i Update, make Where round() is the floor function;
[0029] Step 5: Use the ANFIS model to estimate the time slot parameter sequence Q1, Q2, ..., Q for the first i frame periods. i-1 Q i Perform training and obtain the predicted slot count for the (i+1)th frame period.
[0030] Step 5.1: Extract the training sample set based on the relevance metric;
[0031] Step 5.1.1: From the time slot parameter sequence Q1, Q2, ..., Q... i-1 Q i Take the N most recent consecutive time slot parameter sequences to be estimated as the original sample set V, where N is a positive integer. Then, take the N consecutive time series {Q}. i-N+1 Q i-N+2 ,…,Q i-1 Q i} is decomposed into M-dimensional N-M+1 vectors V = {V1, V2, ..., V} k ,…,V N-M+1}; where V k Represents the k-th vector in M dimensions;
[0032] Let the first NM vectors {V1,V2,…,V...} h ,…,VN-M Each vector in {} is paired with the first dimension of its next vector, resulting in NM paired vectors {(V1,Q} i-N+M+1 ),(V2,Q i-N+M+2 ),…,(V N-M Q i )};V h Represents the h-th vector;
[0033] Step 5.1.2: Calculate the (N-M+1)th vector V respectively. N-M+1 With the first NM vectors {V1,V2,…,V k ,…,V N-M The correlation coefficient {ρ} h |h=1,2,…,NM}, where ρ h V represents the (N-M+1)th vector. N-M+1 With the h-th vector V k The correlation coefficient;
[0034] From NM correlation coefficients, select the K vectors with the highest correlation coefficients and correlate them with V. N-M+1 Form K sample pairs respectively, and obtain the training sample set S = {s} T |T=1,…,K},s T Represents the T-th vector and V N-M+1 The Tth sample pair is formed, 1≤T≤K, where T and K are positive integers;
[0035] Step 5.2: Use subtractive clustering to cluster the training sample set S, determine the number and distribution of membership functions in the ANFIS model, and set the number of fuzzy rules.
[0036] Step 5.2.1: Define the current iteration number as L, and initialize L = 1. Initialize the maximum iteration number as L. max The stopping threshold is y′;
[0037] Define s L,p s L,q Let p and q be the p-th and q-th sample pairs in the L-th iteration of the training sample set S, respectively, where p,q∈{1,2,…,K};
[0038] Step 5.2.2: Calculate the p-th sample pair s in the L-th iteration using equation (4). L,p density D L,p Thus, the density of all sample pairs in the Lth iteration is obtained:
[0039]
[0040] In equation (4), r1 is the effective neighborhood radius parameter set for the cluster center;
[0041] Step 5.2.3: Denote the density of the largest sample pair in the Lth iteration as D. L,cent and D L,cent The corresponding sample pair is used as the cluster center s in the Lth iteration. L,cent ;
[0042] The p-th sample pair s in the L-th iteration is calculated according to equation (5). L,p Update density D′ L,p :
[0043]
[0044] In equation (5), r2 is the neighborhood range parameter of the cluster center;
[0045] Step 5.2.4: Assign L+1 to L, then determine if L < L. max Or D L,cent / D 1,cent Check if ≥y′ holds true. If it does, proceed to step 5.2.2; otherwise, output the cluster center s of the Lth iteration. L,cent ;D 1,cent This represents the maximum density in the first iteration;
[0046] Step 5.2.5: Let the number of optimal fuzzy rules be n, and initialize n = L;
[0047] Let c be the i′ center and the i′ width of the Gaussian membership function. i′ a i′ ;
[0048] The cluster centers s of the i′th iteration i′,cent c, the i′th center of the Gaussian membership function i′ ;
[0049] Take the i′-th center c of the Gaussian membership function i′ The width a is half the distance to its nearest cluster center. i′ and with c i′ a i′ These are respectively used as antecedent parameters of the ANFIS model; i′=1,2,…n;
[0050] Step 5.3: Based on the ANFIS model, analyze {Q} i-N+1 Q i-N+2 ,…,Q i-1 Q i Modeling is performed to obtain the predicted slot count for the (i+1)th frame period using equation (6).
[0051]
[0052] In equation (6), Let Q represent the j′ distinct rule parameter in the i′-th dimension, and use it as the consequent parameter of the ANFIS model. i-j′+1 Let j′ represent the time slot parameters to be estimated within the (ij′+1)th frame period, where j′ = 1, 2, ..., M;
[0053] Step 6: Convert the (N-M+1)th vector V in M dimensions N-M+1 ={Q i-M+1 ,…,Q i Substituting into equation (6), we obtain the predicted slot count for the (i+1)th frame period. Therefore, the estimated time slot parameter Q for the (i+1)th frame period can be obtained using equation (7). i+1 :
[0054]
[0055] In equation (7), ω′ is the weighting factor;
[0056] Step 7, if |Q i+1 -Q i If | > 1, then assign i+1 to i and go to step 1; otherwise, assign Q. i+1 As the optimal time slot parameter, let it be denoted as Q. * Proceed to step 8;
[0057] Step 8: Data transmission stage;
[0058] Step 8.1: The gateway node broadcasts "Query(Q)" to N′-1 terminal nodes. * The ")" command is used to specify the time slot parameter Q to be estimated. * and frame length
[0059] Step 8.2: N′-1 terminal nodes determine the order of execution based on "Query(Q)". * The instruction ")" is in Randomly select an integer {v} within the range m |m=1,2,…,N′-1}, and stored in its own counter SC;
[0060] Step 8.3, the N′-1 terminal nodes are respectively in the corresponding {v m +1|m=1,2,…,N′-1} time slots occupy the channel for data transmission; where, v m This represents the integer selected by the m-th terminal node.
[0061] The LoRa ad hoc network slot scheduling method based on statistical learning dynamic frames described in this invention is also characterized in that step 4.3 includes:
[0062] Step 4.3.1: The gateway node broadcasts the “QueryRep” reporting instruction to N′-1 terminal nodes and assigns u+1 to u to start the next time slot;
[0063] Step 4.3.2: Define an ending threshold ψ and determine... If the condition is met, it indicates that the end threshold has been reached, and step 4.3.3 is executed; otherwise, proceed to step 2.2 for sequential execution.
[0064] Step 4.3.3, Gateway Judgment Whether it is true or false; if it is true, then it means... All time slots have been marked. The current i-th frame period ends, and step 4.4 is executed. Otherwise, proceed to step 2.2 for sequential execution.
[0065] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the LoRa ad hoc network time slot scheduling method, and the processor is configured to execute the program stored in the memory.
[0066] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the LoRa self-organizing network time slot scheduling method.
[0067] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0068] 1. Reduced overall power consumption of self-organizing networks: This invention significantly improves the standard Q-value algorithm. Based on the time slot marker value, a weight function is used to increase or decrease the time slot parameter Q to be estimated, making the adjustment of the time slot parameter Q more precise and avoiding frequent changes in frame length. Q The frequent broadcast notifications to all terminal nodes to re-request time slots not only reduce the gateway's computational load and broadcast power consumption, but also greatly reduce the power consumption of all terminal nodes repeatedly requesting time slots.
[0069] 2. Reduce the probability of time slot collisions: This invention uses ANFIS to predict the time slot parameter Q to assist in adjusting Q, which can significantly improve its estimation accuracy and reduce the total number of time slots to 2. Q It more accurately adapts to the number of terminal nodes, thereby reducing the probability of time slot collisions. Attached Figure Description
[0070] Figure 1 This is a flowchart of the main program of the present invention;
[0071] Figure 2 This is a schematic diagram of the LoRa self-organizing network of the present invention;
[0072] Figure 3 This is a schematic diagram illustrating the markings of the three time slots of the present invention;
[0073] Figure 4 For the present invention ω i,u Relationship function graph;
[0074] Figure 5 This is a diagram of the five-layer ANFIS network of the present invention;
[0075] Figure 6 This is a comparison chart of time slot utilization for various LoRaWAN protocols in this invention. Detailed Implementation
[0076] In this embodiment, a LoRa ad hoc network frame length optimization method based on subtractive clustering fuzzy inference optimizes time slot scheduling by dynamically adjusting the time slot parameters to be estimated. First, the gateway node randomly allocates 2... Q Each terminal node randomly occupies a time slot for data transmission, completing one frame cycle operation. Then, after acquiring sufficient samples, a subtractive clustering method is used to process the sequence of time slot parameters Q to be estimated, obtaining the rules and membership parameters for the adaptive neural network fuzzy inference system. Finally, an inference system is established to predict Q, improving the estimation accuracy of Q and achieving a precise match between the total number of time slots and the number of terminal nodes, thereby achieving a high time slot utilization rate. Figure 1 As shown, this method is applied to an ad hoc network environment consisting of N LoRa nodes, including one gateway node and N-1 terminal nodes. All N-1 terminal nodes are within the communication range of the gateway node. The LoRa ad hoc network time slot scheduling includes the following steps:
[0077] Step 1, as follows Figure 2 As shown, the gateway node allocates a time slot for the terminal node to join the network in the current i-th frame period;
[0078] Step 1.1: The gateway node broadcasts "Query(Q)" to N′-1 terminal nodes. i The ")" instruction is used to allocate network access for N′-1 terminal nodes in the current i-th frame period. Two time slots of equal size T s ; where Q i Q represents the time slot parameter to be estimated within the i-th frame period. i The value range of Q is (0, 15]. i Let be a positive integer; let the frame length of the current i-th frame period be...
[0079] Step 1.2: In the current i-th frame period, if any terminal node receives "Query(Q)", i The query command ")" will then be used in Randomly select an integer within the range and store it in its own time slot counter SC;
[0080] Step 2: In the current i-th frame period, the terminal node requests to occupy a time slot;
[0081] Step 2.1: Define the current time slot as the u-th time slot and initialize u = 0; define The pre-adjustment time slot parameters to be estimated are for the u-th time slot within the i-th frame period. It is a floating-point positive number;
[0082] Step 2.2: If any terminal node receives the "QueryRep" reporting command, its own counter SC value is decremented by 1; otherwise, the SC value remains unchanged.
[0083] Step 2.3: Any terminal node checks if its own counter SC value is 0; if it is 0, the corresponding terminal node sends its own ID to the gateway node to request to occupy the u-th time slot; otherwise, it does not send an ID.
[0084] Step 3, as follows Figure 3 As shown, in the current i-th frame period, when the u-th time slot ends, the gateway node determines whether an ID was received in the u-th time slot; if no ID was received, the u-th time slot is marked as an idle time slot, and the total number of idle time slots S is set. e,i Increment by 1; if one and only one ID is received, mark the u-th time slot as a successful time slot and increment the total number of successful time slots S. s,i Increment by 1; if two or more IDs are received, mark the u-th slot as a collision slot and increment the total number of collision slots S. c,i Add 1;
[0085] Step 4: Adjust the parameters of the time slot to be estimated based on the current time slot marker. Make preliminary adjustments;
[0086] Step 4.1: Use equation (1) to obtain the weight ω of the u-th time slot in the current i-th frame period. i,u :
[0087]
[0088] In equation (1), a and κ are positive parameters; b, c, and d are three weighting coefficients; in this embodiment, a and κ are set to 0.2 and 1 respectively; b, c, and d are set to 0.5, resulting in... Figure 4 As shown ω i,u-u relationship diagram;
[0089] Step 4.2: Use equation (2) to obtain the pre-adjustment time slot parameters for the (u+1)th time slot in the current i-th frame period. And add it to the historical database;
[0090]
[0091] In equation (2), c′ is the adjustment step size.
[0092] Step 4.3: The gateway node determines whether the end condition of the i-th frame period has been met;
[0093] Step 4.3.1: The gateway node broadcasts the “QueryRep” reporting instruction to N′-1 terminal nodes and assigns u+1 to u to start the next time slot;
[0094] Step 4.3.2: Define an ending threshold ψ and determine... If the condition is met, it indicates that the end threshold has been reached, and step 4.3.3 is executed; otherwise, proceed to step 2.2 for sequential execution.
[0095] Step 4.3.3, Gateway Judgment Whether it is true or false; if it is true, then it means... All time slots have been marked. The current i-th frame period ends, and step 4.4 is executed; otherwise, proceed to step 2.2 for sequential execution.
[0096] Step 4.4: Based on the current time slot parameters to be estimated Q i Update, make The round() function is used for rounding down the integers.
[0097] Step 5: Use the ANFIS model to estimate the time slot parameter sequence Q1, Q2, ..., Q for the first i frame periods. i-1 Q i Perform training and obtain the predicted slot count for the (i+1)th frame period.
[0098] Step 5.1: Extract the training sample set based on the relevance metric;
[0099] Step 5.1.1: From the time slot parameter sequence Q1, Q2, ..., Q... i-1 Q i Take the N most recent consecutive time slot parameter sequences to be estimated as the original sample set V, where N is a positive integer. Then, take the N consecutive time series {Q}. i-N+1 Q i-N+2 ,…,Q i-1 Qi} is decomposed into M-dimensional N-M+1 vectors V = {V1, V2, ..., V} k ,…,V N-M+1}; where V k Represents the k-th vector in M dimensions;
[0100] Let the first NM vectors {V1,V2,…,V...} h ,…,V N-M Each vector in {} is paired with the first dimension of its next vector, resulting in NM paired vectors {(V1,Q} i-N+M+1 ),(V2,Q i-N+M+2 ),…,(V N-M Q i )};V h This represents the h-th vector.
[0101] Step 5.1.2: Calculate the (N-M+1)th vector V respectively. N-M+1 With the first NM vectors {V1,V2,…,V k ,…,V N-M The correlation coefficient {ρ} h |h=1,2,…,NM}, where ρ h V represents the (N-M+1)th vector. N-M+1 With the h-th vector V k The correlation coefficient;
[0102] From NM correlation coefficients, select the K vectors with the highest correlation coefficients and correlate them with V. N-M+1 Form K sample pairs respectively, and obtain the training sample set S = {s} T |T=1,…,K},s T Represents the T-th vector and V N-M+1 The Tth sample pair is formed, 1≤T≤K, where T and K are positive integers.
[0103] Step 5.2: Use subtractive clustering to cluster the training sample set S, determine the number and distribution of membership functions in the ANFIS model, and set the number of fuzzy rules.
[0104] Step 5.2.1: Define the current iteration number as L, and initialize L = 1. Initialize the maximum iteration number as L. max The stopping threshold is y′;
[0105] Define s L,p s L,q Let p and q be the p-th and q-th sample pairs in the L-th iteration of the training sample set S, respectively, where p,q∈{1,2,…,K}.
[0106] Step 5.2.2: Calculate the p-th sample pair s in the L-th iteration using equation (4). L,p density D L,p Thus, the density of all sample pairs in the Lth iteration is obtained:
[0107]
[0108] In equation (4), r1 is the effective neighborhood radius parameter set for the cluster center.
[0109] Step 5.2.3: Denote the density of the largest sample pair in the Lth iteration as D. L,cent and D L,cent The corresponding sample pair is used as the cluster center s in the Lth iteration. L,cent ;
[0110] The p-th sample pair s in the L-th iteration is calculated according to equation (5). L,p Update density D′ L,p :
[0111]
[0112] In equation (5), r2 is the neighborhood range parameter of the cluster center.
[0113] Step 5.2.4: Assign L+1 to L, then determine if L < L. max Or D L,cent / D 1,cent Check if ≥y′ holds true. If it does, proceed to step 5.2.2; otherwise, output the cluster center s of the Lth iteration. L,cent ;D 1,cent This represents the maximum density in the first iteration.
[0114] Step 5.2.5: Let the number of optimal fuzzy rules be n, and initialize n = L;
[0115] Let c be the i′ center and the i′ width of the Gaussian membership function. i′ a i′ ;
[0116] The cluster centers s of the i′th iteration i′,cent c, the i′th center of the Gaussian membership function i′ ;
[0117] Take the i′-th center c of the Gaussian membership function i′ The width a is half the distance to its nearest cluster center. i′ and with c i′ a i′ These are respectively used as antecedent parameters of the ANFIS model; i′=1,2,…n.
[0118] Step 5.3, according to Figure 5 The ANFIS model shown is for {Q} i-N+1 Q i-N+2 ,…,Q i-1 Q i Modeling is performed to obtain the predicted slot count for the (i+1)th frame period using equation (6).
[0119]
[0120] In equation (6), Let Q represent the j′ distinct rule parameter in the i′-th dimension, and use it as the consequent parameter of the ANFIS model. i-j′+1 Let j′ represent the time slot parameters to be estimated in the (ij′+1)th frame period, where j′ = 1, 2, ..., M.
[0121] Step 6: Convert the (N-M+1)th vector V in M dimensions N-M+1 ={Q i-M+1 ,…,Q i Substituting into equation (6), we obtain the predicted slot count for the (i+1)th frame period. Therefore, the estimated time slot parameter Q for the (i+1)th frame period can be obtained using equation (7). i+1 :
[0122]
[0123] In equation (7), ω′ is the weighting factor.
[0124] Step 7, if |Q i+1 -Q i If | > 1, then assign i+1 to i and go to step 1; otherwise, assign Q. i+1 As the optimal time slot parameter, let it be denoted as Q. * Proceed to step 8.
[0125] Step 8: Data transmission stage;
[0126] Step 8.1: The gateway node broadcasts "Query(Q)" to N′-1 terminal nodes. * The ")" command is used to specify the time slot parameter Q to be estimated. * and frame length
[0127] Step 8.2: N′-1 terminal nodes determine the order of execution based on "Query(Q)". * The instruction ")" is in Randomly select an integer {v} within the range m|m=1,2,…,N′-1}, and stored in its own counter SC;
[0128] Step 8.3, the N′-1 terminal nodes are respectively in the corresponding {v m +1|m=1,2,…,N′-1} time slots occupy the channel for data transmission; where, v m This represents the integer selected by the m-th terminal node.
[0129] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0130] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0131] To test the performance of the method of this invention, a series of experiments were conducted, and it was compared with the existing mainstream LoRa self-organizing network MAC protocol, with a focus on comparing the system time slot utilization. The LoRa gateway and terminal node adopted the SX1278 LoRa chip, and its transmit current, receive current and sleep current were all standard operating values, as shown in Table 1.
[0132] Table 1 Experimental parameters
[0133]
[0134] The method proposed in this invention is abbreviated as ANFIS-Q (Adaptive Neuro-Fuzzy Inference System with Q-value Algorithm). Under different network capacities, the time slot utilization rates of six LoRaWAN protocols—ANFIS-Q, DRDS-TDMA (Time Division Multiple Address with Dynamic Re-transmission and Differential Service mechanism), MPSL (Multi-priority Slot Allocation Algorithm), QA (Q-value Algorithm), QADWP (Q-value Algorithm for Double Weight Parameter), and QAARN (Q-value Algorithm by Added Random Number)—were compared. The results are as follows: Figure 6As shown, the time slot utilization rate of QA, QADWP, and QAARN protocols is approximately 35%; MPSL and DRDS-TDMA protocols can achieve a time slot utilization rate of 76.7% when the number of nodes is small, but the time slot utilization rate drops significantly as the number of nodes increases; the ANFIS-Q method of this invention maintains a time slot utilization rate of around 90%, demonstrating a clear advantage.
Claims
1. A method for optimizing the frame length of LoRa ad hoc networks using subtractive clustering fuzzy inference, characterized in that, It is applied to by In a self-organizing network environment composed of LoRa nodes Each LoRa node contains one gateway node and There are 10 terminal nodes; among them... All terminal nodes are within the communication range of the gateway node, and the LoRa self-organizing network time slot scheduling includes the following steps: Step 1, the gateway node in the current... Each frame period is a time slot allocated for terminal nodes to join the network; Step 1.1, the gateway node directs... Each terminal node broadcasts "Query( The ")" instruction is used to... The terminal node is currently in the [number]th [stage]. Network access allocation per frame period Two time slots of equal size ;in, Indicates the first The time slot parameters to be estimated within each frame period The range of values is , Let be a positive integer; let the current number be... The frame length of each frame period is ; Step 1.2, in the current... In each frame period, if any terminal node receives "Query( The query command ")" will then be used in Randomly select an integer within the range and store it in its own time slot counter SC; Step 2, in the current number In each frame period, the terminal node requests and occupies a time slot; Step 2.1: Define the current time slot as the [number]th [time slot]. Each time slot, and initialized ;definition For the first Pre-adjustment of the estimated time slot parameters for the u-th time slot within a frame period It is a floating-point positive number; Step 2.2: If any terminal node receives the "QueryRep" reporting command, its own counter SC value is decremented by 1; otherwise, the SC value remains unchanged. Step 2.3: Any terminal node checks if its own counter SC value is 0; if it is 0, the corresponding terminal node sends its own ID to the gateway node to request the right to occupy the first... One time slot; otherwise, no transmission. Step 3, in the current number In the nth frame period, when the At the end of the time slot, the gateway node determines that in the first time slot... If an ID is not received within the specified time slot, then proceed with the next time slot. Each time slot is marked as an idle time slot, and the total number of idle time slots is... Add 1; if only one ID is received, then add the first one. Each time slot is marked as a successful time slot, and the total number of successful time slots is... Add 1; if two or more IDs are received, then add the first one. Each gap is marked as a collision time slot, and the total number of collision time slots is... Add 1; Step 4: Adjust the parameters of the time slot to be estimated based on the current time slot marker. Make preliminary adjustments; Step 4.1: Use equation (1) to obtain the current number of... The first frame period Weight of each time slot : (1) In equation (1), a, is a positive parameter; b, c, and d are three weighting coefficients; Step 4.2: Use equation (2) to obtain the current number of... The first frame period Pre-adjustment of time slot parameters to be estimated for each time slot And add it to the historical database; (2) In equation (2), To adjust the step size; Step 4.3: The gateway node determines whether the threshold has been reached. If the end condition of each frame period is met, proceed to step 4.4; otherwise, proceed to step 2.2 and execute sequentially. Step 4.4: Based on the current pre-adjusted time slot parameters to be estimated right Update, make ;in round () is the floor function; Step 5: Use the ANFIS model to analyze the previous... The sequence of time slot parameters to be estimated for each frame period Conduct training and obtain the first Slot count prediction value per frame period ; Step 5.1: Extract the training sample set based on the relevance metric; Step 5.1.1: From the sequence of time slot parameters to be estimated Retrieve the most recent A continuous sequence of time slot parameters to be estimated is used as the original sample set. ,in, If it is a positive integer, then A continuous time series Decomposed into Vie vectors ;in, express Victor k One vector; Before vectors Each vector in the vector is paired with the first dimension of its next vector to obtain... Paired vectors ; Indicates the first h One vector; Step 5.1.2: Calculate the first... vectors Compared to the past vectors correlation coefficient ,in, Indicates the first vectors With the h vectors The correlation coefficient; from Take the highest correlation coefficient from the three correlation coefficients. Each vector is respectively related to Each of the following is composed of 100 sample pairs, and obtain the training sample set. , Indicates the first vectors and The first of the composition One sample pair, , , It is a positive integer; Step 5.2: Apply subtractive clustering to the training sample set. Clustering is performed to determine the number and distribution of membership functions in the ANFIS model, and the number of fuzzy rules is set. Step 5.2.1: Define the current iteration number as... and initialize The initial maximum number of iterations is The stopping threshold is ; definition , Training sample set The Middle The iteration of the ... The first sample pair, the first 10 sample pairs, of which ; Step 5.2.2: Calculate the first step using equation (4). The iteration of the ... a sample pair density Thus, the first Density of all sample pairs in the next iteration: (4) In equation (4), It is the effective neighborhood radius parameter set for the cluster centers; Step 5.2.3, the first The maximum density among all sample pairs in the next iteration is denoted as . and will The corresponding sample pair is used as the first Cluster centers in the next iteration ; Calculate the first according to formula (5) The iteration of the ... a sample pair update density : (5) In equation (5), It is the neighborhood parameter of the cluster center; Step 5.2.4, let Assign to Then judge or Check if the condition is true. If true, proceed to step 5.2.2; otherwise, output the result. Cluster centers in the next iteration ; This represents the maximum density in the first iteration; Step 5.2.5: Let the optimal number of fuzzy rules be... ,initialization ; Let the Gaussian membership function be of the th order. The center and the first Each width is respectively , ; The first Cluster centers in the next iteration As the Gaussian membership function, the first individual centers ; Take the first Gaussian membership function individual centers Half the distance to its nearest cluster center is taken as the first width and with , These are respectively used as antecedent parameters of the ANFIS model; ; Step 5.3: Based on the ANFIS model... Modeling is performed to obtain the first equation using equation (6). +1 frame period slot count prediction value : (6) In equation (6), , Indicates the first The first dimension Different rule parameters are used as consequent parameters in the ANFIS model. Indicates the first The time slot parameters to be estimated within each frame period ; Step 6, Victor vectors Substituting into equation (6), we get the first... Slot count prediction value per frame period Therefore, using equation (7), we can obtain the first... The time slot parameters to be estimated for each frame period : (7) In equation (7), It is a weighting factor; Step 7, if Then Assign to Then, proceed to step 1; otherwise, As the optimal time slot parameter, it is denoted as Proceed to step 8; Step 8: Data transmission stage; Step 8.1, the gateway node directs... Each terminal node broadcasts "Query( The ")" command is used to specify the time slot parameters to be estimated. and frame length ; Step 8.2 Each terminal node is based on "Query( The instruction ")" is in Randomly select an integer within the range And store it in its own counter SC; Step 8.3 The terminal nodes are respectively in the corresponding number 1 Each time slot occupies a channel for data transmission; among them... Indicates the first m The integer selected by each terminal node.
2. The LoRa self-organizing network frame length optimization method based on subtractive clustering fuzzy inference according to claim 1, characterized in that, Step 4.3 includes: Step 4.3.1, the gateway node directs... Each terminal node broadcasts a "QueryRep" reporting command and will... Assign to To begin the next time slot; Step 4.3.2: Define an end threshold. and judge If the condition is met, it indicates that the end threshold has been reached, and step 4.3.3 is executed; otherwise, proceed to step 2.2 for sequential execution. Step 4.3.3, Gateway Judgment Whether it is true or false; if it is true, then it means... All time slots have been marked, the current slot is number 1. Once the frame period ends, proceed to step 4.4; otherwise, proceed to step 2.2 for sequential execution.
3. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the LoRa self-organizing network frame length optimization method of subtractive clustering fuzzy inference as described in claim 1 or 2, and the processor is configured to execute the program stored in the memory.
4. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program, when run by the processor, executes the steps of the LoRa self-organizing network frame length optimization method of subtractive clustering fuzzy inference as described in claim 1 or 2.
Citation Information
Patent Citations
Data frame distribution method and device and data transmission method and device
CN105898873A
LoRa ad hoc network time slot scheduling method for statistical learning of dynamic frames
CN116828604A
