Direction of Arrival Estimation Based on Received Signal Strength Using Two-Row Electronically Steerable Parasitic Array Radiator Antenna

In this paper, we present a novel approach to direction-of-arrival (DoA) estimation using two-row electronically steerable parasitic array radiator (ESPAR) antenna which has 12 passive elements and allows for elevation and azimuth beam switching using a simple microcontroller, relying solely on received signal strength (RSS) values measured at the antenna output port. To this end, we thoroughly investigate all 18 available 3D antenna radiation patterns of the antenna measured in an anechoic chamber with respect to radiation coverage in the horizontal and vertical direction and propose a generalization of the power-pattern cross-correlation (PPCC) algorithm involving a high number of multiple calibration planes (MCP) as well as specific combinations of radiation pattern sets. Additionally, a new way of RSS-based DoA estimation accuracy assessment, which involves thorough testing conducted along the elevation direction when RF signals impinging on the antenna arrive from arbitrary θ angles, has been reported in this paper to verify the overall algorithm’s performance. The results obtained for different signal-to-noise ratio (SNR) levels indicate that two-row ESPAR antenna can produce, even for low SNR values, accurate DoA estimation in the horizontal plane without prior knowledge about the elevation direction of the unknown RF signals by using appropriate combinations of only 12 3D antenna radiation patterns.


Introduction
Wireless sensor networks (WSNs), especially in the Internet of Things (IoT) applications, depend on low-cost wireless transceivers, which are usually integrated with simple microcontrollers to provide the functionality required by different IoT applications [1][2][3]. To increase WSNs capabilities, especially when they are installed in challenging environments, in which connectivity problems may be present due to multipath propagation or presence of interfering radio frequency (RF) signals [3,4], WSN nodes can be integrated with energy-efficient switched-beam antennas (SBAs) [5][6][7][8][9] providing a number of directional radiation patterns. Such patterns can easily be switched electronically by a WSN node's integrated microcontroller [9,10] in order to improve the overall network performance, e.g., by focusing antenna beams of WSN nodes towards specific directions, and increasing its energy efficiency [9,[11][12][13][14][15]. Moreover, for a simple low-cost WSN node, it can enable a capability of direction-of-arrival (DoA) estimation for received RF signals incoming from different WSN nodes belonging to the same network [10].
Electronically steerable parasitic array radiator (ESPAR) antenna is one of the promising SBA designs that can successfully be integrated with a WSN node [10] or a WSN gateway [16]. It relies on a simple, yet very effective, a concept introduced originally by 18 directional radiation patterns covering 3 different elevation directions [31]. The new ESPAR antenna has been designed to provide better connectivity in IoT applications relying on WSN nodes, in which the nodes positions are not restricted to the horizontal plane only, and to provide DoA functionality in such setups. It relies on simple low-power SPDT integrated switches, and therefore, it can easily be incorporated in a WSN gateway or a WSN node. As a consequence, simple elevation and azimuth beam switching allows to create 6 directional beams in the horizontal plane for each of 3 vertical direction.
Combined connectivity and DoA estimation capabilities can highly improve IoT systems involving WSN nodes and gateways installed on the ground in smart factories, buildings and cities [1][2][3]5,6,25,26]. Moreover, it can be used in modern IoT applications involving long-range communication to such objects as unmanned aerial vehicles (UAVs), high-altitude pseudo-satellites (HAPS) or satellite platforms [29,30,32,33], in which the elevation between transceiver and receiver may change in a fast manner. In this regard particularly interesting and growing application area, in which beamforming plays significant role, is providing multiple access and increased security in satellite and aerial integrated networks for IoT communication [34][35][36][37]. In such applications, the proposed two-row ESPAR antenna can successfully provide beamforming capabilities as low weight, and high efficiency have to be considered for practical space applications [38].
Connectivity performance and RSS-based DoA estimation approaches, which are crucial to develop new WSN gateways and nodes integrated with two-row ESPAR antenna, have not been investigated in the original publication [31]. According to the authors' knowledge, they are also not currently available in the literature. Therefore, the main contributions of this paper are: • In-depth analysis of the antenna from the connectivity perspective with respect to possible beam steering in horizontal and elevation directions; • Presentation of an approach for DoA estimation relying solely on RSS values gathered at the antenna output, which is a prerequisite for energy-efficient WSN nodes having DoA functionality [9,10], that is suitable for the antenna and can provide acceptable DoA estimation results also for low θ angles and are free from ambiguities for lower SNR values; • Proposal of a detailed DoA algorithm performance testing method for more accurate DoA estimation accuracy assessment that involves all θ angles to address strong error variation at low θ angles.
The rest of this paper is organized as follows: in Section 2 the two-row ESPAR antenna is described together with its simulated and measured radiation patterns as well as their influence on the overall connectivity in WSN-based IoT setups, in which the positions of nodes are not restricted to the horizontal plane only. Section 3 describes a PPCC-MCP algorithm and its proposed generalization for the usage with the two-row ESPAR antenna. Results obtained using a new RSS-based DoA estimation accuracy assessment involving thorough testing conducted along the elevation direction are presented in Section 4, while Section 5 presents concluding remarks.

