# Based on Fuzzy Measure Algorithm Message Adaptive Rate Algorithm of Internet of Things

Authors: Zhijie Zhang
Journal: Journal of Control Science and Engineering
 (2022)

---

## Abstract

In order to solve the problem that the existing LoRaWAN adaptive data rate control algorithm leads to low data transmission efficiency in the case of network congestion, a method combining a fuzzy logistic regression classifier and an improved adaptive data rate controller adjusting the avoidance time was proposed. The classifier could obtain the predicted congestion state by logistic regression learning. The data rate controller determined the data rate adjustment scheme according to the predicted congestion state. The experimental results showed that when the network congestion occurred in about 12s, the number of packet loss by the LoRaWAN default method was higher than that by the method in the research. The value of ADR_ MSG_CNT of the 15 source nodes in the method was 30 within 0–10 s, while the RCV_ACK_CNT of some nodes was 0. It proved that the method was more efficient than the original LoRaWAN adaptive data rate control algorithm.


---

## Body

## 1. Introduction

In the era of rapid development of information technology, wireless communication technology is developing faster and faster, which not only makes the communication between people become simple and fast but also has completely changed our way of life. As an important component of wireless communication, ad hoc network plays a unique role in the field of wireless communication. Wireless ad hoc networks can be built flexibly and can be networked anytime and anywhere without any preset configuration. Compared with networks that require infrastructure construction, ad hoc networks are more convenient and faster. With the development of ad hoc wireless networking technology, its application has penetrated into every aspect of people’s life [1].In recent years, in outdoor tourism, disaster relief, and other scenes, the demand for the temporary establishment of a relatively long-distance network for communication is increasing. However, the communication distance of ZigBee, WiFi, and other technologies currently used in wireless ad hoc networks is only a few hundred meters, which greatly limits the application range of wireless ad hoc networks and makes it more difficult to expand the transmission distance of wireless ad hoc networks [2]. At present, the newly developed LoRa technology not only achieves ultralong distance transmission but also maintains low-power consumption at the radio frequency level and has strong antiinterference ability, which largely makes up for the shortcomings of the physical layer technology of the traditional wireless ad hoc network.LoRa (Long Range) means long-distance transmission. LoRa technology is a patented spread spectrum modulation technology developed by Semtech, which integrates digital spread spectrum, digital signal processing, forward error correction coding, and other technologies. It is suitable for long-distance, low-power, and low-rate application scenarios [3]. Compared with traditional spread-spectrum modulation, LoRa technology increases the link budget and the ability to resist in-band interference, which expands the communication range and robustness of wireless communication links.


## 2. Literature Review

LoRa technologies were developed by Semtech in Germany, and a series of exclusive LoRa RF modules were released. LoRa communication technology was one of the most favored technologies in the Internet of things. LoRa Alliance established by Semtech, Sagemcom, IBM, Cisco, and many other provider companies was developing and standardizing LoRaWAN [4]. The LoRa Alliance’s main mission was to provide hardware and software connectivity solutions for the Internet of things operators based on LoRaWAN standards. LoRaWAN was a standard specification defined by LoRa Alliance for low power consumption of LoRa terminal nodes and compatibility of network devices, mainly including network communication protocols and system architecture. Standardization of LoRaWAN ensured interoperability among different end nodes, modules, Gateways, and Servers, accelerating the adoption and deployment of LoRaWAN networks. In January 2016, ZTE signed a strategic cooperation agreement with Semtech in order to conduct in-depth cooperation in LoRa technology and application [5]. ZTE established CLAA (China LoRa Application Alliance) with major Internet of things companies. Niles et al. proposed to apply LoRa to the security application of the Internet of vehicles [6]. Yang et al proposed to use LoRa in the wireless drip irrigation control system [7]. Gonzalez-Palacio et al. proposed to apply LoRa to the application scenarios of various industries in the article tracking system [8]. Duong and Thao focused on the upper role server of LoRa communication and developed the LoRa network open platform [9]. Jain et al. proposed a new idea of establishing transparent IPv6 communication based on LoRa low-power WAN [10].LoRaWAN technology was developing rapidly. Currently, more than 250 standard LoRaWAN networks were deployed in more than 18 countries and 120 regions around the world. And 58 telecom operators and 67 network operators were carrying out specific network deployment and operation promotion. Senet built LoRaWAN wireless experimental network covering more than 12,500 square kilometers in 110 cities in the United States [11]. In addition, the company planned to build a LoRaWAN business network in 23 states and 225 cities that could serve at least 50 million people. Comcast used LoRaWAN for smart cities. The company used LoRaWAN to provide B2B services. Last year, Comcast completed the deployment of LoRaWAN in three U. S. cities. Plans were underway to roll out LoRaWAN in 12 other U. S. cities this year. France Telecom-Orange achieved nationwide coverage of the LoRaWAN network in France [12].In the research, an improved adaptive data rate controller using a fuzzy logistic regression classifier was proposed. When predicting the congestion, the avoidance time could be adjusted automatically instead of decreasing the data rate, thus ensuring the high efficiency of data communication.


