Movatterモバイル変換


[0]ホーム

URL:


CN114964225A - Gait recognition system design method based on single-node sensor - Google Patents

Gait recognition system design method based on single-node sensor
Download PDF

Info

Publication number
CN114964225A
CN114964225ACN202210460125.7ACN202210460125ACN114964225ACN 114964225 ACN114964225 ACN 114964225ACN 202210460125 ACN202210460125 ACN 202210460125ACN 114964225 ACN114964225 ACN 114964225A
Authority
CN
China
Prior art keywords
data
acceleration
gait
axis
angle
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.)
Granted
Application number
CN202210460125.7A
Other languages
Chinese (zh)
Other versions
CN114964225B (en
Inventor
詹志坤
胡立杰
赵玉良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yanshan University
Original Assignee
Yanshan University
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
Application filed by Yanshan UniversityfiledCriticalYanshan University
Priority to CN202210460125.7ApriorityCriticalpatent/CN114964225B/en
Publication of CN114964225ApublicationCriticalpatent/CN114964225A/en
Application grantedgrantedCritical
Publication of CN114964225BpublicationCriticalpatent/CN114964225B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a gait recognition system design method based on a single-node sensor, which comprises the following steps: s101, constructing a data acquisition module and a data processing and analyzing module; s102, wearing a data acquisition module in the form of a foot ring at the ankle of a tester to acquire human motion data; step S103, transmitting the human body motion data collected in the step S102 to a data processing and analyzing module through a wireless device for data analysis and processing to obtain gait time domain characteristics, step length, step height and steering angle data and make a data set; s104, performing model training by using various machine learning classifiers so as to perform feature dimension reduction; and S105, after the steps S102-S104 are completed on the computer, writing a C language program written in the algorithm process of the steps S102-S104 into the microcontroller by Keil software to complete embedded development.

Description

Translated fromChinese
一种基于单节点传感器的步态识别系统设计方法A Design Method of Gait Recognition System Based on Single-node Sensor

技术领域technical field

本发明涉及人体动作识别领域,尤其是一种基于单节点传感器的步态识别系统设计方法。The invention relates to the field of human action recognition, in particular to a design method of a gait recognition system based on a single-node sensor.

背景技术Background technique

基于惯性传感器的人体动作分析与识别是模式识别的一个新兴领域,克服了传统视频动作识别方法的诸多缺点和限制,具有更高的可操作性和实用性。其实质是通过固定在人体特定部位的惯性传感器来采集能够代表人体动作信息的振动、磁场、角度等信号,并通过无线传输模块传到PC机,在PC机端对数据进行预处理、特征提取和选择、动作分类识别等操作。惯性传感器包括加速度计、磁力计、陀螺仪等,将它们集成在一起作为单个节点,各节点之间通过无线通信模块组成无线传感网络,构成运动捕捉系统,捕获人体运动信息。Human action analysis and recognition based on inertial sensors is an emerging field of pattern recognition, which overcomes many shortcomings and limitations of traditional video action recognition methods and has higher operability and practicability. Its essence is to collect vibration, magnetic field, angle and other signals that can represent human motion information through inertial sensors fixed on specific parts of the human body, and transmit them to the PC through the wireless transmission module, where the data is preprocessed and feature extraction. and selection, action classification recognition and other operations. Inertial sensors include accelerometers, magnetometers, gyroscopes, etc., which are integrated as a single node. Each node forms a wireless sensor network through wireless communication modules to form a motion capture system to capture human motion information.

由于人体动作的复杂性,目前还不存在能够准确识别所有动作的设备,但对基于传感器节点的步态研究已经较为深入。多节点运动捕捉系统识别率高但是不易佩戴,所需处理的数据量大,单节点运动捕捉系统便携性高但是识别率较低。然而,无论是单节点系统还是多节点系统,其工作内容均为仅采集数据并上传到计算机中,需要依赖计算机进行处理分析与识别而无法实时显示识别结果。因此,如果能够设计一个步态识别率高、步态数据计算精度高、实时显示结果、易于佩戴的单节点系统,则可以大大降低设备成本和操作难度,提高效率。Due to the complexity of human movements, there is currently no device that can accurately identify all movements, but the research on gait based on sensor nodes has been in-depth. The multi-node motion capture system has a high recognition rate but is not easy to wear, and requires a large amount of data to be processed. The single-node motion capture system is highly portable but has a low recognition rate. However, whether it is a single-node system or a multi-node system, the work content is only to collect data and upload it to the computer, which needs to rely on the computer for processing, analysis and identification, and cannot display the identification results in real time. Therefore, if a single-node system with high gait recognition rate, high calculation accuracy of gait data, real-time display results, and easy wearing can be designed, the equipment cost and operation difficulty can be greatly reduced, and the efficiency can be improved.

发明内容SUMMARY OF THE INVENTION

本发明需要解决的技术问题是提供一种基于单节点传感器的步态识别系统设计方法,在满足佩戴与舒适性的前提下融合了九轴惯性传感器和气压传感器提高了识别精度,同时采用边缘计算技术使得本系统完全无需外部计算机参与,可实时将识别结果与运动参数显示出来。The technical problem to be solved by the present invention is to provide a design method of a gait recognition system based on a single-node sensor, which integrates a nine-axis inertial sensor and an air pressure sensor to improve the recognition accuracy under the premise of satisfying wearing and comfort, and adopts edge computing at the same time. The technology makes the system completely without the participation of an external computer, and can display the recognition results and motion parameters in real time.

为解决上述技术问题,本发明所采用的技术方案是:一种基于单节点传感器的步态识别系统设计方法,包括如下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted in the present invention is: a method for designing a gait recognition system based on a single-node sensor, comprising the following steps:

步骤S101、构建数据采集模块和数据处理分析模块:数据采集模块包括电源模块、微控制器、九轴惯性传感器、气压传感器和无线射频模块;数据处理分析模块包括无线模块和微控制器;Step S101, constructing a data acquisition module and a data processing and analysis module: the data acquisition module includes a power supply module, a microcontroller, a nine-axis inertial sensor, an air pressure sensor and a wireless radio frequency module; the data processing and analysis module includes a wireless module and a microcontroller;

步骤S102、将数据采集模块做成脚环的形式佩戴在测试者的脚腕处采集人体运动数据,采集的人体运动数据包括受试者的行走、转向、上楼梯、下楼梯四种动作所产生的加速度、角速度、姿态角和气压值,九轴惯性传感器的X轴对应人体前进方向、Y轴垂直于大地向下、Z轴指向人体右侧方向;Step S102, making the data acquisition module into the form of a foot ring and wearing it at the tester's ankle to collect human motion data, the collected human motion data includes the subject's four actions of walking, turning, going up the stairs, and going down the stairs. The X-axis of the nine-axis inertial sensor corresponds to the forward direction of the human body, the Y-axis is perpendicular to the ground downward, and the Z-axis points to the right direction of the human body;

步骤S103、对步骤S102中采集的人体运动数据过无线装置传输到数据处理分析模块进行数据分析处理,得到步态时域特征、步长、步高与转向角度的数据并制作数据集;Step S103, transmitting the human body motion data collected in step S102 to a data processing and analysis module through a wireless device for data analysis and processing, obtaining data of gait time domain features, step length, step height and steering angle, and making a data set;

步骤S104、利用多种机器学习分类器进行模型训练从而进行特征降维,特征降维是找到贡献度占比90%以上的特征向量,将无关特征向量剔除,特征降维后选取的特征为:z轴角速度最小值和气压计计算的高度变化;Step S104, using a variety of machine learning classifiers for model training to perform feature dimension reduction. Feature dimension reduction is to find feature vectors with a contribution of more than 90%, remove irrelevant feature vectors, and select features after feature dimension reduction: z-axis angular velocity minimum and barometer-calculated altitude change;

步骤S105、在计算机上完成步骤S102~S4后,用Keil软件将步骤S102~ S4的算法过程编写C语言程序写入微控制器中完成嵌入式开发。Step S105: After completing steps S102-S4 on the computer, use Keil software to write a C language program written in the algorithm process of steps S102-S4 into a microcontroller to complete embedded development.

本发明技术方案的进一步改进在于:所述步骤S103中的数据分析处理包括数据预处理、步态切割和时域特征计算。A further improvement of the technical solution of the present invention is that the data analysis and processing in the step S103 includes data preprocessing, gait cutting and time domain feature calculation.

本发明技术方案的进一步改进在于:所述数据预处理包括坐标系转换和降噪处理,坐标系转换是将步骤S102中九轴惯性传感器采集的人体运动数据中的加速度利用姿态角坐标系转换矩阵处理统一在地球坐标系下,降噪处理包括去除异常值和滤波去噪,对于异常值采用拉依达准则进行剔除,对于运动过程中不规则震颤引起的噪声采用扩展卡尔曼滤波器进行滤波处理。A further improvement of the technical solution of the present invention is that: the data preprocessing includes coordinate system conversion and noise reduction processing, and the coordinate system conversion is to convert the acceleration in the human body motion data collected by the nine-axis inertial sensor in step S102 using the attitude angle coordinate system conversion matrix The processing is unified in the earth coordinate system. The noise reduction processing includes removing outliers and filtering and denoising. For outliers, the Laida criterion is used to eliminate them. For the noise caused by irregular tremors during the movement process, the extended Kalman filter is used for filtering. .

本发明技术方案的进一步改进在于:所述姿态角坐标系转换矩阵处理过程如下:The further improvement of the technical solution of the present invention is: the processing process of the attitude angle coordinate system transformation matrix is as follows:

绕Y轴旋转的旋转矩阵

Figure BDA0003620232770000031
角度ψ为姿态角中的航向角 yaw;Rotation matrix to rotate around the Y axis
Figure BDA0003620232770000031
The angle ψ is the heading angle yaw in the attitude angle;

绕Z轴旋转的旋转矩阵

Figure BDA0003620232770000032
角度θ为姿态角中的俯仰角 pitch;Rotation matrix to rotate around the Z axis
Figure BDA0003620232770000032
The angle θ is the pitch angle pitch in the attitude angle;

绕X轴旋转的旋转矩阵

Figure BDA0003620232770000033
角度
Figure BDA0003620232770000034
为姿态角中的翻滚角 roll;Rotation matrix to rotate around the X axis
Figure BDA0003620232770000033
angle
Figure BDA0003620232770000034
is the roll angle roll in the attitude angle;

按照Y-Z-X的顺序进行旋转得到旋转矩阵Rotate in the order of Y-Z-X to get the rotation matrix

Figure BDA0003620232770000035
Figure BDA0003620232770000035

坐标转换方程为

Figure BDA0003620232770000036
其中,
Figure BDA0003620232770000037
为地球坐标系下的三轴加速度,
Figure BDA0003620232770000038
为九轴惯性传感器坐标系下的三轴加速度。The coordinate transformation equation is
Figure BDA0003620232770000036
in,
Figure BDA0003620232770000037
is the three-axis acceleration in the earth coordinate system,
Figure BDA0003620232770000038
is the three-axis acceleration in the nine-axis inertial sensor coordinate system.

所以九轴惯性传感器坐标系下的三轴加速度转换为地球坐标系下的三轴加速度转换方程为:Therefore, the conversion equation of the three-axis acceleration in the nine-axis inertial sensor coordinate system to the three-axis acceleration in the earth coordinate system is:

Figure BDA0003620232770000039
Figure BDA0003620232770000039

本发明技术方案的进一步改进在于:得到地球坐标系下的三轴加速度后,通过建立多个阈值对三轴加速度和角速度的约束条件来确定步态运动的站立相和摆动相,未进入摆动相时进行零速修正和计算航向角方差,设定航向角方差的阈值判断是否进入转向动作,若方差大于设定阈值则判断为进入转向动作并记录此时航向角,继续接收数据直至方差回归阈值下,判断转向动作已完成并记录此时航向角,并根据这两个航向角变化计算转向角度;进入摆动相时持续接收并记录数据直至结束摆动相,根据需求计算所需特征用以判断平地行走、上楼、下楼动作,记录的三轴加速度双重积分结合经验公式得到的位移和气压计精确测量步长、步高的运动数据。The further improvement of the technical solution of the present invention is: after obtaining the three-axis acceleration in the earth coordinate system, the standing phase and the swing phase of the gait motion are determined by establishing multiple threshold constraints on the three-axis acceleration and angular velocity, and the swing phase is not entered. If the variance is greater than the set threshold, it is judged to enter the steering action and record the current heading angle, and continue to receive data until the variance returns to the threshold Next, judge that the steering action has been completed and record the heading angle at this time, and calculate the steering angle according to the changes of the two heading angles; when entering the swing phase, continue to receive and record data until the swing phase ends, and calculate the required characteristics according to the needs to determine the level of the ground. Walking, going upstairs, going downstairs, the recorded three-axis acceleration double integral combined with the displacement obtained by the empirical formula and the barometer accurately measure the movement data of step length and step height.

本发明技术方案的进一步改进在于:所述多个阈值对三轴加速度和角速度的约束条件为:滑动窗口中加速度的方差阈值、Z轴加速度幅值和时间长度,约束方程如下:The further improvement of the technical solution of the present invention is: the constraints of the multiple thresholds on the three-axis acceleration and angular velocity are: the variance threshold of the acceleration in the sliding window, the Z-axis acceleration amplitude and the time length, and the constraint equation is as follows:

Figure BDA0003620232770000041
Figure BDA0003620232770000041

其中acci是垂直方向加速度,i是采样点,w是窗口大小,λ1是滑动窗口中加速度方差的阈值;where acci is the vertical acceleration, i is the sampling point, w is the window size, and λ1 is the threshold of the acceleration variance in the sliding window;

f(GZmax)>λ2f(GZmax )>λ2

其中GZmax是z轴角速度在滑动窗口中绝对值最大的一个样本点,建立的函数为幅值平方后缩小一千倍,λ2是幅值的阈值;Among them, GZmax is a sample point with the largest absolute value of the z-axis angular velocity in the sliding window. The established function is that the amplitude is squared and then reduced by a thousand times, and λ2 is the threshold value of the amplitude;

λ3<i<λ4λ3 <i<λ4

其中i为进入摆动相后累计的样本点个数,λ3和λ4分别为阈值下限和上限。where i is the number of accumulated sample points after entering the swing phase, and λ3 and λ4 are the lower and upper thresholds, respectively.

本发明技术方案的进一步改进在于:所述经验公式为:The further improvement of the technical solution of the present invention is: the empirical formula is:

Figure BDA0003620232770000042
Figure BDA0003620232770000042

其中K是校准的常数参数,azmax是摆动相的竖直方向最小加速度,azmin是摆动相竖直方向最小加速度,添加偏置系数w补偿传感器安装位置带来的差异,所以采用经验公式估计的步长S1为:Where K is a constant parameter for calibration, azmax is the minimum acceleration in the vertical direction of the swing phase, a zminis the minimum acceleration in the vertical direction of the swing phase, and the bias coefficient w is added to compensate for the difference caused by the installation position of the sensor, so the empirical formula is used to estimateThe step size S1 is:

Figure BDA0003620232770000043
Figure BDA0003620232770000043

采用矩形法进行积分,选取相邻两个采样点的加速度均值作为矩形的高 a(x),通过采样速率计算出两个采样点之间的时间间隔t,进行一次积分可以得到采样点的瞬时速度,进行两次积分就可以得到相邻两个采样点之间的距离,采样点瞬时速度为:The rectangle method is used for integration, and the average acceleration value of two adjacent sampling points is selected as the height a(x) of the rectangle. The time interval t between the two sampling points is calculated by the sampling rate, and the instantaneous value of the sampling point can be obtained by performing one integration speed, the distance between two adjacent sampling points can be obtained by performing two integrations, and the instantaneous speed of the sampling point is:

Figure BDA0003620232770000051
Figure BDA0003620232770000051

加速度二次积分得到的步长S2为:The step size S2 obtained by the quadratic integration of the acceleration is:

Figure BDA0003620232770000052
Figure BDA0003620232770000052

采用加权线性组合的方式,三轴加速度双重积分结合经验公式得到的位移S 公式如下:Using the weighted linear combination method, the displacement S obtained by the double integral of the three-axis acceleration combined with the empirical formula is as follows:

S=γS1+(1-γ)S2S=γS1 +(1-γ)S2 ,

其中,γ是一个常量参数,λ∈(0,1)。where γ is a constant parameter, λ∈(0, 1).

本发明技术方案的进一步改进在于:所述步态切割采用多阈值步态相位检测方法判断各步态起止位置并将其从数据预处理后的连续信号中分离出来,步态相位检测基于角速度和加速度融合计算实时分析人体是否为静止状态,当人体进入非静止状态后依然通过加速度和角速度融合计算分析人体是否产生摆动来区分转向动作,进入摆动动作时,持续接收实时运动数据并保存直至摆动相结束,处理分析这一摆动过程产生的数据得到所需特征并通过指针回到步态相位检测阶段,准备接收下一动作的数据。A further improvement of the technical solution of the present invention is that: the gait cutting adopts a multi-threshold gait phase detection method to determine the start and end positions of each gait and separate them from the continuous signal after data preprocessing, and the gait phase detection is based on the angular velocity and The acceleration fusion calculation analyzes whether the human body is in a static state in real time. When the human body enters a non-stationary state, it still uses the acceleration and angular velocity fusion calculation to analyze whether the human body swings to distinguish the steering action. When entering the swing action, it continues to receive real-time motion data and save it until the swing phase. At the end, processing and analyzing the data generated by the swing process to obtain the required characteristics and returning to the gait phase detection stage through the pointer, ready to receive the data of the next action.

本发明技术方案的进一步改进在于:所述时域特征计算包括对各分离出来的步态计算极值、均值、方差。A further improvement of the technical solution of the present invention is that: the time-domain feature calculation includes calculating an extreme value, a mean value and a variance for each separated gait.

本发明技术方案的进一步改进在于:所述步骤S104中分类器包括SVM分类器、K近邻分类器、随机森林分类器、朴素贝叶斯、鉴别分析分类器。A further improvement of the technical solution of the present invention is that the classifiers in step S104 include SVM classifiers, K-nearest neighbor classifiers, random forest classifiers, Naive Bayes, and discriminative analysis classifiers.

由于采用了上述技术方案,本发明取得的技术进步是:Owing to having adopted the above-mentioned technical scheme, the technical progress that the present invention obtains is:

本发明融合了九轴惯性传感器和气压传感器的单节点系统,能够准确识别不易区分的行走和上下楼梯动作,在满足便携性的同时大大提高了识别精度。与现有技术相比,本系统的识别结果可实时显示,每一步态可在0.2s内完成运算,识别率达到98%以上,步长计算平均误差为0.86%,步高计算平均误差为1.1%。本系统便携性好,成本低,精度高,能够适应大部分室内环境,具有良好的应用前景。The invention integrates a single-node system of a nine-axis inertial sensor and an air pressure sensor, which can accurately identify the indistinguishable actions of walking and going up and down stairs, and greatly improves the identification accuracy while satisfying portability. Compared with the prior art, the recognition result of the system can be displayed in real time, the operation can be completed within 0.2s for each step, the recognition rate can reach more than 98%, the average error of step size calculation is 0.86%, and the average error of step height calculation is 1.1%. %. The system has good portability, low cost, high precision, can adapt to most indoor environments, and has good application prospects.

附图说明Description of drawings

图1为本发明所涉及的单节点人体步态实时识别系统设计方法的总体流程示意图;Fig. 1 is the overall flow chart of the design method of the single-node human body gait real-time recognition system involved in the present invention;

图2为本发明所涉及的系统结构图;Fig. 2 is the system structure diagram involved in the present invention;

图3为本发明中的数据采集模块和数据处理分析模块的具体结构与接线图,其中a为数据采集模块结构图,b为数据处理模块结构图,c为数据采集模块接线图,d为数据处理模块接线图;Fig. 3 is the concrete structure and wiring diagram of the data acquisition module and the data processing analysis module in the present invention, wherein a is the data acquisition module structure diagram, b is the data processing module structure diagram, c is the data acquisition module wiring diagram, d is the data Processing module wiring diagram;

图4为本发明所涉及主体算法的实现流程图;Fig. 4 is the realization flow chart of the subject algorithm involved in the present invention;

图5为本发明一种实验例所述的实验场景示意图;5 is a schematic diagram of an experimental scenario described in an experimental example of the present invention;

图6为本发明在上下楼梯实验中海拔数据处理效果对比图,其中a为处理前的数据,b为经去噪滤波处理后的数据。其中,a和b的右侧曲线分别为整个实验流程海拔变化曲线图的原图和处理后的效果,左侧曲线为右侧虚框内数据的局部放大图;6 is a comparison diagram of the processing effect of altitude data in the experiment of going up and down stairs according to the present invention, wherein a is the data before processing, and b is the data after denoising filtering. Among them, the right curves of a and b are the original image and the processed effect of the altitude change curve of the entire experimental process, respectively, and the left curve is a partial enlarged image of the data in the virtual box on the right;

图7为本发明在平地行走实验过程中三轴加速度和角速度数据处理效果对比图,其中a为处理前的三轴加速度数据,b为经去噪滤波处理后的三轴加速度数据,c为处理前的三轴角速度数据,d为经去噪滤波处理后的三轴角速度数据;7 is a comparison diagram of the processing effect of triaxial acceleration and angular velocity data in the process of walking on flat ground according to the present invention, wherein a is triaxial acceleration data before processing, b is triaxial acceleration data after denoising filtering, and c is processed The previous triaxial angular velocity data, d is the triaxial angular velocity data after denoising filtering;

图8为本发明所涉及的坐标转换原理图和坐标系转换示意图;FIG. 8 is a schematic diagram of coordinate conversion and a schematic diagram of coordinate system conversion involved in the present invention;

图9为本发明所涉及的经机器学习特征提取后的特征识别效果图。FIG. 9 is a feature recognition effect diagram after feature extraction by machine learning involved in the present invention.

具体实施方式Detailed ways

下面结合实施例对本发明做进一步详细说明:Below in conjunction with embodiment, the present invention is described in further detail:

如图1所示,一种基于单节点传感器的步态识别系统设计方法,包括如下步骤:As shown in Figure 1, a method for designing a gait recognition system based on a single-node sensor includes the following steps:

步骤S101、构建数据采集模块和数据处理分析模块:Step S101, constructing a data acquisition module and a data processing analysis module:

如图2~图3所示,数据采集模块包括数据采集模块包括电源模块、微控制器、九轴惯性传感器、气压传感器和无线射频模块;数据处理分析模块包括无线模块和微控制器(microcontroller unit,MCU)。九轴惯性传感器选择 MPU9250,其本身集成3轴陀螺仪,3轴加速度计和3轴磁力计,气压传感器选择高分辨率气压传感器MS5611-01BA01,其分辨率可达到10cm,电源采用3.7V 锂电池。As shown in Figures 2 to 3, the data acquisition module includes a data acquisition module including a power supply module, a microcontroller, a nine-axis inertial sensor, an air pressure sensor and a wireless radio frequency module; the data processing and analysis module includes a wireless module and a microcontroller (microcontroller unit). , MCU). The nine-axis inertial sensor chooses MPU9250, which integrates 3-axis gyroscope, 3-axis accelerometer and 3-axis magnetometer, and the air pressure sensor chooses high-resolution air pressure sensor MS5611-01BA01, its resolution can reach 10cm, and the power supply adopts 3.7V lithium battery .