Antenna Design
The proposed antenna concept has been discussed in [31] and is presented in Figure 1. It was aimed to achieve a low-cost reconfigurable antenna that is able to provide maximal angular radiation coverage by steering the beam in elevation and azimuth. The active quarter-wave monopole is located in the center of the metallic ground plane realized on the top of a dielectric substrate and surrounded by 12 passive radiators symmetrically arranged in two circular rows. The active radiator is fed coaxially with RF signal, while the passive radiators can be open or shorted to the ground plane by changing the state of the SPDT switches. Forming the radiation pattern is realized by setting proper configuration of the passive elements that become reflectors when shorted to the ground or directors when opened. Such an approach simplifies the beam steering control that can be realized with external microcontroller or transceiver having its general purpose input/output (GPIO) lines connected to the RF switches. As a result, each radiation pattern corresponds to a steering vector V = [v 1 , v 2 , . . . , v s , . . . , v 12 ], in which v s denotes the state of sth passive element: v s = 1 for open and v s = 0 for the shorted one. The antenna was optimized to provide three sets of directional radiation patterns with different inclination angles θ max_up = 46 • , θ max_down = 56 • , and θ max_mid = 52 • obtained for three different steering vectors sets. The symmetrical design allows rotating each beam by 360 • , which means that it is possible to steer the radiation pattern in both, azimuth and elevation. Therefore, for each elevation direction, 6  the top of a dielectric substrate and surrounded by 12 passive radiators symmetrically arranged in two circular rows. The active radiator is fed coaxially with RF signal, while the passive radiators can be open or shorted to the ground plane by changing the state of the SPDT switches. Forming the radiation pattern is realized by setting proper configuration of the passive elements that become reflectors when shorted to the ground or directors when opened. Such an approach simplifies the beam steering control that can be realized with external microcontroller or transceiver having its general purpose input/output (GPIO) lines connected to the RF switches. As a result, each radiation pattern corresponds to a steering vector = [ 1 , 2 , … , , … , 12 ], in which denotes the state of sth passive element: = 1 for open and = 0 for the shorted one. The antenna was optimized to provide three sets of directional radiation patterns with different inclination angles _ = 46°, _ = 56°, and _ = 52° obtained for three different steering vectors sets. The symmetrical design allows rotating each beam by 360°, which means that it is possible to steer the radiation pattern in both, azimuth and elevation. Therefore, for each elevation direction, 6 directional radiation patterns having maximum in azimuth at 30°, 90°, 150°, 210°, 270°, 330° are available for steering vectors , , and , where = {30, 90, 150, 210, 270, 330} degrees. The antenna was designed and optimized in Altair FEKO simulation tool to operate at center frequency 2.44 GHz and the detailed design procedure including optimization goals was described in [31].

