# ECC: Passenger Counting in the Elevator Using Commodity WiFi
## 1 Introduction
Therefore, non-vision-based approaches have received extensive attention in recent years. Non-vision-based approaches mainly include: device-based and device-free approaches. The device-based approaches (e.g., mobile phones [12; 13], RFID tags [14; 15], Bluetooth [16; 17], etc.) rely on people to carry at least one specific device. They are more suitable for object localization than crowd counting. In many practical scenarios, it is impossible to ask people to take the same devices with them. Device-free approaches (e.g., infrared sensors [18], UWB radar sensors [19; 20], PIR sensors [21]) do not require people to carry any devices but only rely on the interaction with the wireless signals or induction in a certain area. However, these approaches require deploying specific sensors in the interest region that cannot be blocked. General WiFi sensors-based [22; 23; 24; 25] methods can overcome the above drawbacks, but they need people to keep moving. Therefore, they cannot detect static crowds, for instance, passengers in the elevator. Hence, the traditional approaches can not be used in the elevator environment. If the passenger number can be counted by using commercial WiFi in the elevator; it can not only solve the occlusion problem of the people but also does not require the addition of additional devices. This paper proposes a passenger counting approach in the elevator based on channel state information (CSI) measurements using commodity WiFi. The rationale behind ECC is that the passenger number can be accurately inferred from the variation of the CSI. The contributions of this work are summarized as follows. * First, this paper theoretically analyzes and verifies the monotonic relationship between the variation of CSI and the passenger number. The analysis results suggest that the variation of CSI is sensitive to crowd influences, which can be used for passenger counting. * Secondly, this paper implements the signal pre-treatment process by CSI segmentation, sub-carrier decorrelation, and noise reduction. In particular, this paper proposes a short-time local detection principal component analysis (SLD-PCA) algorithm to decorrelate the CSI streams quickly. SLD-PCA can effectively extract the principal components from all the CSI sub-carriers while maintaining the CSI's local structure. * Thirdly, this paper proposes the time-varying spectrum (TVS) feature that adopts radar detection schemes, which can maximally reveal the relationship between the passenger number and variation of CSI by calculating the energy variation of CSI attenuation in a short time. To improve the estimation accuracy, ECC also extracts the average of amplitude (AOA), and percentage of non-zero elements (PEM) features to construct a multi-dimensional feature as an indicator of relationship variation. Then, the passenger counting is implemented by the Random Forest (RF) classifier, for the local optimization problem introduced by the small dataset has been solved by expanding the dataset through data segmentation. * Finally, the ECC scheme is implemented with commercial off-the-shelf (COTS) 802.11n devices (Atheros 9300 NICs), then it is evaluated with real-world experiments. Extensive results prove that ECC can effectively estimate the passenger number in the elevator, which can be applied to guide the adjustment of the elevator counterweight. The rest of this paper is organized as follows. Section 2 presents the theoretical analysis and real-world observations of the relationship between the passenger number and the variation of the CSI. The materials and system design are elaborated in Section 3, followed by performance evaluation in Section 4. Section 5 discusses the limitations and solution schemes of ECC systems. Finally, the conclusion is given in Section 6. The list of main abbreviations is shown in Abbreviations part.