Angle of arrival estimation in a multi-antenna software defined radio system: impact of hardware and radio environment

Contemporary wireless communication transceivers can utilize their multiple antennas to improve positioning abilities. Angle of Arrival (AoA) estimation utilizes shifts in phase between the signal of interest arriving at different receiving antennas. Software Defined Radio (SDR) USRP B210 and GNU Radio implementing the Root Multiple Signal Classification (Root-MUSIC) algorithm are used in this paper. However, this setup requires the consideration of errors caused by hardware and radio environment. The impact of these effects is shown using an analytical model, assessed, mostly by measurements, and relevant solutions are proposed. The hardware distortions are caused mostly by synchronization errors. The intricacies of the most problematic phase synchronization are investigated with the wired setup showing, e.g., changes with frequency or gain. Both synchronizations emitting calibration tone from the same radio front end, resulting in cross-talk, or a separate one are tested. Recommendations enhancing the performance of the system and alleviating hardware imperfections are provided in this paper. The accuracy of AoA estimation is degraded by multipath propagation or radio interference. A signal processing scheme including filtering has been proposed. A set of over-the-air experiments assessed the performance of the system. The presented and publicly available software package, scalable to a higher number of RX antennas, enables straightforward implementation by other researchers.


Introduction
The increasing demand for broadband wireless communications has resulted in a number of technologies being implemented in a contemporary wireless transceiver. One of these is Massive Multiple-Input Multiple-Output (mMIMO) [1] that allows for a significant network capacity increase by utilization of multiple antennas at the Base Stations (BSs). These antennas can also be used for other purposes, e.g., to allow for signal source positioning. The availability of precise positioning information facilitates the prevalence of interactive forms of services or marketing. One may imagine possibilities like assisted sightseeing in historical areas or museums, shopping racks with proximity-based advertising or assistance in commuting. Overall, the angle-of-arrival-based positioning can be used for several services ranging from application-layer services, e.g., driving assistance or indoor positioning to improvement of network operation, e.g., using so-called Radio Environment Maps [2,3].
One of the basic schemes for location estimation using multiple antennas is the Angle of Arrival (AoA) technique. Given a number of antenna elements spaced at regular intervals the angle of arrival can be discerned by observing differences in the phase of received signals. Angle estimation methods can be categorized into three groups: beamforming, subspace, and parametric [4]. Subspace algorithms offer a compromise solution between accuracy and computational complexity. Among subspace methods, the Root Multiple Signal Classification (Root-MUSIC) algorithm provides the most accurate results, as presented in [4]. AoA estimation accuracy greatly depends on the system's hardware and radio conditions. The main hardware problem encountered in AoA systems is the accuracy and stability of the radio front end phase synchronization. Alignment in the frequency and time domains can be easily achieved by distributing a reference clock serving as a Phased Locked Loop (PLL) input signal and gating pulses marking specified moments in time. Due to the high scale of integration and multiple stages of signal processing or conversion, the resultant phases of end signals significantly differ among front ends in the system. Moreover, manufacturing inaccuracies and temperature dependency especially affect the phase of the signal and may further contribute to the offset. In the case of wideband or agile Radio Frequency (RF) transceivers, the issue of phase synchronization becomes even more complicated as the phase offset between RF front ends depends on the center frequency [5]. On the other hand, the radio environment can constitute a significant source of AoA error. Multi-path propagation causes a signal from a single source to arrive from many different directions. Moreover, it is possible that many signal sources will be active in the vicinity of the AoA receiver causing interference and resulting in AoA estimation error.
The introduction of Software-Defined Radio (SDR) platforms has enabled rapid system prototyping and algorithm evaluation due to the flexibility of the signal processing stage and extensive control over the radio front ends. By using SDRs, the data stream of each receiving (RX) or transmitting (TX) channel can be processed in a personal computer serving as a central hub of the system. There are several low-cost devices that enable quick AoA prototyping. In [6], a Texas Instruments development board consisting of 6 switched antennas is used in AoA estimation. Moreover, RTL-SDR modules with an additional clock distribution network can be used in this context [7]. Also, there exist some off-the-shelf solutions that consist of multiple RTL-SDR chipsets with an embedded clock distribution system [8]. Even selected Wireless Local Area Network (WLAN) access points with software modifications can be utilized to perform coarse AoA estimation [9]. Still, probably the most popular SDR devices used in prototyping and evaluation of wireless systems are the Universal Software Radio Peripherals (USRPs) produced by Ettus Research.
The popularity of SDR devices has brought about multiple publications concerning the implementation of angleof-arrival systems in various SDRs considering numerous approaches to front end synchronization. Ettus Research has published a white paper which describes device synchronization and showcases AoA estimation with the use of an X310 device [10]. The presented one-time calibration routine consists of attaching a signal source via a splitter to all RX channels simultaneously. Then, for a short period, the phase difference between channels is measured, averaged, and saved to a file. Next, the wired setup is replaced by antennas to perform AoA measurements. The saved coefficients representing the phase shift are applied to compensate phase differences by multiplying the stream of signal samples by a complex value representing the required shift in the processing software. This approach, although simple, does not take into consideration the possible drift of the coefficient. Moreover, there is no discussion on the validity of the measured coefficient, e.g., for a different device, carrier frequency, or gain.
It is also possible to synchronize the receiving front ends without the need to reconfigure connections at RF ports. When the SDR device is equipped with RF front ends with two coherent RX channels, one may be utilized as input for the reference signal distributed with matched length cables. Such an approach was presented in [11] with the use of National Instruments USRP 2954R. In this case, the RX channel used for phase alignment is excluded from operation in the AoA estimation phase, reducing its potential performance. Moreover, it is required that both RX channels of a given front end introduce a similar phase shift. The precise estimation of the phase shift difference requires precise cables and splitters to be used. Dissimilarities between signal paths can contribute to an uncompensated accuracy error in this method. As before, an additional independent transmitter is required for synchronization. However, the calibration routine does not require any manual intervention.
The previously mentioned white paper concerning a gr-doa package was more widely discussed in [12], where different hardware implementations were described. The setup consisting of multiple USRPs N210, each with 1 RX and 1 TX channel, was presented with an unusual calibration method. The phase synchronizing tone was inserted into the TX port of the device with matched cable lengths. Due to the internal switching network between the TX antenna port and RX channel, used normally for halfduplex operation, a cross-talk occurs between both antenna ports. The tone inserted into the TX antenna port was received at the RX side without the need to connect anything to the RX port or rearrange the wiring. The authors claim that the similarity of RX and TX signal paths result in a repeatable phase shift across the device, providing sufficient calibration accuracy. It should be noted that the USRP N210 clock used in the mentioned setup produces phase ambiguity, which results in a random initial phase of the main Local Oscillator (LO) in a single device after each power-up or change of parameters. This means that the calibration result is not persistent and has to be performed during runtime after the parameters have been set. What is more, the accuracy of the calibration may be affected by manufacturing and component tolerance across signal paths and devices. Due to the cross-talk, an additional transmitter is required to provide a synchronizing tone distributed across all devices.
A simple, yet possibly less accurate method of front end synchronization is provided in [13]. The received signals are visually aligned in an interactive software environment by introducing an additional phase shift. It is done with the reference signal connected to all RX ports via a splitter. In addition, amplitude differences are noted. Whereas it might not be the most accurate method, it may be valid for quick alignment of phases and amplitudes of received signals.
Thermal effects associated with the heat up of SDR devices may introduce drifts or fluctuations of the phase shift coefficient. In [14], the phase drift introduced by hardware heat-up of a USRP X310 is measured over time. The calibration phase coefficient is shown to change over time. As such, delay from the last calibration routine can increase phase error that affects the estimated AoA. The work proposes an over the air calibration method using periodic, pulsed signals. A single reference antenna is placed in front of the center of the array and transmits pulses of the sine wave. Taking into account the calculated Euclidean distances from the reference antenna to RX antennas, the expected phase shift introduced by propagation is compensated while calculating the calibration phase coefficients among RX antennas.
In this work, an AoA implementation using a cheap SDR device, namely USRP B210, is presented. The main focus is on factors limiting the accuracy of such a setup. An analytical model of time, frequency, and phase error are presented. While the time alignment is obtained via software procedures embedded in the SDR's driver and frequency synchronization results from the utilization of a common LO, phase alignment has to be obtained separately. Wired calibration using a single tone is used. Calibration using the same and separate TX is compared. Measurements show, e.g., significant phase variation in frequency and the utilized radio unit. The influence of thermal effects and the utilized RX gains are measured. All these results can be useful for other researchers planning to implement AoA estimation using the B210 platform even if another synchronization method is used. Secondly, the influence of the radio environment is considered. A proper measurement procedure is suggested to combat multipath propagation effects. Moreover, a combination of filtering and averaging is shown to increase robustness against radio interference. The proposed routines for calibration and angle-of-arrival estimation using the Root-MUSIC algorithm are validated by measurements.
The main contribution of this paper is: • Fully documented, open-source, and tested software for AoA estimation in the GNU Radio environment. Phase synchronization of an antenna array is obtained via a wired setup within a short calibration period. The software is easily scalable for a greater number of antenna elements and is independent of the SDR device. • An investigation of the impact of crosstalk (with the derivation of upper bounds), channel gains, time, and center frequency on the value of the calibration phase obtained for a wired synchronization of USRP B210 front ends. Explanation based on the internal structure of the front end is given. The value of the calibration coefficient is compared for multiple USRP B210 units. • A proposal of solutions against noise, multipath, and RF interference effects on AoA estimates in the constructed system. Applied averaging, band-pass filtering and movement are verified and results are compared by tests in a real environment. • An assessment of the overall accuracy of a setup with 2 antennas using the Root-MUSIC AoA algorithm. A statistical characterization of the observed AoA errors depending on the source of distortion.
This paper is structured as follows: In Sect. 2 basics of AoA estimation are presented together with analytical models of synchronization errors. In Sect. 3 details of a wired phase synchronization routine are discussed, providing insight into different parameters affecting calibration. Finally, Sect. 4 concludes with a description of a field test setup and assessment of the accuracy of obtained AoA estimation results. The paper is concluded in Sect. 5.

