A Near-Field Focused Array Antenna Empowered by Deep Learning for UHF-RFID Smart Gates

This article introduces a new radio frequency identification (RFID) gate for access control merging the benefits of near-field focusing and deep learning (DL). The gate uses a near-field (NF) focused antenna with a slight tilted beam to create an asymmetrical reading volume, which is essential to determine the direction of tag transit with a single antenna. The power and phase of the signal backscattered from the tag are used as features for classifying tag status: crossing, static, or moving around the gate yet not crossing it. The antenna is made up of a 3 × 3 array of circularly polarized resonant patches, operating at the ETSI RFID band (865–868 MHz). After validating the coverage volume of the antenna, tag data were used to train a multiclass support vector machine (SVM) and a long-short term memory neural network (LSTM-NN). The appropriately sized LSTM-NN yields 98% classification accuracy in a scenario emulating a realistic shop entrance. The solution offers improved robustness to multipath effects and reduced false positives compared with conventional RFID gates using phased array antennas, two closely spaced portals, or bulky electromagnetic screens or absorbers, at lower cost and with a simpler infrastructure.

A Near-Field Focused Array Antenna Empowered by Deep Learning for UHF-RFID Smart Gates Andrea Motroni , Member, IEEE, Marcos Rodriguez Pino , Glauco Cecchi, Student Member, IEEE, and Paolo Nepa , Senior Member, IEEE Abstract-This article introduces a new radio frequency identification (RFID) gate for access control merging the benefits of near-field focusing and deep learning (DL).The gate uses a near-field (NF) focused antenna with a slight tilted beam to create an asymmetrical reading volume, which is essential to determine the direction of tag transit with a single antenna.The power and phase of the signal backscattered from the tag are used as features for classifying tag status: crossing, static, or moving around the gate yet not crossing it.The antenna is made up of a 3 × 3 array of circularly polarized resonant patches, operating at the ETSI RFID band (865-868 MHz).After validating the coverage volume of the antenna, tag data were used to train a multiclass support vector machine (SVM) and a long-short term memory neural network (LSTM-NN).The appropriately sized LSTM-NN yields 98% classification accuracy in a scenario emulating a realistic shop entrance.The solution offers improved robustness to multipath effects and reduced false positives compared with conventional RFID gates using phased array antennas, two closely spaced portals, or bulky electromagnetic screens or absorbers, at lower cost and with a simpler infrastructure.

