CN104457741A - Human arm movement tracing method based on ant colony algorithm error correction - Google Patents
Human arm movement tracing method based on ant colony algorithm error correction Download PDFInfo
- Publication number
- CN104457741A CN104457741A CN201410742272.9A CN201410742272A CN104457741A CN 104457741 A CN104457741 A CN 104457741A CN 201410742272 A CN201410742272 A CN 201410742272A CN 104457741 A CN104457741 A CN 104457741A
- Authority
- CN
- China
- Prior art keywords
- arm
- joint
- error
- sensing unit
- attitude
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000012937 correction Methods 0.000 title claims abstract description 26
- 210000002310 elbow joint Anatomy 0.000 claims abstract description 21
- 230000008569 process Effects 0.000 claims abstract description 11
- 230000003068 static effect Effects 0.000 claims abstract description 11
- 210000000323 shoulder joint Anatomy 0.000 claims abstract description 6
- 238000001914 filtration Methods 0.000 claims abstract 2
- 230000001133 acceleration Effects 0.000 claims description 16
- 239000003016 pheromone Substances 0.000 claims description 16
- 230000008602 contraction Effects 0.000 claims description 11
- 238000013461 design Methods 0.000 claims description 7
- 230000007704 transition Effects 0.000 claims description 5
- 238000009826 distribution Methods 0.000 claims description 3
- 238000001704 evaporation Methods 0.000 claims description 3
- 230000008020 evaporation Effects 0.000 claims description 3
- 230000002093 peripheral effect Effects 0.000 claims description 3
- 238000012986 modification Methods 0.000 claims description 2
- 230000004048 modification Effects 0.000 claims description 2
- 210000000707 wrist Anatomy 0.000 claims description 2
- 238000007405 data analysis Methods 0.000 claims 1
- 210000003205 muscle Anatomy 0.000 abstract description 3
- 230000007306 turnover Effects 0.000 abstract 1
- 210000003857 wrist joint Anatomy 0.000 description 24
- 238000005259 measurement Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 11
- 239000011159 matrix material Substances 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 239000013598 vector Substances 0.000 description 5
- 230000009466 transformation Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 210000001503 joint Anatomy 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 210000003414 extremity Anatomy 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 229910000679 solder Inorganic materials 0.000 description 2
- 241000257303 Hymenoptera Species 0.000 description 1
- 208000000875 Spinal Curvatures Diseases 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000005021 gait Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000004118 muscle contraction Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Length Measuring Devices With Unspecified Measuring Means (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种姿态跟踪方法,尤其是一种基于蚁群算法误差修正的人体手臂运动跟踪方法。 The invention relates to a posture tracking method, in particular to a human arm motion tracking method based on ant colony algorithm error correction.
背景技术 Background technique
姿态跟踪系统在国防和国民经济中发挥着越来越重要的作用。通过对人体姿态的实时捕捉测量及数据的处理和分析,可以有效地实现诸如三维步态分析、人工假肢辅助制作和矫正、脊柱弯曲矫正测量等辅助诊断和治疗以及运动训练等。 Attitude tracking systems play an increasingly important role in national defense and the national economy. Through the real-time capture measurement of human body posture and data processing and analysis, auxiliary diagnosis and treatment such as three-dimensional gait analysis, artificial prosthesis auxiliary production and correction, spinal curvature correction measurement, and sports training can be effectively realized.
惯性运动跟踪系统主要由MEMS(Microelectromechanical Systems,缩写为MEMS)加速度计、陀螺仪和磁力计组成。由于MEMS传感器的制造原因和使用方法,MEMS加速度计的静态输出存在一定的测量误差,限制了其使用效果。目前,工程中使用较为普遍的静态修正方法是最大值最小值法,该方法的缺点是仅能估计标度因子误差和零位偏差,而且容易受到随机误差的干扰。另一种较为常用的修正方法是和陀螺仪组成惯性测量单元进行测试,具体的有组合标定补偿方法,该方法主要是依靠旋转平台提供的参考数据进行误差修正,可以同时校准静态和动态误差,此方法模型完善、修正效果精度高,但是在修正过程中,需要多次操作旋转平台,修正过程复杂繁琐,而且旋转平台的造价也超出了普通用户的承受范围。 The inertial motion tracking system is mainly composed of MEMS (Microelectromechanical Systems, abbreviated as MEMS) accelerometer, gyroscope and magnetometer. Due to the manufacturing reasons and usage methods of MEMS sensors, there is a certain measurement error in the static output of MEMS accelerometers, which limits its use effect. At present, the most common static correction method used in engineering is the maximum and minimum method. The disadvantage of this method is that it can only estimate the scale factor error and zero position deviation, and it is easily disturbed by random errors. Another commonly used correction method is to form an inertial measurement unit with a gyroscope for testing. Specifically, there is a combined calibration compensation method. This method mainly relies on the reference data provided by the rotating platform for error correction, and can simultaneously calibrate static and dynamic errors. This method has a perfect model and high accuracy of correction effect, but in the correction process, it needs to operate the rotating platform multiple times, the correction process is complicated and cumbersome, and the cost of the rotating platform is beyond the range of ordinary users.
已知,人体运动具有一定的几何约束,引入这些约束可以实现更好的运动 跟踪效果。目前常用的关节链接的骨骼模型跟踪人体姿态的方法,通过坐标系间的变换得到手臂肘关节和腕关节间空间位置,通过约束关系运用拉格朗日最优化方法得到参考肩关节点的位置。该方法定位了关节位置,但在手臂的翻转时不能得到相应的翻转角度。 It is known that human motion has certain geometric constraints, and the introduction of these constraints can achieve better motion tracking effects. At present, the commonly used joint-linked bone model is used to track the posture of the human body. The space position between the elbow joint and the wrist joint of the arm is obtained through the transformation between the coordinate systems, and the position of the reference shoulder joint is obtained by using the Lagrangian optimization method through the constraint relationship. This method locates the joint position, but cannot get the corresponding flip angle when the arm is flipped.
发明内容 Contents of the invention
本发明目的在于提供一种可提高姿态信息精度、并能改善人体惯性运动跟踪中精度差与运动漂移问题的基于蚁群算法误差修正的人体手臂运动跟踪方法。 The purpose of the present invention is to provide a human arm motion tracking method based on ant colony algorithm error correction, which can improve the accuracy of attitude information and improve the problems of poor precision and motion drift in human inertial motion tracking.
为实现上述目的,本发明所述跟踪方法包括如下步骤: To achieve the above object, the tracking method of the present invention includes the following steps:
(1)将三轴MEMS加速度计、三轴陀螺仪、三轴磁力计和微控制器通过外围电路焊接于电路板上组成惯性传感单元,并保证加速度计的正常操作和数据输出;将惯性传感单元固定于可绕空间一点360度旋转的转动平台上,保证电路板能够在空间的三个轴向上自由旋转; (1) Solder the three-axis MEMS accelerometer, three-axis gyroscope, three-axis magnetometer and microcontroller on the circuit board through the peripheral circuit to form an inertial sensing unit, and ensure the normal operation and data output of the accelerometer; The sensing unit is fixed on a rotating platform that can rotate 360 degrees around one point in the space to ensure that the circuit board can rotate freely in the three axial directions of the space;
(2)通过可360度旋转的转动平台,以手动或者自动方式驱动惯性传感单元在空间旋转,且旋转速度小于10°/s,保证惯性传感单元的旋转轨迹覆盖轨迹球面的全部分布,同时记录惯性传感单元的实际输出数据,建立数据库; (2) Through the rotating platform that can rotate 360 degrees, the inertial sensing unit is driven to rotate in space manually or automatically, and the rotation speed is less than 10°/s, so as to ensure that the rotation track of the inertial sensing unit covers the entire distribution of the trajectory sphere, At the same time, record the actual output data of the inertial sensing unit and establish a database;
(3)将采集的数据进行预处理,去除错误数据,建立惯性传感单元误差模型,设计加速度计的误差估计算法; (3) Preprocess the collected data, remove erroneous data, establish the error model of the inertial sensing unit, and design the error estimation algorithm of the accelerometer;
(4)对误差模型中惯性传感单元的输出数据进行分析,采用蚁群算法对误差模型进行参数拟合,对误差模型进行静态修正,设置加速度的误差修正模型, 设计加速度计的误差估计算法,得到最佳的误差参数; (4) Analyze the output data of the inertial sensing unit in the error model, use the ant colony algorithm to fit the parameters of the error model, perform static correction on the error model, set the acceleration error correction model, and design the error estimation algorithm of the accelerometer , get the best error parameter;
(5)采用卡尔曼滤波算法进行姿态解算,估计手臂关节位置; (5) Use the Kalman filter algorithm to calculate the attitude and estimate the position of the arm joints;
(6)分析手臂姿态的运动规律,提出肘关节在手臂运动过程中的几何约束条件,建立腕、肘关节的空间坐标系,得出手臂的关节位置估计;建立关节伸展、收缩的平面约束,补偿漂移误差; (6) Analyze the movement law of the arm posture, propose the geometric constraints of the elbow joint during the arm movement process, establish the spatial coordinate system of the wrist and elbow joints, and obtain the joint position estimation of the arm; establish the plane constraints of joint extension and contraction, Compensation for drift errors;
(7)将惯性传感单元固定在人体手臂上,对人体手臂运动姿态进行跟踪。 (7) Fix the inertial sensing unit on the human arm to track the movement posture of the human arm.
本方法针对上、下臂的收缩、伸展和下臂的翻转进行角度约束,通过空间三维变换,得到以肩关节为中心节点的手臂运动姿态,所述的角度约束通过人体三维模型应用实现手臂的姿态跟踪与再现。 This method performs angle constraints on the contraction and extension of the upper and lower arms and the flipping of the lower arms, and obtains the arm motion posture with the shoulder joint as the central node through three-dimensional transformation in space. The angle constraints are realized through the application of the three-dimensional human body model Pose tracking and reproduction.
其中,所述蚁群算法步骤如下:定义蚁群个数为100,根据自变量的范围,随机初始群体位置,设目标函数值为信息素大小;每只蚂蚁依据信息素的大小判断其是否移动及移动程度,转移概率P为下一转移点函数值与最小函数值之差与最小函数值的比值,若P大于某个随机数时,进行全局搜索,否则进行局部搜索;当原来值不是最优值时,则蚂蚁向最优值位置移动;同时更新当前点信息素:其中fi为函数值,为第i只蚂蚁当前位置信息素的强度,ρ(0<ρ<1)为信息素蒸发系数对上述过程重复迭代,直至得到最优拟合参数或达到一定的迭代次数。 Wherein, the steps of the ant colony algorithm are as follows: define the number of ant colonies as 100, according to the scope of the independent variable, the random initial colony position, set the objective function value as the size of the pheromone; each ant judges whether it moves according to the size of the pheromone and the degree of movement, the transition probability P is the ratio of the difference between the function value of the next transition point and the minimum function value to the minimum function value, if P is greater than a certain random number, a global search is performed, otherwise a local search is performed; when the original value is not the minimum When the optimal value is obtained, the ant moves to the optimal value position; at the same time, the current point pheromone is updated: where f i is the function value, is the strength of the pheromone at the current position of the ith ant, and ρ(0<ρ<1) is the pheromone evaporation coefficient. Repeat the above process until the optimal fitting parameters are obtained or a certain number of iterations is reached.
本发明方法工作原理大致如下: The working principle of the inventive method is roughly as follows:
首先通过分析MEMS加速度计的测量原理及其使用方法,确定其主要误差来源,在原有的误差模型基础上,提出了基于蚁群算法的加速度计静态修正方 法,得到最优的加速度值。然后采用卡尔曼滤波算法进行姿态解算,同时针对上下臂的收缩、伸展和下臂的翻转进行角度约束,通过手臂的骨骼约束计算肘节点、腕节点相对于肩部的位置,对手臂运动过程中抖动和肌肉变形引起的随机漂移误差进行补偿,得到手臂位置信息。 Firstly, by analyzing the measurement principle and usage method of the MEMS accelerometer, the main error source is determined. On the basis of the original error model, a static correction method of the accelerometer based on the ant colony algorithm is proposed to obtain the optimal acceleration value. Then the Kalman filter algorithm is used to calculate the attitude, and at the same time, the contraction and extension of the upper and lower arms and the flipping of the lower arm are constrained to angle, and the position of the elbow node and wrist node relative to the shoulder is calculated through the skeletal constraints of the arm, and the arm movement process is analyzed. The random drift error caused by the jitter and muscle deformation is compensated to obtain the arm position information.
与现有技术相比,本发明具有如下优点: Compared with prior art, the present invention has following advantage:
1、本方法有效地剔除采样过程中的随机误差,提高MEMS加速度计的测量精度; 1. This method effectively eliminates random errors in the sampling process and improves the measurement accuracy of the MEMS accelerometer;
2、本方法不需要三轴旋转平台,降低用户使用成本,计算方法简单、易于实现,使MEMS加速度计更好的满足工程实际要求,为户外测试等环境提供新选择; 2. This method does not require a three-axis rotating platform, which reduces user costs. The calculation method is simple and easy to implement, so that the MEMS accelerometer can better meet the actual requirements of the project and provide new options for outdoor testing and other environments;
3、本方法通过设计手臂肘关节的几何约束模型,对手臂运动过程中抖动和肌肉变形引起的随机漂移误差进行了补偿,能得到手臂关节的正确位置估计。 3. By designing the geometric constraint model of the arm elbow joint, this method compensates the random drift error caused by the shaking and muscle deformation during the arm movement, and can obtain the correct position estimation of the arm joint.
附图说明 Description of drawings
图1是本发明方法的工作流程图。 Fig. 1 is the work flowchart of the inventive method.
图2是本方法中蚁群算法的寻优流程图。 Fig. 2 is an optimization flow chart of the ant colony algorithm in this method.
图3是实施例一中加速度原始值与误差修正后加速度幅值的对比图。 Fig. 3 is a comparison diagram between the original acceleration value and the acceleration amplitude after error correction in the first embodiment.
图4是实施例一中腕关节和肘关节空间参考坐标图。 Fig. 4 is a spatial reference coordinate diagram of the wrist joint and the elbow joint in the first embodiment.
图5是实施例一中关节伸展、收缩约束的简易效果图。 Fig. 5 is a simplified rendering of joint extension and contraction constraints in Embodiment 1.
图6是实施例一中测量单元固定于腕关节手臂弯曲运动时腕关节运动轨迹图。 Fig. 6 is a diagram of the movement track of the wrist joint when the measuring unit is fixed on the wrist joint and the arm bends in the first embodiment.
图7是实施例一中测量单元固定于手臂中部手臂弯曲运动时腕关节运动轨迹图。 Fig. 7 is a diagram of the motion track of the wrist joint when the measuring unit is fixed in the middle of the arm and the arm bends in the first embodiment.
图8是实施例一中肘关节的节点位置估计坐标图。 Fig. 8 is a coordinate diagram of the node position estimation of the elbow joint in the first embodiment.
图9是实施例一中腕关节的节点位置估计坐标图。 Fig. 9 is a coordinate diagram of the node position estimation of the wrist joint in the first embodiment.
具体实施方式 Detailed ways
本发明所述跟踪方法包括如下步骤: The tracking method of the present invention comprises the following steps:
(1)将三轴MEMS加速度计、三轴陀螺仪、三轴磁力计和微控制器通过外围电路焊接于电路板上组成惯性传感单元,并保证加速度计的正常操作和数据输出;将惯性传感单元固定于可绕空间一点360度旋转的转动平台上,保证电路板能够在空间的三个轴向上自由旋转; (1) Solder the three-axis MEMS accelerometer, three-axis gyroscope, three-axis magnetometer and microcontroller on the circuit board through the peripheral circuit to form an inertial sensing unit, and ensure the normal operation and data output of the accelerometer; The sensing unit is fixed on a rotating platform that can rotate 360 degrees around one point in the space to ensure that the circuit board can rotate freely in the three axial directions of the space;
(2)通过外部装置可360度旋转的转动平台,以手动或者自动方式驱动惯性传感单元在空间旋转,且旋转速度小于10°/s,保证惯性传感单元的旋转轨迹覆盖轨迹球面的全部分布,同时记录惯性传感单元的实际输出数据,建立数据库; (2) The rotating platform that can rotate 360 degrees through an external device drives the inertial sensing unit to rotate in space manually or automatically, and the rotation speed is less than 10°/s, ensuring that the rotation track of the inertial sensing unit covers all of the trajectory spherical surface distribution, record the actual output data of the inertial sensing unit at the same time, and establish a database;
(3)将采集的数据进行预处理后,去除错误数据,建立惯性传感单元误差模型,设计加速度计的误差估计算法; (3) After preprocessing the collected data, remove the wrong data, establish the error model of the inertial sensing unit, and design the error estimation algorithm of the accelerometer;
(4)对误差模型中惯性传感单元的输出数据进行分析,采用蚁群算法对误差模型进行参数拟合,对误差模型进行静态修正,设置加速度的误差修正模型,设计加速度计的误差估计算法,得到最佳的误差参数; (4) Analyze the output data of the inertial sensing unit in the error model, use the ant colony algorithm to fit the parameters of the error model, perform static correction on the error model, set the acceleration error correction model, and design the error estimation algorithm of the accelerometer , get the best error parameter;
(5)采用卡尔曼滤波算法进行姿态解算,估计手臂关节位置; (5) Use the Kalman filter algorithm to calculate the attitude and estimate the position of the arm joints;
(6)分析手臂姿态的运动规律,提出肘关节在手臂运动过程中的几何约束条件,建立腕、肘关节的空间坐标系,得到手臂的关节位置估计;建立关节伸 展、收缩的平面约束,补偿漂移误差; (6) Analyze the movement law of the arm posture, propose the geometric constraints of the elbow joint during the arm movement process, establish the spatial coordinate system of the wrist and elbow joints, and obtain the joint position estimation of the arm; establish the plane constraints of joint extension and contraction, Compensation for drift errors;
(7)将惯性传感单元固定在人体手臂上,对人体手臂运动姿态进行跟踪。 (7) Fix the inertial sensing unit on the human arm to track the movement posture of the human arm.
本方法针对上、下臂的收缩、伸展和下臂的翻转进行角度约束,通过空间三维变换,得到以肩关节为中心节点的手臂运动姿态,所述的角度约束通过人体三维模型应用实现手臂的姿态跟踪与再现。 This method performs angle constraints on the contraction and extension of the upper and lower arms and the flipping of the lower arms, and obtains the arm motion posture with the shoulder joint as the central node through three-dimensional transformation in space. The angle constraints are realized through the application of the three-dimensional human body model Pose tracking and reproduction.
以下结合附图与具体实施方式对本发明做进一步说明: The present invention will be further described below in conjunction with accompanying drawing and specific embodiment:
实施例一: Embodiment one:
所述惯性传感单元由微控制器、三轴加速度计、三轴陀螺仪、三轴磁力计组成。微控制器发送姿态信息给个人计算机,进行约束的解算。为兼顾处理速度和功耗的平衡,选用STM32作为姿态传感单元姿态解算的核心。加速度计选用ADXL345,设定最大测量范围为±2g;陀螺仪和磁力计分别选用意法半导体的L3G4200和Honeywell的HMC5883。 The inertial sensing unit is composed of a microcontroller, a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. The microcontroller sends attitude information to the personal computer for constraint resolution. In order to balance the processing speed and power consumption, STM32 is selected as the core of the attitude calculation of the attitude sensing unit. The accelerometer is ADXL345, and the maximum measurement range is set to be ±2g; the gyroscope and the magnetometer are respectively L3G4200 from STMicroelectronics and HMC5883 from Honeywell.
图1是本发明方法的工作流程图。采用蚁群算法对加速度计静态误差进行校正,补偿加速度计输出对系统精度的影响。采用卡尔曼滤波算法进行姿态解算,估计手臂关节姿态信息。同时引入了运动几何约束模型,对上下臂的收缩/伸展和下臂的翻转进行了角度约束,这些约束对手臂运动过程中由于抖动和肌肉收缩变形产生的漂移进行补偿。 Fig. 1 is the work flowchart of the inventive method. The ant colony algorithm is used to correct the static error of the accelerometer and compensate the influence of the accelerometer output on the system accuracy. The Kalman filter algorithm is used for attitude calculation, and the arm joint attitude information is estimated. At the same time, the geometric constraint model of motion is introduced, and the contraction/extension of the upper and lower arms and the flipping of the lower arm are angle constrained. These constraints compensate for the drift caused by shaking and muscle contraction deformation during arm movement.
图2是蚁群算法的寻优流程图。通过蚁群算法对加速度计误差模型参数进行数据拟合,蚁群算法根据群体中信息素大小指导蚂蚁运动,从而得到待解决问题最优解。 Figure 2 is a flow chart of the optimization of the ant colony algorithm. The data fitting of the parameters of the accelerometer error model is carried out through the ant colony algorithm, and the ant colony algorithm guides the movement of the ants according to the size of the pheromone in the colony, so as to obtain the optimal solution to the problem to be solved.
蚁群算法步骤如下:定义蚁群个数为100,根据自变量的范围,随机初始群体位置,设目标函数值就为信息素大小;每只蚂蚁依据信息素的大小判断其是否移动及移动程度,转移概率P为下一转移点函数值(即信息素)与最小函数值之差与最小函数值的比值,若P大于某个随机数时,进行全局搜索,否则进行局部搜索;当原来值不是最优值时,则蚂蚁向最优值位置移动;同时更新当前点信息素:其中fi为函数值,为第i只蚂蚁当前位置信息素的强度,ρ(0<ρ<1)为信息素蒸发系数。对上述过程重复迭代,直至得到最优拟合参数或达到一定的迭代次数。 The steps of the ant colony algorithm are as follows: define the number of ant colonies as 100, according to the range of independent variables, randomize the initial group position, set the value of the objective function as the size of the pheromone; each ant judges whether it moves and the degree of movement according to the size of the pheromone , the transition probability P is the ratio of the difference between the function value of the next transition point (that is, the pheromone) and the minimum function value and the minimum function value. If P is greater than a certain random number, a global search is performed, otherwise a local search is performed; when the original value When it is not the optimal value, the ant moves to the optimal value position; at the same time, the current point pheromone is updated: where f i is the function value, is the strength of the pheromone at the current position of the ith ant, and ρ(0<ρ<1) is the pheromone evaporation coefficient. The above process is iteratively repeated until the optimal fitting parameters are obtained or a certain number of iterations is reached.
拟合得到的最佳误差模型参数值为: The best error model parameters obtained by fitting are:
图3是加速度原始值与误差修正后加速度幅值的对比图。通过对加速度计输出连续采样,采样点覆盖了加速度计旋转球面所有点,以保证参数估计的精度和准确性。加速度计理想输出为1g,实际加速度计输出均值达到1.06g,通过蚁群算法进行静态误差修正,修正后加速度值平均值为1.002g,修正后加速度值方差与原始数据相比下降70%,误差修正效果明显,如表1所示。(其中,“ACO”为蚁群算法简称) Figure 3 is a comparison chart between the original acceleration value and the acceleration amplitude after error correction. By continuously sampling the output of the accelerometer, the sampling points cover all points on the rotating sphere of the accelerometer to ensure the precision and accuracy of parameter estimation. The ideal output of the accelerometer is 1g, and the average output value of the actual accelerometer reaches 1.06g. The static error correction is carried out through the ant colony algorithm. The average value of the acceleration value after correction is 1.002g. The correction effect is obvious, as shown in Table 1. (Among them, "ACO" is the abbreviation of Ant Colony Algorithm)
表1重力加速度值修正前后幅值比较 Table 1 Gravity acceleration value before and after correction amplitude comparison
图4是腕关节和肘关节空间参考坐标图。定义是一个3×3的旋转矩阵,表明姿态从传感器坐标系到地理坐标系的变换: Fig. 4 is a spatial reference coordinate diagram of the wrist joint and the elbow joint. definition is a 3×3 rotation matrix indicating the transformation of the attitude from the sensor coordinate system to the geographic coordinate system:
其中vw和vb分别表示地理坐标系和传感器坐标系中的线性加速度。下一时刻的状态可通过下式更新: where v w and v b denote the linear acceleration in the geographic coordinate system and the sensor coordinate system, respectively. state of the next moment It can be updated by:
其中S(ωb)=[ωb×]是一个反对称矩阵,代表角速度估计的叉乘运算。得到旋转矩阵,地理坐标系中的加速度向量可推断出来: Among them, S(ω b )=[ω b ×] is an antisymmetric matrix, which represents the cross product operation of angular velocity estimation. Obtaining the rotation matrix, the acceleration vector in the geographic coordinate system can be deduced:
其中是一个3×3的旋转矩阵,ab表示传感器坐标系中的加速度向量。得到在地理坐标系中表示的加速度和欧拉角,就可以知道肘关节和腕关节在地理坐标系中的位置矢量,假设上臂长度是L1,下臂长度是L2。在静态条件下,两个惯性传感器的X轴与上臂和下臂的指向是共线的。在移动过程中,肘关节位置Pe在以肩部为基准的坐标系中通过下式计算: in is a 3×3 rotation matrix, and a b represents the acceleration vector in the sensor coordinate system. By obtaining the acceleration and Euler angle expressed in the geographic coordinate system, the position vectors of the elbow and wrist joints in the geographic coordinate system can be known, assuming that the length of the upper arm is L 1 and the length of the lower arm is L 2 . Under static conditions, the X axes of the two inertial sensors are collinear with the orientation of the upper and lower arms. During the movement, the position of the elbow joint P e is calculated by the following formula in the coordinate system based on the shoulder:
Pe=ResPe0 P e =R es P e0
其中Res是上臂的旋转矩阵,Pe0=[L1,0,0]T。腕关节位置Pw在以肩部为基准的坐标系中可以推算出其位置: Where R es is the rotation matrix of the upper arm, P e0 =[L 1 ,0,0] T . The position of the wrist joint P w can be calculated in the coordinate system based on the shoulder:
Pw=RwePw0+Pe P w =R we P w0 +P e
其中Rwe是下臂的旋转矩阵,Pw0=[L2,0,0]T。 Where R we is the rotation matrix of the lower arm, P w0 =[L 2 ,0,0] T .
图5是关节伸展、收缩约束的简易效果图。肘关节的内转和外转基本上被限制,即内转角а被限制在一个很小的角度,同时可得出下臂的x轴和上臂的x-y平面呈平行状态,即和上臂的z轴垂直,通过如下点乘式表示: Figure 5 is a simple effect diagram of joint extension and contraction constraints. The internal rotation and external rotation of the elbow joint are basically limited, that is, the internal rotation angle а is limited to a small angle, and at the same time, it can be concluded that the x-axis of the lower arm is parallel to the x-y plane of the upper arm, that is, the z-axis of the upper arm Vertical, represented by the following point multiplication formula:
式中ωt是高斯白噪声,和分别是肢体坐标系中下臂x轴向量和上臂的z轴向量。同时对于手臂的伸展和收缩,动作也是限制在一个特定的角度,手臂的收缩角处于一个特定的范围,也即上臂的x轴和下臂的x轴之间的夹角是有限制的,其可以表示如下: where ωt is Gaussian white noise, and are the x-axis vector of the lower arm and the z-axis vector of the upper arm in the limb coordinate system, respectively. At the same time, for the extension and contraction of the arm, the movement is also limited to a specific angle, and the retraction angle of the arm is in a specific range, that is, the angle between the x-axis of the upper arm and the x-axis of the lower arm is limited. Can be expressed as follows:
上式只是一个必要非充分条件,因为下臂x轴和上臂x-y平面平行的关系,可以得到另外一个约束关系: The above formula is only a necessary but not sufficient condition, because the x-axis of the lower arm is parallel to the x-y plane of the upper arm, another constraint relationship can be obtained:
式中γ表示下臂x轴和上臂y轴之间的夹角。当上臂位置不动,带动下臂进行手掌翻转动作时,其翻转角处于一定的范围,在医疗手术中一般变化范围小且变化平滑,其变化范围可以看作是上臂的z轴和下臂z轴之间的角度,表示如下: where γ represents the angle between the x-axis of the lower arm and the y-axis of the upper arm. When the upper arm does not move and the lower arm is driven to flip the palm, the flip angle is within a certain range. In medical operations, the range of change is generally small and smooth. The range of change can be regarded as the z-axis of the upper arm and the z-axis of the lower arm. The angle between the axes, expressed as follows:
首先实验IMU测量单元对单个肢体的姿态测量结果和传感器的安装位置对姿态测量结果的影响。将姿态测量单元固定于靠近腕关节和肘关节3cm处,保持身体其他部位不动,肩关节位置可近似看成固定,作为位置原点,对传感器数据采样,频率为25Hz。单个IMU测量单元的测量精确程度影响整个系统的姿态跟踪精度。 Firstly, the IMU measurement unit is used to test the attitude measurement results of a single limb and the influence of the installation position of the sensor on the attitude measurement results. Fix the attitude measurement unit 3cm close to the wrist joint and elbow joint, keep other parts of the body still, the position of the shoulder joint can be regarded as fixed, as the origin of the position, and sample the sensor data at a frequency of 25Hz. The measurement accuracy of a single IMU measurement unit affects the attitude tracking accuracy of the entire system.
图6是将惯性传感单元固定于腕关节位置手臂弯曲运动时腕关节运动轨迹图。测得正常人体的上臂和下臂长度都为30cm左右,为便于结果的对比,在此 取L1=30cm,L2=30cm。首先将惯性传感单元固定在距离腕关节3cm处,保持上臂不动,下臂以较慢的速度做伸展和收缩运动,重复运动4次,测量腕关节的运动轨迹。 Fig. 6 is a diagram of the trajectory of the wrist joint when the inertial sensing unit is fixed at the position of the wrist joint and the arm bends. The measured lengths of the upper arm and the lower arm of a normal human body are both about 30cm. To facilitate the comparison of the results, L 1 =30cm and L 2 =30cm are taken here. First, fix the inertial sensing unit at a distance of 3cm from the wrist joint, keep the upper arm still, stretch and contract the lower arm at a slower speed, repeat the movement 4 times, and measure the movement trajectory of the wrist joint.
图7是将惯性传感单元固定于手臂中部手臂弯曲运动时腕关节运动轨迹图。将惯性传感单元固定于下臂中部,保持上臂不动,下臂以较慢的速度做伸展和收缩运动,重复运动4次,测量腕关节的运动轨迹。 Fig. 7 is a diagram of the trajectory of the wrist joint when the inertial sensing unit is fixed in the middle of the arm and the arm is bent. Fix the inertial sensing unit in the middle of the lower arm, keep the upper arm still, stretch and contract the lower arm at a slower speed, repeat the movement 4 times, and measure the trajectory of the wrist joint.
图8和图9是肘关节和腕关节的节点位置估计坐标图。将姿态测量单元固定于手臂上,测量肘关节和腕关节在以肩部节点为中心的参考坐标系中的位置。保持身体不动,手臂沿着桌面固定大小的正方形边缘移动,由姿态测量单元得到上臂和下臂的欧拉角,引入手臂的几何约束,滤除姿态误差较大的点,并计算得出肘关节和腕关节的坐标位置。通过4位测试者在相同位置进行试验,测量肘关节和腕关节的空间位置,手臂沿固定路径运动以恒定速度运动两次,运动周期是10s,即250次采样。图8(a)、图8(c)、图8(e)分别为肘关节X、Y和Z坐标值,图9(b)、图9(d)、图9(f)分别为腕关节X、Y和Z坐标值。从图中看出,不同测试者估计的位置沿着固定路径变化,由于运动习惯以及运动过程中手臂抖动的影响,不完全与设计路径相匹配。通过选取四组位置估计的平均值,分别计算肘关节、腕关节的误差平均值、标准差和标准偏差,如表2所示: Fig. 8 and Fig. 9 are the coordinate diagrams of the node position estimation of the elbow joint and the wrist joint. The attitude measurement unit is fixed on the arm, and the position of the elbow joint and the wrist joint in the reference coordinate system centered on the shoulder node is measured. Keeping the body still, the arm moves along the edge of a square with a fixed size on the table, the Euler angles of the upper arm and the lower arm are obtained by the attitude measurement unit, the geometric constraints of the arm are introduced, the points with large attitude errors are filtered out, and the elbow angle is calculated. Coordinate positions of joints and wrist joints. Four testers were tested at the same position to measure the spatial position of the elbow joint and wrist joint. The arm moved along a fixed path twice at a constant speed, and the movement period was 10s, that is, 250 samples. Figure 8(a), Figure 8(c), and Figure 8(e) are the X, Y, and Z coordinate values of the elbow joint, and Figure 9(b), Figure 9(d), and Figure 9(f) are the wrist joint X, Y and Z coordinate values. It can be seen from the figure that the estimated positions of different testers change along a fixed path, but due to the influence of exercise habits and arm shaking during exercise, they do not completely match the design path. By selecting the average value of four groups of position estimates, the error average value, standard deviation and standard deviation of the elbow joint and wrist joint are calculated respectively, as shown in Table 2:
表2关节位置估计误差比较 Table 2 Comparison of joint position estimation errors
从以上分析得出,四组固定正方形实验平均误差在1cm以内,正确的表示了关节的估计位置。标准差和标准偏差说明误差波动很小,满足运动跟踪系统的稳定性要求。 From the above analysis, it can be concluded that the average error of the four groups of fixed square experiments is within 1cm, which correctly represents the estimated position of the joint. The standard deviation and standard deviation indicate that the error fluctuation is very small, which meets the stability requirements of the motion tracking system.
以上所述的实施例仅仅是对本发明的优选实施方式进行描述,并非对本发明的范围进行限定,在不脱离本发明设计精神的前提下,本领域普通技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明权利要求书确定的保护范围内。 The above-mentioned embodiments are only descriptions of preferred implementations of the present invention, and are not intended to limit the scope of the present invention. All such modifications and improvements should fall within the scope of protection defined by the claims of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410742272.9A CN104457741A (en) | 2014-12-08 | 2014-12-08 | Human arm movement tracing method based on ant colony algorithm error correction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410742272.9A CN104457741A (en) | 2014-12-08 | 2014-12-08 | Human arm movement tracing method based on ant colony algorithm error correction |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104457741A true CN104457741A (en) | 2015-03-25 |
Family
ID=52904177
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410742272.9A Pending CN104457741A (en) | 2014-12-08 | 2014-12-08 | Human arm movement tracing method based on ant colony algorithm error correction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104457741A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106153077A (en) * | 2016-09-22 | 2016-11-23 | 苏州坦特拉自动化科技有限公司 | A kind of initialization of calibration method for M IMU human motion capture system |
CN107458224A (en) * | 2017-07-18 | 2017-12-12 | 吉林大学 | A kind of alarm set for preventing driver pedal maloperation |
CN108875897A (en) * | 2018-06-28 | 2018-11-23 | 桂林电子科技大学 | A kind of method for estimating based on improvement ant group optimization |
CN111145344A (en) * | 2019-12-30 | 2020-05-12 | 哈尔滨工业大学 | A Structured Light Measurement Method for 3D Reconstruction of Snow Sculptures |
CN111563346A (en) * | 2019-12-11 | 2020-08-21 | 西安科技大学 | Arm kinematics modeling method based on Gaussian process learning |
CN114001753A (en) * | 2021-10-29 | 2022-02-01 | 南京佗道医疗科技有限公司 | An input signal compensation system and method thereof, and a dither analog output system and method thereof |
CN118710786A (en) * | 2024-08-23 | 2024-09-27 | 山东云小华数字科技有限公司 | A digital human motion generation method and generation system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040143560A1 (en) * | 2003-01-20 | 2004-07-22 | Chun Bao Zhu | Path searching system using multiple groups of cooperating agents and method thereof |
CN102818567A (en) * | 2012-08-08 | 2012-12-12 | 浙江大学 | AUV (autonomous underwater vehicle) integrated navigation method integrating Kalman filtering and particle filtering |
CN103592465A (en) * | 2013-10-24 | 2014-02-19 | 燕山大学 | Triaxial micromachine accelerometer static correction method based on particle swarm optimization |
CN104147770A (en) * | 2014-07-24 | 2014-11-19 | 燕山大学 | Inertial-sensor-based wearable hemiplegia rehabilitation apparatus and strap-down attitude algorithm |
-
2014
- 2014-12-08 CN CN201410742272.9A patent/CN104457741A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040143560A1 (en) * | 2003-01-20 | 2004-07-22 | Chun Bao Zhu | Path searching system using multiple groups of cooperating agents and method thereof |
CN102818567A (en) * | 2012-08-08 | 2012-12-12 | 浙江大学 | AUV (autonomous underwater vehicle) integrated navigation method integrating Kalman filtering and particle filtering |
CN103592465A (en) * | 2013-10-24 | 2014-02-19 | 燕山大学 | Triaxial micromachine accelerometer static correction method based on particle swarm optimization |
CN104147770A (en) * | 2014-07-24 | 2014-11-19 | 燕山大学 | Inertial-sensor-based wearable hemiplegia rehabilitation apparatus and strap-down attitude algorithm |
Non-Patent Citations (8)
Title |
---|
CEZARY KOWNACKI: ""Optimization approach to adapt Kalman filters for the real-time application of accelerometer and gyroscope signals" filtering"", 《DIGITAL SIGNAL PROCESSING》 * |
H.J. LUINGE,等: ""Ambulatory measurement of arm orientation"", 《JOURNAL OF BIOMECHANICS》 * |
HUIYU ZHOU,等: ""Use of multiple wearable inertial sensors in upper limb motion tracking"", 《MEDICAL ENGINEERING & PHYSICS》 * |
余慧: ""蚁群算法优化-基于局部信息素更新"", 《湖北第二师范学院学报》 * |
周建军,等: ""基于蚁群算法对三轴磁强计非正交度的修正"", 《舰船科学技术》 * |
周海强,等: ""基于附加虚拟阻抗和蚁群优化算法的动态等效模型在线修正方法"", 《中国电机工程学报》 * |
朱庆保,等: ""基于变异和动态信息素更新的蚁群优化算法"", 《软件学报》 * |
赵宝江,等: ""基于自适应路径选择和信息素更新的蚁群算法"", 《计算机工程与应用》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106153077A (en) * | 2016-09-22 | 2016-11-23 | 苏州坦特拉自动化科技有限公司 | A kind of initialization of calibration method for M IMU human motion capture system |
CN106153077B (en) * | 2016-09-22 | 2019-06-14 | 苏州坦特拉智能科技有限公司 | A kind of initialization of calibration method for M-IMU human motion capture system |
CN107458224A (en) * | 2017-07-18 | 2017-12-12 | 吉林大学 | A kind of alarm set for preventing driver pedal maloperation |
CN107458224B (en) * | 2017-07-18 | 2019-07-16 | 固安海高汽车技术有限公司 | A kind of alarm set preventing driver pedal maloperation |
CN108875897A (en) * | 2018-06-28 | 2018-11-23 | 桂林电子科技大学 | A kind of method for estimating based on improvement ant group optimization |
CN108875897B (en) * | 2018-06-28 | 2020-04-21 | 桂林电子科技大学 | A Motion Estimation Method Based on Improved Ant Colony Optimization Algorithm |
CN111563346A (en) * | 2019-12-11 | 2020-08-21 | 西安科技大学 | Arm kinematics modeling method based on Gaussian process learning |
CN111563346B (en) * | 2019-12-11 | 2023-03-24 | 西安科技大学 | Arm kinematics modeling method based on Gaussian process learning |
CN111145344A (en) * | 2019-12-30 | 2020-05-12 | 哈尔滨工业大学 | A Structured Light Measurement Method for 3D Reconstruction of Snow Sculptures |
CN114001753A (en) * | 2021-10-29 | 2022-02-01 | 南京佗道医疗科技有限公司 | An input signal compensation system and method thereof, and a dither analog output system and method thereof |
CN118710786A (en) * | 2024-08-23 | 2024-09-27 | 山东云小华数字科技有限公司 | A digital human motion generation method and generation system |
CN118710786B (en) * | 2024-08-23 | 2024-11-12 | 山东云小华数字科技有限公司 | A digital human motion generation method and generation system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Young et al. | IMUSim: A simulation environment for inertial sensing algorithm design and evaluation | |
CN104457741A (en) | Human arm movement tracing method based on ant colony algorithm error correction | |
CN108939512B (en) | A Swimming Attitude Measurement Method Based on Wearable Sensors | |
Madgwick et al. | Estimation of IMU and MARG orientation using a gradient descent algorithm | |
Yun et al. | Design, implementation, and experimental results of a quaternion-based Kalman filter for human body motion tracking | |
Roetenberg et al. | Estimating body segment orientation by applying inertial and magnetic sensing near ferromagnetic materials | |
US6820025B2 (en) | Method and apparatus for motion tracking of an articulated rigid body | |
CN104764451A (en) | Target posture tracking method based on inertia and geomagnetic sensor | |
CN108338791A (en) | The detection device and detection method of unstable motion data | |
CN103175502A (en) | Attitude angle detecting method based on low-speed movement of data glove | |
CN109000633A (en) | Human body attitude motion capture algorithm design based on isomeric data fusion | |
Yang et al. | A calibration process for tracking upper limb motion with inertial sensors | |
CN110609621B (en) | Gesture calibration method and human motion capture system based on microsensor | |
Bai et al. | Low cost inertial sensors for the motion tracking and orientation estimation of human upper limbs in neurological rehabilitation | |
CN106227368B (en) | A kind of human body joint angle calculation method and device | |
Truppa et al. | An innovative sensor fusion algorithm for motion tracking with on-line bias compensation: Application to joint angles estimation in yoga | |
Rahman et al. | Range of motion measurement using single inertial measurement unit sensor: a validation and comparative study of sensor fusion techniques | |
Xu et al. | Measuring human joint movement with IMUs: Implementation in custom-made low cost wireless sensors | |
Yang et al. | Research on human motion monitoring method based on multi-joint constraint filter model | |
CN208591046U (en) | The detection device of unstable motion data | |
Joukov et al. | Closed-chain pose estimation from wearable sensors | |
JP5424224B2 (en) | Relative angle estimation system | |
JP5424226B2 (en) | Inclination angle estimation system | |
JP5958920B2 (en) | Inclination angle estimation system | |
CN106574830A (en) | Initializing an inertial sensor using soft constraints and penalty functions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150325 |
|
WD01 | Invention patent application deemed withdrawn after publication |