Download presentation
Presentation is loading. Please wait.
1
ARM MOTION CAPTURE Project code: AMC
2
ARM MOTION CAPTURE Project code: AMC Supervisor : Phan Duy Hung
Group members: Mac Tuan Anh SE02686 Nguyen Anh Trung SE02748 Tran Trung Thanh SE02952 Dao Xuan Bach SE02983 Vo Khanh Di SE60946
3
6. Signal Processing Matlab
Outline 7. Future Work 6. Signal Processing Matlab 5. Firmware On Arduino 4. Hardware Selection 3. Analyze Problem 2. Project Management 1.Introduction
4
1. Introduction 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work 1. Introduction
5
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Motion capture for computer have begun to the late 70s and now wide spreading. In present, tracking motion of human body can be seen in many aspects of daily life. Military Sports Entertainment Medical Robotics
6
Medical 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Medical
7
Sport 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Sport
8
Entertainment 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Entertainment
9
Robotic 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Robotic
10
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Especially, Virtual-Reality technologies are developing in tremendous way. VR and human body motion tracking make a perfect couple.
11
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab The purpose of this project is to make a system that can recognize human’s arm motion and visualize it.
12
Up-next: Project Management
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Up-next: Project Management
13
Project Team Organization
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Project Team Organization Full Name Role Tasks Mạc Tuấn ANH Project Manager - Technical lead, manage the whole team - Receive data on PC via wireless communication - Research filters Đào Xuân BÁCH Team Member - Receive data from 2 MPU6050 modules. - Calibrate sensors, convert data to standard form - Send data to PC through wireless module Võ Khánh DI - Research body motion reconstruction - Research fundamental knowledge about motion Trần Trung THÀNH - Research robot control algorithm - Assemble a robotic arm model for simulation - Control multiple servos with motion data Nguyễn Anh TRUNG - Research accelerometer & Gyroscope - Design a 3D Arm in Solidwork - Connect Solidwork to Simulink for simulation
14
System Process Model 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work System Process Model Requirements Definition Validation and Evolution Software and Hardware Design Implementation and Unit Testing Integration and System Testing Figure 2.2 – System process model
15
Timeline 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Timeline Stage Time Main Task Description 1 May 01st – May 20th Fundamental Knowledge about motion capture Study The first stage of the project is to find out the Requirements Specification of system. Based on that, we will have a research in math, motion in space and other knowledge to point out the solution for the project. 2 May 21st – June 8th Hardware and Software Design Thanks to requirements specification analysis, we are now able to choose hardware and software, which are suitable for the project. The next step is to design hardware and software structure. 3 June 9th – July 9th Hardware and Software Development This stage is to implement the design of hardware and software. 4 July 10th – July 31st Hardware and Software Integration When we have software and hardware developed, it is time to integrate both of them together to checkout how the system works. In this stage, we will test and analysis the result of the system. 5 August 01st – August 08th System Validation and Evolution Based on the analysis on the previous stage, we will resolve troubles that our system has faced. This makes our system works correctly according to the requirements. Moreover, we will have a further study in order to continue to develop our system. 6 August 09th – August 20th Final Document Reports of each stage are collected to rearrange to prepare for the final document.
16
Risk Communication 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Risk Risk type Possible Ricks Technology - Team is lack of knowledge about motion capture. - Programming skills are not good enough. People - Key members are ill and unavailable at critical times - Communication between members is not available. - Member are failure to meet agreed schedule. Hardware - Hardware components are damaged due to transportation, electric power, etc. Software - Software conflict may occur when working in different operating system (windows 7/ windows 8/ windows 10). - Different version of software may result in different behaviors. Estimations - The time for each stage is underestimated. - The rate of defect repair is underestimated. Communication Meeting With Time Method Other Members Twice a week (Tuesday and Sunday) face-to-face Instructor Once a week (Friday) via / face-to-face
17
Up-next: Analyze Problem
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Up-next: Analyze Problem
18
Arm Human Research 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Arm Human Research
19
Arm Human Research 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Arm Human Research
20
Arm Human Research Range of motion movements 1. Introduction
2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Arm Human Research Range of motion movements
21
Coordinate System 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Coordinate System
22
Transformation Matrix
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Transformation Matrix Translation along vector 𝑡 =(𝑥,𝑦,𝑧) 𝑇 𝑡 = 𝑥 𝑦 𝑧
23
Transformation Matrix
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Transformation Matrix Rotation of θ about the x-, y- and z-axes 𝑅 𝑥 𝜃 = cos 𝜃 − sin 𝜃 0 sin 𝜃 cos 𝜃 𝑅 𝑦 𝜃 = cos 𝜃 0 sin 𝜃 − sin 𝜃 0 cos 𝜃 𝑅 𝑧 𝜃 = cos 𝜃 − sin 𝜃 0 sin 𝜃 cos 𝜃
24
Denavit – Hartenberg parameters.
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Denavit – Hartenberg parameters.
25
Denavit – Hartenberg parameters.
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Denavit – Hartenberg parameters.
26
Transformation matrix
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Transformation matrix
27
Arm Model Build-up 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Arm Model Build-up
28
Up-next: Hardware Selection
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Up-next: Hardware Selection
29
Arm motion tracking need components:
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Arm motion tracking need components: Sensors Wireless Communication Microcontroller
30
Board Arduino AT Mega 328 Input voltage: 5-12 V
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Board Arduino AT Mega 328 Input voltage: 5-12 V Digital I/O pins: 14, analog input pins: 6 DC current to I/O pin: 40 mA DC voltage to I/O pins: 3.3 v Clock speed: 16 MHz
31
Board Arduino 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Board Arduino
32
HC05 Module -80 dBm sensitivity Up to +4 dBm RF transmit power
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work HC05 Module -80 dBm sensitivity Up to +4 dBm RF transmit power UART mode with programable baudrate Fully qualified with bluetooth 2.0 Intergrated antenna
33
HC05 Module 1. Introduction 2. Project Management 3. Analyze Problem
4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work HC05 Module
34
GY-521 Sensor Module MPU 6050 accelerometer and gyroscope combine
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work GY-521 Sensor Module MPU 6050 accelerometer and gyroscope combine Intergrated 16-bits ADC Digital output gyroscope with scale range of: ±250±500±1000±2000 Digital output accelerometer with scale range of: ±2±4±8 ±16 G Digital programable low-pass filter Good low-frequency noise performance
35
GY-521 Sensor Module 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work GY-521 Sensor Module
36
Batteries 9V working voltage Viable capacity 1. Introduction
2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Batteries 9V working voltage Viable capacity
37
Up-next: Firmware on Adruino
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Up-next: Firmware on Adruino
38
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work The flow chart that shows how the Arduino firmware runs is in the figure below
39
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Initiate sensors: Sensors need to be calibrated before they could actual work Beside, 1 sensor need extra 1 pin. This pin is for activating I2C address of sensor via pin AD0 on GY-521 board
40
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Calibrate sensors: Calibrating process output is off-set value. It help sensor know reference value of balance position, since record more precise value. In order to calibrate sensor, we have to put sensor in balance position when calibrating function working. Calibrating function record first 10 value of sensor then take average of those value to find off-set value
41
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Get data From arduino, we send “read” order to sensor. When sensor ready, sensor send back data. When “read” order were sent, it go along with sensor I2C address. Therefore, we could choose which sensor send data. Data register addresses of sensor is a part of “read” order. We defined these addresses in the beginning part of firmware Return data from sensors are stored in 1 union type named accel_gyro_union
42
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Convert data After receive data, first part of converting is rearrange data. This happen because MPU6050 data register high and low are swapped Secondly, we change the unit measurement of gyroscope from rad/s to degree/s for convenient. In order to do so, we divide all gyroscope data to constant FS_SEL= 131. Finally, we convert quantized accelerometer data to normal number format. To do it, we divide accelerometer data to a constant of 16384
43
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Send data We read data from 2 sensors sequentially, then we begin send them to PC. Data were sent to HC-05 bluetooth module, then it forward data in PC in bluetooth format. All data were sent in to 1 frame have the following format:
44
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Stop signal Firmware run sequentially from begin to the end then repeat it. If stop signal were created, firmware stop. Next time, it will start a new loop. Stop signal could be: + Power disconnect + RESET button of Arduino board are pushed + Battery run out.
45
Up-next: Processing Matlab
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Up-next: Processing Matlab
46
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Accelerometer An accelerometer is a device that converts acceleration into an electrical signal. The signal from an accelerometer sensor can be separated into two signals Acceleration from gravity allows measurement of the tilt of the device In this project we using Accelerometer from GY-521 Module, This is three-axis accelerometer
47
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Accelerometer The defined Rx, 𝑅𝑦, 𝑅𝑧 is the accelerometer data we receive from Adruino board. This data is the acceleration of sensor MPU6050. We have the following relationship: 𝑅 2 = 𝑅𝑥 2 + 𝑅𝑦 2 + 𝑅𝑧 2
48
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Accelerometer With basic trigonometry, the angles from accelerometer can be calculated as following equation: 𝜃= tan −1 𝐴 𝑋, 𝑂𝑈𝑇 𝐴 𝑌, 𝑂𝑈𝑇 2 + 𝐴 𝑧, 𝑂𝑈𝑇 2 𝜓= tan −1 𝐴 𝑌, 𝑂𝑈𝑇 𝐴 𝑍, 𝑂𝑈𝑇 2 + 𝐴 𝑋, 𝑂𝑈𝑇 2 𝜙= tan − 𝐴 𝑋, 𝑂𝑈𝑇 2 + 𝐴 𝑌, 𝑂𝑈𝑇 2 𝐴 𝑍,𝑂𝑈𝑇
49
Gyroscope Gyroscope measures the rate of changes of the angles
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Gyroscope Gyroscope measures the rate of changes of the angles In opposite with accelerometer, data of gyroscope are independence. Gyroscope values are not related to each other and can freely measure 360 movement.
50
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Gyroscope Gyroscope measures the rate of change of the Axz angle. So we can estimate the new angle Axz(n) as follows: Axz(n) = Axz(n-1) + RateAxz(n) * T
51
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Why we need combine Accelerometer data can't always be trusted 100% . Accelerometer measures inertial force caused by gravitation. Accelerometer also measures acceleration (movement) of device. Accelerometer very sensitive to vibration and mechanical noise. Gyroscope measures rotation it is less sensitive to linear mechanical movement. Gyroscope problems is drift (not coming back to zero-rate value when rotation stops).
52
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work
53
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work
54
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Basic theory of algorithm: Accelerometer raw data is very noise in soft term but in long term it can be trusted. Gyroscope data is trusted in soft term but if operate in long term, it cause drift. We using gyroscope to smooth data from accelerometer in soft term and using accelerometer to compensate drift for gyroscope in long term.
55
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Our algorithm will do following step: Step 1 : Get referent coordinate from previous output vector to calculate gyro angle. Step 2 : Convert gyro angle to vector. Step 3 : Combine gyro vector and acce vector to get better ouput. Step 4 : Calculator angle from output vector.
56
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Rest Calculate Angle Rest + Gyro rate*T Angles(n) Convert Combine Gyro vector Rest Gyroscope Accelerometer Best Angle
57
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Step 1 In this step, we calculate angle from gyroscope rate and get reference from Rest. Gyro Rate * T/1000 Angles change Gyro Rate (deg/ms) Gyro Angles Actan2 Previous Angle Rest(n-1) Note: if is the first time Rest will initiate by Racc data
58
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Step 2 We now have Gyro angle with reference from Rest. Now we can calculate Gyro Vector from that angle. Gyro Angle Axz, Ayz. x = RxGyro , y = RyGyro, z = RzGyro. x = x /SQRT(x^2+y^2+z^2) RxGyro = sin(Axz(n)) / SQRT (1 + cos(Axz(n))^2 * tan(Ayz(n))^2 )
59
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Step 3 This step will combine Accelerometer vector and gyroscope vector to get better result. We'll use a weighted average, so that: Rest(n) = (Racc * w1 + Rgyro * w2 ) / (w1 + w2). And after substituting w2/w1 = wGyro we get: Rest(n) = (Racc + Rgyro * wGyro ) / (1 + wGyro). Note: wGyro value can be chosen experimentally usually values between will trigger good results.
60
Combine accelerometer and gyroscope
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6. Processing Matlab 7. Future Work Combine accelerometer and gyroscope Step 4 This is final step, we calculate angle from Rest by using Actan function. Roll = Atan(Rest(1)/sqrt(Rest(2)^2 + Rest(3)^2) Pitch = Atan(Rest(2)/sqrt(Rest(1)^2 + Rest(3)^2) Roll,Pitch range output from -90 , 90 degree. Yaw data obtain direct from gyro Z , range from – 180 degree. Yaw(n) = rateGyroZ*T + Yaw(n-1)
61
Up-next: Future Work 1. Introduction 2. Project Management
3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Up-next: Future Work
62
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Future Work In the future, we will build our model by using Simulink software. Simulink is a graphical programming environment for modeling, simulating and analyzing multi-domain dynamic systems. Simulink provides graphical user interface (GUI) for using and building model that uses manipulation “pull and push”. Users do not need to use complex programming languages to design. The model will be more beautiful and more realistic than the model that is created directly on MATLAB.
63
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Future Work Because accelerometer do not return angle value if we spin around z-axis. Thus, we cannot compensate drift of gyroscope’s z-axis. This problem is limit of hardware; we cannot fix it by software. There is only way to fix this problem is using external hardware. This is call magnetic sensor, it acts like compass, return earth’s magnetic field x z y 1g
64
1. Introduction 2. Project Management 3. Analyze Problem 4. Hardware Selection 5. Firmware on Adruino 6.Processing Matlab 7. Future Work Future Work In the future, we will develop new hardware for this project. We will using 9-DoF sensor module include accelerometer, gyroscope, magnetic in place of 6-DoF present. Gyro’s Z-axis Magnetic Sensor Drift Compensation Filtered Z-axis Figure 7.2 – Drift Compensation with magnetic sensor
65
DEMO
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.