I. INTRODUCTION
I N RECENT years, a broadening interest in Internet of Things (IoT) and radio frequency identification (RFID) technology is being witnessed in many sectors of industry and commerce, such as manufacturing, logistics, supply chain, and retail [1], [2].Passive RFID technology at ultrahigh-frequency (UHF) band has proven to be a very successful and appealing option to realize intelligent systems for warehouse management, antishoplifting, anticounterfeiting, and other applications [3].Automated real-time tracking of goods in a large plant, warehouse, or store can be accomplished through continuous monitoring of shelves combined with product localization [4], as well as through the installation of appropriate checkpoints, namely RFID gates [5].
An RFID gate typically consists of one or more UHF-RFID readers, one or more antennas, potential shielding structures, and other devices such as photocells or cameras.The goal of an RFID gate is to successfully read the totality of crossing tags while filtering out undesirable tags that are nearby, also indicating the direction of gate transit.In this way, it is conceivable to keep track of the status of a warehouse or store, or to implement antitheft alarm systems.
Multiple types of RFID gates have been developed.Some involve tunnel gates, which isolate the tags to be read from their surroundings by means of metal shieldings [6], [7].This solution is expensive and cumbersome and may require heavy alterations in the architecture and esthetics of the building.Multiantenna solutions can be effective to detect the gate crossing direction but they are costly solutions [8], [9], [10].
Slender and single-antenna RFID gates have been designed in [5] and [11].To work, they exploit the signal phase [12] in addition to tag readings and the power of the received signal.By exploiting particular antenna configurations installed to have an asymmetrical reading volume, the phase appears to be a very useful feature above all for discriminating the direction of transit, as well as filtering out tags of no interest (false positives) [13].
However, there are still some issues to be solved with this type of gate.First, the absence of shielding structures sometimes makes it difficult to filter out undesirable moving tags around the gate.Multipath fading can also create channel blind spots where tag reading is hindered (false negatives).In addition, propagation channel variations induced by the transit of a person/vehicle under the gate can create propagation conditions such that some tags normally outside the reading volume become momentarily detectable (false positives).Moreover, gate crossing at relatively high speed represents a further issue as phase-based solutions often rely on phase analysis after unwrapping.
There are two solutions to solve some of the abovementioned problems.Surely, it is possible to act at the hardware level, for example, by realizing suitable antennas focused in the antenna near-field (NF) region [14], [15], [16], [17].In this case, the electric field can be maximized in the region of interest around the gate center, so realizing a spatial filter for all the undesirable tags in the gate vicinity, without resorting to bulky shieldings.Furthermore, multipath generated by the ground, walls, or other obstacles is mitigated by the low far-field (FF) radiation of focused antennas.It is worth mentioning that focusing effects require physically large antennas at the UHF-RFID band (860-960 MHz).
Further solutions exploit machine learning (ML) algorithms as support vector machines (SVMs) or neural networks (NNs) [18], [19], [20], [21], yet they do not allow to push the performance up to the levels required for a completely automatic warehouse management, where very high tracking accuracy is required.
In this article, the advantages of a NF focused (NFF) array are combined with artificial intelligence (AI), and in particular ML and deep learning (DL) techniques to create a low-cost single-antenna smart RFID gate able to track all the tags crossing the gate (also determining their transit direction) and filter out tagged items of no interest, i.e., static tags, or moving tags around the gate yet not crossing it.To the best of the authors' knowledge, such a solution does not currently exist in literature or in the market and represents an innovative advance in its application field.A NFF 3 × 3 patch array in European Telecommunications Standards Institute (ETSI) RFID band is combined with a long-short term memory (LSTM)-type convolutional NN (CNN) which processes the data sequences collected by the RFID reader concerning power and phase samples of the received signal at the reader side.The system is validated in the laboratory by reproducing a realistic setup mimicking a clothing store.For comparison reasons, data are also gathered through a physically tilted conventional FF array built with the same 3 × 3 patch structure.Such a combined approach allows to obtain a 98% accuracy on the classification of the events that occur at the gate, showing an improvement compared with the same system equipped with the FF array.
The combination of a hardware solution, specifically the NFF antenna, and a software solution involving ML offers additional benefits.This integrated approach enhances the robustness of the classification system, enabling it to overcome challenges present in the environment, such as multipath interference.Moreover, it empowers the system to accurately recognize various actions performed by individuals carrying tagged objects, which inherently exhibit variability in terms of nonconstant speeds, rotations, changes in direction, and more.By leveraging both hardware and software components, the system becomes more resilient and capable of handling complex scenarios with greater accuracy.
This article is organized as follows.Section II describes the application scenario, the objectives, the signal model, and the classification algorithms.Section III introduces the focused antenna, the measurement setup, and the data acquisition procedure.Section IV presents the experimental results.In Section V, the system here proposed is compared versus the current state of the art by highlighting its advantages.Finally, Section VI sets out some conclusions.

A. Scenario and Goals
We consider a store or warehouse where we intend to trace the items flowing through a given key point, whether these are carried by a worker, a customer, or a forklift, as shown in Fig. 1.Given the relatively large reading range of RFID systems at the UHF band (of several meters), various equivocal situations can arise (false positives).For instance, the antenna may consistently detect a static tag over time, or it may detect a tag that is normally not visible but becomes detectable when nearby objects or people move by changing the wave propagation channel.Finally, some tags may be moving around the gate without crossing it.Proper antenna placement and design can mitigate the occurrence of these spurious events to a limited extent.Each event results in a different sequence of tag replies in terms of received power and phase samples which are exploitable to implement an accurate tag association to one of the following classes: 1) crossing tag from right to left (R2L); 2) crossing tag from left to right (L2R); 3) static tag (S); 4) moving yet noncrossing tag (NC).It is worth mentioning that to use a single antenna and make the system less expensive, we must necessarily implement an asymmetry in the antenna arrangement or beam steering [5].In this article, we will use the terms "crossing" and "transit" as being synonymous.The tests are conducted using either an FF array or an NFF array, to evaluate and compare the performance of the two systems.

