A MAC layer design method based on Lora to meet the hybrid service transmission of indoor positioning system
By designing a LoRa MAC layer protocol that supports hybrid service transmission, LoRaWAN's shortcomings in voice service transmission are solved, and it achieves higher channel utilization and network performance, and adapts to diverse IoT application scenarios.
Patent Information
- Application Number
- CN202510206177.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-02-25
AI Technical Summary
The existing LoRa communication scheme fails to effectively support voice service transmission, resulting in LoRaWAN's poor performance in advanced scheduling tasks and voice scheduling services.
A MAC layer protocol based on LoRa is designed to support hybrid service transmission, including conventional data services, burst services and voice services. By clarifying the design requirements of application scenarios, calculating the frame division and resource utilization ratio of different services, optimizing the division and allocation of channel resources, and ensuring high priority processing of voice services.
It effectively improves the channel utilization and performance of the LoRaWAN network, fills the gap in LoRaWAN in voice service transmission, and can better adapt to diversified application scenarios and growing service needs.
Smart Images

Figure CN119697619B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless network communication, and in particular to a MAC layer design method for hybrid service transmission of an indoor positioning system based on Lora. Background Art
[0002] Low Power Wide Area Network (LPWAN), an IoT network access technology with wide coverage, low cost, simple deployment, and support for a large number of connections, has a good prospect and is widely used in the realization of the IoT. As a wireless communication technology designed specifically for IoT applications, LPWAN technology has the advantages of low power consumption, low bandwidth, low cost, long distance, and large coverage capacity compared to traditional wireless communication technologies such as WiFi, ZigBee, and Bluetooth. It is suitable for battery-powered IoT devices that send small amounts of data over long distances. LPWAN technology can be divided into two categories from the perspective of spectrum: one is LoRa, SigFox and other technologies that work in unlicensed spectrum, i.e., ISM band; the other is LTECat-m, NB-IoT and other technologies that work in licensed spectrum.
[0003] Compared with the current low-power wide area network technology, LoRa technology, as an unlicensed spectrum LPWAN technology, has the characteristics of flexible network construction, low deployment cost, and fast commercialization. LoRa technology is a relatively fast-growing and relatively mature technology in LPWAN. As a long-distance communication system launched by the LoRa Alliance, it has been well developed and has two main layers: the physical layer and the MAC layer (i.e. LoRaWAN). The LoRa physical layer mainly uses linear frequency modulation technology (CSS, Chirp Spread Spectrum), which is suitable for long-distance, low-power, and low-throughput communications. The LoRaMAC layer (LoRaWAN) provides a data control mechanism that enables many terminals using LoRa modulation to communicate with base stations.
[0004] In summary, the premise of various technologies is data control. The process of data generation, collection, transmission, and exchange by physical devices is the most basic state of communication. To realize these processes, the medium access control protocol (MAC) is indispensable. The MAC protocol controls the mode, priority, and other functions of data transmission to ensure the effectiveness and timeliness of data transmission. The MAC protocol specifies the way in which nodes occupy wireless channels when transmitting data. It reduces transmission delays and improves network throughput and service quality through communication protocols and communication mechanisms. LoRaWAN has a wide coverage area, low power consumption, and multiple connections. LoRa has been applied to various industries such as agriculture, industry, and smart alarm in the field of the Internet of Things. However, due to the difference in actual needs, no research on low-power network cluster scheduling has been found in comparison of various types. Therefore, this topic mainly studies the design of a hybrid service transmission solution for indoor positioning systems based on LoRa for low-power networks. The physical layer of the construction of a low-power network is of great significance. The media access control (MAC) layer protocol is an important part of the LoRa wireless network, which determines the transmission mode, priority, and processing of various services. Reducing communication conflicts, lowering power consumption, and enabling mixed processing of various services are important issues in MAC layer protocol research.
[0005] The survey found that the mainstream of the current Lora communication solution is to transmit data services, and the main access method of LoraWAN is based on the aloha protocol. In order to meet the application requirements of the indoor positioning system of the low-power wide area network, considering that the ability to transmit voice services can greatly expand the scope of use of Lora, it is necessary to design a hybrid service transmission solution to support the rapid response of random services in consideration of the transmission of mixed services. The current transmission solution does not take into account the transmission of voice services. Although the existing data service transmission can meet the positioning requirements, it is difficult to support more advanced scheduling tasks and voice scheduling services.
[0006] Current research cannot take into account the communication needs of multiple data services in indoor positioning application scenarios. In order to make up for the gap in Lora's voice communication field in low-power wide area networks, promote the practical application of Lora technology, and improve the performance of the LoRaWAN protocol, a new MAC layer protocol needs to be designed: this protocol can meet burst services, regular services, voice services, and can perform voice service scheduling. Summary of the invention
[0007] The present invention aims to solve the technical problems existing in the related art at least to a certain extent: the current transmission schemes do not take into account the transmission of voice services, and although the existing data service transmission can meet the positioning requirements, it is difficult to support more advanced scheduling tasks and voice scheduling services.
[0008] In order to achieve the above-mentioned object, the present invention provides a MAC layer design method for hybrid service transmission of an indoor positioning system based on Lora, comprising the following steps:
[0009] S1. Clarify the design requirements of the application scenario;
[0010] S2. Determine the channel conditions and cooperation mode for hybrid service transmission according to the design requirements;
[0011] S3. Clarify the network access method and channel resource division;
[0012] S4, calculating the division of frames of different services to meet the transmission of mixed services;
[0013] S5. Calculate the overhead allocation and design the resource occupancy ratio of each service frame;
[0014] S6. Calculate the working efficiency of the service transmission channel.
[0015] Preferably, the design requirements of the application scenario are clarified in step S1, specifically:
[0016] S11. Clarify the radio spectrum and coverage of the application scenario;
[0017] S12. Calculate the link budget of the radio system according to the radio propagation conditions in the application scenario.
[0018] Preferably, the link budget calculation method described in step S12 is as follows:
[0019]
[0020]
[0021] in is the received power (dBm), is the transmit power (dBm), is the transmit antenna gain (dB), is the receiving antenna gain (dB), is the path loss, is the link margin (dB). >0, communication can proceed normally. is the receiver sensitivity (dBm).
[0022] Preferably, the mixed service in step S2 is mainly composed of three types of services: regular data service, burst service and voice service. The channels for mixed transmission of different services are determined according to the transmission characteristics of the three services: a first transmission channel that is a mixture of regular service channels and burst services, and a second transmission channel that is a mixture of voice service channels and regular service channels. The second transmission channel takes voice service as a high priority, and channel resources are preferentially allocated to voice service.
[0023] Preferably, step S6 calculates the working efficiency of the service transmission channel, specifically:
[0024] S61, calculating the working efficiency of the voice service channel;
[0025] S62: Calculate the collision rate and time slot utilization rate of the superframe.
[0026] Preferably, step S61 calculates the working efficiency of the voice service channel, specifically:
[0027] Total time = beacon frame time + voice data time interval
[0028] Utilization rate = voice data time interval / beacon frame time in ms × 100%
[0029] Preferably, step S62 calculates the collision rate and time slot utilization of the superframe, and the collision rate and time slot utilization are calculated as follows:
[0030] Collision rate calculation:
[0031]
[0032] In the formula, is the total number of nodes that compete to send data within the multiframe length, for The total number of nodes that collide in is the number of nodes to be connected to the network within the multiframe length, is the number of nodes that need to send burst service data within the multiframe length, is the number of nodes that need to retransmit data within the multiframe length,
[0033] Calculation of time slot utilization:
[0034]
[0035] In the formula, is the multiframe length, It is the total time to successfully send and receive data within the multiframe length.
[0036] Preferably, step S3 specifies the network access mode and channel resource division as follows:
[0037] S31. After analyzing the advantages and disadvantages of various access methods, the entire channel resources are divided into two parts according to the needs of mixed services: non-competitive part and competitive part. The non-competitive part is accessed in TDMA mode, and the competitive part is accessed in S-aloha mode.
[0038] S32. Divide channel resources according to channel bandwidth and spreading factor.
[0039] Preferably, step S4 calculates the division of frames of different services to meet the transmission of mixed services, specifically:
[0040] S41, dividing the working cycle of the node into a structure of superframe, multiframe and time slot;
[0041] S42, designing the length of superframe, multiframe and time slot;
[0042] S43, dividing the competitive part and the non-competitive part into four parts: network access, regular service, burst service and voice service, and then dynamically allocating the channel resources occupied by the four parts.
[0043] Beneficial effects: The MAC layer design method for hybrid service transmission of indoor positioning system based on Lora of the present invention has the following advantages compared with the prior art:
[0044] 1. This application proposes an innovative strategy, including node multi-frame access, division of dedicated TDMA time slots, and full exploitation of the value of unallocated TDMA time slots. The implementation of these strategies effectively optimizes the use of channels, reduces data transmission conflicts, and thus improves the performance of the entire network.
[0045] 2. The present invention effectively fills the gap in voice service transmission of LoRaWAN by adding voice service, and also significantly improves the channel utilization rate. These improvements not only improve the overall performance of the network, but also provide more possibilities for future IoT applications, so that the LoRaWAN network can better adapt to the growing business needs and diversified application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a hierarchical structure diagram of the workflow in an embodiment of the present invention;
[0047] Figure 2 is a diagram of a superframe structure in an embodiment of the present invention;
[0048] Figure 3 is a logic flow chart of the access steps in the embodiment of the present invention;
[0049] Figure 4 is a diagram of a conventional service superframe structure in an embodiment of the present invention;
[0050] Figure 5 This is a simulation diagram comparing access collision rates of TDMA access and pure S-aloha access as the number of nodes increases in an embodiment of the present invention;
[0051] Figure 6 This is a flow chart of the management of voice service nodes by the gateway in an embodiment of the present invention;
[0052] Figure 7 A diagram showing a superframe structure of a voice service in an embodiment of the present invention;
[0053] Figure 8 This is a diagram showing the resource occupation structure of a voice service frame in an embodiment of the present invention;
[0054] Fig. 9 The overall collision rate variation diagram of the simulation calculation of 0 to 200 nodes access in the embodiment of the present invention;
[0055] Fig.10 This is a graph showing the variation of channel utilization when 0 to 200 nodes are accessed through simulation in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0057] like Figure 1 As shown in the figure, the MAC layer entity is divided into the user plane and the control plane. The control plane (Control) is referred to as the C plane. As the management center, it is responsible for establishing links and controlling entities. The user plane (User) is responsible for collecting regular business data and initiating voice requests. Both parties process data at the MAC layer. According to the difference in business, the MAC layer adopts access control solutions to deal with different businesses.
[0058] Example: Figure 2-10 As shown, the present invention provides a MAC layer design method for hybrid service transmission of an indoor positioning system based on Lora, and the method comprises the following steps:
[0059] S1. Clarify the design requirements of the application scenario;
[0060] S2. Determine the channel conditions and cooperation mode for hybrid service transmission according to the design requirements;
[0061] S3. Clarify the network access method and channel resource division;
[0062] S4, calculating the division of frames of different services to meet the transmission of mixed services;
[0063] S5. Calculate the overhead allocation and design the resource occupancy ratio of each service frame;
[0064] S6. Calculate the working efficiency of the service transmission channel;
[0065] Step S1 defines the design requirements of the application scenario. In the embodiment, first, Lora technology is a communication technology for low-power wide area networks, and its operating frequency band varies depending on the radio spectrum regulations of countries and regions. The working frequency band of this design is intended to be designed in the working 470Mhz frequency band, which can adapt to open scenarios such as industrial use environments and outdoor environments with a coverage range of 5KM.
[0066] The link budget of the radio system is then calculated to satisfy the propagation conditions of the radio system:
[0067]
[0068] in is the received power (dBm), is the transmit power (dBm), is the transmit antenna gain (dB), is the receiving antenna gain (dB), is the path loss.
[0069] The main types of wireless transmission loss are path transmission loss, shadow effect, and multipath effect. Path transmission loss is caused by the transmission distance, which causes signal power loss; shadow effect is mainly caused by the signal encountering high buildings or hills during the transmission process, which will block the signal and cause transmission signal loss; multipath effect is mainly caused by scattering, refraction, diffraction, etc. during the transmission process of the signal, resulting in the signal received at the receiving end being a signal superimposed by multiple paths.
[0070] As long as the received power value is greater than the sensitivity of the receiver module, the communication message can be received normally. The link margin is calculated as follows:
[0071]
[0072] :Link Margin, in decibels (dB), represents the difference between the received signal strength and the receiver sensitivity. When >0, communication can proceed normally. The larger the link margin, the higher the stability and reliability of the system.
[0073] : Received Power, in decibel milliwatts (dBm), indicates the signal power received by the receiver;
[0074] : Receiver Sensitivity, measured in decibel milliwatts (dBm), indicates the minimum signal power level at which the receiver can operate normally;
[0075] : Transmitted Power, in decibel milliwatts (dBm), represents the signal power output by the transmitter;
[0076] : Transmitter Antenna Gain, in decibels (dB), represents the gain of the transmitting antenna relative to an ideal isotropic antenna;
[0077] : Path loss, measured in decibels (dB), indicates the power lost by a signal during propagation due to factors such as distance and obstacles;
[0078] : Receiver Antenna Gain, measured in decibels (dB), represents the gain of the receiving antenna relative to an ideal isotropic antenna.
[0079] An antenna with a gain of 0dBi is called an isotropic antenna. In a transmitter, it spreads energy evenly in all directions and receives energy evenly from all directions. Antennas with a gain greater than 0dBi are directional, and the greater the gain, the more directional the antenna is. So antenna gain is actually a measure of the antenna's ability to focus transmitted energy in one direction, or as a receiver, to receive only one direction and not others.
[0080] The transmission network is based on the SX1268 chip, and its dielectric loss is 45dB. Specific data information is shown in Table 1 and Table 2.
[0081] Table 1 SX1268 chip specific data information
[0082]
[0083] Table 2 SX1268 chip specific data information
[0084]
[0085] Step S2 specifies the channel conditions and cooperation methods for hybrid service transmission according to the design requirements. In the embodiment, Lora technology is a low-power wide area network communication technology. Its working frequency band varies according to the radio spectrum regulations of countries and regions. It is mainly divided according to regions: Europe: Lora mainly uses 868MHz, 433MHz and 915MHz in Europe; North America: mainly 915MHz; Asia-Pacific region: The Lora frequency band and frequency regulations in the Asia-Pacific region are formulated by each country. For example, China's Lora frequency band is 470-510MHz, and the center frequency is 486MHz. The working frequency band of this design is intended to be designed in the working 470Mhz frequency band. The hybrid service mainly consists of three types of services: conventional data service, burst service, and voice service. Conventional service: Conventional service includes data that needs to be reported periodically, such as data in the use environment such as meter reading or temperature and humidity transmission, which are reported regularly according to a certain period, and the data volume is approximately stable. Burst business: Burst business generated in the working environment, such as triggering security alarms or reporting of emergency business. Burst business is generated randomly, and the size of the burst business data generated randomly each time is different. Voice business: Compared with the first two types of business, voice business has higher channel requirements: because voice business has higher real-time requirements, smaller latency, lower collision rate and higher communication security. Determine the transmission of mixed business: the first transmission channel is a mixture of regular business channels and burst business, and the second transmission channel is a mixture of voice business channels and regular business channels. The second transmission channel takes voice business as a high priority, and channel resources are allocated to voice business first.
[0086] Step S3 clarifies the network access method and the division of channel resources. In the embodiment, considering that the access method of LoraWAN is S-aloha, the access collision rate and channel utilization rate of S-aloha are simulated. This method has low channel utilization rate and poor ability to deal with sudden network disconnection and network congestion. When the pure ALOHA protocol is working, it does not monitor the channel, does not send according to the time slot, and retransmits randomly. Send whenever you want, with high flexibility and high randomness. A random retransmission mechanism is adopted after a conflict occurs. This method has high flexibility and random transmission. The collision rate model of the data satisfies the Poisson process. When the amount of data reaches a certain level, the collision rate will surge.
[0087] The collision law of this process satisfies the Poisson process:
[0088]
[0089] Among them, λ is the average number of events per unit time, k is the number of events, and e is the base of the natural logarithm.
[0090] In slotted Aloha communication, there are three states: successful transmission, idle, and data collision. The three states are independent of each other and follow the Poisson distribution:
[0091] When k = 1, it means success.
[0092] When k = 0, it means idle
[0093] Success rate:
[0094] Collision rate:
[0095] Idle rate:
[0096] Among them, G represents the average number of times an event occurs. Here, i and j are two parameters in the binomial distribution, which represent the number of times two possible results occur in a certain number of independent experiments. i represents the number of successes, that is, the number of times an event occurs. G represents the average number of times an event occurs per unit time, so i can represent the specific number of times an event occurs in a certain time interval.
[0097] j represents the number of failures, that is, the number of times the event did not occur. j can represent the number of times the event did not occur within a specific time interval.
[0098] The slotted Aloha protocol, in order to control the randomness of the pure Aloha protocol, divides the time into several equal time slices. All users access the network channel synchronously at the beginning of the time slice. If a conflict occurs, they must wait until the beginning of the next time slice to send again. Further control of random Aloha reduces the collision rate of retransmissions that may collide again.
[0099] Further calculation of channel congestion:
[0100] Channel utilization = effective data transmission time / total channel time × 100%
[0101] The collision rate is further calculated:
[0102] Collision rate (Pc): Assuming that there are i collisions (B) and j non-collisions (UI) within T time, the corresponding probability is: Pc = 1-P (no collision) - P (success)
[0103] Among them, P (no collision) refers to the probability that no user attempts to send data in the time slot, and P (success) refers to the probability that exactly one user sends data in the time slot.
[0104] In slotted Aloha, if p is the probability that a single user attempts to transmit in any slot, then:
[0105] P(no collision) =
[0106] P(Success) =
[0107] Therefore, the collision rate Pc can be expressed as:
[0108]
[0109] This formula more accurately reflects the collision rate calculation in the Slotted Aloha protocol.
[0110] Further exploration of the optimization of access methods shows that choosing a single control access technology cannot adapt to the large changes in low-power network structure. Sudden changes in network structure will quickly reduce the efficiency of existing supporting control protocols. Therefore, a hybrid access mechanism becomes the best choice, taking into account the real-time performance of contention-based protocols and the lower collision rate of non-contention protocols.
[0111] The addition of TDMA improves access efficiency and channel utilization. TDMA (Time Division Multiple Access) divides time into a series of time slots, and then allocates these time slots to different users for communication, which improves the utilization of channel resources. After the addition of TDMA, each user monopolizes the channel in the specific time slot allocated, achieving the purpose of multiple users sharing the same channel resources.
[0112] According to the needs of mixed services, the entire channel resources are divided into two parts: non-competitive and competitive. The access of the non-competitive part is based on TDMA access, the purpose is to ensure the transmission of regular services and voice services; the competitive part is based on S-aloha access, meeting the needs of regular node access, channel broadcast and burst services.
[0113] like Figure 5 As shown in the figure, the collision rate of TDMA and S-aloha access methods increases with the increase of the number of nodes. When the number of nodes is the same, the collision rate of S-aloha access method is significantly higher than that of TDMA access method. Moreover, as the number of nodes continues to increase, the collision rate of S-aloha access method is infinitely close to 100%.
[0114] Finally, refer to the lorawan white paper to divide the existing channel resources, compress the voice compression bit rate to 3Kbps, and divide the channel resources according to the channel bandwidth, spreading factor, etc. The specific division is shown in Table 3:
[0115] Table 3 Channel division and parameters
[0116]
[0117] Step S4 calculates the division of frames of different services to meet the transmission of mixed services. In the embodiment, firstly, in order to be compatible with the transmission of mixed services, the transmission period of periodic services and the irregular bursts of burst services are taken into consideration, and the delay requirements of voice services are also met, such as Figure 2 As shown, the working cycle of the node is divided into a structure of superframe, multiframe and time slot.
[0118] Then, considering the size of all data services, the superframe length is designed to be 64s, the multiframe length is 2s, and the payload length of the Lora frame is limited by the statistical calculation of the payload length by the frame header. Therefore, the effective sub-load of the Lora frame is generally around 251 bytes. Therefore, the time slot length is divided into 35ms, which is compatible with voice services and meets the needs of all the above services.
[0119] Next, the multiframe is divided into:
[0120] like Figure 4 As shown, the hybrid channel division scheme of conventional services and burst services divides the contention part and the non-contention part into three parts: network access, conventional services, and burst services.
[0121] The gateway initiates the broadcast of the network access part, broadcasting Beacon frames to inform the channel status, access method and resource division, such as Figure 3 As shown, after the node is powered on, it searches for the Beacon frame broadcast by the gateway and tries to access in the contention part according to the broadcast information. After access, the node will allocate some resources in the TDMA part for transmitting regular services, and the remaining non-fixed TDMA time slots can be used as the contention part for burst services.
[0122] Finally, a mixed service channel mainly for voice services is divided. The structure of the broadcast part is the same as that of the mixed channel for regular services and burst services. There are two ways to access the nodes of the voice service: the first is to initiate the voice service demand after accessing the network, search for the Beacon frame of the corresponding voice service channel again, access according to the resource division of the Beacon frame, and allocate all TDMA parts for sending voice services. The competition part is used for node access and to ensure the sending of regular and random services under the voice service.
[0123] like Figure 6 As shown, after receiving the voice service channel application, the gateway first prepares the resource table, then allocates numbers and spaces to the access nodes and records the registration, and finally sends information and reserves or updates the nodes.
[0124] In this example, the compressed voice rate is 3kbps. According to the maximum time of the voice service packet of 2s, there are a total of 6000 bits. The delay that does not affect human hearing recognition of voice information is 0.5s. Each voice interval is: 6000 / 4=1500bits1500 / 8=187.5 bytes.
[0125] Step S5 calculates the overhead allocation and designs the resource occupancy ratio of each service frame. In the embodiment, the format of the data packet defined in LoRaWAN, a complete data packet mainly consists of four parts: preamble, header, payload and cyclic redundancy check (Payload CRC). The functions implemented by each part of the data packet will be described in detail below.
[0126] TS=BW / 2^SF=250Khz / 128=0.512ms / symbol
[0127] N_Preamble_symbols=12.25, Preamble_length=4.22ms
[0128] N_Header_Symbols=20*2 / 7+16*5 / 4 / 7=8.57,Header_length=4.38ms
[0129] The fixed header has 21 symbols in total, with a length of 10.75ms. Considering the inter-frame gap of 2ms, the total length is 13ms.
[0130] The longest Beacon design that meets all conditions is 27 bytes, which consumes resources: (27*8*5 / 4) / 7=[38.57symbol]=39symbols, and the fixed header consumes 21symbols, which takes 13ms. The entire beacon frame consumes 60symbols, and a total of [30.72ms]=31ms.
[0131] Voice data: 187.5 bytes, (1500*5 / 4) / 7=267.8 symbols, TS=268*0.512=137.2ms. Plus the fixed header of 13ms, a total of 151ms. Considering the guard interval and the part that needs to be adjusted, each time slot is divided into 35ms.
[0132] 151 / 35ms=4.3, rounded to 5 time intervals. A total of 57 time intervals.
[0133] Then design the voice service frame resource occupancy
[0134] like Figure 7 , Figure 8 As shown, each multiframe is divided into 57 time slots, and the entire multiframe is divided into four parts: the 0th to 14th time slots are the first part, the first part 0 to 5 time slots are used as the contention part, 6 to 14 time slots are used as TDMA, and the last 5 time slots are used as the fixed occupied part for voice service transmission, and do not participate in the transmission of other services; the 15th to 29th time slots are the second part, the first 6 time slots of this part are used as the contention part, the last 8 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly allocated to the voice service; the 30th to 44th time slots are the third part, the first 6 time slots of this part are used as the contention part, the last 8 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly allocated to the voice service; the 45th to 56th time slots are the fourth part, the first 6 time slots of this part are used as the contention part, the last 6 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly occupied as voice services.
[0135] Step S6 calculates the working efficiency of the service transmission channel. In the embodiment, the working efficiency of the voice service channel is first calculated:
[0136] Total time = 31ms (Beacon) + 151ms (voice data) = 182ms
[0137] Utilization = 151 ms / 182 ms×100%≈83.0%
[0138] The collision rate of a superframe is further calculated. The structure of a superframe is 64s, divided into 32 multiframes, each multiframe is 2s long, and each multiframe is divided into 57 time intervals. The first competition part of the first multiframe of each superframe transmits a fixed beacon frame, and the remaining competition parts randomly access users. It is expected that at least 4 users will be accessed in each competition part, and all channels in this part have a common structure.
[0139] The TDMA part of the conventional mixed part allocates time slots according to the transmission period of random services; for the voice service mixed channel, the last 5 time intervals of the TDMA part are used to transmit voice services, and the rest are used for random services and conventional services.
[0140] I want to calculate the collision rate and time slot utilization of all services in this superframe. Use Matlab to calculate.
[0141] Based on the given superframe structure and time interval allocation, we can calculate the collision rate and time slot utilization of this superframe.
[0142] This paper mainly analyzes the performance of various traffic channel MAC schemes from two aspects: collision rate and time slot utilization. In simulation, the collision rate is the ratio of the number of nodes that collide in the multiframe to the total number of nodes that compete to send data.
[0143] The time slot utilization is the ratio of the total time to successfully send data in a multiframe to the multiframe length. The calculation formulas for these two performances are
[0144] Collision rate calculation:
[0145]
[0146] In the formula, is the total number of nodes that compete to send data within the multiframe length, for The total number of nodes that collide in is the number of nodes to be connected to the network within the multiframe length, is the number of nodes that need to send burst service data within the multiframe length, is the number of nodes that need to retransmit data within the multiframe length.
[0147] Calculation of time slot utilization:
[0148]
[0149] In the formula, is the multiframe length, It is the total time to successfully send and receive data within the multiframe length.
[0150] To verify the transmission effect of this embodiment, this embodiment is programmed in MATLAB to simulate the measurement method:
[0151] The ratio of superframe is 6:9, s-aloha and TDMA occupy a multiframe of 2s respectively, and a multiframe is divided into 35ms as a time slot, which is divided into 57 time slots in total, with a total of 64s long, divided into 32 multiframes and 1824 time slots in total. The maximum length of the data packet is 251 bytes. Considering the extreme case that all nodes have periodic services to send, the sending period is 8s and 16s; 10% of the nodes have burst services to send, and the situation of sending burst services is random. The burst service data packet is about 50 bytes; 10% of the nodes have voice services to send, and the length of voice service data is 200 bytes. It is arranged as follows: each multiframe is divided into 57 time slots, and the entire multiframe is divided into four parts: 0 to 14 as the first part, 0 to 5 as the second part. The first time slot is used as the contention part, the 6th to 14th time slot is used as TDMA, and the last 5 time slots are used as the fixed occupied part for voice service transmission, and do not participate in the transmission of other services; the 15th to 29th time slots are used as the second part, the first 6 time slots of this part are used as the contention part, the last 8 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly allocated to voice services; the 30th to 44th time slots are used as the third part, the first 6 time slots of this part are used as the contention part, the last 8 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly allocated to voice services; the 45th to 56th time slots are used as the fourth part, the first 6 time slots of this part are used as the contention part, the last 6 time slots are used as the TDMA part, and the last 5 time slots of this part are fixedly occupied by voice services. The first contention part of the first multiframe of each superframe transmits a fixed beacon frame, and the remaining contention parts are randomly accessed by users. It is expected that at least 4 users will be connected to each contention part. All channels in this part have a common structure. The TDMA part of the conventional mixed part allocates time slots according to the transmission period of random services. For the voice service mixed channel, the last 5 time intervals of the TDMA part transmit voice services, and the rest are used for random services and conventional services. It is planned to write a simulation program on matlab to calculate 0 to 200 node accesses, collision rate and channel utilization.
[0152] The obtained results significantly reduce the collision rate, such as Fig. 9 , Fig.10 As shown in the figure, when the number of nodes is less than 200, the collision rate is controlled below 0.3, and the channel utilization rate is high. It can also accommodate more nodes, and the number of nodes in the design range will be larger. The scope of application of the system is expanded to meet the diverse business needs of users. In a multimedia communication system, users may need multiple services at the same time, such as voice scheduling, which has high requirements for real-time and bandwidth, and instant messaging, which has high requirements for real-time but relatively low bandwidth requirements. The hybrid business model can provide these different types of services on the same platform.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A MAC layer design method based on Lora to meet the hybrid service transmission of indoor positioning system, characterized in that: The steps include: S1. Clarify the design requirements of the application scenario; S2. According to the design requirements, the channel conditions and cooperation mode for the transmission of mixed services are clarified; the mixed services are mainly composed of three types of services: conventional data services, burst services, and voice services. According to the transmission characteristics of the three types of services, the channels for the mixed transmission of different services are determined: a first transmission channel for the mixture of conventional service channels and burst services, and a second transmission channel for the mixture of voice service channels and conventional service channels. The second transmission channel takes voice services as a high priority, and channel resources are preferentially allocated to voice services. S3. Clarify the network access method and channel resource division, specifically: S31. After analyzing the advantages and disadvantages of various access methods, the entire channel resources are divided into two parts according to the needs of mixed services: non-competitive part and competitive part. The non-competitive part is accessed in TDMA mode, and the competitive part is accessed in S-aloha mode. S32, dividing the channel resources according to the channel bandwidth and the spreading factor; S4, calculating the division of frames of different services to meet the transmission of mixed services; S5. Calculate the overhead allocation and design the resource occupancy ratio of each service frame; S6. Calculate the working efficiency of the service transmission channel.
2. According to claim 1, a MAC layer design method for hybrid service transmission of indoor positioning system based on Lora is characterized in that: In step S1, the design requirements of the application scenario are clarified, specifically: S11. Clarify the radio spectrum and coverage of the application scenario; S12. Calculate the link budget of the radio system according to the radio propagation conditions in the application scenario.
3. According to claim 2, a MAC layer design method for hybrid service transmission of indoor positioning system based on Lora is characterized in that: The link budget calculation method described in step S12 is as follows: ; ; in is the received power, is the transmit power, is the transmit antenna gain, is the receiving antenna gain, is the path loss, is the link margin. When the link margin When the communication can be carried out normally, is the receiver sensitivity.
4. According to claim 1, a MAC layer design method for hybrid service transmission of indoor positioning system based on Lora is characterized in that: Step S6 calculates the working efficiency of the service transmission channel, specifically: S61, calculating the working efficiency of the voice service channel; S62: Calculate the collision rate and time slot utilization rate of the superframe.
5. According to claim 4, a MAC layer design method for hybrid service transmission of indoor positioning system based on Lora is characterized in that: Step S61 calculates the working efficiency of the voice service channel, specifically: Total time = beacon frame time + voice data time interval; Utilization rate = voice data time interval / beacon frame duration in ms × 100%.
6. According to claim 4, a MAC layer design method for hybrid service transmission of indoor positioning system based on Lora is characterized in that: Step S62 calculates the collision rate and time slot utilization of the superframe, and the collision rate and time slot utilization are calculated as follows: Collision rate calculation: ; In the formula, is the total number of nodes that compete to send data within the multiframe length, for The total number of nodes that collide in is the number of nodes to be connected to the network within the multiframe length, is the number of nodes that need to send burst service data within the multiframe length, is the number of nodes that need to retransmit data within the multiframe length, Calculation of time slot utilization: ; In the formula, is the multiframe length, It is the total time to successfully send and receive data within the multiframe length.
7. The MAC layer design method for hybrid service transmission of indoor positioning system based on Lora according to claim 1 is characterized in that: Step S4 calculates the division of frames of different services to meet the transmission of mixed services, specifically: S41, dividing the working cycle of the node into a structure of superframe, multiframe and time slot; S42, designing the length of superframe, multiframe and time slot; S43, dividing the competitive part and the non-competitive part into four parts: network access, regular service, burst service and voice service, and then dynamically allocating the channel resources occupied by the four parts.
Citation Information
Patent Citations
Method for realizing digital cluster interphone based on LoRa technology and interphone
CN106658433A
Low delay intelligent substation wireless communication mechanism
CN109548165A