Skip to content

Commit 2e2a77e

Browse files
hxy-codeIRISZZW
authored andcommitted
SEU_Intelligent_Recognition_System_For_Fall_Posture
1 parent bdb63a2 commit 2e2a77e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4423
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# Intelligent Recognition System for Fall Posture
2+
3+
------
4+
5+
This application is a prototype of **intelligent recognition system for fall posture** designed on ARC Iot DK, which can identify whether users are in normal state or fall state according to the intelligent system, and transfer the current data to the **cloud server upper machine** which is designed by **Visual Studio 2019**. The original data is collected by **IMU sensor MPU9250** which is embedded in **ARC Iot DK** board. The data is transferred to cloud server.
6+
7+
**The cloud server upper machine is composed of three parts**: Data-monitor Zone, Weight-management Zone and Weight-transfer Zone. **Data-monitor Zone mainly collects original data and draws inertial figure**. **Original data is transferred to server by Bluetooth Module HC-06** and server draws inertial figure at the same time. **Weight-management Zone controls the interaction between ARC Iot DK and cloud server** including downloading initial weight for users from cloud server and uploading current weight to cloud server for big data acquisition. **The process of uploading and downloading weight can be watched in Weight-transfer Zone** and be established by **wireless communication module Sim900a**.
8+
9+
**BP Neural network** is deployed in ARC Iot DK Board and be used to **train weight and make intelligent recognition**. When neural network miscalculates the posture, users uploads the correct tag by the key in **matrix keyboard** and neural network retrains weight according the correct tag and keep optimizing by itself. To solve the forgetting problem of neural network, **knowledge distillation algorithm** is introduced to retain the memory of the old data set while learning the new data, so that the network can achieve the effect of continuous upgrading, improve the accuracy of attitude judgment, and use the most suitable network weight data for different users.
10+
11+
Intelligent recognition system for fall posture provides various alarm ways. Basically, when system judges fall gesture of users, it will make the **buzzer** ring intermittently to remind people around to help the elderly. The system also makes full use of Sim900a Module and **send information for help** or **make a phone call** to the guardian of user if necessary.
12+
13+
------
14+
15+
## Catalog
16+
17+
- [Introduction](#Introduction)
18+
- [Appearance](#Appearance)
19+
- [System View](#System-View)
20+
- [Video](#Video)
21+
- [Hardware and Software Setup](#Hardware-and-Software-Setup)
22+
- [Required Hardware](#Required-Hardware)
23+
- [Required Software](#Required-Software)
24+
- [Hardware Connection](#Hardware-Connection)
25+
- [User Manual](#User-Manual)
26+
- [Before Running This Application](#Before-Running-This-Application)
27+
- [Run This Application](#Run-This-Application)
28+
- [Specific instructions for use](#Specific-instructions-for-use)
29+
- [Makefile](#Makefile)
30+
- [The system block diagram](#The-system-block-diagram)
31+
- [The cloud server upper machine](#The-cloud-server-upper-machine)
32+
- [File Structure](#File-Structure)
33+
34+
------
35+
36+
## Introduction
37+
38+
This application is designed basing on BP network and knowledge distillation algorithm. First, users uploads their own physical parameters by matrix keyboard and downloads multilayer perceptron MLP initial weights from cloud server. ARC Iot DK Board uses inertial measurement unit IMU to collect user's real-time Euler Angle of posture, Euler Angle is imported to MLP network and neural network completes the training of weight data and gesture recognition. The user wears this application and gradually inform the system of retraining weight data of neural network by pressing the key of correct tag when neural network miscalculates the posture. If a fall gesture is detected, an alarm will be sent through the buzzer and the system will send information for help if necessary, so that the elderly can be rescued in the first place.
39+
40+
------
41+
42+
## Appearance
43+
44+
### System View
45+
46+
<img src=".\picture\ARC IOTDK.png" style="zoom:80%;" />
47+
48+
<img src=".\picture\System composition diagram.jpg" style="zoom: 33%;" />
49+
50+
### Video
51+
52+
https://v.youku.com/v_show/id_XNDkwNDY5MDkwMA==.html?spm=a2hzp.8244740.0.0
53+
54+
------
55+
56+
## Hardware and Software Setup
57+
58+
### Required Hardware
59+
60+
Necessary Hardware:
61+
62+
1. ARC IoT Development Kit(IoT DK) *1
63+
64+
2. HC-06(Bluetooth Module) *1
65+
66+
3. Matrix Keyboard *1
67+
68+
4. Sim900a (Wireless Communication Module) *1
69+
70+
5. Buzzer *1
71+
72+
<img src=".\picture\ARC IOTDK.png" style="zoom:80%;" />
73+
74+
​ Hardware1: ARC IOTDK
75+
76+
<img src=".\picture\HC-06.png" style="zoom:130%;" />
77+
78+
​ Hardware2: Bluetooth HC-06
79+
80+
<img src=".\picture\Matrix%20Keyboard.png" style="zoom:80%;" />
81+
82+
​ Hardware3: Matrix Keyboard
83+
84+
<img src=".\picture\sim900a.png" style="zoom: 50%;" />
85+
86+
​ Hardware4: Wireless Communication Module Sim900a
87+
88+
<img src=".\picture\buzzer.png" style="zoom: 50%;" />
89+
90+
​ Hardware5: Buzzer
91+
92+
### Required Software
93+
94+
1. ARC GNU Toolchain 2020.03
95+
2. embarc_osp(Branch:embarc_mli): https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp.git
96+
3. Visual Studio 2019
97+
4. Python3.7
98+
5. Matlab R2020a
99+
100+
### Hardware Connection
101+
102+
1. Connect HC-06 to Arduino Shield Interface (1x) (Uart2)
103+
104+
2. Connect Sim900a to 12-pin PMOD connectors PMOD_C(Uart1)
105+
106+
3. Connect matrix keyboard to Arduino Shield Interface (1x) (IO4-IO7) and Power Board(including pull-up resistors)
107+
108+
4. Connect buzzer to 2x18 Pin Extension Header(GPIO4b_1[0])
109+
110+
5. Connect Power Board to Arduino Shield Interface (1x) (IO8-IO11)
111+
112+
------
113+
114+
## User Manual
115+
116+
### Before Running This Application
117+
118+
1. Download source code from Github.
119+
120+
2. Make sure all connection is correct again.
121+
122+
3. Start cloud server upper machine and set correct communication protocol(TCP) and port.
123+
124+
### Run This Application
125+
126+
1. To build this application, select the proper board version, core configuration and build with selected toolchain using this command `make BOARD=iotdk BD_VER=10 CUR_CORE=arcem9d TOOLCHAIN=gnu run`.
127+
128+
2. Open the serial terminal on cloud server upper machine.
129+
130+
3. When the application starts, it will connect with cloud server via Bluetooth Module and Wireless Communication Module.
131+
132+
### Specific instructions for use
133+
134+
1. After running the application, user inputs their own physical parameters including height, weight and waist circumference via matrix keyboard and press "Download" key. The cloud server upper machine will transfer appropriate weight data to ARC IOTDK Board and user can get initial weight from cloud server.
135+
2. After getting initial weight data, user begins to wear this application to train better weight data. The application has integrated BP neural network in IOTDK, When neural network miscalculates the posture, users uploads the correct tag by the "Upload" key in matrix keyboard and neural network retrains weight according the correct tag and keep optimizing by itself.
136+
3. After a period of training, the application's fall posture recognition success rate can be close to 100 %.
137+
4. When the application judges that the user is in fall state, it will make buzzer ring first. If user thinks the situation of falling is not very dangerous, he/she can press the "Stop" key on matrix keyboard to make buzzer stop to ring. If user doesn't press "Stop" key within the allotted time, the application will judge that user is in serious injured state, it will automatically send alarm information to user's guardian.
138+
139+
------
140+
141+
## Makefile
142+
143+
- Select correct board
144+
145+
```
146+
BOARD = iotdk
147+
```
148+
149+
- Select middleware
150+
151+
```
152+
MID_SEL = common
153+
```
154+
155+
- Select devices
156+
157+
```
158+
EXT_DEV_LIST += sensor/imu/mpu9250
159+
```
160+
161+
- Select root direction of embARC
162+
163+
```
164+
EMBARC_ROOT = ../../..
165+
```
166+
167+
- Select application source directions
168+
169+
```
170+
APPL_CSRC_DIR = .
171+
APPL_ASMSRC_DIR = .
172+
```
173+
174+
- Select application include directions
175+
176+
```
177+
APPL_INC_DIR = .
178+
```
179+
180+
- Include current project makefile
181+
182+
```
183+
COMMON_COMPILE_PREREQUISITES += makefile
184+
```
185+
186+
------
187+
188+
## The system block diagram
189+
190+
<img src=".\picture\system block diagram.png" style="zoom:150%;" />
191+
192+
------
193+
194+
## The cloud server upper machine
195+
196+
The cloud server upper machine is designed by Visual Studio 2019. Here are running pictures of three parts:
197+
198+
<img src=".\picture\data-monitor zone.png" style="zoom: 80%;" />
199+
200+
​ Data-Monitor Zone
201+
202+
<img src=".\picture\weight-transfer zone.png" style="zoom:80%;" />
203+
204+
​ Weight-Transfer Zone
205+
206+
<img src=".\picture\weight-management zone.png" style="zoom:80%;" />
207+
208+
​ Weight-Management Zone
209+
210+
------
211+
212+
## File Structure
213+
214+
| File | Function |
215+
| ---------------- | --------------------------------------------- |
216+
| main.c | Initialization, Hardware Driver and main loop |
217+
| B0.h | including Bias0 data of Neural Network |
218+
| B1.h | including Bias1 data of Neural Network |
219+
| W0.h | including Weight0 data of Neural Network |
220+
| W1.h | including Weight1 data of Neural Network |
221+
| NNLayer.c | Algorithm of Neural Network Layer |
222+
| NNLayer.h | Head File of Neural Network Layer |
223+
| train_txt_name.h | Head file of txt files' name list |
224+
| train | collected-data folder |
225+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//const double B0 [LAYER_0_OUTDIM] = {0.2265971 ,-0.025297487 ,0.027563533};
2+
3+
//const double B0 [LAYER_0_OUTDIM] = {0.1,0.1};
4+
double B0 [LAYER_0_OUTDIM] = {-0.08339289, -0.12895244, -0.00817236, -0.14970893, -0.04891223, 0.06048673,
5+
-0.03564686, 0.03562576, -0.02807583, -0.01076426, 0.05242028, -0.06581705,
6+
-0.21507816, 0.13969299, 0.19831999, -0.17931655, 0.2189257 , -0.21835655,
7+
-0.20672297, 0.02969302, 0.08939516, 0.1840578 , -0.03162382, 0.22587524,
8+
-0.17233974, 0.10003109, -0.09330476, -0.13605937, 0.20201905, 0.02344308,
9+
-0.22429636, -0.1217358 };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//const double B1[LAYER_1_OUTDIM] = {0.02701721};
2+
3+
//const double B1[LAYER_1_OUTDIM] = {0,0,0};
4+
5+
double B1[LAYER_1_OUTDIM] = {0.1089827, 0.02534886 };

0 commit comments

Comments
 (0)