B. Signal Model
UHF-RFID commercial readers usually provide as output data the received signal strength indicator (RSSI) value, which accounts for the power level at the reader side of the signal backscattered by the tag.Up-to-date readers also provide the tag phase response through the analysis of the IQ-signal of an RFID data packet [12].The RSSI is related to the tag-antenna distance and radiation pattern of reader and tag antennas.When conventional FF focused antennas are used, the received power P R X can be expressed as [12] P where P T X is the reader transmitted power, and G R and G T are the reader and tag antenna gains, respectively.θ (T )  el and φ (T ) az are the tag elevation and azimuth angles with respect to the reader antenna, whereas θ (R) el and φ (R)  az are the reader elevation and azimuth angles with respect to the tag antenna.χ is the polarization mismatching coefficient.M is the tag "modulation loss factor" accounting for the amount of electromagnetic incident power that is actually transformed into useful backscattered modulated power by the tag chip impedance modulation.λ is the carrier signal wavelength, d is the distance between reader and tag antennas, and H is a complex factor accounting for multipath effects.
The phase of the signal measured by the reader can be resumed as [12] where is the phase offset caused by reader and tag antennas' radiation patterns and by the tag circuitry, which is quasi-constant within the main lobe of the radiation pattern, and ϕ m is the phase variation caused by multipath phenomena.
Propagation channel effects impact both received power and signal phase.Moreover, given the very narrow band of UHF-RFID communications it is difficult to estimate the contribution of multipath.Resorting to NFF arrays provides a reduction in multipath effect because their inherent low FF gain significantly reduces the radiation to reflecting surfaces relatively far from the antenna.
When the reader antenna is an NFF array, link budget equation in (1) and phase model ( 2) are not valid anymore and a more complex analytical model is required, which depends on the antenna size, array layout, and assigned focal distance [14].As an alternative, the use of DL to process measured RSSI and phase data sequences is here considered.The DL approach collects and models power and phase trends associated with various tags status near the gate by including unpredictable environmental parameters such as the impact of nearby walls, scatterers, moving obstacles, and people, which can be difficult to estimate.
For a correct data classification, we will unwrap the measured phase sequence getting ϕ u .The phase at each timestep n is denoted ϕ u n .To correctly execute the phase unwrapping, consecutive phase samples must not differ more than π, meaning that the distance variation from two consecutive samples shall be lower than λ/4.The values of ϕ u are then normalized by the first sample acquired at n = 0 to release from any unpredictable phase offsets.We then obtain the normalized unwrapped phase sequence ϕ p (where each sample is ϕ p n ).While the use of RSSI and phase values to discriminate between moving tags and static tags is relatively straightforward with a single antenna, the use of a single antenna to discern R2L-crossings from L2R-crossings requires a setting modification.In particular, it is necessary to generate an asymmetry in the antenna radiation pattern [5], [16].To make this clearer, a top view of a scenario in which the gate antenna is positioned laterally to the entrance is shown in Fig. 2. We denote with the x-axis the longitudinal direction as the tags pass through, and with the y-axis the transverse direction.As a consequence, the z-axis represents the vertical direction.If the reading volume of the antenna is symmetrical [see Fig. 2(a)], a symmetrical unwrapped phase ϕ p n will be recorded for both R2L-and L2R-crossings [see Fig. 2(c)].On the other hand, if the reading volume is tilted with respect to the y-axis [see Fig. 2(b)], spatial filtering will be performed and the crossing tag will be detected only during approaches (departures) in the case of R2L-crossings (L2R-crossings).Thus, the unwrapped phase ϕ p n will allow to better distinguish between the two events, as shown in Fig. 2(d) [5].

C. Classification Algorithms
When a tag is detected by the reader, RSSI and unwrapped normalized phase sequence, R SS I n and ϕ p n , are collected.Each sequence has a length of N S samples and a duration of T seconds.
Each data sequence can be collected and then aggregated to build a feature suitable for a classification algorithm.At first attempt, we used a multiclass SVM for its simplicity and real-time suitability [22].The SVM searches for the hyperplane in a high-or infinite-dimensional space to separate two data groups.Multiclass SVM problem is approached through multiple binary classification problems.To classify the four classes of interest (R2L, L2R, S, and NC), we used the following features: RSSI mean value µ R SS I , RSSI variance  duration T .Obviously, in this way, all time information related to the acquired data is lost.
To exploit the time information, the data sequences can be processed by a "sequence to label" classification algorithm, as, for example, the LSTM-NN [23].LSTM-NN are fed with RSS I n and ϕ p n sequences, meaning that an Input Size of 2 is set to the network.
Both the algorithms require a training stage, namely, an offline calibration stage in which the algorithm learns the parameters needed for classification from available data.Specifically, with regard to the LSTM-NN, three types of datasets are defined, named as training set, cross-validation set, and test set.The training set includes all the data that are used for NN training.The cross-validation set is used to identify the best network architecture for the proposed problem.The test set is for final validation.For each of these sets, we define the network performance indicators, namely, "training accuracy," "cross-validation accuracy," and "test accuracy," i.e., the ratio of correctly classified sequences of the corresponding set to the set totals.Care should be taken that each class is represented with a proper number of elements in each set.In LSTM-NN, training consists of an iterative procedure in which at each step, named as "epoch," all available data are processed and network parameters updated.The network architecture allows the number of hidden units and layers to be decided as the most important parameters.Typically, in the field of NNs, an attempt is made to set these parameters to avoid the occurrence of the "underfitting" and "overfitting" phenomena.In practice, underfitting represents the condition in which the network architecture does not have sufficient complexity in terms of number of parameters to represent the physical phenomenon.Overfitting, on the other hand, is a widespread problem and consists of the opposite situation: the network model includes too many parameters and fits the data contained in the training set extremely well, but performance degrades when new data are presented to the network.A tradeoff between these two phenomena must be pursued to optimize network performance [24].

