WO2019085139A1 - Rehabilitation exercise parameter measurement system and method - Google Patents

Rehabilitation exercise parameter measurement system and method Download PDF

Info

Publication number
WO2019085139A1
WO2019085139A1 PCT/CN2017/114546 CN2017114546W WO2019085139A1 WO 2019085139 A1 WO2019085139 A1 WO 2019085139A1 CN 2017114546 W CN2017114546 W CN 2017114546W WO 2019085139 A1 WO2019085139 A1 WO 2019085139A1
Authority
WO
WIPO (PCT)
Prior art keywords
angle
euler
current
rotation
nutation
Prior art date
Application number
PCT/CN2017/114546
Other languages
French (fr)
Chinese (zh)
Inventor
李传华
史宏超
殳峰
Original Assignee
苏州脉吉医疗技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201711079127.7A external-priority patent/CN108209931B/en
Priority claimed from CN201711080208.9A external-priority patent/CN108225317A/en
Application filed by 苏州脉吉医疗技术有限公司 filed Critical 苏州脉吉医疗技术有限公司
Publication of WO2019085139A1 publication Critical patent/WO2019085139A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/107Measuring physical dimensions, e.g. size of the entire body or parts thereof
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb

Definitions

  • the invention relates to the field of motion angle measurement, in particular to a measurement system and method for rehabilitation motion parameters.
  • the movement of the patient is also analyzed by detecting the angle of movement of the healing action made by the patient.
  • the angle difference calculated from the attitude angle is The value is significantly different from the actual motion angle; (2) directly using the quaternion (ie, the four-dimensional space vector) or the rotation matrix to calculate the spatial angle; however, directly calculating the spatial angle easily introduces the motion angle error in the non-main motion direction; For example, when performing hip frontal motion, if there is a rotation or an internal or external deviation, the spatial angle will include the movement angles of these non-main motion directions, resulting in a large calculated angular error; (3) directly using the elevation angle The roll angle and the heading angle are used for the difference calculation; however, the calculation method also has a singular point and is not suitable for the calculation of the motion angle of an arbitrary posture.
  • the technical problem to be solved by the present invention is to overcome the defect that the calculation method of the joint angle of the joint is large in the prior art, and to provide a defect. Measuring system and method for joint angle.
  • the invention provides a measurement system for rehabilitation exercise parameters, the measurement system comprising: an attitude sensor and a controller;
  • the posture sensor is fixed to a training part of a human rehabilitation exercise; the posture sensor is configured to acquire a quaternion of the posture of the training part and send the quaternion to the controller;
  • the controller is configured to convert the quaternion into Euler angle information of different rotation orders in an inertial coordinate system, and calculate the rehabilitation motion parameter according to the Euler angle information.
  • the rehabilitation motion parameters include: a primary angle and/or an offset angle and/or a rotation angle;
  • the first attitude sensor is configured to acquire a starting quaternion and a current quaternion of the posture of the training part and send the same to the controller;
  • the controller is configured to convert the starting quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and convert the current quaternion into an inertial coordinate system Calculating the primary angle and/or offset based on the at least two initial Euler angle information and the at least two current Euler angle information Angle and/or angle of rotation;
  • the main angle is an angle between a projection of the training site on a first plane and a second plane;
  • the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
  • the offset angle is an angle between a projection of the training portion on the second plane and the first plane
  • the rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
  • the controller includes an Euler angle conversion unit, a first calculation unit, and a first determination unit;
  • the Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
  • the first calculating unit calculates an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
  • the first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
  • the first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
  • Main angle change value second current nutation angle - second initial nutation angle
  • the first calculation unit is further configured to calculate a main angle by the following formula:
  • Main angle sign (estimated main angle) ⁇ max (
  • the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
  • Main angle sign (estimated main angle) ⁇ (2 ⁇ standard angle - first starting nutation angle - first current nutation angle);
  • the estimated main angle the first current nutation angle - the first initial nutation angle
  • the first calculating unit specifically calculates the estimated offset angle by the following formula:
  • Estimated offset angle first current rotation angle - first starting rotation angle
  • the first calculation unit Calculate the estimated offset angle by the following formula:
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the first initial Euler angle information includes a first initial nutation angle
  • the first current Euler angle information includes a first current nutation angle
  • the second current Euler angle information includes a second current nutation angle
  • the second starting Euler angle information includes a second initial nutation angle
  • the controller when calculating the main angle, includes an Euler angle conversion unit, a first calculation unit, and a first determination unit;
  • the Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
  • the first calculating unit calculates an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
  • the first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
  • the first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
  • the main angle change value the second current nutation angle ⁇ 90 °;
  • the first calculation unit is further configured to calculate a main angle by the following formula:
  • Main angle sign (estimated main angle) ⁇ max (
  • the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
  • Main angle sign (estimated main angle) ⁇ (2 ⁇ standard angle - first starting nutation angle - first current nutation angle);
  • the estimated main angle the first current nutation angle
  • the first calculating unit specifically calculates the estimated offset angle by the following formula:
  • Estimated offset angle first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • the first calculation unit Calculate the estimated offset angle by the following formula:
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the first current Euler angle information includes a first current rotation angle and a first current nutation angle
  • the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle
  • the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
  • the first determining unit is further configured to determine whether the first current nutation angle is smaller than the second current nutation angle
  • the first calculating unit calculates the offset angle by the following formula:
  • Offset angle first current rotation angle - first starting rotation angle
  • the first calculating unit calculates the offset angle by the following formula:
  • Offset angle first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • the first calculating unit calculates the offset angle by the following formula:
  • Offset angle second current rotation angle -sign (second starting rotation angle) ⁇ 90 °;
  • the first starting Euler angle information further includes a first starting rotation angle
  • the second starting Euler angle information further includes a second starting rotation angle
  • the rehabilitation exercise parameter comprises: an angle of joint
  • the second attitude sensor is configured to acquire a first quaternion of the posture of the training part and send the same to the controller;
  • the controller is configured to convert the first quaternion to at least two Euler angle information of different rotation orders in an inertial coordinate system
  • the third attitude sensor is configured to acquire a second quaternion of the posture of the training part and send the same to the controller;
  • the controller is further configured to convert the second quaternion to at least two Euler angle information of the different rotation order in an inertial coordinate system;
  • the controller is further configured to calculate a joint angle of the training portion based on the at least four Euler angle information.
  • the controller comprises an Euler angle conversion unit, a second calculation unit, a third calculation unit and a second determination unit;
  • the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
  • the second determining unit is configured to determine whether an absolute value of the first chapter moving angle is smaller than a first threshold; when the determination is no, the second calculating unit is called; when the determination is yes, the third calculating unit is called ;
  • the second calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is greater than 0:
  • the second calculating unit is further configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is less than 0:
  • the third calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the predicted angle and the fourth chapter moving angle is greater than zero:
  • Joint angle 180 ° -
  • the third calculating unit is further configured to calculate the joint clip by the following formula when the product of the predicted angle and the fourth chapter moving angle is less than 0. angle:
  • Joint angle
  • the predicted angle the first chapter moving angle + sign (third chapter moving angle) ⁇ 90 °;
  • the first Euler angle information includes a first nutation angle
  • the second Euler angle information includes a second nutation angle
  • the third Euler angle information includes a third nutation angle
  • the pull angle information includes the fourth chapter dynamic angle.
  • the controller comprises an Euler angle conversion unit and a fourth calculation unit;
  • the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
  • the fourth calculation unit is configured to calculate an angle of joint by the following formula:
  • the third Euler angle information includes a third rotation angle
  • the fourth Euler angle information includes a fourth rotation angle
  • the controller further includes a third determining unit
  • the fourth calculating unit is further configured to calculate the first temporary angle by the following formula:
  • the third determining unit is further configured to determine whether an absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, invoke the fourth calculating unit;
  • the fourth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
  • Target joint angle 180° -
  • the controller comprises an Euler angle conversion unit and a fifth calculation unit;
  • the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
  • the fifth calculation unit is for calculating an angle of joint by the following formula:
  • the third Euler angle information includes a third precession angle
  • the fourth Euler angle information includes a fourth precession angle
  • the controller further includes a fourth determining unit
  • the fifth calculating unit is further configured to calculate the second temporary angle by the following formula:
  • Second temporary angle
  • the fourth determining unit is further configured to determine whether an absolute value of the second temporary angle is greater than a second threshold
  • the fifth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
  • Target joint angle 180° -
  • the controller comprises an Euler angle conversion unit, a fifth determination unit and a sixth calculation unit;
  • the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
  • the fifth determining unit is further configured to determine whether an absolute value of the second chapter moving angle is smaller than a first threshold
  • the sixth calculating unit calculates the joint angle by the following formula:
  • Joint angle 180° -
  • the sixth calculating unit is further configured to calculate the joint angle by the following formula:
  • the second Euler angle information includes a second chapter angle
  • the third Euler angle information includes a third rotation angle
  • the fourth Euler angle information includes a fourth chapter movement angle
  • the present invention also provides a method for measuring a rehabilitation exercise parameter, the measurement method being implemented using the above-described measurement system, the measurement method comprising the following steps:
  • Quaternion S 1 the sensor acquires the posture of the posture of the training site and sent to the controller;
  • the controller converts the quaternion into Euler angle information of different rotation orders in an inertial coordinate system
  • the controller calculates the rehabilitation motion parameter according to the Euler angle information.
  • the rehabilitation motion parameters include: an offset angle and/or an offset angle and/or a rotation angle
  • Step S 1 comprises:
  • the first attitude sensor acquires a starting quaternion and a current quaternion of the posture of the training part and sends the same to the controller;
  • Step S 2 comprises:
  • the controller converts the initial quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and converts the current quaternion into an inertial coordinate system At least two current Euler angle information of the different rotation order;
  • Step S 3 comprises:
  • the controller calculates the primary angle and/or the offset angle and/or the rotation angle according to the at least two initial Euler angle information and the at least two current Euler angle information;
  • the main angle is an angle between a projection of the training site on a first plane and a second plane;
  • the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
  • the offset angle is an angle between a projection of the training portion on the second plane and the first plane
  • the rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
  • the step S 2 the initial and the current quaternion quaternion rotation are converted into a first sequence in a first coordinate system INS start information and the first current Euler angles Euler angles Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
  • Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
  • step S32-1 determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S33-1 ;
  • step S 33-1 ' When performing step S 33-1 ';
  • Main angle change value second current nutation angle - second initial nutation angle
  • Main angle sign (estimated main angle) ⁇ max (
  • the main angle change value is greater than 90°
  • the main angle is calculated by the following formula:
  • Main angle sign (estimated main angle) ⁇ (2 ⁇ standard angle - first starting nutation angle - first current nutation angle);
  • the estimated main angle is calculated in the step S 31-1 by the following formula:
  • Estimated main angle first current nutation angle - first initial nutation angle
  • the estimated offset angle is calculated by the following formula:
  • Estimated offset angle first current rotation angle - first starting rotation angle
  • the specific formula is calculated by the following formula Estimate the offset angle:
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the first initial Euler angle information includes a first initial nutation angle
  • the first current Euler angle information includes a first current nutation angle
  • the second current Euler angle information includes a second current nutation angle
  • the second starting Euler angle information includes a second initial nutation angle
  • the step S 2 the initial and the current quaternion quaternion rotation are converted into a first sequence in a first coordinate system INS start information and the first current Euler angles Euler angles Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
  • Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
  • step S32-2 determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S23-3 ; When performing step S33-2 ';
  • the main angle change value the second current nutation angle ⁇ 90 °;
  • Main angle sign (estimated main angle) ⁇ max (
  • the main angle change value is greater than 90°
  • the main angle is calculated by the following formula:
  • Main angle sign (estimated main angle) ⁇ (2 ⁇ standard angle - first starting nutation angle - first current nutation angle);
  • the estimated main angle is calculated in step S 31-2 by the following formula:
  • the estimated offset angle is calculated by the following formula:
  • Estimated offset angle first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • the specific formula is calculated by the following formula Estimate the offset angle:
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the first current Euler angle information includes a first current rotation angle and a first current nutation angle
  • the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle
  • the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
  • the step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two information calculating Euler angles of the offset angle comprises:
  • Offset angle first current rotation angle - first starting rotation angle
  • the offset angle the first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • Offset angle second current rotation angle -sign (second starting rotation angle) ⁇ 90 °;
  • the first starting Euler angle information further includes a first starting rotation angle
  • the second starting Euler angle information further includes a second starting rotation angle
  • the rehabilitation exercise parameter comprises: an angle of joint
  • Step S 1 comprises:
  • the first attitude sensor acquires a first quaternion of the posture of the training part
  • the second attitude sensor acquires a second quaternion of the posture of the training part
  • Step S 2 comprises:
  • the controller converts the first quaternion into at least two Euler angle information of different rotation orders in an inertial coordinate system, and converts the second quaternion into the inertial coordinate system At least two Euler angle information for different rotation orders;
  • Step S 3 comprises:
  • the controller calculates an angle of joint of the training site based on at least four Euler angle information.
  • the controller sets the first and the second quaternion quaternion rotation are converted into a first sequence in a first INS coordinates information and the Euler angles Two Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
  • the step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
  • step S 3-1a determining whether the absolute value of the first chapter moving angle is smaller than the first threshold; when the determination is no, step S 3-2a is performed ; when the determination is YES, executing step S 3-3a ;
  • step S 3-2a specifically includes:
  • the joint angle is calculated by the following formula:
  • the joint angle is calculated by the following formula:
  • step S 3-3a specifically includes:
  • Joint angle 180 ° -
  • the joint angle is calculated by the following formula:
  • Joint angle
  • the predicted angle the first chapter moving angle + sign (third chapter moving angle) ⁇ 90 °;
  • the first Euler angle information includes a first nutation angle
  • the second Euler angle information includes a second nutation angle
  • the third Euler angle information includes a third nutation angle
  • the pull angle information includes the fourth chapter dynamic angle.
  • the step S 2 the first and the second quaternion quaternion Euler angles are converted into the third information and the fourth information of the second Euler angle rotation sequence of the INS coordinates ;
  • the step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
  • the third Euler angle information includes a third rotation angle
  • the fourth Euler angle information includes a fourth rotation angle
  • the method further includes:
  • step S 3-3b determining whether the absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, performing step S 3-4b ;
  • the fault angle of the joint angle is calculated by the following formula to obtain the target joint angle:
  • Target joint angle 180° -
  • the step S 2 the first and the second quaternion quaternion Euler angles are converted into the third information and the fourth information of the second Euler angle rotation sequence of the INS coordinates ;
  • Step S 3 comprises:
  • the third Euler angle information includes a third precession angle
  • the fourth Euler angle information includes a fourth precession angle
  • the method further includes:
  • Second temporary angle
  • step S 3-3c determining whether the absolute value of the second temporary angle is greater than a second threshold; when the determination is yes, performing step S 3-4c ;
  • the joint angle is fault-tolerant by the following formula to obtain the target joint angle:
  • Target joint angle 180° -
  • the step S 2 the first and the second quaternion quaternion Euler angles are converted into the first information and the second information of the first Euler angle rotation sequence of the INS coordinates And third Euler angle information and fourth Euler angle information of the second rotation sequence;
  • Step S 3 comprises:
  • step S 3-1d determining whether the absolute value of the second chapter moving angle is smaller than the first threshold; when the determination is no, step S 3-2d is performed ; when the determination is YES, executing step S 3-3d ;
  • Joint angle 180° -
  • the second Euler angle information includes a second chapter angle
  • the third Euler angle information includes a third rotation angle
  • the fourth Euler angle information includes a fourth chapter movement angle
  • the positive progress of the present invention is that the present invention combines the Euler angles in the multi-rotation order to calculate the main angle on the basis of the attitude quaternion, avoids the singular points, and can accurately represent the movement angle of the training part of the patient. It has special significance for judging the quality of the action made by the patient, the error of the movement, and understanding the initial position of the patient.
  • FIG. 1 is a schematic structural view of a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
  • FIG. 2 is a first schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
  • FIG. 3 is a second schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 4 of the present invention.
  • FIG. 6 is a schematic structural view of a controller in a measurement system for rehabilitation exercise parameters according to Embodiment 5 of the present invention.
  • Fig. 7 is a flow chart showing a method of measuring a rehabilitation exercise parameter according to a sixth embodiment of the present invention.
  • FIG. 8a is a first flowchart of calculating a main angle in step 130 of the method for measuring rehabilitation exercise parameters according to Embodiment 6 of the present invention.
  • Figure 8b is a second flow chart for calculating the main angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the sixth embodiment of the present invention.
  • Fig. 9 is a flow chart showing the calculation of the offset angle in the step 130 of the method for measuring the rehabilitation motion parameters according to the sixth embodiment of the present invention.
  • Fig. 10 is a flow chart showing the calculation of the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the sixth embodiment of the present invention.
  • Figure 11 is a flow chart for calculating the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the eighth embodiment of the present invention.
  • Figure 12 is a flow chart for calculating the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the ninth embodiment of the present invention.
  • Fig. 13 is a flow chart showing the calculation of the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the tenth embodiment of the present invention.
  • the measurement system of the present embodiment is for measuring a human rehabilitation exercise parameter
  • the rehabilitation exercise parameter includes at least one of the following parameters: a main angle, an offset angle, a rotation angle, and a joint angle.
  • the main angle is the angle between the projection of the training part (four limbs or the trunk) on the first plane and the second plane;
  • the first plane is the plane of the motion path of the standard motion of the rehabilitation motion, the second plane and the first plane vertical.
  • the offset angle is the angle between the projection of the training part on the second plane and the first plane. Taking the hip joint front movement as an example, the offset angle is the angle of the abduction direction inside the thigh.
  • the rotation angle is the angle change value of the training part on the Z axis of the inertial coordinate system. Taking the hip joint front motion as an example, the rotation angle is the difference angle between the training position and the initial position due to the rotation of the training part.
  • the main angle or the angle of the joint is the main parameter for measuring the quality of the movement. Only when the main angle reaches the standard angle of the standard movement as much as possible, the quality of the rehabilitation training will be higher and the training effect is better. Of course, two or three or four motion parameters can also be used to evaluate whether the action made by the patient is up to standard.
  • the measurement system of the present embodiment includes an attitude sensor 1, a controller 2, and an alarm 3. It should be noted that when calculating the main angle, the offset angle and the rotation angle, an attitude sensor is theoretically required to implement the calculation. If a plurality of attitude sensors are provided, the results obtained by the plurality of attitude sensors can be averaged or fitted. . At least two attitude sensors are required to calculate the angle of the joint.
  • the attitude sensor that calculates the main angle, the offset angle, and the rotation angle is referred to as a first attitude sensor
  • the attitude sensor that calculates the angle of the joint is referred to as a second attitude sensor and a third attitude sensor.
  • the attitude sensor may specifically be a 6-axis or a 9-axis sensor.
  • the posture sensor is fixed to the training part of the human body rehabilitation exercise, and the posture sensor is fixed on the training thigh by taking the standing hip joint forward motion as an example.
  • the posture sensor is worn on the outer side of the thigh, and when in the standard standing position, the Y-axis of the body coordinate system of the attitude sensor coincides with the Z-axis of the inertial coordinate system (that is, the northeast sky coordinate system).
  • the posture sensor obtains the starting quaternion of the posture of the training part (the quaternion of the posture of the patient before the rehabilitation action), and the initial quaternion coordinate is Pos1 (Q0, Q1, Q2, Q3). ).
  • the attitude sensor When the patient makes hip joint motion, the attitude sensor obtains the current quaternion of the posture of the training part in real time (the quaternion of the posture of the patient after hip joint motion), and the current quaternion coordinate is Pos2 (Q0', Q1' , Q2', Q3'). The attitude sensor is also used to send the starting quaternion and the current quaternion to the controller.
  • the controller specifically includes an Euler angle conversion unit 21, a first calculation unit 221, and a first determination unit 231.
  • the controller converts the starting quaternion obtained by the attitude sensor into at least two initial Euler angle information of different rotation orders in the INS coordinate system, and converts the current quaternion into the difference in the INS coordinate system Rotating at least two current Euler angle information in sequence, and calculating a primary angle and/or an offset angle and/or a rotation angle based on the at least two starting Euler angle information and the two current Euler angle information.
  • the two rotation sequences of ZYX and ZXY are used for the algorithm description.
  • AngleX zyx Atan2 (2 ⁇ (Q0 ⁇ Q1 + Q2 ⁇ Q3), 1-2 ⁇ (Q1 ⁇ Q1 + Q2 ⁇ Q2));
  • AngleY zyx Asin(2 ⁇ (Q0 ⁇ Q2-Q3 ⁇ Q1));
  • AngleZ zyx Atan2 (2 ⁇ (Q0 ⁇ Q3 + Q1 ⁇ Q2), 1-2 ⁇ (Q2 ⁇ Q2 + Q3 ⁇ Q3));
  • AngleX zxy Asin (2 ⁇ (Q0 ⁇ Q1 + Q3 ⁇ Q2));
  • AngleY zxy Atan2 (2 ⁇ (Q0 ⁇ Q2 - Q1 ⁇ Q3), 1-2 ⁇ (Q1 ⁇ Q1 + Q2 ⁇ Q2));
  • AngleZ zxy Atan2 (2 ⁇ (Q0 ⁇ Q3 - Q1 ⁇ Q2), 1-2 ⁇ (Q1 ⁇ Q1 + Q3 ⁇ Q3));
  • AngleX zyx (first initial rotation angle), AngleY zyx (first initial nutation angle) and AngleZ zyx (first initial precession angle) are the first of the first rotation order (ZYX) in the inertial coordinate system.
  • Information contained in the initial Euler angle information; AngleX zxy (second initial nutation angle), AngleY zxy (second initial rotation angle), and AngleZ zxy (second initial precession angle) are the second in the inertial coordinate system
  • the Euler angle conversion unit calculates the first current Euler angle information of the first rotation order (ZYX) in the inertial coordinate system according to Pos2 (Q0', Q1', Q2', Q3'), the first current Euler angle
  • the angular information includes AngleX' zyx (first current rotation angle), AngleY' zyx (first current nutation angle), and AngleZ' zyx (first current precession angle), and the second rotation order in the inertial coordinate system (ZXY)
  • Second current Euler angle information the second current Euler angle information includes AngleX' zxy (second current nutation angle), AngleY' zxy (second current rotation angle), and AngleZ' zxy (second current precession) angle).
  • the main angle is mainly calculated by AngleY zyx , AngleY' zyx , AngleX zxy , AngleY' zxy, and AngleX' zxy .
  • the first calculating unit first calculates the estimated main angle PrMainAngle and the estimated offset angle PrSideAngle according to the first starting Euler angle information and the first current Euler angle information, and the calculation formula is as follows:
  • PrMainAngle AngleY' zyx -AngleY zyx ;
  • the first determining unit determines whether the estimated main angle is smaller than the angle threshold.
  • the angle threshold is typically 90°.
  • the first calculating unit is called to calculate the main angle, specifically:
  • the first calculating unit calculates a main angle change value AngleZXY in the second rotation order according to the second start Euler angle information and the second current Euler angle information;
  • AngleZXY AngleX' zxy -AngleX zxy ;
  • the first calculating unit specifically calculates the main angle MainAngle by the following formula:
  • MainAngle sign(PrMainAngle) ⁇ max(
  • the first calculation unit can also calculate the main angle MainAngle by the following formula:
  • MainAngle sign(PrMainAngle) ⁇ (2 ⁇ standard angle-AngleY zyx -AngleY′ zyx );
  • the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
  • the main angle of the rehabilitation exercise made by the patient can be accurately obtained, so that whether the rehabilitation movement made by the patient is up to standard can be determined by judging whether the main angle reaches the standard angle.
  • the offset angle is mainly calculated by AngleX zyx , AngleX' zyx , AngleY zxy, and AngleY' zxy .
  • AngleX′ zyx and AngleY′ zxy will have a 180° compensation change.
  • the main angle is less than 90°, the difference is directly made.
  • the main angle is greater than 90°, the angle compensation is needed after the difference;
  • AngleX' zyx can reflect the change of the offset angle very well.
  • AngleX' zyx is affected by the main angle. Large, while AngleY' zxy can reflect the current deflection angle very well.
  • the first determining unit When calculating the offset angle, the first determining unit first determines whether the first current nutation angle is smaller than the second current nutation angle.
  • the first calculation unit calculates the offset angle SideAngle by the following formula:
  • the first calculation unit calculates the offset angle SideAngle by the following formula:
  • the offset angle is mainly used to measure the degree of left and right deviation of the rehabilitation motion and the standard motion made by the patient.
  • the rehabilitation motion of the patient can also be evaluated by means of the offset angle, and the absolute value of the deflection angle is larger. The greater the difference between the action and the standard action, the lower the action quality.
  • the first calculating unit may also validate the offset angle and limit it to (-180, 180) to implement the judgment and filtering of the wrong action.
  • SideAngle' is the final offset angle after being effectively processed.
  • RotationAngle AngleZ' zyx -AngleZ zyx ;
  • AngleZ' zyx characterizes the current angle of the training part on the Z axis of the inertial coordinate system
  • AngleZ zyx characterizes the starting angle of the training part on the Z axis of the inertial coordinate system.
  • the rotation angle is used to measure the rotational deviation of the position of the individual's habits and the standard position during the movement.
  • the angle is only used as a reference.
  • At the time of rehabilitation training at least two posture sensors are fixed to the training site of the human rehabilitation exercise. Taking the angle of the knee joint as an example, the attitude sensor is fixed to the side of the training thigh and calf. When in the standard standing position, the posture sensor body sits. The Y-axis of the singularity coincides with the Z-axis of the INS coordinate system (ie, the Northeast celestial coordinate system).
  • the two attitude sensors are referred to as a second attitude sensor A and a third attitude sensor B, respectively.
  • the second attitude sensor A acquires the first quaternion of the posture of the training part in real time and sends it to the controller, and the first quaternion coordinate is Pos1 (Q0, Q1, Q2, Q3).
  • the third attitude sensor B acquires the second quaternion of the posture of the training part in real time and sends it to the controller, and the second quaternion coordinate is Pos2 (Q0', Q1', Q2', Q3').
  • attitude sensors can be set according to the data requirements. Of course, the more the number, the more accurate the measurement results will be.
  • the joint angle can be calculated by any two attitude sensors, and then the calculated multiple joint angles are averaged.
  • the controller includes a Euler angle conversion unit 21, a second calculation unit 222, a third calculation unit 223, and a second determination unit 232.
  • the controller converts the first quaternion into at least two Euler angle information of different rotation orders in the inertial coordinate system, and converts the second quaternion into at least two of the different rotation orders in the inertial coordinate system
  • the Euler angle information and the joint angle of the training site is calculated based on at least four Euler angle information.
  • AngleXA zxy (first chapter moving angle), AngleYA zxy (first rotation angle) and AngleZA zxy (first precession angle) are the first European order of the first rotation order (ZXY) in the inertial coordinate system.
  • the information contained in the pull angle information; AngleXA zyx (third rotation angle), AngleYA zyx (third chapter dynamic angle) and AngleZA zyx (third precession angle) are the second rotation order (ZYX) in the inertial coordinate system
  • the information contained in the third Euler angle information The information contained in the third Euler angle information.
  • AngleXB zxy (Chapter 2 dynamic angle), AngleYB zxy (second rotation angle) and AngleZB zxy (second precession angle) are the second Euler angle information of the first rotation order (ZXY) in the inertial coordinate system. Contained information; AngleXB zyx (fourth rotation angle), AngleYB zyx (fourth movement angle) and AngleZB zyx (fourth precession angle) are the fourth rotation of the second rotation order (ZYX) in the inertial coordinate system The information contained in the pull angle information.
  • the Z-axis of the body coordinate system of the attitude sensor is The size of the legs is vertical, and the direction is parallel to the left and right direction of the human body, so that when the patient performs training exercises such as standing position, sitting position, and supine position, the angle change of the knee joint angle is expressed on the Y axis.
  • the controller calculates the angle of the joint by:
  • the second determining unit determines whether there is a sensor in the vicinity of the singularity position, taking the attitude sensor A in the vicinity of the singularity point of (ZYX) as an example, and the second determining unit determines whether the absolute value of the AngleXA zxy is smaller than the first threshold, wherein the first threshold Usually 5°.
  • the second calculating unit is called to calculate the joint angle based on the third Euler angle information and the fourth Euler angle information.
  • the third calculation unit is called to calculate the joint angle based on the first Euler angle information, the third Euler angle information, and the fourth Euler angle information. .
  • the second calculating unit calculates the angle of the joint, first determine the sign of AngleXA zxy and AngleXB zxy .
  • the second calculation unit calculates the joint angle TwoSensorAngle by the following formula:
  • TwoSensorAngle 180°-
  • the second calculation unit calculates the joint angle by the following formula:
  • TwoSensorAngle
  • the third calculation unit calculates the joint angle by the following formula:
  • TwoSensorAngle 180°-
  • the third calculation unit calculates the joint angle by the following formula:
  • TwoSensorAngle
  • the alarm module 3 is configured to determine whether the main angle and/or the offset angle and/or the rotation angle and/or the joint angle are within respective threshold ranges, and issue a prompt message when the judgment is no, to remind The patient's movements are not up to standard and the direction or magnitude of the movement needs to be changed.
  • the prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation.
  • the calculation process of the three angles of the present invention is only described by the two rotation sequences of ZYX and ZXY.
  • the user can, but is not limited to, ZYX and ZXY as the selection rotation order, and the number is not limited to two. It can be three or more, and generally has the following rotation order: ZYX', 'ZYZ', 'ZXY', 'ZXZ', 'YXZ', 'YXY', 'YZX', 'YZY', 'XYZ', 'XYZ', 'XYZ' and 'XZX'.
  • the rotation order is selected, the two rotation orders with the same singular point cannot be selected.
  • the Euler angles in the multi-rotation sequence are fused to calculate the main angle, the offset angle, and the rotation angle of the joint angle, thereby avoiding the singular points and accurately characterizing the patient.
  • the joint angle of the training site has special significance for judging the quality of the action made by the patient, the motion error, and understanding the patient's initial standing habit.
  • Embodiment 2 is basically the same as Embodiment 1, except that in this embodiment, a standard position is defined for each rehabilitation exercise (when the main angle, the offset angle, and the rotation angle are both 0°), that is, the standard is Bit as the start bit.
  • the first calculation unit calculates the estimated main angle and the estimated offset angle according to the following formula:
  • PrMainAngle AngleY' zyx ;
  • PrSideAngle AngleX' zyx ⁇ 90°
  • the first calculating unit calculates the main angle change value AngleZXY in the second rotation sequence according to the following formula:
  • AngleZXY AngleX' zxy ⁇ 90°
  • the sign is selected according to the angle corresponding to the initial position.
  • the first calculating unit specifically calculates the main angle MainAngle by the following formula:
  • the first calculation unit can also calculate the main angle MainAngle by the following formula:
  • MainAngle sign(PrMainAngle) ⁇ (2 ⁇ standard angle-AngleY zyx -AngleY′ zyx ).
  • the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
  • the two angle calculation methods (the angle calculation method in Embodiment 1 and the angle calculation method in Embodiment 2) can be stored in the controller at the same time, so that the rehabilitation engineer or the user can select and use according to actual needs.
  • the angle calculation method of the initial position is still the angle calculation method using the standard position.
  • This embodiment provides another possible implementation manner for calculating the angle of the joint.
  • the structure of the measurement system is basically the same as that of the embodiment 1, as shown in FIG. 4, except that the controller in this embodiment specifically includes Euler.
  • the knee joint angle is taken as an example.
  • the attitude sensor A and the attitude sensor B are both fixed on the front or the back of the trained thigh and calf.
  • the posture sensor body When in the standard standing position, the posture sensor body The Y-axis of the coordinate system coincides with the Z-axis of the INS coordinate system (that is, the northeast celestial coordinate system), and the Z-axis is perpendicular to the large and small legs, and the direction is perpendicular to the left-right direction of the human body, so that when the patient makes a standing position, a sitting position, and a supine position
  • the angle of the knee joint is expressed on the X-axis or the Y-axis.
  • the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively.
  • the formula conversion process of the Euler angle conversion unit is basically the same as that in Embodiment 1, and details are not described herein again.
  • the fourth calculating unit calculates TwoSensorAngle by the following formula:
  • TwoSensorAngle 180°-
  • the first temporary angle TempAngle1 is obviously not in the effective range, and the value needs to be effectively processed. Specifically:
  • the fourth calculation unit calculates the first temporary angle TempAngle1 by the following formula:
  • TempAngle1 AngleXA zyx -AngleXB zyx .
  • the third determining unit determines whether
  • the alarm module is further configured to determine whether the target joint angle is within the target angle threshold, and issue a prompt message when the determination is negative.
  • the measuring system of the embodiment is suitable for measuring the angle of the joint of the patient to perform the lateral position action
  • the posture sensor can be disposed at the front or the back of the training part (the Z axis of the body coordinate system of the posture sensor is perpendicular to the size leg, and the direction Vertically to the left and right direction of the human body, they may also be disposed on the side of the training site (the Z axis of the body coordinate system of the attitude sensor is perpendicular to the size leg and the direction is parallel to the left and right direction of the human body).
  • the structure of the measurement system is substantially the same as any of the above embodiments, as shown in FIG. 5, except that the controller of the present embodiment includes a Euler angle conversion unit 21, a fifth calculation unit 225, and a fourth determination unit 234.
  • the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively.
  • the formula conversion process of the Euler angle conversion unit is basically the same as any of the above embodiments, and details are not described herein again.
  • the fifth computing unit calculates TwoSensorAngle by:
  • TwoSensorAngle 180°-
  • the second temporary angle TempAngle2 is obviously not in the effective range, and the value needs to be effectively processed. Specifically:
  • the fifth calculating unit calculates the second temporary angle TempAngle2 by the following formula:
  • TempAngle2 AngleZA zyx -AngleZB zyx .
  • the fourth determining unit determines whether
  • the fifth calculation unit performs fault tolerance processing on the joint angle by the following formula to obtain the target joint angle TwoSensorAngle':
  • the measuring system of the embodiment is suitable for the case where the initial posture is different by 90° on the Z axis (the angular changes of the attitude sensor are not on the Z axis), and the structure of the measuring system is basically the same as any of the above embodiments, as shown in FIG. The difference is that, in this embodiment, the controller includes the Euler angle conversion unit 21, the sixth calculation unit 226, and the fifth determination unit 235.
  • the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively.
  • the formula conversion process of the Euler angle conversion unit is basically the same as any of the above embodiments, and details are not described herein again.
  • the posture sensor A is worn on the chest and the posture sensor B is worn on the lateral side of the thigh according to the actual movement and wearing condition, and the angle between the joints, that is, the angle between the two sensors is calculated.
  • angle AngleXA zyx desired performance on the attitude sensor A, in the performance of the posture sensor AngleYB zyx B.
  • the fifth determining unit determines whether there is a sensor in the vicinity of the singularity position, taking the attitude sensor B in the vicinity of the singular point of (ZYX) as an example, and the fifth determining unit determines whether
  • TwoSensorAngle 180°-
  • the compensation angle can be determined according to the actual situation, generally 90 °.
  • TwoSensorAngle 180°-
  • angle of AngleXB zxy ⁇ 90° is chosen according to the sign of AngleYB zyx of the singularity attachment.
  • TwoSensorAngle 180°-
  • FIG. 7 shows a measurement method of a rehabilitation exercise parameter, which is implemented by the measurement system of Embodiment 1, as shown in FIG. 7, the measurement method includes the following steps:
  • Step 110 The posture sensor acquires the quaternion of the posture of the training part and sends it to the controller.
  • Step 120 The controller converts the starting quaternion into Euler angle information of different rotation orders in the INS coordinate system.
  • Step 130 The controller calculates a primary angle and/or an offset angle and/or a rotation angle and/or a joint angle according to the Euler angle information.
  • the main angle is an angle between the projection of the training part on the first plane and the second plane;
  • the first plane is a plane in which the motion path of the standard motion of the rehabilitation motion is located, and the second plane is perpendicular to the first plane.
  • the offset angle is the angle between the projection of the training part on the second plane and the first plane. Taking the hip joint front movement as an example, the offset angle is the angle of the abduction direction inside the thigh.
  • the rotation angle is the angle change value of the training part on the Z axis of the inertial coordinate system. Taking the hip joint front motion as an example, the rotation angle is the difference angle between the training position and the initial position due to the rotation of the training part.
  • Step 140 Determine whether the main angle and/or the offset angle and/or the rotation angle and/or the joint angle are within respective preset ranges, and issue a prompt message when the judgment is no.
  • the prompt message can remind the patient to change the direction or magnitude of the motion when the patient's motion is not up to standard.
  • the prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation. Thereby, the patient is reminded when the patient's motion is not up to standard, and the direction or magnitude of the action needs to be changed.
  • the prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation.
  • the main angle is the main parameter for measuring the quality of the movement. Only when the main angle reaches the standard angle of the standard movement as much as possible, the quality of the rehabilitation training will be higher and the training effect will be better. Of course, you can also use two or three or four angle parameters to evaluate Whether the price of the patient's action is up to standard.
  • step 110 when calculating the offset angle and/or the offset angle and/or the rotation angle, step 110 specifically includes:
  • the attitude sensor acquires the starting quaternion of the posture of the training part and the current quaternion and sends it to the controller;
  • Step 120 specifically includes:
  • the controller converts the starting quaternion into at least two starting Euler angle information of different rotation orders in the INS coordinate system, and converting the current Quaternion into at least two different rotation orders in the INS coordinate system Two current Euler angle information.
  • Step 130 specifically includes:
  • the controller calculates a primary angle and/or an offset angle and/or a rotation angle based on the at least two initial Euler angle information and the at least two current Euler angle information.
  • the starting quaternion and the current quaternion are respectively converted into the first rotation order in the inertial coordinate system. a starting Euler angle information and first current Euler angle information, and a second starting Euler angle information and a second current Euler angle information of the second rotation sequence.
  • step 130 the step of calculating the main angle according to the at least two initial Euler angle information and the at least two current Euler angle information specifically includes:
  • Step 131-1 calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
  • Step 132-1 determining whether the estimated main angle is smaller than the angle threshold and estimating whether the main angle is smaller than the estimated offset angle. When the determination is yes, step 133-1 is performed; when the determination is no, step 133-1' is performed;
  • step 133-1 the estimated main angle is determined as the main angle.
  • Step 133-1' the main angle change value is calculated, and then step 135-1a' is performed.
  • the main angle change value in the second rotation order is calculated by the following formula:
  • Main angle change value second current nutation angle - second initial nutation angle
  • step 135-1a' the main angle is calculated by the following formula:
  • Main angle sign (estimated main angle) ⁇ max (
  • Figure 8b provides another possible implementation for calculating the main angle.
  • Figure 8b is substantially identical to the step flow of Figure 8a, except that step 134-1' is performed after step 133-1' in Figure 8b.
  • step 134-1' it is judged whether or not the main angle change value is equal to or smaller than 90°; when it is judged as YES, step 135-1a' is performed; when the determination is negative, step 135-1b' is executed.
  • step 135-1b' the main angle is calculated by the following formula:
  • Main angle sign (estimated main angle) ⁇ (2 ⁇ standard angle - first starting nutation angle - first current nutation angle).
  • the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
  • the first starting Euler angle information includes a first starting nutation angle
  • the first current Euler angle information includes a first current nutation angle
  • the second current Euler angle information includes a second current rotation angle
  • the angular information includes a second starting angle of rotation.
  • the estimated main angle is calculated by using the following formula in step 131-1:
  • Estimated main angle first current nutation angle - first initial nutation angle
  • the estimated offset angle is calculated by the following formula:
  • Estimated offset angle first current rotation angle - first starting rotation angle
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the second current Euler angle information further includes a second current rotation angle.
  • step 130 the step of calculating an offset angle according to at least two initial Euler angle information and at least two current Euler angle information specifically includes:
  • Step 131-2 determining whether the first current nutation angle is smaller than the second current nutation angle; when the determination is yes, step 132-2 is performed; if the determination is no, step 132-2' is performed;
  • step 132-2 the offset angle is calculated by the following formula:
  • Offset angle first current rotation angle - first starting rotation angle
  • step 132-2' the offset angle is calculated by the following formula:
  • Offset angle second current rotation angle -sign (second starting rotation angle) ⁇ 90°.
  • the first current Euler angle information further includes a first current rotation angle
  • the first starting Euler angle information further includes a first starting rotation angle
  • the second starting Euler angle information further includes a second starting rotation angle
  • the measurement method further includes:
  • Step 133-2 The offset angle is validated.
  • the formula is as follows:
  • Target offset angle offset angle - sign (offset angle - 180 °) ⁇ 360 °.
  • Rotation angle current angle of the training part on the Z axis of the inertial coordinate system - the starting angle of the training part on the Z axis of the inertial coordinate system.
  • step 110 when calculating the angle of the joint, step 110 specifically includes:
  • the two attitude sensors respectively acquire the first quaternion and the second quaternion of the posture of the training part.
  • the measuring method of the embodiment is suitable for measuring the joint angle of the patient in a training position such as standing position, sitting position, supine position, etc., and measuring the angle of the knee joint as an example, fixing the first posture sensor and the second posture sensor to the training.
  • a training position such as standing position, sitting position, supine position, etc.
  • the side of the thigh and the calf when the patient is in the standard standing position, the Y-axis of the body coordinate system of the attitude sensor coincides with the Z-axis of the inertial coordinate system (ie, the northeast sky coordinate system), and the Z-axis is perpendicular to the size leg, and The direction is parallel to the left and right direction of the human body.
  • Step 120 specifically includes:
  • the controller converts the first quaternion to at least two Euler angle information of different rotation orders in the inertial coordinate system, and converts the second quaternion to at least two of different rotation orders in the inertial coordinate system Euler angle information.
  • Step 130 specifically includes:
  • the controller calculates the joint angle of the training site based on at least four Euler angle information.
  • step 120 when calculating the joint angle, in step 120, the first quaternion number and the second quaternion number are respectively converted into the first Euler angle information and the second ou in the first rotation order in the inertial coordinate system. Pull angle information, and third Euler angle information of the second rotation order and fourth Europe Pull angle information;
  • step 130 includes:
  • Step 131-3 Determine whether the absolute value of the first chapter moving angle is smaller than the first threshold.
  • step 132-3a is performed; when the determination is yes, step 132-3b is performed;
  • Step 132-3a calculates the joint angle based on the third Euler angle information and the fourth Euler angle information.
  • step 132-3a includes:
  • the joint angle is calculated by the following formula:
  • the joint angle is calculated by the following formula:
  • Step 132-3b calculates the joint angle based on the first Euler angle information, the third Euler angle information, and the fourth Euler angle information.
  • step 132-3b includes:
  • Joint angle 180 ° -
  • the joint angle is calculated by the following formula:
  • Joint angle
  • the predicted angle the first chapter of the dynamic angle + sign (third chapter dynamic angle) ⁇ 90 °.
  • Embodiment 7 is basically the same as Embodiment 6, except that in this embodiment, one standard bit is defined for each rehabilitation exercise, that is, the standard position is used as the start bit, so that the estimation is calculated by the following formula in this embodiment.
  • Main angle and estimated offset angle are defined for each rehabilitation exercise, that is, the standard position is used as the start bit, so that the estimation is calculated by the following formula in this embodiment.
  • the estimated offset angle is calculated by the following formula:
  • Estimated offset angle first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • the estimation is calculated by the following formula Offset angle:
  • Estimated offset angle second current rotation angle -sign (first current nutation angle) ⁇ 90 °;
  • the first current Euler angle information further includes a first current rotation angle
  • the first starting Euler angle information further includes a first starting rotation angle
  • the second current Euler angle information further includes a second current nutation angle
  • a second The current Euler angle information also includes a second current rotation angle.
  • the main angle change value in the second rotation sequence is calculated by the following formula:
  • the main angle change value the second current nutation angle ⁇ 90 °.
  • the offset angle when determining that the first current nutation angle is smaller than the second current nutation angle, the offset angle is calculated by the following formula:
  • Offset angle first current rotation angle -sign (first starting rotation angle) ⁇ 90 °;
  • the offset angle is calculated by the following formula:
  • Offset angle second current rotation angle -sign (second starting rotation angle) ⁇ 90 °;
  • the second starting Euler angle information includes a second starting rotation angle.
  • the embodiment 8 is basically the same as the embodiment 6.
  • An attitude sensor and a second attitude sensor are fixed on the front or the back of the thigh and the lower leg.
  • the Y coordinate of the body coordinate system of the attitude sensor and the Z coordinate system that is, the northeast sky coordinate system
  • Z that is, the northeast sky coordinate system
  • the axes coincide, the Z axis is perpendicular to the size of the legs, and the direction is perpendicular to the left and right direction of the human body.
  • step 120 the first quaternion number and the second quaternion number are respectively converted into the third Euler angle information and the fourth Euler angle information in the second rotation order in the inertial coordinate system.
  • step 130 specifically includes:
  • Step 131-4 calculate the joint angle by the following formula:
  • Step 132-4 calculating the first temporary angle by the following formula:
  • Step 133-4 Determine whether the absolute value of the first temporary angle is greater than a second threshold.
  • step 134-4 is performed.
  • step 140 is performed.
  • step 134-4 the joint angle is subjected to fault tolerance processing by the following formula to obtain the target joint angle:
  • Target joint angle 180° -
  • step 140 it is determined whether the joint angle or the target joint angle is within a respective preset range, and a prompt message is issued when the judgment is negative.
  • the measuring method of the present embodiment is applicable to the measurement of the angle of the joint when the patient is in the lateral position.
  • the measurement procedure is basically the same as that in the embodiment 8, as shown in FIG. 12, except that the step 130 specifically includes:
  • Step 131-5 calculate the joint angle by the following formula:
  • Joint angle 180° -
  • Step 132-5 calculating the second temporary angle by the following formula:
  • Second temporary angle
  • Step 133-5 Determine whether the absolute value of the second temporary angle is greater than a second threshold. When the determination is yes, step 134-5 is performed; if the determination is no, step 140 is performed.
  • step 134-5 the joint angle is subjected to fault tolerance processing by the following formula to obtain the target joint angle:
  • Target joint angle 180° -
  • the measurement system of the present embodiment is suitable for the case where the initial posture is different by 90° on the Z axis (the angle change of the attitude sensor is not on the Z axis), and the angle between the lumbar joint and the thigh is calculated as an example, and the attitude sensor A is required. Wearing on the chest, the posture sensor B is worn on the lateral side of the thigh.
  • the measurement method of the embodiment is substantially the same as that of the embodiment 6, as shown in FIG. 13 , except that the step of calculating the angle of the joint in step 130 specifically includes:
  • Step 131-6 Determine whether the absolute value of the second chapter moving angle is smaller than the first threshold.
  • step 132-6 is performed; if the determination is yes, step 133-6 is performed.
  • step 132-6 the joint angle is calculated by the following formula:
  • Joint angle 180° -
  • Step 133-6 calculating the joint angle by the following formula:
  • Joint angle 180 ° -

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Dentistry (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Physiology (AREA)
  • Rehabilitation Tools (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

Provided is a rehabilitation exercise parameter measurement system. The measurement system comprises: a gesture sensor and a controller, wherein the gesture sensor is fixed to a training part for a human body rehabilitation exercise; the gesture sensor is used for acquiring a quaternion of a gesture of the training part and sending same to the controller; and the controller is used for converting the quaternion into Euler angle information of different rotation orders under an inertial navigation coordinate system, and calculating the rehabilitation exercise parameters according to the Euler angle information. In the present invention, on the basis of a gesture quaternion, Euler angles of multiple rotation orders are fused to calculate rehabilitation exercise parameters, thereby avoiding a singular point, so that an exercise angle of a training part of a patient can be accurately represented, which has a special meaning for determining the motion quality and a motion error of the patient and learning about an initial stance habit of the patient.

Description

康复运动参数的测量系统及方法Measuring system and method for rehabilitation exercise parameters
本申请要求申请日为2017年11月6日的中国专利申请CN201711080208.9和CN201711079127.7的优先权。本申请引用上述中国专利申请的全文。This application claims priority from Chinese patent application CN201711080208.9 and CN201711079127.7 on November 6, 2017. This application cites the entire text of the above-mentioned Chinese patent application.
技术领域Technical field
本发明涉及运动角度测量领域,特别涉及一种康复运动参数的测量系统及方法。The invention relates to the field of motion angle measurement, in particular to a measurement system and method for rehabilitation motion parameters.
背景技术Background technique
目前,骨科或神经科患者在术后进行关节康复锻炼时,一般通过观看标准动作来跟随做康复运动或在医生(康复师)的指导下做指定的康复动作。在这过程中,医生或患者通过主观感受来判断患者做出的康复动作是否达到要求,这种主观判断的方式不能准确判断康复动作是否达到预期的标准,会影响患者康复训练的恢复效果和进度。At present, in orthopedic or neurological patients undergo joint rehabilitation exercises after surgery, generally by watching standard movements to follow the rehabilitation exercise or under the guidance of a doctor (healer) to perform the specified rehabilitation actions. In this process, the doctor or patient judges whether the rehabilitation action made by the patient meets the requirements through subjective feelings. This method of subjective judgment cannot accurately determine whether the rehabilitation action meets the expected standard, and will affect the recovery effect and progress of the patient's rehabilitation training. .
现有技术中,也有通过检测患者做出的康复动作的运动角度实现对患者的运动进行分析。当前运动角度计算方法一般有三种:(1)直接根据加速度在惯导坐标系或机体坐标系的具体值(三个方向)来计算姿态角度,然后根据角度差值来量化运动角度;然而,当处于高频运动时,使用该方法计算的姿态角的稳定性很差,当处于奇点位置时,只能反应两个方向的角度,当运动角度较大时,由该姿态角计算的角度差值与实际的运动角度有明显差异;(2)直接使用四元数(即四维空间向量)或旋转矩阵计算空间夹角;然而,直接计算空间夹角容易引入非主运动方向的运动角度误差;例如:作髋关节前驱运动时,如果伴随有旋转或内外偏,则空间角会把这些非主运动方向的运动角包含在内,导致计算出的角度误差较大;(3)直接使用俯仰角、翻滚角、航向角进行差运算;然而,该计算方法同样存在奇异点,不适用于任意姿态的运动角度的计算。In the prior art, the movement of the patient is also analyzed by detecting the angle of movement of the healing action made by the patient. There are generally three methods for calculating the current motion angle: (1) Calculate the attitude angle directly according to the specific value of the acceleration in the inertial coordinate system or the body coordinate system (three directions), and then quantify the motion angle according to the angle difference; however, when When in high-frequency motion, the stability of the attitude angle calculated by this method is very poor. When it is in the singularity position, it can only reflect the angle in two directions. When the motion angle is large, the angle difference calculated from the attitude angle is The value is significantly different from the actual motion angle; (2) directly using the quaternion (ie, the four-dimensional space vector) or the rotation matrix to calculate the spatial angle; however, directly calculating the spatial angle easily introduces the motion angle error in the non-main motion direction; For example, when performing hip frontal motion, if there is a rotation or an internal or external deviation, the spatial angle will include the movement angles of these non-main motion directions, resulting in a large calculated angular error; (3) directly using the elevation angle The roll angle and the heading angle are used for the difference calculation; however, the calculation method also has a singular point and is not suitable for the calculation of the motion angle of an arbitrary posture.
发明内容Summary of the invention
本发明要解决的技术问题是为了克服现有技术中关节夹角的计算方式误差较大的缺陷,提供一种 关节夹角的测量系统及方法。The technical problem to be solved by the present invention is to overcome the defect that the calculation method of the joint angle of the joint is large in the prior art, and to provide a defect. Measuring system and method for joint angle.
本发明提供一种康复运动参数的测量系统,所述测量系统包括:姿态传感器和控制器;The invention provides a measurement system for rehabilitation exercise parameters, the measurement system comprising: an attitude sensor and a controller;
所述姿态传感器固定于人体康复运动的训练部位;所述姿态传感器用于获取所述训练部位的姿态的四元数并发送至所述控制器;The posture sensor is fixed to a training part of a human rehabilitation exercise; the posture sensor is configured to acquire a quaternion of the posture of the training part and send the quaternion to the controller;
所述控制器用于将所述四元数转换为惯导坐标系下的不同旋转顺序的欧拉角信息,并根据所述欧拉角信息计算所述康复运动参数。The controller is configured to convert the quaternion into Euler angle information of different rotation orders in an inertial coordinate system, and calculate the rehabilitation motion parameter according to the Euler angle information.
优选地,所述康复运动参数包括:主角度和/或偏移角度和/或旋转角度;Preferably, the rehabilitation motion parameters include: a primary angle and/or an offset angle and/or a rotation angle;
第一姿态传感器用于获取所述训练部位的姿态的起始四元数和当前四元数并发送至所述控制器;The first attitude sensor is configured to acquire a starting quaternion and a current quaternion of the posture of the training part and send the same to the controller;
所述控制器用于将所述起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将所述当前四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个当前欧拉角信息,并根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度和/或偏移角度和/或旋转角度;The controller is configured to convert the starting quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and convert the current quaternion into an inertial coordinate system Calculating the primary angle and/or offset based on the at least two initial Euler angle information and the at least two current Euler angle information Angle and/or angle of rotation;
所述主角度为所述训练部位在第一平面上的投影与第二平面之间的夹角;所述第一平面为康复运动的标准动作的运动轨迹所在的平面,所述第二平面与所述第一平面垂直;The main angle is an angle between a projection of the training site on a first plane and a second plane; the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
所述偏移角度为所述训练部位在所述第二平面上的投影与所述第一平面之间的夹角;The offset angle is an angle between a projection of the training portion on the second plane and the first plane;
所述旋转角度为所述训练部位在所述惯导坐标系的Z轴上的角度变化值。The rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
优选地,所述控制器包括欧拉角转换单元、第一计算单元和第一判断单元;Preferably, the controller includes an Euler angle conversion unit, a first calculation unit, and a first determination unit;
所述欧拉角转换单元将所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;The Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
当计算所述主角度时,所述第一计算单元根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;When calculating the main angle, the first calculating unit calculates an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
所述第一判断单元用于在判断所述预估主角度小于角度阈值且所述预估主角度小于所述预估偏移角度时,将所述预估主角度确定为主角度;否则,调用所述第一计算单元; The first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
所述第一计算单元还用于通过如下公式计算第二旋转顺序下的主角度变化值:The first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
主角度变化值=第二当前章动角-第二起始章动角;Main angle change value = second current nutation angle - second initial nutation angle;
所述第一计算单元还用于通过如下公式计算主角度:The first calculation unit is further configured to calculate a main angle by the following formula:
主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
或,所述第一计算单元还用于在所述主角度变化值大于90°时,通过如下公式计算主角度:Or the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
优选地,预估主角度=第一当前章动角-第一起始章动角;Preferably, the estimated main angle = the first current nutation angle - the first initial nutation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the first calculating unit specifically calculates the estimated offset angle by the following formula:
预估偏移角度=第一当前自转角-第一起始自转角;Estimated offset angle = first current rotation angle - first starting rotation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the first calculation unit Calculate the estimated offset angle by the following formula:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
所述第一起始欧拉角信息包括第一起始章动角,所述第一当前欧拉角信息包括第一当前章动角,所述第二当前欧拉角信息包括第二当前章动角和第二当前自转角,所述第二起始欧拉角信息包括第二起始章动角。The first initial Euler angle information includes a first initial nutation angle, the first current Euler angle information includes a first current nutation angle, and the second current Euler angle information includes a second current nutation angle And the second current rotation angle, the second starting Euler angle information includes a second initial nutation angle.
优选地,当计算所述主角度时,所述控制器包括欧拉角转换单元、第一计算单元和第一判断单元;Preferably, when calculating the main angle, the controller includes an Euler angle conversion unit, a first calculation unit, and a first determination unit;
所述欧拉角转换单元将所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;The Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
所述第一计算单元根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;The first calculating unit calculates an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
所述第一判断单元用于在判断所述预估主角度小于角度阈值且所述预估主角度小于所述预估偏移角度时,将所述预估主角度确定为主角度;否则,调用所述第一计算单元; The first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
所述第一计算单元还用于通过如下公式计算第二旋转顺序下的主角度变化值:The first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
主角度变化值=第二当前章动角±90°;The main angle change value = the second current nutation angle ± 90 °;
所述第一计算单元还用于通过如下公式计算主角度:The first calculation unit is further configured to calculate a main angle by the following formula:
主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
或,所述第一计算单元还用于在所述主角度变化值大于90°时,通过如下公式计算主角度:Or the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
优选地,预估主角度=第一当前章动角;Preferably, the estimated main angle = the first current nutation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the first calculating unit specifically calculates the estimated offset angle by the following formula:
预估偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Estimated offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the first calculation unit Calculate the estimated offset angle by the following formula:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
所述第一当前欧拉角信息包括第一当前自转角和第一当前章动角,所述第一起始欧拉角信息包括第一起始自转角和第一起始章动角,所述第二当前欧拉角信息包括第二当前自转角和第二当前章动角。The first current Euler angle information includes a first current rotation angle and a first current nutation angle, and the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle, the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
优选地,当计算偏移角度时,所述第一判断单元还用于判断第一当前章动角是否小于第二当前章动角;Preferably, when calculating the offset angle, the first determining unit is further configured to determine whether the first current nutation angle is smaller than the second current nutation angle;
在所述第一判断单元判断为是时,所述第一计算单元通过如下公式计算偏移角度:When the first determining unit determines YES, the first calculating unit calculates the offset angle by the following formula:
偏移角度=第一当前自转角-第一起始自转角;Offset angle = first current rotation angle - first starting rotation angle;
或,所述第一计算单元通过如下公式计算偏移角度:Or, the first calculating unit calculates the offset angle by the following formula:
偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
在所述第一判断单元判断为否时,所述第一计算单元通过如下公式计算偏移角度:When the first determining unit determines NO, the first calculating unit calculates the offset angle by the following formula:
偏移角度=第二当前自转角-sign(第二起始自转角)×90°;Offset angle = second current rotation angle -sign (second starting rotation angle) × 90 °;
所述第一起始欧拉角信息还包括第一起始自转角,所述第二起始欧拉角信息还包括第二起始自转 角。The first starting Euler angle information further includes a first starting rotation angle, and the second starting Euler angle information further includes a second starting rotation angle.
优选地,所述康复运动参数包括:关节夹角;Preferably, the rehabilitation exercise parameter comprises: an angle of joint;
第二姿态传感器用于获取所述训练部位的姿态的第一四元数并发送至所述控制器;The second attitude sensor is configured to acquire a first quaternion of the posture of the training part and send the same to the controller;
所述控制器用于将所述第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息;The controller is configured to convert the first quaternion to at least two Euler angle information of different rotation orders in an inertial coordinate system;
第三姿态传感器用于获取所述训练部位的姿态的第二四元数并发送至所述控制器;The third attitude sensor is configured to acquire a second quaternion of the posture of the training part and send the same to the controller;
所述控制器还用于将所述第二四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个欧拉角信息;The controller is further configured to convert the second quaternion to at least two Euler angle information of the different rotation order in an inertial coordinate system;
所述控制器还用于根据至少四个欧拉角信息计算所述训练部位的关节夹角。The controller is further configured to calculate a joint angle of the training portion based on the at least four Euler angle information.
优选地,所述控制器包括欧拉角转换单元、第二计算单元、第三计算单元和第二判断单元;Preferably, the controller comprises an Euler angle conversion unit, a second calculation unit, a third calculation unit and a second determination unit;
当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
所述第二判断单元用于判断第一章动角的绝对值是否小于第一阈值;在判断为否时,调用所述第二计算单元;在判断为是时,调用所述第三计算单元;The second determining unit is configured to determine whether an absolute value of the first chapter moving angle is smaller than a first threshold; when the determination is no, the second calculating unit is called; when the determination is yes, the third calculating unit is called ;
所述第二计算单元具体用于在第一章动角和第二章动角的乘积大于0时,通过如下公式计算关节夹角:The second calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is greater than 0:
关节夹角=180°-|第三章动角-第四章动角|;Joint angle = 180 ° - | Chapter 3 Dynamic angle - Chapter 4 dynamic angle |
所述第二计算单元具体还用于在第一章动角和第二章动角的乘积小于0时,通过如下公式计算关节夹角:The second calculating unit is further configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is less than 0:
关节夹角=|第三章动角+第四章动角|;Joint angle =|Chapter 3 moving angle + fourth chapter moving angle|;
所述第三计算单元具体用于在预估角与第四章动角的乘积大于0时,通过如下公式计算关节夹角:The third calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the predicted angle and the fourth chapter moving angle is greater than zero:
关节夹角=180°-|第一章动角+sign(第三章动角)×90°-第四章动角|;Joint angle = 180 ° -|Chapter 1 moving angle + sign (third chapter moving angle) × 90 ° - Chapter 4 moving angle |
所述第三计算单元具体还用于在预估角与第四章动角的乘积小于0时,通过如下公式计算关节夹 角:The third calculating unit is further configured to calculate the joint clip by the following formula when the product of the predicted angle and the fourth chapter moving angle is less than 0. angle:
关节夹角=|第一章动角+sign(第三章动角)×90°+第四章动角|;Joint angle =|Chapter 1 moving angle +sign (third chapter moving angle)×90°+fourth chapter moving angle|;
其中,预估角=第一章动角+sign(第三章动角)×90°;Among them, the predicted angle = the first chapter moving angle + sign (third chapter moving angle) × 90 °;
所述第一欧拉角信息包括第一章动角,所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三章动角,所述第四欧拉角信息包括第四章动角。The first Euler angle information includes a first nutation angle, the second Euler angle information includes a second nutation angle, and the third Euler angle information includes a third nutation angle, the fourth Europe The pull angle information includes the fourth chapter dynamic angle.
优选地,所述控制器包括欧拉角转换单元和第四计算单元;Preferably, the controller comprises an Euler angle conversion unit and a fourth calculation unit;
当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
所述第四计算单元用于通过如下公式计算关节夹角:The fourth calculation unit is configured to calculate an angle of joint by the following formula:
关节夹角=180°-|第三自转角-第四自转角|;Joint angle = 180° - | third rotation angle - fourth rotation angle |
所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四自转角;The third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth rotation angle;
优选地,所述控制器还包括第三判断单元;Preferably, the controller further includes a third determining unit;
所述第四计算单元还用于通过如下公式计算第一临时角:The fourth calculating unit is further configured to calculate the first temporary angle by the following formula:
第一临时角=|第三自转角-第四自转角|;First temporary angle=|third rotation angle-fourth rotation angle|;
所述第三判断单元还用于判断所述第一临时角的绝对值是否大于第二阈值,并在判断为是时,调用所述第四计算单元;The third determining unit is further configured to determine whether an absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, invoke the fourth calculating unit;
所述第四计算单元还用于通过如下公式计对所述关节夹角进行容错处理,以得到目标关节夹角:The fourth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
目标关节夹角=180°-|第一临时角-sign(第一临时角)×360°|。Target joint angle = 180° - | first temporary angle - sign (first temporary angle) × 360 ° |.
优选地,所述控制器包括欧拉角转换单元和第五计算单元;Preferably, the controller comprises an Euler angle conversion unit and a fifth calculation unit;
当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
所述第五计算单元用于通过如下公式计算关节夹角:The fifth calculation unit is for calculating an angle of joint by the following formula:
关节夹角=180°-|第三进动角-第四进动角|;Joint angle = 180° - | third precession angle - fourth precession angle |
所述第三欧拉角信息包括第三进动角,所述第四欧拉角信息包括第四进动角; The third Euler angle information includes a third precession angle, and the fourth Euler angle information includes a fourth precession angle;
优选地,所述控制器还包括第四判断单元;Preferably, the controller further includes a fourth determining unit;
所述第五计算单元还用于通过如下公式计算第二临时角:The fifth calculating unit is further configured to calculate the second temporary angle by the following formula:
第二临时角=|第三进动角-第四进动角|;Second temporary angle =|third precession angle - fourth precession angle|;
所述第四判断单元还用于判断所述第二临时角的绝对值是否大于第二阈值;The fourth determining unit is further configured to determine whether an absolute value of the second temporary angle is greater than a second threshold;
在所述第四判断单元判断为是时,所述第五计算单元还用于通过如下公式对所述关节夹角进行容错处理,以得到目标关节夹角:When the fourth determining unit determines YES, the fifth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
目标关节夹角=180°-|第二临时角-sign(第二临时角)×360°|。Target joint angle = 180° - | second temporary angle - sign (second temporary angle) × 360 ° |.
优选地,所述控制器包括欧拉角转换单元、第五判断单元和第六计算单元;Preferably, the controller comprises an Euler angle conversion unit, a fifth determination unit and a sixth calculation unit;
当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
所述第五判断单元还用于判断所述第二章动角的绝对值是否小于第一阈值;The fifth determining unit is further configured to determine whether an absolute value of the second chapter moving angle is smaller than a first threshold;
在所述第五判断单元判断为否时,所述第六计算单元通过如下公式计算关节夹角:When the fifth determining unit determines NO, the sixth calculating unit calculates the joint angle by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第四章动角)|;Joint angle = 180° - | third rotation angle - (compensation angle + fourth chapter dynamic angle) |;
在所述第五判断单元判断为是时,所述第六计算单元还用于通过如下公式计算关节夹角:When the fifth determining unit determines YES, the sixth calculating unit is further configured to calculate the joint angle by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第二章动角±90°)|;Joint angle = 180° - | third rotation angle - (compensation angle + second chapter movement angle ± 90 °) |
所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四章动角。The second Euler angle information includes a second chapter angle, the third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth chapter movement angle.
本发明还提供一种康复运动参数的测量方法,所述测量方法利用上述的测量系统实现,所述测量方法包括以下步骤:The present invention also provides a method for measuring a rehabilitation exercise parameter, the measurement method being implemented using the above-described measurement system, the measurement method comprising the following steps:
S1、所述姿态传感器获取所述训练部位的姿态的四元数并发送至所述控制器;Quaternion S 1, the sensor acquires the posture of the posture of the training site and sent to the controller;
S2、所述控制器将所述四元数转换为惯导坐标系下的不同旋转顺序的欧拉角信息;S 2 , the controller converts the quaternion into Euler angle information of different rotation orders in an inertial coordinate system;
S3、所述控制器根据所述欧拉角信息计算所述康复运动参数。S 3 , the controller calculates the rehabilitation motion parameter according to the Euler angle information.
优选地,所述康复运动参数包括:偏移角度和/或偏移角度和/或旋转角度; Preferably, the rehabilitation motion parameters include: an offset angle and/or an offset angle and/or a rotation angle;
步骤S1具体包括:Step S 1 comprises:
第一姿态传感器获取所述训练部位的姿态的起始四元数和当前四元数并发送至所述控制器;The first attitude sensor acquires a starting quaternion and a current quaternion of the posture of the training part and sends the same to the controller;
步骤S2具体包括:Step S 2 comprises:
所述控制器将所述起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将所述当前四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个当前欧拉角信息;The controller converts the initial quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and converts the current quaternion into an inertial coordinate system At least two current Euler angle information of the different rotation order;
步骤S3具体包括:Step S 3 comprises:
所述控制器根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度和/或偏移角度和/或旋转角度;The controller calculates the primary angle and/or the offset angle and/or the rotation angle according to the at least two initial Euler angle information and the at least two current Euler angle information;
所述主角度为所述训练部位在第一平面上的投影与第二平面之间的夹角;所述第一平面为康复运动的标准动作的运动轨迹所在的平面,所述第二平面与所述第一平面垂直;The main angle is an angle between a projection of the training site on a first plane and a second plane; the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
所述偏移角度为所述训练部位在所述第二平面上的投影与所述第一平面之间的夹角;The offset angle is an angle between a projection of the training portion on the second plane and the first plane;
所述旋转角度为所述训练部位在所述惯导坐标系的Z轴上的角度变化值。The rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
优选地,步骤S2中,所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;Preferably, the step S 2, the initial and the current quaternion quaternion rotation are converted into a first sequence in a first coordinate system INS start information and the first current Euler angles Euler angles Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度的步骤具体包括:Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
S31-1、根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;S 31-1 , calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
S32-1、判断所述预估主角度是否小于角度阈值且所述预估主角度是否小于所述预估偏移角度;在判断为是时,执行步骤S33-1;在判断为否时,执行步骤S33-1’; S32-1 , determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S33-1 ; When performing step S 33-1 ';
S33-1、将所述预估主角度确定为主角度;S 33-1 , determining the estimated main angle as a main angle;
S33-1’、通过如下公式计算第二旋转顺序下的主角度变化值:S 33-1 ', calculate the main angle change value in the second rotation sequence by the following formula:
主角度变化值=第二当前章动角-第二起始章动角; Main angle change value = second current nutation angle - second initial nutation angle;
S34-1’、通过如下公式计算主角度:S 34-1 ', calculate the main angle by the following formula:
主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
或,在所述主角度变化值大于90°时,通过如下公式计算主角度:Or, when the main angle change value is greater than 90°, the main angle is calculated by the following formula:
主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
优选地,步骤S31-1中具体通过如下公式计算预估主角度:Preferably, the estimated main angle is calculated in the step S 31-1 by the following formula:
预估主角度=第一当前章动角-第一起始章动角;Estimated main angle = first current nutation angle - first initial nutation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the estimated offset angle is calculated by the following formula:
预估偏移角度=第一当前自转角-第一起始自转角;Estimated offset angle = first current rotation angle - first starting rotation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the specific formula is calculated by the following formula Estimate the offset angle:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
所述第一起始欧拉角信息包括第一起始章动角,所述第一当前欧拉角信息包括第一当前章动角,所述第二当前欧拉角信息包括第二当前章动角和第二当前自转角,所述第二起始欧拉角信息包括第二起始章动角。The first initial Euler angle information includes a first initial nutation angle, the first current Euler angle information includes a first current nutation angle, and the second current Euler angle information includes a second current nutation angle And the second current rotation angle, the second starting Euler angle information includes a second initial nutation angle.
优选地,步骤S2中,所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;Preferably, the step S 2, the initial and the current quaternion quaternion rotation are converted into a first sequence in a first coordinate system INS start information and the first current Euler angles Euler angles Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度的步骤具体包括:Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
S31-2、根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;S 31-2 , calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
S32-2、判断所述预估主角度是否小于角度阈值且所述预估主角度是否小于所述预估偏移角度;在判断为是时,执行步骤S23-3;在判断为否时,执行步骤S33-2’; S32-2 , determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S23-3 ; When performing step S33-2 ';
S33-2、将所述预估主角度确定为主角度;S 33-2 , determining the estimated main angle as a main angle;
S33-2’、通过如下公式计算第二旋转顺序下的主角度变化值:S 33-2 ', calculate the main angle change value in the second rotation order by the following formula:
主角度变化值=第二当前章动角±90°;The main angle change value = the second current nutation angle ± 90 °;
S34-2’、通过如下公式计算主角度:S 34-2 ', calculate the main angle by the following formula:
主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
或,在所述主角度变化值大于90°时,通过如下公式计算主角度:Or, when the main angle change value is greater than 90°, the main angle is calculated by the following formula:
主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
优选地,步骤S31-2中具体通过如下公式计算预估主角度:Preferably, the estimated main angle is calculated in step S 31-2 by the following formula:
预估主角度=第一当前章动角;Estimated main angle = first current nutation angle;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the estimated offset angle is calculated by the following formula:
预估偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Estimated offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the specific formula is calculated by the following formula Estimate the offset angle:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
所述第一当前欧拉角信息包括第一当前自转角和第一当前章动角,所述第一起始欧拉角信息包括第一起始自转角和第一起始章动角,所述第二当前欧拉角信息包括第二当前自转角和第二当前章动角。The first current Euler angle information includes a first current rotation angle and a first current nutation angle, and the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle, the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
优选地,步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述偏移角度的步骤具体包括:Preferably, the step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two information calculating Euler angles of the offset angle comprises:
S31-3、判断第一当前章动角是否小于第二当前章动角;在判断为是时,执行步骤S32-3;在判断为否时,执行步骤S32-3’;S 31-3 , determining whether the first current nutation angle is smaller than the second current nutation angle; when the determination is yes, executing step S32-3 ; when the determination is no, executing step S32-3 ';
S32-3、通过如下公式计算偏移角度:S 32-3 , calculate the offset angle by the following formula:
偏移角度=第一当前自转角-第一起始自转角;Offset angle = first current rotation angle - first starting rotation angle;
或,偏移角度=第一当前自转角-sign(第一起始自转角)×90°; Or, the offset angle = the first current rotation angle -sign (first starting rotation angle) × 90 °;
S32-4’、通过如下公式计算偏移角度:S 32-4 ', calculate the offset angle by the following formula:
偏移角度=第二当前自转角-sign(第二起始自转角)×90°;Offset angle = second current rotation angle -sign (second starting rotation angle) × 90 °;
所述第一起始欧拉角信息还包括第一起始自转角,所述第二起始欧拉角信息还包括第二起始自转角。The first starting Euler angle information further includes a first starting rotation angle, and the second starting Euler angle information further includes a second starting rotation angle.
优选地,所述康复运动参数包括:关节夹角;Preferably, the rehabilitation exercise parameter comprises: an angle of joint;
步骤S1具体包括:Step S 1 comprises:
所述第一姿态传感器获取所述训练部位的姿态的第一四元数,所述第二姿态传感器获取所述训练部位的姿态的第二四元数;The first attitude sensor acquires a first quaternion of the posture of the training part, and the second attitude sensor acquires a second quaternion of the posture of the training part;
步骤S2具体包括:Step S 2 comprises:
所述控制器将所述第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息,将所述第二四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个欧拉角信息;The controller converts the first quaternion into at least two Euler angle information of different rotation orders in an inertial coordinate system, and converts the second quaternion into the inertial coordinate system At least two Euler angle information for different rotation orders;
步骤S3具体包括:Step S 3 comprises:
所述控制器根据至少四个欧拉角信息计算所述训练部位的关节夹角。The controller calculates an angle of joint of the training site based on at least four Euler angle information.
优选地,步骤S2中,所述控制器将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;Preferably, the step S 2, the controller sets the first and the second quaternion quaternion rotation are converted into a first sequence in a first INS coordinates information and the Euler angles Two Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
根据至少四个欧拉角信息计算所述训练部位的关节夹角的步骤具体包括:The step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
S3-1a、判断第一章动角的绝对值是否小于第一阈值;在判断为否时,执行步骤S3-2a;在判断为是时,执行步骤S3-3aS 3-1a , determining whether the absolute value of the first chapter moving angle is smaller than the first threshold; when the determination is no, step S 3-2a is performed ; when the determination is YES, executing step S 3-3a ;
S3-2a、根据所述第三欧拉角信息和所述第四欧拉角信息计算所述关节夹角;S 3-2a , calculating the joint angle according to the third Euler angle information and the fourth Euler angle information;
S3-3a、根据所述第一欧拉角信息、所述第三欧拉角信息和所述第四欧拉角信息计算所述关节夹角;S 3-3a , calculating the joint angle according to the first Euler angle information, the third Euler angle information, and the fourth Euler angle information;
优选地,步骤S3-2a具体包括:Preferably, step S 3-2a specifically includes:
在第一章动角和第二章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
关节夹角=180°-|第三章动角-第四章动角|; Joint angle = 180 ° - | Chapter 3 Dynamic angle - Chapter 4 dynamic angle |
在第一章动角和第二章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
关节夹角=|第三章动角+第四章动角|;Joint angle =|Chapter 3 moving angle + fourth chapter moving angle|;
优选地,步骤S3-3a具体包括:Preferably, step S 3-3a specifically includes:
在预估角与第四章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
关节夹角=180°-|第一章动角+sign(第三章动角)×90°-第四章动角|;Joint angle = 180 ° -|Chapter 1 moving angle + sign (third chapter moving angle) × 90 ° - Chapter 4 moving angle |
在预估角与第四章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
关节夹角=|第一章动角+sign(第三章动角)×90°+第四章动角|;Joint angle =|Chapter 1 moving angle +sign (third chapter moving angle)×90°+fourth chapter moving angle|;
其中,预估角=第一章动角+sign(第三章动角)×90°;Among them, the predicted angle = the first chapter moving angle + sign (third chapter moving angle) × 90 °;
所述第一欧拉角信息包括第一章动角,所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三章动角,所述第四欧拉角信息包括第四章动角。The first Euler angle information includes a first nutation angle, the second Euler angle information includes a second nutation angle, and the third Euler angle information includes a third nutation angle, the fourth Europe The pull angle information includes the fourth chapter dynamic angle.
优选地,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;Preferably, the step S 2, the first and the second quaternion quaternion Euler angles are converted into the third information and the fourth information of the second Euler angle rotation sequence of the INS coordinates ;
根据至少四个欧拉角信息计算所述训练部位的关节夹角的步骤具体包括:The step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
S3-1b、通过如下公式计算关节夹角:S 3-1b , calculate the joint angle by the following formula:
关节夹角=180°-|第三自转角-第四自转角|;Joint angle = 180° - | third rotation angle - fourth rotation angle |
所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四自转角;The third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth rotation angle;
优选地,步骤S3-1b之后,还包括:Preferably, after step S3-1b , the method further includes:
S3-2b、通过如下公式计算第一临时角:S 3-2b , calculate the first temporary angle by the following formula:
第一临时角=|第三自转角-第四自转角|;First temporary angle=|third rotation angle-fourth rotation angle|;
S3-3b、判断所述第一临时角的绝对值是否大于第二阈值,并在判断为是时,执行步骤S3-4bS 3-3b , determining whether the absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, performing step S 3-4b ;
S3-4b、通过如下公式计对所述关节夹角进行容错处理,以得到目标关节夹角:S 3-4b , the fault angle of the joint angle is calculated by the following formula to obtain the target joint angle:
目标关节夹角=180°-|第一临时角-sign(第一临时角)×360°|。Target joint angle = 180° - | first temporary angle - sign (first temporary angle) × 360 ° |.
优选地,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息; Preferably, the step S 2, the first and the second quaternion quaternion Euler angles are converted into the third information and the fourth information of the second Euler angle rotation sequence of the INS coordinates ;
步骤S3具体包括:Step S 3 comprises:
S3-1c、通过如下公式计算关节夹角:S 3-1c , calculate the joint angle by the following formula:
关节夹角=180°-|第三进动角-第四进动角|;Joint angle = 180° - | third precession angle - fourth precession angle |
所述第三欧拉角信息包括第三进动角,所述第四欧拉角信息包括第四进动角;The third Euler angle information includes a third precession angle, and the fourth Euler angle information includes a fourth precession angle;
优选地,步骤S3-1c之后,还包括:Preferably, after step S3-1c , the method further includes:
S3-2c、通过如下公式计算第二临时角:S 3-2c , calculate the second temporary angle by the following formula:
第二临时角=|第三进动角-第四进动角|;Second temporary angle =|third precession angle - fourth precession angle|;
S3-3c、判断所述第二临时角的绝对值是否大于第二阈值;在判断为是时,执行步骤S3-4cS 3-3c , determining whether the absolute value of the second temporary angle is greater than a second threshold; when the determination is yes, performing step S 3-4c ;
S3-4c、通过如下公式对所述关节夹角进行容错处理,以得到目标关节夹角:S 3-4c , the joint angle is fault-tolerant by the following formula to obtain the target joint angle:
目标关节夹角=180°-|第二临时角-sign(第二临时角)×360°|。Target joint angle = 180° - | second temporary angle - sign (second temporary angle) × 360 ° |.
优选地,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;Preferably, the step S 2, the first and the second quaternion quaternion Euler angles are converted into the first information and the second information of the first Euler angle rotation sequence of the INS coordinates And third Euler angle information and fourth Euler angle information of the second rotation sequence;
步骤S3具体包括:Step S 3 comprises:
S3-1d、判断所述第二章动角的绝对值是否小于第一阈值;在判断为否时,执行步骤S3-2d;在判断为是时,执行步骤S3-3dS 3-1d , determining whether the absolute value of the second chapter moving angle is smaller than the first threshold; when the determination is no, step S 3-2d is performed ; when the determination is YES, executing step S 3-3d ;
S3-2d、通过如下公式计算关节夹角:S 3-2d , calculate the joint angle by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第四章动角)|;Joint angle = 180° - | third rotation angle - (compensation angle + fourth chapter dynamic angle) |;
S3-3d、通过如下公式计算关节夹角:S 3-3d , calculate the joint angle by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第二章动角±90°)|;Joint angle = 180° - | third rotation angle - (compensation angle + second chapter movement angle ± 90 °) |
所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四章动角。The second Euler angle information includes a second chapter angle, the third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth chapter movement angle.
本发明的积极进步效果在于:本发明在姿态四元数的基础上,对多旋转顺序下的欧拉角进行融合计算主角度,避免了奇异点,能准确表征患者的训练部位的运动角度,对于判定患者做出的动作质量、动作误差以及了解患者初始站位习惯有特殊意义。 The positive progress of the present invention is that the present invention combines the Euler angles in the multi-rotation order to calculate the main angle on the basis of the attitude quaternion, avoids the singular points, and can accurately represent the movement angle of the training part of the patient. It has special significance for judging the quality of the action made by the patient, the error of the movement, and understanding the initial position of the patient.
附图说明DRAWINGS
图1为本发明实施例1的康复运动参数的测量系统的结构示意图。1 is a schematic structural view of a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
图2为本发明实施例1的康复运动参数的测量系统中控制器的第一结构示意图。2 is a first schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
图3为本发明实施例1的康复运动参数的测量系统中控制器的第二结构示意图。3 is a second schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 1 of the present invention.
图4为本发明实施例3的康复运动参数的测量系统中控制器的结构示意图。4 is a schematic structural view of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 3 of the present invention.
图5为本发明实施例4的康复运动参数的测量系统中控制器的结构示意图。FIG. 5 is a schematic structural diagram of a controller in a measurement system for a rehabilitation exercise parameter according to Embodiment 4 of the present invention.
图6为本发明实施例5的康复运动参数的测量系统中控制器的结构示意图。6 is a schematic structural view of a controller in a measurement system for rehabilitation exercise parameters according to Embodiment 5 of the present invention.
图7为本发明实施例6的康复运动参数的测量方法的流程图。Fig. 7 is a flow chart showing a method of measuring a rehabilitation exercise parameter according to a sixth embodiment of the present invention.
图8a为本发明实施例6的康复运动参数的测量方法步骤130中计算主角度的第一流程图。FIG. 8a is a first flowchart of calculating a main angle in step 130 of the method for measuring rehabilitation exercise parameters according to Embodiment 6 of the present invention.
图8b为本发明实施例6的康复运动参数的测量方法步骤130中计算主角度的第二流程图。Figure 8b is a second flow chart for calculating the main angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the sixth embodiment of the present invention.
图9为本发明实施例6的康复运动参数的测量方法步骤130中计算偏移角度的流程图。Fig. 9 is a flow chart showing the calculation of the offset angle in the step 130 of the method for measuring the rehabilitation motion parameters according to the sixth embodiment of the present invention.
图10为本发明实施例6的康复运动参数的测量方法步骤130中计算关节角的流程图。Fig. 10 is a flow chart showing the calculation of the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the sixth embodiment of the present invention.
图11为本发明实施例8的康复运动参数的测量方法步骤130中计算关节角的流程图。Figure 11 is a flow chart for calculating the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the eighth embodiment of the present invention.
图12为本发明实施例9的康复运动参数的测量方法步骤130中计算关节角的流程图。Figure 12 is a flow chart for calculating the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the ninth embodiment of the present invention.
图13为本发明实施例10的康复运动参数的测量方法步骤130中计算关节角的流程图。Fig. 13 is a flow chart showing the calculation of the joint angle in the step 130 of the method for measuring the rehabilitation exercise parameters according to the tenth embodiment of the present invention.
具体实施方式Detailed ways
实施例1Example 1
本实施例的测量系统用于测量人体康复运动参数,康复运动参数包括以下参数中的至少一个:主角度、偏移角度、旋转角度和关节夹角。主角度为训练部位(四肢或躯干)在第一平面上的投影与第二平面之间的夹角;第一平面为康复运动的标准动作的运动轨迹所在的平面,第二平面与第一平面垂直。偏移角度为训练部位在第二平面上的投影与第一平面之间的夹角,以髋关节前驱运动为例,偏移角度即为大腿内外展方向的角度。旋转角度为训练部位在惯导坐标系的Z轴上的角度变化值,以髋关节前驱运动为例,旋转角度为训练部位因旋转引起的与初始位的差异角。 The measurement system of the present embodiment is for measuring a human rehabilitation exercise parameter, and the rehabilitation exercise parameter includes at least one of the following parameters: a main angle, an offset angle, a rotation angle, and a joint angle. The main angle is the angle between the projection of the training part (four limbs or the trunk) on the first plane and the second plane; the first plane is the plane of the motion path of the standard motion of the rehabilitation motion, the second plane and the first plane vertical. The offset angle is the angle between the projection of the training part on the second plane and the first plane. Taking the hip joint front movement as an example, the offset angle is the angle of the abduction direction inside the thigh. The rotation angle is the angle change value of the training part on the Z axis of the inertial coordinate system. Taking the hip joint front motion as an example, the rotation angle is the difference angle between the training position and the initial position due to the rotation of the training part.
需要说明的是,主角度或关节夹角是衡量动作质量的主要参数,只有主角度尽可能的达到标准动作的达标角度,康复训练质量才会更高,训练效果更好。当然,也可借助其中两个,或三个、四个运动参数来评价患者做出的动作是否达标。It should be noted that the main angle or the angle of the joint is the main parameter for measuring the quality of the movement. Only when the main angle reaches the standard angle of the standard movement as much as possible, the quality of the rehabilitation training will be higher and the training effect is better. Of course, two or three or four motion parameters can also be used to evaluate whether the action made by the patient is up to standard.
如图1所示,本实施例的测量系统包括:姿态传感器1、控制器2和报警器3。需要说明的是,计算主角度、偏移角度和旋转角度时,理论上需要一个姿态传感器就能实现计算,若设置多个姿态传感器则可对多个姿态传感器获得的结果求平均值或拟合。计算关节夹角需要至少两个姿态传感器。为了便于说明,本实施例中将计算主角度、偏移角度和旋转角度的姿态传感器称为第一姿态传感器,将计算关节夹角的姿态传感器称为第二姿态传感器和第三姿态传感器。本实施例中,姿态传感器具体可选用6轴或9轴传感器。As shown in FIG. 1, the measurement system of the present embodiment includes an attitude sensor 1, a controller 2, and an alarm 3. It should be noted that when calculating the main angle, the offset angle and the rotation angle, an attitude sensor is theoretically required to implement the calculation. If a plurality of attitude sensors are provided, the results obtained by the plurality of attitude sensors can be averaged or fitted. . At least two attitude sensors are required to calculate the angle of the joint. For convenience of explanation, in the present embodiment, the attitude sensor that calculates the main angle, the offset angle, and the rotation angle is referred to as a first attitude sensor, and the attitude sensor that calculates the angle of the joint is referred to as a second attitude sensor and a third attitude sensor. In this embodiment, the attitude sensor may specifically be a 6-axis or a 9-axis sensor.
一、以下介绍主角度、偏移角度和旋转角度的具体计算过程。First, the following describes the specific calculation process of the main angle, the offset angle and the rotation angle.
进行康复训练时,姿态传感器固定于人体康复运动的训练部位,以站立位髋关节前倾动作为例,则将姿态传感器固定于训练的大腿上。为了描述方便,假定姿态传感器佩戴于大腿的外侧面,当处于标准站立位时,姿态传感器的机体坐标系的Y轴与惯导坐标系(也即东北天坐标系)的Z轴重合。患者处于站立姿态时,姿态传感器获取训练部位的姿态的起始四元数(患者做出康复动作前的姿态的四元数),起始四元数坐标为Pos1(Q0,Q1,Q2,Q3)。患者做出髋关节运动时,姿态传感器实时获取训练部位的姿态的当前四元数(患者做出髋关节运动之后的姿态的四元数),当前四元数坐标为Pos2(Q0′,Q1′,Q2′,Q3′)。姿态传感器还用于将起始四元数和当前四元数发送至控制器。In the case of rehabilitation training, the posture sensor is fixed to the training part of the human body rehabilitation exercise, and the posture sensor is fixed on the training thigh by taking the standing hip joint forward motion as an example. For convenience of description, it is assumed that the posture sensor is worn on the outer side of the thigh, and when in the standard standing position, the Y-axis of the body coordinate system of the attitude sensor coincides with the Z-axis of the inertial coordinate system (that is, the northeast sky coordinate system). When the patient is in the standing posture, the posture sensor obtains the starting quaternion of the posture of the training part (the quaternion of the posture of the patient before the rehabilitation action), and the initial quaternion coordinate is Pos1 (Q0, Q1, Q2, Q3). ). When the patient makes hip joint motion, the attitude sensor obtains the current quaternion of the posture of the training part in real time (the quaternion of the posture of the patient after hip joint motion), and the current quaternion coordinate is Pos2 (Q0', Q1' , Q2', Q3'). The attitude sensor is also used to send the starting quaternion and the current quaternion to the controller.
如图2所示,控制器具体包括欧拉角转换单元21、第一计算单元221和第一判断单元231。控制器将姿态传感器获得的起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将当前四元数转换为惯导坐标系下的该不同旋转顺序的至少两个当前欧拉角信息,并根据至少两个起始欧拉角信息和两个当前欧拉角信息计算主角度和/或偏移角度和/或旋转角度。为了便于说明,选用ZYX和ZXY两个旋转顺序进行算法说明。As shown in FIG. 2, the controller specifically includes an Euler angle conversion unit 21, a first calculation unit 221, and a first determination unit 231. The controller converts the starting quaternion obtained by the attitude sensor into at least two initial Euler angle information of different rotation orders in the INS coordinate system, and converts the current quaternion into the difference in the INS coordinate system Rotating at least two current Euler angle information in sequence, and calculating a primary angle and/or an offset angle and/or a rotation angle based on the at least two starting Euler angle information and the two current Euler angle information. For the convenience of description, the two rotation sequences of ZYX and ZXY are used for the algorithm description.
欧拉角转换单元进行角度转换的公式如下:The formula for the angle conversion of the Euler angle conversion unit is as follows:
AngleXzyx=Atan2(2×(Q0×Q1+Q2×Q3),1-2×(Q1×Q1+Q2×Q2)); AngleX zyx = Atan2 (2 × (Q0 × Q1 + Q2 × Q3), 1-2 × (Q1 × Q1 + Q2 × Q2));
AngleYzyx=Asin(2×(Q0×Q2-Q3×Q1));AngleY zyx =Asin(2×(Q0×Q2-Q3×Q1));
AngleZzyx=Atan2(2×(Q0×Q3+Q1×Q2),1-2×(Q2×Q2+Q3×Q3));AngleZ zyx = Atan2 (2 × (Q0 × Q3 + Q1 × Q2), 1-2 × (Q2 × Q2 + Q3 × Q3));
AngleXzxy=Asin(2×(Q0×Q1+Q3×Q2));AngleX zxy = Asin (2 × (Q0 × Q1 + Q3 × Q2));
AngleYzxy=Atan2(2×(Q0×Q2-Q1×Q3),1-2×(Q1×Q1+Q2×Q2));AngleY zxy = Atan2 (2 × (Q0 × Q2 - Q1 × Q3), 1-2 × (Q1 × Q1 + Q2 × Q2));
AngleZzxy=Atan2(2×(Q0×Q3-Q1×Q2),1-2×(Q1×Q1+Q3×Q3));AngleZ zxy = Atan2 (2 × (Q0 × Q3 - Q1 × Q2), 1-2 × (Q1 × Q1 + Q3 × Q3));
其中,AngleXzyx(第一初始自转角)、AngleYzyx(第一初始章动角)和AngleZzyx(第一初始进动角)为惯导坐标系下的第一旋转顺序(ZYX)的第一起始欧拉角信息中包含的信息;AngleXzxy(第二初始章动角)、AngleYzxy(第二初始自转角)和AngleZzxy(第二初始进动角)为惯导坐标系下的第二旋转顺序(ZXY)的第二起始欧拉角信息中包含的信息。Among them, AngleX zyx (first initial rotation angle), AngleY zyx (first initial nutation angle) and AngleZ zyx (first initial precession angle) are the first of the first rotation order (ZYX) in the inertial coordinate system. Information contained in the initial Euler angle information; AngleX zxy (second initial nutation angle), AngleY zxy (second initial rotation angle), and AngleZ zxy (second initial precession angle) are the second in the inertial coordinate system The information contained in the second starting Euler angle information of the rotation order (ZXY).
同样,欧拉角转换单元根据Pos2(Q0′,Q1′,Q2′,Q3′)计算惯导坐标系下的第一旋转顺序(ZYX)的第一当前欧拉角信息,第一当前欧拉角信息包括AngleX′zyx(第一当前自转角)、AngleY′zyx(第一当前章动角)和AngleZ′zyx(第一当前进动角),惯导坐标系下的第二旋转顺序(ZXY)的第二当前欧拉角信息,第二当前欧拉角信息包括AngleX′zxy(第二当前章动角)、AngleY′zxy(第二当前自转角)和AngleZ′zxy(第二当前进动角)。Similarly, the Euler angle conversion unit calculates the first current Euler angle information of the first rotation order (ZYX) in the inertial coordinate system according to Pos2 (Q0', Q1', Q2', Q3'), the first current Euler angle The angular information includes AngleX' zyx (first current rotation angle), AngleY' zyx (first current nutation angle), and AngleZ' zyx (first current precession angle), and the second rotation order in the inertial coordinate system (ZXY) Second current Euler angle information, the second current Euler angle information includes AngleX' zxy (second current nutation angle), AngleY' zxy (second current rotation angle), and AngleZ' zxy (second current precession) angle).
(1)主角度的计算。(1) Calculation of the main angle.
主角度主要通过AngleYzyx、AngleY′zyx、AngleXzxy、AngleY′zxy和AngleX′zxy计算获得。The main angle is mainly calculated by AngleY zyx , AngleY' zyx , AngleX zxy , AngleY' zxy, and AngleX' zxy .
主角度在小于90°时,体现在第一旋转顺序(ZYX)下的欧拉角上,当跨越90°时,因为本身欧拉角的奇点限制,AngleY′zyx表现为先增大到90°再减小,而在第二旋转顺序(ZXY)下,主角度大于90°时,AngleX′zxy能很好的反映角度变化的情况,受偏转角影响较小。具体计算方法为:When the main angle is less than 90°, it is reflected in the Euler angle in the first rotation order (ZYX). When crossing 90°, AngleY′ zyx appears to increase to 90 first because of the singularity limit of its own Euler angle. ° Further decrease, and in the second rotation sequence (ZXY), when the main angle is greater than 90°, AngleX' zxy can well reflect the angle change, and is less affected by the deflection angle. The specific calculation method is:
第一计算单元首先根据第一起始欧拉角信息和第一当前欧拉角信息分别计算预估主角度PrMainAngle和预估偏移角度PrSideAngle,计算公式如下:The first calculating unit first calculates the estimated main angle PrMainAngle and the estimated offset angle PrSideAngle according to the first starting Euler angle information and the first current Euler angle information, and the calculation formula is as follows:
PrMainAngle=AngleY′zyx-AngleYzyxPrMainAngle=AngleY' zyx -AngleY zyx ;
当AngleY′zyx<AngleX′zxy且训练部位不处于奇异点附近(即|AngleX′zxy|≥5)时,PrSideAngle=AngleX′zyx-AngleXzyxWhen AngleY' zyx <AngleX' zxy and the training part is not near the singular point (ie |AngleX' zxy | ≥ 5), PrSideAngle = AngleX' zyx - AngleX zyx ;
当AngleY′zyx<AngleX′zxy且训练部位刚好处于(ZYX)的奇异点位置(即|AngleX′zxy|<5)时,或者AngleY′zyx≥AngleX′zxy时,PrSideAngle=AngleY′zxy-sign(AngleY′zyx)×90。When AngleY' zyx <AngleX' zxy and the training part is just at the singular point position of (ZYX) (ie |AngleX' zxy |<5), or AngleY' zyx ≥AngleX' zxy , PrSideAngle=AngleY' zxy -sign( AngleY' zyx ) × 90.
其次,第一判断单元判断预估主角度是否小于角度阈值。角度阈值一般为90°。Secondly, the first determining unit determines whether the estimated main angle is smaller than the angle threshold. The angle threshold is typically 90°.
当判断单元判断PrMainAngle<90°且PrMainAngle<PrSideAngle时,则将预估主角度PrMainAngle确定为主角度,也即主角度MainAngle=PrMainAngle。When the judging unit judges PrMainAngle<90° and PrMainAngle<PrSideAngle, the estimated main angle PrMainAngle is determined as the main angle, that is, the main angle MainAngle=PrMainAngle.
否则,当第一判断单元判断PrMainAngle≥90°和/或PrMainAngle≥PrSideAngle时,则调用第一计算单元,以计算主角度,具体的:Otherwise, when the first determining unit determines PrMainAngle≥90° and/or PrMainAngle≥PrSideAngle, the first calculating unit is called to calculate the main angle, specifically:
第一计算单元根据第二起始欧拉角信息和第二当前欧拉角信息计算第二旋转顺序下的主角度变化值AngleZXY;The first calculating unit calculates a main angle change value AngleZXY in the second rotation order according to the second start Euler angle information and the second current Euler angle information;
AngleZXY=AngleX′zxy-AngleXzxyAngleZXY=AngleX' zxy -AngleX zxy ;
第一计算单元具体通过如下公式计算主角度MainAngle:The first calculating unit specifically calculates the main angle MainAngle by the following formula:
MainAngle=sign(PrMainAngle)×max(|AngleZXY|,|PrMainAngle|);MainAngle=sign(PrMainAngle)×max(|AngleZXY|,|PrMainAngle|);
在AngleZXY>90°时,第一计算单元也可以通过如下公式计算主角度MainAngle:When AngleZXY>90°, the first calculation unit can also calculate the main angle MainAngle by the following formula:
MainAngle=sign(PrMainAngle)×(2×标准角度-AngleYzyx-AngleY′zyx);MainAngle=sign(PrMainAngle)×(2×standard angle-AngleY zyx -AngleY′ zyx );
其中,标准角度根据实际需要自行选择,例如可以是90°,也可以是-90°。Among them, the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
通过上述公式计算就能准确获得患者做出的康复运动的主角度,从而可通过判断主角度是否达到标准角度,得知患者做出的康复运动是否达标。Through the above formula calculation, the main angle of the rehabilitation exercise made by the patient can be accurately obtained, so that whether the rehabilitation movement made by the patient is up to standard can be determined by judging whether the main angle reaches the standard angle.
(2)偏移角度的计算(2) Calculation of offset angle
偏移角度主要通过AngleXzyx、AngleX′zyx、AngleYzxy和AngleY′zxy计算获得。The offset angle is mainly calculated by AngleX zyx , AngleX' zyx , AngleY zxy, and AngleY' zxy .
当主角度跨越90°时,AngleX′zyx和AngleY′zxy会有一个180°的补偿变化,当主角度小于90°时,直接作差,当主角度大于90°时,作差后需要进行角度补偿;同时,主角度为小角度(45°以下)时,AngleX′zyx能很好的反映偏移角度的变化情况,当主角度为较大角度(大于45°)时,AngleX′zyx受主角度的影响极大,而此时AngleY′zxy能很好的反映当前的偏转角度。具体的:When the main angle spans 90°, AngleX′ zyx and AngleY′ zxy will have a 180° compensation change. When the main angle is less than 90°, the difference is directly made. When the main angle is greater than 90°, the angle compensation is needed after the difference; When the main angle is a small angle (below 45°), AngleX' zyx can reflect the change of the offset angle very well. When the main angle is a large angle (greater than 45°), AngleX' zyx is affected by the main angle. Large, while AngleY' zxy can reflect the current deflection angle very well. specific:
计算偏移角度时,第一判断单元首先判断第一当前章动角是否小于第二当前章动角。 When calculating the offset angle, the first determining unit first determines whether the first current nutation angle is smaller than the second current nutation angle.
在AngleY′zyx<AngleX′zxy时,第一计算单元通过如下公式计算偏移角度SideAngle:In AngleY' zyx <AngleX' zxy , the first calculation unit calculates the offset angle SideAngle by the following formula:
SideAngle=AngleX′zyx-AngleXzyxSideAngle=AngleX' zyx -AngleX zyx ;
在AngleYzyx≥AngleX′zxy时,第一计算单元通过如下公式计算偏移角度SideAngle:When AngleY zyx AngleX' zxy , the first calculation unit calculates the offset angle SideAngle by the following formula:
SideAngle=AngleY′zxy-sign(AngleYzxy)×90;SideAngle=AngleY' zxy -sign(AngleY zxy )×90;
偏移角度主要用于衡量患者做出的康复运动与标准动作的左右偏移程度,本实施例中还可借助偏移角度对患者做出的康复运动进行评价,偏转角绝对值越大,则动作与标准动作差异越大,动作质量越低。The offset angle is mainly used to measure the degree of left and right deviation of the rehabilitation motion and the standard motion made by the patient. In this embodiment, the rehabilitation motion of the patient can also be evaluated by means of the offset angle, and the absolute value of the deflection angle is larger. The greater the difference between the action and the standard action, the lower the action quality.
本实施例中,第一计算单元还可对偏移角进行有效化处理,将其限定在(-180,180]中,以实现错误动作的判断和过滤。具体的:In this embodiment, the first calculating unit may also validate the offset angle and limit it to (-180, 180) to implement the judgment and filtering of the wrong action.
|SideAngle|-180>0或者SideAngle=-180时,通过如下公式实现:|SideAngle|-180>0 or SideAngle=-180, implemented by the following formula:
SideAngle′=SideAngle-sign(SideAngle)×360;SideAngle'=SideAngle-sign(SideAngle)×360;
否则,通过如下公式实现:Otherwise, it is implemented by the following formula:
SideAngle′=SideAngle;SideAngle'=SideAngle;
其中,SideAngle′为经过有效化处理后的最终的偏移角度。Among them, SideAngle' is the final offset angle after being effectively processed.
(3)旋转角度的计算(3) Calculation of rotation angle
主要表现在AngleZ上,直接作差,然后进行角度有效化转换,保证角度落在(-180,180]内,具体的旋转角度RotationAngle的计算公式如下:Mainly in AngleZ, directly make a difference, and then the angle is effectively converted to ensure that the angle falls within (-180, 180). The specific rotation angle RotationAngle is calculated as follows:
RotationAngle=AngleZ′zyx-AngleZzyxRotationAngle=AngleZ' zyx -AngleZ zyx ;
其中,AngleZ′zyx表征训练部位在惯导坐标系的Z轴上的当前角度,AngleZzyx表征训练部位在惯导坐标系的Z轴上的起始角度。Among them, AngleZ' zyx characterizes the current angle of the training part on the Z axis of the inertial coordinate system, and AngleZ zyx characterizes the starting angle of the training part on the Z axis of the inertial coordinate system.
旋转角度用于衡量个人习惯的站位与运动过程中的标准位的旋转偏离度,角度大小只做参考意义。The rotation angle is used to measure the rotational deviation of the position of the individual's habits and the standard position during the movement. The angle is only used as a reference.
二、以下介绍关节夹角的具体计算过程。Second, the following describes the specific calculation process of the joint angle.
进行康复训练时,将至少两个姿态传感器固定于人体康复运动的训练部位。以测量膝关节夹角为例,则将姿态传感器均固定于训练的大腿和小腿的侧面,当处于标准站立位时,姿态传感器的机体坐 标系的Y轴与惯导坐标系(也即东北天坐标系)的Z轴重合。At the time of rehabilitation training, at least two posture sensors are fixed to the training site of the human rehabilitation exercise. Taking the angle of the knee joint as an example, the attitude sensor is fixed to the side of the training thigh and calf. When in the standard standing position, the posture sensor body sits. The Y-axis of the singularity coincides with the Z-axis of the INS coordinate system (ie, the Northeast celestial coordinate system).
以下通过两个姿态传感器对测量系统的工作原理进行说明。为了便于说明,将两个姿态传感器分别称为第二姿态传感器A和第三姿态传感器B。当患者做出髋关节运动时,第二姿态传感器A实时获取训练部位的姿态的第一四元数并发送至控制器,第一四元数坐标为Pos1(Q0,Q1,Q2,Q3)。第三姿态传感器B实时获取训练部位的姿态的第二四元数并发送至控制器,第二四元数坐标为Pos2(Q0′,Q1′,Q2′,Q3′)。The working principle of the measuring system is explained below by means of two attitude sensors. For convenience of explanation, the two attitude sensors are referred to as a second attitude sensor A and a third attitude sensor B, respectively. When the patient makes hip joint motion, the second attitude sensor A acquires the first quaternion of the posture of the training part in real time and sends it to the controller, and the first quaternion coordinate is Pos1 (Q0, Q1, Q2, Q3). The third attitude sensor B acquires the second quaternion of the posture of the training part in real time and sends it to the controller, and the second quaternion coordinate is Pos2 (Q0', Q1', Q2', Q3').
需要说明的是,姿态传感器的数量可根据数据需求自行设置,当然数量越多测量的结果会越精确。当设有三个以上姿态传感器时,可先通过任意两个姿态传感器计算关节夹角,再对计算得到的多个关节夹角求平均值。It should be noted that the number of attitude sensors can be set according to the data requirements. Of course, the more the number, the more accurate the measurement results will be. When more than three attitude sensors are provided, the joint angle can be calculated by any two attitude sensors, and then the calculated multiple joint angles are averaged.
如图3所示,控制器包括欧拉角转换单元21、第二计算单元222、第三计算单元223和第二判断单元232。控制器将第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息,以及将第二四元数转换为惯导坐标系下的该不同旋转顺序的至少两个欧拉角信息,并根据至少四个欧拉角信息计算训练部位的关节夹角。As shown in FIG. 3, the controller includes a Euler angle conversion unit 21, a second calculation unit 222, a third calculation unit 223, and a second determination unit 232. The controller converts the first quaternion into at least two Euler angle information of different rotation orders in the inertial coordinate system, and converts the second quaternion into at least two of the different rotation orders in the inertial coordinate system The Euler angle information and the joint angle of the training site is calculated based on at least four Euler angle information.
本实施例中,为了便于说明,选用ZXY(第一旋转顺序)和ZYX(第二旋转顺序)两个旋转顺序进行算法说明。欧拉角转换单元的公式转换过程与上述计算主角度、偏移角度和旋转角度基本相同,此处不再赘述。In the present embodiment, for convenience of explanation, an algorithm description is performed using two rotation sequences of ZXY (first rotation order) and ZYX (second rotation order). The formula conversion process of the Euler angle conversion unit is basically the same as the calculation of the main angle, the offset angle and the rotation angle, and will not be described here.
转换后获得,AngleXAzxy(第一章动角)、AngleYAzxy(第一自转角)和AngleZAzxy(第一进动角)为惯导坐标系下的第一旋转顺序(ZXY)的第一欧拉角信息中包含的信息;AngleXAzyx(第三自转角)、AngleYAzyx(第三章动角)和AngleZAzyx(第三进动角)为惯导坐标系下的第二旋转顺序(ZYX)的第三欧拉角信息中包含的信息。AngleXBzxy(第二章动角)、AngleYBzxy(第二自转角)和AngleZBzxy(第二进动角)为惯导坐标系下的第一旋转顺序(ZXY)的第二欧拉角信息中包含的信息;AngleXBzyx(第四自转角)、AngleYBzyx(第四章动角)和AngleZBzyx(第四进动角)为惯导坐标系下的第二旋转顺序(ZYX)的第四欧拉角信息中包含的信息。After conversion, AngleXA zxy (first chapter moving angle), AngleYA zxy (first rotation angle) and AngleZA zxy (first precession angle) are the first European order of the first rotation order (ZXY) in the inertial coordinate system. The information contained in the pull angle information; AngleXA zyx (third rotation angle), AngleYA zyx (third chapter dynamic angle) and AngleZA zyx (third precession angle) are the second rotation order (ZYX) in the inertial coordinate system The information contained in the third Euler angle information. AngleXB zxy (Chapter 2 dynamic angle), AngleYB zxy (second rotation angle) and AngleZB zxy (second precession angle) are the second Euler angle information of the first rotation order (ZXY) in the inertial coordinate system. Contained information; AngleXB zyx (fourth rotation angle), AngleYB zyx (fourth movement angle) and AngleZB zyx (fourth precession angle) are the fourth rotation of the second rotation order (ZYX) in the inertial coordinate system The information contained in the pull angle information.
本实施例中,由于两个姿态传感器均设于大腿和小腿的侧面,姿态传感器的机体坐标系的Z轴与 大小腿垂直,且方向平行于人体的左右方向,从而当患者做出站立位、坐位、仰卧位等训练动作时,膝关节夹角的角度变化表现在Y轴上。In this embodiment, since both attitude sensors are disposed on the sides of the thigh and the lower leg, the Z-axis of the body coordinate system of the attitude sensor is The size of the legs is vertical, and the direction is parallel to the left and right direction of the human body, so that when the patient performs training exercises such as standing position, sitting position, and supine position, the angle change of the knee joint angle is expressed on the Y axis.
训练过程中,患者做跟随运动时,由于动作不规范训练部位会偏转,偏转角会对计算结果产生影响,特别是在旋转顺序的奇点附近,这时为了提高测量的准确度,需要对临界值进行一定的过滤,也即对姿态传感器的测量漂移情况进行一定的容错处理,因此奇点附近采用不同的计算方式。具体的,控制器通过以下方式计算关节夹角:During the training process, when the patient is following the movement, the training position will be deflected due to the irregular movement, and the deflection angle will affect the calculation result, especially in the vicinity of the singularity of the rotation order. In order to improve the accuracy of the measurement, the criticality is required. The value is filtered to some extent, that is, the measurement drift of the attitude sensor is subjected to certain fault tolerance processing, so different calculation methods are adopted in the vicinity of the singularity. Specifically, the controller calculates the angle of the joint by:
第二判断单元判断是否有传感器处于奇点位置附近,以姿态传感器A处于(ZYX)的奇点位附近为例,第二判断单元判断AngleXAzxy的绝对值是否小于第一阈值,其中第一阈值一般为5°。当|AngleXAzxy|≥5时,说明是正常角度,则调用第二计算单元以根据第三欧拉角信息和第四欧拉角信息计算关节夹角。当|AngleXAzxy|<5时,说明姿态传感器A处于奇点位,则调用第三计算单元以根据第一欧拉角信息、第三欧拉角信息和第四欧拉角信息计算关节夹角。The second determining unit determines whether there is a sensor in the vicinity of the singularity position, taking the attitude sensor A in the vicinity of the singularity point of (ZYX) as an example, and the second determining unit determines whether the absolute value of the AngleXA zxy is smaller than the first threshold, wherein the first threshold Usually 5°. When |AngleXA zxy | ≥ 5, indicating that it is a normal angle, the second calculating unit is called to calculate the joint angle based on the third Euler angle information and the fourth Euler angle information. When |AngleXA zxy |<5, indicating that the attitude sensor A is at the singularity point, the third calculation unit is called to calculate the joint angle based on the first Euler angle information, the third Euler angle information, and the fourth Euler angle information. .
进一步地,第二计算单元计算关节夹角前,首先判断AngleXAzxy和AngleXBzxy的正负号。Further, before the second calculating unit calculates the angle of the joint, first determine the sign of AngleXA zxy and AngleXB zxy .
当AngleXAzxy>0且AngleXBzxy>0(或者AngleXAzxy<0且AngleXBzxy<0)时,第二计算单元通过如下公式计算关节夹角TwoSensorAngle:When AngleXA zxy >0 and AngleXB zxy >0 (or AngleXA zxy <0 and AngleXB zxy <0), the second calculation unit calculates the joint angle TwoSensorAngle by the following formula:
TwoSensorAngle=180°-|AngleYAzyx-AngleYBzyx|;TwoSensorAngle=180°-|AngleYA zyx -AngleYB zyx |
而当AngleXAzxy>0且AngleXBzxy<0(或者AngleXAzxy<0且AngleXBzxy<0)时,第二计算单元通过如下公式计算关节夹角:When AngleXA zxy >0 and AngleXB zxy <0 (or AngleXA zxy <0 and AngleXB zxy <0), the second calculation unit calculates the joint angle by the following formula:
TwoSensorAngle=|AngleYAzyx+AngleYBzyx|。TwoSensorAngle=|AngleYA zyx +AngleYB zyx |.
第三计算单元在计算关节夹角前,首先计算预估角度PrAngle与AngleYBzyx的乘积。其中,PrAngle=AngleXAzxy+sign(AngleYAzyx)×90°。The third calculation unit first calculates the product of the estimated angle PrAngle and AngleYB zyx before calculating the joint angle. Among them, PrAngle=AngleXA zxy +sign(AngleYA zyx )×90°.
当PrAngle×AngleYAzxy>0时,第三计算单元通过以下公式计算关节夹角:When PrAngle×AngleYA zxy >0, the third calculation unit calculates the joint angle by the following formula:
TwoSensorAngle=180°-|AngleXAzxy+sign(AngleYAzyx)×90°-AngleYBzyx|。TwoSensorAngle=180°-|AngleXA zxy +sign(AngleYA zyx )×90°-AngleYB zyx |.
否则,第三计算单元通过以下公式计算关节夹角:Otherwise, the third calculation unit calculates the joint angle by the following formula:
TwoSensorAngle=|AngleXAzxy+sign(AngleYAzyx)×90°+AngleYBzyx|。 TwoSensorAngle=|AngleXA zxy +sign(AngleYA zyx )×90°+AngleYB zyx |.
本实施例中,报警模块3用于判断主角度和/或偏移角度和/或旋转角度和/或关节夹角是否在各自的阈值范围内,并在判断为否时发出提示信息,以提醒患者动作不达标,需要更改动作方向或幅度。其中,提示信息可通过语音的形式输出,也可通过文字的形式输出,且提示信息可包括患者偏离的方向信息和幅度大小等信息。In this embodiment, the alarm module 3 is configured to determine whether the main angle and/or the offset angle and/or the rotation angle and/or the joint angle are within respective threshold ranges, and issue a prompt message when the judgment is no, to remind The patient's movements are not up to standard and the direction or magnitude of the movement needs to be changed. The prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation.
需要说明的是,本实施例中仅是通过ZYX和ZXY两个旋转顺序说明本发明的三个角度的计算过程,用户可以但不限于将ZYX和ZXY作为选择旋转顺序,数量也不限于两个可以是三个或更多,一般还有以下的旋转顺序:ZYX′、′ZYZ′、′ZXY′、′ZXZ′、'YXZ′、′YXY′、′YZX′、′YZY′、′XYZ′、′XYX′、′XZY′和′XZX′。但是选用旋转顺序时,不能选择奇异点相同的两种旋转顺序。It should be noted that, in this embodiment, the calculation process of the three angles of the present invention is only described by the two rotation sequences of ZYX and ZXY. The user can, but is not limited to, ZYX and ZXY as the selection rotation order, and the number is not limited to two. It can be three or more, and generally has the following rotation order: ZYX', 'ZYZ', 'ZXY', 'ZXZ', 'YXZ', 'YXY', 'YZX', 'YZY', 'XYZ' , 'XYX', 'XZY' and 'XZX'. However, when the rotation order is selected, the two rotation orders with the same singular point cannot be selected.
本实施例中,在全姿态四元数的基础上,对多旋转顺序下的欧拉角进行融合计算主角度、偏移角度、旋转角度关节夹角,避免了奇异点,能准确表征患者的训练部位的关节角度,对于判定患者做出的动作质量、动作误差以及了解患者初始站位习惯有特殊意义。In this embodiment, on the basis of the full-status quaternion, the Euler angles in the multi-rotation sequence are fused to calculate the main angle, the offset angle, and the rotation angle of the joint angle, thereby avoiding the singular points and accurately characterizing the patient. The joint angle of the training site has special significance for judging the quality of the action made by the patient, the motion error, and understanding the patient's initial standing habit.
实施例2Example 2
实施例2与实施例1基本相同,不同之处在于,本实施例中,对每个康复运动定义一个标准位(此时主角度、偏移角度和旋转角度均为0°),也即将标准位作为起始位。从而,在主角度的计算中,第一计算单元根据如下公式计算预估主角度和预估偏移角度: Embodiment 2 is basically the same as Embodiment 1, except that in this embodiment, a standard position is defined for each rehabilitation exercise (when the main angle, the offset angle, and the rotation angle are both 0°), that is, the standard is Bit as the start bit. Thus, in the calculation of the main angle, the first calculation unit calculates the estimated main angle and the estimated offset angle according to the following formula:
PrMainAngle=AngleY′zyxPrMainAngle=AngleY'zyx;
PrSideAngle=AngleX′zyx±90°;PrSideAngle=AngleX' zyx ±90°;
具体的,当AngleY′zyx<AngleX′zxy且训练部位不处于奇异点附近(即|AngleX′zxy|≥5)时,PrSideAngle=AngleX′zyx-sign(AngleXzyx)×90°;当AngleY′zyx<AngleX′zxy且训练部位刚好处于(ZYX)的奇异点位置(即|AngleX′zxy|<5),或者AngleY′zyx≥AngleX′zxy时,PrSideAngle=AngleY′zxy-sign(AngleY′zyx)×90°。Specifically, when AngleY' zyx <AngleX' zxy and the training part is not near the singular point (ie |AngleX' zxy | ≥ 5), PrSideAngle = AngleX' zyx -sign(AngleX zyx ) × 90°; when AngleY' zyx <AngleX' zxy and the training part is just at the singular point position of (ZYX) (ie |AngleX' zxy |<5), or AngleY' zyx ≥AngleX' zxy , PrSideAngle=AngleY' zxy -sign(AngleY' zyx )× 90°.
本实施例中,第一计算单元根据如下公式计算第二旋转顺序下的主角度变化值AngleZXY:In this embodiment, the first calculating unit calculates the main angle change value AngleZXY in the second rotation sequence according to the following formula:
AngleZXY=AngleX′zxy±90°;AngleZXY=AngleX' zxy ±90°;
其中,根据初始位置对应的角度选择正负号。 Among them, the sign is selected according to the angle corresponding to the initial position.
第一计算单元具体通过如下公式计算主角度MainAngle:The first calculating unit specifically calculates the main angle MainAngle by the following formula:
MainAngle=sign(PrMainAngle)×max(|AngleZXY|,|PrMainAngle|)MainAngle=sign(PrMainAngle)×max(|AngleZXY|,|PrMainAngle|)
在AngleZXY>90°时,第一计算单元也可以通过如下公式计算主角度MainAngle:When AngleZXY>90°, the first calculation unit can also calculate the main angle MainAngle by the following formula:
MainAngle=sign(PrMainAngle)×(2×标准角度-AngleYzyx-AngleY′zyx)。MainAngle=sign(PrMainAngle)×(2×standard angle-AngleY zyx -AngleY′ zyx ).
其中,标准角度根据实际需要自行选择,例如可以是90°,也可以是-90°。Among them, the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
需要说明的是,控制器中可同时存储两种角度计算方法(实施例1中的角度计算方法和实施例2中的角度计算方法),从而康复师或者用户可根据实际需求自行选择采用相对于初始位的角度计算方法,还是采用标准位的角度计算方法。It should be noted that the two angle calculation methods (the angle calculation method in Embodiment 1 and the angle calculation method in Embodiment 2) can be stored in the controller at the same time, so that the rehabilitation engineer or the user can select and use according to actual needs. The angle calculation method of the initial position is still the angle calculation method using the standard position.
实施例3Example 3
本实施例提供另一种计算关节夹角的可能的实现方式,测量系统的结构与实施例1基本相同,如图4所示,不同之处在于,本实施例中的控制器具体包括欧拉角转换单元21、第四计算单元224和第三判断单元233。This embodiment provides another possible implementation manner for calculating the angle of the joint. The structure of the measurement system is basically the same as that of the embodiment 1, as shown in FIG. 4, except that the controller in this embodiment specifically includes Euler. An angle conversion unit 21, a fourth calculation unit 224, and a third determination unit 233.
本实施例中,还是以测量膝关节夹角为例,训练过程中将姿态传感器A和姿态传感器B均固定于训练的大腿和小腿的正面或后面,当处于标准站立位时,姿态传感器的机体坐标系的Y轴与惯导坐标系(也即东北天坐标系)的Z轴重合,Z轴与大小腿垂直,且方向垂直于人体的左右方向,从而当患者做出站立位、坐位、仰卧位等训练动作时,膝关节夹角表现在X轴或Y轴上。In this embodiment, the knee joint angle is taken as an example. During the training, the attitude sensor A and the attitude sensor B are both fixed on the front or the back of the trained thigh and calf. When in the standard standing position, the posture sensor body The Y-axis of the coordinate system coincides with the Z-axis of the INS coordinate system (that is, the northeast celestial coordinate system), and the Z-axis is perpendicular to the large and small legs, and the direction is perpendicular to the left-right direction of the human body, so that when the patient makes a standing position, a sitting position, and a supine position When the training is performed, the angle of the knee joint is expressed on the X-axis or the Y-axis.
本实施例中,理论上只需将第一四元数和第二四元数分别转化为惯导坐标系下的一个旋转顺序的欧拉角信息即可计算关节夹角。以选用ZYX(第二旋转顺序)为例,也即欧拉角转换单元将第一四元数和第二四元数分别转换为ZYX的第三欧拉角信息和第四欧拉角信息。其中,欧拉角转换单元的公式转换过程与实施例1中基本相同,此处不再赘述。In this embodiment, it is theoretically necessary to convert the first quaternion number and the second quaternion number into Euler angle information of a rotation order in the inertial coordinate system, respectively, to calculate the joint angle. Taking ZYX (second rotation order) as an example, that is, the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively. The formula conversion process of the Euler angle conversion unit is basically the same as that in Embodiment 1, and details are not described herein again.
本实施例中,第四计算单元通过以下公式计算TwoSensorAngle:In this embodiment, the fourth calculating unit calculates TwoSensorAngle by the following formula:
TwoSensorAngle=180°-|AngleXAzyx-AngleXBzyx|。TwoSensorAngle=180°-|AngleXA zyx -AngleXB zyx |.
本实施例中,为避免姿态传感器有一个刚好处于±180°附近时,导致第一临时角TempAngle1明显不处于有效范围的情况,需要对该值进行有效化处理,具体的: In this embodiment, in order to avoid that the posture sensor has a position near ±180°, the first temporary angle TempAngle1 is obviously not in the effective range, and the value needs to be effectively processed. Specifically:
第四计算单元通过如下公式计算第一临时角TempAngle1:The fourth calculation unit calculates the first temporary angle TempAngle1 by the following formula:
TempAngle1=AngleXAzyx-AngleXBzyxTempAngle1=AngleXA zyx -AngleXB zyx .
第三判断单元判断|TempAngle1|是否大于第二阈值,其中第二阈值一般为180°。The third determining unit determines whether |TempAngle1| is greater than a second threshold, wherein the second threshold is generally 180°.
也即当|TempAngle1|-180°>0时,调用第四计算单元,以通过如下公式对关节夹角进行容错处理,以得到目标关节夹角TwoSensorAngle′:That is, when |TempAngle1|-180°>0, the fourth calculation unit is called to perform fault tolerance processing on the joint angle by the following formula to obtain the target joint angle TwoSensorAngle':
TwoSensorAngle′=180°-|TempAngle1-sign(TempAngle1)×360°|。TwoSensorAngle'=180°-|TempAngle1-sign(TempAngle1)×360°|.
本实施例中,报警模块还用于判断目标关节夹角是否在目标夹角阈值内,并在判断为否时发出提示信息。In this embodiment, the alarm module is further configured to determine whether the target joint angle is within the target angle threshold, and issue a prompt message when the determination is negative.
实施例4Example 4
本实施例的测量系统适用于测量患者做出侧卧位动作的关节夹角,姿态传感器可均设于训练部位的正面或后面(姿态传感器的机体坐标系的Z轴与大小腿垂直,且方向垂直于人体的左右方向),也可均设于训练部位的侧面(姿态传感器的机体坐标系的Z轴与大小腿垂直,且方向平行于人体的左右方向)。The measuring system of the embodiment is suitable for measuring the angle of the joint of the patient to perform the lateral position action, and the posture sensor can be disposed at the front or the back of the training part (the Z axis of the body coordinate system of the posture sensor is perpendicular to the size leg, and the direction Vertically to the left and right direction of the human body, they may also be disposed on the side of the training site (the Z axis of the body coordinate system of the attitude sensor is perpendicular to the size leg and the direction is parallel to the left and right direction of the human body).
测量系统的结构与上述任一实施例基本相同,如图5所示,不同之处在于,本实施例的控制器包括欧拉角转换单元21、第五计算单元225和第四判断单元234。The structure of the measurement system is substantially the same as any of the above embodiments, as shown in FIG. 5, except that the controller of the present embodiment includes a Euler angle conversion unit 21, a fifth calculation unit 225, and a fourth determination unit 234.
本实施例中,理论上只需将第一四元数和第二四元数分别转化为惯导坐标系下的一个旋转顺序的欧拉角信息即可计算关节夹角。以选用ZYX(第二旋转顺序)为例,也即欧拉角转换单元将第一四元数和第二四元数分别转换为ZYX的第三欧拉角信息和第四欧拉角信息。其中,欧拉角转换单元的公式转换过程与上述任一实施例基本相同,此处不再赘述。In this embodiment, it is theoretically necessary to convert the first quaternion number and the second quaternion number into Euler angle information of a rotation order in the inertial coordinate system, respectively, to calculate the joint angle. Taking ZYX (second rotation order) as an example, that is, the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively. The formula conversion process of the Euler angle conversion unit is basically the same as any of the above embodiments, and details are not described herein again.
本实施中,第五计算单元通过以下方式计算TwoSensorAngle:In this implementation, the fifth computing unit calculates TwoSensorAngle by:
TwoSensorAngle=180°-|AngleZAzyx-AngleZBzyx|。TwoSensorAngle=180°-|AngleZA zyx -AngleZB zyx |.
本实施例中,为避免姿态传感器有一个刚好处于±180°附近时,导致第二临时角TempAngle2明显不处于有效范围的情况,需要对该值进行有效化处理,具体的:In this embodiment, in order to avoid that the posture sensor has a position near ±180°, the second temporary angle TempAngle2 is obviously not in the effective range, and the value needs to be effectively processed. Specifically:
第五计算单元通过如下公式计算第二临时角TempAngle2: The fifth calculating unit calculates the second temporary angle TempAngle2 by the following formula:
TempAngle2=AngleZAzyx-AngleZBzyxTempAngle2=AngleZA zyx -AngleZB zyx .
第四判断单元判断|TempAngle2|是否大于第二阈值,其中第二阈值一般为180°。The fourth determining unit determines whether |TempAngle2| is greater than a second threshold, wherein the second threshold is generally 180°.
也即当|TempAngle2|-180°>0时,第五计算单元通过如下公式计对关节夹角进行容错处理,以得到目标关节夹角TwoSensorAngle′:That is, when |TempAngle2|-180°>0, the fifth calculation unit performs fault tolerance processing on the joint angle by the following formula to obtain the target joint angle TwoSensorAngle':
TwoSensorAngle′=180°-|TempAngle2-sign(TempAngle2)×360°|。TwoSensorAngle'=180°-|TempAngle2-sign(TempAngle2)×360°|.
实施例5Example 5
本实施例的测量系统适用于初始姿态在Z轴上相差90°的情况(姿态传感器的角度变化均不在Z轴上),测量系统的结构与上述任一实施例基本相同,如图6所示,不同之处在于,本实施例中,控制器包括欧拉角转换单元21、第六计算单元226和第五判断单元235。The measuring system of the embodiment is suitable for the case where the initial posture is different by 90° on the Z axis (the angular changes of the attitude sensor are not on the Z axis), and the structure of the measuring system is basically the same as any of the above embodiments, as shown in FIG. The difference is that, in this embodiment, the controller includes the Euler angle conversion unit 21, the sixth calculation unit 226, and the fifth determination unit 235.
同样,本实施例中理论上只需将第一四元数和第二四元数分别转化为惯导坐标系下的一个旋转顺序的欧拉角信息即可计算关节夹角。以选用ZYX(第二旋转顺序)为例,也即欧拉角转换单元将第一四元数和第二四元数分别转换为ZYX的第三欧拉角信息和第四欧拉角信息。其中,欧拉角转换单元的公式转换过程与上述任一实施例基本相同,此处不再赘述。Similarly, in this embodiment, it is theoretically necessary to convert the first quaternion number and the second quaternion number into Euler angle information of a rotation order in the inertial coordinate system, respectively, to calculate the joint angle. Taking ZYX (second rotation order) as an example, that is, the Euler angle conversion unit converts the first quaternion number and the second quaternion number into the third Euler angle information and the fourth Euler angle information of ZYX, respectively. The formula conversion process of the Euler angle conversion unit is basically the same as any of the above embodiments, and details are not described herein again.
根据实际动作和佩戴情况,以计算腰椎关节与大腿间的夹角为例,将姿态传感器A佩戴于胸前,姿态传感器B佩戴于大腿侧位,计算关节夹角即两个传感器的夹角时,所需夹角在姿态传感器A上表现为AngleXAzyx,在姿态传感器B上表现为AngleYBzyxTaking the angle between the lumbar joint and the thigh as an example, the posture sensor A is worn on the chest and the posture sensor B is worn on the lateral side of the thigh according to the actual movement and wearing condition, and the angle between the joints, that is, the angle between the two sensors is calculated. angle AngleXA zyx desired performance on the attitude sensor A, in the performance of the posture sensor AngleYB zyx B.
以下介绍控制器计算关节夹角的过程:The following describes the process by which the controller calculates the angle of the joint:
第五判断单元判断是否有传感器处于奇点位置附近,以姿态传感器B处于(ZYX)的奇点附近为例,第五判断单元判断|AngleXBzxy|是否小于第一阈值,其中第一阈值一般为5°。The fifth determining unit determines whether there is a sensor in the vicinity of the singularity position, taking the attitude sensor B in the vicinity of the singular point of (ZYX) as an example, and the fifth determining unit determines whether |AngleXB zxy | is smaller than the first threshold, wherein the first threshold is generally 5°.
当|AngleXBzxy|≥5时,说明是正常角度,第六计算单元通过如下公式计算关节夹角TwoSensorAngle:When |AngleXB zxy | ≥ 5, the description is normal angle, and the sixth calculation unit calculates the joint angle TwoSensorAngle by the following formula:
TwoSensorAngle=180°-|AngleXAzyx-(补偿角+AngleYBzyx)|。TwoSensorAngle=180°-|AngleXA zyx - (compensation angle + AngleYB zyx )|.
其中,补偿角可根据实际情况自行确定,一般为90°。Among them, the compensation angle can be determined according to the actual situation, generally 90 °.
当|AngleXBzxy|<5时,说明姿态传感器A处于奇点位,第六计算单元通过如下公式计算关节夹角 TwoSensorAngle:When |AngleXB zxy |<5, it indicates that the attitude sensor A is at the singularity point, and the sixth calculation unit calculates the joint angle by the following formula: TwoSensorAngle:
TwoSensorAngle=180°-|AngleXAzy′-(补偿角+AngleXBzxy±90°)|。TwoSensorAngle=180°-|AngleXA zy' - (compensation angle + AngleXB zxy ±90°)|.
其中,AngleXBzxy±90°的正负号根据奇点附件的AngleYBzyx的正负号取舍。Among them, the angle of AngleXB zxy ±90° is chosen according to the sign of AngleYB zyx of the singularity attachment.
若补偿角取90°,则上述公式可以简化为:If the compensation angle is 90°, the above formula can be simplified as:
TwoSensorAngle=180°-|AngleXBzxy-AngleXAzyx|。TwoSensorAngle=180°-|AngleXB zxy -AngleXA zyx |.
实施例6Example 6
图7示出了一种康复运动参数的测量方法,该测量方法利用实施例1的测量系统实现,如图7所示,测量方法包括以下步骤:FIG. 7 shows a measurement method of a rehabilitation exercise parameter, which is implemented by the measurement system of Embodiment 1, as shown in FIG. 7, the measurement method includes the following steps:
步骤110、姿态传感器获取训练部位的姿态的四元数并发送至控制器。Step 110: The posture sensor acquires the quaternion of the posture of the training part and sends it to the controller.
步骤120、控制器将起始四元数转换为惯导坐标系下的不同旋转顺序的欧拉角信息。Step 120: The controller converts the starting quaternion into Euler angle information of different rotation orders in the INS coordinate system.
步骤130、控制器根据欧拉角信息计算主角度和/或偏移角度和/或旋转角度和/或关节夹角。Step 130: The controller calculates a primary angle and/or an offset angle and/or a rotation angle and/or a joint angle according to the Euler angle information.
其中,主角度为训练部位在第一平面上的投影与第二平面之间的夹角;第一平面为康复运动的标准动作的运动轨迹所在的平面,第二平面与第一平面垂直。偏移角度为训练部位在第二平面上的投影与第一平面之间的夹角,以髋关节前驱运动为例,偏移角度即为大腿内外展方向的角度。旋转角度为训练部位在惯导坐标系的Z轴上的角度变化值,以髋关节前驱运动为例,旋转角度为训练部位因旋转引起的与初始位的差异角。Wherein, the main angle is an angle between the projection of the training part on the first plane and the second plane; the first plane is a plane in which the motion path of the standard motion of the rehabilitation motion is located, and the second plane is perpendicular to the first plane. The offset angle is the angle between the projection of the training part on the second plane and the first plane. Taking the hip joint front movement as an example, the offset angle is the angle of the abduction direction inside the thigh. The rotation angle is the angle change value of the training part on the Z axis of the inertial coordinate system. Taking the hip joint front motion as an example, the rotation angle is the difference angle between the training position and the initial position due to the rotation of the training part.
步骤140、判断主角度和/或偏移角度和/或旋转角度和/或关节夹角是否在各自的预设范围内,并在判断为否时发出提示信息。Step 140: Determine whether the main angle and/or the offset angle and/or the rotation angle and/or the joint angle are within respective preset ranges, and issue a prompt message when the judgment is no.
提示信息可以在患者动作不达标时提醒患者更改动作方向或幅度。其中,提示信息可通过语音的形式输出,也可通过文字的形式输出,且提示信息可包括患者偏离的方向信息和幅度大小等信息。从而,实现在患者动作不达标时提醒患者,需要更改动作方向或幅度。其中,提示信息可通过语音的形式输出,也可通过文字的形式输出,且提示信息可包括患者偏离的方向信息和幅度大小等信息。The prompt message can remind the patient to change the direction or magnitude of the motion when the patient's motion is not up to standard. The prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation. Thereby, the patient is reminded when the patient's motion is not up to standard, and the direction or magnitude of the action needs to be changed. The prompt information may be outputted in the form of voice, or may be outputted in the form of text, and the prompt information may include information such as direction information and magnitude of the patient's deviation.
需要说明的是,主角度是衡量动作质量的主要参数,只有主角度尽可能的达到标准动作的达标角度,康复训练质量才会更高,训练效果更好。当然,也可借助其中两个,或三个、四个角度参数来评 价患者做出的动作是否达标。It should be noted that the main angle is the main parameter for measuring the quality of the movement. Only when the main angle reaches the standard angle of the standard movement as much as possible, the quality of the rehabilitation training will be higher and the training effect will be better. Of course, you can also use two or three or four angle parameters to evaluate Whether the price of the patient's action is up to standard.
本实施例中,计算偏移角度和/或偏移角度和/或旋转角度时,步骤110具体包括:In this embodiment, when calculating the offset angle and/or the offset angle and/or the rotation angle, step 110 specifically includes:
姿态传感器获取训练部位的姿态的起始四元数和当前四元数并发送至控制器;The attitude sensor acquires the starting quaternion of the posture of the training part and the current quaternion and sends it to the controller;
步骤120具体包括:Step 120 specifically includes:
控制器将起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将当前四元数转换为惯导坐标系下的该不同旋转顺序的至少两个当前欧拉角信息。The controller converts the starting quaternion into at least two starting Euler angle information of different rotation orders in the INS coordinate system, and converting the current Quaternion into at least two different rotation orders in the INS coordinate system Two current Euler angle information.
步骤130具体包括:Step 130 specifically includes:
控制器根据至少两个起始欧拉角信息和至少两个当前欧拉角信息计算主角度和/或偏移角度和/或旋转角度。The controller calculates a primary angle and/or an offset angle and/or a rotation angle based on the at least two initial Euler angle information and the at least two current Euler angle information.
本实施例中,计算主角度和/或偏移角度和/或旋转角度时,步骤120中,起始四元数和当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息。In this embodiment, when calculating the main angle and/or the offset angle and/or the rotation angle, in step 120, the starting quaternion and the current quaternion are respectively converted into the first rotation order in the inertial coordinate system. a starting Euler angle information and first current Euler angle information, and a second starting Euler angle information and a second current Euler angle information of the second rotation sequence.
如图8a所示,则步骤130中,根据至少两个起始欧拉角信息和至少两个当前欧拉角信息计算主角度的步骤具体包括:As shown in FIG. 8a, in step 130, the step of calculating the main angle according to the at least two initial Euler angle information and the at least two current Euler angle information specifically includes:
步骤131-1、根据第一起始欧拉角信息和第一当前欧拉角信息分别计算预估主角度和预估偏移角度;Step 131-1, calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
步骤132-1、判断预估主角度是否小于角度阈值且预估主角度是否小于预估偏移角度。在判断为是时,执行步骤133-1;在判断为否时,执行步骤133-1’;Step 132-1, determining whether the estimated main angle is smaller than the angle threshold and estimating whether the main angle is smaller than the estimated offset angle. When the determination is yes, step 133-1 is performed; when the determination is no, step 133-1' is performed;
步骤133-1、将预估主角度确定为主角度。In step 133-1, the estimated main angle is determined as the main angle.
步骤133-1’、计算主角度变化值,然后执行步骤135-1a’。Step 133-1', the main angle change value is calculated, and then step 135-1a' is performed.
具体的,通过如下公式计算第二旋转顺序下的主角度变化值:Specifically, the main angle change value in the second rotation order is calculated by the following formula:
主角度变化值=第二当前章动角-第二起始章动角;Main angle change value = second current nutation angle - second initial nutation angle;
步骤135-1a’、通过如下公式计算主角度:In step 135-1a', the main angle is calculated by the following formula:
主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|)。 Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |).
图8b提供了另一种计算主角度的可能的实现方式,图8b与图8a的步骤流程基本相同,不同之处在于,图8b中步骤133-1’之后执行步骤134-1’。Figure 8b provides another possible implementation for calculating the main angle. Figure 8b is substantially identical to the step flow of Figure 8a, except that step 134-1' is performed after step 133-1' in Figure 8b.
步骤134-1’、判断主角度变化值是否小于等于90°;在判断为是时,执行步骤135-1a’;在判断为否时执行步骤135-1b’。In step 134-1', it is judged whether or not the main angle change value is equal to or smaller than 90°; when it is judged as YES, step 135-1a' is performed; when the determination is negative, step 135-1b' is executed.
步骤135-1b’、通过如下公式计算主角度:In step 135-1b', the main angle is calculated by the following formula:
主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角)。Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle).
其中,标准角度根据实际需要自行选择,例如可以是90°,也可以是-90°。Among them, the standard angle is selected according to actual needs, for example, it can be 90° or -90°.
第一起始欧拉角信息包括第一起始章动角,第一当前欧拉角信息包括第一当前章动角,第二当前欧拉角信息包括第二当前自转角,第二起始欧拉角信息包括第二起始自转角。The first starting Euler angle information includes a first starting nutation angle, the first current Euler angle information includes a first current nutation angle, the second current Euler angle information includes a second current rotation angle, and the second initial Euler angle The angular information includes a second starting angle of rotation.
本实施例中,步骤131-1中具体通过如下公式计算预估主角度:In this embodiment, the estimated main angle is calculated by using the following formula in step 131-1:
预估主角度=第一当前章动角-第一起始章动角;Estimated main angle = first current nutation angle - first initial nutation angle;
计算预估偏移角度时,首先判断第一当前章动角是否小于第二当前章动角且第二当前章动角的绝对值是否大于等于5;When calculating the estimated offset angle, first determining whether the first current nutation angle is smaller than the second current nutation angle and whether the absolute value of the second current nutation angle is greater than or equal to 5;
在判断为是时,通过如下公式计算预估偏移角度:When the judgment is YES, the estimated offset angle is calculated by the following formula:
预估偏移角度=第一当前自转角-第一起始自转角;Estimated offset angle = first current rotation angle - first starting rotation angle;
在判断为否时(也即第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时),通过如下公式计算预估偏移角度:When the judgment is no (that is, when the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle ), calculate the estimated offset angle by the following formula:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
此时,第二当前欧拉角信息还包括第二当前自转角。At this time, the second current Euler angle information further includes a second current rotation angle.
本实施例中,如图9所示,步骤130中,根据至少两个起始欧拉角信息和至少两个当前欧拉角信息计算偏移角度的步骤具体包括:In this embodiment, as shown in FIG. 9, in step 130, the step of calculating an offset angle according to at least two initial Euler angle information and at least two current Euler angle information specifically includes:
步骤131-2、判断第一当前章动角是否小于第二当前章动角;在判断为是时,执行步骤132-2;在判断为否时,执行步骤132-2’;Step 131-2, determining whether the first current nutation angle is smaller than the second current nutation angle; when the determination is yes, step 132-2 is performed; if the determination is no, step 132-2' is performed;
步骤132-2、通过如下公式计算偏移角度: In step 132-2, the offset angle is calculated by the following formula:
偏移角度=第一当前自转角-第一起始自转角;Offset angle = first current rotation angle - first starting rotation angle;
步骤132-2’、通过如下公式计算偏移角度:In step 132-2', the offset angle is calculated by the following formula:
偏移角度=第二当前自转角-sign(第二起始自转角)×90°。Offset angle = second current rotation angle -sign (second starting rotation angle) × 90°.
其中,第一当前欧拉角信息还包括第一当前自转角,第一起始欧拉角信息还包括第一起始自转角,第二起始欧拉角信息还包括第二起始自转角。The first current Euler angle information further includes a first current rotation angle, the first starting Euler angle information further includes a first starting rotation angle, and the second starting Euler angle information further includes a second starting rotation angle.
本实施例中,在计算得到偏移角度之后,测量方法还包括:In this embodiment, after calculating the offset angle, the measurement method further includes:
步骤133-2、对偏移角度进行有效化处理。公式如下:Step 133-2: The offset angle is validated. The formula is as follows:
目标偏移角度=偏移角度-sign(偏移角度-180°)×360°。Target offset angle = offset angle - sign (offset angle - 180 °) × 360 °.
本实施例中,旋转角度的计算公式如下:In this embodiment, the calculation formula of the rotation angle is as follows:
旋转角度=训练部位在惯导坐标系的Z轴上的当前角度-训练部位在惯导坐标系的Z轴上的起始角度。Rotation angle = current angle of the training part on the Z axis of the inertial coordinate system - the starting angle of the training part on the Z axis of the inertial coordinate system.
本实施例中,计算关节夹角时,步骤110具体包括:In this embodiment, when calculating the angle of the joint, step 110 specifically includes:
两个姿态传感器分别获取训练部位的姿态的第一四元数和第二四元数。The two attitude sensors respectively acquire the first quaternion and the second quaternion of the posture of the training part.
本实施例的测量方法适用于患者做站立位、坐位、仰卧位等训练动作时的关节角度的测量,以测量膝关节夹角为例,将第一姿态传感器和第二姿态传感器均固定于训练的大腿和小腿的侧面,当患者处于标准站立位时,姿态传感器的机体坐标系的Y轴与惯导坐标系(也即东北天坐标系)的Z轴重合,Z轴与大小腿垂直,且方向平行于人体的左右方向。The measuring method of the embodiment is suitable for measuring the joint angle of the patient in a training position such as standing position, sitting position, supine position, etc., and measuring the angle of the knee joint as an example, fixing the first posture sensor and the second posture sensor to the training. The side of the thigh and the calf, when the patient is in the standard standing position, the Y-axis of the body coordinate system of the attitude sensor coincides with the Z-axis of the inertial coordinate system (ie, the northeast sky coordinate system), and the Z-axis is perpendicular to the size leg, and The direction is parallel to the left and right direction of the human body.
步骤120具体包括:Step 120 specifically includes:
控制器将第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息,以及将第二四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息。The controller converts the first quaternion to at least two Euler angle information of different rotation orders in the inertial coordinate system, and converts the second quaternion to at least two of different rotation orders in the inertial coordinate system Euler angle information.
步骤130具体包括:Step 130 specifically includes:
控制器根据至少四个欧拉角信息计算训练部位的关节夹角。The controller calculates the joint angle of the training site based on at least four Euler angle information.
本实施例中,计算关节夹角时,步骤120中,第一四元数和第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧 拉角信息;In this embodiment, when calculating the joint angle, in step 120, the first quaternion number and the second quaternion number are respectively converted into the first Euler angle information and the second ou in the first rotation order in the inertial coordinate system. Pull angle information, and third Euler angle information of the second rotation order and fourth Europe Pull angle information;
具体的,如图10所示,步骤130包括:Specifically, as shown in FIG. 10, step 130 includes:
步骤131-3、判断第一章动角的绝对值是否小于第一阈值。Step 131-3: Determine whether the absolute value of the first chapter moving angle is smaller than the first threshold.
在判断为否时,执行步骤132-3a;在判断为是时,执行步骤132-3b;When the determination is no, step 132-3a is performed; when the determination is yes, step 132-3b is performed;
步骤132-3a、根据第三欧拉角信息和第四欧拉角信息计算关节夹角。Step 132-3a calculates the joint angle based on the third Euler angle information and the fourth Euler angle information.
具体的,步骤132-3a包括:Specifically, step 132-3a includes:
在第一章动角和第二章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
关节夹角=180°-|第三章动角-第四章动角|;Joint angle = 180 ° - | Chapter 3 Dynamic angle - Chapter 4 dynamic angle |
在第一章动角和第二章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
关节夹角=|第三章动角+第四章动角|。Joint angle =|Chapter 3 moving angle + fourth chapter moving angle|.
步骤132-3b、根据第一欧拉角信息、第三欧拉角信息和第四欧拉角信息计算关节夹角。Step 132-3b calculates the joint angle based on the first Euler angle information, the third Euler angle information, and the fourth Euler angle information.
具体的,步骤132-3b包括:Specifically, step 132-3b includes:
在预估角与第四章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
关节夹角=180°-|第一章动角+sign(第三章动角)×90°-第四章动角|;Joint angle = 180 ° -|Chapter 1 moving angle + sign (third chapter moving angle) × 90 ° - Chapter 4 moving angle |
在预估角与第四章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
关节夹角=|第一章动角+sign(第三章动角)×90°+第四章动角|;Joint angle =|Chapter 1 moving angle +sign (third chapter moving angle)×90°+fourth chapter moving angle|;
其中,预估角=第一章动角+sign(第三章动角)×90°。Among them, the predicted angle = the first chapter of the dynamic angle + sign (third chapter dynamic angle) × 90 °.
实施例7Example 7
实施例7与实施例6基本相同,不同之处在于,本实施例中,对每个康复运动定义一个标准位,也即将标准位作为起始位,从而本实施例中通过如下公式计算预估主角度和预估偏移角度:Embodiment 7 is basically the same as Embodiment 6, except that in this embodiment, one standard bit is defined for each rehabilitation exercise, that is, the standard position is used as the start bit, so that the estimation is calculated by the following formula in this embodiment. Main angle and estimated offset angle:
预估主角度=第一当前章动角;Estimated main angle = first current nutation angle;
当第一当前章动角小于第二当前自转角且第二当前自转角的绝对值大于等于5时,通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current rotation angle and the absolute value of the second current rotation angle is greater than or equal to 5, the estimated offset angle is calculated by the following formula:
预估偏移角度=第一当前自转角-sign(第一起始自转角)×90°; Estimated offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the estimation is calculated by the following formula Offset angle:
预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
其中,第一当前欧拉角信息还包括第一当前自转角,第一起始欧拉角信息还包括第一起始自转角,第二当前欧拉角信息还包括第二当前章动角,第二当前欧拉角信息还包括第二当前自转角。The first current Euler angle information further includes a first current rotation angle, the first starting Euler angle information further includes a first starting rotation angle, the second current Euler angle information further includes a second current nutation angle, and a second The current Euler angle information also includes a second current rotation angle.
本实施例中,通过如下公式计算第二旋转顺序下的主角度变化值:In this embodiment, the main angle change value in the second rotation sequence is calculated by the following formula:
主角度变化值=第二当前章动角±90°。The main angle change value = the second current nutation angle ± 90 °.
本实施例中,在计算偏移角度时,当判断第一当前章动角小于第二当前章动角时,通过如下公式计算偏移角度:In this embodiment, when calculating the offset angle, when determining that the first current nutation angle is smaller than the second current nutation angle, the offset angle is calculated by the following formula:
偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
当判断第一当前章动角大于等于第二当前章动角时,通过如下公式计算偏移角度:When it is determined that the first current nutation angle is greater than or equal to the second current nutation angle, the offset angle is calculated by the following formula:
偏移角度=第二当前自转角-sign(第二起始自转角)×90°;Offset angle = second current rotation angle -sign (second starting rotation angle) × 90 °;
其中,第二起始欧拉角信息包括第二起始自转角。The second starting Euler angle information includes a second starting rotation angle.
实施例8Example 8
实施例8与实施例6基本相同,同样适用于患者做站立位、坐位、仰卧位等训练动作时的关节角度的测量,不同之处在于,还是以测量膝关节夹角为例,需将第一姿态传感器和第二姿态传感器均固定于大腿和小腿的正面或后面,当处于标准站立位时,姿态传感器的机体坐标系的Y轴与惯导坐标系(也即东北天坐标系)的Z轴重合,Z轴与大小腿垂直,且方向垂直于人体的左右方向。The embodiment 8 is basically the same as the embodiment 6. The same applies to the measurement of the joint angle when the patient performs the training action such as standing position, sitting position, supine position, etc., the difference is that the measurement of the knee joint angle is taken as an example. An attitude sensor and a second attitude sensor are fixed on the front or the back of the thigh and the lower leg. When in the standard standing position, the Y coordinate of the body coordinate system of the attitude sensor and the Z coordinate system (that is, the northeast sky coordinate system) Z The axes coincide, the Z axis is perpendicular to the size of the legs, and the direction is perpendicular to the left and right direction of the human body.
本实施中,步骤120中,将第一四元数和第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息。In this implementation, in step 120, the first quaternion number and the second quaternion number are respectively converted into the third Euler angle information and the fourth Euler angle information in the second rotation order in the inertial coordinate system.
如图11所示,步骤130具体包括:As shown in FIG. 11, step 130 specifically includes:
步骤131-4、通过如下公式计算关节夹角:Step 131-4, calculate the joint angle by the following formula:
关节夹角=180°-|第三自转角-第四自转角|。Joint angle = 180° - | third rotation angle - fourth rotation angle |
步骤132-4、通过如下公式计算第一临时角: Step 132-4, calculating the first temporary angle by the following formula:
第一临时角=|第三自转角-第四自转角|;First temporary angle=|third rotation angle-fourth rotation angle|;
步骤133-4、判断第一临时角的绝对值是否大于第二阈值。Step 133-4: Determine whether the absolute value of the first temporary angle is greater than a second threshold.
在判断为是时,执行步骤134-4。在判断为否时,执行步骤140。When the determination is yes, step 134-4 is performed. When the determination is no, step 140 is performed.
步骤134-4、通过如下公式计对关节夹角进行容错处理,以得到目标关节夹角:In step 134-4, the joint angle is subjected to fault tolerance processing by the following formula to obtain the target joint angle:
目标关节夹角=180°-|第一临时角-sign(第一临时角)×360°|。Target joint angle = 180° - | first temporary angle - sign (first temporary angle) × 360 ° |.
步骤140中则判断关节夹角或目标关节夹角是否在各自的预设范围内,并在判断为否时发出提示信息。In step 140, it is determined whether the joint angle or the target joint angle is within a respective preset range, and a prompt message is issued when the judgment is negative.
实施例9Example 9
本实施例的测量方法适用于患者做侧卧位动作时的关节夹角的测量,测量流程与实施例8基本相同,如图12所示,不同之处在于,步骤130具体包括:The measuring method of the present embodiment is applicable to the measurement of the angle of the joint when the patient is in the lateral position. The measurement procedure is basically the same as that in the embodiment 8, as shown in FIG. 12, except that the step 130 specifically includes:
步骤131-5、通过如下公式计算关节夹角:Step 131-5, calculate the joint angle by the following formula:
关节夹角=180°-|第三进动角-第四进动角|。Joint angle = 180° - | third precession angle - fourth precession angle |.
步骤132-5、通过如下公式计算第二临时角:Step 132-5, calculating the second temporary angle by the following formula:
第二临时角=|第三进动角-第四进动角|。Second temporary angle = | third precession angle - fourth precession angle |.
步骤133-5、判断第二临时角的绝对值是否大于第二阈值。在判断为是时,执行步骤134-5;在判断为否时,执行步骤140。Step 133-5: Determine whether the absolute value of the second temporary angle is greater than a second threshold. When the determination is yes, step 134-5 is performed; if the determination is no, step 140 is performed.
步骤134-5、通过如下公式对关节夹角进行容错处理,以得到目标关节夹角:In step 134-5, the joint angle is subjected to fault tolerance processing by the following formula to obtain the target joint angle:
目标关节夹角=180°-|第二临时角-sign(第二临时角)×360°|。Target joint angle = 180° - | second temporary angle - sign (second temporary angle) × 360 ° |.
实施例10Example 10
本实施例的测量系统适用于初始姿态在Z轴上相差90°的情况(姿态传感器的角度变化均不在Z轴上),以计算腰椎关节与大腿间的夹角为例,需将姿态传感器A佩戴于胸前,姿态传感器B佩戴于大腿侧位。本实施例的测量方法与实施例6基本相同,如图13所示,不同之处在于,步骤130中计算关节夹角的步骤具体包括:The measurement system of the present embodiment is suitable for the case where the initial posture is different by 90° on the Z axis (the angle change of the attitude sensor is not on the Z axis), and the angle between the lumbar joint and the thigh is calculated as an example, and the attitude sensor A is required. Wearing on the chest, the posture sensor B is worn on the lateral side of the thigh. The measurement method of the embodiment is substantially the same as that of the embodiment 6, as shown in FIG. 13 , except that the step of calculating the angle of the joint in step 130 specifically includes:
步骤131-6、判断第二章动角的绝对值是否小于第一阈值。 Step 131-6: Determine whether the absolute value of the second chapter moving angle is smaller than the first threshold.
在判断为否时,执行步骤132-6;在判断为是时,执行步骤133-6。If the determination is no, step 132-6 is performed; if the determination is yes, step 133-6 is performed.
步骤132-6、通过如下公式计算关节夹角:In step 132-6, the joint angle is calculated by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第四章动角)|。Joint angle = 180° - | third rotation angle - (compensation angle + fourth chapter dynamic angle) |.
步骤133-6、通过如下公式计算关节夹角:Step 133-6, calculating the joint angle by the following formula:
关节夹角=180°-|第三自转角-(补偿角+第二章动角±90°)|。Joint angle = 180 ° - | third rotation angle - (compensation angle + second chapter movement angle ± 90 °) |.
虽然以上描述了本发明的具体实施方式,但是本领域的技术人员应当理解,这些仅是举例说明,在不背离本发明的原理和实质的前提下,可以对这些实施方式做出多种变更或修改。因此,本发明的保护范围由所附权利要求书限定。 While the invention has been described with respect to the preferred embodiments of the embodiments of the embodiments of the invention modify. Accordingly, the scope of the invention is defined by the appended claims.

Claims (20)

  1. 一种康复运动参数的测量系统,其特征在于,所述测量系统包括:姿态传感器和控制器;A measurement system for rehabilitation exercise parameters, characterized in that the measurement system comprises: an attitude sensor and a controller;
    所述姿态传感器固定于人体康复运动的训练部位;所述姿态传感器用于获取所述训练部位的姿态的四元数并发送至所述控制器;The posture sensor is fixed to a training part of a human rehabilitation exercise; the posture sensor is configured to acquire a quaternion of the posture of the training part and send the quaternion to the controller;
    所述控制器用于将所述四元数转换为惯导坐标系下的不同旋转顺序的欧拉角信息,并根据所述欧拉角信息计算所述康复运动参数。The controller is configured to convert the quaternion into Euler angle information of different rotation orders in an inertial coordinate system, and calculate the rehabilitation motion parameter according to the Euler angle information.
  2. 如权利要求1所述的测量系统,其特征在于,所述康复运动参数包括:主角度和/或偏移角度和/或旋转角度;The measurement system of claim 1 wherein said rehabilitation motion parameters comprise: a primary angle and/or an offset angle and/or a rotation angle;
    第一姿态传感器用于获取所述训练部位的姿态的起始四元数和当前四元数并发送至所述控制器;The first attitude sensor is configured to acquire a starting quaternion and a current quaternion of the posture of the training part and send the same to the controller;
    所述控制器用于将所述起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将所述当前四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个当前欧拉角信息,并根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度和/或偏移角度和/或旋转角度;The controller is configured to convert the starting quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and convert the current quaternion into an inertial coordinate system Calculating the primary angle and/or offset based on the at least two initial Euler angle information and the at least two current Euler angle information Angle and/or angle of rotation;
    所述主角度为所述训练部位在第一平面上的投影与第二平面之间的夹角;所述第一平面为康复运动的标准动作的运动轨迹所在的平面,所述第二平面与所述第一平面垂直;The main angle is an angle between a projection of the training site on a first plane and a second plane; the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
    所述偏移角度为所述训练部位在所述第二平面上的投影与所述第一平面之间的夹角;The offset angle is an angle between a projection of the training portion on the second plane and the first plane;
    所述旋转角度为所述训练部位在所述惯导坐标系的Z轴上的角度变化值。The rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
  3. 如权利要求2所述的测量系统,其特征在于,所述控制器包括欧拉角转换单元、第一计算单元和第一判断单元;The measurement system according to claim 2, wherein said controller comprises an Euler angle conversion unit, a first calculation unit, and a first determination unit;
    所述欧拉角转换单元将所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;The Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
    当计算所述主角度时,所述第一计算单元根据所述第一起始欧拉角信息和所述第一当前欧拉角信 息分别计算预估主角度和预估偏移角度;When calculating the main angle, the first calculating unit is based on the first starting Euler angle information and the first current Euler angle letter Calculate the estimated main angle and the estimated offset angle separately;
    所述第一判断单元用于在判断所述预估主角度小于角度阈值且所述预估主角度小于所述预估偏移角度时,将所述预估主角度确定为主角度;否则,调用所述第一计算单元;The first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
    所述第一计算单元还用于通过如下公式计算第二旋转顺序下的主角度变化值:The first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
    主角度变化值=第二当前章动角-第二起始章动角;Main angle change value = second current nutation angle - second initial nutation angle;
    所述第一计算单元还用于通过如下公式计算主角度:The first calculation unit is further configured to calculate a main angle by the following formula:
    主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
    或,所述第一计算单元还用于在所述主角度变化值大于90°时,通过如下公式计算主角度:Or the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
    主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
    优选地,预估主角度=第一当前章动角-第一起始章动角;Preferably, the estimated main angle = the first current nutation angle - the first initial nutation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the first calculating unit specifically calculates the estimated offset angle by the following formula:
    预估偏移角度=第一当前自转角-第一起始自转角;Estimated offset angle = first current rotation angle - first starting rotation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the first calculation unit Calculate the estimated offset angle by the following formula:
    预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
    所述第一起始欧拉角信息包括第一起始章动角,所述第一当前欧拉角信息包括第一当前章动角,所述第二当前欧拉角信息包括第二当前章动角和第二当前自转角,所述第二起始欧拉角信息包括第二起始章动角。The first initial Euler angle information includes a first initial nutation angle, the first current Euler angle information includes a first current nutation angle, and the second current Euler angle information includes a second current nutation angle And the second current rotation angle, the second starting Euler angle information includes a second initial nutation angle.
  4. 如权利要求2所述的测量系统,其特征在于,当计算所述主角度时,所述控制器包括欧拉角转换单元、第一计算单元和第一判断单元;The measurement system according to claim 2, wherein when calculating the main angle, the controller comprises an Euler angle conversion unit, a first calculation unit, and a first determination unit;
    所述欧拉角转换单元将所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息; The Euler angle conversion unit converts the starting quaternion and the current quaternion into a first starting Euler angle information and a first current Euler angle of a first rotation sequence in an inertial coordinate system, respectively Information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
    所述第一计算单元根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;The first calculating unit calculates an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
    所述第一判断单元用于在判断所述预估主角度小于角度阈值且所述预估主角度小于所述预估偏移角度时,将所述预估主角度确定为主角度;否则,调用所述第一计算单元;The first determining unit is configured to determine the estimated main angle as a main angle when determining that the estimated main angle is smaller than an angle threshold and the estimated main angle is smaller than the estimated offset angle; otherwise, Calling the first computing unit;
    所述第一计算单元还用于通过如下公式计算第二旋转顺序下的主角度变化值:The first calculating unit is further configured to calculate a main angle change value in the second rotation sequence by using the following formula:
    主角度变化值=第二当前章动角±90°;The main angle change value = the second current nutation angle ± 90 °;
    所述第一计算单元还用于通过如下公式计算主角度:The first calculation unit is further configured to calculate a main angle by the following formula:
    主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
    或,所述第一计算单元还用于在所述主角度变化值大于90°时,通过如下公式计算主角度:Or the first calculating unit is further configured to calculate the main angle by using the following formula when the main angle change value is greater than 90°:
    主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
    优选地,预估主角度=第一当前章动角;Preferably, the estimated main angle = the first current nutation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the first calculating unit specifically calculates the estimated offset angle by the following formula:
    预估偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Estimated offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,所述第一计算单元具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the first calculation unit Calculate the estimated offset angle by the following formula:
    预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
    所述第一当前欧拉角信息包括第一当前自转角和第一当前章动角,所述第一起始欧拉角信息包括第一起始自转角和第一起始章动角,所述第二当前欧拉角信息包括第二当前自转角和第二当前章动角。The first current Euler angle information includes a first current rotation angle and a first current nutation angle, and the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle, the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
  5. 如权利要求3或4所述的测量系统,其特征在于,当计算偏移角度时,所述第一判断单元还用于判断第一当前章动角是否小于第二当前章动角;The measurement system according to claim 3 or 4, wherein the first determining unit is further configured to determine whether the first current nutation angle is smaller than the second current nutation angle when calculating the offset angle;
    在所述第一判断单元判断为是时,所述第一计算单元通过如下公式计算偏移角度:When the first determining unit determines YES, the first calculating unit calculates the offset angle by the following formula:
    偏移角度=第一当前自转角-第一起始自转角;Offset angle = first current rotation angle - first starting rotation angle;
    或,所述第一计算单元通过如下公式计算偏移角度: Or, the first calculating unit calculates the offset angle by the following formula:
    偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
    在所述第一判断单元判断为否时,所述第一计算单元通过如下公式计算偏移角度:When the first determining unit determines NO, the first calculating unit calculates the offset angle by the following formula:
    偏移角度=第二当前自转角-sign(第二起始自转角)×90°;Offset angle = second current rotation angle -sign (second starting rotation angle) × 90 °;
    所述第一起始欧拉角信息还包括第一起始自转角,所述第二起始欧拉角信息还包括第二起始自转角。The first starting Euler angle information further includes a first starting rotation angle, and the second starting Euler angle information further includes a second starting rotation angle.
  6. 如权利要求1所述的测量系统,其特征在于,所述康复运动参数包括:关节夹角;The measurement system of claim 1 wherein said rehabilitation motion parameters comprise: an angle of joint;
    第二姿态传感器用于获取所述训练部位的姿态的第一四元数并发送至所述控制器;The second attitude sensor is configured to acquire a first quaternion of the posture of the training part and send the same to the controller;
    所述控制器用于将所述第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息;The controller is configured to convert the first quaternion to at least two Euler angle information of different rotation orders in an inertial coordinate system;
    第三姿态传感器用于获取所述训练部位的姿态的第二四元数并发送至所述控制器;The third attitude sensor is configured to acquire a second quaternion of the posture of the training part and send the same to the controller;
    所述控制器还用于将所述第二四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个欧拉角信息;The controller is further configured to convert the second quaternion to at least two Euler angle information of the different rotation order in an inertial coordinate system;
    所述控制器还用于根据至少四个欧拉角信息计算所述训练部位的关节夹角。The controller is further configured to calculate a joint angle of the training portion based on the at least four Euler angle information.
  7. 如权利要求6所述的测量系统,其特征在于,所述控制器包括欧拉角转换单元、第二计算单元、第三计算单元和第二判断单元;The measurement system according to claim 6, wherein said controller comprises an Euler angle conversion unit, a second calculation unit, a third calculation unit, and a second determination unit;
    当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
    所述第二判断单元用于判断第一章动角的绝对值是否小于第一阈值;在判断为否时,调用所述第二计算单元;在判断为是时,调用所述第三计算单元;The second determining unit is configured to determine whether an absolute value of the first chapter moving angle is smaller than a first threshold; when the determination is no, the second calculating unit is called; when the determination is yes, the third calculating unit is called ;
    所述第二计算单元具体用于在第一章动角和第二章动角的乘积大于0时,通过如下公式计算关节夹角:The second calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is greater than 0:
    关节夹角=180°-|第三章动角-第四章动角|;Joint angle = 180 ° - | Chapter 3 Dynamic angle - Chapter 4 dynamic angle |
    所述第二计算单元具体还用于在第一章动角和第二章动角的乘积小于0时,通过如下公式计算关节夹角: The second calculating unit is further configured to calculate the joint angle by the following formula when the product of the first chapter moving angle and the second chapter moving angle is less than 0:
    关节夹角=|第三章动角+第四章动角|;Joint angle =|Chapter 3 moving angle + fourth chapter moving angle|;
    所述第三计算单元具体用于在预估角与第四章动角的乘积大于0时,通过如下公式计算关节夹角:The third calculating unit is specifically configured to calculate the joint angle by the following formula when the product of the predicted angle and the fourth chapter moving angle is greater than zero:
    关节夹角=180°-|第一章动角+sign(第三章动角)×90°-第四章动角|;Joint angle = 180 ° -|Chapter 1 moving angle + sign (third chapter moving angle) × 90 ° - Chapter 4 moving angle |
    所述第三计算单元具体还用于在预估角与第四章动角的乘积小于0时,通过如下公式计算关节夹角:The third calculating unit is further configured to calculate the joint angle by the following formula when the product of the predicted angle and the fourth chapter moving angle is less than 0:
    关节夹角=|第一章动角+sign(第三章动角)×90°+第四章动角|;Joint angle =|Chapter 1 moving angle +sign (third chapter moving angle)×90°+fourth chapter moving angle|;
    其中,预估角=第一章动角+sign(第三章动角)×90°;Among them, the predicted angle = the first chapter moving angle + sign (third chapter moving angle) × 90 °;
    所述第一欧拉角信息包括第一章动角,所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三章动角,所述第四欧拉角信息包括第四章动角。The first Euler angle information includes a first nutation angle, the second Euler angle information includes a second nutation angle, and the third Euler angle information includes a third nutation angle, the fourth Europe The pull angle information includes the fourth chapter dynamic angle.
  8. 如权利要求6所述的测量系统,其特征在于,所述控制器包括欧拉角转换单元和第四计算单元;The measurement system of claim 6 wherein said controller comprises an Euler angle conversion unit and a fourth calculation unit;
    当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
    所述第四计算单元用于通过如下公式计算关节夹角:The fourth calculation unit is configured to calculate an angle of joint by the following formula:
    关节夹角=180°-|第三自转角-第四自转角|;Joint angle = 180° - | third rotation angle - fourth rotation angle |
    所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四自转角;The third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth rotation angle;
    优选地,所述控制器还包括第三判断单元;Preferably, the controller further includes a third determining unit;
    所述第四计算单元还用于通过如下公式计算第一临时角:The fourth calculating unit is further configured to calculate the first temporary angle by the following formula:
    第一临时角=|第三自转角-第四自转角|;First temporary angle=|third rotation angle-fourth rotation angle|;
    所述第三判断单元还用于判断所述第一临时角的绝对值是否大于第二阈值,并在判断为是时,调用所述第四计算单元;The third determining unit is further configured to determine whether an absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, invoke the fourth calculating unit;
    所述第四计算单元还用于通过如下公式计对所述关节夹角进行容错处理,以得到目标关节夹角:The fourth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
    目标关节夹角=180°-|第一临时角-sign(第一临时角)×360°|。 Target joint angle = 180° - | first temporary angle - sign (first temporary angle) × 360 ° |.
  9. 如权利要求6所述的测量系统,其特征在于,所述控制器包括欧拉角转换单元和第五计算单元;The measurement system of claim 6 wherein said controller comprises an Euler angle conversion unit and a fifth calculation unit;
    当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into a third Euler angle information of the second rotation order in the inertial coordinate system, respectively And the fourth Euler angle information;
    所述第五计算单元用于通过如下公式计算关节夹角:The fifth calculation unit is for calculating an angle of joint by the following formula:
    关节夹角=180°-|第三进动角-第四进动角|;Joint angle = 180° - | third precession angle - fourth precession angle |
    所述第三欧拉角信息包括第三进动角,所述第四欧拉角信息包括第四进动角;The third Euler angle information includes a third precession angle, and the fourth Euler angle information includes a fourth precession angle;
    优选地,所述控制器还包括第四判断单元;Preferably, the controller further includes a fourth determining unit;
    所述第五计算单元还用于通过如下公式计算第二临时角:The fifth calculating unit is further configured to calculate the second temporary angle by the following formula:
    第二临时角=|第三进动角-第四进动角|;Second temporary angle =|third precession angle - fourth precession angle|;
    所述第四判断单元还用于判断所述第二临时角的绝对值是否大于第二阈值;The fourth determining unit is further configured to determine whether an absolute value of the second temporary angle is greater than a second threshold;
    在所述第四判断单元判断为是时,所述第五计算单元还用于通过如下公式对所述关节夹角进行容错处理,以得到目标关节夹角:When the fourth determining unit determines YES, the fifth calculating unit is further configured to perform fault tolerance processing on the joint angle by using the following formula to obtain a target joint angle:
    目标关节夹角=180°-|第二临时角-sign(第二临时角)×360°|。Target joint angle = 180° - | second temporary angle - sign (second temporary angle) × 360 ° |.
  10. 如权利要求6所述的测量系统,其特征在于,所述控制器包括欧拉角转换单元、第五判断单元和第六计算单元;The measurement system according to claim 6, wherein said controller comprises an Euler angle conversion unit, a fifth determination unit, and a sixth calculation unit;
    当计算关节夹角时,所述欧拉角转换单元将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;When calculating the joint angle, the Euler angle conversion unit converts the first quaternion and the second quaternion into the first Euler angle information of the first rotation order in the inertial coordinate system, respectively And second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
    所述第五判断单元还用于判断所述第二章动角的绝对值是否小于第一阈值;The fifth determining unit is further configured to determine whether an absolute value of the second chapter moving angle is smaller than a first threshold;
    在所述第五判断单元判断为否时,所述第六计算单元通过如下公式计算关节夹角:When the fifth determining unit determines NO, the sixth calculating unit calculates the joint angle by the following formula:
    关节夹角=180°-|第三自转角-(补偿角+第四章动角)|;Joint angle = 180° - | third rotation angle - (compensation angle + fourth chapter dynamic angle) |;
    在所述第五判断单元判断为是时,所述第六计算单元还用于通过如下公式计算关节夹角:When the fifth determining unit determines YES, the sixth calculating unit is further configured to calculate the joint angle by the following formula:
    关节夹角=180°-|第三自转角-(补偿角+第二章动角±90°)|; Joint angle = 180° - | third rotation angle - (compensation angle + second chapter movement angle ± 90 °) |
    所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四章动角。The second Euler angle information includes a second chapter angle, the third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth chapter movement angle.
  11. 一种康复运动参数的测量方法,其特征在于,所述测量方法利用权利要求1-10中任意一项所述的测量系统实现,所述测量方法包括以下步骤:A method of measuring a rehabilitation motion parameter, characterized in that the measurement method is implemented by the measurement system according to any one of claims 1 to 10, the measurement method comprising the steps of:
    S1、所述姿态传感器获取所述训练部位的姿态的四元数并发送至所述控制器;Quaternion S 1, the sensor acquires the posture of the posture of the training site and sent to the controller;
    S2、所述控制器将所述四元数转换为惯导坐标系下的不同旋转顺序的欧拉角信息;S 2 , the controller converts the quaternion into Euler angle information of different rotation orders in an inertial coordinate system;
    S3、所述控制器根据所述欧拉角信息计算所述康复运动参数。S 3 , the controller calculates the rehabilitation motion parameter according to the Euler angle information.
  12. 如权利要求11所述的测量方法,其特征在于,所述康复运动参数包括:偏移角度和/或偏移角度和/或旋转角度;The measuring method according to claim 11, wherein the rehabilitation motion parameters comprise: an offset angle and/or an offset angle and/or a rotation angle;
    步骤S1具体包括:Step S 1 comprises:
    第一姿态传感器获取所述训练部位的姿态的起始四元数和当前四元数并发送至所述控制器;The first attitude sensor acquires a starting quaternion and a current quaternion of the posture of the training part and sends the same to the controller;
    步骤S2具体包括:Step S 2 comprises:
    所述控制器将所述起始四元数转换为惯导坐标系下的不同旋转顺序的至少两个起始欧拉角信息,以及将所述当前四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个当前欧拉角信息;The controller converts the initial quaternion into at least two initial Euler angle information of different rotation orders in an inertial coordinate system, and converts the current quaternion into an inertial coordinate system At least two current Euler angle information of the different rotation order;
    步骤S3具体包括:Step S 3 comprises:
    所述控制器根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度和/或偏移角度和/或旋转角度;The controller calculates the primary angle and/or the offset angle and/or the rotation angle according to the at least two initial Euler angle information and the at least two current Euler angle information;
    所述主角度为所述训练部位在第一平面上的投影与第二平面之间的夹角;所述第一平面为康复运动的标准动作的运动轨迹所在的平面,所述第二平面与所述第一平面垂直;The main angle is an angle between a projection of the training site on a first plane and a second plane; the first plane is a plane in which a motion path of a standard motion of rehabilitation motion is located, and the second plane is The first plane is vertical;
    所述偏移角度为所述训练部位在所述第二平面上的投影与所述第一平面之间的夹角;The offset angle is an angle between a projection of the training portion on the second plane and the first plane;
    所述旋转角度为所述训练部位在所述惯导坐标系的Z轴上的角度变化值。The rotation angle is an angle change value of the training portion on the Z axis of the inertial coordinate system.
  13. 如权利要求12所述的测量方法,其特征在于,步骤S2中,所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息; The measuring method as claimed in claim 12, wherein, in the step S 2, the first initial starting rotation of the first sequence and the current quaternion quaternion are converted to the coordinate system INS Euler angle information and first current Euler angle information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
    步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度的步骤具体包括:Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
    S31-1、根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;S 31-1 , calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
    S32-1、判断所述预估主角度是否小于角度阈值且所述预估主角度是否小于所述预估偏移角度;在判断为是时,执行步骤S33-1;在判断为否时,执行步骤S33-1’; S32-1 , determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S33-1 ; When performing step S 33-1 ';
    S33-1、将所述预估主角度确定为主角度;S 33-1 , determining the estimated main angle as a main angle;
    S33-1’、通过如下公式计算第二旋转顺序下的主角度变化值:S 33-1 ', calculate the main angle change value in the second rotation sequence by the following formula:
    主角度变化值=第二当前章动角-第二起始章动角;Main angle change value = second current nutation angle - second initial nutation angle;
    S34-1’、通过如下公式计算主角度:S 34-1 ', calculate the main angle by the following formula:
    主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
    或,在所述主角度变化值大于90°时,通过如下公式计算主角度:Or, when the main angle change value is greater than 90°, the main angle is calculated by the following formula:
    主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
    优选地,步骤S31-1中具体通过如下公式计算预估主角度:Preferably, the estimated main angle is calculated in the step S 31-1 by the following formula:
    预估主角度=第一当前章动角-第一起始章动角;Estimated main angle = first current nutation angle - first initial nutation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the estimated offset angle is calculated by the following formula:
    预估偏移角度=第一当前自转角-第一起始自转角;Estimated offset angle = first current rotation angle - first starting rotation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the specific formula is calculated by the following formula Estimate the offset angle:
    预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°;Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
    所述第一起始欧拉角信息包括第一起始章动角,所述第一当前欧拉角信息包括第一当前章动角,所述第二当前欧拉角信息包括第二当前章动角和第二当前自转角,所述第二起始欧拉角信息包括第二起始章动角。 The first initial Euler angle information includes a first initial nutation angle, the first current Euler angle information includes a first current nutation angle, and the second current Euler angle information includes a second current nutation angle And the second current rotation angle, the second starting Euler angle information includes a second initial nutation angle.
  14. 如权利要求12所述的测量方法,其特征在于,步骤S2中,所述起始四元数和所述当前四元数分别转化为惯导坐标系下的第一旋转顺序的第一起始欧拉角信息和第一当前欧拉角信息,以及第二旋转顺序的第二起始欧拉角信息和第二当前欧拉角信息;The measuring method as claimed in claim 12, wherein, in the step S 2, the first initial starting rotation of the first sequence and the current quaternion quaternion are converted to the coordinate system INS Euler angle information and first current Euler angle information, and second start Euler angle information and second current Euler angle information of the second rotation sequence;
    步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述主角度的步骤具体包括:Step S 3 in accordance with the Euler angles of the at least two initial information and the current step of the at least two primary Euler angles of the angle information calculating comprises:
    S31-2、根据所述第一起始欧拉角信息和所述第一当前欧拉角信息分别计算预估主角度和预估偏移角度;S 31-2 , calculating an estimated main angle and an estimated offset angle according to the first starting Euler angle information and the first current Euler angle information;
    S32-2、判断所述预估主角度是否小于角度阈值且所述预估主角度是否小于所述预估偏移角度;在判断为是时,执行步骤S23-3;在判断为否时,执行步骤S33-2’; S32-2 , determining whether the estimated main angle is smaller than an angle threshold and whether the estimated main angle is smaller than the estimated offset angle; when the determination is yes, performing step S23-3 ; When performing step S33-2 ';
    S33-2、将所述预估主角度确定为主角度;S 33-2 , determining the estimated main angle as a main angle;
    S33-2’、通过如下公式计算第二旋转顺序下的主角度变化值:S 33-2 ', calculate the main angle change value in the second rotation order by the following formula:
    主角度变化值=第二当前章动角±90°;The main angle change value = the second current nutation angle ± 90 °;
    S34-2’、通过如下公式计算主角度:S 34-2 ', calculate the main angle by the following formula:
    主角度=sign(预估主角度)×max(|主角度变化值|,|预估主角度|);Main angle = sign (estimated main angle) × max (|main angle change value |, | estimated main angle |);
    或,在所述主角度变化值大于90°时,通过如下公式计算主角度:Or, when the main angle change value is greater than 90°, the main angle is calculated by the following formula:
    主角度=sign(预估主角度)×(2×标准角度-第一起始章动角-第一当前章动角);Main angle = sign (estimated main angle) × (2 × standard angle - first starting nutation angle - first current nutation angle);
    优选地,步骤S31-2中具体通过如下公式计算预估主角度:Preferably, the estimated main angle is calculated in step S 31-2 by the following formula:
    预估主角度=第一当前章动角;Estimated main angle = first current nutation angle;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值大于等于5时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is greater than or equal to 5, the estimated offset angle is calculated by the following formula:
    预估偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Estimated offset angle = first current rotation angle -sign (first starting rotation angle) × 90 °;
    当第一当前章动角小于第二当前章动角且第二当前章动角的绝对值小于5,或者第一当前章动角大于等于第二当前章动角时,具体通过如下公式计算预估偏移角度:When the first current nutation angle is smaller than the second current nutation angle and the absolute value of the second current nutation angle is less than 5, or the first current nutation angle is greater than or equal to the second current nutation angle, the specific formula is calculated by the following formula Estimate the offset angle:
    预估偏移角度=第二当前自转角-sign(第一当前章动角)×90°; Estimated offset angle = second current rotation angle -sign (first current nutation angle) × 90 °;
    所述第一当前欧拉角信息包括第一当前自转角和第一当前章动角,所述第一起始欧拉角信息包括第一起始自转角和第一起始章动角,所述第二当前欧拉角信息包括第二当前自转角和第二当前章动角。The first current Euler angle information includes a first current rotation angle and a first current nutation angle, and the first starting Euler angle information includes a first initial rotation angle and a first initial nutation angle, the second The current Euler angle information includes a second current rotation angle and a second current nutation angle.
  15. 如权利要求13或14所述的测量方法,其特征在于,步骤S3中,根据所述至少两个起始欧拉角信息和所述至少两个当前欧拉角信息计算所述偏移角度的步骤具体包括:The method of claim 13 or measuring as claimed in claim 14, wherein the step S 3, the Euler angles of the at least two current information calculating the offset angle of the at least two initial information and the Euler angles The steps specifically include:
    S31-3、判断第一当前章动角是否小于第二当前章动角;在判断为是时,执行步骤S32-3;在判断为否时,执行步骤S32-3’;S 31-3 , determining whether the first current nutation angle is smaller than the second current nutation angle; when the determination is yes, executing step S32-3 ; when the determination is no, executing step S32-3 ';
    S32-3、通过如下公式计算偏移角度:S 32-3 , calculate the offset angle by the following formula:
    偏移角度=第一当前自转角-第一起始自转角;Offset angle = first current rotation angle - first starting rotation angle;
    或,偏移角度=第一当前自转角-sign(第一起始自转角)×90°;Or, the offset angle = the first current rotation angle -sign (first starting rotation angle) × 90 °;
    S32-4’、通过如下公式计算偏移角度:S 32-4 ', calculate the offset angle by the following formula:
    偏移角度=第二当前自转角-sign(第二起始自转角)×90°;Offset angle = second current rotation angle -sign (second starting rotation angle) × 90 °;
    所述第一起始欧拉角信息还包括第一起始自转角,所述第二起始欧拉角信息还包括第二起始自转角。The first starting Euler angle information further includes a first starting rotation angle, and the second starting Euler angle information further includes a second starting rotation angle.
  16. 如权利要求11所述的测量方法,其特征在于,所述康复运动参数包括:关节夹角;The measuring method according to claim 11, wherein the rehabilitation motion parameter comprises: an angle of joint;
    步骤S1具体包括:Step S 1 comprises:
    所述第一姿态传感器获取所述训练部位的姿态的第一四元数,所述第二姿态传感器获取所述训练部位的姿态的第二四元数;The first attitude sensor acquires a first quaternion of the posture of the training part, and the second attitude sensor acquires a second quaternion of the posture of the training part;
    步骤S2具体包括:Step S 2 comprises:
    所述控制器将所述第一四元数转换为惯导坐标系下的不同旋转顺序的至少两个欧拉角信息,将所述第二四元数转换为惯导坐标系下的所述不同旋转顺序的至少两个欧拉角信息;The controller converts the first quaternion into at least two Euler angle information of different rotation orders in an inertial coordinate system, and converts the second quaternion into the inertial coordinate system At least two Euler angle information for different rotation orders;
    步骤S3具体包括:Step S 3 comprises:
    所述控制器根据至少四个欧拉角信息计算所述训练部位的关节夹角。The controller calculates an angle of joint of the training site based on at least four Euler angle information.
  17. 如权利要求16所述的测量方法,其特征在于,步骤S2中,所述控制器将所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及 第二旋转顺序的第三欧拉角信息和第四欧拉角信息;The measuring method as claimed in claim 16, wherein, in the step S 2, the first controller sets the first and the second quaternion quaternion are converted to the coordinate system INS a first Euler angle information and a second Euler angle information of the rotation order, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
    根据至少四个欧拉角信息计算所述训练部位的关节夹角的步骤具体包括:The step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
    S3-1a、判断第一章动角的绝对值是否小于第一阈值;在判断为否时,执行步骤S3-2a;在判断为是时,执行步骤S3-3aS 3-1a , determining whether the absolute value of the first chapter moving angle is smaller than the first threshold; when the determination is no, step S 3-2a is performed ; when the determination is YES, executing step S 3-3a ;
    S3-2a、根据所述第三欧拉角信息和所述第四欧拉角信息计算所述关节夹角;S 3-2a , calculating the joint angle according to the third Euler angle information and the fourth Euler angle information;
    S3-3a、根据所述第一欧拉角信息、所述第三欧拉角信息和所述第四欧拉角信息计算所述关节夹角;S 3-3a , calculating the joint angle according to the first Euler angle information, the third Euler angle information, and the fourth Euler angle information;
    优选地,步骤S3-2a具体包括:Preferably, step S 3-2a specifically includes:
    在第一章动角和第二章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
    关节夹角=180°-|第三章动角-第四章动角|;Joint angle = 180 ° - | Chapter 3 Dynamic angle - Chapter 4 dynamic angle |
    在第一章动角和第二章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the first chapter of the dynamic angle and the second chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
    关节夹角=|第三章动角+第四章动角|;Joint angle =|Chapter 3 moving angle + fourth chapter moving angle|;
    优选地,步骤S3-3a具体包括:Preferably, step S 3-3a specifically includes:
    在预估角与第四章动角的乘积大于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is greater than 0, the joint angle is calculated by the following formula:
    关节夹角=180°-|第一章动角+sign(第三章动角)×90°-第四章动角|;Joint angle = 180 ° -|Chapter 1 moving angle + sign (third chapter moving angle) × 90 ° - Chapter 4 moving angle |
    在预估角与第四章动角的乘积小于0时,通过如下公式计算关节夹角:When the product of the predicted angle and the fourth chapter of the dynamic angle is less than 0, the joint angle is calculated by the following formula:
    关节夹角=|第一章动角+sign(第三章动角)×90°+第四章动角|;Joint angle =|Chapter 1 moving angle +sign (third chapter moving angle)×90°+fourth chapter moving angle|;
    其中,预估角=第一章动角+sign(第三章动角)×90°;Among them, the predicted angle = the first chapter moving angle + sign (third chapter moving angle) × 90 °;
    所述第一欧拉角信息包括第一章动角,所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三章动角,所述第四欧拉角信息包括第四章动角。The first Euler angle information includes a first nutation angle, the second Euler angle information includes a second nutation angle, and the third Euler angle information includes a third nutation angle, the fourth Europe The pull angle information includes the fourth chapter dynamic angle.
  18. 如权利要求16所述的测量方法,其特征在于,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;The measuring method as claimed in claim 16, wherein, in the step S 2, the first and the second quaternion quaternion into a third respectively a second rotation sequence under INS coordinates Euler angle information and fourth Euler angle information;
    根据至少四个欧拉角信息计算所述训练部位的关节夹角的步骤具体包括:The step of calculating the joint angle of the training portion according to the at least four Euler angle information specifically includes:
    S3-1b、通过如下公式计算关节夹角:S 3-1b , calculate the joint angle by the following formula:
    关节夹角=180°-|第三自转角-第四自转角|; Joint angle = 180° - | third rotation angle - fourth rotation angle |
    所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四自转角;The third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth rotation angle;
    优选地,步骤S3-1b之后,还包括:Preferably, after step S3-1b , the method further includes:
    S3-2b、通过如下公式计算第一临时角:S 3-2b , calculate the first temporary angle by the following formula:
    第一临时角=|第三自转角-第四自转角|;First temporary angle=|third rotation angle-fourth rotation angle|;
    S3-3b、判断所述第一临时角的绝对值是否大于第二阈值,并在判断为是时,执行步骤S3-4bS 3-3b , determining whether the absolute value of the first temporary angle is greater than a second threshold, and when the determination is yes, performing step S 3-4b ;
    S3-4b、通过如下公式计对所述关节夹角进行容错处理,以得到目标关节夹角:S 3-4b , the fault angle of the joint angle is calculated by the following formula to obtain the target joint angle:
    目标关节夹角=180°-|第一临时角-sign(第一临时角)×360°|。Target joint angle = 180° - | first temporary angle - sign (first temporary angle) × 360 ° |.
  19. 如权利要求16所述的测量方法,其特征在于,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第二旋转顺序的第三欧拉角信息和第四欧拉角信息;The measuring method as claimed in claim 16, wherein, in the step S 2, the first and the second quaternion quaternion into a third respectively a second rotation sequence under INS coordinates Euler angle information and fourth Euler angle information;
    步骤S3具体包括:Step S 3 comprises:
    S3-1c、通过如下公式计算关节夹角:S 3-1c , calculate the joint angle by the following formula:
    关节夹角=180°-|第三进动角-第四进动角|;Joint angle = 180° - | third precession angle - fourth precession angle |
    所述第三欧拉角信息包括第三进动角,所述第四欧拉角信息包括第四进动角;The third Euler angle information includes a third precession angle, and the fourth Euler angle information includes a fourth precession angle;
    优选地,步骤S3-1c之后,还包括:Preferably, after step S3-1c , the method further includes:
    S3-2c、通过如下公式计算第二临时角:S 3-2c , calculate the second temporary angle by the following formula:
    第二临时角=|第三进动角-第四进动角|;Second temporary angle =|third precession angle - fourth precession angle|;
    S3-3c、判断所述第二临时角的绝对值是否大于第二阈值;在判断为是时,执行步骤S3-4cS 3-3c , determining whether the absolute value of the second temporary angle is greater than a second threshold; when the determination is yes, performing step S 3-4c ;
    S3-4c、通过如下公式对所述关节夹角进行容错处理,以得到目标关节夹角:S 3-4c , the joint angle is fault-tolerant by the following formula to obtain the target joint angle:
    目标关节夹角=180°-|第二临时角-sign(第二临时角)×360°|。Target joint angle = 180° - | second temporary angle - sign (second temporary angle) × 360 ° |.
  20. 如权利要求16所述的测量方法,其特征在于,步骤S2中,所述第一四元数和所述第二四元数分别转化为惯导坐标系下的第一旋转顺序的第一欧拉角信息和第二欧拉角信息,以及第二旋转顺序的第三欧拉角信息和第四欧拉角信息;The measuring method as claimed in claim 16, wherein, in the step S 2, the first and the second quaternion quaternion are converted to a first order in a first rotational INS coordinates Euler angle information and second Euler angle information, and third Euler angle information and fourth Euler angle information of the second rotation sequence;
    步骤S3具体包括:Step S 3 comprises:
    S3-1d、判断所述第二章动角的绝对值是否小于第一阈值;在判断为否时,执行步骤S3-2d;在判断 为是时,执行步骤S3-3d S3-1d , determining whether the absolute value of the second chapter moving angle is smaller than the first threshold; when the determination is no, step S3-2d is performed ; when the determination is yes, step S3-3d is performed ;
    S3-2d、通过如下公式计算关节夹角:S 3-2d , calculate the joint angle by the following formula:
    关节夹角=180°-|第三自转角-(补偿角+第四章动角)|;Joint angle = 180° - | third rotation angle - (compensation angle + fourth chapter dynamic angle) |;
    S3-3d、通过如下公式计算关节夹角:S 3-3d , calculate the joint angle by the following formula:
    关节夹角=180°-|第三自转角-(补偿角+第二章动角±90°)|;Joint angle = 180° - | third rotation angle - (compensation angle + second chapter movement angle ± 90 °) |
    所述第二欧拉角信息包括第二章动角,所述第三欧拉角信息包括第三自转角,所述第四欧拉角信息包括第四章动角。 The second Euler angle information includes a second chapter angle, the third Euler angle information includes a third rotation angle, and the fourth Euler angle information includes a fourth chapter movement angle.
PCT/CN2017/114546 2017-11-06 2017-12-05 Rehabilitation exercise parameter measurement system and method WO2019085139A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201711079127.7 2017-11-06
CN201711079127.7A CN108209931B (en) 2017-11-06 2017-11-06 System and method for measuring joint included angle
CN201711080208.9 2017-11-06
CN201711080208.9A CN108225317A (en) 2017-11-06 2017-11-06 The measuring system and method for rehabilitation exercise parameter

Publications (1)

Publication Number Publication Date
WO2019085139A1 true WO2019085139A1 (en) 2019-05-09

Family

ID=66331280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/114546 WO2019085139A1 (en) 2017-11-06 2017-12-05 Rehabilitation exercise parameter measurement system and method

Country Status (1)

Country Link
WO (1) WO2019085139A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105232052A (en) * 2015-10-21 2016-01-13 武汉纺织大学 Device for recognizing human lower limbs movement posture by virtue of combined sensor
US20160324461A1 (en) * 2015-05-08 2016-11-10 Sharp Laboratories of America (SLA), Inc. System and Method for Measuring Body Joint Range of Motion
CN106725305A (en) * 2016-11-23 2017-05-31 深圳先进技术研究院 Pain scale evaluation method and system based on human body attitude angle
CN107616898A (en) * 2017-08-31 2018-01-23 东南大学 The wearable healing robot of upper limbs and Rehabilitation Assessment method based on everyday actions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160324461A1 (en) * 2015-05-08 2016-11-10 Sharp Laboratories of America (SLA), Inc. System and Method for Measuring Body Joint Range of Motion
CN105232052A (en) * 2015-10-21 2016-01-13 武汉纺织大学 Device for recognizing human lower limbs movement posture by virtue of combined sensor
CN106725305A (en) * 2016-11-23 2017-05-31 深圳先进技术研究院 Pain scale evaluation method and system based on human body attitude angle
CN107616898A (en) * 2017-08-31 2018-01-23 东南大学 The wearable healing robot of upper limbs and Rehabilitation Assessment method based on everyday actions

Similar Documents

Publication Publication Date Title
CN107750148B (en) Impedance displacement and drift detection and correction
Charlton et al. Repeatability of an optimised lower body model
EP2675347B1 (en) System for registration of multiple navigation systems to a common coordinate frame
Żuk et al. Kinematic analysis of a six-degrees-of-freedom model based on ISB recommendation: a repeatability analysis and comparison with conventional gait model
WO2015162158A1 (en) Human motion tracking
EP3064134A1 (en) Inertial motion capture calibration
JP2010520780A (en) System and method for correcting non-uniform fields
Speers et al. Multivariate changes in coordination of postural control following spaceflight
US20190274620A1 (en) Method for diagnosing scoliosis using spatial coordinates of body shape and computer program therefor
CN108209931B (en) System and method for measuring joint included angle
US20210369472A1 (en) Systems And Methods For Planning Placement Of An Acetabular Implant For A Patient Based On Pelvic Tilt
CN108309301B (en) Human body segment quality measuring method
WO2019085139A1 (en) Rehabilitation exercise parameter measurement system and method
KR101788960B1 (en) Automatic Measuring System for Range of Motion and Automatic Measuring Method for range of Motion Using the Same
Miezal et al. Ambulatory inertial spinal tracking using constraints
JP7332728B2 (en) 3D geolocation system
Yi et al. Sensor-movement-robust angle estimation for 3-DoF lower limb joints without calibration
CN109475318B (en) Method and system for impedance offset detection
Norden et al. Real-time joint axes estimation of the hip and knee joint during gait using inertial sensors
CN105575239B (en) A kind of reduction of the fracture training pattern angle detection device and its method
CN106456051A (en) Respiratory monitoring apparatus, method and device
JP6451838B2 (en) X-ray equipment
Krikelis et al. Sources of error when measuring Achilles tendon mechanics during the stance phase of running
Cao et al. IMU-based real-time pose measurement system for anterior pelvic plane in total hip replacement surgeries
Kutilek et al. Comparative measurement of the head orientation using camera system and gyroscope system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17930386

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17930386

Country of ref document: EP

Kind code of ref document: A1