# RF-Access: Barrier-Free Access Control Systems with UHF RFID
## 3 RF-Access
### Motion Direction Detection
#### 3.2.1 Signal-Based Sensing  
As shown in Figure 2, as a visitor passes through the access control system (the trajectory can be approximatively treated as a line), the distance between the reader (omni-directional) antenna and the tag first experiences a decline. After reaching the minimum, the distance increases as the person (tag) moves. If we can observe the distance variances over time, we can use two antennas \(A\) and \(B\) along the moving direction to check which one reaches the minimal distance first. If \(A\) is earlier than \(B\), the motion direction of the tag is from \(A\) to \(B\). Otherwise, the direction is \(B\) to \(A\). The parameters of RF signals can reflect the distance, such as Received Signal Strength Indicator (RSSI) and the phase value. In the following, we take RSSI as an example to show this solution. Figure 1: System overview. In an RFID system, RSSI represents the strength of a tag's signals received by the reader. More specifically, a large RSSI value means the power of the tag's response signal is strong and is more likely to be close to the reader. In theory, Friis is a widely used model that reflects the distance between the transmitter and receiver in free space. According to the Friis equation, the power of a tag's response signal can be written as follows [17]:  
\[P_{R}=\frac{P_{T}G_{TR}^{2}G_{t}^{2}\lambda^{4}X^{2}M}{(4\pi r)^{4}\Theta^{2}B^{ 2}F_{2}}, \tag{1}\]  
where \(P_{R}\) is the power coupled into the radio-frequency integrated circuit, \(P_{T}\) is the power transmitted by the reader, \(G_{TR}\) is the load-matched, free-space gain of the transmitter/receiver antenna (i.e., the reader antenna), \(G_{t}\) is the load-matched, free-space gain of the tag antenna, \(\lambda\) is the carrier-frequency wavelength, \(X\) is the polarization mismatch, \(M\) is a modulation factor, \(r\) is the reader-to-tag separation distance, \(\Theta\) is the RF tag antenna's on-object gain penalty, \(B\) is the path-blockage loss, and \(F_{2}\) is the monostatic fade margin. RSSI is a logarithmic form of \(P_{R}\), which can be derived by the following function:  
\[RSSI=10\times lg(P_{R}). \tag{2}\]  
According to Equations (1) and (2), we can easily conclude that given a reader and a tag, the longer the distance between them, the smaller the RSSI is. As aforementioned, when the tag moves along the x-axis, the distance between the reader antenna and the tag declines first and then increases. Namely, RSSI experiences a contrary change trend. In Figure 3, we plot the theoretical RSSI value when a tag moves along the x-axis ([\(-1.5\) m, \(1.5\) m]), given the closest distance of \(0.4\) m. It is clear that RSSI sees a rising trend and after peaking at the maximum, it gradually drops. The peak corresponds to the time when the tag-antenna distance reaches the minimum. Figure 3: The theoretical RSSI value when a tag moves along the x-axis. Figure 2: The changes of tag-to-reader distance when a tag moves linearly (omnidirectional antenna in this case). We verify the above theoretical model with a real-world experiment in an open space. As shown in Figure 4, a tag is fixed to a sliding rail and moves at a constant speed of 10 cm/s. Two RFID antennas are 80 cm in height and 40 cm apart from each other. As the tag moves along the sliding rail, we keep measuring the RSSI value of the RF signals backscattered by the tag. The experimental results are shown in Figure 5. It is clear that the RSSI curve generally follows the theoretical model, and two peaks corresponding to two antennas can easily figure out moving in or out--which peaks first means the direction is from this one to the other. However, the peak cannot be directly determined by the maximal RSSI value due to thermal noise, which is very likely to give rise to false positives. Instead, we try to fit this RSSI curve and find out the time corresponding to the peak for each antenna.