A. Antenna Design
We designed an ad hoc antenna array to build the RFID gate, which is depicted in Fig. 3.It is a custom 3 × 3 array of left-hand circularly polarized (LHCP) patch antennas printed on a 3.2-mm-thick FR4 substrate [ε r = 4.3 and tan(δ) = 0.025], designed to operate at the UHF-RFID ETSI band (865-868 MHz).The array element is a corner-truncated patch antenna, with a side of 78 mm.The array size is 50 × 50 cm.Sizes of array and elements are depicted in Fig. 4(a).The patch exhibits a half-power beamwidth (HPBW) of about 120 • , in both the principal planes.A single-port feed has been implemented through a 50-microstrip feeding network.The spacing between the elements is λ/2.The array beam is fixed and cannot be steered.
For a fair comparison between FF and NFF arrays, the antenna layout is identical except for the feeding network.In the FF array case [see Fig. 4(b)], the Z 0 = 50-microstrip and get Z in = 50 .All the ports are fed in phase, and therefore, the array exhibits a broadside pattern and a mechanical tilt is required to generate the asymmetry in the antenna radiation pattern.
In the NFF array, the feeding network is modified to achieve a desired quasi-quadratic phase profile [14] and get a tilted focal spot at around 80 cm from the array surface [see Fig. 4(c)] at an angle α = 30 • .Therefore, the reading volume is asymmetrical as shown in Fig. 2(b).Such configuration yields low FF propagation, but allows an NF focusing effect [14].
The FF array exhibits a modulus of the reflection coefficient .This demonstrates that the system is operating in the NF region when tags are in the target region at y ∈ [1, 3] m, where tag motion tests will be deployed.Moreover, the modulus of the electric field decreases faster when the NFF is used [see Fig. 6(a) and (b)], meaning that a slight NF focusing effect is present.The impact of NF focusing is not particularly noticeable due to the limited size of the 3 × 3 array, which is approximately λ × λ.To enhance its effectiveness, the size should be increased, although this would result in larger objects and higher costs.However, the suggested solution proves to be compatible with standard store space requirements and, as we will observe from the achieved outcomes, it offers an improvement compared with the utilization of the FF array.In both the cases, it is clearly evident that the maximum radiation direction is α = 30 • .For a clearer depiction of the transition through the FF region, refer to the provided Fig. 7.It illustrates the magnitude of the electric field radiated by the FF array toward the direction of maximum radiation (α = 30 • ), displayed as a blue solid line, and the magnitude of the electric field emitted by the NFF array at the same direction, depicted as a red dashed line.In addition, a thin black line represents a straight line at −20 dB/decade.Electric field is normalized according to its value at a distance of 10 m.As observed, the −20 dB/decade path loss is approached at a distance greater than 5 m for both the FF and NFF arrays.

B. Setup Description
To assess the performance of the system with both the FF and NFF arrays, an experimental setup was built at the facilities of the University of Pisa as depicted in Fig. 8.An Impinj R420 RFID reader was connected first to the FF array and then to the NFF array, and set with a transmitting power of 20 dBm at f 0 = 865.7 MHz.For convenience, the FF and NFF arrays have been placed on a table pointing the volume in which crossings are expected.It should be noted that a commercial solution for such a system should integrate the antenna into a thin planar radome which is not easily accessible or otherwise hidden, especially for antitheft applications.Avery-Dennison passive UHF-RFID AD23 tags with NXP U8 chip have been used.The surrounding environment is a large meeting room, where multipath propagation is expected.