## 3. Research Methods

### 3.1. Related Knowledge

Low-power wide-area Internet of things includes LoRaWAN, SigFox, and Weightless. They all have the advantages of low data cost, low cost, low communication capacity and are suitable for long-distance communication. LoRaWAN is a representative model. LoRaWAN includes terminal devices, gateways, and network servers [13].LoRaWAN supports data rate management to ensure all network capabilities. When there is an unreliable connection, a data exchange method is used to manage the wireless connection. After completing the file transfer control, the terminal temporarily identifies the ACK message received by the gateway. The terminal device has a counter (ADR_ACK_CNT), and the top link is incremented by 1 each time data are sent. When the meter value reaches the first digit, adjust the value when no ACK message is received, and set the ACK time delay (ADR_ACK_DELAY) to wait for the ACK message [14]. If no response is received at that time, the terminal machine tries to restore the connection by moving to the next lower data. In other words, the terminal device controls the data rate by receiving ACK data. The values of the LoRaWAN data changes are shown in Figure 1.Figure 1
Schematic diagram of LoRaWAN adaptive data rate.Suppose a property setX=X1,X2,…,Xn, power set PX for X, if set function μ:PX⟶0,1 satisfies the following conditions: (1) boundedness: μϕ=0, μX=1; (2) monotonicity: for any S,Q⊆X,S⊆Q, μS≤μQ, then μ is a fuzzy measure defined on PX [15].For fuzzy measure, Choquet integral or multilinear model can be used instead of weighted arithmetic mean as integration operator for multiattribute decision analysis, but their application conditions and modeling results are different. The multilinear model based on the fuzzy measure can be expressed as the following formula:(1)FMLx=∑S⊆XμSΠi∈SuixiΠi∈S1−uixi,where uixi∈0,1, S¯ is the complement of S.


### 3.2. Proposing an Adaptive Data Rate Control Method

The proposed method consists of a congestion classifier and an improved data rate controller. Congestion classifiers use throughput (X1) and receive signal strength (X2) and number of connections of gateways (X3) for statistics. It determines the congestion state (Y) by logistic regression learning. Then, the adaptive data rate performs control (DR) according to the congestion state [16]. Figure 2 shows the system architecture of the proposed approach.Figure 2
Improved adaptive data rate controller architecture.


#### 3.2.1. Congestion Classifier