微控制器通过IIC协议不停读取九轴惯性传感器和气压传感器的数据,在 MCU中通过四元数解算姿态角,由气压海拔转换公式得到实时高度,然后MCU将每一时刻通过九轴惯性传感器得到的三轴加速度、角速度以及姿态角和通过气压传感器得到的高度和温度写入一个32位的封包中并通过无线传输模块发送到数据处理模块。MCU选择STM32F103C8T6,其本身体积小,成本低,功能多,易于实现嵌入式的开发。MCU通过无线传输模块得到实时运动数据,可通过USB转 TTL模块直接显示在上位机中,也可根据需求对数据进行简单处理计算得到中间量并实时在上位机中显示。The microcontroller continuously reads the data of the nine-axis inertial sensor and the air pressure sensor through the IIC protocol, calculates the attitude angle through the quaternion in the MCU, and obtains the real-time altitude from the air pressure-altitude conversion formula, and then the MCU passes each moment through the nine-axis. The three-axis acceleration, angular velocity and attitude angle obtained by the inertial sensor and the altitude and temperature obtained by the air pressure sensor are written into a 32-bit packet and sent to the data processing module through the wireless transmission module. The MCU chooses STM32F103C8T6, which is small in size, low in cost, multi-function, and easy to implement embedded development. The MCU obtains real-time motion data through the wireless transmission module, which can be directly displayed in the host computer through the USB to TTL module, or can simply process and calculate the data according to the needs to obtain the intermediate quantity and display it in the host computer in real time.