C. RSSI Map
Initially, the coverage volume of the two arrays was tested.Coverage volume refers to the portion of space in which an RFID tag interrogated by the antenna can reply.To test it, we connected both the antennas to the reader and placed them at 1.5 m from the floor.We moved an RFID tag in the room, following a regular grid with a 40-cm pitch.The tag was placed with vertical orientation on a wooden stand at a height 1.5 m.We consider the direction of tag crossings to be the x-axis and the orthogonal direction to be the y-axis.The grid goes from x = −2.40m to x = 2.40 m and from y = 0.40 m to y = 2.40 m.A heatmap of the recorded RSSI values on the x y plane is depicted in Fig. 9(a) and (b) for the FF and NFF arrays, respectively.It can be noticed that both the tilted FF array and NFF array with lateral focal spot are suitable solutions to get an asymmetrical coverage volume.For the assigned 20-dBm radiated power, the NFF array gathers on average higher RSSI levels with respect to FF array in the region of interest, as expected.

D. Data Acquisition
During the antenna motion, RSSI and phase data are recorded by the reader for offline signal processing.The RFID tags that carried out the R2L-and L2R-crossings were Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.either placed on some cardboard stands and moved manually by an operator, or attached to the labels of some clothes hanging on clothes racks with wheels moved back and forth.Used substrates are characterized with low electromagnetic conductivity.These materials closely resemble objects that are typically found in stores, thereby offering a realistic simulation.The metallic parts of the racks are far enough from the tags, so that standard inlay tags can be used.Indeed, the presence of metal parts contributes to the implementation of a realistic store environment.The distance of the tags from the antenna changes over three possible values, 1, 1.5, and 2 m, with some cases in which some tags were at 3 m, while the height is varied between 1 and 1.5 m.To make the data acquisition as realistic as possible, crossings were made at different speeds by identifying two different datasets: "slow" speed transits, i.e., with a speed lower than 0.5 m/s, and "fast" speed transits, i.e., with a speed higher than 0.5 m/s.Static tags were placed on the clothes hanging on the clothes' racks kept motionless, at a distance from 2.5 to 4 m from the reader antenna.Moving tags that do not cross the gateway are placed on cardboard holders and perform movements of moving away and approaching, or other more or less random movements.By referring to NFF array, a total of 1087 R2L, 1087 L2R, 1073 S, and 105 NC sequences were acquired.Out of these, 544 R2L, 544 L2R, 537 static, and 53 NC were "slow" speed transits, whereas the remaining 543 R2L, 543 L2R, 536 S, and 52 NC were "fast" speed transits.A dataset of similar size was acquired through the FF array.
As an example, some RSSI and phase sequences are displayed in Fig. 10.Fig. 10(a) and (b) represents an RSSI and a phase sequence, respectively, collected with the FF array, whereas Fig. 10(c) and (d) shows an RSSI and a phase sequence, respectively, gathered with the NFF array.Tag motion was similar in the two transits in terms of distance (around y = 2 m) and speed (v ≃ 35 cm/s).It can be noted that RSSI data for R2L-crossings (circular blue markers) and L2R-crossings (squared red markers) movements are similar, meaning that it would not be easy to distinguish between the two classes from RSSI data only.However, thanks to the setup asymmetry, unwrapped phase curves of the two events are more distinguishable.This comment applies to both the FF and NFF arrays.
As for static tags (represented by triangular green markers), the RSSI and phase values are almost constant and serve as a reliable signature for this class.In this case, the NFF is capable of detecting the static tags but with lower RSSI values with respect to the FF array.NC tags (represented by diamond black markers) are the most challenging to recognize.NFF array is, however, more effective in classifying these tags.Indeed, when these tags are relatively far from the antenna, NF focusing may help filtering them out because too far to be powered up.On the other hand, when they are close, they still present a lower number of readings and consequently shorter data sequences, and therefore a stronger difference in the classification features is achieved to help classification.
One of the advantages of the NFF array versus the corresponding FF array is that for an assigned radiated field amplitude in the NF region, the NFF array radiates a lower field in the FF region, so reducing the interference level [14].This expected behavior is confirmed by the RSSI.This fact offers several advantages: 1) the NFF array may not even read far tags, effectively performing a spatial filtering and 2) if far tags are detected by the reader, they generally exhibit significantly lower power values (RSSI) and a reduced reading rate (readings per second), when compared with crossing tags, so helping to differentiate between crossing tags and static tags.Overall, NF focusing may be exploited for getting improved performance in classifying different tag categories.