AoA estimation in a linear phased array with synchronization imperfections
A uniform linear array consists of N antennas regularly separated by distance d as presented in Fig. 1 for N ¼ 5.
The reference point of the geometry of coordinates [0, 0, 0] in Cartesian coordinates, is set to be the center of the array. Let us consider a signal y(t) being transmitted with carrier frequency f c and complex envelope s(t), i.e., When distance d between array elements is much smaller than the distance from the signal source to the antenna array, the incident electromagnetic wave can be assumed to arrive at each antenna element from the same angle denoted as h in the form of a plane wave. We assume that the wireless channel scales down the received signal amplitude, identically for each receiving antenna, by a factor h. Signal y(t) arrives at the center of the array with delay s 0 . However, as a result of the array's geometry, the signal arriving at the n-th antenna (n 2 f0; . . .; N À 1g) traveled the distance different by This causes the received signal at the n-th antenna to equal where c denotes the speed of light. Assuming the reception delay difference for the n-th antenna Dx n c is much smaller than the symbol duration of the complex envelope signal assuming the same carrier signal e Àj2pf c tÀjDu of phase shift Du is used for down conversion at each front end and sampling moment t 0 is identical at each front end, the received complex baseband signal at the n-th front end equals The common part of the signal arriving to each antenna can be denoted as sðtÞ ¼ hs t À s 0 ð Þe Àj2pf c s 0 ÀjDu . By introducing it to (4) and using (2) it is obtained: This formula shows that in the case of perfect time and frequency synchronization of all front ends, the phase of received signals differs only in phase depending on the antenna index n and AoA h. The above formula can be extended for a higher number of incoming signals (with different AoAs) and the presence of white noise. Let us assume that the received signal is simultaneously sampled across all N antenna elements at time instance t k . The obtained data is denoted as a column vector of N samples rðt k Þ : Multiple Signal Classification (MUSIC) algorithms exploit properties of array covariance matrix R x , which can be estimated using different approaches influencing the accuracy of AoA algorithms [15]. One method is to estimate the matrix from an average of K data snapshots as: The calculated matrix is referenced as C x -the sample correlation matrix. The obtained matrix serves as input to the Root-MUSIC algorithm [15].

