Angle sensor accuracy correction method based on machine learning
By analyzing the periodicity and fluctuation characteristics of the angle sensor detection parameters and environmental operating parameters, the attenuation factor is adaptively adjusted, and the problem of poor filtering effect caused by fixed numerical attenuation factors in the prior art is solved, achieving more accurate data correction results.
Patent Information
- Application Number
- CN202410811700.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-06-21
AI Technical Summary
The prior art sets a fixed numerical attenuation factor based on experience, resulting in poor filtering effect, which in turn affects the accuracy of the correction result of the angle sensor.
By collecting the detection parameters and environmental operating parameters of the angle sensor, analyzing its periodic distribution characteristics and data fluctuation range, calculating the influence range of environmental fluctuation characteristic factors and environmental parameters, adaptively adjusting the attenuation factor, and combining filtering algorithms for data correction.
The filtering effect is improved, more accurate data correction results are obtained, and the detection data and environmental data are fully combined to enhance the accuracy of data compensation.
Smart Images

Figure CN118960661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an angle sensor accuracy correction method based on machine learning. Background Art
[0002] In modern industrial and automation systems such as AGV, robots, and engineering machinery, angle sensors play a vital role. They are usually used to accurately measure and control the angle position of rotating equipment. However, due to environmental factors such as environmental changes, electronic noise, vibration during equipment operation, and dynamic behavior changes, the collected angle sensor-related parameter data often has certain noise interference, which in turn causes the output of the angle sensor to often deviate from the ideal value, which directly affects the performance and accuracy of the system. Therefore, it is particularly important to use filtering algorithms to filter the relevant parameters of the angle sensor.
[0003] At present, existing filtering algorithms, such as Kalman filtering algorithm and extended Kalman filtering algorithm, can use the attenuation factor to limit the memory length of the filter through adaptive filtering, so that the filtering process pays more attention to the use of information and reduces the dependence on historical information. However, the existing technology usually sets a fixed value of the attenuation factor based on experience, which makes the filtering effect poor, and thus leads to low accuracy of the correction result of the angle sensor. Summary of the invention
[0004] In order to solve the technical problem that the attenuation factor with a fixed value is set based on experience, resulting in poor filtering effect and low accuracy of the correction result of the angle sensor, the purpose of the present invention is to provide an angle sensor accuracy correction method based on machine learning. The technical solution adopted is as follows:
[0005] Collecting parameters to be corrected of the angle sensor in each dimension at each moment; the parameters to be corrected include detection parameters of the angle sensor in each dimension and environmental operating parameters of the device where the angle sensor is located in each dimension;
[0006] According to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics, the environmental fluctuation characteristic factor in each dimension is obtained;
[0007] According to the difference between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of similar feature analysis of the difference in each dimension, combined with the difference between the environmental operating parameters and the corresponding fitting values, the influence range of the environmental parameters in each dimension is obtained;
[0008] The environmental parameter influence range is adjusted by using the environmental fluctuation characteristic factor to obtain a corrected influence range, and the attenuation factor of the environmental operating parameters at each moment in each dimension is obtained according to the difference distribution between the environmental operating parameters at each moment in each dimension and the corrected influence range; based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension, the data correction result of the angle sensor is obtained in combination with the filtering algorithm.
[0009] Preferably, the environmental fluctuation characteristic factor in each dimension is obtained according to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics, specifically including:
[0010] Perform periodic analysis on the parameters to be corrected at all times in each dimension to obtain each period in each dimension;
[0011] According to the range distribution of each period distribution length in each dimension and the fluctuation of the period distribution length, the scene characteristic factor is obtained;
[0012] For the environmental operating parameters in any dimension, based on the fluctuation degree of all environmental operating parameters in each cycle and combined with the scene characteristic factor, the environmental fluctuation characteristic factor in any dimension is obtained.
[0013] Preferably, the scene characteristic factor is obtained according to the range distribution of each period distribution length in each dimension and the fluctuation of the period distribution length, specifically including:
[0014] Determining a first distribution coefficient based on a difference between a maximum value and a minimum value of the time length of all cycles of the parameter to be corrected in all dimensions;
[0015] Determining a second distribution coefficient based on the discrete coefficients of the time lengths of all cycles of the parameter to be corrected in all dimensions;
[0016] A scene characteristic factor is obtained according to the first distribution coefficient and the second distribution coefficient, and both the first distribution coefficient and the second distribution coefficient are negatively correlated with the scene characteristic factor.
[0017] Preferably, the influence range of the environmental parameters in each dimension is obtained based on the difference between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of the similar feature analysis performed on the difference in each dimension, combined with the difference between the environmental operating parameters and the corresponding fitting values, specifically including:
[0018] The environmental operation parameters under each dimension are evenly divided based on the value range of the environmental operation parameters under each dimension to obtain each data interval under each dimension;
[0019] Record the environmental operating parameters in any dimension as the environmental operating parameters of the target dimension, and determine the environmental impact value at each moment in the target dimension based on the difference between the environmental operating parameters at each moment in the target dimension and the adjacent moments;
[0020] Performing curve fitting based on the environmental operating parameters at each moment under the target dimension to obtain a fitting value at each moment under the target dimension, and determining a reference weight corresponding to the environmental impact value based on the difference between the fitting value at each moment under the target dimension and the environmental operating parameters; the difference between the fitting value and the environmental operating parameters is negatively correlated with the reference weight;
[0021] According to the data distribution range of performing similar feature analysis on the environmental impact values at all moments under the target dimension in each data interval using the reference weight, the environmental parameter impact range under the target dimension is obtained.
[0022] Preferably, the data distribution range of performing similar feature analysis on the environmental impact values at all times under the target dimension in each data interval using the reference weights to obtain the environmental parameter impact range under the target dimension specifically includes:
[0023] Using the reference weight and the environmental impact value at each moment under the target dimension, the environmental impact value in each data interval is classified respectively to obtain a cluster in each data interval under the target dimension;
[0024] The influence range of the environmental parameters under the target dimension is determined according to the numerical distribution range of the environmental impact values in the clusters within each data interval under the target dimension.
[0025] Preferably, the method for obtaining the clustering clusters in each data interval under the target dimension is specifically as follows:
[0026] For any two moments in any data interval under the target dimension, the weighted difference between the environmental impact values of the two moments is calculated using the reference weights of the two moments to obtain a distance measurement value between the two moments;
[0027] Based on the distance measurement value between every two moments, all environmental impact values in the data interval under the target dimension are classified to obtain the clusters in the data interval under the target dimension.
[0028] Preferably, determining the environmental parameter influence range under the target dimension according to the numerical distribution range of the environmental impact values in the clusters within each data interval under the target dimension specifically includes:
[0029] For any data interval under the target dimension, the overall level of all environmental impact values in each cluster in the data interval is used as the characteristic comparison parameter of each cluster in the data interval;
[0030] The value range of the environmental impact value in the cluster corresponding to the maximum value of the feature comparison parameter is used as the environmental parameter impact range of any data interval under the target dimension.
[0031] Preferably, the step of adjusting the environmental parameter influence range by using the environmental fluctuation characteristic factor to obtain a modified influence range specifically includes:
[0032] For the environmental parameter influence range of any data interval under the target dimension, the numerical length of the environmental parameter influence range is obtained; based on the environmental fluctuation characteristic factor under the target dimension, the adjustment coefficient under the target dimension is determined, and the value range of the adjustment coefficient is (0,2);
[0033] Based on the numerical length and adjustment coefficient of the environmental parameter influence range, the adjustment length is determined, and based on the median value within the environmental parameter influence range and the adjustment length, the corrected influence range of any data interval under the target dimension is determined.
[0034] Preferably, obtaining the attenuation factor of the environmental operating parameter at each moment in each dimension according to the difference distribution between the environmental operating parameter at each moment in each dimension and the correction influence range specifically includes:
[0035] Record any moment as the target moment;
[0036] When the environmental operating parameter at the target time under the target dimension exists in the correction influence range corresponding to the data interval where the environmental operating parameter is located, the attenuation factor of the environmental operating parameter at the target time under the target dimension is set to a preset value;
[0037] When the environmental operating parameters at the target moment under the target dimension do not exist in the corrected influence range corresponding to the data interval where the environmental operating parameters are located, the attenuation factor of the environmental operating parameters at the target moment under the target dimension is determined based on the difference between the environmental operating parameters at the target moment under the target dimension and the upper limit value or the lower limit value of the corresponding corrected influence range; the preset value is less than the value of the attenuation factor at this time.
[0038] Preferably, the data correction result of the angle sensor is obtained based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension in combination with a filtering algorithm, specifically including:
[0039] Based on the attenuation factor of the environmental operating parameters in each dimension at each moment, the covariance matrix between the detection parameters in each dimension and the environmental operating parameters in each dimension is obtained. Combined with the extended Kalman filter algorithm, the data correction result of the angle sensor is obtained.
[0040] The embodiments of the present invention have at least the following beneficial effects:
[0041] The present invention first collects the detection parameters of the angle sensor and the environmental data under the corresponding application scenario, providing a data basis for the subsequent compensation of the detection parameters of the angle sensor through the environmental data, and also providing a data basis for the subsequent analysis of the fluctuation characteristics and noise conditions of the environmental operation parameters. Then, the periodic characteristic distribution of the detection parameters and environmental operation parameters in each dimension is analyzed first, and the environmental fluctuation characteristic factor is determined, that is, whether the fluctuation characteristic distribution of the environmental data has a certain periodic fluctuation situation. Further, the first aspect analyzes the change difference of adjacent environmental operation parameters, the second aspect analyzes the similar characteristics of the change difference in each dimension, and the third aspect analyzes the difference between the actual value and the fitted value of the environmental operation value to determine the influence range of the environmental parameters, which characterizes the data value range in which the normal fluctuation of the environmental data itself may be. Finally, taking into account the possible periodic fluctuations of environmental operating parameters, which makes the accuracy of the determined data value range less accurate, the environmental parameter influence range is corrected in combination with the environmental fluctuation characteristic factors. This can analyze the difference distribution between the environmental operating parameters and the corrected influence range, determine the degree to which each environmental operating parameter deviates from the normal value range, and then adaptively obtain the attenuation factor, so that the filtering effect is better and more accurate data correction results can be obtained. During data correction, the detection data and environmental data are fully combined to make the data compensation results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a flowchart of the steps of a method for correcting the accuracy of an angle sensor based on machine learning provided by the present invention;
[0044] Figure 2 It is a flowchart of the steps of the method for obtaining the environmental fluctuation characteristic factor of each dimension provided by the present invention;
[0045] Figure 3It is a flowchart of the steps of the method for obtaining the influence range of environmental parameters in each dimension provided by the present invention;
[0046] Figure 4 is a sub-step flow chart of step S400 provided by the present invention;
[0047] Figure 5 It is a system block diagram of an angle sensor accuracy correction system based on machine learning provided by the present invention;
[0048] Figure 6 The present invention provides a schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the angle sensor accuracy correction method based on machine learning proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0051] The following is a detailed description of a specific scheme of an angle sensor accuracy correction method based on machine learning provided by the present invention in conjunction with the accompanying drawings.
[0052] See also Figure 1 , which shows a flowchart of a method for correcting the accuracy of an angle sensor based on machine learning provided by an embodiment of the present invention, the method comprising the following steps:
[0053] Step S100, collecting parameters to be corrected of the angle sensor in each dimension at each moment; the parameters to be corrected include detection parameters of the angle sensor in each dimension and environmental operating parameters of the device where the angle sensor is located in each dimension.
[0054] Angle sensors are usually used to measure the angle of an object relative to a reference direction. They can collect multiple parameters to provide accurate angle information. At the same time, the working principle of the accuracy calibration of the angle sensor is usually to measure the output of the sensor based on a known dynamic motion pattern, and to perform dynamic error calibration on the output, thereby establishing a corresponding relationship between the measurement data of the angle sensor and the data of the actual application device. Therefore, the extended Kalman filter algorithm is often used to construct a covariance matrix with the current angle sensor's own measurement parameters and environmental impact parameters as two dimensional data, and then combine the attenuation factor to complete the filtering operation.
[0055] Since the angle sensor collects multiple parameters to provide accurate angle information during measurement, in this embodiment, the multiple measurement data obtained by the angle sensor are used as detection data of multiple dimensions, that is, one measurement data corresponds to detection data of one dimension, wherein the measurement data includes measurement angle value, acceleration, angular velocity, etc.
[0056] At the same time, the application scenarios of angle sensors are diverse, and it is necessary to consider the impact of environmental factors when the angle sensor actually measures a certain device. Therefore, data corresponding to multiple environmental factors are also collected as environmental operating parameters of multiple dimensions, that is, one environmental factor corresponds to one dimension of environmental operating parameters, among which the data corresponding to the environmental factors include vibration data, temperature data, and so on.
[0057] It should be noted that this embodiment collects each type of data at each moment in the historical time, that is, each moment corresponds to a detection parameter in each dimension, and each moment corresponds to an environmental operation parameter in all dimensions. Both the detection parameter and the environmental operation parameter can be called parameters to be corrected, and then each moment corresponds to a parameter to be corrected in all dimensions. At the same time, in order to prevent the dimensions between different data from affecting the data analysis process, each collected parameter needs to be normalized or standardized, that is, the parameter to be corrected in each dimension at each moment is standardized data.
[0058] Step S200, obtaining the environmental fluctuation characteristic factor in each dimension according to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics.
[0059] Considering the different application scenarios of angle sensors, the corresponding environmental factors have different motion characteristics. These motion effects often reflect the data collection habits of the angle sensor's own parameters and environmental parameters. For example, if the angle sensor is used in a robot, its movement amplitude is relatively small, and the changes in the collected parameters are also relatively small. In this scenario, the existence of noise is less likely to be ignored. However, if the angle sensor is used in some production equipment, such as a robotic arm, it usually has a certain mechanical motion cycle, and there may be more frequent fluctuations, and the fluctuation changes are relatively large. In this scenario, the degree of noise is easy to be ignored, so it is necessary to perform feature analysis on the periodic distribution and fluctuation of data in different dimensions.
[0060] The smaller the periodic distribution of each parameter, the smaller the volatility of the data value, and the more obvious the noise performance of the data in the current scenario. The larger the periodic distribution of each parameter, the greater the volatility of the data value within the periodic feature, and the less obvious the noise performance of the data in the current scenario. Based on this, the periodic distribution characteristics of the parameters to be corrected in each dimension and the characteristics of the corresponding data fluctuation range are analyzed to obtain the environmental fluctuation characteristic factor, that is, the periodic fluctuation of the data of the quantitative environmental parameters themselves.
[0061] like Figure 2 As shown, the method for obtaining the environmental fluctuation characteristic factor of each dimension can be implemented by steps S201 to S203.
[0062] Step S201 , periodically analyzing the parameters to be corrected at all times in each dimension to obtain each period in each dimension.
[0063] A periodic analysis is performed on the time series data in each dimension, and the time period distribution in each dimension can be obtained respectively.
[0064] In this embodiment, the parameters to be corrected at all times in any dimension can be decomposed in time series by the STL time series decomposition algorithm to obtain periodic items, obtain extreme value points in the periodic items, and regard the data composed of a continuous preset number of extreme value points as a period, wherein the value of the preset number can be 4, that is, the parameters to be corrected between the first extreme value point and the fourth extreme value point constitute a period, and the time range corresponding to the parameters to be corrected is also the time period distribution. The implementer can also select other more appropriate methods to obtain each period of the parameters to be corrected in each dimension according to the specific implementation scenario.
[0065] Step S202, obtaining a scene characteristic factor according to the range distribution of each period distribution length in each dimension and the fluctuation of the period distribution length.
[0066] Considering that environmental factors have a certain impact on the measurement results of the angle sensor, when not affected by noise, the data fluctuations in each dimension should be relatively consistent, which is reflected in the periodic characteristics. If the environmental operating parameters have a periodic characteristic distribution, the sensor detection data at the corresponding moment may also have a synchronous periodic characteristic distribution. Therefore, for the periodic characteristic distribution of the parameters to be corrected in all dimensions, it is judged whether the data in the current scene has a periodic distribution feature.
[0067] Specifically, the first distribution coefficient is determined based on the difference between the maximum and minimum values of the time length of all cycles of the parameter to be corrected in all dimensions. Each cycle of the parameter to be corrected in each dimension corresponds to a time length. The time lengths of all cycles in all dimensions are compared. The first distribution coefficient represents the extreme difference of the time lengths of all cycles, reflecting the maximum time difference of all cycle distributions. The first distribution coefficient reflects the volatility of the time distribution of all cycles from the first aspect. The larger the value of the first distribution coefficient, the greater the time difference of all cycle distributions. The distribution of the parameters to be corrected in different dimensions and cycles is quite different, indicating that the periodicity of the data collected in the current scenario is poor, that is, the possibility of the existence of periodic characteristics is smaller.
[0068] Based on the dispersion coefficient of the time length of all cycles of the parameter to be corrected in all dimensions, the second distribution coefficient is determined; wherein the dispersion coefficient can be an indicator such as standard deviation and variance for characterizing the degree of dispersion of the time length of all cycles. In this embodiment, the standard deviation of the time length of all cycles is used as the second distribution coefficient. The second distribution coefficient characterizes the degree of fluctuation and dispersion of the time length of all cycles, and reflects the volatility of the periodic time distribution from the second aspect. The larger the value of the second distribution coefficient, the greater the time difference of the time distribution of all cycles, which means that the periodicity of the data collected in the current scenario is poor, that is, the possibility of the existence of periodic characteristics is smaller.
[0069] A scene characteristic factor is obtained according to the first distribution coefficient and the second distribution coefficient, and the first distribution coefficient and the second distribution coefficient are both negatively correlated with the scene characteristic factor. The negative correlation can be achieved in the form of an inverse or a negative exponential power.
[0070] In this embodiment, as a specific example, the scene characteristic factor L can be expressed as L = exp(-α1×α2), where α1 is the first distribution coefficient, α2 is the second distribution coefficient, and exp() represents an exponential function with the natural constant e as the base. The larger the first distribution coefficient and the larger the second distribution coefficient, the greater the fluctuation of the time characteristics under the periodicity of each dimension in the current scene, and the smaller the possibility of the existence of periodic characteristics, that is, the smaller the value of the scene characteristic factor. The smaller the first distribution coefficient and the smaller the second distribution coefficient, the smaller the periodic time distribution of each dimension in the current scene is closer and less volatile, and the greater the possibility of the existence of periodic characteristics, and the larger the value of the corresponding scene characteristic factor.
[0071] In the current scene, there is only one scene characteristic factor corresponding to it, and the scene characteristic factor represents the possibility of the existence of periodic characteristics in the data of each dimension in the current scene.
[0072] Step S203, for the environmental operating parameters in any dimension, based on the fluctuation degree of all environmental operating parameters in each cycle and combined with the scene characteristic factor, obtain the environmental fluctuation characteristic factor in any dimension.
[0073] If the degree of expression of the data periodicity characteristics of the current scene is greater, the corresponding data fluctuations in each dimension may be greater. Under the current data fluctuations, noise is easy to hide, that is, the degree of noise expression is small and not easy to be identified. Therefore, when the subsequent correlation analysis is based on the fluctuation characteristics of the data itself, it will be relatively slow to judge it as noise or the degree of noise. If the degree of expression of the data periodicity characteristics of the current scene is smaller, the corresponding data fluctuations in each dimension are smaller. Under the current data fluctuations, the degree of noise expression is greater. When the correlation analysis is based on the fluctuation characteristics of the data itself, it will be relatively more sensitive to judge it as noise or the degree of noise.
[0074] It should be noted that the data collection results of the angle sensor generally do not have large noise data. In most cases, it is due to the presence of certain noise in the environmental factors of the device itself used by the angle sensor, which has certain influencing factors on the data of the angle sensor, affecting the accuracy of the data collection results. Therefore, this embodiment analyzes the fluctuation and influence of the data of each dimension of environmental factors to obtain a more accurate correction result.
[0075] Based on this, firstly, the fluctuation degree of all environmental operating parameters in each cycle under each dimension is obtained. In this embodiment, the standard deviation of all environmental operating parameters in each cycle is used as the fluctuation degree corresponding to the cycle, which reflects the fluctuation of the environmental operating parameters in the cycle. In other embodiments, the implementer can also express it through variance.
[0076] So far, in any dimension, each cycle of the environmental operating parameters corresponds to a fluctuation degree. The product of the cumulative sum of the fluctuation degrees of each cycle in any dimension and the scene characteristic factor is used as the environmental fluctuation characteristic factor in any dimension.
[0077] This embodiment takes any dimension as an example for explanation. The larger the value of the scene characteristic factor, the worse the periodicity of the environmental operating parameters. The larger the value of the cumulative sum of the fluctuation degree of each period under the i-th dimension, the greater the fluctuation of the environmental operating parameters under the i-th dimension, the greater the discreteness, and the larger the value of the environmental fluctuation characteristic factor of the environmental operating parameters under the corresponding i-th dimension. The smaller the value of the scene characteristic factor, the stronger the periodicity of the environmental operating parameters, the smaller the fluctuation of the environmental operating parameters under the i-th dimension, the smaller the discreteness, and the smaller the value of the environmental fluctuation characteristic factor of the environmental operating parameters under the i-th dimension.
[0078] The environmental fluctuation characteristic factor combined with the periodic characteristics characterizes the fluctuation of environmental operating parameters in the corresponding dimension.
[0079] Step S300, based on the difference between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of similar feature analysis of the difference in each dimension, combined with the difference between the environmental operating parameters and the corresponding fitting values, the environmental parameter influence range in each dimension is obtained.
[0080] When the device where the angle sensor is located switches to different behaviors such as posture changes, such as vibration behavior, it may be impressed by the change of instantaneous acceleration, which may cause instantaneous fluctuations in the output data of the angle sensor, and these changes may be misunderstood as changes in angle. For example, changes in temperature may cause the accelerometer and gyroscope of the angle to have drift effects and other characteristics. However, under the influence of each environmental factor, its influence on the measurement parameters of the angle sensor is limited. For example, the impact when the vibration intensity is 10 is smaller than the impact when the vibration intensity is 100. Therefore, by analyzing the characteristic distribution of environmental operating parameters in each dimension, the influence range of each environmental operating parameter on different detection parameters can be obtained.
[0081] like Figure 3 As shown, the method for obtaining the environmental parameter influence range in each dimension can be implemented by steps S301 to S304.
[0082] Step S301 : evenly divide the environmental operating parameters in each dimension based on the value range of the environmental operating parameters in each dimension to obtain each data interval in each dimension.
[0083] Considering that in this embodiment, the environmental operation parameter is a standardized data value with a value range of [0,1], it is divided into a certain number of data intervals according to the value range of the environmental operation parameter, and then the environmental operation parameters in each data interval under each dimension constitute the environmental data set corresponding to each data interval under each dimension, and each environmental operation parameter in the environmental data set corresponds to a moment.
[0084] In this embodiment, the value range of the environmental operation parameter is evenly divided into 10 data intervals, and the value range of the divided data intervals can be expressed as [0, 0.1), [0.1, 0.2), [0.2, 0.3), ..., [0.9, 1.0]. Taking the environmental operation parameters under the i-th dimension as an example, all environmental operation parameters under the i-th dimension with values in the first data interval [0, 0.1) constitute the environmental data set of the first data interval.
[0085] Step S302, record the environmental operating parameters in any dimension as the environmental operating parameters in the target dimension, and determine the environmental impact value at each moment in the target dimension based on the difference between the environmental operating parameters at each moment in the target dimension and the adjacent moments.
[0086] Considering that the environmental operating parameters are time series data, there may be certain changes in the environmental operating parameters at each moment in each dimension, reflecting the instantaneous changes of environmental factors at each moment. The greater the instantaneous change, the greater the instantaneous impact of the environmental factors at the current moment, and the corresponding impact range may be wider. Therefore, when analyzing the impact range of environmental factors, it is first necessary to determine the instantaneous changes of environmental data at each moment.
[0087] Specifically, taking the environmental operating parameters of any dimension as an example, the i-th dimension is taken as the target dimension, and the absolute value of the difference between the environmental operating parameters at each moment in the i-th dimension and the environmental operating parameters at the adjacent previous moment is taken as the environmental impact value at each moment in the i-th dimension.
[0088] Among them, the environmental impact value W at the tth moment in the i-th dimension is i,t It can be expressed as W i,t =|X i,t -X i,t-1 |, X i,t represents the environmental operating parameters at the tth moment in the i-th dimension, X i,t-1 It represents the environmental operating parameters at the t-1th moment in the i-th dimension. The environmental impact value reflects the instantaneous data changes at each moment and represents the degree of data impact at the corresponding moment.
[0089] It should be noted that, specifically, the environmental operating parameters at the first moment in each dimension cannot obtain the environmental impact value, that is, there is no instantaneous change in the environmental operating parameters at the first moment. Therefore, this embodiment sets the environmental impact value corresponding to the environmental operating parameters at the first moment in each dimension to 0.
[0090] Step S303, performing curve fitting based on the environmental operating parameters at each moment under the target dimension to obtain the fitting value at each moment under the target dimension, and determining the reference weight corresponding to the environmental impact value based on the difference between the fitting value at each moment under the target dimension and the environmental operating parameters; the difference between the fitting value and the environmental operating parameters is negatively correlated with the reference weight.
[0091] Under normal circumstances, the changes in the normal operation data of the sensor equipment are relatively regular, that is, the changes in environmental factors may also be the normal fluctuations of the sensor equipment itself. In order to avoid the normal fluctuations of the equipment itself being misidentified as abnormal data fluctuations when analyzing the influencing characteristics, it is necessary to further analyze the characteristic distribution of environmental operating parameters. Usually, when the data has a certain regular distribution, there will generally be no significant changes before and after data fitting. Therefore, by comparing the differences between the data before and after fitting, the changes in the corresponding data at each moment and the corresponding reference value can be determined.
[0092] Based on this, first of all, it is necessary to use the least squares method to perform curve fitting on the environmental operating parameters at each moment in each dimension to obtain the fitting value at each moment in each dimension. The fitting value represents the fitting data corresponding to the environmental operating parameters at each moment in each dimension.
[0093] Then, by comparing the difference between the environmental operating parameters of each dimension at each moment and the corresponding fitting data, the reference weight corresponding to the environmental impact value at each dimension at each moment is determined. The larger the difference, the greater the change in the environmental operating parameters before and after fitting, and thus the greater the possibility that the data of the current dimension at the current moment is abnormal, and thus the reference value of the impact situation characteristics corresponding to the environmental impact value should be smaller. The negative correlation can be realized in the form of a reciprocal or a negative exponential power.
[0094] In this embodiment, the target dimension and any moment are taken as examples for explanation. As a specific example, the reference weight β corresponding to the i-th dimension at the t-th moment is i,t It can be expressed as β i,t =exp(-|X i,t -X i ′ ,t |), X i,trepresents the environmental operating parameters at the tth moment in the i-th dimension, X i ′ ,t It represents the fitted value at the tth moment in the i-th dimension, and exp() represents the exponential function with the natural constant e as the base.
[0095] |X i,t -X i ′ ,t | represents the difference between the actual value and the fitted value of the environmental operating parameter of the i-th dimension at the t-th moment. The larger the difference, the greater the possibility of noise in the current data, that is, the smaller the reference value of the current data for feature analysis, that is, the smaller the corresponding reference weight value.
[0096] It should be noted that the reference weight represents the reference value of the impact characteristics corresponding to the changes in the environmental operating characteristics at the corresponding moment. At the same time, each dimension corresponds to a reference weight at each moment, and each dimension corresponds to an environmental impact value at each moment, so the reference weight and the environmental impact value are also in a one-to-one correspondence.
[0097] Step S304, obtaining the environmental parameter influence range under the target dimension according to the data distribution range of similar feature analysis of the environmental impact values at all times under the target dimension in each data interval using the reference weight.
[0098] Each data interval under each dimension reflects the characteristic distribution range of similar environmental operating parameters, and then by analyzing the similar distribution of the influencing characteristics caused by the changes in the environmental operating parameters at the corresponding moment in the data interval, the distribution of the data influence range caused by the changing characteristics of the environmental operating parameters in the current data interval can be determined.
[0099] First, the similar feature distribution of the environmental impact value under each dimension in each data interval is analyzed to determine the most representative impact feature under the most concentrated impact feature distribution in the current data interval. That is, the environmental impact values in each data interval are classified respectively using the reference weight and the environmental impact value at each moment under the target dimension to obtain the cluster clusters in each data interval under the target dimension.
[0100] It should be noted that the smaller the reference weight is, the smaller the reference value of the impact characteristics caused by data fluctuations at the corresponding moment is. Therefore, when performing cluster analysis, adding the reference weight as the weight of the distance measurement feature makes the classification results of similar features of environmental impact values more valuable.
[0101] Specifically, for any two moments in any data interval under the target dimension, the weighted difference between the environmental impact values of the any two moments is calculated using the reference weights of the any two moments to obtain the distance measurement value between the any two moments.
[0102] In this embodiment, the i-th dimension is taken as the target dimension, and any two moments in any data interval are taken as an example for explanation. The calculation method of the distance metric value between the any two moments can be expressed as:
[0103]
[0104] Among them, D i (a,b) represents the distance measure between the a-th moment and the b-th moment in the i-th dimension, β i,a represents the reference weight corresponding to the ath moment in the i-th dimension, W i,a represents the environmental impact value at the ath moment in the i-th dimension, β i,b represents the reference weight corresponding to the bth moment in the i-th dimension, W i,b Represents the environmental impact value at the bth moment in the i-th dimension.
[0105] It should be noted that W i,a and W i,b The environmental operating parameters at the corresponding time belong to the same data interval, and a≠b. i,a ×W i,a -β i,b ×W i,b It represents the weighted difference between the environmental impact values at two different times within the same data interval.
[0106] At this point, according to the same distance measurement method, in the same data interval under each dimension, the corresponding distance measurement value can be calculated between every two moments. Since each moment corresponds to an environmental impact value, that is, the corresponding distance measurement value can also be calculated between every two environmental impact values in the same data interval. The distance measurement value reflects the distribution of the difference distance characteristics between different environmental impact values in the same data interval.
[0107] Then, based on the distance measurement value between every two moments, all environmental impact values in the data interval under the target dimension are classified to obtain clusters in the data interval under the target dimension. In this embodiment, the DBSCAN clustering algorithm is used for cluster analysis to obtain that the impact of environmental parameters in each cluster in the data interval is relatively similar.
[0108] Furthermore, it is necessary to adaptively analyze the distribution of the data values of the environmental impact values in each data interval under each dimension to obtain the most representative numerical distribution and determine the final environmental parameter impact range. That is, the environmental parameter impact range under the target dimension is determined according to the numerical distribution range of the environmental impact values in the clusters in each data interval under the target dimension.
[0109] Specifically, still taking any data interval under the target dimension as an example for explanation, the overall level of all environmental impact values in each cluster in the data interval is used as the characteristic comparison parameter of each cluster in the data interval. In this embodiment, the mean of all environmental impact values of each cluster in the data interval under the target dimension is used as the corresponding characteristic comparison parameter, that is, the mean reflects the overall distribution level of the environmental impact value of each cluster in the data interval under the target dimension. In other embodiments, the implementer can also use the median and mode to characterize the overall distribution level.
[0110] Finally, the value range of the environmental impact value in the cluster corresponding to the maximum value of the feature comparison parameter is used as the environmental parameter impact range of any data interval under the target dimension.
[0111] The larger the value of the characteristic comparison parameter of each cluster cluster in the data interval under the target dimension, the greater the impact of the overall environmental characteristics of the current cluster cluster, indicating that the environmental impact value in the corresponding cluster cluster is the most representative. Therefore, the value range of the environmental impact value in the cluster cluster is taken as the environmental parameter impact range corresponding to the current data interval, among which the maximum value of the environmental impact value in the cluster cluster corresponding to the maximum value of the characteristic comparison parameter is the upper limit value of the corresponding environmental parameter impact range, and the minimum value of the environmental impact value in the cluster cluster corresponding to the maximum value of the characteristic comparison parameter is the lower limit value of the corresponding environmental parameter impact range.
[0112] At this point, each data interval in each dimension obtains the corresponding environmental parameter influence range, and the subsequent feature analysis process of the impact corresponding to the fluctuation characteristics of environmental factors also corresponds to the data distribution in each data interval in each dimension.
[0113] It should be noted that, in this embodiment, similar feature analysis is used to obtain clusters with relatively similar impact features for each data interval, and then the clusters are screened by the overall level of the environmental impact value to determine the part with the greatest degree of impact feature expression, and then the change characteristics and fluctuations of this part of the environmental operating parameters avoid fluctuations due to noise, that is, it characterizes its own fluctuations. The obtained teammate's environmental parameter influence range is a certain data range caused by normal data fluctuations, which to a certain extent characterizes that when the data value intensity of the environmental operating parameters is within this range, the fluctuations and changes of the environmental operating parameters are usually due to the influence of the environment's own parameter noise, so that the corresponding environmental operating parameters are characterized as normal environmental operating parameter values when distributed within this range.
[0114] Step S400, using the environmental fluctuation characteristic factor to adjust the environmental parameter influence range to obtain a corrected influence range, and according to the difference distribution between the environmental operating parameters at each moment in each dimension and the corrected influence range, obtain the attenuation factor of the environmental operating parameters at each moment in each dimension; based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension, the data correction result of the angle sensor is obtained in combination with the filtering algorithm.
[0115] In step S200, the data fluctuation in each dimension is analyzed in combination with the application scenario of the angle sensor, and the environmental fluctuation characteristic factor is obtained, which quantitatively represents the periodic fluctuation of the data of the environmental operating parameters themselves. When the value of the environmental fluctuation characteristic factor is larger, it means that the periodic fluctuation characteristics of the environmental operating parameters in the corresponding dimension are stronger, and then the influence of the environmental operating parameters in the corresponding dimension on the detection parameters of the sensor itself may be stronger than the actual influence. Therefore, it is necessary to adjust the influence range of the environmental parameters in combination with the environmental fluctuation characteristic factor of the environmental operating parameters in each dimension, so that the dimension with strong periodic fluctuation expands the influence range, and the dimension with weak periodic fluctuation appropriately reduces the influence range. Furthermore, through the distribution of the corrected data influence range, the attenuation factor corresponding to each moment can be adaptively determined, which fully considers the characteristic distribution of each aspect of the data at each moment, and avoids the problem of poor filtering effect due to the fixed attenuation factor.
[0116] Specifically, Figure 4 As shown, step S400 can be implemented by steps S401 to S403.
[0117] Step S401: using the environmental fluctuation characteristic factor to adjust the environmental parameter influence range to obtain a modified influence range.
[0118] The environmental fluctuation characteristic factor characterizes the periodic fluctuation characteristics in each dimension. The environmental fluctuation characteristic factor is used to further adjust the influence range of each environmental parameter to expand or reduce it to meet the degree of periodic fluctuation characteristics.
[0119] First, the adjustment coefficient under the target dimension is determined based on the environmental fluctuation characteristic factor under the target dimension, and the value range of the adjustment coefficient is (0,2). The value of the environmental fluctuation characteristic factor under each dimension can be mapped to (0,2) through a linear function to obtain the adjustment coefficient. When the adjustment coefficient is greater than 0 and less than 1, the adjustment operation of the environmental parameter influence range using the adjustment coefficient is to reduce the environmental parameter influence range. When the adjustment coefficient is greater than 1 and less than 2, the environmental parameter influence range is expanded when the adjustment operation is performed on the environmental parameter influence range using the adjustment coefficient. When the adjustment coefficient is equal to 1, the description remains unchanged.
[0120] In other embodiments, the implementer may normalize the environmental fluctuation characteristic factor in each dimension to obtain a normalized environmental fluctuation characteristic factor, and then adjust the adjustment coefficient in the corresponding dimension obtained based on the environmental fluctuation characteristic factor by setting a fixed adjustment value. The specific fixed value may be 0.5, and the sum of the fixed value and the normalized environmental fluctuation characteristic factor is used as the adjustment coefficient in each dimension, and the value range of the adjustment coefficient is (0,2).
[0121] Then, for each environmental parameter influence range, the corresponding data value length is obtained, and the data value length of each range is expanded or reduced using the adjustment coefficient to expand or reduce the range. Specifically, for the environmental parameter influence range of any data interval under the target dimension, the numerical length of the environmental parameter influence range is obtained; based on the numerical length of the environmental parameter influence range and the adjustment coefficient, the adjustment length is determined. Among them, the numerical length refers to the data difference distance between the upper limit value and the lower limit value of the environmental parameter influence range. The product of the numerical length of the environmental parameter influence range corresponding to each data area in each dimension and the adjustment coefficient under the same dimension is used as the adjustment length.
[0122] When the value of the environmental fluctuation characteristic factor of the target dimension is larger, it means that the degree of periodic characteristic fluctuation under the target dimension is larger, and the corresponding range of data influence should be wider, that is, the adjustment coefficient is used to expand the influence range of environmental parameters corresponding to each data interval under the target dimension. When the value of the environmental fluctuation characteristic factor of the target dimension is smaller, it means that the degree of periodic characteristic fluctuation under the target dimension is smaller, and the corresponding range of data influence should be narrower or remain unchanged, that is, the adjustment coefficient is used to reduce the influence range of environmental parameters corresponding to each data interval under the target dimension.
[0123] Furthermore, the adjustment length represents the length of the data value after the environmental parameter influence range is corrected after the adjustment operation such as expansion or reduction of the adjustment coefficient, and then based on the median value in the environmental parameter influence range and the adjustment length, the corrected influence range of any data interval under the target dimension can be determined. That is, the median value of the environmental parameter influence range is obtained, and the corrected influence range is obtained by taking the median value as the center and the adjustment length as the length window of the environmental influence value, that is, the environmental parameter influence range of each data interval under each dimension corresponds to a corrected influence range.
[0124] For example, assuming that the environmental parameter influence range of any data interval under the target dimension is [10, 20], the median value of the environmental parameter influence range is 15, and the numerical length is 10. Furthermore, assuming that the adjusted length of the environmental parameter influence range after correction by the adjustment coefficient is 14, then the value range corresponding to the window with a length of 14 and centered on the median value 15 is [8, 22]. This value range represents the corrected influence range obtained after correction.
[0125] The corrected influence range represents the normal fluctuation range of its own environmental operating parameters under the influence of the characteristic fluctuations of environmental factors in each dimension, that is, the relatively normal data distribution range of the environmental operating parameters in each dimension at each moment under the influence of the fluctuation characteristics.
[0126] Step S402, obtaining an attenuation factor of the environmental operating parameter at each moment in each dimension according to the difference distribution between the environmental operating parameter at each moment in each dimension and the correction influence range.
[0127] It is understandable that in the filtering process of the traditional extended Kalman filter (EKF), the role of the attenuation factor is to adjust the size of the covariance matrix of the state estimate. In the prediction step of the filter, the attenuation factor can be used to gradually decay the covariance matrix over time, reflecting that the uncertainty of the system state estimate increases with time.
[0128] The attenuation factor controls the convergence speed of the covariance matrix of the state estimate. When the attenuation factor is larger, the covariance matrix decays faster, that is, the covariance matrix will converge to the true value more quickly, indicating that the filter's estimate of the system state will adapt to system changes more quickly. When the attenuation factor is smaller, the covariance matrix decays slower, that is, the equation matrix will converge to the true value more slowly, indicating that the uncertainty of the state estimate of the filter corresponding to the system will decrease more slowly, and the filter response will be smoother and more conservative.
[0129] Based on this feature, the attenuation factor at each moment in each dimension can be adaptively determined by the distribution of the environmental operating parameters at each moment in each dimension within the corresponding correction influence range. When the environmental operating parameters do not exist within the correction influence range, it means that the difference distribution degree of the environmental operating parameters under the influence of the fluctuation characteristics is greater, and it is more likely to be due to the difference distribution of noise. At this time, a larger attenuation factor should be set accordingly, so that the corresponding moment where noise may exist has a faster forgetting speed. When the environmental operating parameters exist within the corresponding correction influence range, it means that the fluctuation of the environmental operating parameters at the current moment is a normal fluctuation, so a relatively small attenuation factor should be assigned to ensure the smoothness and conservatism of the filter response.
[0130] Specifically, this embodiment takes the environmental operating parameters of the target dimension at any moment as an example, and takes the sth moment as the target moment. When the environmental operating parameters of the target moment under the target dimension exist in the correction influence range corresponding to the data interval where the environmental operating parameters are located, the attenuation factor of the environmental operating parameters of the target moment under the target dimension is set to a preset value.
[0131] When the data value of the environmental operating parameter at the sth moment in the i-th dimension exists in the correction influence range corresponding to the data interval where the environmental operating parameter is located at that moment, it means that the environmental operating parameter is affected by the fluctuation characteristics at this time and belongs to the normal fluctuation situation. Therefore, a smaller attenuation factor corresponding to the sth moment in the i-th dimension can be assigned to ensure the smoothness of the filter response. The preset value of this implementation is 0.1. The implementer can set a smaller value according to the specific implementation scenario, and it needs to meet certain conditions, that is, the value of the preset value must be smaller than the value of the attenuation factor in another case.
[0132] When the environmental operating parameters at the target moment under the target dimension do not exist in the corrected influence range corresponding to the data interval where the environmental operating parameters are located, the attenuation factor of the environmental operating parameters at the target moment under the target dimension is determined based on the difference between the environmental operating parameters at the target moment under the target dimension and the upper limit value or the lower limit value of the corresponding corrected influence range; the preset value is less than the value of the attenuation factor at this time.
[0133] When the environmental operating parameters at the sth moment under the i-th dimension do not exist in the corresponding correction influence range, it means that the fluctuation distribution of the environmental operating parameters at the sth moment under the i-th dimension is not normal. The more the environmental operating parameters deviate from the corresponding correction influence range, the lower the credibility of the current environmental operating parameters, so a larger attenuation factor needs to be assigned to it. At this time, the value of the attenuation factor at the corresponding moment can be adaptively obtained based on the degree to which the environmental operating parameters deviate from the corresponding correction influence range.
[0134] Specifically, if the environmental operating parameter at the sth moment under the i-th dimension is greater than the upper limit value of the corresponding corrected influence range, the normalized value of the difference between the environmental operating parameter and the upper limit value of the corresponding corrected influence range is calculated as the attenuation factor corresponding to the sth moment under the i-th dimension, that is, the attenuation factor of the environmental operating parameter at the target moment under the target dimension.
[0135] If the environmental operating parameter at the sth moment under the i-th dimension is less than the corresponding lower limit of the corrected influence range, the normalized value of the difference between the lower limit of the corrected influence range and the environmental operating parameter is calculated as the attenuation factor corresponding to the sth moment under the i-th dimension, that is, the attenuation factor of the environmental operating parameter at the target moment under the target dimension.
[0136] Among them, the normalization method can be processed by the maximum and minimum value normalization method. The difference between the environmental operating parameter and the upper limit or lower limit of the corresponding correction influence range also represents the degree of deviation of the environmental operating parameter from the corresponding correction influence range. The greater the deviation, the greater the value of the corresponding attenuation factor. At this time, the value of the attenuation factor must be greater than the value of the preset value.
[0137] Step S403, based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension, a data correction result of the angle sensor is obtained in combination with a filtering algorithm.
[0138] First, based on the attenuation factor of the environmental operating parameters at each moment in each dimension, the covariance matrix between the detection parameters in each dimension and the environmental operating parameters in each dimension is obtained, and the denoising operation of the environmental operating parameters in each dimension can be completed by using the extended Kalman filter algorithm. It should be noted that the characteristic analysis of the covariance matrix of the detection parameters in one dimension and the environmental operating parameters in one dimension is performed.
[0139] After filtering, the environmental operating parameters in each dimension can be used to correct the accuracy of the angle sensor through existing supplementary functions and other methods. It should be noted that the calibration of the angle sensor based on environmental parameters and the extended Kalman filter algorithm based on attenuation memory are both well-known technologies and will not be introduced in detail here. Usually, environmental parameter calibration includes temperature compensation and vibration compensation, which can be calibrated using supplementary functions, such as nonlinear compensation methods such as drift calibration.
[0140] like Figure 5 As shown, a system for correcting the accuracy of an angle sensor based on machine learning is provided, the system comprising:
[0141] A data acquisition module, used for acquiring parameters to be corrected of the angle sensor in each dimension at each moment; the parameters to be corrected include detection parameters of the angle sensor in each dimension and environmental operating parameters of the device where the angle sensor is located in each dimension;
[0142] The fluctuation analysis module is used to obtain the environmental fluctuation characteristic factor in each dimension according to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics;
[0143] The impact analysis module is used to obtain the impact range of the environmental parameters in each dimension based on the differences between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of similar feature analysis of the differences in each dimension, combined with the differences between the environmental operating parameters and the corresponding fitting values;
[0144] The data correction module is used to adjust the environmental parameter influence range by using the environmental fluctuation characteristic factor to obtain the corrected influence range, and obtain the attenuation factor of the environmental operating parameters at each moment in each dimension according to the difference distribution between the environmental operating parameters at each moment in each dimension and the corrected influence range; based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension, the data correction result of the angle sensor is obtained in combination with the filtering algorithm.
[0145] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the angle sensor accuracy correction system based on machine learning and the angle sensor accuracy correction method based on machine learning provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0146] The present application also provides a computer device. Figure 6 , which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, the computer device includes a memory 601, a processor 602, and a computer program 603 stored in the memory 601 and running on the processor 602, wherein when the processor 602 executes the computer program 603, the computer device can execute any of the angle sensor accuracy correction methods based on machine learning introduced above.
[0147] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer device, the computer device can execute any of the angle sensor accuracy correction methods based on machine learning introduced above.
[0148] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer device, the computer device can execute any of the angle sensor accuracy correction methods based on machine learning introduced above.
[0149] In the embodiments provided in the present application, it should be understood that the provided computer device, computer program product and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the methods provided above and will not be repeated here.
[0150] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for correcting the accuracy of an angle sensor based on machine learning, characterized in that: The method comprises the following steps: Collecting parameters to be corrected of the angle sensor in each dimension at each moment; the parameters to be corrected include detection parameters of the angle sensor in each dimension and environmental operating parameters of the device where the angle sensor is located in each dimension; According to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics, the environmental fluctuation characteristic factor in each dimension is obtained; According to the difference between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of similar feature analysis of the difference in each dimension, combined with the difference between the environmental operating parameters and the corresponding fitting values, the influence range of the environmental parameters in each dimension is obtained; The environmental parameter influence range is adjusted by using the environmental fluctuation characteristic factor to obtain a corrected influence range, and an attenuation factor of the environmental operating parameter at each moment in each dimension is obtained according to the difference distribution between the environmental operating parameter at each moment in each dimension and the corrected influence range; based on the attenuation factor and the correlation characteristics between the detection parameter in each dimension and the environmental operating parameter in each dimension, a data correction result of the angle sensor is obtained in combination with a filtering algorithm; The influence range of the environmental parameters in each dimension is obtained based on the difference between the environmental operating parameters at adjacent moments in each dimension and the data distribution range of the similar feature analysis of the difference in each dimension, combined with the difference between the environmental operating parameters and the corresponding fitting values, specifically including: The environmental operation parameters under each dimension are evenly divided based on the value range of the environmental operation parameters under each dimension to obtain each data interval under each dimension; Record the environmental operating parameters in any dimension as the environmental operating parameters of the target dimension, and determine the environmental impact value at each moment in the target dimension based on the difference between the environmental operating parameters at each moment in the target dimension and the adjacent moments; Performing curve fitting based on the environmental operating parameters at each moment under the target dimension to obtain a fitting value at each moment under the target dimension, and determining a reference weight corresponding to the environmental impact value based on the difference between the fitting value at each moment under the target dimension and the environmental operating parameters; the difference between the fitting value and the environmental operating parameters is negatively correlated with the reference weight; Obtaining the environmental parameter influence range under the target dimension according to the data distribution range of similarity feature analysis of the environmental impact values at all times under the target dimension in each data interval using the reference weight; The step of performing similar feature analysis on the environmental impact values at all times in the target dimension in each data interval according to the reference weights to obtain the environmental parameter impact range in the target dimension specifically includes: Using the reference weight and the environmental impact value at each moment under the target dimension, the environmental impact value in each data interval is classified respectively to obtain a cluster in each data interval under the target dimension; Determine the environmental parameter influence range under the target dimension according to the numerical distribution range of the environmental impact value in the clustering clusters within each data interval under the target dimension; The specific method for obtaining the clustering clusters in each data interval under the target dimension is: For any two moments in any data interval under the target dimension, the weighted difference between the environmental impact values of the two moments is calculated using the reference weights of the two moments to obtain a distance measurement value between the two moments; Based on the distance measurement value between every two moments, all environmental impact values in the data interval under the target dimension are classified to obtain the clustering clusters in the data interval under the target dimension; The determining of the environmental parameter influence range under the target dimension according to the numerical distribution range of the environmental impact values in the clusters within each data interval under the target dimension specifically includes: For any data interval under the target dimension, the overall level of all environmental impact values in each cluster in the data interval is used as the characteristic comparison parameter of each cluster in the data interval; The value range of the environmental impact value in the cluster corresponding to the maximum value of the feature comparison parameter is used as the environmental parameter impact range of any data interval under the target dimension.
2. The method for correcting the angle sensor accuracy based on machine learning according to claim 1, characterized in that: The environmental fluctuation characteristic factor in each dimension is obtained according to the periodic distribution characteristics of all parameters to be corrected in each dimension and the characteristic distribution of the data fluctuation range of all environmental operating parameters in each dimension within all periodic characteristics, specifically including: Perform periodic analysis on the parameters to be corrected at all times in each dimension to obtain each period in each dimension; According to the range distribution of each period distribution length in each dimension and the fluctuation of the period distribution length, the scene characteristic factor is obtained; For the environmental operating parameters in any dimension, based on the fluctuation degree of all environmental operating parameters in each cycle and combined with the scene characteristic factor, the environmental fluctuation characteristic factor in any dimension is obtained.
3. The angle sensor accuracy correction method based on machine learning according to claim 2 is characterized in that: The scene characteristic factors are obtained according to the range distribution of each period distribution length in each dimension and the fluctuation of the period distribution length, specifically including: Determining a first distribution coefficient based on a difference between a maximum value and a minimum value of the time length of all cycles of the parameter to be corrected in all dimensions; Determining a second distribution coefficient based on the discrete coefficients of the time lengths of all cycles of the parameter to be corrected in all dimensions; A scene characteristic factor is obtained according to the first distribution coefficient and the second distribution coefficient, and both the first distribution coefficient and the second distribution coefficient are negatively correlated with the scene characteristic factor.
4. The angle sensor accuracy correction method based on machine learning according to claim 1 is characterized in that: The step of adjusting the environmental parameter influence range by using the environmental fluctuation characteristic factor to obtain a corrected influence range specifically includes: For the environmental parameter influence range of any data interval under the target dimension, the numerical length of the environmental parameter influence range is obtained; based on the environmental fluctuation characteristic factor under the target dimension, the adjustment coefficient under the target dimension is determined, and the value range of the adjustment coefficient is (0,2); Based on the numerical length and adjustment coefficient of the environmental parameter influence range, the adjustment length is determined, and based on the median value within the environmental parameter influence range and the adjustment length, the corrected influence range of any data interval under the target dimension is determined.
5. The method for correcting the angle sensor accuracy based on machine learning according to claim 4, characterized in that: The attenuation factor of the environmental operating parameter at each moment in each dimension is obtained according to the difference distribution between the environmental operating parameter at each moment in each dimension and the correction influence range, specifically including: Record any moment as the target moment; When the environmental operating parameter at the target time under the target dimension exists in the correction influence range corresponding to the data interval where the environmental operating parameter is located, the attenuation factor of the environmental operating parameter at the target time under the target dimension is set to a preset value; When the environmental operating parameters at the target moment under the target dimension do not exist in the corrected influence range corresponding to the data interval where the environmental operating parameters are located, the attenuation factor of the environmental operating parameters at the target moment under the target dimension is determined based on the difference between the environmental operating parameters at the target moment under the target dimension and the upper limit value or the lower limit value of the corresponding corrected influence range; the preset value is less than the value of the attenuation factor at this time.
6. The angle sensor accuracy correction method based on machine learning according to claim 1 is characterized in that: The data correction result of the angle sensor is obtained based on the attenuation factor and the correlation characteristics between the detection parameters in each dimension and the environmental operating parameters in each dimension in combination with the filtering algorithm, specifically including: Based on the attenuation factor of the environmental operating parameters in each dimension at each moment, the covariance matrix between the detection parameters in each dimension and the environmental operating parameters in each dimension is obtained. Combined with the extended Kalman filter algorithm, the data correction result of the angle sensor is obtained.
Citation Information
Patent Citations
Shape measuring machine and method of correcting shape measurement error
CN103808238A
Particle filter indoor locating method and particle filter indoor locating system based on dynamic environment attenuation factor
CN104898087A