步骤S102、将数据采集模块做成脚环的形式佩戴在测试者的脚腕处采集人体运动数据,采集的人体运动数据包括受试者的行走、转向、上楼梯、下楼梯四种动作所产生的加速度、角速度、姿态角和气压值,九轴惯性传感器的X轴对应人体前进方向、Y轴垂直于大地向下、Z轴指向人体右侧方向。数据采集过程共邀请了5位志愿者参与实验提供运动数据,每位志愿者佩戴装置后在走廊,楼梯处自由活动,对于动作姿势不做额外限制,佩戴的装置采集各位志愿者在行走、转向、上下楼梯动作中产生的原始加速度等数据发送并保存在计算机中。Step S102, making the data acquisition module into the form of a foot ring and wearing it at the tester's ankle to collect human motion data, the collected human motion data includes the subject's four actions of walking, turning, going up the stairs, and going down the stairs. The X-axis of the nine-axis inertial sensor corresponds to the forward direction of the human body, the Y-axis is perpendicular to the ground downward, and the Z-axis points to the right side of the human body. During the data collection process, a total of 5 volunteers were invited to participate in the experiment to provide motion data. After wearing the device, each volunteer moved freely in the corridor and stairs. There were no additional restrictions on the movement posture. , raw acceleration and other data generated in the action of going up and down the stairs are sent and saved in the computer.