Front ends synchronization problem
Depending on the utilized architecture, the receiving front ends can exhibit various synchronization errors between each other. This section is to exemplify how time, frequency, and phase errors can influence the received signals used for AoA estimation. The synchronization of front ends can be considered in three domains: Frequency: It can be assumed that the n À th receiving radio front end uses in its mixer frequency f c þ Df n , that is shifted by Df n from f c . Most importantly, Df n can vary among front ends. This results in a modified form of (5) for a received signal with frequency offset denoted asr F n ðt 0 Þ: It is visible that from the AoA estimation perspective, the received signal phase will change by a factor of 2pDf n t, i.e., proportionally to the time and frequency difference. This is solved typically by sharing a reference clock signal among the front ends.
Phase: Due to manufacturing inaccuracies and tolerance of components, the phase of the signal received by the n À th radio differs among front ends. The phase shift can be visible both at the received signal path or the mixing signal. Without loss of generality we can express it as a factor e ÀjDu n , specific for a given receiving front end, modifying the locally generated signal used in the mixer. This results in a modified form of (5) for a received signal with phase offset denoted asr P n ðt 0 Þ: The received signal varies among antennas by a phase shift Du n . While its value can range from 0 to 2p, it is typically fixed or slowly varying in time. Therefore, a common approach is to calibrate the array estimating N À 1 coefficients. One of the phase shifts, e.g., Duñ can be embedded as a common factor intosðt 0 Þ, requiring to estimate phase shift difference e Àj Du n ÀDuñ ð Þ for n 2 f0; . . .;ñ À 1;ñ þ 1; . . .; N À 1g. For theñ-th antenna the coefficient is assumed to equal 1. Phase synchronization of the front ends is achieved typically with post processing where the signal received from each antenna is multiplied by the conjugation of the estimated coefficient.