Congestion classifier can predict network congestion through supervised learning, which is widely used in wireless network state prediction. And state prediction is used in efficient network data transmission. The proposed method uses logistic regression to predict network congestion. Logistic regression uses the Sigmoid function for dichotomy, and the congestion state is regarded as a binomial distribution [17].Formula (2) is a logical function ranging from 0 to 1.(2)Y∈0,1,(3)hX=gθTX=gz=11+e−z.In the Sigmoid function, after the input parameterz is substituted into the linear function with data set x and weight θ, the following formula (4) is obtained.(4)z=θTX=θ0x0+θ1x1+θ2x2+⋯+θnxn=θ0+∑j=1nθjxjx0=1.As shown in Figure2, three attributes are given in the improved method, namely, data rate, received signal strength, and gateway connection number. Therefore, in (3), n=3, the network congestion probability of the logistic regression model on n=3 set is shown in the following formula:(5)PY=1X;θ=hX.The probability of network congestion that cannot occur is expressed in the following formula:(6)PY=1X;θ=1−hX.Therefore, the probability of a congestion state is expressed in the following formula:(7)PYX;θ=hXY1−hX1−Y,y represents congestion state. The value can be 0 or 1.Ifm training samples of learning network congestion can be independently generated, then the likelihood function on a θ set can be changed into the following formula:(8)Lθ=PYX;θ=∏i=1mPyixi;θ=∏i=1mhxiyi1−hxi1−yi.The likelihood function can also be expressed as a logarithmic likelihood function, as shown in the following formula:(9)lθ=logLθ=∑i=1myiloghxi+1−yilog1−hxi.Since the congestion classifier needs to learn to find the most appropriate value ofθ and maximize the logarithmic likelihood function to judge congestion, the gradient ascent optimization algorithm is used as follows:(10)θ≔θ+α∇θlθ,θ is updated according to the gradient of the logarithmic likelihood function, with α being the gradient of unit size. The derivative of the Sigmoid function is as follows:(11)g′z=gz1−gz.Therefore, the gradient of the logarithmic likelihood function in theith training sample is expressed in the following formula (12):(12)∂∂θjlθ=yi1gθTxi+1−yi1gθTxi−1∂∂θjgθTxi=yi1gθTxi+1−yi1−gθTxi−1gθTxi1−gθTxi∂∂θjθTxi=yi1−gθTxi−1−yigθTxixji=yi−hxixji.Then, the weightθ is updated to obtain the following formula (13):(13)θj≔θj+αyi−hxixji.The congestion classifier on the network server collects training samples of each terminal and obtains the optimal weight by learning [18]. Weights are then updated periodically from the network server side to the gateway. The gateway is responsible for broadcasting the updated weight and sharing the weight with each terminal device, so that the terminal device can judge congestion by using the broadcast value A θ [19]. Since the network server manages each terminal device, it can obtain enough effective training samples. Therefore, the network server can not only continuously learn to find the optimal value θ but also share the results with the terminal device, which uses θ to classify the congestion state.


#### 3.2.2. Data Rate Controller

Since most IoT services consist of short messages, switching modulation schemes during congestion is not appropriate. The objective of the data rate controller proposed in the research is to avoid the decrease of the data rate due to the unnecessary adjustment of the modulation scheme. In the case of no need to switch the modulation scheme, the method of adjusting the avoidance time is proposed to replace the method of reducing the data rate to expand the network coverage in the case of congestion. The proposed data rate controller uses the results of the congestion classifier to determine whether to switch to a lower data rate or adjust the avoidance time [20,21].


## 3.1. Related Knowledge

Low-power wide-area Internet of things includes LoRaWAN, SigFox, and Weightless. They all have the advantages of low data cost, low cost, low communication capacity and are suitable for long-distance communication. LoRaWAN is a representative model. LoRaWAN includes terminal devices, gateways, and network servers [13].LoRaWAN supports data rate management to ensure all network capabilities. When there is an unreliable connection, a data exchange method is used to manage the wireless connection. After completing the file transfer control, the terminal temporarily identifies the ACK message received by the gateway. The terminal device has a counter (ADR_ACK_CNT), and the top link is incremented by 1 each time data are sent. When the meter value reaches the first digit, adjust the value when no ACK message is received, and set the ACK time delay (ADR_ACK_DELAY) to wait for the ACK message [14]. If no response is received at that time, the terminal machine tries to restore the connection by moving to the next lower data. In other words, the terminal device controls the data rate by receiving ACK data. The values of the LoRaWAN data changes are shown in Figure 1.Figure 1
Schematic diagram of LoRaWAN adaptive data rate.Suppose a property setX=X1,X2,…,Xn, power set PX for X, if set function μ:PX⟶0,1 satisfies the following conditions: (1) boundedness: μϕ=0, μX=1; (2) monotonicity: for any S,Q⊆X,S⊆Q, μS≤μQ, then μ is a fuzzy measure defined on PX [15].For fuzzy measure, Choquet integral or multilinear model can be used instead of weighted arithmetic mean as integration operator for multiattribute decision analysis, but their application conditions and modeling results are different. The multilinear model based on the fuzzy measure can be expressed as the following formula:(1)FMLx=∑S⊆XμSΠi∈SuixiΠi∈S1−uixi,where uixi∈0,1, S¯ is the complement of S.


