A fall detection method, system and storage device
By acquiring and analyzing motion sensor data, calculating the initial angle and combined with time window and threshold judgment, the problem of difficulty in accurately distinguishing vertical falls and falling beds in the existing technology is solved, and higher fall detection accuracy and Lower false alarm rate.
Patent Information
- Application Number
- CN202011518779.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-21
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-12-21
AI Technical Summary
The existing fall detection methods are difficult to accurately distinguish vertical falls from falling beds, resulting in misjudgment and misjudgment.
By obtaining the initial acceleration and angular velocity of the X-direction, Y-direction, and Z-direction of the motion sensor, calculate the initial angle and combined acceleration, and combine the time window and threshold judgment to distinguish vertical falls and falls from falling beds.
It effectively improves the accuracy of fall detection, reduces the false alarm rate, and can accurately distinguish vertical falls from falls on the bed.
Smart Images

Figure CN112472075B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection technology, and in particular to a fall detection method, system and storage device. Background Art
[0002] As the body functions gradually deteriorate with age and are affected by some chronic diseases, the elderly are extremely vulnerable to the threat of sudden falls. If they are not discovered and rescued in time after a fall, it will often lead to more serious consequences. Therefore, it is very meaningful to study fall detection devices and systems with practical value. At present, there are two main types of fall detection solutions: vision-based and sensor-based. Vision-based fall detection is limited by factors such as image quality, layout cost, privacy and security, which is not conducive to actual deployment and use. Sensor-based fall detection systems have higher practical value.
[0003] The sensor-based fall detection system needs to comprehensively consider issues such as system complexity and detection accuracy. The fall detection device based on a three-axis accelerometer disclosed in "Zhejiang University City College, a fall detection method, a fall detection device and a wrist device, Chinese invention patent, CN102657533A, 2012.09.12" is simple and easy to implement, but it is easy to make misjudgments simply by relying on the accelerometer sensor. "Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences, a method for judging human falls, Chinese invention patent, CN 103142234 B, 2015.04.01" uses a single-axis tilt sensor combined with a six-axis sensor module to assist in judgment. While the reliability of fall detection is increased, it also increases the complexity of the system to a certain extent, which is not conducive to the miniaturization and wearability of the system.
[0004] In addition, many of the existing sensor-based fall detection devices make judgments and detections based on the initial vertical posture of the human body, and do not distinguish between vertical falls and falls into bed, which may lead to misjudgments and missed judgments in the fall into bed scenario. Summary of the invention
[0005] Therefore, it is necessary to provide a fall detection method to solve the problem that the existing fall detection method has poor accuracy in distinguishing between vertical falls and falls from the bed. The specific technical solution is as follows:
[0006] A fall detection method comprises the steps of:
[0007] Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction;
[0008] Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, where the initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle;
[0009] Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4.
[0010] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11;
[0011] Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1.
[0012] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0013] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0014] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9;
[0015] Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1.
[0016] Step 10: Send a fall warning prompt;
[0017] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0018] Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1;
[0019] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0020] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0021] Step 15: Calculate the current yaw angle and then execute step 16;
[0022] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0023] Furthermore, the “calculating an initial angle according to the initial acceleration and angular velocity in the X direction, the Y direction, and the Z direction, wherein the initial angle includes one or more of the following: a pitch angle, a roll angle, and a yaw angle” specifically includes the steps of:
[0024] Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0025] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0026] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0027] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0028] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0029] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0030] Step 27: Normalize the quaternion:
[0031] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0032] In order to solve the above technical problems, a storage device is also provided, and the specific technical solution is as follows:
[0033] A storage device having an instruction set stored therein, wherein the instruction set is used to execute:
[0034] Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction;
[0035] Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, where the initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle;
[0036] Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4.
[0037] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11;
[0038] Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1.
[0039] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0040] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0041] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9;
[0042] Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1.
[0043] Step 10: Send a fall warning prompt;
[0044] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0045] Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1;
[0046] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0047] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0048] Step 15: Calculate the current yaw angle and then execute step 16;
[0049] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0050] Furthermore, the instruction set is also used to execute:
[0051] Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0052] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0053] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0054] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0055] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0056] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0057] Step 27: Normalize the quaternion:
[0058] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0059] In order to solve the above technical problems, a fall detection system is also provided, and the specific technical solution is as follows:
[0060] A fall detection system, comprising: a motion sensor module, a CPU module, an antenna module, a switch module, a power module, a charging module, and an LED indication module;
[0061] The power supply module is respectively connected to the motion sensor module, the CPU module and the charging module;
[0062] The CPU module is respectively connected to the antenna module, the switch module, the LED indication module and the motion sensor module;
[0063] The CPU module includes: a processor and a wireless communication submodule;
[0064] The motion sensor module is used to perform the following steps: Step 1: Responding to an initial working instruction, obtaining initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction;
[0065] The CPU module is used to perform the following steps: Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, wherein the initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle;
[0066] Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4.
[0067] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11;
[0068] Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1.
[0069] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0070] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0071] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9;
[0072] Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1.
[0073] Step 10: Send a fall warning prompt;
[0074] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0075] Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1;
[0076] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0077] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0078] Step 15: Calculate the current yaw angle and then execute step 16;
[0079] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0080] Further, the CPU module is also used to perform the following steps: Step 21: convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0081] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0082] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0083] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0084] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0085] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0086] Step 27: Normalize the quaternion:
[0087] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0088] Furthermore, the wireless communication submodule includes: Bluetooth and WIFI modules;
[0089] The antenna module is used to communicate with the Bluetooth and WIFI modules.
[0090] Furthermore, the motion sensor module model is LSM6DSL.
[0091] The beneficial effects of the present invention are as follows: by executing step 1: responding to the initial working instruction, obtaining the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction; step 2: calculating the initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, and the initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle; step 3: calculating the combined acceleration according to the initial acceleration in the X direction, Y direction, and Z direction, and judging whether the combined acceleration is less than a threshold value A1, if not, returning to step 1, if less, executing step 4; step Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5, otherwise execute step 11; Step 5: Determine whether the initial velocity in the Y direction is negative and the absolute value is greater than the threshold value A2. If so, execute step 6, if not, return to step 1; Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7, if not, return to step 1; Step 7: Determine whether the fluctuation size of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8, if not , then return to step 1; step 8: after calculating the current pitch angle and roll angle, execute step 9; step 9: determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold value θ1, if so, it is determined to be a vertical fall, and execute step 10, if not, return to step 1; step 10: issue a fall alarm; step 11: determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times, if so, execute step 12, if not, return to step 1; step 12: determine whether the initial acceleration in the Z direction is negative and the absolute value is greater than the threshold value A5, if so, then Execute step 13, if not, return to step 1; step 13: determine whether the combined acceleration is greater than the threshold value A6 within the time window T3, if so, execute step 14, if not, return to step 1; step 14: determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4, if so, execute step 15, if not, return to step 1; step 15: calculate the current yaw angle and execute step 16; step 16: determine whether the yaw angle is greater than the threshold value θ2, if so, determine it as a fall from the bed and execute step 10, if not, return to step 1. The above steps can effectively distinguish vertical falls from fall from the bed, improve the accuracy of fall detection, and reduce its false alarm rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 A flow chart of a fall detection method described in a specific implementation manner;
[0093] Figure 2a A schematic diagram of a three-dimensional direction of a human body vertical motion sensor according to a specific implementation method;
[0094] Figure 2b A schematic diagram of the three-dimensional direction of the motion sensor for a human body lying flat according to the specific implementation method;
[0095] Figure 3 A schematic diagram of a module of a storage device described in a specific implementation method
[0096] Figure 4 It is a module schematic diagram of a fall detection system described in a specific implementation method.
[0097] Description of reference numerals:
[0098] 300, storage device,
[0099] 400. A fall detection system,
[0100] 401, CPU module,
[0101] 402, motion sensor module,
[0102] 403, antenna module,
[0103] 404, power module,
[0104] 405, switch module,
[0105] 406, LED indicator module,
[0106] 407. Charging module,
[0107] 4011, processor,
[0108] 4012, wireless communication submodule,
[0109] 40121, Bluetooth,
[0110] 40122, WIFI module. DETAILED DESCRIPTION
[0111] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.
[0112] See also Figure 1 , Figure 2 and Figure 4 In this embodiment, a fall detection method can be applied to a fall detection system. The module connection diagram of the fall detection system is as shown in FIG. Figure 4 As shown, the motion sensor module in the fall detection system is used to collect the initial acceleration and angular velocity in the X direction, Y direction, and Z direction; the CPU module is used to calculate the initial acceleration and angular velocity.
[0113] First combine Figure 2a and Figure 2b , let's explain the process of a person standing upright and falling out of bed:
[0114] According to the different weightlessness time during the process of human body standing upright and falling from bed and tumbling, as well as the different changes in the direction of three-dimensional acceleration, and combined with the acceleration threshold and angle change threshold, the vertical fall and falling from bed and tumbling fall of the human body are classified and detected. As shown in Figure 2(a), the three-dimensional axial relationship of the motion sensor of the human body in the vertical posture is: the Y axis is opposite to the direction of gravity acceleration G, the X axis and Z axis are parallel to the horizontal support surface and perpendicular to the X axis and satisfy the right-hand rule; as shown in Figure 2(b), the three-dimensional axial relationship of the motion sensor of the human body in the horizontal posture is: the X axis is opposite to the direction of gravity acceleration G, the Y axis and Z axis are parallel to the support surface and perpendicular to the human body and satisfy the right-hand rule. According to custom, the angle generated by the rotation of the human body around the X axis is called the pitch angle, the angle generated by the rotation of the human body around the Y axis is called the yaw angle, and the angle generated by the rotation of the human body around the Z axis is called the roll angle.
[0115] See also Figure 1 , a specific implementation of a fall detection method is as follows:
[0116] Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X, Y, and Z directions. Specifically, the fall detection device starts to obtain the initial acceleration and angular velocity of the motion sensor in the X, Y, and Z directions when it is turned on or starts working. The initial acceleration and angle in these three directions are used to subsequently determine whether the initial posture of the human body is vertical or horizontal, so as to classify and detect falls in the two postures.
[0117] Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction. The initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle.
[0118] Step 3: Calculate the combined acceleration according to the initial accelerations in the X, Y and Z directions, and determine whether the combined acceleration is less than the threshold value A1. If not, return to step 1; if so, execute step 4.
[0119] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, proceed to step 5, otherwise proceed to step 11. Specifically, it can be as follows: Use the initial accelerations in the X, Y, and Z directions obtained in step 1 to calculate the combined acceleration ACC_SVM value, and determine whether the ACC_SVM value is less than the threshold value A1. If not, return to step 1. If it is satisfied, record the number of times the ACC_SVM value is continuously less than the threshold value A1. If it exceeds N1 times, proceed to the next step. If it does not exceed N1 times but exceeds N2 times, jump to step 11. If it does not exceed N2 times, return to step 1. The method for calculating the combined acceleration value is: ACC_X represents the acceleration in the X direction, ACC_Y represents the acceleration in the Y direction, and ACC_Z represents the acceleration in the Z direction. It can be understood that the weightlessness time of a rolling bed fall is shorter than that of a vertical fall, so the threshold N2 is less than the threshold N1, and the specific threshold is determined according to the sensor sampling frequency.
[0120] Step 5: Determine whether the initial velocity in the Y direction is negative and the absolute value is greater than the threshold value A2. If so, execute step 6. If not, return to step 1. If yes, it means that the human body in the vertical initial posture has a weightless behavior similar to falling, and enter the vertical fall judgment branch.
[0121] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0122] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0123] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9.
[0124] Step 9: Determine whether the difference in the angle change of the pitch angle or the roll angle is greater than the threshold value θ1. If so, it is determined to be a vertical fall, and step 10 is executed. If not, return to step 1. Specifically, it can be as follows: Determine whether the difference in the angle change of the pitch angle or the roll angle is greater than the threshold value θ1. If "yes", it means that the human body with an initial vertical posture has fallen, triggering a fall alarm event; if "no", return to step 1. It can be understood that when a human body with an initial vertical posture falls, the pitch angle changes significantly in the case of a forward or backward fall, and the roll angle changes significantly in the case of a left or right fall. Therefore, in this step, it is only necessary to determine whether the difference in the angle change of the pitch angle or the roll angle exceeds the threshold value θ1.
[0125] Step 10: Issue a fall alarm.
[0126] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0127] Step 12: Determine whether the initial acceleration in the Z direction is negative and the absolute value is greater than the threshold value A5. If so, it means that the human body in the horizontal initial posture has a weightlessness behavior similar to falling, and enters the falling-in-bed judgment branch, and executes step 13. If not, return to step 1;
[0128] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0129] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0130] Step 15: Calculate the current yaw angle and then execute step 16;
[0131] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0132] It can be understood that when a person with an initial horizontal posture falls, the falling and rolling of the bed will cause the yaw angle to change significantly. Therefore, in this step, it is only necessary to determine whether the angle change difference of the yaw angle exceeds the threshold value θ2.
[0133] It should be noted that the relevant parameters in the above steps can be obtained through experiments and other methods, and their typical values are shown in the following table.
[0134] parameter Typical Value unit A1 11 <![CDATA[m / s 2 > A2 6.9 <![CDATA[m / s 2 > A3 19.6 <![CDATA[m / s 2 > A4 0.8 <![CDATA[m / s 2 > A5 8.5 <![CDATA[m / s 2 > A6 14.7 <![CDATA[m / s 2 > N1 6 Second-rate N2 3 Second-rate T1 400 millisecond T2 1000 millisecond T3 150 millisecond T4 500 millisecond θ1 40 Spend θ2 50 Spend
[0135] Furthermore, the “calculating an initial angle according to the initial acceleration and angular velocity in the X direction, the Y direction, and the Z direction, wherein the initial angle includes one or more of the following: a pitch angle, a roll angle, and a yaw angle” specifically includes the steps of:
[0136] Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0137] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0138] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0139] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0140] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0141] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0142] Step 27: Normalize the quaternion:
[0143] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0144] Where DEG2RAD is the conversion coefficient, which is 0.01745. RAD2DEG is the coefficient for converting radians to degrees, which is 57.3.
[0145] The above method can effectively distinguish vertical falls from falls out of bed, improve the accuracy of fall detection and reduce its false alarm rate.
[0146] Please refer to Figures 2 to Figure 3 In this embodiment, a storage device is mainly any device that can be used for computing, such as a CPU, etc. The specific implementation is as follows:
[0147] A storage device having an instruction set stored therein, wherein the instruction set is used to execute:
[0148] Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X, Y, and Z directions. Specifically, the fall detection device starts to obtain the initial acceleration and angular velocity of the motion sensor in the X, Y, and Z directions when it is turned on or starts working. The initial acceleration and angle in these three directions are used to subsequently determine whether the initial posture of the human body is vertical or horizontal, so as to classify and detect falls in the two postures.
[0149] Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction. The initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle.
[0150] Step 3: Calculate the combined acceleration according to the initial accelerations in the X, Y and Z directions, and determine whether the combined acceleration is less than the threshold value A1. If not, return to step 1; if so, execute step 4.
[0151] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, proceed to step 5, otherwise proceed to step 11. Specifically, it can be as follows: Use the initial accelerations in the X, Y, and Z directions obtained in step 1 to calculate the combined acceleration ACC_SVM value, and determine whether the ACC_SVM value is less than the threshold value A1. If not, return to step 1. If it is satisfied, record the number of times the ACC_SVM value is continuously less than the threshold value A1. If it exceeds N1 times, proceed to the next step. If it does not exceed N1 times but exceeds N2 times, jump to step 11. If it does not exceed N2 times, return to step 1. The method for calculating the combined acceleration value is: ACC_X represents the acceleration in the X direction, ACC_Y represents the acceleration in the Y direction, and ACC_Z represents the acceleration in the Z direction. It can be understood that the weightlessness time of a rolling bed fall is shorter than that of a vertical fall, so the threshold N2 is less than the threshold N1, and the specific threshold is determined according to the sensor sampling frequency.
[0152] Step 5: Determine whether the initial velocity in the Y direction is negative and the absolute value is greater than the threshold value A2. If so, execute step 6. If not, return to step 1. If yes, it means that the human body in the vertical initial posture has a weightless behavior similar to falling, and enter the vertical fall judgment branch.
[0153] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0154] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0155] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9.
[0156] Step 9: Determine whether the difference in the angle change of the pitch angle or the roll angle is greater than the threshold value θ1. If so, it is determined to be a vertical fall, and step 10 is executed. If not, return to step 1. Specifically, it can be as follows: Determine whether the difference in the angle change of the pitch angle or the roll angle is greater than the threshold value θ1. If "yes", it means that the human body with an initial vertical posture has fallen, triggering a fall alarm event; if "no", return to step 1. It can be understood that when a human body with an initial vertical posture falls, the pitch angle changes significantly in the case of a forward or backward fall, and the roll angle changes significantly in the case of a left or right fall. Therefore, in this step, it is only necessary to determine whether the difference in the angle change of the pitch angle or the roll angle exceeds the threshold value θ1.
[0157] Step 10: Issue a fall alarm.
[0158] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0159] Step 12: Determine whether the initial acceleration in the Z direction is negative and the absolute value is greater than the threshold value A5. If so, it means that the human body in the horizontal initial posture has a weightlessness behavior similar to falling, and enters the falling-in-bed judgment branch, and executes step 13. If not, return to step 1;
[0160] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0161] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0162] Step 15: Calculate the current yaw angle and then execute step 16;
[0163] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0164] It can be understood that when a person with an initial horizontal posture falls, the falling and rolling of the bed will cause the yaw angle to change significantly. Therefore, in this step, it is only necessary to determine whether the angle change difference of the yaw angle exceeds the threshold value θ2.
[0165] It should be noted that the relevant parameters in the above steps can be obtained through experiments and other methods, and their typical values are shown in the following table.
[0166] parameter Typical Value unit A1 11 <![CDATA[m / s 2 > A2 6.9 <![CDATA[m / s 2 > A3 19.6 <![CDATA[m / s 2 <!-- 11 -->]]> A4 0.8 <![CDATA[m / s 2 > A5 8.5 <![CDATA[m / s 2 > A6 14.7 <![CDATA[m / s 2 > N1 6 Second-rate N2 3 Second-rate T1 400 millisecond T2 1000 millisecond T3 150 millisecond T4 500 millisecond θ1 40 Spend θ2 50 Spend
[0167] Furthermore, the instruction set is also used to execute:
[0168] Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0169] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0170] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0171] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0172] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0173] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0174] Step 27: Normalize the quaternion:
[0175] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0176] Where DEG2RAD is the conversion coefficient, which is 0.01745. RAD2DEG is the coefficient for converting radians to degrees, which is 57.3.
[0177] The method executed by the instruction set in the above storage device can effectively distinguish between vertical falls and falls out of bed, improve the accuracy of fall detection, and reduce its false alarm rate.
[0178] Please refer to Figure 2 and Figure 4 In this embodiment, a fall detection system 400 is implemented as follows:
[0179] A fall detection system 400 includes: a motion sensor module 402, a CPU module 401, an antenna module 403, a switch module 405, a power module 404, a charging module 407, and an LED indication module 406;
[0180] The power module 404 is respectively connected to the motion sensor module 402, the CPU module 401 and the charging module 407;
[0181] The CPU module 401 is respectively connected to the antenna module 403, the switch module 405, the LED indication module 406 and the motion sensor module 402;
[0182] The CPU module 401 includes: a processor 4011 and a wireless communication submodule 4012;
[0183] The motion sensor module 402 is used to perform the following steps: Step 1: Responding to the initial working instruction, obtaining the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction;
[0184] The CPU module 401 is used to perform the following steps: Step 2: Calculate an initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, wherein the initial angle includes one or more of the following: pitch angle, roll angle, and yaw angle;
[0185] Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4.
[0186] Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11;
[0187] Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1.
[0188] Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1.
[0189] Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1.
[0190] Step 8: After calculating the current pitch angle and roll angle, proceed to step 9;
[0191] Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1.
[0192] Step 10: Send a fall warning prompt;
[0193] Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1;
[0194] Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1;
[0195] Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1.
[0196] Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1.
[0197] Step 15: Calculate the current yaw angle and then execute step 16;
[0198] Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
[0199] Further, the CPU module 401 is also used to perform the following steps: Step 21: convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient;
[0200] Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction;
[0201] Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0;
[0202] Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient;
[0203] Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient;
[0204] Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period;
[0205] Step 27: Normalize the quaternion:
[0206] Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
[0207] Furthermore, the wireless communication submodule 4012 includes: Bluetooth 40121 and WIFI module 40122;
[0208] The antenna module 403 is used to communicate with the Bluetooth 40121 and WIFI module 40122.
[0209] Furthermore, the model of the motion sensor module 402 is LSM6DSL.
[0210] The above system can effectively distinguish vertical falls from falls out of bed, improve the accuracy of fall detection and reduce its false alarm rate.
[0211] It should be noted that, although the above embodiments have been described in this article, the patent protection scope of the present invention is not limited thereby. Therefore, based on the innovative concept of the present invention, changes and modifications made to the embodiments described herein, or equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included in the patent protection scope of the present invention.
Claims
1. A fall detection method, characterized in that: Includes steps: Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction; Step 2: Calculate the initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, and the initial angle includes: pitch angle, roll angle, and yaw angle; Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4. Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11; Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1. Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1. Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1. Step 8: After calculating the current pitch angle and roll angle, proceed to step 9; Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1. Step 10: Send a fall warning prompt; Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1; Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1; Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1. Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1. Step 15: Calculate the current yaw angle and then execute step 16; Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
2. A fall detection method according to claim 1, characterized in that: The "calculating the initial angle according to the initial acceleration and angular velocity in the X direction, the Y direction, and the Z direction, wherein the initial angle includes one or more of the following: pitch angle, roll angle, yaw angle" specifically includes the steps of: Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient; Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction; Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0; Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient; Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient; Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period; Step 27: Normalize the quaternion: Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
3. A storage device having an instruction set stored therein, characterized in that: The instruction set is used to perform: Step 1: Respond to the initial working instruction and obtain the initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction; Step 2: Calculate the initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, and the initial angle includes: pitch angle, roll angle, and yaw angle; Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4. Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11; Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1. Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1. Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1. Step 8: After calculating the current pitch angle and roll angle, proceed to step 9; Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1. Step 10: Send a fall warning prompt; Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1; Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1; Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1. Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1. Step 15: Calculate the current yaw angle and then execute step 16; Step 16: Determine whether the yaw angle is greater than a threshold value θ1. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
4. A storage device according to claim 3, characterized in that: The instruction set is also used to perform: Step 21: Convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient; Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction; Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0; Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient; Step 25: Correct the angular velocities in three directions: gx=gx+Kp*ex+ex_int, gy=gy+Kp*ey+ey_int, gz=gz+Kp*ez+ez_int, where Kp is the correction coefficient; Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period; Step 27: Normalize the quaternion: Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
5. A fall detection system, characterized in that: include: Motion sensor module, CPU module, antenna module, switch module, power module, charging module, LED indicator module; The power supply module is respectively connected to the motion sensor module, the CPU module and the charging module; The CPU module is respectively connected to the antenna module, the switch module, the LED indication module and the motion sensor module; The CPU module includes: a processor and a wireless communication submodule; The motion sensor module is used to perform the following steps: Step 1: Responding to an initial working instruction, obtaining initial acceleration and angular velocity of the motion sensor in the X direction, Y direction, and Z direction; The CPU module is used to perform the following steps: Step 2: Calculate the initial angle according to the initial acceleration and angular velocity in the X direction, Y direction, and Z direction, and the initial angle includes: pitch angle, roll angle, and yaw angle; Step 3: Calculate the combined acceleration according to the initial accelerations in the X direction, Y direction, and Z direction, and determine whether the combined acceleration is less than a threshold value A1. If not, return to step 1. If less, execute step 4. Step 4: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N1 times. If so, execute step 5; otherwise, execute step 11; Step 5: Determine whether the initial velocity in the Y direction is negative and its absolute value is greater than the threshold value A2. If so, execute step 6; if not, return to step 1. Step 6: Determine whether the combined acceleration is greater than the threshold value A3 within the time window T1. If so, execute step 7; if not, return to step 1. Step 7: Determine whether the fluctuation magnitude of the combined acceleration is less than the threshold value A4 within the time window T2. If so, execute step 8; if not, return to step 1. Step 8: After calculating the current pitch angle and roll angle, proceed to step 9; Step 9: Determine whether the angle change difference of the pitch angle or the roll angle is greater than the threshold θ1. If so, it is determined to be a vertical fall and step 10 is executed. If not, return to step 1. Step 10: Send a fall warning prompt; Step 11: Determine whether the number of times the combined acceleration is less than the threshold value A1 is greater than or equal to N2 times. If so, execute step 12; if not, return to step 1; Step 12: Determine whether the initial acceleration in the Z direction is negative and its absolute value is greater than the threshold value A5. If so, execute step 13; if not, return to step 1; Step 13: Determine whether the combined acceleration is greater than a threshold value A6 within the time window T3. If so, execute step 14; if not, return to step 1. Step 14: Determine whether the fluctuation of the combined acceleration is less than the threshold value A4 within the time window T4. If so, execute step 15; if not, return to step 1. Step 15: Calculate the current yaw angle and then execute step 16; Step 16: Determine whether the yaw angle is greater than a threshold value θ2. If so, determine that the person has fallen out of bed and execute step 10. If not, return to step 1.
6. A fall detection system according to claim 5, characterized in that: The CPU module is also used to perform the following steps: Step 21: convert the angular velocity into radians: gx=gx*DEG2RAD, gy=gy*DEG2RAD, gz=gz*DEG2RAD, where gx is the angular velocity in the X direction, gy is the angular velocity in the Y direction, gz is the angular velocity in the Z direction, and DEG2RAD is the conversion coefficient; Step 22: Calculate the normalized acceleration value: Where ax is the acceleration in the X direction, ay is the acceleration in the Y direction, and az is the acceleration in the Z direction; Step 23: Calculate the components of gravity in three directions: vx = 2*(q1*q3-q0*q2); vy = 2*(q0*q1+q2*q3); vz = q0*q0-q1*q1-q2*q2+q3*q3; where q0, q1, q2, q3 are quaternions, and the initial values are set to q0 = 1, q1 = q2 = q3 = 0; Step 24: Calculate the gravity errors in three directions: ex = (ay*vz-az*vy), ey = (az*vx-ax*vz); ez = (ax*vy-ay*vx), where ex is the gravity component error in the X direction, ey is the gravity component error in the Y direction, and ez is the gravity component error in the Z direction. Integrate the errors: ex_int = ex_int + ex*Ki, ey_int = ey_int + ey*Ki, ez_int = ez_int + ez*Ki, where ex_int is the integral of the gravity component error in the X direction, ey_int is the integral of the gravity component error in the Y direction, ez_int is the integral of the gravity component error in the Z direction, and Ki is the integral compensation coefficient; Step 25: Correct the angular velocities in three directions: gx = gx + Kp*ex + ex_int, gy = gy + Kp*ey + ey_int, gz = gz + Kp*ez + ez_int, where Kp is the correction coefficient; Step 26: Use the first-order Picard solution to solve the quaternion equation, and the quaternion obtained is: q0=q0+(-q1*gx-q2*gy-q3*gz)*T, q1=q1+(q0*gx+q2*gz-q3*gy)*T, q2=q2+(q0*gy-q1*gz+q3*gx)*T, q3=q3+(q0*gz+q1*gy-q2*gx)*T, where T is half of the sampling period; Step 27: Normalize the quaternion: Step 28: Convert quaternion to Euler angle: pitch = asin(-2*q1*q3+2*q0*q2)*RAD2DEG, roll = atan2(2*q2*q3+2*q0*q1,-2*q1*q1-2*q2*q2+1)*RAD2DEG, yaw = atan2(2*q1*q2+2*q0*q3,q0*q0+*q1*q1-q2*q2-q3*q3)*RAD2DEG, where pitch is the pitch angle, roll is the roll angle, yaw is the yaw angle, and RAD2DEG is the coefficient for converting radians to degrees.
7. A fall detection system according to claim 5, characterized in that: The wireless communication submodule includes: Bluetooth and WIFI modules; The antenna module is used to communicate with the Bluetooth and WIFI modules.
8. A fall detection system according to claim 5, characterized in that: The motion sensor module model is LSM6DSL.
Citation Information
Patent Citations
Falling detection method, falling detection device and wrist type device
CN102657533A
Sensor system and method for judging body falldown and body protection device
CN103142234A
Fall detection system
CN214965592U