Time:
The received signals at all front ends should be sampled at the same time instance. Moreover, this alignment should not be lost during signal processing and provisioning to the high-level software in SDR. Assuming there is a sampling moment shift at the n-th front end Dt n the received signal equals If the time difference Dt n is much smaller than the transmitted signal symbol interval, i.e.,sðt 0 þ Dt n Þ %sðt 0 Þ, and not changing in time, the synchronization error causes only a constant phase shift 2pf c Dt n that can be estimated and removed as part of phase synchronization. If this condition is not met, the complex signal envelopesðt 0 þ Dt n Þ will differ among front ends, preventing successful AoA estimation. Therefore, coarse sampling time alignment is a must. It is typically accomplished by a 1 Pulse Per Second (PPS) signal that is distributed among devices and serves as a gating pulse that resets timers. This signal is also available in most Global Positioning System (GPS) receivers. As mentioned above, fine time synchronization is obtained as part of the phase synchronization process. Taking all synchronization errors (7-9) into consideration, the final model of the received signals can be expressed as: Notice that all the errors are visible as changes in the received signal phase. As AoA estimation is based on differences of received signals phases, this can cause a significant AoA error. Therefore, an important process in AoA estimation is the provisioning of the coarse synchronization among RX front ends and fine synchronization by proper phase rotation. While a fixed phase correcting coefficient is desired, it is possible that its measurement has to be repeated periodically or after receiver reconfiguration. This will be discussed for USRP B210 based on measurements in Sec. 3.

Calibration Phase Measurements for USRP B210
Phase calibration and measurements were performed with the USRP B210 SDR platform. In this device time and frequency synchronization of channels within a single unit is provided by a shared clock. In the case of multiple devices, the synchronization may be provided by reference clock and a pulse-per-second signal being fed to each SDR. The architecture of B210 guarantees that the phase shift between channels remains similar between runs for identical configurations. The constructed radio system is controlled via GNU Radio software where necessary functions and routines are implemented. The signal processing flowchart responsible for phase measurements can be seen in Fig. 2. The calibration was performed with a single tone, of a frequency 50 kHz higher than the carrier frequency, fed to the RX channels via a splitter and matched length cables. The test tone shift was performed in order to prevent LO leakage providing additional distortion of the observed tone. An additional attenuator of 30 dB mounted before the splitter is a safety measure to ensure that the input signal does not exceed the maximum tolerable power level of USRP B210 and prevents any damage to the RX chain. In the software domain, the signal is then band-pass filtered by a Finite Impulse Response (FIR) filter, with a pass band of 45-55 kHz and 10 kHz transition width. Next, the phase difference is calculated and averaged by a Moving Average Filter (MAV). In the end, the obtained stream is decimated and saved to a file. If not stated differently, the center frequency is set to 2.44 GHz. The phase synchronization routine was examined for two calibration source configurations. One with a signal from the TX of the receiving USRP (as shown in Fig. 3a) and the second with a signal provided by another USRP B210 (as shown in Fig. 3b). The sampling rate of both TX and RX is set to 1 MSPS.

