Abstract:The existing step counting algorithms cannot effectively solve the problem of the diversity of user walking patterns and mobile phone holding styles as well as the problem of if the detected step is an actual step or a mimicking behavior. Therefore, an adaptive time window step counting algorithm based on peak detection is proposed. The algorithm counted the steps by detecting and verifying, used double filtering to preprocess the original acceleration, and designed an adaptive time window based on the peak and valley time difference to eliminate false peaks, used the variance and standard deviation to verify the peak, finally. The experimental results show that compared with traditional methods (fixed window peak detection, conditional judgment peak detection), the average step-counting accuracy of this algorithm in different motion states and different mobile phone holding styles is increased by 7. 7% and 3. 4%, respectively, and is better than the current popular commercial step detection application.