CN114928415B - Multi-parameter networking method based on edge computing gateway link quality evaluation - Google Patents

Multi-parameter networking method based on edge computing gateway link quality evaluation Download PDF

Info

Publication number
CN114928415B
CN114928415B CN202210614999.3A CN202210614999A CN114928415B CN 114928415 B CN114928415 B CN 114928415B CN 202210614999 A CN202210614999 A CN 202210614999A CN 114928415 B CN114928415 B CN 114928415B
Authority
CN
China
Prior art keywords
link quality
gateway
quality evaluation
data
communication
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.)
Active
Application number
CN202210614999.3A
Other languages
Chinese (zh)
Other versions
CN114928415A (en
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.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
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 Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202210614999.3A priority Critical patent/CN114928415B/en
Publication of CN114928415A publication Critical patent/CN114928415A/en
Application granted granted Critical
Publication of CN114928415B publication Critical patent/CN114928415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/336Signal-to-interference ratio [SIR] or carrier-to-interference ratio [CIR]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Electromagnetism (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a multi-parameter networking method based on edge computing gateway link quality evaluation, which comprises the following steps: collecting sample data and preprocessing the sample data; constructing a link quality evaluation model based on an AWOA-BP neural network, inputting preprocessed sample data into the link quality evaluation model for training until an output error is reduced to an expected degree or a set learning iteration number is reached, and finishing training to obtain the trained link quality evaluation model; an edge computing-based LoRa network system is constructed by adopting a mode of combining Carrier Sense Multiple Access (CSMA) and Time Division Multiple Access (TDMA) access; performing real-time link quality evaluation on the LoRa network based on the trained link quality evaluation model, and identifying the change of the link quality; the radio frequency parameters of the LoRa network are adaptively updated based on the change of the link quality, so that the link quality and the resource utilization rate of the LoRa network are improved.

Description

Multi-parameter networking method based on edge computing gateway link quality evaluation
Technical Field
The invention belongs to the field of wireless communication, and particularly relates to a multi-parameter networking method based on edge computing gateway link quality evaluation.
Background
Long Range Radio (Long Range Radio) belongs to a Low-Power Wide Area Network (LPWAN) technology, is mainly used in a multi-node, long-distance and Low-Power-consumption application field, and is a technology which is of great interest in the field of global communication research. LoRa is a typical emerging technology of the internet of things supporting large-scale low-rate transmission and long-distance low power consumption, and compared with the same type of wireless communication technology, loRa has obvious advantages in coverage area, cruising ability, use cost and the like. In communication, channel resources, time slot resources, energy resources and the like are limited, so that the optimal utilization of the resources is realized, and the problems of improving the network capacity and the throughput are urgently needed to be solved. The existing LoRa networking scheme is designed on the basis of the protocol of the LoRaWAN, and the consideration on a time application scene is lacked. In the prior art, although reference values of radio frequency parameters and link characteristics thereof are provided, in practical application, the influence of fluctuation of a wireless link on the link characteristics cannot be predicted, the link characteristics are critical to communication performance, and the design and implementation of a higher-layer protocol are influenced. Aiming at various interferences existing in the LoRa link, evaluating the link quality through edge calculation at the gateway, identifying the link change, and realizing the adaptive update of the radio frequency parameters becomes a difficult problem at present, and a method is needed to solve the problem.
Disclosure of Invention
The invention aims to provide a multi-parameter networking method based on edge computing gateway link quality evaluation, so as to solve the problems in the prior art.
In order to achieve the above object, the present invention provides a multi-parameter networking method based on edge computing gateway link quality evaluation, which comprises:
collecting sample data and preprocessing the sample data;
constructing a link quality evaluation model based on an AWOA-BP neural network, inputting the preprocessed sample data into the link quality evaluation model for training until the output error is reduced to an expected degree or reaches a set learning iteration number, and finishing training to obtain the trained link quality evaluation model;
an edge computing-based LoRa network system is constructed by adopting a mode of combining Carrier Sense Multiple Access (CSMA) and Time Division Multiple Access (TDMA) access;
performing real-time link quality evaluation on the LoRa network based on the trained link quality evaluation model, and identifying the change of link quality;
and carrying out self-adaptive updating on the radio frequency parameters of the LoRa network based on the change of the link quality.
Optionally, the sample data includes: receiving signal strength RSSI, signal-to-noise ratio SNR and packet loss rate PLR, wherein the PLR is obtained by calculation based on the RSSI and the SNR.
Optionally, the process of preprocessing the sample data includes: filtering the RSSI and the SNR by adopting a Kalman filtering method.
Optionally, the training of the link quality assessment model includes:
self-adaptively adjusting the weight based on the current whale population distribution;
and adaptively adjusting the search strategy based on the fitness probability threshold of the current whale individual.
Optionally, in the process of constructing an edge-computation-based LoRa network system by combining CSMA and TDMA access:
before information transmission, the CSMA reduces communication conflict through a channel monitoring and random back-off mode, wherein the access mode of the CSMA is access through a competition mode;
and dividing time slots through the TDMA, distributing channel resources of multiple nodes based on the divided time slots, and enabling the nodes to occupy channels in respective time slots for communication in a sampling period of the nodes.
Optionally, the process of constructing the LoRa network system based on edge computing by using a combination of CSMA and TDMA access further includes: the LoRa network system adopts a star structure, the star structure comprises a plurality of gateways and a plurality of nodes, and the gateways comprise control sub-gateways, communication sub-gateways and gateway MCU;
and performing node distribution through the control sub-gateway, requesting the receiving and responding of data frames, receiving a data packet through the communication sub-gateway, sending the data packet to the gateway MCU, and performing storage, forwarding and edge calculation on the data packet through the gateway MCU, wherein the data packet comprises a distribution request packet, a synchronization request packet and a periodic sampling data packet.
Optionally, during the process of adaptively updating the radio frequency parameter of the LoRa network system based on the change of the link quality, performing edge calculation on the change of the link quality through the gateway MCU to obtain a radio frequency parameter update instruction;
sending the radio frequency parameter updating instruction to the control sub-gateway, the communication sub-gateway and the node, and updating corresponding radio frequency parameters, wherein the radio frequency parameters include: frequency and spreading factor, transmit power, and bandwidth.
The invention has the technical effects that:
(1) Aiming at the mapping relation among RSSI, SNR and PLR, an improved whale algorithm-based optimized BP neural network is provided to construct a link quality evaluation model. By the aid of the self-adaptive weight and the search strategy, the overall search capacity and the convergence rate of the whale algorithm are improved, the optimized weight and the optimized threshold are given to the BP neural network for training, and accuracy of model prediction is improved.
(2) Aiming at various interferences existing in the LoRa link, the link quality is evaluated at the gateway through edge calculation, the link change is identified, the self-adaptive updating of the radio frequency parameters is realized, and the link quality and the resource utilization rate of the LoRa network are improved.
(3) The multi-module LoRa gateway system based on edge computing is designed, management of terminal equipment and edge computing of link quality are achieved, the constraint of a network state is avoided, the stability of the LoRa network is improved, and meanwhile, online monitoring and management are set for the terminal based on the cloud platform of the Internet of things.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a schematic diagram of an AWOA evolutionary curve in an embodiment of the present invention;
FIG. 2 is a comparison graph of predicted values and actual values in an embodiment of the present invention, in which (a) is a schematic diagram of predicted values and actual values, and (b) is a schematic diagram of errors of predicted values and actual values;
FIG. 3 is a system block diagram in an embodiment of the invention;
FIG. 4 is a schematic diagram of a frequency hopping process according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a transmission power update procedure according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a bandwidth updating process according to an embodiment of the present invention;
FIG. 7 is a flowchart of a node program in an embodiment of the present invention;
fig. 8 is a flowchart of a communication sub-gateway procedure in an embodiment of the present invention;
FIG. 9 is a flowchart of a gateway MCU routine in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an LoRa networking protocol in the embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Aiming at the problems that the LoRa network is unreasonable in resource distribution and cannot identify link change in various environments, the embodiment provides a networking method based on edge calculation, a link quality evaluation model based on an AWOA-BP neural network is constructed, the change of the link quality is identified through real-time link quality evaluation, radio frequency parameter self-adaptive updating is carried out, and the link quality and the resource utilization rate of communication are improved.
The embodiment provides a multi-parameter networking method based on edge computing gateway link quality evaluation, which includes:
the evaluation of the LoRa link quality is a key index for judging whether the communication network is stable or not. Through researching the characteristics of the LoRa link, the relationship existing among RSSI, SNR and PLR of LoRa communication is analyzed, and a proper link quality evaluation model is constructed. The construction process is as follows:
the LoRa communication test uses an SX1276 radio frequency transceiver, and data packets are sent to a receiving end at a fixed position at a transmitting end with the transmitting power of 20dBm to collect data. The rf parameters of the LoRa of this test are set as shown in table 1.
TABLE 1
Figure BDA0003673913120000051
In each group of tests, a sending end continuously sends 500 data packets, and a receiving end records RSSI and SNR when receiving the data packets each time and calculates PLR of the data packets. For convenience and statistics of PLR, the scale is increased by a factor of 100 during the calculation. In order to ensure the reliability of the data, the test is carried out in an open place. Continuously changing the distance between the transmitting end and the receiving end, and counting 120 groups of data. During testing, it is found that the RSSI and SNR measured by each group of data are not fixed values, and jitter occurs, so that the data need to be filtered to reduce noise and interference to be used as more accurate evaluation parameters.
The filtering effect is judged by taking the variance as a standard, and the smaller the variance is, the more stable the filtered signal is, and the better the filtering effect is. Through variance comparison of the 3 filtering methods in the table 2, it can be known that the variance of kalman filtering is small, and the deviation of the filtered signal from the original signal is small, so that the filtering correction is performed on the SNR and RSSI values by using kalman filtering in the invention. When a packet loss event occurs, link parameters are small, so that the missing value is filled by the minimum value after filtering.
TABLE 2
Figure BDA0003673913120000061
In the test, when the SNR is less than-25 dB or the RSSI is less than-125 dBm, the packet loss rate is up to more than 30%, and the packet loss rate is randomly changed, so that the link quality is directly judged to be poor. When the SNR is greater than 25dB or the RSSI is greater than-95 dB, the packet loss rate is lower than 0.4%, and the link quality is directly judged to be good. Therefore, the invention mainly evaluates the transition region of the link quality.
The inertia weight is an important parameter in the whale algorithm and plays an important role in optimizing the objective function. When the weight is larger, the algorithm has high convergence speed and wider search range; conversely, the more detailed the algorithm search is, the search around the optimal solution is realized. Therefore, the selection of weights is crucial to improve the performance of the whale algorithm. The simple linear weight adjustment does not consider the actual convergence condition, and the convergence speed of the algorithm is interfered in the iteration process. Based on the weight, the weight is adaptively adjusted according to the current whale population distribution, and the weight calculation formula is as follows:
w=λ 1 ×(P i w -P i b )+λ 2 ×(ub-lb)/t (1)
in the formula: lambda 1 、λ 2 Is a constant, t is the number of iterations at that time; ub and lb are the upper and lower independent variable limits; p i w 、P i b Is the current worst and best position vector. The weight is adaptively adjusted according to the population position, and the location update formula of the improved shrink wrapping and hunting behavior is as follows:
X(t+1)=w×X * (t)-AD (2)
X(t+1)=D'e bl cos(2πl)+w×X * (t) (3)
adjusting the adaptive weight, at the beginning of the algorithm iteration, if the local optimal solution is matched, and the difference between the optimal and worst position vectors is small, but lambda 2 The value of x (ub-lb)/t is not influenced by the current population distribution, and a larger weight w can be obtained, so that the algorithm does not fall into a small-range search in the early stage. As the number of whale iterations increases, lambda 2 The value of x (ub-lb)/t becomes smaller gradually, if the algorithm does not reach the optimal solution, lambda 1 ×(P i w -P i w ) The value of (c) plays a dominant role in the weight ratio, so that the algorithm can perform optimization in a longer step size. The weight is composed of two parts, the adjusting algorithm of the latter part falls into local optimum, the optimization of the former part is rapidly found when the iteration times are large, and the convergence speed of the algorithm is improved. Such weight adaptation takes into account the overall optimization of the algorithm and the enhancement of the convergence rate, based onAnd adjusting the current population distribution.
In order to improve the optimizing capability of the algorithm in the random search process, a search strategy is adaptively adjusted according to the fitness probability threshold Q of the current whale individual, and the calculation formula of the probability threshold is as follows:
Figure BDA0003673913120000081
in the formula: f. of avg Is the average fitness value; f. of max Is the maximum value of the fitness value; f. of min Is the minimum value of the fitness value. When a random search is performed, with one [0,1]The random number Q in between is compared with the calculated fitness probability threshold Q, if Q is<Q, performing position updating on the whale individual according to the formula (5) without changing the positions of other individuals; otherwise, the whale individual performs location update according to equation (2). The search strategy is adjusted, when the algorithm iteration starts, a group of random solutions can be generated in the global range, the loss of population diversity caused by whale population aggregation in the initial iteration stage is avoided, and the overall search capability of the algorithm is improved.
X rand =X jmin +r×(X jmax -X jmin ) (5)
In the formula: r is [0,1 ]]Random number between, X max 、X min Is a variable X rand Maximum and minimum values of.
To test and analyze the performance of the whale algorithm for the improved adaptive weight and adaptive search strategy, 4 basic test functions were chosen, as shown in table 3, where f 1 、f 2 Is a unimodal function, f 3 、f 4 Is a multi-peak function. In the test, compared with Particle Swarm Optimization (PSO), wolf algorithm (GWO) and unmodified whale algorithm, the algorithm population size was set to 30 and the maximum number of iterations was 100.
TABLE 3
Figure BDA0003673913120000082
Figure BDA0003673913120000091
It can be obviously seen through an optimization curve of a basic test function that the convergence rate and stability of the improved whale algorithm are greatly improved, the global search capability is stronger, and f1 and f are subjected to 4 In the optimization of the function, the function converges to a global optimum. The feasibility and high performance of the improved whale algorithm are verified. The method takes the mean square error of the sample as an objective function, optimizes the BP neural network by using an improved whale algorithm, and distributes the weight and the threshold parameter of the optimal individual to the BP neural network. FIG. 1 is an evolutionary curve of a whale optimization algorithm.
As can be seen from the above figure, the minimum mean square error has been reached when the whale algorithm iterates up to 42 times. And (3) collecting sample data by using a LoRa single node, performing Kalman filtering treatment, and mapping the relation among RSSI, SNR and PLR by using a BP neural network, wherein 90% of 120 groups of sample data are used as training samples, and 10% of the samples are used as test samples. In a BP neural network in an MATLAB toolkit, RSSI and SNR are set as input layers, PLR is an output layer, the maximum training frequency is 1000, the learning rate is 0.01, a hidden layer carries out multiple times of circular training according to an equation (6), and the number of nodes of the hidden layer is determined when the mean square error of a trained model is minimum. Wherein n represents the number of nodes of the input layer, p represents the number of nodes of the output layer, a is a constant between 1 and 10, and m represents the number of nodes of the hidden layer. The result of multiple times of training shows that when the hidden layer is 11, the mean square error of the training model is minimum. For more accurate mapping model display, the PLR value range of BP neural network mapping is 0-40%.
Figure BDA0003673913120000101
And substituting the test samples into the training model for prediction output, wherein the comparison between the predicted value and the actual value before and after optimizing the BP neural network model by using an improved whale algorithm is shown in fig. 2 (a), and the difference between the predicted value and the actual value is used as an error for further displaying the accuracy of the predicted value before and after optimizing, which is shown in fig. 2 (b).
From fig. 2, the absolute error between the predicted value and the true value of the basic BP neural network model can reach 3%, and the absolute error between the predicted value and the true value of the BP neural network model optimized by the whale algorithm is within 1%. The Mean Absolute Error (MAE) before MATLAB calculation optimization is 0.92968%, the Mean Absolute Percentage Error (MAPE) is 17.3618%, the MAE and the MAPE calculated by the BP neural network model optimized by the improved whale algorithm are 0.28866% and 10.048% respectively, the prediction accuracy of the optimized BP neural network model is greatly improved, the link evaluation effect is better, and the link evaluation method has research and application values.
The present invention performs research and analysis around link quality of LoRa networks. The AWOA-BP neural network is used for training a nonlinear mapping model among RSSI, SNR and PLR, and the prediction accuracy of the tested AWOA-BP neural network model is far higher than that of the BP neural network. Compared with the evaluation methods used in the prior art, the AWOA-BP neural network model has better prediction effect and accuracy and feasibility of practical application, and can be used for evaluating the LoRa link quality.
In LoRaWAN protocol, an ALOHA access mode is adopted by an uplink communication node to communicate with a gateway, the gateway is used as an access center, and each node and the gateway are mutually independently communicated. When a plurality of data packets exist in the channel at the same time, collision occurs, resulting in data packet loss. At this time, whether the current communication channel is idle or not is not considered when the node sends data, and after packet loss occurs, the node cannot receive a response from the gateway, and the communication time-delay and stability are poor. The radio frequency chip SX1301 commonly used by the LoRaWAN protocol has 8 modulation channels, but the radio frequency chip SX1301 cannot demodulate a plurality of data packets at the same time, cannot realize simultaneous communication of multiple channels, has poor concurrency, and increases interference of channel communication due to imperfect orthogonality among spreading factors. Because the LoRaWAN network is a random access mode, the more the node capacity is, the more the communication conflict is easily caused, and therefore, the network scale is reduced in order to guarantee the stability of the network.
In view of the shortcomings of the LoRaWAN network, in order to improve network capacity and resource allocation of LoRa, the customized LoRa network uses a combination of Time Division Multiple Access (TDMA) and Carrier Sense Multiple Access (CSMA) Access to improve channel utilization in two different ways. The self-defined LoRa gateway adopts 8 radio frequency modules to form 8 channels, wherein one channel is used as a control channel and is responsible for distributing nodes, six channels are used as communication channels, data uploaded by the nodes periodically is received, one channel is used as a standby channel and is used for processing emergency communication, and the system architecture of the network is shown in fig. 3.
In order to implement TDMA-type communication of nodes, the local clocks of the nodes must be synchronized, and time synchronization is a prerequisite for allocating fixed time slots. The common time synchronization mode comprises satellite time service, network time service and radio time service, and although the precision of the network time service and the satellite time service is higher, the radio time service is selected in the LoRa network in consideration of the cost, the protocol and the adaptive capacity of practical application. When radio teaching is used, errors in synchronization accuracy due to the transmission of the synchronization message may occur. The LoRa network structure designed by the invention is a star structure, the nodes communicate with the gateway, in order to make the synchronization simple and effective, after the control channel distributes the nodes, the nodes and the sub-gateway of the communication channel carry out time synchronization, the nodes send synchronization requests to the gateway, and the gateway replies a local clock after receiving the synchronization requests. In order to reduce the error caused by sending the synchronous message, a bidirectional synchronous algorithm is adopted to record the local clock T of the node sending the synchronous request 1 Recording the local clock as T after receiving the synchronous clock of the gateway 2 The difference between the two is used as the compensation of the air transmission of the synchronous message, namely the difference is
RTC=T rec +(T 2 -T 1 ) (7)
After time synchronization, the node may transmit data according to the fixed time slot. However, when a hardware clock is used, the crystal oscillator will drift, and the continuous accumulation of the deviation will cause the failure of time synchronization and the nodes will conflict with each other. The clock skew equation can be expressed as follows:
Δt=νt+t cs (8)
wherein v represents the crystal oscillator drift rate of the node, t cs Indicating a node synchronization deviation. The deviation is larger and larger along with the increase of time, at this time, clock compensation correction is needed, and the most practical mode is that the deviation exceeds a certain precision range and then time synchronization is carried out again, so that the synchronization precision is maintained. The time slots are divided more than their transmission time due to the synchronous clock skew. The communication between the node and the gateway is bidirectional, the node transmits the sampling data in fixed period, the gateway transmits the control command in downlink, therefore, the minimum value of the time slot length is set as follows:
τ min =t d +t e +2max(Δt) (9)
the slot length τ and the sampling period T determine the node capacity of each channel:
Figure BDA0003673913120000121
the sampling period is set according to practical application and is generally fixed in the network, so the time slot length determines the node capacity. The minimum value of the time slot length is the sum of the uplink and downlink transmission time and 2 times of clock deviation, so that the time interval between the first synchronization node in the channel sending the synchronization request and the gateway returning can be added with the deviation as the time slot length, the data length of the synchronization request and the node sampling is the same, and the length of the gateway returning is the same as the length of the gateway downlink updating instruction, so that the time slot length is divided most, the node capacity is larger, and the network throughput is the highest.
The link quality of the LoRa network determines the stability and robustness of communication, and in order to achieve a better communication quality of the network, the link quality must be improved. In the communication process, due to the existence of environmental interference, the link quality is variable, and in order to guarantee the reliability of communication, the radio frequency parameters can be updated to improve the link quality. In communication, channel resources, time slot resources, energy resources and the like are limited, so that the optimal utilization of the resources is realized, and the problems of improving the network capacity and the throughput are urgently solved. The multi-channel networking method provided by the invention has high anti-interference capability, can realize the self-adaptive updating of the radio frequency parameters at the gateway through edge calculation, and improves the resource utilization rate and the link quality.
After a node joins the network, the node is first assigned to an appropriate channel according to the link quality. The designed gateway with 8 channels sets the spreading factor of a control channel to be 12 according to different coverage ranges of the receiving sensitivity of different spreading factors, the coverage range is the largest, the spreading factors of the rest communication channels are set to be 7-12, the standby channel is set to be 7, and the receiving sensitivity is the minimum receiving power capable of analyzing useful signals, so that the nodes are distributed to proper channels according to the RSSI read by a data packet distributed by a receiving request. By setting the RSSI knee value, as shown in table 4 below.
TABLE 4
Figure BDA0003673913120000131
The above table is only used as an allocation strategy for the nodes to join the network, and in order to improve the utilization rate of channel allocation, when the number of the nodes accessed by the current channel reaches 1/2 of the number of all the nodes joining the network, the nodes are preferentially allocated to other channels. When the node works in a communication channel, the self-adaptive adjustment of the parameters is carried out through real-time statistics and estimation of link quality. In the communication process of the node, the node is easily subjected to various interferences, a channel link becomes poor, and the communication packet loss rate is high, so that the link quality of the node communication needs to be improved, and the radio frequency parameter needs to be adaptively adjusted. When the adjacent channel interference is tested, and the carrier frequency difference of the adjacent channel is greater than 2MHz, the adjacent channel interference is not easily received, so the frequency point planning for each channel is shown in table 5.
TABLE 5
Figure BDA0003673913120000141
As can be seen from table 5, only one frequency point is used for the control channel, since the control channel processes the burst random service, there is no high requirement for the stability of communication, and most of the control channel belongs to the channel idle state. The spread factor of communication channel is fixed from 7-12, and the carrier frequency has 21 variable frequency points, which is a modifiable parameter. The designed LoRa gateway and the nodes mainly realize monitoring of industrial equipment, frequent uplink and downlink interaction is not needed, in order to reduce power consumption, the nodes only open receiving windows during time synchronization, and the receiving windows and the nodes perform information interaction, so that all edge calculation is performed when the nodes request synchronization. The specific updating process of each radio frequency parameter is as follows:
(1) Frequency and spreading factor adaptation
In the process of LoRa network communication, the network is easily subjected to various interferences or the node terminal exceeds the coverage range of the sub-gateway, the spreading factor is increased according to the formula (12), the receiving sensitivity of the LoRa module is higher, and the coverage range is farther. Therefore, according to the change of the link quality, the link interference is identified, the sub-gateway of the control channel obtains the idle available frequency points except the used frequency points in the table 5 through the periodic spectrum sensing, frequency hopping is performed, and the frequency and the spreading factor of the node terminal are adjusted to improve the link quality, and the specific flow is as shown in fig. 4.
(2) Transmit power adaptation
Through research and analysis on the transmission power, it can be known that the larger the transmission power is, the better the link quality of the channel is, but at the same time, the larger the energy consumption is, and the shorter the life cycle of the node terminal is. Therefore, the transmission power is adjusted according to the link quality, and the energy resource is allocated as necessary, and the specific flow is shown in fig. 5.
(3) Bandwidth adaptation
The over-the-air transmission time is equal to the sum of the transmission times of the preamble and the payload. Since the length of the preamble is fixed and the number of symbols of the payload is determined by the length of the payload, the spreading factor, and the coding rate according to equation (11), the length of the packet, the spreading factor, and the coding rate are determined by the symbol period T S The definition of (2) can be derived that the air transmission time is inversely proportional to the bandwidth, and the transmission time is shortened as the bandwidth increases. Transmission time of dataThe shorter the time, the smaller t is, the larger the channel capacity is, the higher the channel utilization ratio is, and the higher the gateway throughput is, according to the minimum time slot calculation method of equation (9). Increasing the bandwidth can achieve the capacity expansion of the network, but the receiving sensitivity is reduced, and the link quality is reduced, so the capacity expansion is performed when the link quality is good, as shown in fig. 6.
Figure BDA0003673913120000161
In the formula: n is a radical of an alkyl radical pa Represents the number of symbols of the payload data, PL being the payload length; h denotes an enable header, explicit H =0, implicit H =1; when low rate optimization is used, DE indicates whether low information rate optimization is turned on, DE =1 when turned on, otherwise DE =0.CR denotes the code rate, max denotes the largest aggregation element, and ceil function is to return the smallest integer no smaller than the expression.
Symbol period T S Is defined as:
Figure BDA0003673913120000162
where BW denotes the signal bandwidth in Hz and SF denotes the spreading factor.
S=-174+10lg B+NF-2.5SF+10 (12)
As can be seen from the above equation, the spreading factor and the bandwidth together determine the receive sensitivity of LoRa.
The LoRa network mainly comprises a gateway and nodes, the networking is realized by the way that the nodes are accessed to the gateway, and the gateway conducts data forwarding, storage and edge calculation to manage the nodes. The gateway is composed of multiple radio frequency modules to form a multi-channel network. The program flow of the gateway and the node is as follows:
(1) Node flow
The node mainly realizes the function of sampling the information of the industrial equipment, and the invention takes the collection of temperature information as an example. After the node is started to work, firstly, a distribution request is sent to the control sub-gateway, RTC clock synchronization is carried out on the node and the communication sub-gateway after a configuration command is received, and data transmission of multiple nodes under the same sub-gateway is realized by adopting a TDMA mode. If the node is the first one accessed to the sub-gateway, the node sends two synchronization requests, and the time slot length is calculated according to the data packet transmission time calculated by the node. And when the synchronization fails for multiple times, the node is accessed to the control sub-gateway again for distribution. And after the node synchronization is successful, carrying out periodic data acquisition and transmission, and when the transmission times reach clock drift and have great influence on time slot division, carrying out time synchronization again. In the working process of the node, the node receives a parameter updating instruction of the gateway, modifies the radio frequency parameter and improves the communication quality of the node. A program flow diagram for a node is shown in fig. 7.
(2) Gateway process
The multi-channel gateway is divided into a control sub-gateway and a communication sub-gateway, the control sub-gateway participates in receiving and responding of a node allocation request data frame, only data is received and sent, and the link parameter RSSI read by the SX1276 when a data packet is received is sent to the MCU. The control sub-gateway is idle most of the time and is also responsible for periodic spectrum sensing to acquire idle channels. The main function of the communication sub-gateway is to maintain a star network accessed in a TDMA mode, the receiving window of the communication sub-gateway is always opened, and the data of the node is sent to the gateway MCU after being received and stored and processed by the gateway MCU. And the gateway MCU sends the processing result to the sub-gateway, and the sub-gateway operates according to the type of the data packet. Fig. 8 is a flowchart of the procedure of the communication sub-gateway.
The gateway MCU mainly functions in forwarding data and performing edge calculation, and the program flow is shown in fig. 9. The gateway adopts a multi-thread concurrent mode of a Linux system, the sub-thread monitors the connection state of the TCP protocol, and when the connection abnormality is detected, the data is cached and the server is connected again. When the network connection is normal, the device is registered again, the cache data is forwarded to the server side, and the server side can perform parameter configuration on the gateway through a downlink instruction. The main thread mainly carries out edge calculation, processes data forwarded by 8 paths of sub-gateways, achieves gateway intelligentization, and improves reliability and robustness of LoRa network communication. After receiving the allocation request, the main thread allocates a communication channel for the node according to the physical layer parameter RSSI, and when the node is newly added into the network, the main thread needs to send a device registration frame to the server, which indicates that the device is added into the network. And after receiving the synchronization request, calculating the time slot length according to the first node accessed into the channel, realizing the maximum allocation of channel resources, and then carrying out radio frequency parameter self-adaptation according to the link quality. And according to the edge calculation result, sending a radio frequency parameter updating instruction to the sub-gateway and the node. And when the received data is periodically sampled data, storing the data and sending the data to the server.
The networking based on the edge calculation refers to the characteristics of various types of communication frames in the LoRaWAN protocol, and meets a set of communication scheme formulated by industrial automation application on the basis of LoRa data link layer communication. The networking protocol structure is shown in fig. 10.
In the networking protocol based on the link quality evaluation and the parameter optimization updating, the LoRa node realizes the acquisition of industrial equipment information by a physical layer sensor and sends the industrial equipment information to the sub-gateway through the SX1276 radio frequency chip, and the sub-gateway forwards a data frame to the gateway MCU for data storage, forwarding and edge calculation. The server and the gateway process and calculate the data, and perform node management and link quality calculation, which are known from the foregoing, and are adaptive updates to the radio frequency parameters. The data is transmitted to the server side through the Ethernet, and the application layer calls and displays the data. As can be known from the foregoing program flows of the nodes and the gateway, in the communication process, there are three uplink data packets of the nodes, which are an allocation request packet, a synchronization request packet, and a periodic sampling data packet. The specific data packet structure takes the data packet of the period 6 in the table as an example, the length of the allocation request packet is the same as that of the synchronization request packet, and the zero is filled in 4 bytes after the node. The function of the data packet is judged according to the packet type, and the CRC check bit ensures the integrity and the correctness of data transmission.
TABLE 6
Figure BDA0003673913120000181
And after receiving the distribution request and the synchronization request of the node, the gateway replies a feedback instruction, and for the periodically sampled data, the gateway only stores and processes the data and does not perform downlink communication. Therefore, there are three main types of data packets for downlink communication, i.e., a distribution command, a synchronization command, and a parameter update command. All data packet lengths of the downlink communication are the same, and in order to maintain the accuracy of the TDMA access method, the occurrence of communication collisions is reduced. Taking the distribution data packet structure table 7 as an example, the parameter update instruction is the same as the parameter update instruction, the synchronous command converts the middle eight bytes into RTC clock information of the sub-gateway, and the packet type distinguishes the functions of the data packet.
TABLE 7
Figure BDA0003673913120000191
Besides the information protocol of uplink and downlink communication between the gateway and the node, the data interaction between the gateway and the server is based on the TCP/IP protocol. The gateway processes and packages the received data and sends the data to the server through the internet access, and the server stores, calls and displays the data. The server side can send a downlink instruction to configure parameters of the gateway, and change the node capacity, the sampling period, the synchronization period, the time slot length and the like of the gateway according to the actual application requirements, wherein the format of the data packet is similar to that of the data packet, and only each bit of the data packet has different functions.
In the embodiment, the link quality is mainly evaluated, an AWOA-BP neural network-based link quality evaluation model is constructed, and the evaluation accuracy and the evaluation practicability are contrastively analyzed; a networking method of multi-parameter self-adaptive updating according to link quality.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (3)

1. A multi-parameter networking method based on edge computing gateway link quality assessment is characterized by comprising the following steps:
collecting sample data and preprocessing the sample data;
the sample data includes: receiving signal strength RSSI, signal-to-noise ratio SNR and packet loss rate PLR, and based on the number of data packets sent by a sending end, recording the RSSI and the SNR when the data packets are received each time by a receiving end, and calculating the PLR;
the process of preprocessing the sample data comprises the following steps: filtering the RSSI and the SNR by adopting a Kalman filtering method;
constructing a link quality evaluation model based on an AWOA-BP neural network, inputting the preprocessed sample data into the link quality evaluation model for training until the output error is reduced to an expected degree or reaches a set learning iteration number, and finishing training to obtain the trained link quality evaluation model;
in the process of training the link quality assessment model, the following steps are included: self-adaptively adjusting the weight based on the current whale population distribution; adaptively adjusting a search strategy based on the fitness probability threshold of the current whale individual;
an edge computing-based LoRa network system is constructed by adopting a mode of combining Carrier Sense Multiple Access (CSMA) and Time Division Multiple Access (TDMA) access;
performing real-time link quality evaluation on the LoRa network based on the trained link quality evaluation model, and identifying the change of the link quality;
carrying out self-adaptive updating on the radio frequency parameters of the LoRa network based on the change of the link quality;
the process of constructing the LoRa network system based on edge calculation by adopting a mode of combining CSMA and TDMA access also comprises the following steps: the LoRa network system adopts a star structure, the star structure comprises a plurality of gateways and a plurality of nodes, and the gateways comprise control sub-gateways, communication sub-gateways and gateway MCU;
and performing node distribution through the control sub-gateway, requesting the receiving and responding of data frames, receiving a data packet through the communication sub-gateway, sending the data packet to the gateway MCU, and performing storage, forwarding and edge calculation on the data packet through the gateway MCU, wherein the data packet comprises a distribution request packet, a synchronization request packet and a periodic sampling data packet.
2. The multi-parameter networking method based on edge computing gateway link quality assessment according to claim 1, wherein in the process of constructing the LoRa network system based on edge computing by adopting a combination of CSMA and TDMA access:
before information transmission, the CSMA reduces communication conflict in a channel monitoring and random back-off mode, wherein the access mode of the CSMA is access in a competition mode;
and dividing time slots through the TDMA, distributing channel resources of multiple nodes based on the divided time slots, and enabling the nodes to occupy channels in respective time slots for communication in a sampling period of the nodes.
3. The multi-parameter networking method based on edge computing gateway link quality assessment according to claim 1, wherein in the process of adaptively updating the radio frequency parameters of the LoRa network system based on the change of the link quality, the change of the link quality is edge computed by the gateway MCU to obtain a radio frequency parameter updating instruction;
sending the radio frequency parameter updating instruction to the control sub-gateway, the communication sub-gateway and the node, and updating corresponding radio frequency parameters, wherein the radio frequency parameters include: frequency and spreading factor, transmit power, and bandwidth.
CN202210614999.3A 2022-06-01 2022-06-01 Multi-parameter networking method based on edge computing gateway link quality evaluation Active CN114928415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210614999.3A CN114928415B (en) 2022-06-01 2022-06-01 Multi-parameter networking method based on edge computing gateway link quality evaluation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210614999.3A CN114928415B (en) 2022-06-01 2022-06-01 Multi-parameter networking method based on edge computing gateway link quality evaluation

Publications (2)

Publication Number Publication Date
CN114928415A CN114928415A (en) 2022-08-19
CN114928415B true CN114928415B (en) 2023-04-07

Family

ID=82813354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210614999.3A Active CN114928415B (en) 2022-06-01 2022-06-01 Multi-parameter networking method based on edge computing gateway link quality evaluation

Country Status (1)

Country Link
CN (1) CN114928415B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010069238A1 (en) * 2008-12-19 2010-06-24 中国科学院沈阳自动化研究所 Communication method for mesh and star topology structure wireless sensor network
CN106162844A (en) * 2016-06-03 2016-11-23 西安电子科技大学 Implementation method based on the MAC protocol for wireless sensor networks of LoRa
CN110049562A (en) * 2019-03-13 2019-07-23 中兴克拉科技(苏州)有限公司 A kind of LoRaWAN Internet of Things for supporting TDMA to access
CN112700060A (en) * 2021-01-08 2021-04-23 佳源科技股份有限公司 Station terminal load prediction method and prediction device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110087206B (en) * 2019-04-26 2021-12-21 南昌航空大学 Method for evaluating link quality by adopting generalized regression neural network
GB201914149D0 (en) * 2019-10-01 2019-11-13 Cork Institute Of Tech A method for estimating the uplink data rate in mobile communications
CN111132337B (en) * 2019-12-19 2023-04-07 中科芯集成电路有限公司 Lora communication method combining TDMA (time division multiple Access) and CSMA (Carrier sense multiple Access) mechanisms
US20230177349A1 (en) * 2020-06-01 2023-06-08 Intel Corporation Federated learning optimizations
US20210383207A1 (en) * 2020-06-04 2021-12-09 Ramot At Tel-Aviv University Ltd. Active selection and training of deep neural networks for decoding error correction codes
CN113158543B (en) * 2021-02-02 2023-10-24 浙江工商大学 Intelligent prediction method for software defined network performance

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010069238A1 (en) * 2008-12-19 2010-06-24 中国科学院沈阳自动化研究所 Communication method for mesh and star topology structure wireless sensor network
CN106162844A (en) * 2016-06-03 2016-11-23 西安电子科技大学 Implementation method based on the MAC protocol for wireless sensor networks of LoRa
CN110049562A (en) * 2019-03-13 2019-07-23 中兴克拉科技(苏州)有限公司 A kind of LoRaWAN Internet of Things for supporting TDMA to access
CN112700060A (en) * 2021-01-08 2021-04-23 佳源科技股份有限公司 Station terminal load prediction method and prediction device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于LoRa的农田信息无线采集方案设计;孙天柱等;《计算机测量与控制》(第08期);全文 *
基于贴近度等级的链路质量评估方法;张和杰等;《计算机工程与科学》(第11期);全文 *

Also Published As

Publication number Publication date
CN114928415A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
Dardari et al. Mathematical evaluation of environmental monitoring estimation error through energy-efficient wireless sensor networks
CN103716123A (en) Method and system for identifying packet loss and error causes in sensor network
US9705766B2 (en) Distributed liveness reporting in a computer network
Muthanna et al. Cognitive control models of multiple access IoT networks using LoRa technology
KR101801801B1 (en) Slot frame virtualization System and Method for TSCH based industrial wireless network
CN103024796B (en) Bandwidth estimation method for wireless Mesh network
Guerra-Gomez et al. Machine learning adaptive computational capacity prediction for dynamic resource management in C-RAN
Fedullo et al. Adaptive LoRaWAN transmission exploiting reinforcement learning: The industrial case
CN111935797B (en) Dynamic routing method for wireless communication network of low-voltage switch cabinet
Khaleel et al. Frequency agile wireless sensor networks: design and implementation
CN114928415B (en) Multi-parameter networking method based on edge computing gateway link quality evaluation
Soto-Vergel et al. LoRa performance in industrial environments: analysis of different ADR algorithms
Çakır et al. Dtwn: Q-learning-based transmit power control for digital twin wifi networks
Sharma et al. Analysing mobile random early detection for congestion control in mobile ad-hoc network
CN110996341B (en) Low-power wireless link quality estimation method under cross-protocol interference
Ivoghlian et al. Application-aware adaptive parameter control for LoRaWAN
CN114363906B (en) Mass node access resource allocation method, device, terminal and storage medium
Liu et al. Simplified theoretical model based self-adaptive packet reception rate estimation in sensor networks
Zhuo et al. Online congestion measurement and control in cognitive wireless sensor networks
Zhang et al. An adaptive distributed scheduling algorithm for ieee 802.15. 4e tsch protocol
Radha et al. Scheduling and adaptive listening approaches in MAC for WSN applications: A survey
Chincoli et al. Predictive power control in wireless sensor networks
Lohier et al. A cost function for QoS-aware routing in multi-tier wireless multimedia sensor networks
Khader et al. Self-learning and self-adaptive framework for supporting high reliability and low energy expenditure in WSNs
Wang et al. A Collision-Reducible Adaptive Data Rate Algorithm for Low-cost LoRa Gateways

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant