• 沒有找到結果。

穿戴六軸感測裝置之展演者的即時步伐方向追蹤定位 - 政大學術集成

N/A
N/A
Protected

Academic year: 2021

Share "穿戴六軸感測裝置之展演者的即時步伐方向追蹤定位 - 政大學術集成"

Copied!
65
0
0

加載中.... (立即查看全文)

全文

(1)國立政治大學資訊科學系 Department of Computer Science National Chengchi University. 立. 治 政碩士論文 大 Master’s Thesis. ‧. ‧ 國. 學. 穿戴六軸感測裝置之展演者的即時步伐方向追蹤定位. y. Nat. er. io. sit. Real Time Performer Positioning with Step and Direction Tracking. n. using a Wearable IMU Devices v. i l C n hengchi U. 研 究 生:曾珧彰 指導教授:蔡子傑. 中華民國一零八年六月 June 2019. DOI:10.6814/NCCU201900679.

(2) 穿戴六軸感測裝置之展演者的即時步伐方向追 蹤定位 Real Time Performer Positioning with Step and Direction Tracking using Wearable IMU Devices 研 究 生:曾珧彰 指導教授:蔡子傑. 立. Student:Yao-Chang Tseng Advisor:Tzu-Chieh Tsai 政 治 大. ‧ 國. 學. 國立政治大學. Nat. sit. y. ‧. 資訊科學系 碩士論文. er. io. A Thesis submitted to Department of Computer Science. a. n. v. i l C Chengchi University n National hengchi U in partial fulfillment of the Requirements for the degree of Master in Computer Science. 中華民國一零八年六月 June 2019 ii. DOI:10.6814/NCCU201900679.

(3) 摘要. 近年來,利用穿戴式裝置結合虛擬實境或互動科技,來進行即興創作表演,是種新 型態的數位藝術展演方式。之前的研究成果已有整合的平台,可以將表演展的姿態利用 穿戴式裝置擷取,呈現在表演的虛擬物件,進行互動展演。但還欠缺表演展的位置的即 時追蹤,才能更完整地讓展演順暢自然。 之前相關的定位技術研究,大多只探討誤差範圍,無法即時準確地追蹤,在表演的. 治 政 應用上無法直接運用。本研究希望是利用穿戴式裝置上的 大 IMU 六軸感測器資料,就能達 立 成此目標。我們參考過往方法,經過不斷實驗驗證,提出以步伐和方向的判斷演算法, ‧ 國. 學. 整合出解決表演中即時追蹤的問題。實驗結果確認了我們的方法可以有很好的成效,希. 力。. ‧. 望這一套平台,可以讓固有的展演型態創造新的樣態,展現台灣軟硬結合的文化創意實. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 關鍵字:IMU 六軸感測器、虛擬實境、穿戴式裝置、互動科技、互動展演、定位技術、 即時追蹤. iii. DOI:10.6814/NCCU201900679.

(4) Real Time Performer Positioning with Step and Direction Tracking using Wearable IMU Devices Abstract. Recently, improvisational performance using wearable devices combined with virtual reality (VR) or interactive technology has become a new type of digital art performing. Our previous research results have developed a platform that can “capture” the body gesture using. 政 治 大. wearable devices to render appearance of virtual objects for art performance. However, it still. 立. need the real-time position tracking of the performer to make the performance smoothly and. ‧ 國. 學. naturally.. Previous related works regarding the positioning techniques mostly focused on the error. ‧. distances.. They cannot be directly adopted in the practical performing art due to. y. Nat. sit. unsatisfactory real-time position tracking. The goal of the research is to achieve acceptable. n. al. er. io. tracking performance using only IMU wearable sensors. We inspired from many methods by. i n U. v. lots of experiments, a real-time positioning with “foot-step” and “direction-judge” tracking. Ch. engchi. algorithm is proposed to solve this problem. The experiment results are satisfactory with very good feasibility.. We hope the platform can enrich the performing patterns in digital arts, and. empower the cultural innovation and integration capability of software and hardware industry in Taiwan.. Keywords: IMU, VR, Wearable Devices, Interactive Technology, Interactive Performing, Positioning Technique, Real-time tracking. iv. DOI:10.6814/NCCU201900679.

(5) 致謝詞. 自從當年的大同大學一路念到政治大學研究所,這三年來經過許多風風雨雨。實驗 室的興衰通通映入眼簾,儘管如此,老師還是有給我計畫去做去學習,就連出國的機會 也讓我去體驗,真的十分感謝。也感謝一直支持我的家人,讓我有碩士去念。 也感謝實驗室的同儕鄧皓、威霖,讓我碩士生活中充滿色彩以及去亂搞,此外實驗. 政 治 大 及硬體上該如何處理。這邊特別感謝建誼學長,碩一下到碩二下,使得我可以幫老師處 立. 室的學長姐們也帶領著我一步一步去接管計畫,對於程式設計以及樣式設計的新認知以. ‧ 國. 學. 理這一塊穿戴式計畫的需求。也感謝冠榮學長在要去上海藝術節前幫忙帶我以及教我處 理硬體上的方法。. ‧. 這邊感謝曾經任職過穿戴式計畫的人員,從主持人蔡教授以及陶教授到助理人員子. sit. y. Nat. 翔、緯政、玉麗、子源、佩菁、如意、承瑋等等,讓我碩士三年有薪水領以及學到如何. io. er. 為人處事和分工討論找問題解決它。在碩三後半年生活中,感謝威霖整天陪我碎念和延. al. 畢讓我不孤單,雖然當初實驗室空無一人只有你我,現在多了許多吵雜的聲音。在其他. n. v i n Ch 方面,你也教了我許多生活常識,真的感謝。這邊也感謝朋友鑫彤,在認識妳的兩年讓 engchi U 我見聞到許多不可思議的事情,當初碩論不知道做不做得到的時候妳讓我從絕望中有動 力做下去,雖然當下妳也是同樣狀況,真的很謝謝妳。 這邊感謝蔡老師,讓我接了穿戴式計畫以及提點一些領域上的知識,整個過程從數 學、理論、硬體到軟體演算法通通的有碰到,此外在參與展演上有許多經歷可以寫。. v. DOI:10.6814/NCCU201900679.

(6) Index Chapter 1 Introduction ........................................................................................... 1 1.1 Foreword .............................................................................................................. 1 1.2 Motivation ............................................................................................................ 1 1.3 Research Target .................................................................................................... 3. Chapter 2 Hardware System and Platform .............................................................. 5. 政 治 大. 2.1 Hardware Device .................................................................................................. 5. 立. 2.1.1 Raspberry Pi .................................................................................................. 5. ‧ 國. 學. 2.1.2 NCCU CS Sensor............................................................................................ 7. ‧. 2.2 The Communication Protocol ............................................................................... 8. Nat. sit. y. 2.2.1 MQTT Protocol .............................................................................................. 8. n. al. er. io. 2.3 Related Performance ............................................................................................ 9. Ch. i n U. v. 2.3.1 National Shanghai Music Festival ................................................................... 9. engchi. 2.3.2 Tamsui Music Festival .................................................................................. 12 2.3.3 High School Promotion ................................................................................. 14. Chapter 3 Background.......................................................................................... 16 3.1 The inertial positioning system [10] [11] .............................................................. 16 3.2 Navigation application in flying area................................................................... 17 3.3 Foot step detection system ................................................................................... 18 3.4 Position system by using machine learning [13] [14] ........................................... 18. vi. DOI:10.6814/NCCU201900679.

(7) 3.5 RSSI.................................................................................................................... 19 3.6 Conclusion .......................................................................................................... 19. Chapter 4 Related Research .................................................................................. 21 4.1 Related filter algorithm or method ...................................................................... 21 4.1.1 Fast Fourier Transform ................................................................................ 21 4.1.2 Moving Filter................................................................................................ 22. 政 治 大. 4.1.3 Complementary Filter .................................................................................. 24. 立. 4.1.4 Gravity Remove............................................................................................ 25. ‧ 國. 學. 4.2 Related Research paper ...................................................................................... 26. ‧. 4.2.1 Method 1 ...................................................................................................... 26. Nat. sit. y. 4.2.2 Method 2 ...................................................................................................... 27. n. al. er. io. 4.3 Conclusion .......................................................................................................... 29. i n U. v. Chapter 5 Paper Method ....................................................................................... 30. Ch. engchi. 5.1 Method 1 ............................................................................................................. 30 5.2 Method 2 ............................................................................................................. 33 5.2 Method 2 Conclusion .......................................................................................... 36 5.3 Method 3 ............................................................................................................. 37. Chapter 6 Experiment........................................................................................... 41 6.1 Foot step system’s experiment ............................................................................. 41 6.2 Most active axis experiment ................................................................................ 43. vii. DOI:10.6814/NCCU201900679.

(8) 6.3 Fast Fourier Transform ...................................................................................... 44 6.4 Data experiment.................................................................................................. 47 6.5 Forward experiment ........................................................................................... 48 6.5 Method Compared .............................................................................................. 50 6.6 Conclusion .......................................................................................................... 50. Chapter 7 Future Work and Result ....................................................................... 51. 政 治 大. 7.1 Future Work ....................................................................................................... 51. 立. Reference ............................................................................................................. 52. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. viii. DOI:10.6814/NCCU201900679.

(9) LIST OF FIGURE. Figure 1 the tag in signal area has been detected ...................................................................... 3 Figure 2 Wearable Project Architecture [7] ................................................................................ 5 Figure 3 Raspberry Pi .................................................................................................................. 6 Figure 4 NCCU CS Sensor ............................................................................................................ 8 Figure 5 National Shanghai Music Festival’s wigwam ................................................................ 9 Figure 6 Member list of our team............................................................................................. 10 Figure 7 National Shanghai Music Festival’s area in wigwam .................................................. 10 Figure 8 People in the wigwam ................................................................................................ 11 Figure 9 Member of Shanghai Music Festival ........................................................................... 12 Figure 10 Static exhibition of wearable device ......................................................................... 13 Figure 11 Interactive between robot and host ......................................................................... 13. 立. 政 治 大. ‧ 國. 學. ‧. Figure 12 Member of Tamsui music festival team .................................................................... 14 Figure 13 High school student discussing their idea for the demo .......................................... 15 Figure 14 Drawing background of performance ....................................................................... 15 Figure 15 Two IMU device’s angle range [12] ........................................................................... 17 Figure 16 Navigation application example ...............................................................................18 Figure 17 Fast Fourier Transform .............................................................................................. 22. n. er. io. sit. y. Nat. al. i n U. v. Figure 18 Accel signal and new signal by using moving filter ................................................... 23 Figure 19 Signal update by using complement filter ................................................................24 Figure 20 How to remove gravity on sensor ............................................................................. 26 Figure 21 Human’s walking pattern .......................................................................................... 28. Ch. engchi. Figure 22 Activity accel value ................................................................................................... 28 Figure 23 Their dynamic threshold algorithm .......................................................................... 29 Figure 24 Method 1 Flow Diagram ........................................................................................... 32 Figure 25 Training dataset ........................................................................................................ 34 Figure 26 Decision Tree and Result........................................................................................... 34 Figure 27 Method 2 Flow Diagram ........................................................................................... 35 Figure 28 CNN result ................................................................................................................. 36 Figure 29 Accel waves shape .................................................................................................... 37 Figure 30 Method 3 Flow Diagram ........................................................................................... 39 Figure 31 Accel signal while user backward-moving 1 ............................................................. 41. ix. DOI:10.6814/NCCU201900679.

(10) Figure 32 Accel signal while user backward-moving 2 ............................................................. 42 Figure 33 Accel signal while backward-moving 3 ..................................................................... 42 Figure 34 x, y axis accel signal................................................................................................... 43 Figure 35 Two steps accel signal ............................................................................................... 44 Figure 36 Vertical Accel value after doing FFT .......................................................................... 45 Figure 37 FFT result-1 ............................................................................................................... 46 Figure 38 FFT result-2 ............................................................................................................... 46 Figure 39 FFT result’s real part ................................................................................................. 46 Figure 40 Accel value scatter-1 ................................................................................................. 47 Figure 41 Accel value scatter-2 ................................................................................................. 48. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. x. DOI:10.6814/NCCU201900679.

(11) LIST OF TABLE Table 1 Raspberry pi ...................................................................................................... 7 Table 2 Newton Formula.............................................................................................. 27 Table 3 Cross Zero value experiment ........................................................................... 48 Table 4 Forward data experiment table....................................................................... 49 Table 5 Forward and backward data table .................................................................. 49 Table 6 Forward and backward test table.................................................................... 49 Table 7 Forward and backward experiment ................................................................ 50 Table 8 Compared Algorithm method 1 and 3 ............................................................ 50. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. xi. DOI:10.6814/NCCU201900679.

(12) Chapter 1 Introduction. 1.1 Foreword In our world, Wearable devices and Internet of Things[1] is closely related issue in recent years. Many well-known hardware companies and academics era’s development are showing their new functional wearable devices or the algorithm of position calculation. So, what’s special about wearable device? “Everything is internet”. 政 治 大 information about human’s立 life and server receive this data for applying to something.. is a importance core value in IOT area which means that IOT devices will collect some. ‧ 國. 學. Especially in era like a health cure, communications of device that doctor can know what’s happened about patient at the same time.. ‧. Wearable devices and Digital application are used to apply in Interactive platform. sit. y. Nat. in recent years. In the current technology of positioning, there are many kinds of indoor. n. al. er. io. positioning algorithm [2] and growing very fast. Outdoor positioning technology. v. already has become stable, like GPS(GPS [3]).So we focus on indoor positioning,. Ch. engchi. i n U. the emerging indoor positioning methods include Wi-Fi [4]、Beacon [5]and Li-Fi [5], technology of performance platform.. 1.2 Motivation Under the rise of the Internet of Things, each wearable device is the best product of the company or university. It can also be seen that each one is very functional and powerful, but the disadvantage is that all devices of almost different manufacturers are difficult to be compatible with each other. However, this paper focuses on how to. 1. DOI:10.6814/NCCU201900679.

(13) communicate with different devices in the performance of wearable devices. This problem has been solved in our wearable projects in the past few years. So, the main problem is that performance requires those requirements. It needs to be accurate, fast and as free from user interference as possible. However, during my more than two years of participating in the wearable project, we have seen various scenes, from the Shanghai music festival presentation, the wearable presentation of the National Taiwan University, the wearable seminar of the National Chiao Tung University, the high school show and the Tamsui music festival last year. To tell the truth, it is indeed. 政 治 大 is a problem that can be solved. But always feel that what seems to be missing? In the 立. accurate and fast. We also know that the user interference and device connect problem. past few years, the whole set of our dynamic capture systems that does not contain users’. ‧ 國. 學. position. We try to use independent systems to calculate and use independent devices. ‧. to determine the position information. For example, to determine the user's position by. sit. y. Nat. using the web camera. So, is it not possible to calculate the location through an. io. er. additional device? This is the problem discussed throughout the paper. According to the research from IEEE or ACM, we know that Indoor positioning. al. n. v i n and outdoor positioning are a C special technique thatUis a problem worth studying. hengchi. Because indoor positioning uses many precise methods to define where a target is located without GPS. To compare outdoor positioning and indoor positioning, Outdoor positioning mostly uses GPS to know the position of the aircraft or the ship and then uses the so-called inertial positioning to know the state and orientation of the current target. For example, in navigation, the so-called method was used to know the moving position of the ship or aircraft, so that you can know which direction of the ship or the aircraft will go to. GPS is well known for its positioning on the earth, but it is also known that there is no way to cover all areas like a mountain, indoors area , underground caves and alien 2. DOI:10.6814/NCCU201900679.