A. Multiclass Support Vector Machine
First, multiclass SVM is considered.About 60% of available data are used for training, whereas the remaining 40% are  As observed, the −20-dB/decade path loss is approached at a distance greater than 5 m for both the FF and NFF arrays.Electric field is normalized according to its value at a distance of 10 m. devoted for testing [25].The number of classes is 4 (i.e., R2L, L2R, S, and NC).The number of features is 5, so a set of hyperplanes in a 5-D domain will be estimated for best classification.After the training stage, a test accuracy of only 65% was achieved.Upon closer analysis of the available data, it becomes apparent how difficult it is to separate these four clusters of elements with a set of hyperplanes.Fig. 11 represents a scatter plot of three of the five available features, when data are gathered with the NFF array: number of samples N S , RSSI variance σ 2 RSS I , and phase slope s [rad/s].The four classes are represented by different colors.The plot highlights a remarkable overlapping between the spots of the four clusters.No substantial differences in performance were found for the FF array.These results led us to pursue the path of time analysis with LSTM-NN, which, although requiring higher computational effort, may provide better performance.

B. LSTM Neural Network Architecture
As a first objective, the network architecture that would allow the best classification capability was estimated for data acquired with either the FF array or the NFF array.Initially, data from the entire dataset, including both "slow" and "fast" crossings, were used.Around 60% of the available data are devoted to the training set, 20% to the cross-validation set, and the remaining 20% to the test set, as recommended in [25].We changed the number of layers from one to five, and hidden units assume the values [10, 20, 50, 100, 200].We trained the network and evaluated the cross-validation accuracy.Fig. 12(a) and (b) shows the heatmaps of the cross-validation accuracy for the FF and NFF arrays, respectively.It can be noted that in both the cases, the best accuracy is reached with three layers and 50 hidden units.Data from the FF array reached a 98% cross-validation accuracy, whereas data from the NFF array reached 99% cross-validation accuracy.Although small differences in accuracy may seem insignificant, from a logistics point of view a difference of only 1% point may become critical for high volumes of handled goods.The phenomena of underfitting and overfitting can be identified by looking at the two graphs.At the bottom left, where the number of layers and hidden units is low, we incur the phenomenon of underfitting, where the complexity of the network is not sufficient to model the physical phenomenon.In the upper right, but also in the lower right, where the number of layers and/or hidden units is high, we incur overfitting.
Adding layers beyond the first one significantly increases the training time.While an average training time of 9 min was required for a single layer, it takes about an hour to achieve the desired result when three layers are considered with a 12th Gen Intel1 Core i7-12700H 2.30 GHz and 16-GB RAM.However, such training time is compatible with the installation time of the system in an industrial/commercial environment.On the other hand, once the network has been trained, few ms are required for running the classification algorithm, so that the system finds to be suitable in real-time systems for monitoring access or antishoplifting.
Once the best network configuration has been obtained, performance analysis is performed on the test set.For the FF array, a 97% accuracy was obtained on the test set, whereas 98% was reached by processing data gathered through the NFF array.The progress of the training process is depicted in Fig. 13 for the three layers, 50 hidden units, and NFF array.Training accuracy (blue circular markers) and test accuracy (red squared markers) reach a floor after around 10 epochs (around 1 h).

C. Effect of Input Parameters on LSTM-NN Performance
We performed an analysis to show the effects of the phase information on the classification performance when compared with a procedure which uses the RSSI parameter alone.We reperformed the network training on the total datasets including both "slow" and "fast" transits, for both the arrays, using as input only the RSSI parameter (Input Size = 1), and then only phase (Input Size = 1).The results are then compared with those achieved by the network previously trained using both RSSI and phase samples (Input Size = 2).The histogram in Fig. 14 shows the obtained values of test accuracy in the three cases.It can be seen that using the NFF array improves performance.In addition, it can be seen that the RSSI parameter alone does not allow obtaining accuracy higher than 80% in any case.As for using the phase alone, using the NFF array yields 95%, compared with 90% for the FF array.This difference is due to the fact that R2L-and L2R-crossing tags can be better discriminated from NC tags when the phase information is exploited.For both the arrays, the best performance is obtained by combining the data from both RSSI and phase sequences.

D. Effect of Crossing Speed
The speed at which tags cross the gate and move around it greatly affects the classification performance.A lower speed results in a larger number of acquired samples, which does not necessarily improve the RSSI acquisition but helps avoid  issues related to phase unwrapping, thanks to denser spatial sampling.To compare the results, we retrained the LSTM-NN using only data from "slow" and "fast" crossings separately, and compared it with the network using all the data together.The histogram in Fig. 15 shows the obtained values of test accuracy in the three cases.As expected, using data from "slow" crossings improves accuracy, even reaching 100% in the case of NFF arrays."Fast" crossings alone, on the other hand, worsens performance in comparison to the total dataset.It is also clear from this graph that the amount of data collected is in general sufficient to perform network training.In fact, despite using only around half of the available data to train the network in the "slow" and "fast" cases, we still manage to complete the training and achieve good performance on the test set.