步骤S103、对步骤S102中采集的人体运动数据过无线装置传输到数据处理分析模块进行数据分析处理,数据分析处理包括数据预处理、步态切割和时域特征计算,得到步态时域特征、步长、步高与转向角度的数据并制作数据集。由于元器件固有噪声干扰产生失真现象,而且传感器获取的加速度矢量是基于传感器自身坐标系的(也就是和装置佩戴位置相关),为了便于直观理解和统一研究,需要对数据进行预处理,也就是坐标系转换和降噪处理,利用姿态角坐标系转换矩阵处理使得所有数据样本统一在同一坐标系(即地球坐标系)下,降噪处理包括:对于明显的异常值采用拉依达准则进行剔除,而对于运动过程中不规则震颤引起的噪声采用扩展卡尔曼滤波器进行滤波处理,扩展卡尔曼滤波对于非线性数据的滤波具有极为良好的效果。滤波效果如图6和图7所示。In step S103, the human body motion data collected in step S102 is transmitted to the data processing and analysis module through the wireless device for data analysis and processing. The data analysis and processing includes data preprocessing, gait cutting and time-domain feature calculation to obtain the gait time-domain features, Step size, step height and steering angle data and make a data set. Due to the distortion phenomenon caused by the inherent noise interference of components, and the acceleration vector obtained by the sensor is based on the sensor's own coordinate system (that is, related to the wearing position of the device), in order to facilitate intuitive understanding and unified research, it is necessary to preprocess the data, that is, Coordinate system conversion and noise reduction processing, using the attitude angle coordinate system transformation matrix processing to make all data samples unified in the same coordinate system (ie, the earth coordinate system), the noise reduction processing includes: using the Laida criterion to eliminate obvious outliers , and the noise caused by the irregular tremor in the movement process is filtered by the extended Kalman filter. The extended Kalman filter has an extremely good effect on the filtering of nonlinear data. The filtering effect is shown in Figure 6 and Figure 7.

坐标转换原理如图8所示,绕Y轴旋转的旋转矩阵

Figure BDA0003620232770000081
角度ψ为姿态角中的航向角yaw;The principle of coordinate conversion is shown in Figure 8, the rotation matrix rotating around the Y axis
Figure BDA0003620232770000081
The angle ψ is the heading angle yaw in the attitude angle;

绕Z轴旋转的旋转矩阵

Figure BDA0003620232770000082
角度θ为姿态角中的俯仰角 pitch;Rotation matrix to rotate around the Z axis
Figure BDA0003620232770000082
The angle θ is the pitch angle pitch in the attitude angle;

绕X轴旋转的旋转矩阵

Figure BDA0003620232770000083
角度
Figure BDA0003620232770000084
为姿态角中的翻滚角roll;Rotation matrix to rotate around the X axis
Figure BDA0003620232770000083
angle
Figure BDA0003620232770000084
is the roll angle roll in the attitude angle;

按照Y-Z-X的顺序进行旋转得到旋转矩阵:Rotate in the order of Y-Z-X to get the rotation matrix:

Figure BDA0003620232770000035
Figure BDA0003620232770000035

坐标转换方程为

Figure BDA0003620232770000086
这里的
Figure BDA0003620232770000087
为地球坐标系下的三轴加速度,
Figure BDA0003620232770000088
为传感器坐标系下的三轴加速度。The coordinate transformation equation is
Figure BDA0003620232770000086
here
Figure BDA0003620232770000087
is the three-axis acceleration in the earth coordinate system,
Figure BDA0003620232770000088
is the three-axis acceleration in the sensor coordinate system.

所以传感器坐标系下的三轴加速度转换为地球坐标系下的三轴加速度转换方程为Therefore, the three-axis acceleration in the sensor coordinate system is converted into the three-axis acceleration in the earth coordinate system. The conversion equation is:

Figure BDA0003620232770000091
Figure BDA0003620232770000091

得到地球坐标系下的加速度后通过建立多个阈值对加速度和角速度的约束条件来确定步态运动的站立相和摆动相,本系统提出三个约束条件:(1)滑动窗口中加速度的方差阈值(2)Z轴加速度幅值(3)时间长度。其约束方程如下:After obtaining the acceleration in the earth coordinate system, the stance phase and swing phase of gait motion are determined by establishing multiple threshold constraints on acceleration and angular velocity. The system proposes three constraints: (1) The variance threshold of the acceleration in the sliding window (2) Z-axis acceleration amplitude (3) Time length. Its constraint equation is as follows:

Figure BDA0003620232770000092
Figure BDA0003620232770000092

其中acci是垂直方向加速度,i是采样点,w是窗口大小。经过多次测试和比较,w设置为4。λ1是滑动窗口中加速度方差的阈值,由多次实验确定。where acci is the vertical acceleration, i is the sampling point, and w is the window size. After many tests and comparisons, w is set to 4. λ1 is the threshold of the acceleration variance in the sliding window, determined by multiple experiments.

f(GZmax)>λ2f(GZmax )>λ2 ,

其中GZmax是z轴角速度在滑动窗口中绝对值最大的一个样本点,建立的函数为幅值平方后缩小一千倍,λ2是幅值的阈值,经由多次实验决定。Among them, GZmax is a sample point with the largest absolute value of the z-axis angular velocity in the sliding window. The established function is that the amplitude is squared and then reduced by a thousand times, and λ2 is the threshold value of the amplitude, which is determined by many experiments.

λ3<i<λ4λ3 <i<λ4 ,

其中i为进入摆动相后累计的样本点个数,λ3和λ4分别为阈值下限和上限。经多次实验取值16和72。where i is the number of accumulated sample points after entering the swing phase, and λ3 and λ4 are the lower and upper thresholds, respectively. After many experiments, the values are 16 and 72.

未进入摆动相时进行零速修正以及计算航向角方差,通过滑动窗口中航向角方差的阈值判断是否进入转向动作,若方差大于设定阈值则判断为进入转向动作并记录此时航向角,继续接收数据直至方差回归阈值下,判断转向动作已完成并记录此时航向角,并根据这两个航向角变化计算转向角度。进入摆动相时持续接收并记录数据直至结束摆动相(多阈值判断),根据需求计算所需特征用以判断平地行走、上楼、下楼动作。记录的加速度双重积分得到位移结合经验公式和气压传感器精确测量步长,步高等运动数据。When not entering the swing phase, perform zero-speed correction and calculate the heading angle variance. Determine whether to enter the steering action by the threshold of the heading angle variance in the sliding window. If the variance is greater than the set threshold, it is judged to enter the steering action and record the heading angle at this time. Continue Receive data until the variance regression threshold is lower, judge that the steering action has been completed and record the heading angle at this time, and calculate the steering angle according to the changes of the two heading angles. When entering the swing phase, continue to receive and record data until the end of the swing phase (multi-threshold judgment), and calculate the required characteristics according to the needs to judge the actions of walking on flat ground, going upstairs, and going downstairs. The double integral of the recorded acceleration obtains the displacement combined with the empirical formula and the air pressure sensor to accurately measure the step length, step and other motion data.

比较经验公式

Figure BDA0003620232770000093
添加了一个偏置系数w来补偿传感器安装位置带来的差异。其中K是校准的常数参数,azmax是摆动相的竖直方向最小加速度,azmin是摆动相竖直方向最小加速度。S1则为经验公式下的步长。Comparative empirical formula
Figure BDA0003620232770000093
A bias factor w is added to compensate for differences in sensor mounting location. where K is a constant parameter for calibration, azmax is the minimum vertical acceleration of the wobble phase, and a zminis the minimum vertical acceleration of the wobble phase. S1 is the step size under the empirical formula.

Figure BDA0003620232770000101
Figure BDA0003620232770000101

数据预处理阶段已经将加速度转换到了惯性坐标系下,只需对水平面上的两轴加速度分别进行二次积分再求其平方和便得到了位移的平方,开方后即得到步长。In the data preprocessing stage, the acceleration has been converted to the inertial coordinate system, and the square of the displacement can be obtained by performing the quadratic integration of the accelerations of the two axes on the horizontal plane, and then calculating the sum of the squares.

本发明采用矩形法进行积分,取相邻两个采样点的加速度均值作为矩形的高a(x),通过采样速率计算出两个采样点之间的时间间隔t。进行一次积分可以得到采样点的瞬时速度,进行两次积分就可以得到相邻两个采样点之间的距离。采样点瞬时速度为:

Figure BDA0003620232770000102
The invention adopts the rectangle method for integration, takes the acceleration mean value of two adjacent sampling points as the height a(x) of the rectangle, and calculates the time interval t between the two sampling points through the sampling rate. The instantaneous speed of the sampling point can be obtained by performing one integration, and the distance between two adjacent sampling points can be obtained by performing two integrations. The instantaneous speed of the sampling point is:
Figure BDA0003620232770000102

位移为:

Figure BDA0003620232770000103
The displacement is:
Figure BDA0003620232770000103

本发明综合了这两种算法采用加权线性组合的方式,公式如下:The present invention integrates the weighted linear combination of these two algorithms, and the formula is as follows:

S=γS1+(1-γ)S2S=γS1 +(1-γ)S2

式中γ是一个常量参数,γ∈(0,1),S1是采用经验公式估计的步长,S2是加速度二次积分得到的步长。where γ is a constant parameter, γ∈(0, 1), S1 is the step size estimated by the empirical formula, and S2 is the step size obtained by quadratic integration of acceleration.

本发明在连续的步态信号中将各步态准确分离出来,并提取其时域特征做成数据集打上标签方便后续使用机器学习进行模型训练,步态切割采用多阈值步态相位检测方法进行,步态相位检测基于角速度和加速度融合计算实时分析人体是否为静止状态,当人体进入非静止状态后依然通过加速度和角速度融合计算分析人体是否产生摆动来区分转向动作,进入摆动动作时,持续接收实时运动数据并保存直至摆动相结束,处理分析这一摆动过程产生的数据得到所需特征并通过指针回到步态相位检测阶段,准备接收下一动作的数据。The present invention accurately separates each gait in the continuous gait signal, and extracts its time domain features to make a data set and labels it to facilitate subsequent model training using machine learning. The gait cutting adopts a multi-threshold gait phase detection method. , Gait phase detection is based on the fusion calculation of angular velocity and acceleration to analyze whether the human body is in a stationary state in real time. When the human body enters a non-stationary state, it still uses acceleration and angular velocity fusion calculation to analyze whether the human body swings to distinguish the steering action. When entering the swing action, continue to receive The real-time motion data is stored until the end of the swing phase, and the data generated by the swing process is processed and analyzed to obtain the required characteristics, and the pointer returns to the gait phase detection stage, ready to receive the data of the next action.

因为转向时航向角急剧变化,走路时Z轴角速度呈周期性波动且各轴加速度产生变动,据此可判断各步态起止位置并将其从连续信号中分离出来,每个步态分离后,计算极值、均值、方差等时域特征统计成一个数据集。Because the heading angle changes sharply when turning, the Z-axis angular velocity fluctuates periodically and the acceleration of each axis changes when walking. Based on this, the starting and ending positions of each gait can be judged and separated from the continuous signal. After each gait is separated, Calculate the time-domain features such as extreme value, mean, variance, etc. into a data set.

步骤S104、利用多种机器学习分类器进行模型训练从而进行特征降维,分类器包括SVM分类器、K近邻分类器、随机森林分类器、朴素贝叶斯、鉴别分析分类器。特征降维是找到贡献度占比90%以上的特征向量,将无关特征向量剔除,四位测试者的运动数据在不同维度特征各个分类器下的识别率如下表1所示:Step S104, using a variety of machine learning classifiers for model training to perform feature dimension reduction, the classifiers include SVM classifier, K-nearest neighbor classifier, random forest classifier, Naive Bayes, and discriminative analysis classifier. Feature dimensionality reduction is to find feature vectors with a contribution of more than 90%, and remove irrelevant feature vectors. The recognition rates of the motion data of the four testers under each classifier with different dimensional features are shown in Table 1 below:

表1Table 1