## 3.2. Proposing an Adaptive Data Rate Control Method

The proposed method consists of a congestion classifier and an improved data rate controller. Congestion classifiers use throughput (X1) and receive signal strength (X2) and number of connections of gateways (X3) for statistics. It determines the congestion state (Y) by logistic regression learning. Then, the adaptive data rate performs control (DR) according to the congestion state [16]. Figure 2 shows the system architecture of the proposed approach.Figure 2
Improved adaptive data rate controller architecture.


### 3.2.1. Congestion Classifier

Congestion classifier can predict network congestion through supervised learning, which is widely used in wireless network state prediction. And state prediction is used in efficient network data transmission. The proposed method uses logistic regression to predict network congestion. Logistic regression uses the Sigmoid function for dichotomy, and the congestion state is regarded as a binomial distribution [17].Formula (2) is a logical function ranging from 0 to 1.(2)Y∈0,1,(3)hX=gθTX=gz=11+e−z.In the Sigmoid function, after the input parameterz is substituted into the linear function with data set x and weight θ, the following formula (4) is obtained.(4)z=θTX=θ0x0+θ1x1+θ2x2+⋯+θnxn=θ0+∑j=1nθjxjx0=1.As shown in Figure2, three attributes are given in the improved method, namely, data rate, received signal strength, and gateway connection number. Therefore, in (3), n=3, the network congestion probability of the logistic regression model on n=3 set is shown in the following formula:(5)PY=1X;θ=hX.The probability of network congestion that cannot occur is expressed in the following formula:(6)PY=1X;θ=1−hX.Therefore, the probability of a congestion state is expressed in the following formula:(7)PYX;θ=hXY1−hX1−Y,y represents congestion state. The value can be 0 or 1.Ifm training samples of learning network congestion can be independently generated, then the likelihood function on a θ set can be changed into the following formula:(8)Lθ=PYX;θ=∏i=1mPyixi;θ=∏i=1mhxiyi1−hxi1−yi.The likelihood function can also be expressed as a logarithmic likelihood function, as shown in the following formula:(9)lθ=logLθ=∑i=1myiloghxi+1−yilog1−hxi.Since the congestion classifier needs to learn to find the most appropriate value ofθ and maximize the logarithmic likelihood function to judge congestion, the gradient ascent optimization algorithm is used as follows:(10)θ≔θ+α∇θlθ,θ is updated according to the gradient of the logarithmic likelihood function, with α being the gradient of unit size. The derivative of the Sigmoid function is as follows:(11)g′z=gz1−gz.Therefore, the gradient of the logarithmic likelihood function in theith training sample is expressed in the following formula (12):(12)∂∂θjlθ=yi1gθTxi+1−yi1gθTxi−1∂∂θjgθTxi=yi1gθTxi+1−yi1−gθTxi−1gθTxi1−gθTxi∂∂θjθTxi=yi1−gθTxi−1−yigθTxixji=yi−hxixji.Then, the weightθ is updated to obtain the following formula (13):(13)θj≔θj+αyi−hxixji.The congestion classifier on the network server collects training samples of each terminal and obtains the optimal weight by learning [18]. Weights are then updated periodically from the network server side to the gateway. The gateway is responsible for broadcasting the updated weight and sharing the weight with each terminal device, so that the terminal device can judge congestion by using the broadcast value A θ [19]. Since the network server manages each terminal device, it can obtain enough effective training samples. Therefore, the network server can not only continuously learn to find the optimal value θ but also share the results with the terminal device, which uses θ to classify the congestion state.


### 3.2.2. Data Rate Controller

