# An Action Classification Method for Forklift Monitoring in Industry 4.0 Scenarios
## 3 Materials and Methods
### RFID Gate with Asymmetrical Antenna Deployment and Action Classification Method  
To make the \(\phi^{n}[n]\) time behavior different between the two actions, \(IN\) and \(OUT\), and to allow correct action discrimination, the reader antenna is tilted of an angle \(\theta\) with respect to the vertical axis (\(z\)-axis) to make it point towards the inside of the warehouse in such a way that the reader cannot detect tags outside the room, as shown in Figure 10. Let us suppose that the antenna is pointed in such a way that it can only detect tags within the region \(l_{1}\leq x\leq l_{2}\), with \(l_{1}\) and \(l_{2}\) real positive values and \(l_{1}<l_{2}\). When the forklift performs an \(IN\) action, the tag will be detected only when it is getting further from the antenna, so the \(\phi^{n}[n]\) will be a decreasing function. On the other hand, when the forklift performs an \(OUT\) action, the tag will be detected only when it is getting closer to the antenna, so the \(\phi^{n}[n]\) will be an increasing function. The time behavior of \(\phi^{n}[n]\) for \(IN\) (blue circular markers) and \(OUT\) (red squared markers) actions is depicted in Figure 11 when \(l_{1}=1\) m, \(l_{2}=4\) m, \(v=2\) m/s, \(\Delta h=2.5\) m, and \(T=50\) ms. These results confirm that the asymmetrical configuration of the gate antenna guarantees the capability of recognizing the \(IN\) and \(OUT\) actions, without requiring additional antennas or sensors.  
Figure 10: Sketch of the asymmetrical gate.  
Figure 9: Time behavior of the unwrapped normalized phase in the symmetrical configuration of the RFID Smart Gate for the following system parameters: \(f=865.7\) MHz, \(l=3\) m, \(v=2\) m/s, \(\Delta h=2.5\) m, and \(T=50\) ms.  
The classification algorithm is straightforward. If the measured \(\phi^{n}[n]\) is a decreasing function, the estimated action is _IN_; otherwise, the estimated action is _OUT_. To do that, we first interpolate the measured curve with a first-order polynomial function. Then, we calculate the slope coefficient \(m\) and execute the following decision criterion:  
\[\begin{cases}\text{Classified action: IN}&\text{if }m\leq 0,\\ \text{Classified action: OUT}&\text{if }m>0\end{cases} \tag{9}\]  
As already said, to operate correctly, this algorithm must rely on a correct phase unwrapping of the measured phase. When the forklift speed increases, the average spatial sampling may be greater than \(\lambda/4\). This effect makes the Nyquist sampling condition not satisfied, and the slope of the normalized unwrapped phase may change at some points. By leaving all the other parameters unchanged, Figure 11 also shows the normalized unwrapped phase for the forklift speed \(v=3\) m/s, instead of \(v=2\) m/s. The aforementioned slope change is strongly evident for both the _IN_ (green diamond markers) and _OUT_ (black triangle markers) actions. This means that, on the basis of the forklift speed, the estimation of the curve slope \(m\) could fail by leading to a possible classification error. As a consequence, the reader queries have to be sent with a time interval able to guarantee the Nyquist sampling condition by knowing the maximum allowed speed for the forklift.  
As we will see in the next section, the influence of the environment can also introduce errors in the classification method.  
Moreover, static tagged forklifts or pallet tags nearby the gates can be filtered out from the classification method, as their measured phase is almost constant. An advantage of this algorithm is the low-effort computational burden which allows the method implementation on low-power computers, as it will be shown in the next section. Alternatively, the method can be directly executed on an RFID reader dedicated PC if this is present. Another solution is to transmit the data on an external PC that controls all the RFID Smart Gates of the warehouse, as was done in this proof of concept.