Realized Antenna
The fabricated antenna is presented in Figure 2. 1.55 mm thick FR4 substrate with metalized top layer has been used as a PCB for the switching circuitry and the ground plane of the antenna. The RF connector and switching circuits, as well as LED indicators have been located on the bottom layer as illustrated in Figure 2. The switching circuits employ NJG1681MD7 SPDT switches providing a trade-off between high isolation, low insertion losses and power consumption in comparison to PIN diodes or varactors [28,39,40]. To provide proper performance and avoid eventual RF signal degradation, a decoupling capacitor and ESD protection coil have been placed in close proximity of the switch pins. An LED indicator has been located near each switching circuit to indicate the actual state of the switch (lights when the circuit is in open state). The steering is controlled by an external microcontroller connected to the board. The fabricated antenna has been measured and verified with the simulation model. The assumed three groups of similar beam configurations with different angle tilt in elevation have been simulated, measured and gathered in Figures 3 and 4, while the main antenna parameters for each configuration at the center frequency have been summarized in Table 1. The simulated results have been confirmed by the measurements and only small discrepancies in the backward radiation level can be observed. Measured gain for all characteristics is on a similar level around 8 dB. The input impedance matching results for all configurations are presented in Figure 5 which shows that the achieved |S11| values are close or below −10 dB. The large difference of impedance matching between configurations is a trade-off to achieve the highest possible difference of maximal direction of the radiation pattern in elevation. switch pins. An LED indicator has been located near each switching circuit to indicate the actual state of the switch (lights when the circuit is in open state). The steering is controlled by an external microcontroller connected to the board. The fabricated antenna has been measured and verified with the simulation model. The assumed three groups of similar beam configurations with different angle tilt in elevation have been simulated, measured and gathered in Figures 3 and 4, while the main antenna parameters for each configuration at the center frequency have been summarized in Table 1. The simulated results have been confirmed by the measurements and only small discrepancies in the backward radiation level can be observed. Measured gain for all characteristics is on a similar level around 8 dB. The input impedance matching results for all configurations are presented in Figure 5 which shows that the achieved |S11| values are close or below −10 dB. The large difference of impedance matching between configurations is a trade-off to achieve the highest possible difference of maximal direction of the radiation pattern in elevation.

Antenna Radiation Performance Analysis
The main goal of the proposed antenna was oriented towards connectivity improvement by increased angular coverage of the directional radiation pattern that can be switched in both, azimuth and elevation. For this reason, a more detailed analysis of the antenna radiation capabilities has to be considered. In Figure 4, measured 3D radiation patterns have been presented which proves the similarity of the directional beams for all three sets. For detailed analysis and comparison, the measured radiation patterns for all configurations in their maximal directions in both, horizontal and elevation plane have been presented in Figures 6 and 7. The similarity of the radiation pattern sets in horizontal plane have been confirmed for all directions of the antenna. The slight differences can be noticed in half power beam width (HPBW) where the values vary from 88° to 100° and in case of the sidelobes level (SLL), 10 dB vs 25-28 dB when comparing UP configuration to MID and DOWN configurations. In Figure 7, one can see the measured radiation patterns in elevation plane. The tilt difference and angular coverage for each set is visible. HPBW in the elevation plane is almost the same for all radiation pattern sets being around 45 degrees. It can be observed that the results are repeatable for all measured configurations.