Figure BDA0003620232770000111
Figure BDA0003620232770000111

特征降维后选取了z轴角速度最小值和气压计计算的高度变化两个特征作为判断依据,分类效果如图9所示。After feature dimensionality reduction, two features, the minimum value of the z-axis angular velocity and the height change calculated by the barometer, are selected as the judgment basis, and the classification effect is shown in Figure 9.

步骤S105、在计算机上完成步骤S102~S4后,用Keil软件将步骤S102~ S4的算法过程编写C语言程序写入微控制器的MCU中完成嵌入式开发。Step S105: After completing steps S102-S4 on the computer, use Keil software to write the C language program written in the algorithm process of steps S102-S4 into the MCU of the microcontroller to complete the embedded development.

图4中展示的算法流程基于C语言编写嵌入到单片机中,部分数据处理效果如图6和图7所示,程序设定九轴惯性传感器和气压传感器获取原始数据的采样率为50hz,采集设备一边采集原始数据一边将数据打包通过无线射频模块发送给数据处理分析模块进行数据预处理,步态相位检测基于角速度和加速度融合计算实时分析人体是否为静止状态,当人体进入非静止状态后通过加速度、角速度和时间序列多阈值判断分析人体是否进入摆动相来识别转向动作,进入摆动相时,持续接收实时运动数据并保存直至摆动相结束,处理分析这一摆动过程产生的数据得到所需特征并通过指针回到步态相位检测阶段,准备接收下一动作的数据。The algorithm flow shown in Figure 4 is based on the C language and embedded in the microcontroller. Part of the data processing effect is shown in Figure 6 and Figure 7. The program sets the sampling rate of the nine-axis inertial sensor and the air pressure sensor to obtain raw data at 50hz, and the acquisition device While collecting the original data, the data is packaged and sent to the data processing and analysis module through the radio frequency module for data preprocessing. The gait phase detection is based on the fusion calculation of angular velocity and acceleration to analyze whether the human body is in a static state in real time. , angular velocity and time series multi-threshold judgment and analysis whether the human body enters the swing phase to identify the steering action, when entering the swing phase, continue to receive real-time motion data and save it until the end of the swing phase, process and analyze the data generated by the swing process to obtain the required characteristics and Return to the gait phase detection stage through the pointer, ready to receive data for the next action.

为了验证本发明的效果,发明人还进行了以下试验例:In order to verify the effect of the present invention, the inventor also carried out the following test examples:

选取两名平均身高为173厘米的24岁年轻男性作为研究对象,在实验中,受试者以惯常的速度和姿势行走,实验人员从楼梯和楼道自由徘徊,简化的实验场景如图5所示。楼层高度为4m,实验规划:在楼道从划定的位置出发走到楼梯处,在一到三楼中间自由徘徊。实验人员的活动动作包括平地行走、上楼、下楼和转向四种动作。基于上述基本运动场景,利用本发明的单节点人体步态实时识别系统对受试者的步态进行了识别并对步长、转向角度和高度变化做了估计,实验结果如下表2所示。其中真实值是实地测量的高度、长度以及转向角度(为了方便研究起见,每次转向均为90°),该实验例说明了本发明的步态识别系统具有良好的精度。Two 24-year-old young men with an average height of 173 cm were selected as the research subjects. In the experiment, the subjects walked at their usual speed and posture, and the experimenters wandered freely from the stairs and corridors. The simplified experimental scene is shown in Figure 5. . The floor height is 4m, and the experimental plan is to start from the designated position in the corridor and walk to the stairs, and wander freely between the first and third floors. The activities of the experimenters include walking on flat ground, going upstairs, going downstairs and turning. Based on the above basic motion scene, the single-node human gait real-time recognition system of the present invention is used to identify the gait of the subject and estimate the step length, steering angle and height changes. The experimental results are shown in Table 2 below. The real values are the height, length and turning angle measured on the spot (for the convenience of research, each turn is 90°). This experimental example shows that the gait recognition system of the present invention has good accuracy.

表2Table 2

Figure BDA0003620232770000121
Figure BDA0003620232770000121

本发明提供了一种基于传感器的单点式实时步态识别系统设计方法,在满足佩戴与舒适性的前提下融合了九轴惯性传感器和气压传感器提高了识别精度,同时采用边缘计算技术使得本系统完全无需外部计算机参与,可实时将识别结果与运动参数显示出来。本系统设计方法不仅提高了识别精度,而且成本低,便携性好,时效性好,对于病患腿部康复训练具有良好的应用前景。The invention provides a sensor-based single-point real-time gait recognition system design method, which integrates a nine-axis inertial sensor and an air pressure sensor on the premise of satisfying wearing and comfort to improve the recognition accuracy, and adopts edge computing technology to make the The system does not need any external computer at all, and can display the recognition results and motion parameters in real time. The system design method not only improves the recognition accuracy, but also has low cost, good portability and good timeliness, and has a good application prospect for the patient's leg rehabilitation training.

Claims (10)