Since most IoT services consist of short messages, switching modulation schemes during congestion is not appropriate. The objective of the data rate controller proposed in the research is to avoid the decrease of the data rate due to the unnecessary adjustment of the modulation scheme. In the case of no need to switch the modulation scheme, the method of adjusting the avoidance time is proposed to replace the method of reducing the data rate to expand the network coverage in the case of congestion. The proposed data rate controller uses the results of the congestion classifier to determine whether to switch to a lower data rate or adjust the avoidance time [20,21].


## 3.2.1. Congestion Classifier

Congestion classifier can predict network congestion through supervised learning, which is widely used in wireless network state prediction. And state prediction is used in efficient network data transmission. The proposed method uses logistic regression to predict network congestion. Logistic regression uses the Sigmoid function for dichotomy, and the congestion state is regarded as a binomial distribution [17].Formula (2) is a logical function ranging from 0 to 1.(2)Y∈0,1,(3)hX=gθTX=gz=11+e−z.In the Sigmoid function, after the input parameterz is substituted into the linear function with data set x and weight θ, the following formula (4) is obtained.(4)z=θTX=θ0x0+θ1x1+θ2x2+⋯+θnxn=θ0+∑j=1nθjxjx0=1.As shown in Figure2, three attributes are given in the improved method, namely, data rate, received signal strength, and gateway connection number. Therefore, in (3), n=3, the network congestion probability of the logistic regression model on n=3 set is shown in the following formula:(5)PY=1X;θ=hX.The probability of network congestion that cannot occur is expressed in the following formula:(6)PY=1X;θ=1−hX.Therefore, the probability of a congestion state is expressed in the following formula:(7)PYX;θ=hXY1−hX1−Y,y represents congestion state. The value can be 0 or 1.Ifm training samples of learning network congestion can be independently generated, then the likelihood function on a θ set can be changed into the following formula:(8)Lθ=PYX;θ=∏i=1mPyixi;θ=∏i=1mhxiyi1−hxi1−yi.The likelihood function can also be expressed as a logarithmic likelihood function, as shown in the following formula:(9)lθ=logLθ=∑i=1myiloghxi+1−yilog1−hxi.Since the congestion classifier needs to learn to find the most appropriate value ofθ and maximize the logarithmic likelihood function to judge congestion, the gradient ascent optimization algorithm is used as follows:(10)θ≔θ+α∇θlθ,θ is updated according to the gradient of the logarithmic likelihood function, with α being the gradient of unit size. The derivative of the Sigmoid function is as follows:(11)g′z=gz1−gz.Therefore, the gradient of the logarithmic likelihood function in theith training sample is expressed in the following formula (12):(12)∂∂θjlθ=yi1gθTxi+1−yi1gθTxi−1∂∂θjgθTxi=yi1gθTxi+1−yi1−gθTxi−1gθTxi1−gθTxi∂∂θjθTxi=yi1−gθTxi−1−yigθTxixji=yi−hxixji.Then, the weightθ is updated to obtain the following formula (13):(13)θj≔θj+αyi−hxixji.The congestion classifier on the network server collects training samples of each terminal and obtains the optimal weight by learning [18]. Weights are then updated periodically from the network server side to the gateway. The gateway is responsible for broadcasting the updated weight and sharing the weight with each terminal device, so that the terminal device can judge congestion by using the broadcast value A θ [19]. Since the network server manages each terminal device, it can obtain enough effective training samples. Therefore, the network server can not only continuously learn to find the optimal value θ but also share the results with the terminal device, which uses θ to classify the congestion state.


## 3.2.2. Data Rate Controller

Since most IoT services consist of short messages, switching modulation schemes during congestion is not appropriate. The objective of the data rate controller proposed in the research is to avoid the decrease of the data rate due to the unnecessary adjustment of the modulation scheme. In the case of no need to switch the modulation scheme, the method of adjusting the avoidance time is proposed to replace the method of reducing the data rate to expand the network coverage in the case of congestion. The proposed data rate controller uses the results of the congestion classifier to determine whether to switch to a lower data rate or adjust the avoidance time [20,21].


## 4. Results Analysis