(14) planets etc.. But, Indoors area can rely on indoor positioning algorithm to achieve results. Because you can install a lot of signal stations that transmit signals indoors, and receive the location through RSSI [6] or triangulation position algorithm. If it is an outer space planet? What if there is no signal? What should I do? This is the timing of inertial positioning. What is inertial positioning algorithm? Inertial positioning uses only its three-axis gyroscope to judge the rotation of its object and accelerometer to know its condition, but its inertial positioning has a characteristic because its sensor has noise, through hardware and software. The filtering algorithm is also limited, and the. 政 治 大 hardware of this method is the majority, and the same algorithm will have different 立 probability of statistical methods is also. The performance of the most important. results for different sensors. One of its methods of using inertial positioning is to use. ‧ 國. 學. the heading method to calculate the position of the sensor.. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 1 the tag in signal area has been detected. 1.3 Research Target However, in the use of wearable devices, we have been working on interactive performances to capture motion information in recent years by using the Euler angle from the IMU [6] device, the information of each axis, we can project the human body motion onto the screen by “Unity” application. Through different agreements, different needs are transmitted to achieve the purpose of wearable interactive performance. But 3. DOI:10.6814/NCCU201900679.

(15) the only drawback is that we need a set of inertial systems that can be moved to locate. Besides, the research on inertial positioning at home and abroad is not very sophisticated, and most of the reasons are that the hardware can’t be achieved very precise, and push it to the limit. So we started to study it. We hope to achieve the following requirements: 1. Do not use extra sensor devices to get new information. 2. Minimize errors of position judgment. 3. Try to combine it into a new module to join the original architecture without change. 政 治 大 4. Try to increase the accuracy of motion capture performance. 立. the huge architecture of the original wearable plan.. 5. Optimize the display frequency that lets the audience has a wonderful experience by. ‧ 國. 學. increasing the refresh rate to 144Hz.. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 4. DOI:10.6814/NCCU201900679.

(16) Chapter 2 Hardware System and Platform In our paper, the IMU device is installed on the top of the foot, and then the Raspberry Pi [7] is used as the receiving node that can dispatch the IMU sensor’s data to the handler platform. After the calculation and analyzes are completed in the receiver, it will be sent to the server. However, to cope with the dynamic capture system of the wearable device in previous years, the data format and some hardware structures on the hardware are compatible, so that both can launch at the same time.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 2 Wearable Project Architecture [7]. 2.1 Hardware Device. 2.1.1 Raspberry Pi The Raspberry Pi is a single-process unit computer developed based on Linux OS. It can be regarded as a small computer and can be installed in many kinds of operating systems. Because of its convenience, low power consumption, and high expandability, 5. DOI:10.6814/NCCU201900679.

(17) many schools and companies have studied the development of this, and can also see that he can be seen in the system architecture of many papers on the Internet.. 學. ‧ 國. 立. 政 治 大 Figure 3 Raspberry Pi. ‧. In terms of user applications, the Raspberry Pi can be used to build a low-power. y. Nat. io. sit. small embedded system that commonly used portable media devices, navigation. n. al. er. systems, IOT receivers, etc. It can totally show that its low power consumption. The. i n U. v. following table shows the chip of the Raspberry Pi 2 Model B. The processor uses the. Ch. engchi. Cortex A7 quad-core processor from the ARM architecture from Broadcom company. It's processing speed is up to 900Mhz. Although it is not as fast as the speed of computers or mobile phones on the market, for us, the calculation speed is already sufficient.. 6. DOI:10.6814/NCCU201900679.

(18) Table 1 Raspberry pi CPU. RAM. Storage. Power. USB. Cortex A7. 1GB. Micro SDHC. 4w. 2.0. quad-core. slot. 2.1.2 NCCU CS Sensor NCCU Sensor is a small wearable device that supports the Bluetooth transmission. It can regard as a small computer, which contains a six-axis IMU, LEDs to display its. 政 治 大. status and vibrator to increase user experience. Its production goal is to improve. 立. performance and user experience. Its specifications are demanded and purposed by our. ‧ 國. 學. wearable project. Finally, the NCU's hardware pre-engineer is used to design the whole circuit on PCB, and the skin is to find the company to make.. ‧. The sensing device uses the BT to create a connection, furthermore, each of the. y. Nat. io. sit. Euler angles ranges from 0 to 360 degrees and the acceleration sensor ranges from plus. n. al. er. or minus 2G. The Bluetooth module uses the BC417 module board, and the CPU uses. Ch. i n U. v. the ARM architecture processor STM32 F1. Besides, the data transmission speed is up to 100 data per second.. engchi. 7. DOI:10.6814/NCCU201900679.

(19) 政 治 大 立Figure 4 NCCU CS Sensor. ‧ 國. 學. 2.2 The Communication Protocol. ‧. 2.2.1 MQTT Protocol. sit. y. Nat. io. er. MQTT [8](Message Queuing Telemetry Transport) is an ISO standard (ISO/IEC PRF 20922) publish-subscribe-based messaging protocol which is a subscription-based. al. n. v i n Ch communication protocol invented engchi U. and communication-based. by IBM's Dr. Andy. Stanford-Clark and Dr. Arlen Nipper in 1999 years. It was used to provide a lightweight, reliable binary communication protocol between the oil pipeline sensor and the satellite under the limited network bandwidth and power loss requirements. However, this feature just matches our needs, because power consumption and network bandwidth are major challenges in the context of wearable interactive of the real-time performer. The bottom layer of MQTT is to use TCP/IP [9] protocol. That is to say, we can directly use the existing network protocol to transmit messages to the server, which makes us much more convenient. In addition, the header of MQTT is digitally encoded when transmitting. The length is 2 bits. The format is the message header, the title 8. DOI:10.6814/NCCU201900679.

(20) (Topic), and the message body. As can be seen from this, the IP address of the receiving end is not seen at all, and the visible length is much lighter.. 2.3 Related Performance. 2.3.1 National Shanghai Music Festival In 2017 Oct, Our team was invited to the National Shanghai Music Festival. At. 政 治 大 people who enjoy playing our performance. The performance used the equipment 立 that time, it was led by professor Tsai and Tao. That week, there were more than 800. include the systems of the first year of the wearable project which contained the. ‧ 國. 學. computer visual recognition technology to calculate the position of other users within. ‧. a drift distance by webcams.. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 5 National Shanghai Music Festival’s wigwam. 9. DOI:10.6814/NCCU201900679.

(21) Figure 6 Member list of our team. 學. ‧ 國. 立. 政 治 大. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 7 National Shanghai Music Festival’s area in wigwam. 10. DOI:10.6814/NCCU201900679.

(22) 政 治 大 Figure 8 People in the wigwam 立. ‧ 國. 學. At the time, we had a built a wigwam in the outer space and its content a square. ‧. about 10m * 10m. In addition, there are four devices and VR for each people who had. sit. y. Nat. experience time is about 5 to 10 minutes. The experiencer can move freely within the. n. al. er. io. square body composed of three webcams, and finally, the exit is assisted by the staff.. Ch. engchi. i n U. v. 11. DOI:10.6814/NCCU201900679.

(23) 立. 政 治 大. ‧ 國. 學 ‧. Figure 9 Member of Shanghai Music Festival. er. io. sit. y. Nat. 2.3.2 Tamsui Music Festival. al. v i n C the National Taiwan University and h eNational h i U University Computer and n g c Cheng-Chi n. The Tamsui Music Festival is a performance of the exhibition that corped with. Science team to work together at the warehouse next to the Tamsui MRT station. The static exhibition has a special robot called Pepper and we have the wearable device experience for people. The dynamic exhibition for the robot and the hoster interaction that is the performer wearing the wearable device performance.. 12. DOI:10.6814/NCCU201900679.