Translated fromChinese
1.一种基于单节点传感器的步态识别系统设计方法,其特征在于:包括如下步骤:1. a method for designing a gait recognition system based on a single-node sensor, is characterized in that: comprise the steps:步骤S101、构建数据采集模块和数据处理分析模块:数据采集模块包括电源模块、微控制器、九轴惯性传感器、气压传感器和无线射频模块;数据处理分析模块包括无线模块和微控制器;Step S101, constructing a data acquisition module and a data processing and analysis module: the data acquisition module includes a power supply module, a microcontroller, a nine-axis inertial sensor, an air pressure sensor and a wireless radio frequency module; the data processing and analysis module includes a wireless module and a microcontroller;步骤S102、将数据采集模块做成脚环的形式佩戴在测试者的脚腕处采集人体运动数据,采集的人体运动数据包括受试者的行走、转向、上楼梯、下楼梯四种动作所产生的加速度、角速度、姿态角和气压值,九轴惯性传感器的X轴对应人体前进方向、Y轴垂直于大地向下、Z轴指向人体右侧方向;Step S102, making the data acquisition module into the form of a foot ring and wearing it at the tester's ankle to collect human motion data, the collected human motion data includes the subject's four actions of walking, turning, going up the stairs, and going down the stairs. The X-axis of the nine-axis inertial sensor corresponds to the forward direction of the human body, the Y-axis is perpendicular to the ground downward, and the Z-axis points to the right direction of the human body;步骤S103、对步骤S102中采集的人体运动数据过无线装置传输到数据处理分析模块进行数据分析处理,得到步态时域特征、步长、步高与转向角度的数据并制作数据集;Step S103, transmitting the human body motion data collected in step S102 to a data processing and analysis module through a wireless device for data analysis and processing, obtaining data of gait time domain features, step length, step height and steering angle, and making a data set;步骤S104、利用多种机器学习分类器进行模型训练从而进行特征降维,特征降维是找到贡献度占比90%以上的特征向量,将无关特征向量剔除,特征降维后选取的特征为:z轴角速度最小值和气压计计算的高度变化;Step S104, using a variety of machine learning classifiers for model training to perform feature dimension reduction. Feature dimension reduction is to find feature vectors with a contribution of more than 90%, remove irrelevant feature vectors, and select features after feature dimension reduction: z-axis angular velocity minimum and barometer-calculated altitude change;步骤S105、在计算机上完成步骤S102~S4后,用Keil软件将步骤S102~S4的算法过程编写C语言程序写入微控制器中完成嵌入式开发。Step S105: After completing steps S102-S4 on the computer, use Keil software to write a C language program written in the algorithm process of steps S102-S4 into a microcontroller to complete embedded development.2.根据权利要求1所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述步骤S103中的数据分析处理包括数据预处理、步态切割和时域特征计算。2 . The method for designing a gait recognition system based on a single-node sensor according to claim 1 , wherein the data analysis and processing in the step S103 includes data preprocessing, gait cutting and time domain feature calculation. 3 .3.根据权利要求2所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述数据预处理包括坐标系转换和降噪处理,坐标系转换是将步骤S102中九轴惯性传感器采集的人体运动数据中的加速度利用姿态角坐标系转换矩阵处理统一在地球坐标系下,降噪处理包括去除异常值和滤波去噪,对于异常值采用拉依达准则进行剔除,对于运动过程中不规则震颤引起的噪声采用扩展卡尔曼滤波器进行滤波处理。3 . The method for designing a gait recognition system based on a single-node sensor according to claim 2 , wherein the data preprocessing includes coordinate system conversion and noise reduction processing, and the coordinate system conversion is to convert the 9 in step S102 . 4 . The acceleration in the human motion data collected by the axis inertial sensor is processed by the attitude angle coordinate system transformation matrix and unified in the earth coordinate system. The noise reduction processing includes removing outliers and filtering and denoising. For outliers, the Laida criterion is used to eliminate them. The noise caused by the irregular tremor during the movement is filtered by the extended Kalman filter.4.根据权利要求3所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述姿态角坐标系转换矩阵处理过程如下:4. a kind of gait recognition system design method based on single node sensor according to claim 3, is characterized in that: described attitude angle coordinate system transformation matrix processing process is as follows:绕Y轴旋转的旋转矩阵
Figure FDA0003620232760000021
角度ψ为姿态角中的航向角yaw;Rotation matrix to rotate around the Y axis
Figure FDA0003620232760000021
The angle ψ is the heading angle yaw in the attitude angle;绕Z轴旋转的旋转矩阵
Figure FDA0003620232760000022
角度θ为姿态角中的俯仰角pitch;
Rotation matrix to rotate around the Z axis
Figure FDA0003620232760000022
The angle θ is the pitch angle pitch in the attitude angle;
绕X轴旋转的旋转矩阵
Figure FDA0003620232760000023
角度
Figure FDA0003620232760000024
为姿态角中的翻滚角roll;
Rotation matrix to rotate around the X axis
Figure FDA0003620232760000023
angle
Figure FDA0003620232760000024
is the roll angle roll in the attitude angle;
按照Y-Z-X的顺序进行旋转得到旋转矩阵Rotate in the order of Y-Z-X to get the rotation matrix
Figure DEST_PATH_BDA0003620232770000035
Figure DEST_PATH_BDA0003620232770000035
坐标转换方程为
Figure FDA0003620232760000026
其中,
Figure FDA0003620232760000027
为地球坐标系下的三轴加速度,
Figure FDA0003620232760000028
为九轴惯性传感器坐标系下的三轴加速度,
The coordinate transformation equation is
Figure FDA0003620232760000026
in,
Figure FDA0003620232760000027
is the three-axis acceleration in the earth coordinate system,
Figure FDA0003620232760000028
is the three-axis acceleration in the nine-axis inertial sensor coordinate system,
所以九轴惯性传感器坐标系下的三轴加速度转换为地球坐标系下的三轴加速度转换方程为:Therefore, the conversion equation of the three-axis acceleration in the nine-axis inertial sensor coordinate system to the three-axis acceleration in the earth coordinate system is:
Figure FDA0003620232760000029
Figure FDA0003620232760000029
5.根据权利要求4所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:得到地球坐标系下的三轴加速度后,通过建立多个阈值对三轴加速度和角速度的约束条件来确定步态运动的站立相和摆动相,未进入摆动相时进行零速修正和计算航向角方差,设定航向角方差的阈值判断是否进入转向动作,若方差大于设定阈值则判断为进入转向动作并记录此时航向角,继续接收数据直至方差回归阈值下,判断转向动作已完成并记录此时航向角,并根据这两个航向角变化计算转向角度;进入摆动相时持续接收并记录数据直至结束摆动相,根据需求计算所需特征用以判断平地行走、上楼、下楼动作,记录的三轴加速度双重积分结合经验公式得到的位移和气压计精确测量步长、步高的运动数据。5. a kind of gait recognition system design method based on single node sensor according to claim 4 is characterized in that: after obtaining the triaxial acceleration under the earth coordinate system, by establishing a plurality of thresholds to triaxial acceleration and angular velocity Constraints are used to determine the standing phase and swing phase of gait motion. When the swing phase is not entered, zero-speed correction is performed and the heading angle variance is calculated. The threshold of the heading angle variance is set to determine whether to enter the steering action, and if the variance is greater than the set threshold, it is judged In order to enter the steering action and record the heading angle at this time, continue to receive data until the variance returns to the threshold, judge that the steering action has been completed and record the heading angle at this time, and calculate the steering angle according to the changes of the two heading angles; continue to receive when entering the swing phase And record the data until the end of the swing phase, and calculate the required characteristics according to the requirements to judge the movements of walking on the level, going upstairs, and going downstairs. The recorded three-axis acceleration double integral is combined with the displacement obtained by the empirical formula and the barometer to accurately measure the step length and step height. movement data.6.根据权利要求5所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述多个阈值检测的约束条件为:滑动窗口中加速度的方差阈值、Z轴加速度幅值和时间长度,约束方程如下:6 . The method for designing a gait recognition system based on a single-node sensor according to claim 5 , wherein the constraint conditions for the detection of the multiple thresholds are: the variance threshold of acceleration in the sliding window, the Z-axis acceleration amplitude value and time length, the constraint equation is as follows:
Figure FDA0003620232760000031
Figure FDA0003620232760000031
其中acci是垂直方向加速度,i是采样点,w是窗口大小,λ1是滑动窗口中加速度方差的阈值;where acci is the vertical acceleration, i is the sampling point, w is the window size, and λ1 is the threshold of the acceleration variance in the sliding window;f(GZmax)>λ2f(GZmax )>λ2 ,其中GZmax是z轴角速度在滑动窗口中绝对值最大的一个样本点,建立的函数为幅值平方后缩小一千倍,λ2是幅值的阈值;Among them, GZmax is a sample point with the largest absolute value of the z-axis angular velocity in the sliding window. The established function is that the amplitude is squared and then reduced by a thousand times, and λ2 is the threshold value of the amplitude;λ3<i<λ4λ3 <i<λ4 ,其中i为进入摆动相后累计的样本点个数,λ3和λ4分别为阈值下限和上限。where i is the number of accumulated sample points after entering the swing phase, and λ3 and λ4 are the lower and upper thresholds, respectively.
7.根据权利要求6所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述经验公式为:7. a kind of gait recognition system design method based on single node sensor according to claim 6, is characterized in that: described empirical formula is:
Figure FDA0003620232760000032
Figure FDA0003620232760000032
其中K是校准的常数参数,azmax是摆动相的竖直方向最小加速度,azmin是摆动相竖直方向最小加速度,添加偏置系数w补偿传感器安装位置带来的差异,所以采用经验公式估计的步长S1为:Where K is a constant parameter for calibration, azmax is the minimum acceleration in the vertical direction of the swing phase, a zminis the minimum acceleration in the vertical direction of the swing phase, and the bias coefficient w is added to compensate for the difference caused by the installation position of the sensor, so the empirical formula is used to estimateThe step size S1 is:
Figure FDA0003620232760000041
Figure FDA0003620232760000041
采用矩形法进行积分,选取相邻两个采样点的加速度均值作为矩形的高a(x),通过采样速率计算出两个采样点之间的时间间隔t,进行一次积分可以得到采样点的瞬时速度,进行两次积分就可以得到相邻两个采样点之间的距离,采样点瞬时速度为:The rectangle method is used for integration, and the average acceleration value of two adjacent sampling points is selected as the height a(x) of the rectangle. The time interval t between the two sampling points is calculated by the sampling rate, and the instantaneous value of the sampling point can be obtained by performing one integration speed, the distance between two adjacent sampling points can be obtained by performing two integrations, and the instantaneous speed of the sampling point is:
Figure FDA0003620232760000042
Figure FDA0003620232760000042
加速度二次积分得到的步长S2为:The step size S2 obtained by the quadratic integration of the acceleration is:
Figure FDA0003620232760000043
Figure FDA0003620232760000043
采用加权线性组合的方式,三轴加速度双重积分结合经验公式得到的位移S公式如下:Using the weighted linear combination method, the displacement S formula obtained by the double integral of the three-axis acceleration combined with the empirical formula is as follows:S=γS1+(1-γ)S2S=γS1 +(1-γ)S2 ,其中,γ是一个常量参数,γ∈(0,1)。where γ is a constant parameter, γ∈(0, 1).
8.根据权利要求7所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述步态切割采用多阈值步态相位检测方法判断各步态起止位置并将其从数据预处理后的连续信号中分离出来,步态相位检测基于角速度和加速度融合计算实时分析人体是否为静止状态,当人体进入非静止状态后通过加速度、角速度和时间序列多阈值判断分析人体是否产生摆动来区分转向动作,进入摆动动作时,持续接收实时运动数据并保存直至摆动相结束,处理分析这一摆动过程产生的数据得到所需特征并通过指针回到步态相位检测阶段,准备接收下一动作的数据。8 . The method for designing a gait recognition system based on a single-node sensor according to claim 7 , wherein the gait cutting adopts a multi-threshold gait phase detection method to determine the starting and ending positions of each gait and converts them from the gait. 9 . It is separated from the continuous signal after data preprocessing, and the gait phase detection is based on the fusion calculation of angular velocity and acceleration to analyze whether the human body is in a static state in real time. Swing to distinguish the steering action, when entering the swing action, continue to receive real-time motion data and save it until the end of the swing phase, process and analyze the data generated by this swing process to obtain the required characteristics and return to the gait phase detection stage through the pointer, ready to receive the next An action data.9.根据权利要求8所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述时域特征计算包括对各分离出来的步态计算极值、均值、方差。9 . The method for designing a gait recognition system based on a single-node sensor according to claim 8 , wherein the time-domain feature calculation comprises calculating an extreme value, a mean value and a variance for each separated gait. 10 .10.根据权利要求1所述的一种基于单节点传感器的步态识别系统设计方法,其特征在于:所述步骤S104中分类器包括SVM分类器、K近邻分类器、随机森林分类器、朴素贝叶斯、鉴别分析分类器。10. The method for designing a gait recognition system based on a single-node sensor according to claim 1, wherein the classifiers in step S104 include SVM classifiers, K-nearest neighbor classifiers, random forest classifiers, naive classifiers Bayesian, discriminative analysis classifiers.
CN202210460125.7A2022-04-282022-04-28Gait recognition system design method based on single-node sensorActiveCN114964225B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210460125.7ACN114964225B (en)2022-04-282022-04-28Gait recognition system design method based on single-node sensor

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210460125.7ACN114964225B (en)2022-04-282022-04-28Gait recognition system design method based on single-node sensor