The simulation environment of the research is Linux + Network SimulatorVersion-2.35. The simulation environment configuration is shown in Table1.Table 1
Main simulation parameters.
ParameterValueNS versionNS-2.35The channel modelTwoRayGroundThe network area1000m × 1000 mNode distribution is randomly distributedRandom distributionNumber of nodes15Buffer50 packetsSize per packet64 byteSending packet interval10 sThe simulation time80 sIn the simulation experiment, the LoRaWAN Class A specification is used to simulate the wireless network covered by a single base station. The bandwidth is 125 kHz, and the data rate is divided into four levels. The data rates are 980 bit/s, 1 760 bit/s, 3 125 bit/s, and 5 470 bit/s, respectively. The random avoidance time of network congestion in the algorithm in the research is set as 2 ∼ 6 s. ACK waiting time is 0.5 s, and channel listening time is 1 s. In the simulation environment, the packet loss caused by channel failure is ignored, and only the packet loss caused by congestion is considered. Therefore, network congestion can be indirectly reflected through the change in packet loss quantity over time [22].As the data rate is positively correlated with the number of lost packets, data are transmitted at the DR3 data rate for 15 source nodes every 10 s, which is repeated for 100 times and averaged to obtain LoraWAN’s default adaptive data rate. The relationship between the algorithm and the number of lost packets in the research over time is shown in Figure3. The experimental results show that the network congestion occurs in about 12 seconds. The default LoraWAN method has a higher number of packet losses than the method in the research. The value of ADR_ MSG_CNT of 15 source nodes in this method is 30 within 0 ∼ 10 seconds. However, the RCV_ACK_CNT of some nodes is 0 [23]. The network server predicts the network congestion state through logistic regression classifier and shares the predicted weight with each terminal node. The network congestion is predicted at about 8 seconds. After waiting for a random avoidance time of 2 ∼ 6 seconds, the network congestion begins to be alleviated at about 15 seconds. The subsequent packet loss curve is smoother than LoraWAN’s default. It shows that the proposed algorithm can increase the avoidance time of nodes according to the predicted degree of network congestion to avoid the loss of a large number of packets caused by congestion.Figure 3
Changes in the number of packet loss over time.By comparing the method in the research with LoraWAN’s default adaptive data rate algorithm, the relationship between the average transmission delay time and the number of sending packets at different rate levels is obtained as shown in Figure4–Figure 7 [24].Figure 4
Comparison of data rate level DR3.Figure 5
Comparison of data rate level DR2.Figure 6
Comparison of data rate level DR1.Figure 7
Comparison of transmission delay according to the number of received packets.Figure4 and Figure 6 show the relationship between the number of the network sending packets and the average transmission delay time of the two algorithms. The data transmission delay of the proposed method is significantly better than the original LoRaWAN default adaptive data rate algorithm.Figure7 shows the relationship between packets received by the network server and data transmission delays. The network server received a total of 150 packets. When the default data rate is set to DR3, the terminal device changes speed for every 50 packets sent. As seen in Figure 7, the data transfer delay of the input method is much less than the old LoRaWAN adaptive data rate algorithm.Now, the LoRaWAN change data rate algorithm relies on ACK data to control data speed regardless of integration. This reduces data rates by changing the radio frequency adjustment during a network crash. As a result, low data rates lead to slower transmission during emergencies. However, the procedures outlined in the study can increase the elimination time when maintaining data on a regular basis. It uses educational resources to control data rates across state networks. Therefore, although the proposed method has more backoff time than the existing algorithms, the results show that the transmission delay is less than the existing algorithms, and it can achieve efficient data transmission in the network congestion environment [25].


## 5. Conclusions

Based on the analysis of the LoRaWAN adaptive data rate algorithm, an improved adaptive data rate method was proposed in the research. The logistic regression classifier was used to predict network congestion and then whether to switch different data rates or adjust avoidance time was determined according to the results of the classifier. If the network congestion occurred, the terminal device selected a random avoidance time, and otherwise, it switched to a lower rate to expand the network coverage. Experimental results showed that the proposed method was more efficient than the existing algorithms for adaptive data rate adjustment considering network congestion.



---

*Source: 4415500-2022-11-17.xml*