# Fast 50 Hz Updated Static Infrared Positioning System Based on Triangulation Method
## 2 Materials and Methods
### IR Beacon Transmission System  
The infrared beacon consists of an array of five PK2S-3 LJE-A high-power diodes placed on the sides of a pentagon-shaped aluminium heat sink. The beacon diodes emit infrared with a wavelength of 850 nm and are characterized by a Lambert radiation pattern, a viewing angle of 140\({}^{\circ}\) and a radiometric power for 1 A current of approximately 1560 mW [52]. Based on the manufacturer's data, the normalized intensity of a single beacon diode can be described by the approximated equation:  
\[I_{B}(\theta)=1-0.0484\theta^{2}-0.0467\theta^{4}-0.1931\theta^{6}+0.06250^{8} \qquad\text{for}\quad-\pi/2<\theta<\pi/2 \tag{6}\]  
The fit of the manufacturer's data to the polynomial is shown on the left-hand side of Figure 5.  
The approximate normalized irradiance distribution of a single transmitting diode can therefore be written using the inverse square law:  
\[E_{B}(\theta,r)=\frac{I_{B}(\theta)}{r^{2}} \tag{7}\]  
where \(r\) is the distance from the transmitting diode. For five IR transmitting diodes placed on the sides of the pentagon, the total irradiance distribution for the transmitting beacon is obtained as on the right-hand side of Figure 5.  
To avoid interference with each other's transmitted signals, the beacons operate in a synchronized cycle, so that only one beacon is operating at a time. To ensure this operation, the beacon system is equipped with a microcontroller control system, which is shown on the left side of Figure 6. The control device consists of a current driver, providing a constant current of 900 mA flowing through the transmitting diodes (see 1 in Figure 6), which is managed by the STM32G030F6 microcontroller (2 in Figure 6 on the reverse side of the PCB) [53]. The microcontroller is also responsible for controlling the nRF24L01 radio transceiver module marked as 3 which is used to synchronise the beacons operation [54]. The transmitting diodes (5 in Figure 6) placed on the heatsink 4 together with the control device, were finally placed on the mast 6 forming the transmitting beacon, as shown on the right side of Figure 6.  
Figure 4: Weighted Mean of Angles vs Approximation method comparison.  
Each of the three beacons \(B_{i}\) in the triangulation system has its own unique number \(ID_{i}\). In the synchronization cycle, the first active beacon is \(B_{1}\) then \(B_{2}\) and then \(B_{3}\). The first beacon \(B_{1}\), when it is activated, turns on the IR diodes for 5 ms and sends a radio message using nRF24L01, which contains its ID number. The rest of the beacons, meanwhile, listen to radio messages sent by the nRF24L01 modules. When beacon \(B_{2}\) receives a message from beacon \(B_{1}\), it waits 5 ms and then turns on the IR diodes for 5 ms and sends a message with its own ID number. Beacon \(B_{3}\) responds to the message from beacon \(B_{2}\) in the same way that \(B_{2}\) responds to \(B_{1}\). When beacon \(B_{1}\) receives a signal from \(B_{3}\), it waits 5 ms until beacon \(B_{3}\) finishes its work, and then waits another 5 ms. During these next 5 ms, neither of the beacons is working, which allows us to record the background IR radiation from sources other than the beacons. Then, the whole cycle repeats, and its time is equal to 3 \(\times\) 5 ms (beacon activity) + 5 ms (background measurement) = 20 ms. The frequency of the beacon's synchronization cycle is therefore 50 Hz, which makes it possible to determine the actual position of the receiver at a frequency just equal to 50 Hz.  
Figure 7 displays the current waveforms supplied to the diodes of each beacon during their activation sequences. The average current value is approximately 900 mA, while the oscillations, with a frequency of 2.5 kHz are a result of the converter operating in a buck configuration. The stations are cycled in the assumed sequence, starting from \(B_{1}\), and their synchronization frequency is close to the expected value of 50 Hz.  
Figure 5: Beacon radiation pattern.  
Figure 6: Hardware configuration of the IR beacon transmission system.