Antenna Radiation Performance Analysis
The main goal of the proposed antenna was oriented towards connectivity improvement by increased angular coverage of the directional radiation pattern that can be switched in both, azimuth and elevation. For this reason, a more detailed analysis of the antenna radiation capabilities has to be considered. In Figure 4, measured 3D radiation patterns have been presented which proves the similarity of the directional beams for all three sets. For detailed analysis and comparison, the measured radiation patterns for all configurations in their maximal directions in both, horizontal and elevation plane have been presented in Figures 6 and 7. The similarity of the radiation pattern sets in horizontal plane have been confirmed for all directions of the antenna. The slight differences can be noticed in half power beam width (HPBW) where the values vary from 88 • to 100 • and in case of the sidelobes level (SLL), 10 dB vs 25-28 dB when comparing UP configuration to MID and DOWN configurations. In Figure 7, one can see the measured radiation patterns in elevation plane. The tilt difference and angular coverage for each set is visible. HPBW in the elevation plane is almost the same for all radiation pattern sets being around 45 degrees. It can be observed that the results are repeatable for all measured configurations.
To assess the angular coverage of the antenna that include all possible beam configurations, aggregated radiation patterns need to be considered. This form of presentation is known in the context of time-modulated arrays and 3D coverage analysis for 5G applications where the aggregated characteristic consists of all available antenna radiation patterns to show the complete spatial coverage providable by the antenna [41]. Aggregation is selecting the highest gain values for each angle from the available radiation pattern sets. In the discussed construction the aggregated radiation pattern consists of 18 characteristics: 6 for UP configuration, 6 for MID configuration and 6 for DOWN configuration. In Figure 8, it can be seen that the angular coverage range in elevation for aggregated gain above 0 dB starts from θ ≈ 10 • . It means that only limited space under the antenna can be considered as a blind zone. To emphasize the difference in the antenna spherical coverage dependent on the selected beam configurations, a cumulative distribution function (CDF) of aggregated gain can be used [42]. In Figure 9, a CDF for the discussed antenna is presented and aggregated beams for each configuration are compared with aggregated function of all 18 radiation patterns. For example, it can be seen that for 50% of the hemisphere the aggregated gain value is 2 dB higher when considering all 18 radiation patterns instead of only one of the selected configurations. The results clearly indicate higher angular coverage of the antenna when all configurations are used.  To assess the angular coverage of the antenna that include all possible beam configurations, aggregated radiation patterns need to be considered. This form of presentation is known in the context of time-modulated arrays and 3D coverage analysis for 5G applications where the aggregated characteristic consists of all available antenna radiation patterns to show the complete spatial coverage providable by the antenna [41]. Aggregation is selecting the highest gain values for each angle from the available radiation pattern sets. In the discussed construction the aggregated radiation pattern consists of 18 characteristics: 6 for UP configuration, 6 for MID configuration and 6 for DOWN configuration. In Figure 8, it can be seen that the angular coverage range in elevation for aggregated gain above 0 dB starts from ≈ 10°. It means that only limited space under the antenna can be considered as a blind zone. To emphasize the difference in the antenna spherical coverage dependent on the selected beam configurations, a cumulative distribution function (CDF) of aggregated gain can be used [42]. In Figure 9, a CDF for the discussed antenna is presented and aggregated beams for each configuration are compared with aggregated function of all 18 radiation patterns. For example, it can be seen that for 50% of the hemisphere the aggregated gain value is 2 dB higher when considering all 18 radiation patterns instead of only one of the selected configurations. The results clearly indicate higher angular coverage of the antenna when all configurations are used.  To assess the angular coverage of the antenna that include all possible beam configurations, aggregated radiation patterns need to be considered. This form of presentation is known in the context of time-modulated arrays and 3D coverage analysis for 5G applications where the aggregated characteristic consists of all available antenna radiation patterns to show the complete spatial coverage providable by the antenna [41]. Aggregation is selecting the highest gain values for each angle from the available radiation pattern sets. In the discussed construction the aggregated radiation pattern consists of 18 characteristics: 6 for UP configuration, 6 for MID configuration and 6 for DOWN configuration. In Figure 8, it can be seen that the angular coverage range in elevation for aggregated gain above 0 dB starts from 10°. It means that only limited space under the antenna can be considered as a blind zone. To emphasize the difference in the antenna spherical coverage dependent on the selected beam configurations, a cumulative distribution function (CDF) of aggregated gain can be used [42]. In Figure 9, a CDF for the discussed antenna is presented and aggregated beams for each configuration are compared with aggregated function of all 18 radiation patterns. For example, it can be seen that for 50% of the hemisphere the aggregated gain value is 2 dB higher when considering all 18 radiation patterns instead of only one of the selected configurations. The results clearly indicate higher angular coverage of the antenna when all configurations are used.