V. DISCUSSION AND COMPARISON WITH STATE-OF-THE-ART
When comparing RFID gate solutions, many factors must be considered.It is important to keep in mind that a proper figure-of-merit should be defined within the context of the application of interest.For example, in tunnel gates, stray reads (false positives) are prevented with proper shielding, and RFID gate performance can be measured in terms of percentage of detected tags.In other gates, accuracy may be evaluated on crossing direction recognition, but not on recognition of S Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.or NC tags, that are out of the gate scope.In addition, each solution is usually tested in different environments, making it difficult to compare gates under the same conditions.However, gates can be evaluated based on their purpose, cost, and complexity.The cost of a gate mainly depends on the reader, the number of antennas, and the hardware needed for data processing and decision-making.Complexity is closely related to cost, as higher costs often result from a larger number of objects to integrate.However, complexity also includes time-consuming calibration steps during installation, which are crucial for implementing AI-based gates.A summary of some of the most significant solutions proposed in the literature is provided in Table I.Shielded tunnel RFID gates are popular in industry.In [26], a gate with absorbing panels to limit the reading volume is presented.The goal is to detect a total of 134 crossing tags simultaneously.A maximum accuracy of 97.8% (131 on 134 tags detected) was achieved with a commercial Times-7 A5010 antenna with 8.5-dB gain and a transmitted power of 24.5 dBm.Among multiantenna solutions, Keller et al. [27] exploited RSSI, timestamp, and reading antenna ID to classify tags crossings when tagged items are carried by a forklift truck.A configuration comprising two readers and eight antennas allowed to reach an overall accuracy of around 99%, meaning that the portal is able to filter out false positives.

TABLE I COMPARISON OF THE PROPOSED SOLUTION WITH RESPECT TO THE STATE-OF-THE-ART OF RFID GATES
Two antennas can be used to estimate the crossing direction of the RFID tags.In [28], a dual-antenna scheme was proposed to control children access to school.The antennas are placed upon the school entrance, one facing inward and the other outward.Accuracy was lower than 97% due to the large amount of children crossing the gate simultaneously.Phase-based solutions [12] may be beneficial insofar as the phase of the backscattered signal significantly changes as the tagged items are moving and can be fruitfully exploited to accommodate the use of a single antenna, thus lowering the infrastructure cost.In [11], a phase-based access control system using a single tilted antenna was presented.Here, an attempt was made to discern via unwrapped phase curve analysis the tags that were passing through the gate (R2L and L2R) from NC tags.The accuracy obtained is 97%.A similar gate can be used for forklift transit monitoring as Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
AI might be relevant in RFID field to mitigate the false positive issues [29].In [18], ML is introduced in the context of RFID gates for pallet tracking in a plant.An antenna facing the floor is installed at one of the plant doorways.A regular grid of reference 24 tags is lying on the floor.As the pallet crosses the gate, the reference tags are shadowed by the metallic pallet truck structure.The sequence of shadowed tags can be used as input for an LSTM-NN.A classification accuracy among crossing tags (R2L and L2R) and S and NC tags of 100% is reached.Unfortunately, tags' positioning on the floor is not always feasible in industrial environments.Usage of LSTM-NN to process RSSI sequences is faced in [20].In this case, an FF array is used to recognize crossing or static tags, without implementing a crossing direction estimation.A 100% accuracy is achieved.

VI. CONCLUSION AND FUTURE WORK
A UHF-RFID smart gate has been described, which is able to efficiently detect crossing tags, determine their transit direction, and discriminate crossing tags from both the static tags and moving tags yet noncrossing the gate.To reduce false negative and false positive events, the proposed solution jointly exploits the principle of NF focusing and DL methods.Both the received power (RSSI) and phase data are used to train an LSTM-NN.A measurement campaign has been implemented to validate the performance of the proposed system, showing that it can reach an accuracy of 98%, which is attractive for application in real scenarios.When compared with other existing RFID smart gates, the proposed solution may guarantee similar performance in terms of correct classification, yet with a reduced infrastructure complexity as a single NFF antenna with a slightly tilted focal spot is needed.The performance improvement over a similar smart gate using a conventional FF focused antenna has also been measured.The beneficial effect of using the phase sequence as an additional classification feature over the RSSI sequence has been shown too.Work is in progress to increase the system accuracy using larger NFF arrays and advanced DL methods.

Fig. 1 .
Fig. 1.Schematic of the reference scenario.A UHF-RFID gate with a single antenna is installed at a shop entrance with either an FF array or an NFF array.