(24) 立. 政 治 大. ‧ 國. 學. Figure 10 Static exhibition of wearable device. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 11 Interactive between robot and host. 13. DOI:10.6814/NCCU201900679.

(25) 立. 政 治 大. ‧ 國. 學. Figure 12 Member of Tamsui music festival team. ‧ er. io. sit. y. Nat. 2.3.3 High School Promotion. al. v i n C hand the students can teaching that they can use devices e n g c h i U have experienced the role of n. In 2018 spring, we promoted to two schools and provides their students with. their own drawing into a movable module on the screen and let them write the background. After the demonstrastion, we supported new user interface, DIPS, which include performance time-line controller and the role’s rules which can control the player’s behavior.. 14. DOI:10.6814/NCCU201900679.

(26) 政 治 大 Figure 13 High school student discussing their idea for the demo 立 ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 14 Drawing background of performance. 15. DOI:10.6814/NCCU201900679.

(27) Chapter 3 Background. 3.1 The inertial positioning system [10] [11]. The inertial positioning system is just a name of positioning methods. There are many method to do it. We mainly focus on the navigation system and the step calculation system. In the past few years, we have used RSSI to assist in calculating the position. At that time, some IMU sensors were used as the receiving node to measure. 治 政 the signal strength, and the IMU's acceleration sensor,大 Euler angle sensing were used 立 to calculate the actual position of the user. ‧ 國. 學. The figure shows the status of the RSSI to calculate. You can know that the left. ‧. side represents the current Euler angle which we can calculate it. Furthermore, because. Nat. sit. y. of the error in using RSSI to calculate distance, basically how high the accuracy of the. n. al. er. io. sensor will determine the upper and lower limits of the system itself.. Ch. engchi. i n U. v. 16. DOI:10.6814/NCCU201900679.

(28) 政 治 大 Figure 15 Two IMU device’s angle range [12] 立. ‧ 國. 學. 3.2 Navigation application in flying area. ‧. On ship or airplane, the navigation system [9] uses its own heading Euler angle. y. Nat. sit. and its own speed to determine which direction to move and distance. When the ship is. n. al. er. io. going to turn a few degrees in that direction, we can use the Triangulation location. i n U. v. method to calculate the position of the next moment. It seems to be concise, but there. Ch. engchi. are bound to be a lot of errors if you use a sensor. This is an issue worth us challenging.. 17. DOI:10.6814/NCCU201900679.

(29) Figure 16 Navigation application example. 政 治 大. 立. 3.3 Foot step detection system. ‧ 國. 學. Foot step detection system is a system which can use IMU devices detect user is. ‧. moving or not. The basic idea is to judge gravity accel value, but we can not know. io. sit. y. Nat. that user is forward or backward.. n. al. er. 3.4 Position system by using machine learning [13] [14]. Ch. engchi. i n U. v. There are many ways to locate in front of the article, one of the methods is machine learning as a basis for calculation. In this area when everyone is calling AI, this thing is gradually a trend. Since the algorithm, we are thinking about or the observed rules are not easy to distinguish in some cases, can we use machine learning to calculate it? Machine learning can be regarded as a classification algorithm in a broad sense, which can also be used to classify an action gesture or a position to take an estimate.. 18. DOI:10.6814/NCCU201900679.

(30) A more common application is to use AI to estimate the user's possible location is. The training data is usually signal strength, sensor information, reference coordinates, etc.... 3.5 RSSI Now that this wireless communication is very convenience, there are many wireless signal technologies that we can use. It can also be used for signal strength positioning by using wireless signals. RSSI (Received Signal Strength Indicator) is the. 政 治 大. difference between received signal strength and power in the node. It’s distance formula. 立. is [15]. [1]. RSSI: signal strength. sit. Nat. A: one meter’s signal strength between receiver and sender. y. ‧. ‧ 國. 學. d: distance. d = 𝟏𝟎(𝒂𝒃𝒔(𝑹𝑺𝑺𝑰−𝑨)/ (𝟏𝟎∗𝒏)). io. er. n: Environment decrease parameter. al. v i n C future many papers try to solve it in the So, We will combine more than two h e norgnow. chi U n. RSSI positioning is sensitive and it easily influences by signal problems. That why. positioning technologies and choose one that we discussed the above of the article as an aid.. 3.6 Conclusion. The reason why the inertial positioning system is difficult to be very accurate is that the accuracy of the whole system depends mainly on the original accuracy of the IMU sensor. Today, the sensor is not very good, no matter how you use it will not 19. DOI:10.6814/NCCU201900679.

(31) change the result. By the way, the filter algorithm is either a way of calculating the position and its total performance will not double or increase a lot. In the end, it will only approach a reasonable accuracy.. First, the filter has adjusted the devices first, and then the Newton physics formula is calculated for the distance. This physics formula plays some measurable methods and finally gets the position. But in fact, there are ways to increase its accuracy, which is to increase the information of the sensor, but our paper does not explore this piece, we only focus on using a six-axis sensor to locate it.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 20. DOI:10.6814/NCCU201900679.

(32) Chapter 4 Related Research. 4.1 Related filter algorithm or method. 4.1.1 Fast Fourier Transform The Fast Fourier Transform [16] is a way to quickly calculate the discrete Fourier transform (DFT) or inverse transform of a signal sequence in the signal era. Fourier. 政 治 大 representation of the frequency 立 domain. But our signal is not regular. You can explain analysis converts the signal from the original domain (usually time domain) to the. FFT’s formula is defined below 𝒏. −𝒊𝟐𝝅𝒌 𝑵 k=0,……….N-1 𝑿𝒌=∑𝑵−𝟏 𝒏=𝟎 𝑿𝒏 𝒆. [2]. y. Nat. er. io. sit. K: signal sequence E: phase. ‧. ‧ 國. 學. it by using a formula.. al. n. v i n C h we need to U Before we use the Fourier transform, e n g c h i know that our signal sequence is a power term of 2 or not, and the sampling frequency must be greater than the original frequency.. After we use it, then we can get combinations of real and imaginary numbers. After the result. We can learn about certain messages by observing the characteristics of the frequency domain. Figure 2.3.1 shows the result of fast Fourier transform on a random signal. In most cases, we calculate the so-called Amplitude as a decibel. The upper graph in Figure 2.3.1 shows the spectrum generated by fast Fourier transform (composed of many frequencies), the energy distribution from 0 HZ to 50 HZ, and the 21. DOI:10.6814/NCCU201900679.

(33) middle graph shows the phase change of the entire signal at this frequency. The result of directing the fast Fourier transform directly corresponds to the result of the positive and negative frequencies, which is finally symmetrical.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 17 Fast Fourier Transform. 4.1.2 Moving Filter The moving filter method [17] is basically an easy and effective method, which can make the waveform of the entire sensor smoother. In more detail, the prediction using the moving average method can smooth out the impact of sudden fluctuations in demand on the prediction results. The moving filter formula is defined below. 22. DOI:10.6814/NCCU201900679.

(34) 𝑭𝑻 =. (𝑨𝑻 + 𝑨𝑻−𝟏 + ….+ 𝑨𝑻−𝑵 ). [3]. 𝑵. 𝐴 𝑇 : Signal’s time sequence N: Period of sliding window 𝐹𝑇 : New signal sequence But this method will have some problem: 1: if you increase the period number, the result will be not sensitive. 2: It can not show the result currectly in the future. 3: It needs lots of data in the past.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 18 Accel signal and new signal by using moving filter. 23. DOI:10.6814/NCCU201900679.

