Digital calibration method and system for an inclinometer
By establishing a dynamic motion model and combining Kalman filtering and neural network prediction of error trends, the problem of decreased calibration accuracy of inclinometers under complex working conditions was solved, and high-precision inclinometer measurement was achieved.
Patent Information
- Application Number
- CN202511299253.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing inclinometer calibration methods cannot adapt to the dynamic changes in errors caused by changes in operating conditions during vehicle operation, resulting in decreased calibration accuracy and large measurement deviations under complex road conditions, thus failing to meet high-precision requirements.
A dynamic motion model is established by collecting acceleration, angular velocity, and geomagnetic field data during vehicle operation. The Kalman filter algorithm is used to fuse the angle data output by the inclinometer, and the error change trend is predicted by combining the neural network for digital calibration.
It enables real-time error correction of the inclinometer, improving measurement accuracy and stability under complex working conditions and reducing the impact of noise interference.
Smart Images

Figure CN120800438B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital calibration, in particular to a digital calibration method and system for an inclinometer. BACKGROUND
[0002] During vehicle driving, the inclinometer is used to detect the vehicle body posture angle in real time, and the measurement accuracy directly affects the reliability of vehicle navigation, automatic driving control and other functions. The vehicle driving conditions are complex and changeable, including uniform speed, acceleration, deceleration, turning and other different states, and are easily affected by factors such as road bumps and sensor noise, resulting in deviation of the inclinometer measurement value. Therefore, a digital calibration method that can adapt to various driving conditions and dynamically correct measurement errors is needed to ensure the measurement accuracy of the inclinometer in various scenarios.
[0003] At present, there is a calibration scheme based on single sensor data for the digital calibration of the inclinometer. The scheme collects the angle data output by the inclinometer itself, combines a pre-set fixed error correction model, and calibrates the measurement value. Specifically, a fixed error compensation value is counted according to historical measurement data, and the compensation value is directly added to the inclinometer output value in the subsequent measurement process to realize calibration.
[0004] However, the existing scheme has the following obvious defects: Since it relies on a fixed error correction model, it cannot adapt to the dynamic changes of errors caused by changes in driving conditions (such as inertial force during acceleration and centrifugal force during turning). When the driving condition changes, the error generation mechanism will change, and the fixed compensation value is difficult to match the real-time error characteristics, resulting in a decrease in calibration accuracy, especially in complex road conditions, which is prone to large measurement deviations, and cannot meet the high-precision requirements of the vehicle for incline measurement. SUMMARY
[0005] The present application provides a digital calibration method and system for an inclinometer to solve the problem of low calibration effectiveness caused by the difficulty of adapting to dynamic error changes, the decrease in calibration accuracy, and large deviations in complex road conditions in the prior art.
[0006] In a first aspect, the embodiments of the present application provide a digital calibration method for an inclinometer, comprising:
[0007] Collecting acceleration data, angular velocity data and geomagnetic field data during vehicle driving, and establishing a dynamic motion model for describing the real-time motion state of the vehicle according to the acceleration data, the angular velocity data and the geomagnetic field data;
[0008] Controlling a step motor in the vehicle to drive the inclinometer to rotate periodically, and detecting the rotation angle of the inclinometer in real time through a photoelectric encoder to generate standard angle data with a time stamp;
[0009] based on the Kalman filtering algorithm, fusing the data in the dynamic motion model with the standard angle data, calculating error values of the inclinometer at each sampling time according to a fusion processing result and an angle value output by the inclinometer, and correcting the angle value output by the inclinometer based on the error values;
[0010] based on a difference between the corrected angle value and the standard angle data, constructing a historical error sequence, predicting an error change trend based on the historical error sequence by using a pre-trained neural network, and performing digital calibration on the inclinometer based on a prediction result.
[0011] Optionally, the fusing, based on the Kalman filtering algorithm, of the data in the dynamic motion model with the standard angle data, the calculating of the error values of the inclinometer at each sampling time according to a fusion processing result and an angle value output by the inclinometer, comprises:
[0012] based on the timestamp markers, matching sampling time corresponding to the data in the dynamic motion model and the standard angle data respectively, to obtain a corresponding relationship group of the data in the dynamic motion model and the standard angle data at each sampling time;
[0013] determining a weight distribution rule according to the corresponding relationship group, and fusing the data in the corresponding relationship group at each sampling time by using the Kalman filtering algorithm based on the weight distribution rule;
[0014] taking a difference between the fusion processing result and an angle value output by the inclinometer at the corresponding sampling time as an error value of the corresponding sampling time.
[0015] Optionally, the determining of the weight distribution rule according to the corresponding relationship group and the fusing of the data in the corresponding relationship group at each sampling time by using the Kalman filtering algorithm based on the weight distribution rule, comprises:
[0016] based on the corresponding relationship group, calculating a change rate of the data in the dynamic motion model and a fluctuation range of the standard angle data, and determining a stability degree index of the change rate and the fluctuation range;
[0017] establishing a mapping relationship between the stability degree index and a weight proportion, and distributing corresponding target weight values to the data in the dynamic motion model and the standard angle data respectively based on the mapping relationship;
[0018] based on the target weight values, adjusting a process noise covariance matrix and a measurement noise covariance matrix in the Kalman filtering algorithm;
[0019] The adjusted Kalman filtering algorithm is used to calculate the Kalman gain based on the system state prediction value and the measurement value at the current time, and the system state estimation value is updated according to the Kalman gain to obtain the fusion processing result.
[0020] Optionally, a historical error sequence is constructed based on the difference between the corrected angle value and the standard angle data, a neural network trained in advance is used to predict an error change trend based on the historical error sequence, and the inclinometer is digitally calibrated based on the prediction result, including:
[0021] The difference between the corrected angle value and the standard angle data at each sampling time is calculated, all the differences are arranged in chronological order to construct a historical error sequence;
[0022] According to the vehicle motion state corresponding to each data point in the historical error sequence, the historical error sequence is divided into subsequences with different change characteristics, and feature quantities of change amplitude and change frequency of historical errors are extracted from each subsequence;
[0023] Based on the change amplitude and the feature quantity, a neural network trained in advance is used to predict an error change trend, and the error change trend is taken as a prediction result;
[0024] Based on the error change trend, the rotation angle of the inclinometer is adjusted to realize digital calibration of the inclinometer through the adjusted rotation angle.
[0025] Optionally, according to the vehicle motion state corresponding to each data point in the historical error sequence, the historical error sequence is divided into subsequences with different change characteristics, and feature quantities of change amplitude and change frequency of historical errors are extracted from each subsequence, including:
[0026] The vehicle speed, acceleration amplitude and steering angle corresponding to each data point in the historical error sequence are analyzed to determine the driving working condition type of the data point;
[0027] Based on the driving working condition type, the historical error sequence is divided into subsequences with change characteristics of uniform speed driving, acceleration driving, deceleration driving and turning driving;
[0028] For each subsequence, the difference between the maximum error value and the minimum error value in the subsequence is calculated and taken as the change amplitude;
[0029] The fluctuation frequency of the change amplitude within a preset threshold range is counted, and the fluctuation frequency is calculated based on the fluctuation frequency and the time interval to obtain the change frequency feature quantity;
[0030] The change amplitude and the change frequency feature quantity are taken as the feature description quantity of each subsequence.
[0031] Optionally, the establishing of the mapping relationship between the stability degree index and the weight proportion comprises:
[0032] Setting a numerical interval of the stability degree index, dividing the numerical interval into a plurality of continuous subintervals according to a preset division rule, and setting a corresponding basic weight proportion for each of the subintervals;
[0033] For the first stability degree index of the data in the dynamic motion model, determining the subinterval in which the first stability degree index is located, and obtaining a first initial weight of the data in the dynamic motion model based on the basic weight proportion corresponding to the subinterval;
[0034] For the second stability degree index of the standard angle data, determining the subinterval in which the second stability degree index is located, and obtaining a second initial weight of the standard angle data based on the basic weight proportion corresponding to the subinterval;
[0035] Adjusting the first initial weight and the second initial weight respectively to obtain the target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively.
[0036] Optionally, the adjusting of the first initial weight and the second initial weight respectively to obtain the target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively comprises:
[0037] Calculating the sum of the first initial weight and the second initial weight;
[0038] Taking the ratio of the first initial weight to the sum as a first temporary adjustment weight, and taking the ratio of the second initial weight to the sum as a second temporary adjustment weight;
[0039] If the first temporary adjustment weight is greater than a preset maximum weight value, taking the preset maximum weight value as the target weight value corresponding to the data of the dynamic motion model, and taking the difference between the sum and the preset maximum weight value as the target weight value corresponding to the standard angle data;
[0040] Or, if the first temporary adjustment weight is less than a preset minimum weight value, taking the preset minimum weight value as the target weight value corresponding to the data of the dynamic motion model, and taking the difference between the sum and the preset minimum weight value as the target weight value corresponding to the standard angle data;
[0041] Or, if the first temporary adjustment weight is between the preset minimum weight value and the preset maximum weight value, the first temporary adjustment weight is taken as a target weight value corresponding to data in the dynamic motion model, and the second temporary adjustment weight is taken as a target weight value corresponding to the standard angle data.
[0042] In a second aspect, the embodiments of the present application provide a digital calibration system of an inclinometer, comprising:
[0043] The acquisition module is configured to acquire acceleration data, angular velocity data and geomagnetic field data in a vehicle driving process, and establish a dynamic motion model for describing a real-time motion state of the vehicle according to the acceleration data, the angular velocity data and the geomagnetic field data.
[0044] The control module is configured to control a step motor in the vehicle to drive the inclinometer to rotate periodically, detect a rotation angle of the inclinometer in real time through a photoelectric encoder, and generate standard angle data with a time stamp.
[0045] The fusion module is configured to fuse data in the dynamic motion model with the standard angle data based on a Kalman filtering algorithm, calculate error values of the inclinometer at each sampling time according to a fusion processing result and an angle value output by the inclinometer, and correct the angle value output by the inclinometer based on the error values.
[0046] The calibration module is configured to construct a historical error sequence based on a difference between the corrected angle value and the standard angle data, predict an error change trend based on the historical error sequence by using a pre-trained neural network, and perform digital calibration on the inclinometer based on a prediction result.
[0047] In a third aspect, the embodiments of the present application provide a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the digital calibration method of the inclinometer according to any one of the first aspect.
[0048] In a fourth aspect, the embodiments of the present application provide a computer storage medium storing a computer program, and the computer program is executed by a computer to implement the digital calibration method of the inclinometer according to any one of the first aspect.
[0049] In the present application, a digital calibration method of an inclinometer is provided, comprising: collecting acceleration data, angular velocity data and geomagnetic field data during vehicle driving, establishing a dynamic motion model for describing real-time motion state of the vehicle according to the acceleration data, angular velocity data and geomagnetic field data; controlling a stepping motor in the vehicle to drive the inclinometer to rotate periodically, detecting the rotation angle of the inclinometer in real time through an optical encoder to generate standard angle data with time stamp marking; based on Kalman filtering algorithm, fusing the data in the dynamic motion model with the standard angle data, calculating error values of the inclinometer at each sampling time according to the fusion result and the angle value output by the inclinometer, and correcting the angle value output by the inclinometer based on the error values; based on the difference between the corrected angle value and the standard angle data, constructing a historical error sequence, predicting the error trend based on the historical error sequence by using a pre-trained neural network, and performing digital calibration on the inclinometer based on the prediction result.
[0050] The present application has the following advantages: by collecting acceleration data, angular velocity data and geomagnetic field data during vehicle driving to establish a dynamic motion model, the motion state of the vehicle can be reflected in real time, providing reference data associated with the actual motion of the vehicle for inclinometer calibration; by controlling the stepping motor to drive the inclinometer to rotate periodically and using the optical encoder to generate standard angle data with time stamp, a high-precision, time-synchronized angle reference can be provided as a reference standard for error calculation; by fusing the dynamic motion model data and the standard angle data through Kalman filtering algorithm, the error value can be calculated and the output angle of the inclinometer can be corrected, which can reduce noise interference and improve the real-time accuracy of angle measurement by combining the advantages of the two kinds of data; by constructing a historical error sequence and using a neural network to predict the error trend to calibrate the inclinometer, dynamic tracking and advance correction of error changes can be realized, and the long-term stability of the inclinometer under complex working conditions can be improved.
[0051] Further, based on time stamp matching of the dynamic motion model data and the standard angle data, a weight distribution rule is determined and data fusion is performed in combination with Kalman filtering algorithm, specifically by calculating the stability indicators of the two to distribute target weights, adjusting the noise covariance matrix in Kalman filtering, and then updating the system state estimation value to obtain the fusion result and calculate the error value. By time stamp matching, the spatio-temporal consistency of the data is ensured, the weight is dynamically distributed based on the stability and the Kalman filtering parameters are optimized, which improves the accuracy and adaptability of data fusion, makes the error value calculation more consistent with the actual working condition, and provides a reliable basis for accurate correction of the inclinometer.
[0052] These and other aspects of the present application will become more apparent in the following description of embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and the drawings can be obtained by those skilled in the art without creative effort.
[0054] Figure 1 A flow chart of a digital calibration method of an inclinometer provided by an embodiment of the present application;
[0055] Figure 2 A structural schematic diagram of a digital calibration system of an inclinometer provided by an embodiment of the present application;
[0056] Figure 3 A structural schematic diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0058] In some of the processes described in the specification and claims of the present application and the above drawings, a plurality of operations appear in a specific order, but it should be clearly understood that these operations can be executed or performed in parallel, or in a sequence different from that in which they appear in the present text. The serial numbers of the operations, such as 11, 12, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution sequence. In addition, these processes can include more or fewer operations, and the operations can be executed or performed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in the present text are used to distinguish different messages, devices, modules, etc., and do not represent the sequence, nor do "first" and "second" represent different types.
[0059] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.
[0060] To solve the problem of low calibration effectiveness caused by the difficulty in adapting to error dynamic changes, the decline of calibration accuracy, and large deviation of complex road conditions in the prior art, the embodiment of the present application provides a digital calibration method for an inclinometer, which adopts the following concept: real-time collection of vehicle motion data to establish a dynamic model, generation of standard angle data with time stamp, fusion of data to calculate error and correct, calibration combined with historical error trend prediction, which can adapt to complex driving conditions of vehicles, reduce noise and interference, continuously optimize the measurement accuracy of the inclinometer, and improve its stability and reliability in various scenes.
[0061] Figure 1 A flowchart of a digital calibration method for an inclinometer provided by the embodiment of the present application is shown in Figure 1 The method comprises the following steps:
[0062] S11, collecting acceleration data, angular velocity data and geomagnetic field data during vehicle driving, and establishing a dynamic motion model for describing the real-time motion state of the vehicle according to the acceleration data, angular velocity data and geomagnetic field data.
[0063] Among them, the acceleration data is the information of the acceleration or deceleration speed of the vehicle during driving, the angular velocity data is the information of the rotation speed of the vehicle during turning, and the geomagnetic field data is the information of the strength and direction of the geomagnetic field around the vehicle, which can assist in determining the driving direction. The dynamic motion model is a model formed after integrating these data, which can describe the real-time speed, direction and attitude of the vehicle.
[0064] In the embodiment of the present application, the acceleration data, angular velocity data and geomagnetic field data during driving are collected in real time by sensors on the vehicle, such as recording once every 0.01 seconds. The acceleration is positive when accelerating forward and negative when decelerating, the angular velocity is positive when turning left and negative when turning right, and the surrounding geomagnetic field information is recorded at the same time. Then the real-time speed of the vehicle is calculated using these data, such as the acceleration data collected continuously twice is 2m / s² and 3m / s², the time interval is 0.01 seconds, and the speed change is (2+3) x 0.01=0.05m / s. The turning direction is determined in combination with the angular velocity data, and the driving direction is calibrated using the geomagnetic field data. Finally, these information is integrated to form a dynamic motion model, for example, the integrated model can reflect that the vehicle is currently driving at 30km / h eastward with a 10° northward deviation.
[0065] S12, control the step motor in the vehicle to drive the inclinometer to rotate periodically, and detect the rotation angle of the inclinometer in real time through the photoelectric encoder to generate standard angle data with time stamp.
[0066] Wherein, the stepper motor is a device that can accurately control the rotation angle according to the set instruction to drive the tilt angle instrument to rotate, the tilt angle instrument is an instrument for measuring the tilt angle of an object, the photoelectric encoder is a device that can detect the rotation angle of an object in real time, the timestamp is information for marking the time of data acquisition, and the standard angle data is the rotation angle data of the tilt angle instrument detected by the photoelectric encoder with the timestamp and can be used as the angle measurement reference.
[0067] In the embodiment of the present application, the parameters of the stepper motor driving the tilt angle instrument to rotate are set first, including the angle of rotation per interval, such as 15° per 0.2 seconds; then the stepper motor drives the tilt angle instrument to rotate repeatedly according to the parameters, i.e. the tilt angle instrument rotates 15° every 0.2 seconds; in the process of rotation, the photoelectric encoder detects the angle of the tilt angle instrument in real time, and when the time is 10:05:00, the detected angle is 60°, and after 0.2 seconds, i.e. at 10:05:02, the tilt angle instrument rotates 15° with the motor, and the encoder detects the angle of 75°; finally, the detected angle each time is associated with the corresponding time, and the standard angle data is arranged, such as the combination of 60° corresponding to 10:05:00 and 75° corresponding to 10:05:02 is part of the standard angle data.
[0068] S13, based on the Kalman filtering algorithm, the data in the dynamic motion model is fused with the standard angle data, the error value of the tilt angle instrument at each sampling time is calculated according to the fusion result and the angle value output by the tilt angle instrument, and the angle value output by the tilt angle instrument is corrected based on the error value.
[0069] Wherein, the Kalman filtering is a method that can combine data from different sources to reduce the influence of noise and obtain more accurate results, the fusion processing is a process of combining the data in the dynamic motion model and the standard angle data to obtain more reliable angle information, the error value is the difference between the fusion result and the angle value output by the tilt angle instrument, and the correction of the angle value output by the tilt angle instrument is to adjust the originally output angle of the tilt angle instrument to make it more accurate.
[0070] In the embodiment of the present application, the Kalman filtering method is used to combine and fuse the data in the dynamic motion model and the standard angle data, such as the dynamic motion model gives the angle related data 28°, the standard angle data is 30°, and the fusion result is more reliable 29°; then the fusion result is compared with the angle value output by the tilt angle instrument at the same time, such as the tilt angle instrument outputs 31°, and the difference between the two is 31°-29°=2°, which is the error value at that time; finally, the error value is used to adjust the output of the tilt angle instrument, i.e. 31° minus 2° to get 29°, and the correction of the angle value output by the tilt angle instrument is completed.
[0071] S14, based on the difference between the corrected angle value and the standard angle data, a historical error sequence is constructed, a pre-trained neural network is used to predict the error trend based on the historical error sequence, and the inclinometer is digitally calibrated based on the prediction result.
[0072] Wherein, the historical error sequence is a data sequence formed by arranging the error values in the past period of time in chronological order, the neural network is a tool that can predict future changes by learning data rules, the error trend is the change rule of error value with time, such as gradually increasing or decreasing, and the digital calibration is the process of adjusting the inclinometer to make its measurement more accurate using the predicted error trend.
[0073] In the embodiments of the present application, the difference between the corrected angle value and the standard angle data is arranged in chronological order to form a historical error sequence, such as 2° at 10:00, 1.5° at 10:01, and 1° at 10:02; then a pre-trained neural network is used to learn this sequence, and it is found that the error decreases by 0.5° every 1 minute; then the future error change is predicted according to this rule, such as predicting that the error is 0.5° at 10:03; finally, the measurement parameters of the inclinometer are adjusted according to the prediction result, such as subtracting 0.5° from the output value of the inclinometer in advance, to realize digital calibration.
[0074] For example, when an A brand vehicle is driving on urban roads, first, the sensor collects acceleration data (2 m / s² at start, -3 m / s² at brake), angular velocity data (0.5 rad / s at left turn, -0.5 rad / s at right turn) and geomagnetic field data every 0.01 seconds, calculates that the speed is (2 x 0.01 x 1000) = 20 m / s (72 km / h) after 10 seconds, determines to turn left east combined with angular velocity and geomagnetic field, and forms a dynamic motion model; then the step motor rotates 15° every 0.2 seconds to drive the inclinometer to rotate, and the optical encoder detects the angle of 60° at 10:05:00 and 75° at 10:05:02, and generates standard angle data with timestamp; then 28° of dynamic motion model data and 30° of standard angle data are fused to get 29°, and the error of 31° of inclinometer output is calculated as 31°-29°=2°, and the corrected value is 29°; finally, the error values are arranged in chronological order (3° at 10:00, 2.5° at 10:05, and 2° at 10:10) to form a historical error sequence, and the neural network learns that the error decreases by 0.5° every 5 minutes, predicts that the error is 1.5° at 10:15, and adjusts the inclinometer output to complete calibration.
[0075] By performing S11-S14, the application embodiment collects vehicle motion data in real time to establish a dynamic model, generates standard angle data with timestamps, fuses data to calculate errors and corrects, combines historical errors to predict trends for calibration, can adapt to complex driving conditions of vehicles, reduce noise and interference, continuously optimize the measurement accuracy of the tilt angle instrument, and improve its stability and reliability in various scenarios.
[0076] In a possible embodiment, S13, based on the Kalman filtering algorithm, fuses the data in the dynamic motion model with the standard angle data, calculates the error value of the tilt angle instrument at each sampling time according to the fusion processing result and the angle value output by the tilt angle instrument, and corrects the angle value output by the tilt angle instrument based on the error value, including:
[0077] Step 131, based on the timestamp mark, match the sampling time corresponding to the data in the dynamic motion model and the standard angle data respectively, to obtain a corresponding relationship group of the data in the dynamic motion model and the standard angle data at each sampling time.
[0078] Wherein, the timestamp mark is information recording the specific time of data collection, the data in the dynamic motion model is information describing the real-time motion state of the vehicle, the standard angle data is the tilt angle instrument rotation angle reference data with time mark, the sampling time is the specific time point of collecting data, and the corresponding relationship group is a group of corresponding information composed of the data in the dynamic motion model and the standard angle data at the same or similar sampling time.
[0079] In the embodiment of the application, the timestamp mark carried by the data in the dynamic motion model and the standard angle data is viewed, and the same or very close sampling time is found by comparison, such as the timestamp of the dynamic motion model data is 10:00:01, and the timestamp of the standard angle data is also 10:00:01, the two time points are the same; if the dynamic motion model data time is 10:00:01.001, and the standard angle data time is 10:00:01.002, because the time is close, it is also considered to match; the two kinds of data corresponding to these matching time points are combined together to form a corresponding relationship group, for example, at 10:00:01, the data in the dynamic motion model is 28° related information, and the standard angle data is 30°, which form a group of corresponding relationship.
[0080] Step 132, determine the weight distribution rule according to the corresponding relationship group, and fuse the data in the corresponding relationship group at each sampling time based on the weight distribution rule using the Kalman filtering algorithm.
[0081] Wherein, the corresponding relationship group is the combination of the dynamic motion model data and the standard angle data at the same sampling moment, the weight distribution rule is the rule for determining the proportion of each data in the fusion, the Kalman filtering algorithm is a method for obtaining more accurate results by combining different data, the fusion processing is a process of combining the two kinds of data according to the weight rule to form more reliable information, and the fusion processing result is more reliable angle information obtained after the fusion.
[0082] In the embodiment of the application, the stability of the two kinds of data in the corresponding relationship group is analyzed, for example, the dynamic motion model data is 28°, 29° and 30° at consecutive moments, the change is small and relatively stable, and the standard angle data is 30°, 32° and 31°, the change is large and relatively unstable; the weight distribution rule is determined according to the stability, the proportion of the stable data is high, and the proportion of the unstable data is low, for example, the weight of the dynamic motion model data is 60%, and the weight of the standard angle data is 40%; the Kalman filtering algorithm is used to fuse the data according to the rule, and the calculation method is that the dynamic motion model data is multiplied by its weight and the standard angle data is multiplied by its weight, for example, 28° is multiplied by 60% and 30° is multiplied by 40%, that is, 28×0.6+30×0.4=28.8°, and the fusion processing result is obtained.
[0083] Step 133, taking the difference between the fusion processing result and the angle value output by the inclinometer at the corresponding sampling moment as the error value of the corresponding sampling moment.
[0084] Wherein, the fusion processing result is more reliable angle information obtained after the fusion, the angle value output by the inclinometer at the corresponding sampling moment is the angle measured and output by the inclinometer at the time point, and the error value is the difference between the fusion processing result and the angle value output by the inclinometer, which is used to reflect the deviation of the inclinometer measurement.
[0085] In the embodiment of the application, the sampling moment corresponding to the fusion processing result is found, and the angle value output by the inclinometer at the same sampling moment is found, for example, the fusion processing result is 29° at 10:00:01, and the angle value output by the inclinometer at the moment is 31°; the difference between the two is calculated, that is, the angle value output by the inclinometer is subtracted from the fusion processing result, that is, 31° is subtracted from 29°, which is equal to 2°, and the difference is the error value of the sampling moment; if the fusion result is 30°, the inclinometer outputs 28°, and 28° is subtracted from 30°, which is equal to-2°, and the negative value indicates that the inclinometer outputs too small.
[0086] For example, when the A brand vehicle is running, in step 131, the dynamic motion model data has time stamps 10:05:00.000 (28° correlation) and 10:05:00.001 (29° correlation), and the standard angle data has time stamps 10:05:00.000 (30°) and 10:05:00.002 (31°), through time stamp matching, two groups of corresponding relationship groups are formed; in step 132, analysis finds that the fluctuation ranges of the two groups of data are both 1°, the stability is similar, and each is allocated a weight of 50%, the Kalman filtering algorithm is applied to fuse the first group of data: 28°*0.5+30°*0.5=14°+15=29°, and the second group of data: 29°*0.5+31°*0.5=14.5°+15.5=30°; in step 133, the tilt angle instrument outputs 31° at 10:05:00, the error value is obtained by calculating 31°-29°=2°, and the tilt angle instrument outputs 28° at 10:05:00.002, the error value is obtained by calculating 28°-30°=-2°.
[0087] By performing steps 131-133, the embodiment of the application ensures the correspondence in time between the dynamic motion model data and the standard angle data through time stamp matching, provides an accurate basis for fusion processing; based on the weight allocation according to the data stability degree and fusion, the obtained angle information is more reliable; by calculating the difference between the fusion result and the output value of the tilt angle instrument, the error value is obtained, which clearly reflects the measurement deviation of the tilt angle instrument, the three-step synergistic effect provides a precise basis for subsequent correction of the tilt angle instrument measurement value, and helps to improve the measurement accuracy of the tilt angle instrument.
[0088] In a possible embodiment, in step 132, a weight allocation rule is determined according to the corresponding relationship group, and based on the weight allocation rule, the data in the corresponding relationship group at each sampling time is fused by using the Kalman filtering algorithm, including:
[0089] a1, based on the corresponding relationship group, the change rate of the data in the dynamic motion model and the fluctuation range of the standard angle data are calculated, and a stability index of the change rate and the fluctuation range is determined.
[0090] Wherein, the corresponding relationship group is the combination of the data in the dynamic motion model and the standard angle data at the same sampling time, the change rate is the speed of the data in the dynamic motion model changing with time, the fluctuation range is the difference between the maximum value and the minimum value of the standard angle data within a certain time, the stability index is a numerical value describing the stability of the change rate and the fluctuation range, and the smaller the change, the higher the index.
[0091] In the embodiment of the present application, based on the corresponding relationship group, the data in the dynamic motion model of the continuous several sampling time points is selected, the difference value of the data of the adjacent two time points is calculated, and then the change rate is obtained by dividing the time interval, for example, the dynamic data of the continuous three time points is 28°, 29°, 30°, the interval between the adjacent time points is 1 second, the change rate is (29°-28°) ÷ 1=1° / s and (30°-29°) ÷ 1=1° / s; at the same time, the standard angle data within a certain time is selected, the maximum value and the minimum value are found out, and the fluctuation range is obtained by subtracting the minimum value from the maximum value, for example, the standard angle data is 30°, 31°, 30°, the maximum value is 31°, the minimum value is 30°, and the fluctuation range is 1°; the stability degree index is determined according to the change rate and the width of the fluctuation range, the index is high when the change rate is small and the fluctuation range is narrow, the above change rate corresponds to the index 80, and the fluctuation range corresponds to the index 70.
[0092] a2, a mapping relationship between the stability degree index and the weight proportion is established, and based on the mapping relationship, the data in the dynamic motion model and the standard angle data are respectively assigned corresponding target weight values.
[0093] Among them, the mapping relationship between the stability degree index and the weight proportion is the corresponding rule of the stability degree index value and the proportion occupied during data fusion, and the target weight value is the specific proportion assigned to the two kinds of data according to the mapping relationship.
[0094] In the embodiment of the present application, the mapping relationship between the stability degree index and the weight proportion is established, for example, the index 80 corresponds to 60%, and 70 corresponds to 40%, the higher the index, the greater the weight proportion; based on the mapping relationship, the target weight value is assigned according to the stability degree index obtained in step a1, the data in the dynamic motion model with index 80 corresponds to 60%, and the standard angle data with index 70 corresponds to 40%, that is, the target weight values of 60% and 40% are respectively assigned.
[0095] a3, for the Kalman filtering algorithm, the system state equation and the measurement equation are constructed, and then the system state vector and the measurement vector are obtained, the system state vector contains the inclination information, and the measurement vector contains the data in the dynamic motion model and the standard angle data.
[0096] Among them, the system state equation is an equation describing the relationship between the current inclination information and the inclination information at the next time point, the measurement equation is an equation describing the relationship between the inclination information and the measurement data, the system state vector is a group of values containing the current inclination information, and the measurement vector is a group of values containing the data in the dynamic motion model and the standard angle data.
[0097] In the embodiments of the present application, for the Kalman filtering algorithm, a system state equation is constructed to reflect the change of the current inclination to the inclination at the next time, for example, the current inclination is 29°, and the inclination at the next time may become 30° due to movement; a measurement equation is constructed to reflect the relationship between the state vector and the measurement vector, that is, the measurement data is derived from the inclination information; the system state vector is set to include the current inclination information, such as [29°]; and the measurement vector is set to include the data in the dynamic motion model and the standard angle data, such as [28°, 30°].
[0098] a4, based on the target weight value, adjusting the process noise covariance matrix and the measurement noise covariance matrix in the Kalman filtering algorithm.
[0099] wherein the process noise covariance matrix is a numerical group describing the size of the interference in the system state equation, the measurement noise covariance matrix is a numerical group describing the size of the measurement interference in the measurement equation, and the adjustment matrix is a numerical change according to the target weight, so that the data with high weight corresponds to smaller interference.
[0100] In the embodiments of the present application, based on the target weight value of the step a2, two matrices are adjusted, the data with high target weight is set to a small value in the measurement noise matrix, and the data with low weight is set to a large value; for example, the dynamic data weight 60% corresponds to the value 0.1, and the standard data 40% corresponds to 0.2; the process noise matrix is adjusted to 0.05 according to the overall weight, so that the interference description matches the data reliability.
[0101] a5, using the adjusted Kalman filtering algorithm, based on the system state prediction value and the measurement value at the current time, calculating the Kalman gain, and updating the system state estimation value according to the Kalman gain to obtain the fusion processing result.
[0102] wherein the current time system state prediction value is the current state predicted from the state at the last time, the measurement value is the measurement data at the current time, the Kalman gain is a value that weighs the prediction value and the measurement value, the system state estimation value is a more accurate state after updating, and the fusion processing result is the final fusion data.
[0103] In the embodiments of the present application, using the Kalman filtering algorithm adjusted by a4, the current prediction value 29° is predicted from the estimation value 28° at the last time; the current measurement values 28° and 30° are obtained; the Kalman gain is calculated, which is related to the measurement noise, for example, 0.2; the estimation value is updated using the gain, 29°+0.2×((28°+30°)÷2-29°)=29°, to obtain the fusion processing result.
[0104] For example, when the A brand vehicle is running, the a1 step takes the continuous dynamic data 28°, 29°, 30° (interval 1 second), calculates the change rate 1° / s, and the index is 80; the standard data is 30°, 31°, 30°, the fluctuation range is 1°, and the index is 70. The a2 step is according to the mapping relationship, and the dynamic data is 60% weight, and the standard data is 40%. The a3 step builds a state equation to describe the change of the inclination angle, and a measurement equation is associated with the state and the data, the state vector is [29°], and the measurement vector is [28°, 30°]. The a4 step adjusts the measurement noise matrix to [0.1, 0.2], and the process noise is 0.05. The a5 step predicts the current 29° from the last state 28°, and the measurement value is 28°, 30°, calculates the gain 0.2, updates the estimated value 29°+0.2×(29°-29°)=29°, and obtains the fusion result.
[0105] By performing a1-a5, the embodiment of the application provides a basis for weight allocation by the a1 step to determine the stability of the data; the a2 step allocates weights according to the stability, so that reliable data accounts for a higher proportion; the a3 step builds an equation to lay the foundation for fusion; the a4 step adjusts the interference description to match the reliability of the data; and the a5 step updates the state to obtain accurate fusion results, which overall improves the rationality and accuracy of data fusion and provides reliable information for subsequent processing.
[0106] In a possible embodiment, S14, based on the difference between the corrected angle value and the standard angle data, a historical error sequence is constructed, a pre-trained neural network is used to predict the error change trend based on the historical error sequence, and the inclinometer is digitally calibrated based on the prediction result, including:
[0107] Step 141, calculate the difference between the corrected angle value and the standard angle data at each sampling time, arrange all the differences in chronological order, and construct a historical error sequence.
[0108] Wherein, the corrected angle value is the angle information output by the inclinometer after error adjustment, the standard angle data is the reference information of the rotation angle of the inclinometer with a time mark, the difference is the difference value between the corrected angle value and the standard angle data, and the historical error sequence is a data sequence formed by arranging all the differences in chronological order.
[0109] In the embodiments of the present application, the difference between the corrected angle value at each sampling time and the standard angle data is calculated, that is, the corrected angle value is subtracted from the standard angle data. For example, the corrected angle value at a certain time is 29°, and the corresponding standard angle data is 30°. Then the difference is 29°-30°=-1°. The corrected angle value at another time is 31°, and the standard angle data is 30°. Then the difference is 31°-30°=1°. The calculated differences are arranged in the order of their corresponding sampling times, that is, the difference appearing first is placed in front, and the difference appearing later is placed behind. For example, the differences -1°, 1°, 0° are arranged in time sequence to form a historical error sequence.
[0110] In step 142, according to the vehicle motion state corresponding to each data point in the historical error sequence, the historical error sequence is divided into sub-sequences with different change characteristics, and the feature quantities of the change amplitude and the change frequency of the historical error are extracted from each sub-sequence.
[0111] In the embodiments of the present application, the vehicle motion state is the state of the vehicle during driving, such as uniform forward movement, acceleration forward movement, turning, etc. The sub-sequence is a part with the same change characteristic divided from the historical error sequence. The change amplitude is the difference between the maximum value and the minimum value of the error in a sub-sequence. The change frequency is the number of times of error fluctuation back and forth per unit time. The feature quantity is a specific numerical value used to describe the change amplitude and the change frequency.
[0112] In the embodiments of the present application, according to the vehicle motion state corresponding to each data point in the historical error sequence, the entire historical error sequence is divided into different sub-sequences. For example, the error data of the vehicle in the uniform state is [-1°, -0.8°, -0.6°], and the error data of the vehicle in the turning state is [1°, 0.5°, 0°]. These two parts are divided into two sub-sequences respectively. For each sub-sequence, the maximum value and the minimum value of the error are found, and the change amplitude is obtained by subtracting the minimum value from the maximum value. For example, the maximum value of the error in the uniform state sub-sequence is -0.6°, the minimum value is -1°, and the change amplitude is -0.6°-(-1°)=0.4°. The number of times of error fluctuation back and forth per unit time is counted to obtain the change frequency. For example, the error fluctuates 3 times per minute, and the change frequency is 3 times per minute. The calculated change amplitude and change frequency are taken as the feature quantities of the sub-sequence.
[0113] In step 143, based on the change amplitude and the feature quantity, the error change trend is predicted through a pre-trained neural network, and the error change trend is taken as the prediction result.
[0114] The change range is the difference between the maximum error value and the minimum error value in the subsequence, the characteristic quantity includes the specific values of the change range and the change frequency, the neural network is a tool capable of learning the change rule of data and predicting future changes accordingly, the error change trend is the change direction and speed of the error over time, and the prediction result is the error change trend predicted by the neural network according to the characteristic quantity.
[0115] In the embodiment of the application, the change range and the characteristic quantity obtained in step 142 are input into a pre-trained neural network, which has mastered the error change rule corresponding to different characteristic quantities by learning historical error data, such as knowing that when the change range is 0.4° and the change frequency is 3 times per minute, the error will change at a speed of 0.2° per 10 seconds; based on these learned rules, the neural network predicts the change trend of the subsequent error, such as predicting that the error will gradually decrease from -0.6° to -0.4° in the next 10 seconds, and this change trend is the prediction result.
[0116] Step 144, adjusting the rotation angle of the inclinometer based on the error change trend to realize digital calibration of the inclinometer through the adjusted rotation angle.
[0117] The error change trend is the change direction and speed of the error over time, the rotation angle is the angle size of the rotation of the inclinometer, and the digital calibration is a process of making the measurement result of the inclinometer more accurate by adjusting the rotation angle of the inclinometer.
[0118] In the embodiment of the application, according to the error change trend obtained in step 143, the rotation angle of the inclinometer is adjusted, such as predicting that the error will decrease from -0.6° to -0.4° in the next 10 seconds, which means that the actual angle is 0.4° larger than the current measurement value, in order to make the measurement result closer to the actual angle, the rotation angle of the inclinometer is increased by 0.4°; through such adjustment, the angle information output by the inclinometer in subsequent measurement is closer to the actual angle, realizing digital calibration of the inclinometer.
[0119] For example, during the driving of the A brand vehicle, in step 141, the corrected angle value at 10:00 is 29°, the corresponding standard angle data is 30°, and the difference is calculated as 29° minus 30° equaling -1°; the corrected angle value at 10:01 is 31°, the standard angle data is 30°, and the difference is 31° minus 30° equaling 1°; the corrected angle value at 10:02 is 30°, the standard angle data is 30°, and the difference is 0°; arranging these differences in chronological order, a historical error sequence [-1°, 1°, 0°] is obtained. In step 142, according to the vehicle motion state, the vehicle is in uniform speed state at 10:00, corresponding to the difference -1°; 10:01-10:02 is in acceleration state, corresponding to the differences 1°, 0°, which is divided into a uniform speed sub-sequence [-1°] and an acceleration sub-sequence [1°, 0°]; the maximum and minimum values in the uniform speed sub-sequence are both -1°, and the change amplitude is 0°; the maximum value in the acceleration sub-sequence is 1°, the minimum value is 0°, and the change amplitude is 1° minus 0° equaling 1°, which fluctuates 1 time in 1 minute, and the change frequency is 1 time per minute, which is extracted as a feature quantity. In step 143, the feature quantity is input into the neural network, and after the neural network learns, it is predicted that the error in the acceleration state will change from 0° to -0.5° in 1 minute. In step 144, according to this trend, the rotation angle of the inclinometer is increased by 0.5°, and the digital calibration is completed.
[0120] By performing steps 141-144, the embodiments of the present application provide basic data for analyzing error variation by calculating errors and forming a historical error sequence; the feature quantity is extracted by dividing the sub-sequences of different motion states, which can capture the error characteristics in different scenarios; the neural network is used to predict the error variation trend based on the feature quantity, which realizes the advance judgment of the error variation; and the rotation angle of the inclinometer is adjusted according to the prediction result, so that the calibration is more in line with the actual change, and the overall process improves the accuracy and adaptability of the inclinometer calibration.
[0121] In a possible embodiment, in step 142, the historical error sequence is divided into sub-sequences with different change characteristics according to the vehicle motion state corresponding to each data point in the historical error sequence, and the change amplitude and change frequency of the historical error are extracted as feature quantities from each sub-sequence, including:
[0122] b1, analyze the vehicle driving speed, acceleration amplitude and steering angle corresponding to each data point in the historical error sequence to determine the driving working condition type of each data point.
[0123] The historical error sequence is a combination of error data points arranged in time sequence, the data point is each error value in the sequence, the vehicle driving speed is the speed of the vehicle, the acceleration amplitude is the strength of the acceleration or deceleration of the vehicle, the steering angle is the angle of the vehicle turning, and the driving condition type is the driving state type of the vehicle divided according to the parameters, including uniform driving, acceleration driving, deceleration driving, and turning driving.
[0124] In the embodiment of the present application, the vehicle driving speed, the acceleration amplitude and the steering angle corresponding to each data point in the historical error sequence are obtained, and the driving condition type is determined according to the numerical values of the parameters. For example, when the vehicle driving speed remains unchanged at 30 km / h, the acceleration amplitude is 0, and the steering angle is 0°, it is determined as uniform driving; when the speed increases from 30 km / h to 35 km / h, the acceleration amplitude is 2 m / s², and the steering angle is 0°, it is determined as acceleration driving; when the speed decreases from 35 km / h to 30 km / h, the acceleration amplitude is -1 m / s², and the steering angle is 0°, it is determined as deceleration driving; when the steering angle is 30°, regardless of the speed and acceleration, it is determined as turning driving.
[0125] b2, based on the driving condition type, the historical error sequence is divided into sub-sequences with the change characteristics of uniform driving, acceleration driving, deceleration driving and turning driving.
[0126] The driving condition type includes uniform driving, acceleration driving, deceleration driving, and turning driving, the sub-sequence is a part of the historical error sequence that belongs to the same driving condition type and has similar error change characteristics, and the change characteristic is the change mode of the error value over time, such as gradual decrease of the error value when uniform, and first increase and then decrease of the error value when accelerating.
[0127] In the embodiment of the present application, the data points belonging to the same type in the historical error sequence are collected to form the corresponding sub-sequence according to the driving condition type of each data point determined in the b1 step. For example, all data points marked as uniform driving form a uniform sub-sequence, and the error value gradually decreases over time, such as [-1°, -0.8°, -0.6°]; the data points marked as acceleration driving form an acceleration sub-sequence, and the error value first increases and then decreases, such as [1°, 0.5°, 0°]; the data points of deceleration and turning also form corresponding sub-sequences, and each sub-sequence maintains its own change characteristics.
[0128] b3, for each sub-sequence, the difference between the maximum error value and the minimum error value in the sub-sequence is calculated and taken as the change amplitude.
[0129] Wherein, the subsequence is the error data part corresponding to the same driving condition type, the error maximum value is the maximum error value in the subsequence, the error minimum value is the minimum error value in the subsequence, and the variation range is the difference between the error maximum value and the error minimum value.
[0130] In the embodiments of the present application, for each subsequence obtained in the b2 step, the error maximum value and the error minimum value are found, and the variation range is obtained by subtracting the error minimum value from the error maximum value. For example, in the uniform speed subsequence [-1°, -0.8°, -0.6°], the error maximum value is -0.6°, the error minimum value is -1°, and the variation range is 0.4°, which is obtained by subtracting (-1°) from -0.6°; in the acceleration subsequence [1°, 0.5°, 0°], the error maximum value is 1°, the error minimum value is 0°, and the variation range is 1°, which is obtained by subtracting 0° from 1°.
[0131] b4, count the fluctuation times of the variation range within the preset threshold range, calculate the fluctuation frequency based on the fluctuation times and the time interval, and obtain the variation frequency feature quantity.
[0132] Wherein, the variation range is the maximum difference of errors in the subsequence, the preset threshold range is a value interval set in advance, the fluctuation times are the times when the variation range is within the range, the time interval is the time difference between the first data point and the last data point in the subsequence, the fluctuation frequency is the fluctuation times per unit time, and the variation frequency feature quantity is a value describing the fluctuation frequency.
[0133] In the embodiments of the present application, the preset threshold range is set, such as 0° to 1°, the fluctuation times of the variation range within the range in the subsequence are counted, and when the variation range goes from outside the range into the range and then back to outside the range, it is counted as one fluctuation. For example, there are 2 such fluctuations in the acceleration subsequence, and the fluctuation times are 2; the time interval of the subsequence is calculated, such as from 10:00 to 10:01, and the time interval is 1 minute; and the fluctuation frequency is obtained by dividing the fluctuation times by the time interval, i.e. 2 times per minute, which is the variation frequency feature quantity.
[0134] b5, the variation range and the variation frequency feature quantity are taken as the feature description quantity of each subsequence.
[0135] Wherein, the variation range is the maximum difference of errors in the subsequence, the variation frequency feature quantity is the fluctuation times per unit time, and the feature description quantity is a combination of the variation range and the variation frequency feature quantity for describing the features of the subsequence.
[0136] In the embodiments of the present application, the variation amplitude obtained in the b3 step and the variation frequency characteristic quantity obtained in the b4 step are integrated as the characteristic description quantity of the corresponding subsequence. For example, the variation amplitude of the uniform speed subsequence is 0.4°, and the variation frequency characteristic quantity is 2 times per minute, and the characteristic description quantity is the combination of 0.4° and 2 times per minute; the variation amplitude of the acceleration subsequence is 1°, and the variation frequency characteristic quantity is 2 times per minute, and the characteristic description quantity is the combination of 1° and 2 times per minute.
[0137] For example, when the A brand vehicle is running, in the b1 step, the parameters of the 6 data points are (30 km / h, 0, 0°), (30 km / h, 0, 0°), (35 km / h, 2 m / s², 0°), (35 km / h, 2 m / s², 0°), (30 km / h, -1 m / s², 0°), (30 km / h, 0, 30°) in turn, and it is determined that the working conditions are uniform speed, uniform speed, acceleration, acceleration, deceleration, and turning; in the b2 step, the errors [-1°, -0.8°] of the uniform speed data points are divided into a uniform speed subsequence, the errors [1°, 0.5°] of the acceleration data points are divided into an acceleration subsequence, and the deceleration and turning data points also form subsequences respectively; in the b3 step, the maximum value of the uniform speed subsequence is -0.8°, the minimum value is -1°, the variation amplitude is -0.8°-(-1°)=0.2°, the maximum value of the acceleration subsequence is 1°, the minimum value is 0.5°, and the variation amplitude is 1°-0.5°=0.5°; in the b4 step, the preset threshold is 0°-1°, the uniform speed subsequence fluctuates 2 times, the time interval is 1 minute, the frequency is 2÷1=2 times per minute, the acceleration subsequence fluctuates 1 time, and the frequency is 1÷1=1 time per minute; in the b5 step, the characteristic description quantity of the uniform speed subsequence is set as 0.2° and 2 times per minute, and the characteristic description quantity of the acceleration subsequence is set as 0.5° and 1 time per minute.
[0138] By performing b1-b5, the embodiments of the present application divide the working condition types by analyzing the vehicle running parameters, so that the division of the error sequence is more in line with the actual running state; the subsequences are divided based on the working condition types, so as to ensure the uniformity of the error variation characteristics of each subsequence; the variation amplitude and the fluctuation frequency are calculated and integrated into the characteristic description quantity, which accurately captures the error characteristics under different working conditions, provides clear and targeted characteristic basis for subsequent error analysis and calibration, and improves the accuracy and applicability of the description of the error law.
[0139] In a possible embodiment, a2, a mapping relationship between the stability degree index and the weight proportion is established, and based on the mapping relationship, corresponding target weight values are respectively assigned to the data in the dynamic motion model and the standard angle data, including:
[0140] c1, set the numerical interval of the stability degree index, divide the numerical interval into a plurality of continuous subintervals according to a preset division rule, and set corresponding basic weight proportions for each subinterval.
[0141] The numerical range of the stability degree index is a range of values that the stability degree index can take, the preset division rule is a regulation for dividing the range into multiple continuous parts, the sub-interval is each small range obtained after division, and the basic weight proportion is an initial weight proportion set for each sub-interval. These contents jointly constitute the basis of weight distribution.
[0142] In the embodiment of the application, the numerical range of the stability degree index is first set, such as the range of 0 to 100; according to the preset division rule, such as an interval of every 20, 0 to 100 is divided into 0-20, 20-40, 40-60, 60-80, and 80-100; and then a corresponding basic weight proportion is set for each sub-interval, for example, 0-20 corresponds to 20%, 20-40 corresponds to 40%, 40-60 corresponds to 50%, 60-80 corresponds to 60%, and 80-100 corresponds to 80%.
[0143] c2, for the first stability degree index of the data in the dynamic motion model, determining the sub-interval in which the first stability degree index is located, and obtaining the first initial weight of the data in the dynamic motion model based on the basic weight proportion corresponding to the sub-interval.
[0144] The first stability degree index is a value describing the stability degree of the data in the dynamic motion model, the sub-interval is a small range divided in the c1 step, the basic weight proportion is an initial weight proportion corresponding to the sub-interval, and the first initial weight is an initial weight of the data in the dynamic motion model obtained according to the sub-interval in which the stability degree index is located.
[0145] In the embodiment of the application, the first stability degree index of the data in the dynamic motion model is obtained, such as 80; it is checked which sub-interval the index belongs to according to the division in the c1 step, 80 belongs to the sub-interval of 80-100; and the first initial weight of the data in the dynamic motion model is obtained according to the basic weight proportion corresponding to the sub-interval, because the basic weight corresponding to 80-100 is 80%, so the first initial weight is 80%.
[0146] c3, for the second stability degree index of the standard angle data, determining the sub-interval in which the second stability degree index is located, and obtaining the second initial weight of the standard angle data based on the basic weight proportion corresponding to the sub-interval.
[0147] The second stability degree index is a value describing the stability degree of the standard angle data, the sub-interval is a small range divided in the c1 step, the basic weight proportion is an initial weight proportion corresponding to the sub-interval, and the second initial weight is an initial weight of the standard angle data obtained according to the sub-interval in which the stability degree index is located.
[0148] In the embodiments of the present application, the second stability degree index of the standard angle data is obtained, such as 60; it is checked which sub-interval of the c1 step the index belongs to, and 60 belongs to the sub-interval of 60-80; the second initial weight of the standard angle data is obtained according to the basic weight proportion corresponding to the sub-interval, because the basic weight corresponding to 60-80 is 60%, so the second initial weight is 60%.
[0149] c4, the first initial weight and the second initial weight are adjusted respectively, and the target weight values corresponding to the data in the dynamic motion model and the standard angle data are obtained.
[0150] Among them, the first initial weight is the initial weight of the data in the dynamic motion model, the second initial weight is the initial weight of the standard angle data, the target weight value is the final weight obtained by adjusting the two initial weights, and the sum of the two after adjustment is 100%, which is used to determine the proportion when data fusion.
[0151] In the embodiments of the present application, the first initial weight obtained in the c2 step and the second initial weight obtained in the c3 step are adjusted, so that the sum of the two is equal to 100%. For example, the first initial weight is 80%, and the second initial weight is 60%, the sum of the two is 140%, which exceeds 100%, so the first initial weight is adjusted to 80% divided by 140% and multiplied by 100%, which is about 57%, and the second initial weight is adjusted to 60% divided by 140% and multiplied by 100%, which is about 43%; The 57% and 43% obtained in this way are the target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively.
[0152] For example, when the A brand vehicle is running, the c1 step sets the value interval of the stability degree index to 0-100, which is divided into 0-20, 20-40, 40-60, 60-80 and 80-100 five sub-intervals according to every 20, and the corresponding basic weight proportion is 20%, 40%, 50%, 60% and 80% respectively; The first stability degree index of the data in the dynamic motion model in the c2 step is 80, which falls in the 80-100 sub-interval, and the first initial weight 80% is obtained; The second stability degree index of the standard angle data in the c3 step is 60, which falls in the 60-80 sub-interval, and the second initial weight 60% is obtained; In the c4 step, the first initial weight 80% plus the second initial weight 60% is equal to 140%, and the first initial weight is 80 divided by 140 and multiplied by 100%, which is about 57%, and the second initial weight is 60 divided by 140 and multiplied by 100%, which is about 43%, and the target weight values 57% and 43% are obtained.
[0153] By performing c1~c4, the embodiment of the application provides clear division criteria for the initial weight by setting the interval and sub-interval of the stability degree index; the initial weight is determined based on the stability degree index, so that the weight matches the stability degree of the data; the target weight value is obtained by adjusting the initial weight, so as to ensure that the proportion is reasonable and the sum meets the requirements, thereby providing a reliable basis for the proportion allocation in subsequent data fusion and improving the rationality and accuracy of data fusion.
[0154] In a possible embodiment, c4 adjusts the first initial weight and the second initial weight respectively to obtain target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively, including:
[0155] d1, calculates the sum of the first initial weight and the second initial weight.
[0156] The first initial weight is the initial weight proportion of the data in the dynamic motion model, the second initial weight is the initial weight proportion of the standard angle data, and the sum is the value obtained by adding the two initial weights, which is used to determine the weight allocation proportion of the two kinds of data subsequently.
[0157] In the embodiment of the application, the sum of the first initial weight and the second initial weight can be obtained by adding the first initial weight and the second initial weight, for example, the first initial weight is 80%, the second initial weight is 60%, and the sum is 80% plus 60% equal to 140%; for example, the first initial weight is 50%, the second initial weight is 30%, and the sum is 50% plus 30% equal to 80%.
[0158] d2, the ratio of the first initial weight to the sum is taken as the first temporary adjustment weight, and the ratio of the second initial weight to the sum is taken as the second temporary adjustment weight.
[0159] The first temporary adjustment weight is the proportion of the first initial weight in the sum, and the second temporary adjustment weight is the proportion of the second initial weight in the sum, and the two proportions are used to temporarily determine the weight allocation of the two kinds of data.
[0160] In the embodiment of the application, the first temporary adjustment weight is calculated by dividing the first initial weight by the sum obtained in step d1, for example, the first initial weight is 80%, the sum is 140%, and 80% is divided by 140%, the result is about 57%; the second temporary adjustment weight is calculated by dividing the second initial weight by the sum, for example, 60% is divided by 140%, the result is about 43%; the temporary weight proportion of the two kinds of data is obtained by such calculation.
[0161] d3、if the first temporary adjustment weight is greater than the preset maximum weight value, the preset maximum weight value is taken as the target weight value corresponding to the dynamic motion model data, and a difference between the sum and the preset maximum weight value is taken as the target weight value corresponding to the standard angle data.
[0162] The first temporary adjustment weight is a temporary proportion of data in the dynamic motion model, the preset maximum weight value is a preset upper limit of the weight, the target weight value is a finally determined weight proportion, and the target weight values of the data in the dynamic motion model and the standard angle data are 100%.
[0163] In the embodiment of the present application, if the first temporary adjustment weight is greater than the preset maximum weight value, for example, the preset maximum weight value is 70%, and the first temporary adjustment weight is 80%, which exceeds the preset value; then the preset maximum weight value is taken as the target weight value of the data in the dynamic motion model, that is, 70%, and 100% minus the target weight value is taken as the target weight value of the standard angle data, that is, 30%.
[0164] d4、or, if the first temporary adjustment weight is less than the preset minimum weight value, the preset minimum weight value is taken as the target weight value corresponding to the dynamic motion model data, and a difference between the sum and the preset minimum weight value is taken as the target weight value corresponding to the standard angle data.
[0165] The first temporary adjustment weight is a temporary proportion of data in the dynamic motion model, the preset minimum weight value is a preset lower limit of the weight, the target weight value is a finally determined weight proportion, and the target weight values of the two kinds of data are 100%.
[0166] In the embodiment of the present application, if the first temporary adjustment weight is less than the preset minimum weight value, for example, the preset minimum weight value is 30%, and the first temporary adjustment weight is 20%, which is lower than the preset value; then the preset minimum weight value is taken as the target weight value of the data in the dynamic motion model, that is, 30%, and 100% minus the target weight value is taken as the target weight value of the standard angle data, that is, 70%.
[0167] d5、or, if the first temporary adjustment weight is between the preset minimum weight value and the preset maximum weight value, the first temporary adjustment weight is taken as the target weight value corresponding to the data in the dynamic motion model, and the second temporary adjustment weight is taken as the target weight value corresponding to the standard angle data.
[0168] The first temporary adjustment weight and the second temporary adjustment weight are temporary proportions of two kinds of data, the preset minimum weight value and the preset maximum weight value are upper and lower limits of the weight, and the target weight value is a finally determined weight proportion.
[0169] In the embodiment of the application, if the first temporary adjustment weight is between the preset minimum weight value and the preset maximum weight value, for example, the preset minimum is 30% and the preset maximum is 70%, and the first temporary adjustment weight is 57%; then the first temporary adjustment weight is taken as the target weight value of the data in the dynamic motion model, that is, 57%, and the second temporary adjustment weight is taken as the target weight value of the standard angle data, that is, 43%, and the sum of the two values is 100%.
[0170] For example, in the driving of an A brand vehicle, the d1 step calculates the sum of the first initial weight 80% and the second initial weight 60%, that is, 80% plus 60% equals 140%; the d2 step calculates the first temporary adjustment weight as 80% divided by 140%, that is, about 57%, and the second temporary adjustment weight as 60% divided by 140%, that is, about 43%; it is assumed that the preset minimum weight value is 30% and the maximum is 70%, and the first temporary adjustment weight 57% in the d5 step is between 30%-70%, so the target weight value of the data in the dynamic motion model is 57% and the target weight value of the standard angle data is 43%. If the first temporary adjustment weight is 80%, the d3 step is greater than 70%, so the target weight value of the data in the dynamic motion model is 70% and the target weight value of the standard angle data is 30%; if the first temporary adjustment weight is 20%, the d4 step is less than 30%, so the target weight value of the data in the dynamic motion model is 30% and the target weight value of the standard angle data is 70%.
[0171] By performing d1-d5, the embodiment of the application adjusts the initial weight sum and the temporary adjustment weight according to the preset upper and lower limits of the weight, ensures the reasonable proportion of the target weight values of the data in the dynamic motion model and the standard angle data, conforms to the proportional relationship of the data itself, does not exceed the set range, provides a stable and appropriate proportional basis for data fusion, and improves the reliability of data fusion.
[0172] Figure 2 A structure schematic diagram of a digital calibration system of an inclinometer provided in the embodiment of the application is shown in FIG. 1. Figure 2 As shown in the figure, the system comprises:
[0173] The acquisition module 21 acquires acceleration data, angular velocity data and geomagnetic field data in the driving of a vehicle, and establishes a dynamic motion model for describing the real-time motion state of the vehicle according to the acceleration data, the angular velocity data and the geomagnetic field data.
[0174] The control module 22 controls the step motor in the vehicle to drive the tilt angle instrument to rotate periodically, and detects the rotation angle of the tilt angle instrument in real time through the photoelectric encoder to generate standard angle data with a time stamp.
[0175] The fusion module 23 fuses the data in the dynamic motion model with the standard angle data based on the Kalman filtering algorithm, calculates the error value of the tilt angle instrument at each sampling time according to the fusion processing result and the angle value output by the tilt angle instrument, and corrects the angle value output by the tilt angle instrument based on the error value.
[0176] The calibration module 24 constructs a historical error sequence based on the difference between the corrected angle value and the standard angle data, predicts the error change trend based on the historical error sequence by using a pre-trained neural network, and performs digital calibration on the tilt angle instrument based on the prediction result.
[0177] Figure 2 The digital calibration system of the tilt angle instrument can perform Figure 1 The digital calibration method of the tilt angle instrument described in the embodiments has the implementation principle and technical effects which will not be repeated. For the specific operation of each module and unit of the digital calibration system of the tilt angle instrument in the above embodiments, the detailed description has been made in the embodiments related to the method, and will not be described in detail here.
[0178] In one possible design, Figure 2 The digital calibration system of the tilt angle instrument described in the embodiments can be implemented as a computing device, such as a computer. Figure 3 As shown in the figure, the computing device can include a storage component 31 and a processing component 32.
[0179] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32.
[0180] The processing component 32 is configured to perform the following processes: collecting acceleration data, angular velocity data and geomagnetic field data during vehicle driving, establishing a dynamic motion model for describing real-time motion state of the vehicle according to the acceleration data, the angular velocity data and the geomagnetic field data; controlling a step motor in the vehicle to drive a tilt angle instrument to rotate periodically, detecting a rotation angle of the tilt angle instrument in real time through a photoelectric encoder to generate standard angle data with a time stamp; based on a Kalman filtering algorithm, fusing the data in the dynamic motion model with the standard angle data, calculating an error value of the tilt angle instrument at each sampling time according to a fusion processing result and an angle value output by the tilt angle instrument, correcting the angle value output by the tilt angle instrument based on the error value; based on a difference between the corrected angle value and the standard angle data, constructing a historical error sequence, predicting an error change trend based on the historical error sequence by using a pre-trained neural network, and performing digital calibration on the tilt angle instrument based on a prediction result.
[0181] The processing component 32 can include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component can also be one or more Application-Specific Integrated Circuits (ASIC), Digital Signal Processors (DSP), Digital Signal Process Devices (DSPD), Programmable Logic Devices (PLD), Field Programmable Gate Arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic elements for executing the above method.
[0182] The storage component 31 is configured to store various types of data to support the operation of the terminal. The storage component can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as a random access memory (RAM), a static random access memory (SRAM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a programmable read only memory (PROM), a read only memory (ROM), a magnetic storage, a flash memory, a magnetic disk, or a compact disk.
[0183] Of course, the computing device can also include other components, such as an input / output interface, a display component, a communication component, etc.
[0184] The input / output interface provides an interface between the processing component and peripheral interface modules, which can be output devices, input devices, etc.
[0185] The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, etc.
[0186] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device can be a cloud server, and the processing component, the storage component, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0187] The embodiments of the present application also provide a computer storage medium storing a computer program, and the computer program can implement the above-mentioned Figure 1 A digital calibration method of an inclinometer.
[0188] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0189] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0190] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, and the computer software products can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0191] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A digital calibration method for an inclinometer, characterized in that, include: Acceleration data, angular velocity data, and geomagnetic field data are collected during vehicle operation. Based on the acceleration data, angular velocity data, and geomagnetic field data, a dynamic motion model is established to describe the real-time motion state of the vehicle. The stepper motor in the vehicle is controlled to drive the inclinometer to rotate periodically. The rotation angle of the inclinometer is detected in real time by the photoelectric encoder, and standard angle data with timestamp is generated. Based on the Kalman filter algorithm, the data in the dynamic motion model is fused with the standard angle data. The error value of the inclinometer at each sampling time is calculated based on the fusion processing result and the angle value output by the inclinometer. The angle value output by the inclinometer is then corrected based on the error value. Based on the difference between the corrected angle value and the standard angle data, a historical error sequence is constructed. A pre-trained neural network is used to predict the error change trend based on the historical error sequence. The inclinometer is then digitally calibrated based on the prediction results. The Kalman filter algorithm is used to fuse the data in the dynamic motion model with the standard angle data. Based on the fusion result and the angle value output by the inclinometer, the error value of the inclinometer at each sampling time is calculated, including: Based on the timestamp, the data in the dynamic motion model is matched with the sampling times corresponding to the standard angle data to obtain the correspondence group between the data in the dynamic motion model and the standard angle data at each sampling time; The weight allocation rule is determined according to the corresponding relationship group. Based on the weight allocation rule, the data in the corresponding relationship group at each sampling time is fused using the Kalman filter algorithm. The difference between the fusion processing result and the angle value output by the inclinometer at the corresponding sampling time is taken as the error value at the corresponding sampling time.
2. The method according to claim 1, characterized in that, The step of determining the weight allocation rule based on the corresponding relationship group, and then using the Kalman filter algorithm to fuse the data in the corresponding relationship group at each sampling time based on the weight allocation rule, includes: Based on the corresponding relationship group, calculate the rate of change of the data in the dynamic motion model and the fluctuation range of the standard angle data, and determine the stability index of the rate of change and the fluctuation range; Establish a mapping relationship between the stability index and the weight ratio, and based on the mapping relationship, assign corresponding target weight values to the data in the dynamic motion model and the standard angle data respectively; Based on the target weight values, adjust the process noise covariance matrix and measurement noise covariance matrix in the Kalman filter algorithm; Using the adjusted Kalman filter algorithm, the Kalman gain is calculated based on the predicted and measured system state values at the current moment, and the system state estimate is updated according to the Kalman gain to obtain the fusion processing result.
3. The method according to claim 1, characterized in that, The process involves constructing a historical error sequence based on the difference between the corrected angle value and the standard angle data, using a pre-trained neural network to predict the error change trend based on the historical error sequence, and performing digital calibration of the inclinometer based on the prediction results, including: Calculate the difference between the corrected angle value and the standard angle data at each sampling time, arrange all the differences in chronological order, and construct a historical error sequence; Based on the vehicle motion state corresponding to each data point in the historical error sequence, the historical error sequence is divided into subsequences with different change characteristics, and the feature quantities of the change amplitude and change frequency of the historical error are extracted from each subsequence. Based on the magnitude of the change and the feature quantity, the error change trend is predicted by a pre-trained neural network, and the error change trend is used as the prediction result. The rotation angle of the inclinometer is adjusted based on the error change trend, so as to achieve digital calibration of the inclinometer through the adjusted rotation angle.
4. The method according to claim 3, characterized in that, The step of dividing the historical error sequence into subsequences with different change characteristics based on the vehicle motion state corresponding to each data point in the historical error sequence, and extracting the feature quantities of the change amplitude and change frequency of the historical error from each subsequence, includes: Analyze the vehicle speed, acceleration amplitude, and steering angle corresponding to each data point in the historical error sequence to determine the driving condition type of each data point; Based on the driving condition type, the historical error sequence is divided into subsequences with changing characteristics of constant speed driving, acceleration driving, deceleration driving and turning driving; For each of the subsequences, the difference between the maximum and minimum error values within the subsequence is calculated and used as the magnitude of change; The number of fluctuations within a preset threshold range is counted, and the fluctuation frequency is calculated based on the number of fluctuations and the time interval to obtain the frequency change characteristic quantity. The magnitude of change and the frequency of change are used as feature descriptors for each subsequence.
5. The method according to claim 2, characterized in that, The process of establishing a mapping relationship between the stability index and the weight ratio, and assigning corresponding target weight values to the data in the dynamic motion model and the standard angle data based on the mapping relationship, includes: Set the numerical range of the stability index, divide the numerical range into multiple continuous sub-intervals according to a preset division rule, and set a corresponding basic weight ratio for each sub-interval. For the first stability index of the data in the dynamic motion model, determine the sub-interval where the first stability index is located, and obtain the first initial weight of the data in the dynamic motion model based on the basic weight ratio corresponding to the sub-interval; For the second stability index of the standard angle data, determine the sub-interval where the second stability index is located, and obtain the second initial weight of the standard angle data based on the basic weight ratio corresponding to the sub-interval; The first initial weight and the second initial weight are adjusted respectively to obtain the target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively.
6. The method according to claim 5, characterized in that, The step of adjusting the first initial weight and the second initial weight respectively to obtain the target weight values corresponding to the data in the dynamic motion model and the standard angle data respectively includes: Calculate the sum of the first initial weight and the second initial weight; The ratio of the first initial weight to the sum is used as the first temporary adjustment weight, and the ratio of the second initial weight to the sum is used as the second temporary adjustment weight. If the first temporary adjustment weight is greater than the preset maximum weight value, then the preset maximum weight value is used as the target weight value corresponding to the data in the dynamic motion model, and the difference between the sum and the preset maximum weight value is used as the target weight value corresponding to the standard angle data. Alternatively, if the first temporary adjustment weight is less than the preset minimum weight value, then the preset minimum weight value is used as the target weight value corresponding to the data in the dynamic motion model, and the difference between the sum and the preset minimum weight value is used as the target weight value corresponding to the standard angle data. Alternatively, if the first temporary adjustment weight is between the preset minimum weight value and the preset maximum weight value, then the first temporary adjustment weight is used as the target weight value corresponding to the data in the dynamic motion model, and the second temporary adjustment weight is used as the target weight value corresponding to the standard angle data.
7. A digital calibration system for an inclinometer, characterized in that, include: The data acquisition module is used to collect acceleration data, angular velocity data and geomagnetic field data during vehicle operation, and to establish a dynamic motion model to describe the real-time motion state of the vehicle based on the acceleration data, angular velocity data and geomagnetic field data. The control module is used to control the stepper motor in the vehicle to drive the inclinometer to rotate periodically, and to detect the rotation angle of the inclinometer in real time through the photoelectric encoder to generate standard angle data with timestamps. The fusion module is used to fuse the data in the dynamic motion model with the standard angle data based on the Kalman filter algorithm, calculate the error value of the inclinometer at each sampling time based on the fusion processing result and the angle value output by the inclinometer, and correct the angle value output by the inclinometer based on the error value. The calibration module is used to construct a historical error sequence based on the difference between the corrected angle value and the standard angle data, use a pre-trained neural network to predict the error change trend based on the historical error sequence, and perform digital calibration of the inclinometer based on the prediction results. The Kalman filter algorithm is used to fuse the data in the dynamic motion model with the standard angle data. Based on the fusion result and the angle value output by the inclinometer, the error value of the inclinometer at each sampling time is calculated, including: Based on the timestamp, the data in the dynamic motion model is matched with the sampling times corresponding to the standard angle data to obtain the correspondence group between the data in the dynamic motion model and the standard angle data at each sampling time; The weight allocation rule is determined according to the corresponding relationship group. Based on the weight allocation rule, the data in the corresponding relationship group at each sampling time is fused using the Kalman filter algorithm. The difference between the fusion processing result and the angle value output by the inclinometer at the corresponding sampling time is taken as the error value at the corresponding sampling time.
8. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a digital calibration method for an inclinometer as described in any one of claims 1 to 6.
9. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a computer, implements a digital calibration method for an inclinometer as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Two-axis accelerometer parameter calibration method for tilt angle sensor
CN115877034A
Calibration method and system of high-precision inclination angle measurement sensor
CN120351954A