σ 2 R
SS I , phase variance σ 2 ϕ , and unwrapped phase slope s = (ϕ p N S − ϕ p 0 )/T computed by analyzing ϕ p n sequence and transit Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

Fig. 2 .
Fig. 2. Top view of a scenario in which the gate antenna is positioned laterally to the entrance.(a) Symmetrical reading volume.(b) Asymmetrical reading volume (α = 30 • ).(c) Example of unwrapped phase ϕ p n for R2L-and L2R-crossings with symmetrical reading volume (the two data sequences are perfectly overlapping).(d) Unwrapped normalized phase ϕ p n for R2L-and L2R-crossings with asymmetrical reading volume.

Fig. 3 . 3 ×
Fig. 3. 3 × 3 array of LHCP patch antennas used for the measurements.By changing the feeding network, the antenna can radiate either an FF broadside pattern or an NFF spot.
|S 11 | < −10 dB in the 840-882-MHz frequency range, and an antenna gain 9.7 dB at 868 MHz.HPBW is 34.5 • and SLL is −16 dB.Antenna |S 11 | curves are shown in Fig. 5 for both FF (blue markers) and NFF arrays (red markers), together with the single central patch element |S 11 | curve (green markers).The S 11 parameters for FF array and NFF arrays are measured at feeding port.The modulus of the electric field |E| radiated by FF [see Fig. 6(a)] and NFF [see Fig. 6(b)] arrays was simulated through CST Studio and is here shown for the x y plane in the region with x ∈ [−1.5, 1.5] m and y ∈ [0, 3] m.Fig. 6(c) shows plots of the phase of the vertical z-component arg{E z } for the FF [see Fig. 6(c)] and NFF [see Fig. 6(d)] arrays in the same plane and region.Both the antennas present nonperfectly circular equiphase surfaces [see Fig.6(c) and (d)]

Fig. 5 .
Fig. 5. Measured antenna |S 11 | [dB] for the single central patch (green markers), FF array (blue markers) and NFF array (red markers).For FF array and NFF array, |S 11 | is measured at the input port of the array.

Fig. 6 .
Fig. 6.Modulus of the electric field |E| radiated by (a) FF and (b) NFF arrays, and phase of the vertical z-component of the electric field arg {E z } radiated by (c) FF and (d) NFF arrays on the x y plane and in the region with x ∈ [−1.5, 1.5] m and y ∈ [0, 3] m.(a) and (b) Modulus of the electric field decays faster when the NFF array is used.(c) and (d) Both the antennas present nonperfectly circular equiphase surfaces, by demonstrating the system is operating in the NF region.

Fig. 7 .
Fig. 7. Magnitude of the electric field radiated by the FF array (blue solid line) toward the direction of maximum radiation (α = 30 • ) and NFF array (red dashed line).The thin black line represents the straight line at −20 dB/decade.As observed, the −20-dB/decade path loss is approached at a distance greater than 5 m for both the FF and NFF arrays.Electric field is normalized according to its value at a distance of 10 m.

Fig. 9 .
Fig. 9. Heatmap of the recorded RSSI values on the x y plane when a vertical-oriented tag moves from x = −2.40m to x = 2.40 m and from y = 0.40 m to y = 2.40 m with a 40-cm pitch.(a) FF array and (b) NFF array are at the [0, 0] m point.Lighter colors represent higher values of RSSI.

Fig. 11 .
Fig. 11.Scatter plot of three of the five available features for the SVM, i.e., number of samples N S , RSSI variance σ 2 R SS I , and phase slope s [rad/s], when data are gathered with the NFF array.R2L-crossings are depicted with circular blue markers, L2R-crossings with squared red markers, Static tags (S) with triangular green markers, and moving yet noncrossing tags (NC) with diamond black markers.

Fig. 12 .
Fig. 12. 2-D heatmap plot of cross-validation accuracy with respect to the changes in the number of layers and hidden units of the LSTM-NN.(a) FF array.(b) NFF array.

Fig. 13 .
Fig.13.Training (blue circular markers) and test accuracy (red squared markers) progress during a training process for the LSTM-NN with three layers and 50 hidden units processing the data gathered from the NFF array.

Fig. 14 .
Fig. 14.Histogram of obtained values of test accuracy with the LSTM-NN with three layers and 50 hidden units trained with RSSI data sequences, phase data sequences, and RSSI + phase data sequences.

Fig. 15 .
Fig.15.Histogram of obtained values of test accuracy with the LSTM-NN with three layers and 50 hidden units trained with RSSI + phase data sequences derived from the entire dataset, from only "slow" transits, and from only "fast" transits.