(35) 4.1.3 Complementary Filter Basically, the complementary filter [18], as it named, uses a gyroscope inside the IMU sensor to merge with the angle that uses acceleration to produce a relatively stable value. The integral error of the gyroscope can be eliminated. More importantly, this method is easy to implement in the program and has the flexibility of adjustment. The complementary filter formula is defined as 𝑨𝒏𝒈𝒍𝒆𝒏𝒆𝒘 = 𝒂 × (𝑨𝒏𝒈𝒍𝒆𝒈𝒚𝒓𝒐 ) + (𝟏 − 𝒂) × 𝑨𝒏𝒈𝒍𝒆𝒂𝒄𝒄, 𝟎 < 𝐚 < 𝟏. [4]. 𝐴𝑛𝑔𝑙𝑒𝑛𝑒𝑤 : New angle calculate by formula 𝐴𝑛𝑔𝑙𝑒𝑔𝑦𝑟𝑜 : Euler angle from gyro. 立. 學. ‧ 國. a: constance. 政 治 大. 𝐴𝑛𝑔𝑙𝑒𝑎𝑐𝑐 : The angle calculate by accel value [19]。. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 19 Signal update by using complement filter. 24. DOI:10.6814/NCCU201900679.

(36) 4.1.4 Gravity Remove In many wearable papers, they do not mention whether the sensor is a gravity acceleration sensor or an acceleration sensor, and there is no mention of whether to filter the gravity. First of all, without considering the gravity acceleration sensor, the information obtained by the sensor should be 𝑨𝒄𝒄_𝐕𝒂𝒍𝒖𝒆𝑺𝒆𝒏𝒔𝒐𝒓 = 𝑨𝒄𝒄𝒆𝒍𝑽𝒂𝒍𝒖𝒆 + 𝑮𝒓𝒂𝒗𝒊𝒕𝒚𝑽𝒂𝒍𝒖𝒆 + 𝑵𝒐𝒔𝒊𝒆 But we just want the value without noise 𝑨𝒄𝒄_𝐕𝒂𝒍𝒖𝒆𝑺𝒆𝒏𝒔𝒐𝒓 = 𝑨𝒄𝒄𝒆𝒍𝑽𝒂𝒍𝒖𝒆 + 𝑮𝒓𝒂𝒗𝒊𝒕𝒚𝑽𝒂𝒍𝒖𝒆. [5] [6]. 政 治 大 the second half to the zone, leaving only the value of the required acceleration. It will 立 As you can see from the above formula, we should remove the information from. be good for calculations. In addition, in fact, gravity is also unnecessary. The removal. ‧ 國. 學. method is as shown in the figure below.. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 25. DOI:10.6814/NCCU201900679.

(37) 立. 政 治 大. ‧. ‧ 國. 學. Figure 20 How to remove gravity on sensor. er. io. sit. y. Nat. n. 4.2 Related Research paper a. iv l C n hengchi U. 4.2.1 Method 1. In the paper "Real-time Relative Directional Positioning Using Wearable Devices" [20], it is mentioned that due to the space system of the sensor and our earth space system, in reality, there are two different coordinate systems, if you want to calculate the position, it is necessary to convert the space system. The coordinate transformation matrix is. c: cos, s: sin 26. DOI:10.6814/NCCU201900679.

(38) ψ: the rotation about the XGIMU axis (roll). : the rotation about the YGIMU axis (pitch) : the rotation about the ZGIMU axis (yaw) 𝒄 −𝒔 𝟎 𝒄 𝟎 𝟏 𝐑=[𝒔 𝒄 𝟎] [ 𝟎 𝟎 𝟎 𝟏 −𝒔 𝟎. 𝒔 𝟏 𝟎 ] [𝟎 𝒄 𝟎. 𝟎 𝒄𝛙 𝒔𝛙. 𝟎 −𝒔𝛙] 𝒄𝛙. [7]. The three-axis acceleration send by the sensor is multiplied in the form of a matrix and the space transformation matrix to obtain the converted acceleration matrix, and then the Newton formula is used to calculate the position.. 政 治 大. 立Table 2 Newton Formula. ‧ 國. ‧. r(𝑡) = 𝑟0 + ∫ 𝑣𝑑𝑡 ′ 0 𝑡. y. 𝑑𝑟 𝑑𝑡. v(𝑡) = 𝑣0 + ∫ 𝑎𝑑𝑡 ′. sit. v (𝑡 ) =. er. io. 0. aal(𝑡) = 𝑑𝑣 = 𝑑2𝑟 v i 2 n C h𝑑𝑡 𝑑𝑡 engchi U. n. Acceleration. 𝑡. r (𝑡 ). Nat. Velocity. Integral Form,. 學. Position. Derivative Form. 4.2.2 Method 2 In the paper” Full-futured Pedometer Design Realized with 3-Axis Digital Accelerometer” [21]. They mention that if you want to use foot step judge system, need to use another method to judge it. They caller their method “activity axis method”, and also show that human’s moving style:. 27. DOI:10.6814/NCCU201900679.

(39) Figure 21 Human’s walking pattern. Figure 4.5 shows the alteration mode of the acceleration of the vertical axis and. 政 治 大 will increase or decrease to form a regularity, so they put forward the concept of the 立 the parallel axis of the sensor when a normal person walks. Usually, the acceleration. ‧ 國. 學. most active axis. The most active axis is because the sensor must change dramatically in the direction of the force applied, as shown in the following figure:. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 22 Activity accel value 28. DOI:10.6814/NCCU201900679.

(40) However, they define a dynamic threshold that equal to the maximum acceleration plus the minimum acceleration and divide by two. In addition, it will update its value to achieve its purpose. The figure below shows how they are calculated. 立. 政 治 大. ‧ 國. 學. Figure 23 Their dynamic threshold algorithm. ‧. 4.3 Conclusion. io. sit. y. Nat. n. al. er. Method 1 is not perfect for sensor processing and no controller can limit its sensor. Ch. i n U. v. calculations, resulting in only knowing the approximate position. The advantage is that. engchi. because the conversion matrix of the space transform was used in the paper and most of Newton's research is used, there is little concern about it.. Method 2 because they do not have to do positioning algorithm themselves, but it is more like a step counter software and calculates calories and distances, etc. The disadvantage is that the way of positioning is less than the advantage is that there is a way to distinguish the active axis to calculate the distance. Therefore, we will integrate the information we can use and re-develop the algorithm regarding the literature.. 29. DOI:10.6814/NCCU201900679.

(41) Chapter 5 Paper Method. The method we use is to fit the IMU sensor near the ankle and use the swinging of the foot and the angular rotation to determine the direction of movement. First of all, we must know that relying on the IMU sensor to get the step or the forward and backward is basically a certain misjudgment. The reason is that the time from the start of the human foot to the end of the displacement cannot be accurately grasped, and almost 90% of the information is judged. In the IMU sensor itself, this is the source of. 政 治 大. misjudgment.. 立. ‧ 國. 學. 5.1 Method 1. ‧. First, this method is suitable for time sampling to calculate steps and movements.. y. Nat. sit. We will pass the collected sensor data into the displacement module in the JSON data. n. al. er. io. format. In addition, we will perform preliminary filtering on the data of the gyro Euler. i n U. v. angle and acceleration, and then use the coordinate transformation matrix to obtain a. Ch. engchi. new one. The coordinate system is the information that needs to be calculated.. One of the fast Fourier transform methods for filters has been mentioned in the previous section, which we use in judging the step. Because the fast Fourier transform basically converts the signal from the time domain to the frequency domain, for the sensor signal, the acceleration signal is converted into the frequency domain. However, this paper does not use it on the filtered signal, it will be used to determine whether the section has a stepping movement.. 30. DOI:10.6814/NCCU201900679.