Comparison of wired synchronization setups
It was initially assumed that a single USRP B210 will be sufficient to create a self-contained system with two receiving elements and a calibration source utilizing one of the TX channels. However, this setup is prone to errors introduced by crosstalk between adjacent RX and TX channels. The crosstalk in USRP B210 is a result of its architecture as visible in Fig. 3a. The switches present in the signal chain have limited isolation and introduce coupling between TX and the closest RX channel of SDR. The calibration signal received by the front end with crosstalk can be expressed as: r c ðtÞ ¼ Ae j2p ft þ Be j2p ftÀju , where Ae j2p ft is the signal received through the RX port (wanted). The second component is the leaked signal (unwanted) that is shifted in phase by u in regard to the former. Without loss of generality, it is assumed that A and B are amplitudes, i.e., non-negative real numbers. After the downconversion, the carrier frequency component is removed, giving r c bb ðtÞ ¼ A þ Be ju . The difference in phase is maximal when Be Àju is perpendicular to A in the polar representation of complex numbers. As both A and B are nonnegative real numbers and A [ B, the maximal phase shift introduced by B is when it is of purely complex value, i.e., ÀjB or þjB. The maximal phase error can then be calculated based on the formed right-angled triangle as: . When B\\A, the value of arctangent can be approximated with the Maclaurin-Taylor series for arctangent, resulting in: D w % B A . As such, the worst case, crosstalk-originating phase estimation error can be approximated by a square root of the ratio of crosstalk and wanted signals powers.
To verify the extent of crosstalk impact on the accuracy of phase calibration, a series of measurements were performed. For RX gains of 40 dB and TX gain of 45 dB the crosstalk magnitude, i.e., B, was measured with all antenna ports of the same channel being terminated with a matched impedance load (see Fig. 3a). Next, the reference value of A was measured without the attenuator inserted between TX and RX2 ports. In this configuration, A is much greater than B, allowing the crosstalk component to be omitted. Finally, the standard phase calibration routine was executed for a few values of inserted attenuation in the TX path. Given that for constant gains of both TX and RX of USRP B210, the crosstalk level is also constant, increasing the value of attenuation reduced the desired signal, i.e., A, allowing us to investigate the calibration accuracy for various signal-to-crosstalk ratios. The results of the measurement are presented in Fig. 4. The value of A for attenuation greater than 0 dB is calculated using the value of the introduced attenuation.
First, the measured phase difference obtained for transmission from a separate TX is invariant from the attenuation value (a series denoted as Sep. TX), the increasing attenuation causes an increasing phase error for self-calibration configurations. Although the crosstalk power depends on the utilized TX channel, both the obtained bounds and the measured phase differ. However, in both cases, the measured points are within the derived bounds.
In wired setups it is common to use attenuators as a safety measure to prevent any damage to the RX signal chain, the obtained results show it can lead to a significant phase calibration error, e.g., a 30 dB attenuator introduces a phase error of approximately 2-5 . Due to the observed levels of crosstalk and its influence on phase calibration, consecutive measurements are performed with a separate USRP B210 operating as a reference TX as depicted in Fig. 3b.

Phase-time dependency
Here the phase correction coefficient was observed for a long period of time. The test lasted around a few hours. RX gains were 10 dB and TX gain was set to 50 dB. The additional safety attenuator value was 30 dB. Measurements were performed for previously unpowered devices to observe the extent of coefficient drift. The collected data was smoothed by a MAV filter of the length of 100k samples. The results presented in Fig. 5 show the initial drift caused by the heat up of the device and the distribution of the measured values after stabilization. It can be (a) (b) Fig. 3 Diagrams of USRP B210 wired phase calibration setups Fig. 4 Accuracy of phase calibration in regard to attenuation attached to TX source seen that the distribution of the phase difference is Gaussian once stabilized with a mean value of 8:9 and a standard deviation of 0:05 . The initial drift during the first two hours of operation accounts for a change of the mean by approximately 0.07 , which is relatively small compared to the overall averaged value and may be considered negligible.

Phase-frequency dependency
To analyze the dependence of the phase shift on carrier frequency, additional measurements were performed spanning the range from 350 MHz to 6 GHz in 50 MHz steps. It consisted of collecting the phase difference values over 10 s with MAV of 100k length for each carrier frequency. The procedure was repeated in 50 sweeps to check if there is any variance between repeated measurements for the same frequency. Figure 6 depicts the average of all 50 sweeps and 95% confidence intervals calculated over the means of 10 s measurements for a given frequency. It can be seen that the phase difference does not exhibit any monotonic dependency on the center frequency. This irregularity is probably due to discrete components used in the signal chain and their combined diverse phase characteristics at a given frequency. The confidence interval overlaps the mean, meaning that the phase-frequency response of the device is very stable over multiple sweeps. While the phase difference among channels significantly depends on the frequency and is fixed in time, one could consider storing its values and using them when needed. One might want to use the measured value for another B210 device. Aiming to understand how the phase-frequency characteristic varies between B210 devices, the frequency sweep was performed for 6 available devices, resulting in Fig. 7. From this plot it is visible that the phase-frequency characteristic is individual for each device. Small differences introduced in integrated circuits and utilized electronic components result in significant, from the AoA estimation point of view, differences in the signal phase rotation. There is no universal trend and it is hard to discern common features. The overall phase difference can be contained mostly within the ðÀ10 ; 20 Þ range. While the results of our measurements can potentially be used instead of calibration measurements for USRP B210, it can result in an AoA estimation error increased by around 10-20 in some cases. Another interesting phenomenon are the steep changes in phase at the frequencies of 2.2 and 4 GHz. Those discontinuities originate from the switching of  discrete component signal chains in USRP B210 due to wideband frequency matching [16].

Phase-gain dependency
In order to investigate the influence of RX gain settings, the phase measurements were performed for a range of gain values. First, the gain of RX channel 0 has been fixed to 20 or 37 dB while the gain of the second channel was changed over the whole range, i.e., from 0 to 76 dB. The resultant phase difference significantly changes in the whole range from À180 to 180 , as shown in Fig. 8a. The steep phase changes have been linked to switches of gain of Integrated Circuits (ICs) of the RF chipset present in the USRP B210, e.g., Low Noise Amplifier (LNA) and mixer, as depicted in Fig. 3b. The distribution of the overall RX gain among IC can be found in [17]. The plots representing the integrated LNA (iLNA) and mixer gains were added to Fig. 8a to illustrate their correlation with the measured phase difference. On the other hand, when both RX channels have identical gains, the change of phase difference is much smaller, although still correlated with internal IC gain values, as shown in Fig. 8b. Throughout the whole sweep the value changes at most by 1.8 .

SDR-based angle of arrival estimation
The measured calibration phase shift allows for testing the angle of arrival estimation performance. The utilized twoantenna setup and the signal processing flowchart are shown in Fig. 9. The transmitter was a separate SDR utilizing a single TX antenna generating a continuous wave. The constructed radio system was controlled via the GNU Radio software environment. First, the signal was bandpass filtered. Next, given the measured calibration coefficient Du, the received signal over the second channel was appropriately shifted in phase. The corrected signals were then correlated obtaining a correlation matrix according to (6). In these measurements, the snapshot size K was set to 1024, which corresponds to the correlation matrix averaging length. For the sample rate of 1 MSPS around 976 matrices per second are generated and a new AoA estimate is obtained approximately every 1 ms. Next, each correlation matrix is processed by the Root-MUSIC algorithm, returning a single value of the estimated AoA, which is saved to a file.

Results
The Angle of Arrival system performance was examined for various environmental conditions. Initially, the transmit node was placed indoors at an angle of 90 , 2 m from the array. Angle estimation was performed for 60 s, resulting in about 58k of AoA values. The RX gains were set to 60 dB and TX of the source to 50 dB. Figure 10 compares AoA error distribution under various conditions obtained after removing the mean value of AoA for each setup. Figure 10a and b show the influence of RF interference and how AoA estimation can be improved by using bandpass filtering, respectively. The radio interference was generated by turning on a WLAN 802.11 access point nearby operating at the carrier frequency of 2.442 GHz (7 th channel) and enforcing high traffic in the network. The traffic was generated by streaming a Youtube video to the smartphone to resemble a realistic scenario. The mobile device was placed approximately at the same distance to the array as the main source. The interference setup is visualized in Fig. 11.
The utilized filter had the same parameters as in the calibration tests in Sect. 3. AoA error distributions prove that band-pass filtering is absolutely necessary to limit the interference from overlapping bands in busy wireless channels. The AoA error introduced by other transmissions (a) (b) Fig. 8 Phase dependence on the gain of RX front ends spreads over the whole range of estimation. The standard deviation of angle estimation without filtering equals approximately 8 . With the addition of filtering the standard deviation is decreased to only 0.3 . Subsequent measurement was aimed at investigating how movement distorts the Angle of Arrival estimation. The RF interference was disabled in order to show a single source of distortion at a given time. The results, presented in Fig. 10c and d, were obtained with applied band-pass filtering and low RF activity in the utilized frequency band. The movement was introduced by a person walking around the system without crossing the Line-of-Sight between TX and RX antennas. The AoA estimation error introduced by movement dominates other sources and ranges between AE10 with a standard deviation of 2.2 . This shows that multi-path propagation has a significant impact on AoA estimation and a proper averaging of obtained AoA values and measurement procedure design is needed to combat this error.
Therefore, measurements in an outdoor scenario were carried with both transmitter and receiver distanced from the buildings (by at least 10 m) and ground (by using 2mhigh tripods). Moreover, the transmitter used a directional antenna. The applied measures were to limit the total power of non-Line-of-Sight components. RF interference  was not generated as the expected conclusions are the same as in the indoor scenario. The signal source has been placed at angles 90 and 135 at a distance of 5 m. The setup operated at the frequency of 2.44 GHz with active bandpass filtering. The first series of measurements were performed for the source antenna in a fixed position. Then the source was moved slightly forward and backward maintaining the angle to modify potential fadings.
The obtained results are shown in Fig. 12. Here, the AoA error was calculated with respect to the known source location. First, outdoor measurements with movement show a smaller standard deviation than indoor measurements. This proves that if moving elements of the environment are more distanced, as in our outdoor setup, the signal reflected from them has a smaller influence on the total received signal. Additionally, a comparison of static and moving measurements in the outdoor scenario shows that AoA estimation can generally be improved by changes in multi-path propagation. While the static measurements exhibit a much lower variance of the result, they are biased by a significant error compared to the series with movement, i.e., the mean error is on average higher. Moving the antenna helps to visualize that the multi-path effect has a crucial impact on the performance of the AoA estimation system. It can be noted that the AoA error of static measurement constitutes a part of the distribution obtained for the measurements with movements. Therefore, it can be recommended to perform AoA estimation in the environment with movement, both indoors and outdoors, providing a sufficiently long AoA estimates averaging period. The recommended averaging duration should span the maximum time the target is at a given AoA to utilize all variations of multipath propagation.

Conclusions
It is possible to build an accurate AoA estimator using a cheap SDR platform. While USRP B210 provides accurate enough time and frequency synchronization, phase synchronization has to be implemented by the user. Wired calibration is suggested. While the obtained correction coefficient is relatively stable in time, it requires recalibration after changing the front end setup, e.g., carrier frequency, or when changing the utilized device. While measuring AoA using the Root-MUSIC algorithm in a real environment it is recommended to employ filtering to remove adjacent radio interference and use AoA averaging and movement of RX or TX devices to cope with multipath propagation. This should result in a 2 antenna AoA estimation error smaller than 10 in most environments, enabling, e.g., short-range coarse positioning or algorithms enhancing network performance. However, the obtained accuracy depends on many factors including radio propagation conditions. Moreover, it can be improved by increasing the number of utilized antennas [18]. Finally, the positioning error depends on the AoA error in addition to the utilized positioning algorithm or the number of AoAreporting nodes [19]. The implemented AoA estimation software is publicly available at [20]. licence to any Author Accepted Manuscript (AAM) version arising from this submission.
Data availability The datasets generated during the current study are available from the corresponding author on reasonable request.

Declarations
Conflict of interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. PUT. Moreover, dr Kryszkiewicz is the co-founder and the Technical Director of RIMEDO Labs, the spin-off from PUT. He has been involved in a number of national and international (including EU-funded) research projects.
His main fields of interest are problems concerning the physical layer of multicarrier and multiantenna systems, green communications, and Dynamic Spectrum Access. Dr Kryszkiewicz is the author of over 100 research papers, 2 book chapters and 1 book.