# LoRaWAN Base Station Improvement for Better Coverage and Capacity
## 3 Design of LoRaWAN Base Station
### Proposed Improvement for LoRaWAN Base Station  
To improve reception, capacity and to provide added flexibility in the spatial coverage an upgrade of the existing base station design is proposed. This is achieved using an additional (second) concentrator and a prototype is built also using Raspberry Pi microcomputer. Both concentrators are connected with the Raspberry Pi via predefined SPI connections SPI0 and SPI1:  
* SPI clock,
* Master in slave out (MISO),
* Master out slave in (MOSI), and
* Slave select (SS).  
Raspberry Pi and concentrators used in the measurements are shown in Figure 3. Pins on concentrators and Raspberry Pi used in SPI connections are defined by the manufacturer. Along with SPI connections, each concentrator has its own Reset signal connection which is used to start the initialization process of that concentrator. Reset pin on the Raspberry Pi can be any GPIO (General-Purpose Input/Output) pin. Detailed pinout of the system is given in Table 1. The implemented program initializes each concentrator, connects them as two gateways to TTN and for each of them runs packet forwarder. Defining two gateways on TTN is important so that communication on each concentrator can be tracked and analyzed separately. As mentioned, this paper focuses on base station model with two concentrators since it is the simplest case. However, the same principle can be used for base stations with more than two concentrators to provide more flexibility.  
Apart from improving the capacity, two concentrators and primarily their antennas can be positioned in a way to best suit certain application. The example shown in Figure 4  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Connection** & **RPI Pin-SPI 0** & **RPI Pin-SPI 1** & **Concentator Pin** \\ \hline Reset & 13 & 22 & 13 \\ SPI clock & 23 & 40 & 14 \\ MISO & 21 & 35 & 15 \\ MOSI & 19 & 38 & 16 \\ SS & 24 & 36 & 17 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Pin configuration of the proposed dual-concentrator system.  
Figure 2: Radiation pattern of (**a**) omnidirectional and (**b**) directional antenna. Omnidirectional antenna is used in the standard base station. Metal surface set behind the omnidirectional antenna produces directional radiation pattern in (**b**).  
positions the antennas next to the metallic edge (emulating a large pillar or edge of the building) to demonstrate one possibility. This is beneficial in dense sensor environments (Smart city case) where often due to congestion some messages can be lost.  
Two SPI connections enable two sets of concentrator and antenna to work in parallel without interrupting each other. The challenge of such a setup is that messages received from both concentrators are sent towards Network Server and that causes duplicates. This can be solved by adding a filtering function before forwarding packets to the network. However, since Network Server already filters duplicates for each application there is no need for that.  
Second concentrator/antenna set enhances network capacity and network coverage in the wanted direction when combined with metal surface that provides sector-shaped radiation pattern. Metal surface behind each antenna was 30 cm high and 50 cm wide. The antenna is set 8.6 cm away from the metal surface which is approximately \(\lambda/4\) in LoRaWAN frequency range (868 MHz) to ensure that antenna remains well matched. Obtained radiation pattern for this setup for one of the antennas is shown in Figure 2b).