(42) Function 1 : FFT_Step_Function 𝐈𝐧𝐩𝐮𝐭: 𝐴𝑐𝑐𝑒𝑙 𝑣𝑎𝑙𝑢𝑒, 𝐴𝑥𝑖𝑠 𝐎𝐮𝐭𝐩𝐮𝐭: 𝑇𝑟𝑢𝑒 𝑜𝑟 𝐹𝑎𝑙𝑠𝑒. 1. 𝐷𝑜 𝐹𝐹𝑇 2.For each axis 𝒄𝒂𝒍𝒄𝒖𝒍𝒂𝒕𝒆 𝒂𝒗𝒆𝒓𝒂𝒈𝒆 𝒓𝒆𝒂𝒍 𝒑𝒂𝒓𝒕 𝒗𝒂𝒍𝒖𝒆 𝒘𝒊𝒕𝒉𝒐𝒖𝒕 𝟎𝑯𝒛 𝟑. 𝒊𝒇 𝒂𝒗𝒆𝒓𝒂𝒈𝒆 𝒗𝒂𝒍𝒖𝒆 𝒈𝒓𝒆𝒂𝒕𝒆𝒓 𝒕𝒉𝒂𝒏 𝒕𝒉𝒓𝒆𝒔𝒉𝒐𝒍𝒅 4. return True (Step success) 5.else 6.. return False(Step not success) The fast Fourier transform itself requires the input of the length of the 2 power. terms, and the normal start of the human pace is usually between 0.5 and 1.2 seconds,. 政 治 大 strokes per second, which立 is about 0.64 seconds. It will be judged once by the fast so we set the length of the sample to 64 (sensor data transmission) The speed is 100. ‧ 國. 學. Fourier transform. Then, the 64 pieces of data will have the so-called imaginary and real values through the converted data. We will add the real part of the data except for. ‧. 0Hz (because 0Hz is the value of DC).. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 31. DOI:10.6814/NCCU201900679.

(43) 政 治 大. 立. ‧. ‧ 國. 學 Figure 24 Method 1 Flow Diagram. al. n. 1. 2. 3. 4. 5. 6.. Collect Sensor Accel , Euler Angle Do Axis Transform Storage new data with array If array length greater than 64 If Function1 is True For each axis accel value. Ch. engchi. 7. 8.. Calculate velocity and position Send result. 9.. Clean all array. er. io. Input: Accel Value , Euler Angle(from Sensor collector) Output: Position Information. sit. y. Nat. Algorithm 2 : Moving Algorithm. i n U. v. 32. DOI:10.6814/NCCU201900679.

(44) 5.2 Method 2. We found in Method 1 that when we move, the number of steps is multidetermined, and the position error is too large. At that time, our standard was that when the user wore the device, it was free to sway and move around. When the user finally walked to the original position, the calculated position of the program could not deviate more than 30cm. But this is just one of the reasons we have abandoned the use of acceleration to calculate the position, because the error is too large, and this is the value. 政 治 大. calculated after filtering. So we turned to think that if the distance of each movement is. 立. fixed, it will cause the error to leave only the Euler angle and the sampling pace. So. ‧ 國. 學. now the moment is to say, we use machine learning to get this thing done.. ‧. In general, our signals are time series, and because it is impossible to know the. y. sit. io. n. al. er. changes.. Nat. current movement status through each point. So we use Method 1 as a base to make. i n U. v. First, we use Method 2 as the base, as long as the average FFT of each axis is. Ch. engchi. recorded every 0.64 seconds. The idea is that the FFT can be thought of as the energy distribution of the signal, and the average value continues to help us determine step. In addition, we use the decision tree to implement a system of direction judgment. The decision tree is used because it can better solve the problem of so-called multiple if....else. Since Method 1 is used as the base, the FFT determines whether or not the pace becomes the main way to collect data. In general, decision trees can make more diverse classifications. When a decision tree is not working, you can use the decision tree forest to solve the problem.. 33. DOI:10.6814/NCCU201900679.

(45) First, after positioning the front, back, left, and right, we begin to collect the average FFT energy and the Euler angle of each axis that the person walks forward as the training data, and make the in-situ data a tag of 0, before the first, and then 2, the left is 3 right and 4 is like this. Its format is:. 立. 政 治 大. ‧. ‧ 國. 學. Figure 25 Training dataset. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 26 Decision Tree and Result.. 34. DOI:10.6814/NCCU201900679.

(46) 政 治 大. 立. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. i n U. v. Figure 27 Method 2 Flow Diagram. engchi. Algorithm 3 : Moving Algorithm Mk-ll Input: Accel Value , Euler Angle(from Sensor collector) Output: Position Information 1.Collect Sensor Data 2.Do Axis Transform 3.Storage new data with array 4.If array length greater than 64 5. If FFT_Step_Function is True 6. DecTreePred(result) 7. Send result 8.. Clean all array. 35. DOI:10.6814/NCCU201900679.

(47) 5.2 Method 2 Conclusion According to the basic rules of human walking, sampling the sensor data with 0.64 seconds each time has a great chance to capture incomplete signal information. Therefore, the final judgment of the movement is usually problematic, and the most common occurrence is the misjudgment of the number of movements of the footsteps. Because of this, we have abandoned the data collection method based on time sampling and adopted another more reasonable method. In addition, because our demand is in a. 政 治 大 filters listed in part 4.1 can be effectively filtered. However, in the case of a large 立. certain performance space, the displacement error can not exceed 30 cm. Basically, the. number of steps and a long time, it is impossible to keep the error within 30 cm without. ‧ 國. 學. superimposing, so we finally improve the partial algorithm of the displacement. After. ‧. that, we try to use CNN which contained three level mode and we used relu , elu,. sit. y. Nat. softmax as activation function. This model contained three level mode and we used. io. al. n. good as we want.. er. relu , elu, softmax as activation function to train this dataset, and the result were not as. Ch. engchi. i n U. v. Figure 28 CNN result. 36. DOI:10.6814/NCCU201900679.

(48) Figure 29 Accel waves shape. 5.3 Method 3. 立. 政 治 大. In method 1, 2 we know that using time sampling will cause a lot of false positives.. ‧ 國. 學. In method 3 we use "Cross Zero" to sample the movement of the footsteps. Cross Zero. ‧. is the number of times the signal value oscillates around 0 in a certain period of time.. Nat. sit. y. We collected a amount of information about the walking information and recorded. n. al. er. io. the actual number of steps taken and the number of steps judged by the computer to. i n U. v. determine how much Cross Zero's Threshold is to be taken. In addition, we also refer. Ch. engchi. to the concept of the so-called most active axis, the most active axis can determine the maximum amplitude of the three axes of the sensor. Its algorithm is Algorithm 4 : The most Active axis Input: Each Axis Accel value (Array) Output: Axis (String) 1. Foreach axis find max_accel_value and min_accel_value 2. Calculate x_v = abs(max(x) – min(x)) 3. Calculate y_v = abs(max(y) – min(y)) 4. Calculate z_v = abs(max(z) – min(z)) 5. Compare x_v , y_v , z_v 6. Return axis which is the greatest Done 37. DOI:10.6814/NCCU201900679.

(49) After we use the most active axis method, we can calculate which direction to move by referring to the navigation system method. However, since this method uses the fixed distance to calculate the displacement and uses the fixed distance to calculate the azimuth to reduce the error, it is necessary. There is one more algorithm to let the program decide whether you are going to lift your foot forward or backward. Its algorithm is. Algorithm 5 :Judge Method. 政 治 大. 4.. Else if value in array smaller than threshold2. ‧. 5.. ‧ 國. 立. 學. Input: Array Output: 1 or -1 1. Foreach value in array 2. if value in array greater than threshold1 3. Return 1 Return -1. y. Nat. er. io. sit. In addition, we have also tried to determine the forward or backward by using the signal sequence of finding peaks and troughs, but since the phenomenon of so-called. al. n. v i n oscillation in the second half ofCthe footstep waveform will affect the finding of the hengchi U largest and smallest peak troughs, it will not be used. The algorithm is. Algorithm 6: Wave Index judge Input: array Output: 1 or -1 1. Foreach axis find max value index and min value index in array 2. if max index greater than min index 3. Return 1 4. If min index greater than max index 5.. Return -1. 38. DOI:10.6814/NCCU201900679.

(50) In the end, we will summarize the algorithm that we mentioned in the above method 3 into a judgment. First, we will first collect the sensor data. If Cross Zero exceeds the threshold, it means that there is a step. The action of filtering the sensor information to be used, together with the determination of the most active axis, determines whether the user moves back and forth or laterally. In addition, due to the immediacy and speed, it is set to clear all data if there is no Cross Zero to be larger than the threshold within a certain period of time.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 30 Method 3 Flow Diagram. 39. DOI:10.6814/NCCU201900679.

(51) Algorithm 7 : New Position Algorithm Input: Accel Value , Euler Angle (from sensor collector) Output: Position Information 1. Collect Sensor Data 2. Calculate Cross Zero number 3. If Cross Zero number greater than threshold 4. Foreach yaw value and accel value do moving filter and 5. If the most lively axis is z 6. Pos_x = step_length * cos(yaw) * JudgeMethod(Accel Array) 7. Pos_z = step_length * sin(yaw) * JudgeMethod(Accel Array) 8. If the most lively axis is x 9. Pos_x = step_length * cos(yaw + 90) * JudgeMethod(Accel Array) 10. Pos_z = step_length * sin(yaw + 90) * JudgeMethod(Accel Array) 11. Send data 12. Clean all array 13. If array length greater than 200. 立. ‧ 國. 學. Clean all Data. ‧. io. sit. y. Nat. n. al. er. 14.. 政 治 大. Ch. engchi. i n U. v. 40. DOI:10.6814/NCCU201900679.

(52) Chapter 6 Experiment. 6.1 Foot step system’s experiment. Since the fast Fourier transform method of time sampling as the substrate and the method of landing time using the Cross Zero method are mentioned above, we use the same data for comparison.. 政 治 大. The experimental comparison data is 20 times of the six-axis sensor data of the. 立. forward-moving step and 20 times of the 20 backward as the comparison base. In. ‧ 國. 學. addition, the sum of 40 steps can be used to determine whether our pace is close to the ideal value. After that, we went on to discuss why the judgment rate would be lower. ‧. when going backward. So we print out the acceleration information moving backwards.. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 31 Accel signal while user backward-moving 1 41. DOI:10.6814/NCCU201900679.

(53) 立. 政 治 大. ‧ 國. 學. Figure 32 Accel signal while user backward-moving 2. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 33 Accel signal while backward-moving 3. 42. DOI:10.6814/NCCU201900679.

(54) Basically, it is possible to know from the signal diagram that it is difficult for humans to get out of the waveform of the perfect step we expected under normal circumstances. It may be because the limitation of the human joint causes the signal to go backward instead of reversing the signal.. 6.2 Most active axis experiment Because the most active axis algorithm will compare the amplitude of the axis with each other, the concept of our algorithm comes from observing its numerical. 政 治 大. fluctuations. The figure below shows the acceleration signal between the X and Z axis. 立. as we move forward in the z-direction.. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 34 x, y axis accel signal. 43. DOI:10.6814/NCCU201900679.

(55) 立. 政 治 大. Nat. sit. y. ‧. ‧ 國. 學 Figure 35 Two steps accel signal. er. io. 6.3 Fast Fourier Transform. al. n. v i n In our paper, we considerC that human walking time h e n g c h i U will be between 0.5 to 1.5. second. The figure show that the accel value and spectrum when user is not moving.. 44. DOI:10.6814/NCCU201900679.

(56) 立. 政 治 大. ‧ 國. 學. Figure 36 Vertical Accel value after doing FFT. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 45. DOI:10.6814/NCCU201900679.

(57) Figure 37 FFT result-1 After we used FFT’s real part be a threshold to judgement, directly idea is to vertical axis’s gravity seen as a key value. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. i n U. Figure 38 FFT result-2. Ch. engchi. v. Figure 39 FFT result’s real part 46. DOI:10.6814/NCCU201900679.

(58) Figure 6-8, Figure 6-9 is a comparison figure this part. In Figure 6-9, the energy between the brackets is the real part number, and the bottom is the average energy result. The test was in place. Then make a statistic based on this average, and finally take a threshold.. 6.4 Data experiment. After the failure of using Fast Fourier at the time, we try to use the way of machine. 政 治 大 information should best show that one of the characteristics of the action is the best. So 立. learning method. First of all, there must be information that we wanted and this. ‧ 國. 學. we started to make a scatter display of the two-dimensional acceleration value in motion, to see if I can see the characteristic.. ‧. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. Figure 40 Accel value scatter-1. 47. DOI:10.6814/NCCU201900679.

(59) 學. 6.5 Forward experiment. Table 3 Cross Zero value experiment. Nat. Backward data set. 8. 29. 25. 26. 9. 12. 19. 10. n. 11. a l 23 C 21 h. sit. y. Forward data set. io. Cross Zero Threshold. er. ‧. ‧ 國. 政 治 大 Figure 41 Accel value scatter-2 立. 22. engchi. 20 iv n U 18 16. It is known from experiments above that when Cross Zero is selected as 11 or 12, and the judgment number is basically higher. However, due to our overall considerations, we do not want to judge more redundant steps. Because of the multiple judgment steps and moving more on the stage which we don’t want happened. Acturelly, we would rather not move more.. 48. DOI:10.6814/NCCU201900679.

(60) After having the pace to determine this algorithm, we have to decide whether the user is going forward or backward. Therefore, how did we decide the threshold in Algorithm Judge Method? In the experiment, we also used the data set before and after 20 steps data set to test. In addition, the value of Cross Zero is basiclly set at 12 for testing. The following table is an algorithm experiment on the data of the previous 20 steps.. No calculation = actual steps - computer judges the number of steps. 治 Backward step 政 Forward step 大. FP. 18. 1. 1. -8. 18. 1. 1. -9. 18. 1. -10. 18. 1. Table 4 Forward data experiment table Threshold2. 5. -7. 5 5. 1 1. ‧. ‧ 國. 5. 立. 學. Threshold1. From table above, we changed Threshold 1,2 to help us get ideal value of. n. al. er. io. sit. y. Nat. threshold.. iv n Backward step U. Table 5 Forward and backward data table Threshold1. Threshold2. 5. -7. 5. C hForward step engchi. FP. 5. 10. 1. -8. 5. 10. 1. 5. -9. 6. 9. 1. 5. -10. 6. 9. 1. Table 6 Forward and backward test table Threshold1. Threshold2. Forward step. Backward step FP. 4. -7. 18. 1. 1. 5. -7. 18. 1. 1. 6. -7. 17. 2. 1. 7. -7. 16. 3. 1. 49. DOI:10.6814/NCCU201900679.

(61) Table 7 Forward and backward experiment Threshold1. Threshold2. Forward step. Backward step FP. 4. -7. 5. 9. 1. 5. -7. 5. 9. 1. 6. -7. 5. 9. 1. 7. -7. 4. 10. 1. 6.5 Method Compared Table 8 Compared Algorithm method 1 and 3 Algorithm Method 1. 立. Method 3. 治Number 政 Step 大 46 19. ‧ 國. 學. 6.6 Conclusion. ‧. After we try several method and algorithm, we chose a flexable method for our. y. Nat. sit. paper. Start from time slot method to Cross Zero judgement. However, using accel. al. n. suitable for us.. er. io. value as a key value to calculate, we also try to use many of filters. But it’s result not. Ch. engchi. i n U. v. 50. DOI:10.6814/NCCU201900679.

