# How To Calculate The Network Capacity of LoRaWAN Gateway?

How To Calculate The Network Capacity of LoRaWAN Gateway?

For those who need to buy a LoRaWAN gateway, perhaps the most important question is: how many nodes can a gateway contain? I have N nodes, how many LoRaWAN gateways do I need? Unfortunately, there is no easy answer to this question.

## The number of nodes that a single LoRaWAN gateway can accommodate

### 1. Theoretical value

Assuming that a single gateway can receive at most a data packets per day, and the application packet frequency of each node is b data packets per hour, then the theoretical value of the maximum number of nodes that a single gateway can accommodate is calculated as follows:

S=a/(24*b).

For example, if a single LoRaWAN gateway is equipped with an SX1301 chip, it can receive up to 1.5 million data packets per day. If the application frequency is 1 packet per hour, then theoretically the number of nodes that the LoRaWAN gateway can access S = 1,500,000 /(24*1) = 62500.

### 2. Actual value

The actual value of the number of nodes that a single gateway can accommodate is much more complicated than the calculation of the theoretical value. For a certain gateway, the maximum number of data packets that it can receive per day is also determined. The difficulty lies in how many packets each node sends per day.

In the same application scenario, we need to determine the total data length sent by the node every day. However, it is uncertain what packet length and sending rate the data of a certain length should be sent. If the packet length is different, the number of packets that need to be sent will inevitably be different.

For example, under different signal strengths, the spreading factor SF used is also different, then the length of the data that can be sent is also different, and the length of the data that can be sent each time is different, resulting in the number of packets that need to be divided. It is not the same, so that even if the same gateway and the same node are used, the maximum number of nodes accommodated by a single gateway is not the same under different service modes of the nodes.

For a gateway with 8 channels, without LBT (monitor channel before sending packet), the specific calculation formula is:

The channel capacity (that is, the number of nodes) S=8T/2et0.

Among them, 8 represents 8 channels, T represents the transmission interval, which is related to the packet length and rate, 1/2e is the maximum throughput of the basic Aloha algorithm, e is a constant, equal to 2.718, and t0 represents the ToA (Time on Air) of a single packet. .

Under the premise of 10-byte load, the relationship between rate and ToA is shown in The following table.

Table above Corresponding table of LoRaWAN rate and single-packet air flight time ToA under the premise of 10-byte load

As an example, if you use the SX1301 chip, in the absence of LBT (monitor channel before sending packets), and the average air flight time of each packet t0=100ms (hence t0=0.1s), an average of each packet is sent once a minute ( So T=60s), then how many such average nodes can be accommodated? S=8*60/(2*2.718*0.1)=883, therefore, 883 nodes can be accommodated.

Moreover, the use of different algorithms will also lead to changes in the maximum throughput, which will lead to changes in the theoretical capacity.

For example, if the prerequisites are modified to each node with LBT function, and the slotted Aloha algorithm is used instead of the previous basic Aloha algorithm for evaluation, the maximum throughput will be different due to the different algorithms. At this time, the maximum throughput is 1/ e, so the channel capacity (that is, the number of nodes) S=8T/et0, thus, the theoretical capacity is doubled, that is, 883*2=1766 nodes.

### 3. Rough estimation

If you don’t want to calculate, then we can use the following simple reference examples to make a rough estimate.

In the case of gateway signal coverage, 90% of the signal strength meets the rate above SF9, if 50 bytes are sent at a frequency of 5s, an 8-channel gateway can correspond to almost 40 terminals/nodes.

The relationship between frequency and capacity is linear. Therefore, if the actual frequency required is changed to, for example, the transmission frequency is 10s, then it can be concluded that the 8-channel gateway can access almost 80 terminals/nodes.

In the scenario where ADR is turned on and 90% of the terminal rate is greater than DR3 (SF9), the relationship between bytes and capacity is almost linear. Therefore, the bytes in the actual scenario can also be simply substituted into the above example to obtain an estimate.

### 4. Matters needing attention

• #### Number of gateways

Since it is best that 1 node can guarantee that 2~3 gateways can receive data, if it is calculated according to the above method that a total of N gateways are required to correspond to all nodes, then, in actual use, it is recommended to use 2N~ 3N gateways, instead of N gateways, correspond to all nodes to ensure that data can be received.

• #### Transmission interval

Unless there is a very special application, it is not recommended that the sending interval be less than 5s. Generally speaking, it is better to send the interval to at least the minute level.

The standard LoRaWAN protocol requires at least an interval of 2s to send a packet.

When SF sends 64 bytes, the air interface time is already close to 3s. And if you don’t comply with LoRaWAN’s air interface time requirements, although the gateway is only responsible for transparent transmission, even if the LoRaWAN protocol is not complied with, the physical layer can still receive data, but at this time the user needs to verify and test the packet loss rate by himself.

## The number of nodes that can be accommodated by the LoRaWAN gateway multi-gateway

In actual application scenarios, a single gateway cannot meet the coverage and capacity requirements.

In the case of meeting a certain signal ratio, the gateway can receive the signal data of SF7~SF12 at the same time. The demodulation and coverage capabilities of a single gateway are limited, and this capacity can be achieved theoretically, but in practice it is more difficult, but multi-gateway deployment can maximize the network capacity. Therefore, in practice, multiple gateways are often used.

1. ### Fixed rate

When the rate is fixed, if there are N gateways, then the capacity of multiple gateways = the capacity of a single gateway * N.

Among them, the capacity of a single gateway can be calculated or estimated according to the first part.

When ADR is turned on, the capacity of multiple gateways does not change linearly.

According to the actual measurement results published by Smetech, when ADR is adopted, the capacity of multiple gateways> the capacity of single gateway * N.^2.

Small Tip: Besides increasing the capacity of the gateway, enabling ADR also helps to reduce power consumption, because the ADR technology can automatically adjust the data transmission power according to the LoRa signal quality. The RAK7249/RAK7258 series products all support the ADR function. With the RAK node, it can effectively reduce the emission current of the LoRa terminal. For details, you can also refer to the article “LoRa Terminal Low Power Development Strategy”.

1. ### Multi-gateway deployment suggestions

Enabling ADR can expand the total capacity of existing gateways as much as possible on the premise of the same number of gateways.

• #### Choose the same frequency deployment

Co-frequency deployment allows nodes to connect to the nearest gateway, maximizing the ADR effect of the network. The improvement of the ADR effect is to optimize the speed of the node. An increase in rate means a decrease in TOA, which in turn means an increase in capacity and a decrease in power consumption.

Therefore, when using multiple gateways, it is recommended to use the same frequency deployment, which can accommodate more nodes than the different frequency deployment. Only when the same frequency deployment cannot meet the capacity requirements, the addition of inter-frequency gateways is considered.

• #### The deployment scope is such that 1 node can be received by 2~3 gateways

It can be seen that for the same number of LoRaWAN gateway, if you want to accommodate a larger number of nodes, you need to start to improve from the following aspects: select the appropriate length of the data to be sent, select the gateway with LBT function and use more Optimal algorithm, enable ADR, choose co-frequency deployment.

## Concluding

The above is how to calculate the gateway capacity of the LoRaWAN gateway, which involves the calculation of the number of nodes that can be accommodated by a single gateway and multiple gateways.

Written by ——