CN118670390A - Multifunctional sensor data processing method and system - Google Patents
Multifunctional sensor data processing method and system Download PDFInfo
- Publication number
- CN118670390A CN118670390A CN202410684487.3A CN202410684487A CN118670390A CN 118670390 A CN118670390 A CN 118670390A CN 202410684487 A CN202410684487 A CN 202410684487A CN 118670390 A CN118670390 A CN 118670390A
- Authority
- CN
- China
- Prior art keywords
- quaternion
- parameter
- collision
- time interval
- electronic equipment
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 230000001133 acceleration Effects 0.000 claims abstract description 24
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 24
- 238000004458 analytical method Methods 0.000 claims abstract description 13
- 238000004364 calculation method Methods 0.000 claims abstract description 9
- 230000008859 change Effects 0.000 claims abstract description 9
- 238000000034 method Methods 0.000 claims description 26
- 230000006870 function Effects 0.000 claims description 21
- 238000005457 optimization Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 claims description 9
- 230000004044 response Effects 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 8
- 238000001514 detection method Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 208000033999 Device damage Diseases 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 238000012795 verification 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
-
- 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/10—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
- G01C21/12—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
- G01C21/16—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M7/00—Vibration-testing of structures; Shock-testing of structures
- G01M7/08—Shock-testing
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明公开了一种多功能传感器数据处理方法和系统,通过四元数表示电子设备碰撞过程中的姿态参数,并结合梯度算法和四元素变化率实时更新优化四元数表示下的姿态参数,优化后的四元数姿态参数能更有效的用于后续的碰撞分析。而且将碰撞采集的加速度数据用于梯度算法中学习速率的动态调整,将碰撞采集的角速度数据用于四元数变化率计算,实现更加实时有效的参数调整。
The present invention discloses a multifunctional sensor data processing method and system, which uses quaternions to represent the attitude parameters of electronic equipment during collision, and combines gradient algorithm and quaternary element change rate to update and optimize the attitude parameters under quaternion representation in real time, so that the optimized quaternion attitude parameters can be more effectively used for subsequent collision analysis. In addition, the acceleration data collected by the collision is used for the dynamic adjustment of the learning rate in the gradient algorithm, and the angular velocity data collected by the collision is used for the quaternion change rate calculation, so as to achieve more real-time and effective parameter adjustment.
Description
技术领域Technical Field
本发明属于计算机数据识别与分析领域,具体涉及电子设备在碰撞过程中四元数姿态参数的优化调整。The invention belongs to the field of computer data recognition and analysis, and in particular relates to the optimization adjustment of quaternion attitude parameters of an electronic device during a collision.
背景技术Background Art
电子设备在日常使用中存在着意外掉落和碰撞的风险,这可能导致设备损坏、数据丢失,甚至带来安全隐患。为了提高电子设备的可靠性和安全性,研究电子设备掉落监测系统具有重要意义,姿态检测是通过加速度计、陀螺仪和磁力计等传感器实时监测电子设备在碰撞过程中的加速度、角速度和磁场变化等参数。Electronic devices are at risk of accidental drops and collisions in daily use, which may cause device damage, data loss, and even safety hazards. In order to improve the reliability and safety of electronic devices, it is of great significance to study the electronic device drop monitoring system. Attitude detection is to monitor the acceleration, angular velocity, magnetic field changes and other parameters of electronic devices in real time during the collision process through sensors such as accelerometers, gyroscopes and magnetometers.
在姿态检测数据分析领域,传统的算法如滤波算法、峰值检测算法和时频分析算法已经被广泛应用。传统姿态检测方式主要是在碰撞瞬间,记录加速度、角速度等数据,用欧拉角来表示碰撞瞬间的运动状况。传统方法还多用卡尔曼滤波器等其他滤波器来提高姿态估计的精度,可以抑制噪声和干扰。In the field of posture detection data analysis, traditional algorithms such as filtering algorithms, peak detection algorithms and time-frequency analysis algorithms have been widely used. The traditional posture detection method mainly records acceleration, angular velocity and other data at the moment of collision, and uses Euler angles to represent the motion status at the moment of collision. Traditional methods also use other filters such as Kalman filters to improve the accuracy of posture estimation, which can suppress noise and interference.
然而,在复杂碰撞场景下,这些算法的准确性和鲁棒性仍然需要提高。面对数据不准确性、算法复杂性、数据处理实时性、模型建立与验证、多场景适应性等关键问题,机器学习算法的应用成为解决方案之一。此外,传统算法受到碰撞角度、碰撞速度、电子设备类型等多方面因素的制约,缺乏足够的通用性和适应性,一个算法仅只能对于一个模型适用。需要其他的算法设计来适配不同的模型,这无形中增加了成本的支出。However, in complex collision scenarios, the accuracy and robustness of these algorithms still need to be improved. Faced with key issues such as data inaccuracy, algorithm complexity, real-time data processing, model building and verification, and multi-scenario adaptability, the application of machine learning algorithms has become one of the solutions. In addition, traditional algorithms are constrained by many factors such as collision angle, collision speed, and type of electronic equipment. They lack sufficient versatility and adaptability, and one algorithm can only be applied to one model. Other algorithm designs are needed to adapt to different models, which invisibly increases cost expenditures.
因此,基于电子设备碰撞场景下复杂的参数条件,如何实时获取有效的用于碰撞分析的参数,以形成后续对电子设备进行姿态调整的指令至关重要。Therefore, based on the complex parameter conditions in the electronic device collision scenario, it is crucial to obtain effective parameters for collision analysis in real time to form subsequent instructions for posture adjustment of the electronic device.
发明内容Summary of the invention
为了解决现有技术的问题,本发明提出了一种通过四元数表示电子设备碰撞过程中的姿态参数,并结合梯度算法和四元素变化率实时更新优化四元数表示下的姿态参数的方法,优化后的四元数姿态参数能更有效的用于后续的碰撞分析。具体来说,本发明涉及一种多功能传感器数据处理方法,其特征在于,包括:In order to solve the problems of the prior art, the present invention proposes a method for representing the posture parameters of an electronic device during a collision by quaternions, and combining a gradient algorithm and a quaternary element change rate to update and optimize the posture parameters under the quaternion representation in real time. The optimized quaternion posture parameters can be more effectively used for subsequent collision analysis. Specifically, the present invention relates to a multifunctional sensor data processing method, characterized in that it includes:
参数采集阶段:通过传感器采集电子设备在碰撞过程中的加速度角速度和姿态参数q,对所述加速度进行归一化处理得到对所述角速度进行归一化处理得到使用四元数表示所述姿态参数q。Parameter collection stage: The acceleration of the electronic device during the collision is collected through sensors Angular velocity And attitude parameter q, the acceleration is normalized to obtain The angular velocity is normalized to obtain The posture parameter q is represented by a quaternion.
归一化处理可以消除数据间的尺度差异,提高了算法的稳定性和收敛速度。Normalization can eliminate the scale differences between data and improve the stability and convergence speed of the algorithm.
参数优化阶段:利用梯度下降算法,计算目标函数J(q)关于四元数的梯度,根据梯度迭代时参数的更新方向调整四元数值:Parameter optimization stage: Use the gradient descent algorithm to calculate the gradient of the objective function J(q) with respect to the quaternion, and adjust the quaternion value according to the update direction of the parameters during gradient iteration:
其中destanglei是期望角度,curanglei是当前角度,n为样本总数,q′是迭代后的四元数值,qcur是当前的四元数值,是梯度函数,a为学习速率,其确定方式为其中ar为预设的当前学习速率,gr为预设的归一化加速度参量。Where destangle i is the desired angle, curangle i is the current angle, n is the total number of samples, q ′ is the quaternion value after iteration, q cur is the current quaternion value, is the gradient function, a is the learning rate, which is determined by Where a r is the preset current learning rate, and gr is the preset normalized acceleration parameter.
梯度下降算法能迭代优化姿态参数,逐步提高姿态估计的精度,可以更快地收敛到最优解。The gradient descent algorithm can iteratively optimize the posture parameters, gradually improve the accuracy of posture estimation, and converge to the optimal solution more quickly.
计算四元数的变化率 Calculate the rate of change of a quaternion
其中是四元数的Hamilton乘积,表示实部为0,虚部为的向量。in is the Hamilton product of quaternions, The real part is 0 and the imaginary part is Vector.
对四元数进行积分后,根据两次姿态更新之间的时间间隔Δt,继续更新四元数的值:After integrating the quaternion, continue to update the value of the quaternion according to the time interval Δt between two attitude updates:
其中qnew为更新后的四元数值,接着对更新后的四元数值进行归一化处理得到处理后的姿态参数。Where q new is the updated quaternion value, and then the updated quaternion value is normalized to obtain the processed posture parameters.
参数应用阶段:根据所述处理后的姿态参数进行碰撞分析,形成针对所述电子设备的碰撞响应指令,将所述碰撞响应指令反馈给所述电子设备。Parameter application stage: performing collision analysis according to the processed posture parameters, forming a collision response instruction for the electronic device, and feeding back the collision response instruction to the electronic device.
进一步的,对所述加速度和所述角速度进行归一化处理,对更新后的四元数进行归一化处理,包括:将相应的加速度、角速度或四元数参数与其取模后的比值,作为所述归一化处理的结果。Furthermore, the acceleration and the angular velocity are normalized, and the updated quaternion is normalized, including: taking the ratio of the corresponding acceleration, angular velocity or quaternion parameter to the modulus thereof as the result of the normalization.
进一步的,所述多功能传感器为九轴传感器。Furthermore, the multifunctional sensor is a nine-axis sensor.
进一步的,所述电子设备、与所述电子设备近场通信连接的计算装置;所述参数应用阶段的方法可实施主体包括:所述电子设备、与所述电子设备近场通信连接的计算装置、远程服务器。Furthermore, the electronic device and a computing device connected to the electronic device via near field communication; the method in the parameter application phase may be implemented by: the electronic device, a computing device connected to the electronic device via near field communication, and a remote server.
进一步的,所述近场通信方式包括:蓝牙连接、wifi连接。Furthermore, the near field communication method includes: Bluetooth connection and Wi-Fi connection.
进一步的,所述时间间隔Δt采用预设的固定时间间隔,或者采用动态时间间隔。Furthermore, the time interval Δt adopts a preset fixed time interval, or adopts a dynamic time interval.
进一步的,所述采用动态时间间隔,包括:在固定时间间隔的基础上,将所述固定时间间隔值乘以调整因子的计算结果作为动态时间间隔;其中所述调整因子的值根据确定。Furthermore, the use of a dynamic time interval includes: on the basis of a fixed time interval, multiplying the fixed time interval value by an adjustment factor to obtain a dynamic time interval; wherein the value of the adjustment factor is based on Sure.
本发明还涉及一种多功能传感器数据处理系统,其特征在于:包括参数采集单元、参数优化单元和参数应用单元,所述参数采集单元将采集的电子设备碰撞信息预处理后传递给所述参数优化单元,所述参数优化单元对四元数表示下的碰撞姿态参数进行优化,并将优化后所述姿态参数传递给所述参数应用单元用于后续碰撞分析;其中各单元具体还用于实现权利要求1-7中任一项所述的方法的步骤。The present invention also relates to a multifunctional sensor data processing system, characterized in that it includes a parameter acquisition unit, a parameter optimization unit and a parameter application unit, wherein the parameter acquisition unit pre-processes the collected electronic device collision information and passes it to the parameter optimization unit, the parameter optimization unit optimizes the collision posture parameters under quaternion representation, and passes the optimized posture parameters to the parameter application unit for subsequent collision analysis; wherein each unit is specifically used to implement the steps of the method described in any one of claims 1-7.
本发明还涉及一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-7中任一项所述的方法的步骤。The present invention also relates to a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.
本发明还涉及一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1-7中任一项所述的方法的步骤。The present invention also relates to a computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
本发明专利的有益技术效果包括:The beneficial technical effects of this patent include:
(1)通过四元数表示电子设备碰撞过程中的姿态参数,四元数可以用来精确地描述任意方向的旋转,而不像欧拉角有可能存在奇异性问题,具有良好的性质;并结合梯度算法和四元素变化率实时更新优化四元数表示下的姿态参数,以实现更有效的后续碰撞分析;(1) Quaternions are used to represent the attitude parameters of electronic devices during collision. Quaternions can be used to accurately describe rotations in any direction, unlike Euler angles, which may have singularity problems and have good properties. The attitude parameters represented by quaternions are updated and optimized in real time by combining the gradient algorithm and the rate of change of the four elements, so as to achieve more effective subsequent collision analysis.
(2)将碰撞采集的加速度数据用于梯度算法中学习速率的动态调整,将碰撞采集的角速度数据用于四元数变化率计算,实现更加实时有效的参数调整;(2) The acceleration data collected by the collision is used for the dynamic adjustment of the learning rate in the gradient algorithm, and the angular velocity data collected by the collision is used for the calculation of the quaternion change rate, so as to achieve more real-time and effective parameter adjustment;
(3)参数优化计算的主体框架涉及的数据来源简单,计算方式不需要其它辅助计算就能实现有效的姿态参数调整,尤其对于安置九轴传感器的电子设备的碰撞分析具有良好的实用意义。(3) The data sources involved in the main framework of parameter optimization calculation are simple, and the calculation method can achieve effective attitude parameter adjustment without other auxiliary calculations, which is of great practical significance, especially for the collision analysis of electronic equipment equipped with nine-axis sensors.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1:根据本发明实施例的多功能传感器数据处理方法框架图。FIG1 is a framework diagram of a multifunctional sensor data processing method according to an embodiment of the present invention.
图2:根据本发明实施例的多功能传感器数据处理系统框架图。FIG. 2 is a framework diagram of a multifunctional sensor data processing system according to an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
图1示出了一个实施例下的多功能传感器数据处理方法框架图,相应的、一种多功能传感器数据处理方法涉及参数采集阶段、参数优化阶段和参数应用阶段。FIG1 shows a framework diagram of a multifunctional sensor data processing method under an embodiment. Accordingly, a multifunctional sensor data processing method involves a parameter acquisition phase, a parameter optimization phase and a parameter application phase.
优选的,所述多功能传感器为九轴传感器。九轴传感器集成了三个方向的加速度计、陀螺仪和磁力计,能够全面获取电子设备在空间中的运动状态。这种传感器在姿态检测中的应用,特别是在碰撞场景下,为实时监测电子设备的受力情况提供了重要数据支持。Preferably, the multifunctional sensor is a nine-axis sensor. The nine-axis sensor integrates an accelerometer, a gyroscope and a magnetometer in three directions, and can fully obtain the motion state of the electronic device in space. The application of this sensor in posture detection, especially in collision scenarios, provides important data support for real-time monitoring of the force conditions of electronic devices.
其中在参数采集阶段主要对电子设备的碰撞参数进行采集,包括对加速度、角速度进行归一化处理,使用四元数表示所述姿态参数。In the parameter collection stage, the collision parameters of the electronic device are mainly collected, including normalizing the acceleration and angular velocity, and using quaternions to represent the posture parameters.
陀螺仪和加速度计的输出单位不同(陀螺仪输出通常以角速度为单位,加速度计输出通常以加速度为单位),并且不同传感器的输出可能具有不同的精度,归一化处理可以将数据映射到相同的尺度范围内,减少不同传感器数据之间的尺度差异。通过将数据归一化到相同的尺度范围内,可以减少数据值的变化范围,提高算法的稳定性和收敛速度,进而提升姿态估计的精确度,以及减小环境造成的误差。The output units of gyroscopes and accelerometers are different (gyroscope output is usually in angular velocity, and accelerometer output is usually in acceleration), and the outputs of different sensors may have different precisions. Normalization can map the data to the same scale range and reduce the scale differences between different sensor data. By normalizing the data to the same scale range, the range of data value changes can be reduced, the stability and convergence speed of the algorithm can be improved, and the accuracy of attitude estimation can be improved, as well as the error caused by the environment can be reduced.
具体来说,通过传感器采集电子设备在碰撞过程中的加速度角速度和姿态参数q,对所述加速度进行归一化处理得到对所述角速度进行归一化处理得到使用四元数表示所述姿态参数q。Specifically, the acceleration of the electronic device during the collision is collected by sensors. Angular velocity And attitude parameter q, the acceleration is normalized to obtain The angular velocity is normalized to obtain The posture parameter q is represented by quaternion.
在一个实施例中,对加速度数据进行归一化处理,将其转化为单位向量,以消除加速度大小的影响,保留其方向信息:||g||表示加速度的向量的模。对角速度数据进行归一化处理,将角速度单位转换为弧度/秒,以统一表示: In one embodiment, the acceleration data is normalized and converted into a unit vector to eliminate the influence of the acceleration magnitude and retain its direction information: ||g|| represents acceleration The angular velocity data is normalized and the angular velocity unit is converted to radians per second for a unified representation:
四元数是一种数学工具,用于表示三维空间中的旋转。本实施例利用四元数表示所述姿态参数:Quaternion is a mathematical tool used to represent rotation in three-dimensional space. This embodiment uses quaternion to represent the posture parameters:
q=q0+q1i+q2j+q3kq=q 0 +q 1 i +q 2 j +q 3 k
其中q0为实部分量,q1、q2、q3分别为三维空间虚部分量,i、j、k分别为相应虚部的基本单位。Where q 0 is the real component, q 1 , q 2 , q 3 are the three-dimensional imaginary components, and i, j, k are the basic units of the corresponding imaginary parts.
在参数优化阶段,首先利用梯度下降算法,计算目标函数J(q)关于四元数的梯度,根据梯度迭代时参数的更新方向调整四元数值:In the parameter optimization stage, the gradient descent algorithm is first used to calculate the gradient of the objective function J(q) with respect to the quaternion, and the quaternion value is adjusted according to the update direction of the parameters during gradient iteration:
其中destanglei是期望角度,curanglei是当前角度,n为样本总数,q′是迭代后的四元数值,qcur是当前的四元数值,是梯度函数,a为学习速率。Where destangle i is the desired angle, curangle i is the current angle, n is the total number of samples, q ′ is the quaternion value after iteration, q cur is the current quaternion value, is the gradient function and a is the learning rate.
梯度下降算法优化姿态估计模型的参数,通过目标函数,迭代更新参数,优化四元数的估计值,使四元数更加精确。梯度下降算法具有较强的适应性,可提升本系统鲁棒性,可将系统应用到不同的碰撞情况,提升本发明的普适性。The gradient descent algorithm optimizes the parameters of the posture estimation model, iteratively updates the parameters through the objective function, optimizes the estimated value of the quaternion, and makes the quaternion more accurate. The gradient descent algorithm has strong adaptability, can improve the robustness of the system, can apply the system to different collision situations, and improve the universality of the present invention.
一旦有了目标函数,需要找到一个方向来更新姿态参数q以便J(q)减小,这个方向由目标函数J(q)关于的梯度给出。梯度是一个向量,它的每个分量是目标函数关于相应参数的偏导数,指向函数增长最快的方向。为了最小化目标函数,我们需要沿着梯度的反方向更新参数。因此、目标函数J(q)提供了一个衡量当前姿态估计质量的方法,而参数更新规则则提供了一个基于这个目标函数来优化姿态参数的方法。通过迭代应用这个更新规则,我们可以逐步改进姿态估计,直到找到最小化目标函数的参数值。Once we have the objective function, we need to find a direction to update the posture parameter q so that J(q) decreases. This direction is determined by the objective function J(q) about The gradient of is given by . The gradient is a vector whose components are the partial derivatives of the objective function with respect to the corresponding parameters, pointing in the direction of the fastest growth of the function. In order to minimize the objective function, we need to update the parameters in the opposite direction of the gradient. Therefore, the objective function J(q) provides a way to measure the quality of the current pose estimate, and the parameter update rule provides a way to optimize the pose parameters based on this objective function. By iteratively applying this update rule, we can gradually improve the pose estimate until we find the parameter value that minimizes the objective function.
优选的,学习速率确定方式为其中ar为预设的当前学习速率,gr为预设的归一化加速度参量。因此,相当于一个调整因子,通过考虑加速度对电子设备当前状态的表征意义,应用于梯度学习中,在实际应用中显示出更好的学习效果。Preferably, the learning rate is determined as Where a r is the preset current learning rate, and gr is the preset normalized acceleration parameter. Therefore, It is equivalent to an adjustment factor. By considering the significance of acceleration on the current state of the electronic device, it is applied to gradient learning and shows better learning effects in practical applications.
进一步计算四元数的变化率 Further calculation of the rate of change of the quaternion
其中是四元数的Hamilton乘积,表示实部为0,虚部为的向量;in is the Hamilton product of quaternions, The real part is 0 and the imaginary part is A vector of
对四元数进行积分后,根据两次姿态更新之间的时间间隔Δt,继续更新四元数的值:After integrating the quaternion, continue to update the value of the quaternion according to the time interval Δt between two attitude updates:
其中qnew为更新后的四元数值,接着对更新后的四元数值进行归一化处理得到处理后的姿态参数。Where q new is the updated quaternion value, and then the updated quaternion value is normalized to obtain the processed posture parameters.
优选的,所述时间间隔Δt采用预设的固定时间间隔,或者采用动态时间间隔。当所述采用动态时间间隔时,在固定时间间隔的基础上,将所述固定时间间隔值乘以调整因子的计算结果作为动态时间间隔,其中所述调整因子的值根据确定。本领域技术人员可以理解的,加速度参数表征下的碰撞瞬态,能体现电子设备当前状态变化的激烈程度,据此确定调整因子,能减少不必要的更新周期下的计算开销。Preferably, the time interval Δt adopts a preset fixed time interval or a dynamic time interval. When the dynamic time interval is adopted, on the basis of the fixed time interval, the fixed time interval value is multiplied by the calculation result of the adjustment factor as the dynamic time interval, wherein the value of the adjustment factor is based on Those skilled in the art can understand that the collision transient represented by the acceleration parameter can reflect the intensity of the current state change of the electronic device, and determining the adjustment factor based on this can reduce the calculation overhead in unnecessary update cycles.
在一个实施例中,所述参数优化算法可以由安置在电子设备、或者与电子设备近场通信连接的其它计算装置上实施。其中,所述近场通信方式包括:蓝牙连接、wifi连接。In one embodiment, the parameter optimization algorithm may be implemented by a computing device installed in the electronic device or other computing devices connected to the electronic device via near field communication, wherein the near field communication method includes: Bluetooth connection and Wi-Fi connection.
在参数应用阶段,根据所述处理后的姿态参数进行碰撞分析,形成针对所述电子设备的碰撞响应指令,将所述碰撞响应指令反馈给所述电子设备。In the parameter application stage, a collision analysis is performed according to the processed posture parameters to form a collision response instruction for the electronic device, and the collision response instruction is fed back to the electronic device.
在一个实施例中,所述参数应用阶段的方法功能可以由安置在电子设备、与电子设备近场通信连接的其它计算装置、或者远程服务器上实施。In one embodiment, the method functions in the parameter application phase may be implemented by an electronic device, another computing device connected to the electronic device by near field communication, or a remote server.
图2示出了另一个实施例下的多功能传感器数据处理系统框架图,包括参数采集单元、参数优化单元和参数应用单元,其中参数采集单元将采集的电子设备碰撞信息预处理后传递给参数优化单元,参数优化单元对四元数表示下的碰撞姿态参数进行优化,并将优化后姿态参数传递给参数应用单元用于后续碰撞分析。此外,上述各单元具体还用于实现前文所述实施例下相应方法的步骤。FIG2 shows a framework diagram of a multifunctional sensor data processing system under another embodiment, including a parameter acquisition unit, a parameter optimization unit and a parameter application unit, wherein the parameter acquisition unit pre-processes the collected electronic device collision information and transmits it to the parameter optimization unit, the parameter optimization unit optimizes the collision posture parameters under the quaternion representation, and transmits the optimized posture parameters to the parameter application unit for subsequent collision analysis. In addition, the above-mentioned units are also specifically used to implement the steps of the corresponding method under the embodiment described above.
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时还用于执行前文所述实施例下相应方法的步骤。The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is also used to execute the steps of the corresponding method under the embodiments described above.
此外、本公开实施例还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时还用于执行前文所述实施例下相应方法的步骤。In addition, the embodiments of the present disclosure further provide a computer program product, including a computer program, which, when executed by a processor, is also used to execute the steps of the corresponding method under the embodiments described above.
计算机可读存储介质可以是电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络包括局域网(AN)或广域网(WAN)连接到用户计算机,或者可以连接到外部计算机。The computer-readable storage medium may be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above. The above-mentioned computer-readable medium can be contained in the above-mentioned electronic device; it can also exist alone without being assembled into the electronic device. The computer program code for performing the operation of the present disclosure can be written in one or more programming languages or a combination thereof, and the above-mentioned programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, and also include conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network including a local area network (AN) or a wide area network (WAN), or can be connected to an external computer.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions. The units involved in the embodiments described in the present disclosure can be implemented by software or by hardware. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
以上介绍了本发明的较佳实施方式,旨在使得本发明的精神更加清楚和便于理解,并不是为了限制本发明,凡在本发明的精神和原则之内,所做的修改、替换、改进,均应包含在本发明所附的权利要求概括的保护范围之内。The above introduces the preferred embodiments of the present invention, which is intended to make the spirit of the present invention clearer and easier to understand, but is not intended to limit the present invention. All modifications, substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection outlined by the claims attached to the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410684487.3A CN118670390A (en) | 2024-05-30 | 2024-05-30 | Multifunctional sensor data processing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410684487.3A CN118670390A (en) | 2024-05-30 | 2024-05-30 | Multifunctional sensor data processing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118670390A true CN118670390A (en) | 2024-09-20 |
Family
ID=92720569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410684487.3A Pending CN118670390A (en) | 2024-05-30 | 2024-05-30 | Multifunctional sensor data processing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118670390A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118882746A (en) * | 2024-09-27 | 2024-11-01 | 杭州定方科技有限公司 | A method and device for collecting and analyzing collision data of electronic equipment |
-
2024
- 2024-05-30 CN CN202410684487.3A patent/CN118670390A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118882746A (en) * | 2024-09-27 | 2024-11-01 | 杭州定方科技有限公司 | A method and device for collecting and analyzing collision data of electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108827299B (en) | Aircraft attitude calculation method based on improved quaternion second-order complementary filtering | |
US10747330B2 (en) | Device and method for determination of angular position in three-dimensional space, and corresponding electronic apparatus | |
WO2020253854A1 (en) | Mobile robot posture angle calculation method | |
WO2018184467A1 (en) | Method and device for detecting posture of ball head | |
Phuong et al. | A DCM based orientation estimation algorithm with an inertial measurement unit and a magnetic compass | |
CN112013836A (en) | Attitude heading reference system algorithm based on improved adaptive Kalman filtering | |
CN109682377B (en) | A Pose Estimation Method Based on Dynamic Step Gradient Descent | |
CN109798891B (en) | Inertial measurement unit calibration system based on high-precision motion capture system | |
CN116067370B (en) | IMU gesture resolving method, IMU gesture resolving equipment and storage medium | |
CN110174121A (en) | A kind of aviation attitude system attitude algorithm method based on earth's magnetic field adaptive correction | |
CN118670390A (en) | Multifunctional sensor data processing method and system | |
CN108318038A (en) | A kind of quaternary number Gaussian particle filtering pose of mobile robot calculation method | |
CN109931955A (en) | An Initial Alignment Method for Strapdown Inertial Navigation System Based on State Dependent Lie Group Filtering | |
CN112055804A (en) | Information processing apparatus, information processing method, and program | |
CN110044377B (en) | Vicon-based IMU offline calibration method | |
CN113188505A (en) | Attitude angle measuring method and device, vehicle and intelligent arm support | |
CN110162068A (en) | A kind of control method of self-balance robot | |
CN116125789A (en) | Gesture algorithm parameter automatic matching system and method based on quaternion | |
CN109883451A (en) | An adaptive gain complementary filtering method and system for pedestrian orientation estimation | |
US11268812B1 (en) | Bias corrected inertial navigation system | |
WO2024104446A1 (en) | Device attitude estimation method and apparatus | |
Zhe et al. | Adaptive complementary filtering algorithm for imu based on mems | |
CN114636418A (en) | A method, device and electronic device for measuring relative change of attitude based on MEMS | |
CN102135431B (en) | Method for precision compensation of inertial measurement unit | |
CN116429101A (en) | Track tracking control system and method based on inertial navigation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |