MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION RESEARCH AND DEVELOP WIRELESS IMU-BASED MOTION CAPTURE SYSTEM LECTURER: Assoc... RESEARCH A
Trang 1
MINISTRY OF EDUCATION AND TRAINING
HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
RESEARCH AND DEVELOP WIRELESS
IMU-BASED MOTION CAPTURE SYSTEM
LECTURER: Assoc Prof NGUYEN TRUONG THINH STUDENT: PHAN GIA LUAN
CAPSTONE PROJECT MECHATRONICS ENGINEERING TECHNOLOGY
SKL 0 1 0 0 1 9
Trang 2RESEARCH AND DEVELOP WIRELESS IMU-BASED MOTION CAPTURE SYSTEM
Assoc Prof NGUYEN TRUONG THINH STUDENT’S NAME: PHAN GIA LUAN
STUDENT’S ID: 13146298 ACADEMIC BATCH: 2013 - 2017 MAJOR:
Trang 3SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness ***
Ho Chi Minh City, July 26 th 2017
MISSION OF THESIS
Student’s name: Phan Gia Luan Student’s ID: 13146298
Major: Mechatronics Class: 13146CLC
Advisor: Assoc Prof Nguyen Truong Thinh Phone number: 0938 236 513 Delivery date: February 20th 2017 Submission date: July 21st 2017
1 Title of thesis: Research and develop wireless IMU-based motion capture system
2 The original data, documents:
- Researches and studies on orientation in 3D space, quaternions, MEMS sensors, orientation filters and wireless communications
- Datasheets of electronic components
- Motion capture developers: Xsens and Perception Neuron
3 Main content:
- Research on Madgwick orientation filter, wireless communication and game engine Unity3D
- Design and perform motion capture system hardware
- Implement orientation filter, calibration, simulation and wireless communication to the motion capture system software
- Implement experiments to define errors and system performing statistics
4 Product:
- Complete basic motion capture system
Trang 4SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness
***
ADVISOR’S COMMENT Student’s name: Phan Gia Luan Student’s ID: 13146298
Major: Mechatronics
Title of thesis: Research and develop wireless IMU-based motion capture system
Advisor’s name: Nguyen Truong Thinh
COMMENTS 1 The content of thesis and the workload allocated:
2 Advantages:
3 Improvement point:
4 Project defense approval: Yes No 5 Evaluation remark:
6 Grade: (in word: )
Ho Chi Minh City, July 2017
Advisor
(Name, signature)
Trang 5SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness
***
REVIEWER’S COMMENT Student’s name: Phan Gia Luan Student’s ID: 13146298
Major: Mechatronics
Title of thesis: Research and develop wireless IMU-based motion capture system
Reviewer’s name: Tuong Phuoc Tho
COMMENTS 1 The content of thesis and the workload allocated:
2 Advantages:
3 Improvement point:
4 Project defense approval: Yes No 5 Evaluation remark:
6 Grade: (in word: )
Ho Chi Minh City, July 2017
Reviewer
(Name, signature)
Trang 6All the way over here, I faced a lot of difficulties and obstacles I sometimes wonder if without the help of everybody, how I can come here today This thesis would be impossible without conscientious help of my advisor Assoc Prof Nguyen Truong Thinh
I would like to send my sincere appreciation to my strict teacher as well as my advisor Assoc Prof Nguyen Truong Thinh for his advice and knowledge He provided us the professional working environment, necessary equipment, regular urge… so that we could focus on perfectly completing the project
I want to send my thanks to Ph.D Vu Quang Huy and all teachers who unconditionally helped and motivated me, pointed out my project defects so that I could timely improve my thesis and essay optimally
Thanks are not enough to extend my gratitude to my family especially my mother who is always beside and encourages me, has supported me everything in this project
And I do not forget to thanks to my friends who always by my side listened and shared difficulties with me even if they are not my teammates People on the internet well-timed helped me solve the problems that I can spend a lot of time solving alone without them
Ho Chi Minh City, July 26th, 2017 Student: Phan Gia Luan
Trang 7
ABSTRACT
Talking about motion capture systems, we will think of a system that has a lot of
white markers distributed on the suit worn on the human body, can record and
simulate the motion of human or any other objects in the software However, these
systems are worth a lot of money, can only operate in a wide and fixed space with
many cameras attached around Therefore, only large animation filmmakers or
graphic designers are capable of purchasing this type of system
In this project, research and develop the low cost, moderate accuracy, high speed,
portable and easy-to-use wireless IMU-based motion capture system is our main
contribution We will focus on designing and building the full-featured hardware
and the very simple operation program and control software by using the low cost
components
The presented system is based on a network of small inertial measurement units
called “node” distributed on the human body Each node consist of the baseboard
called “SHURIKEN”, battery and motor housed in the 3D-printed enclosure
SHURIKEN is provided the MEMS sensors: tri-axis accelerometer, tri-axis
gyroscopes and tri-axis magnetometer, 32-bit microcontroller unit integrated Wi-Fi
and on-board power solution This board also has microUSB which supports UART
interface or battery charging and microSD card socket acts as the external memory
In essence, the MCU is the core of the board It collects measured data from the
sensors, perform sensors fusion algorithm based on a quaternion-based Madgwick
orientation filter and transfer data to host via Wi-Fi or store it in the memory for
later use After that, Nodes’ processed data was simulated by the program called
“SHURIKEN launcher” The nodes’ behavior also is controlled by this program
All of these activities are incorporated into the operation of the system in this
project
The result of experiments on accuracy demonstrated the feasibility and advantages
also a few shortcomings of the system The advantages and limitations of the
system, hardware and software architecture in more detail will be discussed
Trang 8CONTENTS
MISSION OF THESIS i
ADVISOR’S COMMENT ii
REVIEWER’S COMMENT iii
ACKNOWLEDGEMENT iv
ABSTRACT v
LIST OF ABBREVIATIONS ix
LIST OF TABLES x
LIST OF FIGURES AND CHART xi
CHAPTER 1 INTRODUCTION 1
1.1 Motivation 1
1.2 Motion capture technology based on IMU 2
1.2.1 Advantage of the based-IMU mocap 3
1.2.2 Disadvantage of the based-IMU mocap 3
1.4 State-of-the-art IMU-based motion capture 3
1.4.1 Xsens – the leading innovator in 3D motion tracking technology 3
1.4.2 Perception Neuron 5
1.5 Research objectives 6
CHAPTER 2: FUNDAMENTAL THEORY 7
2.1 Rotation in three-dimensional space 7
2.1.1 Coordinate frame 7
2.1.2 Quaternion 8
2.1.3 Conversion 10
2.1.4.1 Quaternions to Euler angles 11
2.1.4.2 Euler angles to quaternions 11
2.2 Mems-based inertial measurement unit 11
Trang 92.2.2 Accelerometer 12
2.2.3 Magnetometer 12
2.3 Wireless data transmission 13
2.3.1 Wireless body sensor network 13
2.3.2 User datagram protocol 13
2.4 Unity3D game engine 14
CHAPTER 3: NODE ARCHITECTURE 15
3.1 System hardware diagram 15
3.2 SHURIKEN baseboard 17
3.2.1 MPU9255 – Nine-axis motion tracking sensor 17
3.2.2 ESP8285 – Highly integrated Wi-Fi solution 19
3.2.3 Power Solution 21
3.2.3.1 Battery 21
3.2.3.2 LDO Regulator 22
3.2.3.3 Charge manager 23
CHAPTER 4: ORIENTATION FILTER 24
4.0 Orientation filter overview 24
4.1 Data Calibration 24
4.1.1 Accelerometer zero-adjustment 24
4.1.2 Gyroscope bias drift 25
4.1.3 Hard iron and soft iron effects 26
4.2 Madgwick orientation filter 26
4.2.1 Orientation from angular rate 26
4.2.2 Orientation from vector observations 28
4.2.3 Filter fusion algorithm 31
CHAPTER 5: KINEMATICS 33
5.1 Kinematics in Unity3D 33
5.1.1 Orientation of device frame relatives to unity frame 34
Trang 105.1.2 Orientation of device frame relatives to model frame 34
CHAPTER 6: COMMUNICATION AND IMPLEMENT 36
6.1 Node operation program 36
6.2 SHURIKEN launcher – emulator and nodes controller 37
6.2.1 Scenes controller 37
6.2.2 Nodes’ operation controller 37
6.2.3 Implement calibration 38
6.2.4 Assign the nodes’ ID to the model’s link 38
6.3 Nodes and user device communication 39
6.3.1 Wireless Body Sensor Network overview 39
6.3.2 Network management 40
CHAPTER 7: EXPERIMENT AND RESULT 42
7.1 Orientation filter experiments 42
7.1.1 Effect of calibration on the results 42
7.1.2 Effect of convergence coefficient on the results 45
7.2 Testing network performance 46
7.2.1 Latency - One way delay 46
7.2.2 Wireless update rates 46
7.3 Result of the project 47
CHAPTER 8: CONCLUSION 48
REFERENCES 49
Trang 11LIST OF ABBREVIATIONS
IMU Inertial measurement unit
Mocap Motion capture
CGI Computer - generated imagery
DCM Direction cosine matrix
OWD One way delay
WBSN Wireless body sensor network
MCU Microcontroller unit
MEMS Microelectromechanical systems
UDP User datagram protocol
FSR Full scale range
ADC Analog-to-digital converter
SSF sensitivity scale factor
Trang 12LIST OF TABLES
Table 1 1 MVN Awinda specifications 4
Table 1 2 Perception Neuron specifications 5
Table 3 1 MPU9255 specifications 18
Table 3 2 MPU9255 pins function used in SHURIKEN 18
Table 3 3 ESP8285 electrical characters 19
Table 3 4 ESP8285 pins function used in SHURIKEN 19
Table 3 5 Battery specifications 22
Table 3 6 RT9193 technical parameters 23
Table 7 1 Root mean square error of uncalibrated and calibrated data 44
Table 7 2 Orientation filter constants 47
Table 7 3 Node specifications 47
Trang 13LIST OF FIGURES AND CHART
Figure 1 1 MOCAP-like system in 1970’s 1
Figure 1 2 Messi in Xsens motion capture suit for FIFA 16 2
Figure 1 3 Motion capture methods 2
Figure 1 4 Xsens productions (MTw Awinda and Awinda dongle) 4
Figure 1 5 Perception Neuron productions (hub and neuron) 5
Figure 2 1 Global frame (blue) – Device frame (red) 7
Figure 2 2 orientation of device frame relative to global frame 9
Figure 2 3 Euler angle with z-y-x sequence and left-hand rule 10
Figure 2 4 UDP packet 14
Figure 3 1 Node with Velcro strap 15
Figure 3 2 Node integrated devices 15
Figure 3 3 SHURIKEN interconnections block diagram 16
Figure 3 4 SHURIKEN upside 17
Figure 3 5 SHURIKEN underside 17
Figure 3 6 Node’s power solution diagram 21
Figure 3 7 Regulator circuit 22
Figure 3 8 Charge management circuit 23
Figure 4 1 Accelerometer zero-error 25
Figure 4 2 Gyroscope drift error 25
Figure 4 3 Gyroscope measures the angular rate of its frame 27
Figure 4 4 Block diagram representation of the orientation filter from gyroscope sensor 28
Figure 4 5 Block diagram representation of the orientation filter from accelerometer and magnetometer 31
Figure 4 6 Block diagram representation of the Madgwick orientation filter combined gyroscope, accelerometer and magnetometer data 32
Figure 4 7 Orientation filter overview 32
Figure 5 1 Five frames need to perform simulation in unity 33
Figure 5 2 Difference between global frame and unity frame 34
Figure 6 1 Block diagram represent node program flow 36
Figure 6 2 Scenes in the software 37
Figure 6 3 Block diagram represents closed loop control of user and node 38
Figure 6 4 Figure with input field to assign the node’s ID 39
Figure 6 5 Wireless Body Area Network overview 40
Figure 6 5 IP address of devices in the network 41
Figure 7 1 Static error obtained by leaving node on the surface 43
Trang 14Figure 7 2 Dynamic error by rotating around Zenith with constant speed 44
Figure 7 3 Time response of filter with different convergence coefficient 45
Figure 7 4 Steady-state error with different convergence coefficient 45
Figure 6 5 Block diagram represents how to get OWD 46
Trang 15CHAPTER 1 INTRODUCTION 1.1 Motivation
Motion capture (mocap for short) is the process of capturing the movements of the object and apply the captured movements to three-dimensional model so as to simulate real object’s movements
From the early 19th to the late 20th Century, traditional animation was the most popular in the movie industry During this time, drawing frame by frame picture which was either projected or recorded was the way people form animation However, this technique costed too much time and producers’ effort To solve this problem, the motion capture technology was invented
The motion capture technology first appeared in the late 1970’s [3] It is the human motion capture based on human figure created by Lee Harrison III shown in figure 1.1 [3] [4] Then, the motion capture tech was gradually developed through various methods, expanded phenomenally since 1980’s [3]
Figure 1.1 MOCAP-like system in 1970’s
Nowadays, mocap has played an essential part in our life Motion capture technology has been contributed in various fields It has been used in tracking the performance of athletes, creating more realistic characters in cartoons, games or movies for entertainment purposes Besides, it has also been used in tracking head movement of pilots in military, supporting the training of anatomy etc
Trang 16Figure 1.2 Messi in Xsens motion capture suit for FIFA 16
1.2 Motion capture technology based on IMU
Generally, motion capture has two major methods The first method is to use either cameras, image sensors or depth sensors for motion tracking called optical method The second method is to measure inertia and motion called non-optical method [5] [6] The overview of motion capture methods is shown in figure 1.3 The painted boxes represent the method used in project
Figure 1.3 Motion capture methods
Trang 171.2.1 Advantage of the based-IMU mocap
Unlike optical methods, this method doesn’t require a lot of space and time to set up a large number of cameras
These devices are unfixed and portable, so that they are very convenient and comfortable to the users To be more specific, the users can wear and take off these devices in a second, at the same time they also capture the data quickly and put it into the computer right away
Unlike mechanical systems, these devices are light-weight and not bulky
1.2.2 Disadvantage of the based-IMU mocap
Much like optical markers, we need a lot of IMU sensors if we want to get the natural data
The IMU sensors must be smaller or approximately equal to the size of the object if the users want to track fingers or small objects
We also must use many IMU sensors and combine them with kinematics In other words, to avoid the gyroscope causing the data drift and to increase the accuracy, magnetometers are added However, this is not the ultimate solution because this sensor is very sensitive to unwanted local magnetic flux and electrical interference from metal objects, magnets or electrical sources in the environment The last defect of the based-IMU mocap is its low position accuracy because they don’t have any reference point
1.4 State-of-the-art IMU-based motion capture
Because of being cheap, undemanding, portable but highly applicable, this tech has become more and more popular to customers Therefore, it also needs more developers and vendors
1.4.1 Xsens – the leading innovator in 3D motion tracking technology
Xsens is the leading innovator in 3D motion tracking technology and products Its sensor fusion technologies enable a seamless interaction between the physical and the digital world in consumer devices and professional applications such as 3D character animation, motion analysis, and industrial control & stabilization
Xsens offers a wide range of hardware and software solutions The Xsens MVN is the universal hardware solution for professional animators meanwhile MVN BIOMECH is for those who use it for human movement analysis purpose
Trang 18Figure 1.4 Xsens productions (MTw Awinda and Awinda dongle)
The Xsens MVN portfolio consists of full-body, wearable motion capture
solutions It has two hardware versions (MVN Link and MVN Awinda – figure 1.4)
with their own characteristics MVN Awinda used in wireless solution that consist
of 17 MTw Awinda (Wireless Motion Tracker) Its specifications are shown in table
below:
Table 1.1: MVN Awinda specifications
Internal sampling rate 1000 Hz
Battery life (continuous use) 6 Hours
Dimensions tracker 47 x 30 x 13 mm (1.85 x 1.18 x 0.51inch)
Operating temperature range
Wireless update rates
0°C – 50°C
60 Hz Wireless Range
(heading)
20 MTw Wearable straps, one-size-fits-all
Xsens products are used by many consumers and large corporations It is
utilized in blockbuster movies such as Iron 3, The Wolverine, The Avengers…,
games like FIFA 16, Counter Strike: Global Offensive, Tomb Raider…
Trang 191.4.2 Perception Neuron
As well as Xsens, Perception neuron is the innovator that seeks to redefine the motion capture industry by using the world’s smallest inertial measurement unit (IMU), or, "neurons," as we like to call them Neurons are tiny wireless sensors that actors place on their body and which connect to a hub The hub is in turn connected
to a computer via WiFi or USB port
Figure 1.5 Perception Neuron productions (hub and neuron)
Table 1.2: Perception Neuron specifications
Neuron sensor specifications Dimensions 12.5 x 13.1 x 6 mm
Wearable straps, one-size-fits-all
Neuron hub specifications Dimensions 59 x 41 x 23 mm
Min connected sensor 3
Max connected sensor 32
Output USB 2.0 or Micro-SD Card Recording Output rate 60 fps with 32 Neurons, 120 fps with 18
Neurons Power USB external Battery
Trang 201.5 Research objectives
It takes for ages, costs a lot of money as well as makes all effort to build a complete system Due to the limited time and factors mentioned above, this project mainly focuses on the key sections involving a moderate system with qualified technical parameters The research objectives include five main tasks
- Design and implement the complete hardware
- Have more profound basic knowledge of inertial sensors, magnetometer, quaternion, kinetics, etc
- Understanding, applying and developing available algorithm Utilizing algorithm in C/C++ language
- Using wireless network in order to transmit the data from IMUs and computer via Router
- Applying Unity3D software so as to build a simple application
Trang 21CHAPTER 2: FUNDAMENTAL THEORY 2.1 Rotation in three-dimensional space
In this part, some theories of rotation that required to implement postural tracking using IMU are discussed
2.1.1 Coordinate frame
Coordinate frame is a powerful system that allows us to define the position of points or other geometric elements such as vector, other coordinate frame A coordinate frame consists of a unique fixed point called “origin” and three axis x, y and z which are perpendicular with each other and concurrent at origin In per axe,
we define one unity vector co-directional with the axe On axis X, Y, Z are vectors
i, j and k which are defined respectively [7]
To perform motion capture, two coordinate frames are required: the global frame, denoted by “g”, and the device frame, denoted by “d”, which have the same origin point The global frame is fixed and the device frame is able to rotate around the origin point
The global frame is defined as the reference frame or the direction of an earth’s field Its Z axis is defined as the Zenith axis, positive X axis points in the direction of magnetic North which is in the XZ plane which perpendicular to the Y axis Ideally, the Z axis coincides the magnetic East-West
The device frame is defined as a local frame of a particular device Its axis (red) and global frame’s axis (blue) are flowing figure as below:
Figure 2.1 Global frame (blue) – Device frame (red)
Trang 22In order to determine the direction of the device in three dimensional space, calculating the relative orientation of a device frame related to the global frame is required There are many methods to solve this problem It is acceptable to use an Euler angle in some applications, but not in this project [1] Euler angles are never expressed in terms of the external frame, or in terms of the co-moving rotated body frame [2] Therefore, in order to use Euler, we must convert it into other forms such
as DCM or quaternions Quaternions, which form a four-dimensional vector space, have proven very useful in representing rotations due to having more advantages than other methods:
It is more compact than the DCM
The quaternion elements vary continuously over the unit sphere in ℝ4 as the orientation changes, avoiding discontinuous jumps
Expression of the rotation matrix in terms of quaternion parameters involves
Linear combination
𝑞 = 𝑤 + 𝑥𝑖⃗ + 𝑦𝑗⃗ + 𝑧𝑘⃗⃗ (2.1)
Four dimensional vector
𝑞 = [𝑤 𝑥 𝑦 𝑧] (2.2)
Trang 23In this project, to avoid confusion of between orientations of coordinate frames, quaternion 𝑞𝑎𝑏 represents the orientation of frame A relative to frame B, vector 𝑣𝑎 represents the direction vector in frame A Specifically, in this section, we have two main frame: global frame and device frame descripted in section 2.1.1 so
𝑞𝑔𝑑 and 𝑞𝑑𝑔 are orientation of global frame relative to device frame and orientation of device frame relative to global frame respectively
Figure 2.2 orientation of device frame relative to global frame
An arbitrary orientation of device frame relative to global frame can be achieved through a rotation of angle θ around an axis 𝑟𝑔 defined in global frame
𝑞𝑔𝑑∗ = 𝑞𝑑𝑔 = [𝑞𝑤 − 𝑞𝑥 − 𝑞𝑦 − 𝑞𝑧] (2.4) The quaternion product, denoted by ⊗, can be used to define compound orientations For example, for two orientations described by 𝑞𝑐𝑏 and 𝑞𝑏𝑎, the compounded orientation 𝑞𝑐𝑎 can be defined by equation:
𝑞𝑐𝑎 = 𝑞𝑐𝑏 ⊗ 𝑞𝑏𝑎 (2.5)
Trang 24For two quaternions, a and b, the quaternion product can be determined using the Hamilton rule and defined as equation:
In some situations, quaternions and Euler angles are exchanged in order to be
more convenient in using and calculating There are number of the exchanging formula of quaternions and Euler angles based on sequences of rotation axes In this project, the sequence of rotation axes is z-y-x sequence and Angles are defined according to the right-hand rule
Figure 2.3 Euler angle with z-y-x sequence and left-hand rule
Trang 252.1.4.1 Quaternions to Euler angles
Euler angles 𝜙, 𝜃 and Ѱ describe an orientation of frame B achieved by the sequential rotations, from alignment with frame A, of Ѱ around Z-axis, 𝜃 around Y-axis, and 𝜙 around X-axis in frame B [1] In order to convert quaternions to Euler angles, we need to unitize the given quaternion A versor descripts as the quaternion
of norm one which can be defined as:
𝑞𝑢 𝑑𝑔 = 𝑞𝑑
𝑔
‖𝑞𝑑𝑔‖ (2.8) Basing on 𝑢𝑞𝑑𝑔 we can archive Euler angles:
Ѱ = 𝐴𝑡𝑎𝑛2(2𝑞𝑤𝑞𝑧 + 2𝑞𝑥𝑞𝑦 , 1 − 2𝑞𝑦2− 2𝑞𝑧2) (2.9)
𝜃 = − sin−1( 2𝑞𝑤𝑞𝑦− 2𝑞𝑧𝑞𝑥) (2.10)
𝜙 = 𝐴𝑡𝑎𝑛2(2𝑞𝑤𝑞𝑥 + 2𝑞𝑦𝑞𝑧 , 1 − 2𝑞𝑥2+ 2𝑞𝑦2) (2.11)
2.1.4.2 Euler angles to quaternions
The formula below shows how to convert from Euler angle to quaternion The result is the versor 𝑞𝑢 𝑑𝑔:
𝑞𝑢 𝑑𝑔 =
[
𝑐𝑜𝑠 (Ѱ
2)00𝑠𝑖𝑛 (Ѱ
2)][
𝑐𝑜𝑠 (𝜃
2)0𝑠𝑖𝑛 (𝜃
2)
0 ][
𝑐𝑜𝑠 (𝜙
2)𝑠𝑖𝑛 (𝜙
2)0
0 ] (2.12)
Note: Other rotation sequences use different conventions [7]
2.2 Mems-based inertial measurement unit
Mems stands for microelectromechanical systems which is the technology of microscopic devices This is the core of the mocap device It consists of a mems magnetometer, a mems gyroscope sensor and a mems accelerometer All sensors are capable of measuring on three axis of themselves, device frame, to provide data that can calculate to make useable data in three dimensional space The sections below will introduce these sensors and estimate their data
Trang 26𝑆𝑆𝐹𝜔 = 𝐹𝑆𝑅𝜔
If we consider measured raw signal from gyroscope as a vector 𝜔𝑑𝑟, the pure angular velocity as a vector 𝜔𝑑
, the offset value as a vector 𝜔𝑑
𝑜 and the noise as a vector 𝜔𝑑
𝑛 then the pure gyroscope data can be described as:
𝜔𝑑 = 𝑆𝑆𝐹𝜔(𝜔𝑑𝑟+ 𝜔𝑑𝑜+ 𝜔𝑑𝑛) (2.14)
2.2.2 Accelerometer
The core of the mems accelerometer is a central mass that moves is response
to a device’s acceleration This inertial mass is mounted on a spring that limits its movement and return it to a central position when it rests Sensitive electrical sensor
in the chip read the masses movement and relay this data to a connected ADCs Accelerometer can sense either static or dynamic forces of acceleration Static force
is gravity, 𝑎𝑑𝑔, while dynamic forces can include noise 𝑎𝑑𝑛 and linear movement
𝑎𝑑𝑙 Measured raw signal from accelerometer 𝑎𝑑𝑟 can be defined as:
𝑎𝑑𝑟 = 𝑎𝑑𝑔+ 𝑎𝑑𝑙 (2.15) The pure accelerometer vector 𝑎𝑑 can be described as the sum of raw signal from accelerometer 𝑎𝑑𝑟, the offset vector:
Trang 27earth’s magnetic field 𝑚𝑑 in the sensor frame compounded with distortion of the magnetic field due to the presence of hard iron 𝑚𝑑ℎ𝑖 and Distortion of the magnetic field due to the presence of soft iron 𝑚𝑑𝑠𝑖 We assume the measured raw data as vector 𝑚𝑑𝑟, the noise as a vector 𝑚𝑑𝑛 so 𝑚𝑑 can be calculated by following:
𝑚𝑑 = 𝐹𝐹𝑆𝑚(𝑚𝑑
𝑠𝑖 (2.17)
2.3 Wireless data transmission
IMU-based motion capture system required measurement devices must be worn on the position which needs capture motion, and data must be continuously transferred from the measurement devices onto the computer for simulations in real-time To facilitate mobility and avoid entanglement from the signal wires wireless data transmission is a comprehensive solution to this problem
There are many solutions for wireless data transmission in real time Wi-Fi is one of the solutions with many advantages and disadvantages which is used in this project
Advantages Disadvantages
- Is commonly used
- Fast data rate
- Consume more energy than the wireless protocol which has lower frequency
2.3.1 Wireless body sensor network
Wireless body sensor network (WSN) is a wireless network of wearable computing devices WSN devices may be embedded inside the body, implants, may
be surface-mounted on the body in a fixed position wearable technology or may be accompanied devices which humans can carry in different positions, in clothes pockets, by hand or in various bags [2]
2.3.2 User datagram protocol
UDP widely known as User Datagram Protocol, an alternative to the Transmission Control Protocol (TCP) and, together with IP, is also referred to as UDP/IP [10] With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network [11]
Trang 28Prior communications are not required in order to set up transmission channels or data paths and thus exposes the user's program to any unreliability of the underlying network: there is no guarantee of delivery, ordering, or duplicate protection [10]
Figure 2.4 UDP packet
UDP is suitable for purposes where error checking and correction are either not necessary or are performed in the application [11] In motion capture system, especially in real time mode which is Time-sensitive, the packet for a transmission
is very small and require the lowest latency possible Therefore, UDP is the suitable wireless protocol for this solution The standard packet of UDP is shown in figure 2.4
2.4 Unity3D game engine
Unity is the new piece of technology that strives to make life better and easier for game developers Unity is a game engine or a game authoring tool that enabled creative folks like you to build video game [12] In Unity3D game engine, all objects in a game scene are instances of GameObject class A gameObject can be attached to many components which specify various properties The components attached to a gameObject are inherited from Component class The scripts written
by programmers are inherited from MonoBehavior class which is a special subclass
of Component [13] Some terminologies used in project discussed below:
Scene: it is and area of 3d space that contains a series of GameObjects The game usually contains of several scenes
GameObject: pretty much everything that is in your scene GameObject is a
Trang 29CHAPTER 3: NODE ARCHITECTURE
Figure 3.1 Node with Velcro strap
In this chapter, “node” represents a device as shown in figure 3.1,
“SHURIKEN” represent the baseboard housed inside the node as shown in figure 3.4 and 3.5
3.1 System hardware diagram
Figure 3.2 descripts a hardware block diagram of the node integrated devices The node is a wireless tracking motion device that has three separated parts housed
in 3D printed box: SHURIKEN, battery and motor Battery provides power for baseboard Baseboard provides power and control the motor
Figure 3.2 Node integrated devices
Figure 3.3 illustrates the SHURIKEN baseboard interconnections SHURIKEN baseboard consists of an integrated WiFi chip 32-bit MCU, a sensor that house 3-axis gyroscope, 3-axis accelerometer and 3-axis magnetometer,
Trang 30external memory (up to 128GB microSD card), vibration motor and the on-board power circuit The MCU completely controls the operation of sensor, external memory and motor Angular rate, acceleration and magnetic field are measured by the sensor and transferred to MCU via I2C protocol The MCU processes and converses the given data into the usable form such as quaternion, Euler angles After that, the processed data can be sent to a computer via wireless connection or stored in the MicroSD device SHURIKEN also has one microUSB port to communicate with computer via UART, upgrade firmware or charge the battery
Figure 3.3 SHURIKEN interconnections block diagram
The detailed functional description of each sub-system will be discussed in next section
Trang 313.2 SHURIKEN baseboard
Figure 3.4 SHURIKEN upside
Figure 3.5 SHURIKEN underside 3.2.1 MPU9255 – Nine-axis motion tracking sensor
MPU-9255 is a MCM (multi-chip module) consisting of two dies embedded in FQN-24 package (3x3x1mm) One die stores 3-axis mems gyroscope and 3-axis mems accelerometer, the other stores 3-axis mems magnetometer (AK8963) This is the core of SHURIKEN MPU-9255 features include programmable digital low-pass filters, a precision clock, an embedded temperature sensor and programmable interrupts [14] Its specifications and pins function used in SHURIKEN are shown
Trang 32in table 3.1 and 3.2 respectively
Table 3.1: MPU9255 specifications
ADCs 16-bit 16-bit 16/14-bit
Full-scale range ±250/500/1000/2000
degree/s
±2/4/8/16 g ±4800 µT
Operating temp -40oC to 85oC -40oC to 85oC -30oC to 85oC Operating
current
3.2 mA 450 µA 280 µA
Self-test supported supported supported
Output data rate 4-8000 Hz 4-4000 Hz 8/100 Hz
Filter response 5-250 Hz 5-260 Hz N/A
I2C address 0x68 (AD0 = 0) 0x69 (AD0 = 1) 0x0C
I2C speed 100kHz (fast mode 400kHz)
Table 3.2: MPU9255 pins function used in SHURIKEN
1 RESV Not used
2-6 NC Not used
7 AUX_CL Not used
8 VDDIO Digital I/O supply voltage
9 AD0 I2C Slave Address
10 REGOUT Connect to regulator filter capacitor
11 FSYNC Not used Connect to GND
12 INT Not used