(62) Chapter 7 Future Work and Result. 7.1 Future Work. This paper has tried many ways to achieve the goal, from the application of the earliest Fast Fourier Transform to the more usable heading. It only takes the target sampling method from time sampling to characteristic sampling as the start and end, the intermediate calculation and The process of the filter is much the same. As. 治 政 mentioned above, the basic results of using the sensor大 to do the positioning research 立 must be closely related to the sensor. Therefore, most of the papers use the proposed ‧ 國. 學. method or the new algorithm as the main axis, but the shortcoming is that the sensor. ‧. used by the reference paper is not necessarily the same as you, so the utility is usually very limited for the reference. In the process, the results may be somewhat. y. Nat. algorithm in some parts to strengthen and progress.. n. al. Ch. engchi. er. io. sit. unsatisfactory, and I hope that in the future, some people will be able to extend the. i n U. v. I also thank the authors and translators of physics for game developer [19] for learning a lot from their books when I have been having problems.. 51. DOI:10.6814/NCCU201900679.

(63) Reference [1] Wiki, "IOT 技術," Wiki, [Online]. Available:https://zh.wikipedia.org/wiki/%E7%89%A9%E8%81%94%E7%BD%91. [2] Chun-Han Lin ,Lyu-Han Chen Chun-Han Lin , Lyu-Han Chen , Cheng-Fu Chou , Jose Luis Garcia Gomez, "An Indoor Positioning Algorithm Based on Fingerprint and Mobility Prediction in RSS Fluctuation-Prone WLANs," IEEE, 2019. [3] "全球定位系統," wiki, [Online]. Available: https://zh.wikipedia.org/wiki/%E5%85%A8%E7%90%83%E5%AE%9A%E4%BD% 8D%E7%B3%BB%E7%BB%9F. [4] "Wi-Fi," wiki, [Online]. Available: https://zh.wikipedia.org/wiki/Wi-Fi.. 政 治 大 Available:http://moeimo2016.blogspot.com/2017/07/blog-post_40.html. 立. [5] "智慧博物館," [Online].. ‧ 國. 學. [6] "RSSI," wiki, [Online]. Available: https://en.wikipedia.org/wiki/Received_signal_strength_indication.. ‧. [7] Chen-Yi Lee , Tzu-Chieh Tsai ,, ""A Real-time Interactive Wearable Platform for Skeleton Detection of Multi-Regional Users and Immersive Experiences."," NCCU CS, 10 2016.. y. Nat. sit. [8] "Mqtt," wiki, [Online]. Available: https://zh.wikipedia.org/wiki/MQTT.. n. al. er. io. [9] "TCP/IP," [Online]. Available: https://zh.wikipedia.org/wiki/TCP/IP%E5%8D%8F%E8%AE%AE%E6%97%8F.. Ch. [10] "慣性導航系統," wiki, [Online]. Available:. engchi. i n U. v. https://zh.wikipedia.org/wiki/%E6%83%AF%E6%80%A7%E5%AF%BC%E8%88% AA%E7%B3%BB%E7%BB%9F. [11] Lyu-Han Chen ; Gen-Huey Chen ; Ming-Hui Jin ; Eric Hsiao-Kuang , "A Novel RSSBased Indoor Positioning Algorithm Using Mobility Predictionv," IEEE, 2010. [12] S. e. a. Bertuletti, ""Indoor distance estimated from Bluetooth Low Energy signal strength: comparison of regression models."," 2016 IEEE Sensors Applications Symposium (SAS)., 2016. [13] Xingli Gan ,BaoGuo Yu , Yaning Li, "Deep Learning for Weights Training and Indoor Position Using Multi-sensor Fingerpint," IPIN-2017, 2017. [14] Md. Shareef Ifthekhar , Nirzhar Saha , Yeong Min Jang, "Neural network based indoor positioning technique in optical camera communication system," IEEE, 2014.. 52. DOI:10.6814/NCCU201900679.

(64) [15] chadeltu, "RSSI 距離," CSDN, [Online]. Available: https://blog.csdn.net/chadeltu/article/details/44059431. [16] "快速傅立葉變換," wiki, [Online]. Available: https://zh.wikipedia.org/zhtw/%E5%BF%AB%E9%80%9F%E5%82%85%E9%87%8C%E5%8F%B6%E5%8F%9 8%E6%8D%A2. [17] "移動平均法," MBA 智庫百科, [Online]. Available: https://wiki.mbalib.com/zhtw/%E7%A7%BB%E5%8A%A8%E5%B9%B3%E5%9D%87%E6%B3%95. [18] "互補濾波器," Rapot, [Online]. Available: http://rapot2014.blogspot.com/2014/08/inverted-pendulum3.html. [19] David M. Bourg , Bryan Bywalec, Physics for Game Developers , Second Edition, gotop, 2015.. 政 治 大. [20] Yu-Chuan Tsai,Tzu-Chieh Tsai, "Real-time Relative Directional Positioning Using Wearable Devices)," 11 2016.. 立. ‧ 國. 學. [21] N. Zhao, ""Full-futured Pedometer Design Realized with 3-Axis Digital Accelerometer."," Analog Dialogue, 6 2010.. ‧. [22] Sang Kyeong Park and Young Soo Suh ., ""A Zero Velocity Detection Algorithm Using Inertial Sensors for Pedestrian Navigation Systems."," Sensors 2010, 10, 9163-9178, 2010.. Nat. sit. y. [23] 于飞,白红美, 高伟,赵博,叶攀., ""步幅和建筑方向辅助的行人导航算法.",". io. er. Journal of Harbin Engineering University , 3 2016.. [24] Greg Welch , Gary Bishop ,, ""An Introduction to the Kalman Filter.",". n. al. i n U. v. "University of North Carolina at Chapel Hill.", 24 7 2006.. Ch. engchi. [25] "Rapot Arduino," 2014. [Online]. Available: http://rapot2014.blogspot.com/2014/08/inverted-pendulum3.html. [26] G. A. Developer, "https://developer.android.com/reference/android/hardware/SensorEvent.ht ml#values," [Online]. Available: https://developer.android.com/reference/android/hardware/SensorEvent.html #values. [27] "IMU," wiki, [Online]. Available: https://zh.wikipedia.org/wiki/%E6%83%AF%E6%80%A7%E6%B5%8B%E9%87% 8F%E5%8D%95%E5%85%83. [28] "Raspberry Pi," wiki, [Online]. Available: https://zh.wikipedia.org/wiki/%E6%A0%91%E8%8E%93%E6%B4%BE. [29] J. C. Aguilar Herrera , P. G. Plöger , A. Hinkenjann , J. Maiero , M. Flores , A. 53. DOI:10.6814/NCCU201900679.

(65) Ramos, "Pedestrian indoor positioning using smartphone multi-sensing, radio beacons, user positions probability map and IndoorOSM floor plan representation," IEEE, 2014.. 立. 政 治 大. ‧. ‧ 國. 學. n. er. io. sit. y. Nat. al. Ch. engchi. i n U. v. 54. DOI:10.6814/NCCU201900679.

(66)

參考文獻

相關文件

&#34;Extensions to the k-Means Algorithm for Clustering Large Data Sets with Categorical Values,&#34; Data Mining and Knowledge Discovery, Vol. “Density-Based Clustering in

• An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output.. • An algorithm is

For terminating simulations, the initial conditions can affect the output performance measure, so the simulations should be initialized appropriately. Example: Want to

• BP can not correct the latent error neurons by adjusting their succeeding layers.. • AIR tree can trace the errors in a latent layer that near the front

答1: 學校應按發展步伐 及校本 課 程發 展目 標 ,決

2 machine learning, data mining and statistics all need data. 3 data mining is just another name for

This bioinformatic machine is a PC cluster structure using special hardware to accelerate dynamic programming, genetic algorithm and data mining algorithm.. In this machine,

Krishnamachari and V.K Prasanna, “Energy-latency tradeoffs for data gathering in wireless sensor networks,” Twenty-third Annual Joint Conference of the IEEE Computer