RSS-Based DoA Estimation for Two-Row ESPAR Antenna
Power-pattern cross-correlation algorithm is one of the most practical methods to determine unknown directions of RF signals impinging on an ESPAR antenna [10,[18][19][20]. It relies solely on RSS measurements gathered at the antenna output port and uses simple correlation coefficient calculation [18]. When written as matrix-vector operations, they can

RSS-Based DoA Estimation for Two-Row ESPAR Antenna
Power-pattern cross-correlation algorithm is one of the most practical methods to determine unknown directions of RF signals impinging on an ESPAR antenna [10,[18][19][20]. It relies solely on RSS measurements gathered at the antenna output port and uses simple correlation coefficient calculation [18]. When written as matrix-vector operations, they can easily be integrated with a simple microcontroller and provide DoA estimation functionality to the WSN node [10]. In its original implementation, the algorithm relies on ESPAR antenna radiation patterns measured in an anechoic chamber only in the horizontal direction [18]. In consequence, it makes DoA estimation results accurate in the θ = 90 • direction (i.e., the horizontal plane) with 2-4 • precision being the maximum DoA estimation error [18][19][20]. When the directions of RF signals impinging on an ESPAR antenna are different, one may expect an accuracy drop. It has been reported that for low values of θ angle of RF signals impinging on the antenna the maximal error, referred to as precision, of 1D DoA estimation performed in the horizontal direction can easily reach 13 • due to the fact that the shape of ESPAR antenna radiation patterns with respect to ϕ angles gradually changes for θ > 90 • [23]. To improve the overall accuracy for the θ angles different than 90 • , one can employ multiple calibration planes (MCP) [23,24] in the original PPCC formulation, which relies on a single θ = 90 • calibration plane [18].
PPCC-MCP algorithm uses ESPAR antenna radiation patterns measured in chosen vertical directions. In the first implementation, all ESPAR antenna radiation patterns were measured in an anechoic chamber at θ = 90 • and θ = 45 • and, based on such two calibration planes, it was possible to maintain 4 • precision for RF signals impinging from angles between θ = 50 • and θ = 90 • [23]. Involvement of 9 calibration planes, namely {θ 1 = 10 • , θ 2 = 20 • , . . . , θ 9 = 90 • }, provides 6 • 1D DoA precision for RF signals impinging from 9 test vertical angles spanning equally between θ = 10 • and θ = 90 • . However, it has been shown that PPCC-MCP algorithm accuracy is sensitive to correct placement of calibration planes positions [24], while obtained results depend on testing setup [28] parameters, especially the choice of testing directions in horizontal and vertical planes as well as SNR values set for testing signals [24,28]. Moreover, the existing PPCC formulation was created to provide DoA results based on a number of directional radiation patterns, while new ESPAR antennas can have a number of possible radiation patterns that can be used in DoA estimation [32,33] having different performance, especially when testing signals may come from multiple horizontal and vertical directions. Therefore, to be used for DoA estimation together with new ESPAR antennas, including the two-row ESPAR antenna proposed in [31], PPCC-MCP algorithm and associated DoA testing methods have to be generalized.

PPCC-MCP Algorithm
PPCC algorithm which allows DoA estimation based on ESPAR antenna radiation patterns measured in an anechoic chamber relies on a cross-correlation coefficient between the measured radiation patterns and RSS values recorded for each directional antenna radiation pattern [18]. The cross-correlation coefficient for the ESPAR antenna having 12 directional beams has the following form: where V n max is ESPAR antenna's steering vector that allows to create n-th directional radiation pattern, P(V n max , ϕ) are directional ESPAR antenna radiation patterns measured during the calibration phase in an anechoic chamber in the azimuth plane for 0 • ≤ ϕ < 360 • , Y(V n max ) are RSS values measured at the antenna output port for all 12 directional radiation patterns during the DoA estimation phase for an unknown RF signal, and Γ(ϕ) is the cross-correlation coefficient, which have its highest value associated with the estimated direction of arrival angleφ [18].
In practical implementations, the angular step precision ∆ϕ = 1 • is commonly used during the calibration phase, and therefore, the cross-correlation coefficient can be written in a convenient vector form as [19]: where vector p n = p n 1 , p n 2 , · · · , p n I T , where the superscript T is the vector transpose operator, contains I = 360 measured discreet values of P(V n max , ϕ) and '•' denotes the element-wise product of vectors. In result, the cross-correlation coefficient g = [Γ(ϕ 1 ), Γ(ϕ 2 ), . . . , Γ(ϕ I )] T is also a vector with I = 360 entries being discretized values of the correlation coefficient Γ(ϕ) for every considered value of ϕ in ϕ = [ϕ 1 , ϕ 2 , . . . , ϕ I ] T = [0 • , 1 • , . . . , 359 • ] T and ϕ corresponds now to the maximum value of g. One should note, however, that as only a single calibration plane at θ = 90 • is used to measure directional ESPAR antenna radiation patterns in an anechoic chamber during the calibration phase, cross-correlation operation Equation (2) will produce the most accurate results when RF signals impinging on the antenna arrive from θ = 90 • vertical angle, which is aligned with the calibration plane. The results will significantly deteriorate for lower θ angles as the shape of ESPAR antenna radiation patterns gradually changes for θ > 90 • [23,24].
To further extend PPCC algorithm and improve its accuracy in situations when θ angles of RF signals impinging on the antenna are different than 90 • , PPCC-MCP algorithm, which allows to incorporate higher number of calibration planes, has been introduced [24]. It is based on the following cross-correlation coefficient: where, for the considered number of M calibration planes Equation (3) [24,28]. In consequence, the estimated DoA angleφ is now a value in ϕ θ that corresponds to the highest value in g θ [28]. It should be underlined, however, that both the number of calibration planes and choice of their θ angles highly influence the overall DoA estimation accuracy when RF signals impinging on the antenna arrive from arbitrary θ angles [23,24,28,34].

Generalized PPCC-MCP Algorithm for Two-Row ESPAR Antenna
The vector form of the PPCC algorithms in Equations (2) and (3) is appropriate for implementation in a WSN node's microcontroller to compute DoA estimation based on RSS measured for incoming packets. It is also straightforward to use such a node with ESPAR antennas having different number of directional radiation patterns or other switched beam antennas [28]. However, it is possible to create many different directional radiation patterns in ESPAR antennas and also patterns that do not have a clearly shaped directional beam. For an ESPAR antenna having 12 passive elements designed for vehicle-to-everything (V2X) applications in 802.11p frequency band, due to performance of microwave switches used at the terminals of passive elements in 5.9 GHz frequency band, it was possible to form 5 different directional radiation patterns types [32] having different beam parameters in the horizontal plane, e.g., gain, HPBW and sidelobe level (SLL), as well in the vertical plane. As every radiation pattern type can be rotated in the horizontal plane to form 12 directional beams, PPCC and PPCC-MCP algorithms can successfully be used in RSS-based DoA estimation [33]. Unfortunately, although such estimation could involve different radiation pattern types in a single estimation, to further increase the overall accuracy, appropriate and convenient PPCC-MCP algorithm formulation has not been created so far. Similarly, among 18 available two-row ESPAR antenna radiation patterns, there exist 6 groups having similar main beam direction in the horizontal plane with differences radiation pattern shape in elevation.
To perform RSS-based DoA estimation based on radiation patterns available for tworow ESPAR antenna, one has to create a generalized PPCC-MCP algorithm that can easily be implemented within simple WSN nodes and involves all possible radiation patterns. Due to their spatial characteristics, it is possible to increase the overall accuracy of the estimation while mitigating the necessity of correct placement of calibration planes. As the two-row ESPAR antenna radiation patterns, which are created using associated steering vectors V n , exhibit certain spatial performance, including gain, SLL, direction of maximal radiation and HPBW, in both horizontal and vertical directions, we propose rewriting Equation (3) in the following general form: Total number of radiation patterns used in the DoA estimation and n = {n 1 , n 2 , . . . , n N } are numbers of chosen steering vectors V n associated with specific two-row ESPAR antenna radiation patterns p n θ ALL . Since θ ALL means that all M = 90 possible angles in elevation direction, namely {θ 1 = 90 • , θ 2 = 89 • , . . . , θ 90 = 1 • }, are used as calibration planes, a high-precision turntable in the anechoic chamber is required. In consequence, vectors p n θ ALL , g θ ALL , ϕ θ ALL will be much longer with the total length I·M = 32400, which will make PPCC-MCP calculation more time consuming. However, the overall DoA estimation accuracy of the proposed generalized PPCC-MCP algorithm is no longer dependent on the choice of number and placement of calibration planes. Therefore, the overall DoA estimation accuracy will not be affected when RF signals impinging on the antenna arrive from arbitrary θ angles.

Mesurement Setup
To verify DoA estimation performance of the two-row ESPAR antenna using the generalized PPCC-MCP method 18 available antenna radiation patterns were measured in our 11.9 m × 5.6 m × 6.0 m anechoic chamber, shown in Figure 10

Deatiled DoA Testing Method
To examine DoA estimation accuracy, measured calibration planes were imported to Matlab, where 10 snapshots of sinusoidal test signal were generated for all considered test directions (ϕ t , θ t ) of impinging RF signals. During each test, as snapshots have to be received at the antenna's output [19,20,23,33], all sinusoidal test signals were multiplied by two-row ESPAR antenna radiation patterns values measured at appropriate test directions. Then, additive white Gaussian noise (AWGN) was added to obtain a required signalto-noise ratio (SNR) and RSS value was calculated. Thus, the SNR value has not to be measured as it is determined by setting the appropriate value of spectral power density of numerically added AWGN. This reflects the measurement procedure presented in [20]. In result, for every considered test direction (ϕ t , θ t ) an RSS value has been obtained for all considered two-row ESPAR antenna radiation patterns.
To compare the results with those already available in the literature, the test signal directions have to be set with discrete angular steps equal to ∆ϕ t = 10 • and ∆θ t = 10 • in horizontal and elevation directions, respectively [24,28,33]. In consequence, one obtains 36 test horizontal directions ϕ t ∈ {0 • , 10 • , . . . , 350 • } for 9 elevation angles θ t ∈ {90 • , 80 • , . . . , 10 • }, which results in 324 testing points. Then, for every elevation angle, PPCC-MCP algorithm is used and, based on obtained 36 estimated direction of arrival angleφ values, root-mean-square error (RMSE) is calculated together with precision being the maximal DoA estimation error value within the plane. However, it has been observed in [43] that when ∆ϕ t = 5 • and ∆θ t = 5 • is used, more accurate test results can be provided. Therefore, additional new testing directions, especially in elevation, reveal lack of accuracy of DoA estimation using ESPAR antenna together with PPCC-MCP algorithm for low θ angles when M = 9 calibration planes are used. As it was overlooked in [24], to verify DoA estimation performance in a detailed way for the proposed two-row ESPAR antenna and generalized PPCC-MCP algorithm, the number of testing points has to be further increased. To this end, we propose to use detailed DoA testing method that involve ∆ϕ t = 1 • and ∆θ t = 1 • in horizontal and elevation directions correspondingly. In result, 360 test horizontal directions ϕ t ∈ {0 • , 1 • , . . . , 359 • } for 90 elevation angles θ t ∈ {90 • , 89 • , . . . , 1 • } are created and, consequently, 90 RMSE and 90 precision values will be available for each plane.
To verify the performance of generalized PPCC-MCP algorithm for different SNR levels, two additional DoA tests, with SNR = 5 dB and SNR = 0 dB, were performed. As it can easily be noticed in Figure 13, the most accurate results in both cases can be obtained for only 12 steering vectors when { , } steering vectors set is used. Therefore, two-row ESPAR antenna together with the proposed generalized PPCC-MCP algorithm can successfully be used for RSS-based DoA estimation in WSN nodes and gateways, even in noisy environments. To verify the performance of generalized PPCC-MCP algorithm for different SNR levels, two additional DoA tests, with SNR = 5 dB and SNR = 0 dB, were performed. As it can easily be noticed in Figure 13, the most accurate results in both cases can be obtained for only 12 steering vectors when {V n mid , V n down } steering vectors set is used. Therefore, two-row ESPAR antenna together with the proposed generalized PPCC-MCP algorithm can successfully be used for RSS-based DoA estimation in WSN nodes and gateways, even in noisy environments.

Conclusions
In this paper, we show a how two-row ESPAR antenna can be used for RSS-based DoA estimation. To this end, we have presented an analysis of all 18 available 3D antenna radiation patterns, being measured in an anechoic chamber, with respect to radiation coverage in the horizontal and vertical direction as well as their directional performance important in the estimation process. Moreover, we have proposed PPCC-MCP algorithm generalization that involves the usage of a very high number of calibration planes and can handle specific combinations of two-row ESPAR antenna radiation pattern sets. Detailed DoA estimation accuracy assessment, which involves thorough testing conducted along the elevation direction when RF signals impinging on the antenna arrive from arbitrary θ angles, shows that accurate results can be produced for only 12 steering vectors used. Pre-

Conclusions
In this paper, we show how a two-row ESPAR antenna can be used for RSS-based DoA estimation. To this end, we have presented an analysis of all 18 available 3D antenna radiation patterns, being measured in an anechoic chamber, with respect to radiation coverage in the horizontal and vertical direction as well as their directional performance important in the estimation process. Moreover, we have proposed PPCC-MCP algorithm generalization that involves the usage of a very high number of calibration planes and can handle specific combinations of two-row ESPAR antenna radiation pattern sets. Detailed DoA estimation accuracy assessment, which involves thorough testing conducted along the elevation direction when RF signals impinging on the antenna arrive from arbitrary θ angles, shows that accurate results can be produced for only 12 steering vectors used. Precision lower than 11 • , 17 • , and 42 • have been obtained for all θ angles when SNR was equal to 10 dB, 5 dB, and 0 dB, respectively. These results indicate that a two-row ESPAR antenna can produce accurate DoA estimation in the horizontal plane without prior knowledge about the elevation direction of the unknown RF signals even for low SNR values. Therefore, as the antenna beam switching in elevation and azimuth can be realized using a simple microcontroller and the DoA estimation relies solely on RSS values measured at the antenna output port, the antenna can easily be integrated with a WSN node or a WSN gateway. Moreover, 2D beamforming capabilities and accurate DoA estimation opens up new frontiers for ESPAR antenna applications involving new portable low-cost ground penetrating radars [44] and noninvasive microwave imaging devices supported by machine learning (ML) algorithms [45].