Publications (2)

Publication NumberPublication Date
CN114964225Atrue CN114964225A (en)2022-08-30
CN114964225B CN114964225B (en)2024-09-20

Family

ID=82979941

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210460125.7AActiveCN114964225B (en)2022-04-282022-04-28Gait recognition system design method based on single-node sensor

Country Status (1)

CountryLink
CN (1)CN114964225B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118557179A (en)*2024-05-092024-08-30中国科学院深圳先进技术研究院Real-time motion mode switching identification system and method based on single inertial sensor
PL447226A1 (en)*2023-12-212025-06-23Telvis Spółka Z Ograniczoną OdpowiedzialnościąAnthropotechnical system for neuromotor stimulation of human gait

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101250215B1 (en)*2012-05-312013-04-03삼성탈레스 주식회사Pedestrian dead-reckoning system using kalman filter and walking state estimation algorithm and method for height estimation thereof
CN104729507A (en)*2015-04-132015-06-24大连理工大学Gait recognition method based on inertial sensor
CN111291865A (en)*2020-01-212020-06-16北京工商大学Gait recognition method based on convolutional neural network and isolated forest

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101250215B1 (en)*2012-05-312013-04-03삼성탈레스 주식회사Pedestrian dead-reckoning system using kalman filter and walking state estimation algorithm and method for height estimation thereof
CN104729507A (en)*2015-04-132015-06-24大连理工大学Gait recognition method based on inertial sensor
CN111291865A (en)*2020-01-212020-06-16北京工商大学Gait recognition method based on convolutional neural network and isolated forest

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GUANG ZENG ET AL.: "Experimentalandmodelingstudyonrelation of pedestrian step length and frequency under different headways", PHYSICA A: STATISTICAL MECHANICS AND ITS APPLICATIONS, 31 December 2018 (2018-12-31)*
孙佳亨;孟晓亮;梁豪;段洪君;詹志坤;: "基于MEMS传感器的体操动作识别", 电子测量与仪器学报, no. 03, 15 March 2020 (2020-03-15)*

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
PL447226A1 (en)*2023-12-212025-06-23Telvis Spółka Z Ograniczoną OdpowiedzialnościąAnthropotechnical system for neuromotor stimulation of human gait
CN118557179A (en)*2024-05-092024-08-30中国科学院深圳先进技术研究院Real-time motion mode switching identification system and method based on single inertial sensor

Also Published As

Publication numberPublication date
CN114964225B (en)2024-09-20

Similar Documents

PublicationPublication DateTitle
CN108627153B (en)Rigid body motion tracking system based on inertial sensor and working method thereof
CN109827577B (en) High-precision inertial navigation and positioning algorithm based on motion state detection
CN106705968B (en) Indoor Inertial Navigation Algorithm Based on Attitude Recognition and Step Model
CN109798891B (en)Inertial measurement unit calibration system based on high-precision motion capture system
CN108836346A (en)A kind of Human Body Gait Analysis method and system based on inertial sensor
LiuHuman motion state recognition based on MEMS sensors and Zigbee network
CN107014377A (en)A kind of multifunction shoe pads based on inertial positioning
CN107644229A (en)Indoor anomaly detection method based on multi-sensor information fusion
CN105850773A (en)Device and method for monitoring of pig attitudes based on micro-inertial sensor
CN114964225B (en)Gait recognition system design method based on single-node sensor
CN102411440A (en) A wireless head-controlled mouse based on accelerometer and gyroscope sensors
CN107490378B (en)Indoor positioning and navigation method based on MPU6050 and smart phone
CN109724602A (en) An attitude calculation system based on hardware FPU and its calculation method
CN111568436B (en) A Gait Symmetry Evaluation Method Based on Regression Rotation Angle
CN116027905A (en)Double kayak upper limb motion capturing method based on inertial sensor
CN108245172A (en)It is a kind of not by the human posture recognition method of position constraint
CN112762934B (en)Lower limb movement direction prediction device and method
CN105758404A (en)Real-time positioning method and system of intelligent equipment
CN116465412A (en)Improved PDR indoor positioning method based on LSTM and attention mechanism
CN106886288A (en)A kind of attitude dynamic method for catching and device
CN113229806A (en)Wearable human body gait detection and navigation system and operation method thereof
CN113029153B (en) Multi-scenario PDR positioning method based on smartphone multi-sensor fusion and SVM classification
CN114719865A (en) A multi-sensor integrated navigation method for indoor unmanned aerial vehicles based on unscented Kalman filtering
CN111197974B (en)Barometer height measuring and calculating method based on Android inertial platform
Qiu et al.Heterogeneous data fusion for three-dimensional gait analysis using wearable MARG sensors

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp