Disclosure of Invention
In order to solve or partially solve the problems in the related art, the application provides an inertial measurement data compensation method and device based on a neural network model, which can perform slope compensation on inertial measurement data and reduce measurement errors of an inertial measurement unit caused by the slope.
The application provides a method for compensating inertial measurement data based on a neural network model in a first aspect, and the method comprises the following steps:
inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module in the same time period to a neural network model to be trained;
enabling the neural network model to be trained to perform slope compensation on the measurement data sequence according to the position data sequence, outputting an IMU compensation data sequence, calculating to obtain a track point calculation position data sequence of the vehicle according to the IMU compensation data sequence, calculating the position data sequence according to the track point calculation position data sequence of the vehicle, and obtaining the trained neural network model according to the position data sequence;
and inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module into the trained neural network model, and acquiring an IMU compensation data sequence output by the trained neural network model.
Preferably, the step of enabling the neural network model to be trained to perform slope compensation on the measurement data sequence according to the position data sequence, outputting an IMU compensation data sequence, calculating to obtain a trajectory point calculation position data sequence of a vehicle according to the IMU compensation data sequence, and calculating a position data sequence according to a trajectory point calculation position data sequence of the vehicle, the position data sequence, and obtaining the trained neural network model includes:
enabling the neural network model to be trained to obtain the pitch angle of the vehicle at each moment in the same time period according to the position data sequence;
according to the pitch angle of the vehicle at each moment, carrying out gradient compensation on the measurement data sequence, and outputting the IMU compensation data sequence;
calculating to obtain a track point calculated position data sequence of the vehicle according to the IMU compensation data sequence;
and if the error between the track point calculated position data sequence of the vehicle and the position data sequence is smaller than a preset threshold value, stopping the training of the neural network model to be trained, and obtaining the trained neural network model.
Preferably, the method further comprises:
if the error between the calculated position data sequence of the track points of the vehicle and the position data sequence is larger than or equal to the preset threshold value, adjusting the pitch angle of the vehicle at each moment;
according to the adjusted pitch angle of the vehicle at each moment, performing slope compensation on the measurement data of the measurement data sequence at each moment, and outputting an IMU compensation data sequence;
calculating according to the IMU compensation data sequence to obtain a track point calculated position data sequence of the vehicle;
and if the error between the calculated position data sequence of the track points of the vehicle and the position data sequence is smaller than the preset threshold value, stopping training the neural network model to be trained, and obtaining the trained neural network model.
Preferably, the performing slope compensation on the measurement data sequence according to the pitch angle of the vehicle at each time, and outputting the IMU compensation data sequence includes:
and performing gradient compensation on the measurement data of each moment of the measurement data sequence according to the pitch angle of the vehicle at each moment, and outputting the IMU compensation data sequence, wherein the gradient compensation is performed on the measurement data of each moment of the measurement data sequence according to the following formula:
AccY,i = AccY0,i *cosai + AccZ0,i *sinai ;
GyroY,i = GyroY0,i * sinai +GyroZ0,i * cosai ;
in the formula, accY,i Is the compensated acceleration data, acc, of the accelerometer at the Y-axis time i after slope compensationY0,i Is the acceleration data of the accelerometer at time i on the Y-axis, accZ0,i Acceleration data of an accelerometer at a Z-axis time i; gyroY,i Is the compensation angular velocity data of gyroscope Y-axis time i after slope compensation, gyroY0,i Is angular velocity data, gyro, of the gyroscope at time i on the Y-axisZ0,i Is the angular velocity data of the gyroscope at time i on the Z axisi Is the pitch angle at vehicle time i.
A second aspect of the present application provides an apparatus for compensating inertial measurement data based on a neural network model, the apparatus comprising:
the first input module is used for inputting a measurement data sequence of the inertia measurement unit and a position data sequence of the positioning module in the same time period to a neural network model to be trained;
the training module is used for enabling the neural network model to be trained to perform slope compensation on the measurement data sequence input by the first input module according to the position data sequence input by the first input module, outputting an IMU compensation data sequence, calculating to obtain a track point calculation position data sequence of a vehicle according to the IMU compensation data sequence, and obtaining the trained neural network model according to the track point calculation position data sequence of the vehicle and the position data sequence input by the first input module;
and the compensation data acquisition module is used for inputting the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module into the trained neural network model and acquiring the IMU compensation data sequence output by the trained neural network model.
Preferably, the training module comprises:
the angle acquisition submodule is used for enabling the neural network model to be trained to obtain the pitch angle of the vehicle at each moment in the same time period according to the position data sequence input by the first input module;
the compensation submodule is used for carrying out gradient compensation on the measurement data sequence input by the first input module according to the pitch angle of the vehicle at each moment obtained by the angle obtaining submodule and outputting the IMU compensation data sequence;
the track submodule is used for calculating and obtaining a track point calculated position data sequence of the vehicle according to the IMU compensation data sequence obtained by the compensation submodule;
the judgment sub-module is used for judging whether the error between the track point calculated position data sequence of the vehicle obtained by the track sub-module and the position data sequence input by the first input module is smaller than a preset threshold value or not;
and the stopping submodule is used for stopping the training of the neural network model to be trained if the judging submodule judges that the error between the track point calculation position data sequence of the vehicle and the position data sequence is smaller than the preset threshold value, so as to obtain the trained neural network model.
Preferably, the training module further comprises:
the adjusting submodule is used for adjusting the pitch angle of the vehicle at each moment if the judging submodule judges that the error between the track point calculation position data sequence of the vehicle and the position data sequence is larger than or equal to the preset threshold value;
and the compensation submodule is also used for carrying out gradient compensation on the measurement data of each moment of the measurement data sequence input by the first input module according to the pitch angle of the vehicle at each moment after the adjustment of the adjustment submodule, and outputting an IMU compensation data sequence.
Preferably, the compensation submodule is specifically configured to:
and performing slope compensation on the measurement data of each moment of the measurement data sequence according to the pitch angle of the vehicle at each moment, and outputting the IMU compensation data sequence, wherein the compensation submodule performs slope compensation on the measurement data of each moment of the measurement data sequence according to the following formula:
AccY,i = AccY0,i *cosai + AccZ0,i *sinai ;
GyroY,i = GyroY0,i * sinai +GyroZ0,i * cosai ;
in the formula, accY,i Is the compensated acceleration data, acc, of the accelerometer at the Y-axis time i after slope compensationY0,i Is the acceleration data of the accelerometer at time i on the Y-axis, accZ0,i Acceleration data of an accelerometer at a Z-axis moment i; gyroY,i Is the compensated angular velocity data, gyro, of the gyroscope at the Y-axis time i after slope compensationY0,i Is angular velocity data of gyroscope Y-axis time i, gyroZ0,i Is the angular velocity data of the gyroscope at time i on the Z axisi Is the pitch angle at time i of the vehicle.
A third aspect of the present application provides an electronic device, comprising:
a processor; and
a memory having executable code stored thereon which, when executed by the processor, causes the processor to perform the method as described above.
A fourth aspect of the present application provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform a method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the technical scheme, a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module in the same time period are taken as training samples of a neural network model to be trained, the measurement data sequence of the inertia measurement unit is subjected to slope compensation by the neural network model to be trained according to the position data sequence, and an IMU compensation data sequence is output; calculating to obtain a track point calculation position data sequence of the vehicle according to the IMU compensation data sequence, and calculating the position data sequence and the position data sequence according to the track point of the vehicle to obtain a trained neural network model; inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module into the trained neural network model, and acquiring an IMU compensation data sequence output by the trained neural network model; the method can perform slope compensation on the measurement data of the inertial measurement unit based on the neural network model, reduce the measurement error of the inertial measurement unit caused by the slope, and obtain the IMU compensation data sequence of the inertial measurement unit with the reduced measurement error.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While embodiments of the present application are illustrated in the accompanying drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
The embodiment of the application provides an inertia measurement data compensation method based on a neural network model, which can perform slope compensation on inertia measurement data and reduce measurement errors of an inertia measurement unit caused by slope.
The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The first embodiment is as follows:
fig. 1 is a schematic flowchart of an inertial measurement data compensation method based on a neural network model according to an embodiment of the present application.
Referring to fig. 1, an inertial measurement data compensation method based on a neural network model includes:
instep 101, a measurement data sequence of the inertial measurement unit and a position data sequence of the positioning module in the same time period are input to the neural network model to be trained.
In a specific implementation mode, an inertia measurement unit and a positioning module are arranged on the vehicle. The inertial measurement unit comprises an accelerometer and a gyroscope, and the measurement data of the inertial measurement unit comprises the acceleration of the accelerometer of the inertial measurement unit and the angular velocity of the gyroscope. The acceleration of the vehicle, which may be obtained by an accelerometer of the inertial measurement unit, and the angular velocity of the vehicle, which may be obtained by a gyroscope of the inertial measurement unit. The positioning module may include, but is not limited to, at least one of a GPS satellite module, a beidou satellite positioning module, an RTK (Real 8194; time 8194; kinematic, real Time Kinematic) positioning module, and the like. Positioning information of the vehicle, which may include, but is not limited to, position data, speed information, and attitude information, may be obtained using the positioning module. Location data includes, but is not limited to, three-dimensional data describing a location: longitude coordinates, latitude coordinates, and altitude, and attitude information including, but not limited to, heading angle information describing a heading.
In one embodiment, in the case where a vehicle RTK positioning module signal is available, positioning information for a time segment of the vehicle is obtained, and a sequence of position data for the time segment of the vehicle is obtained based on the positioning information for the time segment of the vehicle. When the RTK positioning module is used for acquiring a position data sequence of a vehicle in a time period, the inertial measurement unit is used for acquiring a measurement data sequence of the vehicle in the same time period, wherein the measurement data sequence comprises accelerations of an X axis, a Y axis and a Z axis of an accelerometer and angular velocities of an X axis, a Y axis and a Z axis of a gyroscope. And inputting a measurement data sequence of the inertia measurement unit and a position data sequence of the positioning module in the same time period into the neural network model to be trained.
It can be understood that, when the position data sequence of the positioning module is acquired, the measurement data sequence of the inertial measurement unit is acquired at the same time, and the position data sequence of the positioning module and the measurement data sequence of the inertial measurement unit are aligned in time, so as to avoid inaccurate results due to different reference times of the positioning module and the inertial measurement unit.
Instep 102, the neural network model to be trained performs slope compensation on the measurement data sequence according to the position data sequence, outputs an IMU compensation data sequence, calculates to obtain a trajectory point calculation position data sequence of the vehicle according to the IMU compensation data sequence, calculates the position data sequence and the position data sequence according to the trajectory point of the vehicle, and obtains a trained neural network model.
In a specific implementation mode, a neural network model to be trained is used for carrying out slope compensation on measurement data of each moment of a measurement data sequence of an inertia measurement unit according to position data of each moment of the position data sequence of an RTK positioning module, obtaining IMU compensation data of each moment in the same time period, and outputting the IMU compensation data sequence; acquiring an initial pose according to a position data sequence of the RTK positioning module; calculating track point calculated position data of the vehicle at each moment in the same time period according to the initial pose and the IMU compensation data at each moment in the same time period, so as to obtain a track point calculated position data sequence of the vehicle in the same time period; and converging the trajectory point calculation position data of the vehicle at each same moment in the same time period to the position data of the positioning module, finishing the training of the neural network model to be trained, and obtaining the trained neural network model.
Instep 103, the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module are input to the trained neural network model, and an IMU compensation data sequence output by the trained neural network model is obtained.
In a specific embodiment, a measurement data sequence of an inertial measurement unit and a position data sequence of a positioning module are input into a trained neural network model, the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module are obtained synchronously, the measurement data sequence of the inertial measurement unit at least comprises two pieces of measurement data, and the position data sequence of the positioning module at least comprises two pieces of position data. The neural network model carries out slope compensation on the input measurement data of the inertial measurement unit at each moment, IMU compensation data at each moment are output, the IMU compensation data at each moment output by the trained neural network model are obtained, the IMU compensation data output by the neural network model are used as the measurement data of the vehicle after slope compensation, an IMU compensation data sequence is obtained, and compensation of the measurement data of the inertial measurement unit is completed.
According to the inertial measurement data compensation method based on the neural network model, a measurement data sequence of an inertial measurement unit and a position data sequence of a positioning module in the same time period are taken as training samples of the neural network model to be trained, slope compensation is carried out on the measurement data sequence of the inertial measurement unit by the neural network model to be trained according to the position data sequence, and an IMU compensation data sequence is output; calculating to obtain a track point calculation position data sequence of the vehicle according to the IMU compensation data sequence, and calculating the position data sequence and the position data sequence according to the track point of the vehicle to obtain a trained neural network model; inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module into the trained neural network model, and acquiring an IMU compensation data sequence output by the trained neural network model; the method can compensate the gradient of the measurement data of the inertial measurement unit based on the neural network model, reduce the measurement error of the inertial measurement unit caused by the gradient, obtain the IMU compensation data of the inertial measurement unit with the reduced measurement error, and improve the positioning and navigation precision of the integrated navigation system when the integrated navigation system comprising the positioning module and the inertial measurement unit is used for positioning and navigation.
Example two:
fig. 2 is another schematic flow chart of an inertial measurement data compensation method based on a neural network model according to an embodiment of the present application. Fig. 2 depicts the solution of the present application in more detail with respect to fig. 1.
Referring to fig. 2, a method for compensating inertial measurement data based on a neural network model includes:
instep 201, a measurement data sequence of the inertial measurement unit and a position data sequence of the positioning module in the same time period are input into the neural network model to be trained.
This step can be referred to the description ofstep 101, and is not described here.
Instep 202, the neural network model to be trained is made to obtain the pitch angle of the vehicle at each moment in the same time period according to the position data sequence.
In a specific implementation mode, a neural network model to be trained obtains longitude coordinates, latitude coordinates and height of a vehicle at each moment in the same time period according to an input position data sequence of a positioning module; and calculating the pitch angle of the vehicle at each moment in the same time period according to the longitude coordinate, the latitude coordinate and the height of the vehicle at each moment in the same time period.
Instep 203, slope compensation is performed on the measurement data sequence according to the pitch angle of the vehicle at each moment, and an IMU compensation data sequence is output.
In one embodiment, the inertial measurement unit is fixed to the vehicle, and the Y-axis of the accelerometer and gyroscope of the inertial measurement unit is oriented from the rear of the vehicle toward the front, parallel to the front-rear direction of the vehicle; the Z-axis of the accelerometer and gyroscope is oriented from below the vehicle to above, parallel to the up-down direction of the vehicle. The pitch angle a is an angle between the front and rear directions and the horizontal plane when the vehicle is running. The acceleration and the angular speed of the advancing direction of the vehicle are measured by the Y axis of the accelerometer and the gyroscope, and the acceleration Acc of the advancing direction of the vehicle is obtainedY And angular velocity GyroY (ii) a The Z-axis of the accelerometer and gyroscope measures the acceleration and angular velocity of the vehicle in the up-down direction to obtain the up-down motion of the vehicle (i.e. the vehicle is moving up or down a slope)Acceleration AccZ And angular velocity GyroZ . Acceleration Acc of vehicle heading directionY And angular velocity GyroY Is greatly affected by the road gradient. Therefore, in the embodiment of the present application, the acceleration Acc of the vehicle forward directionY And angular velocity GyroY And (6) compensating.
In one embodiment, the IMU compensation data sequence is output by performing slope compensation on the measurement data of each moment of the measurement data sequence according to the pitch angle of the vehicle at each moment, wherein the slope compensation is performed on the measurement data of each moment of the measurement data sequence according to the following formula:
AccY,i = AccY0,i *cosai + AccZ0,i *sinai ;
Y,i = GyroY0,i * sinai +GyroZ0,i * cosai ;
in the formula, accY,i Is the compensated acceleration data, acc, of the accelerometer at the Y-axis time i after slope compensationY0,i Is the acceleration data of the accelerometer at time i on the Y-axis, accZ0,i Acceleration data of an accelerometer at a Z-axis time i; gyroY,i Is the compensated angular velocity data, gyro, of the gyroscope at the Y-axis time i after slope compensationY0,i Is angular velocity data, gyro, of the gyroscope at time i on the Y-axisZ0,i Is angular velocity data of gyroscope Z-axis time i, ai Is the pitch angle at vehicle time i.
Instep 204, a trajectory point estimated position data sequence of the vehicle is estimated and obtained according to the IMU compensation data sequence.
In a specific embodiment, the initial pose of the vehicle is obtained according to the positioning information of the RTK positioning module at the initial time in the same time period, and the initial pose of the vehicle comprises the position information, the course angle information and the speed information of the vehicle at the initial time; and calculating to obtain track point calculated position data of the vehicle at each moment in the same time period according to the initial pose of the vehicle and IMU compensation data at each moment in the same time period, so as to obtain a track point calculated position data sequence of the vehicle in the same time period.
Instep 205, it is determined whether an error between the trajectory point estimated position data sequence and the position data sequence of the vehicle is smaller than a preset threshold; if the error between the track point calculated position data sequence and the position data sequence of the vehicle is greater than or equal to the preset threshold, executingstep 206; if the error between the sequence of the estimated position data and the sequence of the position data of the track point of the vehicle is smaller than the preset threshold,step 207.
In a specific embodiment, the error between the track point estimated position data sequence and the position data sequence of the vehicle in the same time period is obtained according to the track point estimated position data of the vehicle in the same time period and each same moment of the position data sequence of the positioning module in the same time period and each same moment. Judging whether the error between the track point calculated position data sequence and the position data sequence of the vehicle is smaller than a preset threshold value or not; if the error between the track point calculated position data sequence and the position data sequence of the vehicle is greater than or equal to the preset threshold, executingstep 206; if the error between the sequence of the estimated position data and the sequence of the position data of the track point of the vehicle is smaller than the preset threshold,step 207. It can be understood that the trace point estimated position data and the position data of the positioning module at each same time in the same time period are aligned in time.
Instep 206, adjusting the pitch angle of the vehicle at each moment;step 203 is performed.
In a specific embodiment, if the error between the track point estimated position data sequence and the position data sequence of the vehicle is greater than or equal to a preset threshold, the pitch angle of the vehicle at each moment can be adjusted according to a set angle range, and the pitch angle of the vehicle at each moment in the same time period is obtained again; and (5) circularly executing thesteps 203, 204, 205 and 206 until the error between the calculated position data sequence and the position data sequence of the track point of the vehicle is smaller than a preset threshold value, and finishing the training of the neural network model to be trained.
Instep 207, the training of the neural network model to be trained is stopped, and a trained neural network model is obtained.
In a specific embodiment, if the error between the trajectory point calculated position data sequence of the vehicle and the position data sequence of the positioning module is smaller than a preset threshold, stopping the training of the neural network model to be trained, i.e. completing the training of the neural network model to be trained, and obtaining the trained neural network model.
Instep 208, the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module are input to the trained neural network model, and an IMU compensation data sequence output by the trained neural network model is obtained.
In one specific embodiment, an acceleration sequence and an angular velocity sequence of the vehicle and a position data sequence of the positioning module are input into the trained neural network model, the acceleration sequence at least comprises accelerations at two moments, the angular velocity sequence at least comprises angular velocities at two moments, and the position data sequence of the positioning module at least comprises position data at two moments. And performing slope compensation on the input acceleration sequence and the input angular velocity sequence of the vehicle by the trained neural network model according to the input position data sequence, outputting the compensation acceleration data and the compensation angular velocity data at each moment, acquiring the compensation acceleration data and the compensation angular velocity data at each moment output by the trained neural network model, taking the compensation acceleration data and the compensation angular velocity data output by the neural network model as the acceleration and the angular velocity of the vehicle after slope compensation, acquiring the compensation acceleration data sequence and the compensation angular velocity data sequence, and completing the compensation of the measurement data sequence of the inertial measurement unit.
According to the inertial measurement data compensation method based on the neural network model, the neural network model to be trained obtains the pitch angle of the vehicle at each moment in the same time period according to the position data sequence; according to the pitch angle of the vehicle at each moment, carrying out slope compensation on the measured data sequence, and outputting an IMU compensation data sequence; calculating according to the IMU compensation data sequence to obtain a track point calculation position data sequence of the vehicle; if the error between the track point calculated position data sequence of the vehicle and the position data sequence is larger than or equal to a preset threshold value, adjusting the pitch angle of the vehicle at each moment; according to the adjusted pitch angle of the vehicle at each moment, a track point calculated position data sequence of the vehicle is obtained again; completing the training of the neural network model to be trained until the error between the calculated position data sequence and the position data sequence of the track points of the vehicle is smaller than a preset threshold value, and obtaining the trained neural network model; inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module into the trained neural network model, and acquiring an IMU compensation data sequence output by the trained neural network model; the pitch angle of the vehicle at each moment is adjusted in a circulating mode, a trained neural network model with higher precision can be obtained, slope compensation can be performed on the measurement data of the inertia measurement unit based on the trained neural network model, and measurement errors of the inertia measurement unit caused by the slope of the road are reduced to the maximum extent.
Example three:
corresponding to the embodiment of the application function implementation method, the application also provides an inertial measurement data compensation device based on the neural network model, an electronic device and a corresponding embodiment.
Fig. 3 is a schematic structural diagram of an inertial measurement data compensation device based on a neural network model according to an embodiment of the present application.
Referring to fig. 3, an inertial measurement data compensation apparatus based on a neural network model includes a first input module 301, a training module 302, and a compensation data obtaining module 303.
The first input module 301 is configured to input a measurement data sequence of the inertial measurement unit and a position data sequence of the positioning module in the same time period to the neural network model to be trained.
In a specific implementation mode, an inertia measurement unit and a positioning module are arranged on the vehicle. The inertial measurement unit comprises an accelerometer and a gyroscope, and the measurement data of the inertial measurement unit comprises the acceleration of the accelerometer of the inertial measurement unit and the angular velocity of the gyroscope. The first input module 301 may obtain the acceleration of the vehicle through an accelerometer of the inertial measurement unit, and obtain the angular velocity of the vehicle through a gyroscope of the inertial measurement unit. The positioning module may include, but is not limited to, at least one of a GPS satellite module, a beidou satellite positioning module, an RTK positioning module, and the like. The first input module 301 may obtain location information of the vehicle using a location module, which may include, but is not limited to, position data, speed information, and attitude information. Location data includes, but is not limited to, three-dimensional data describing a location: longitude coordinates, latitude coordinates, and altitude, and attitude information including, but not limited to, heading angle information describing a heading.
In one embodiment, in the case where the vehicle RTK positioning module signal is available, the first input module 301 obtains positioning information of the vehicle for a time period, and obtains a position data sequence of the vehicle for the time period according to the positioning information of the vehicle for the time period. When the RTK positioning module acquires a position data sequence of a vehicle in a time period, the first input module 301 acquires a measurement data sequence of the vehicle in the same time period through the inertial measurement unit, where the measurement data sequence includes accelerations of an accelerometer X axis, a Y axis, and a Z axis and angular velocities of a gyroscope X axis, a Y axis, and a Z axis. The first input module 301 inputs the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module in the same time period to the neural network model to be trained.
The training module 302 is configured to perform slope compensation on the measurement data sequence input by the first input module 301 by using the neural network model to be trained according to the position data sequence input by the first input module 301, output an IMU compensation data sequence, calculate and obtain a track point calculated position data sequence of the vehicle according to the IMU compensation data sequence, and obtain a trained neural network model according to the track point calculated position data sequence of the vehicle and the position data sequence input by the first input module.
In a specific embodiment, the training module 302 makes the neural network model to be trained perform slope compensation on the measurement data at each moment of the measurement data sequence of the inertial measurement unit input by the first input module 301 according to the position data at each moment of the position data sequence of the RTK positioning module input by the first input module 301, obtains IMU compensation data at each moment in the same time period, and outputs an IMU compensation data sequence; acquiring an initial pose according to the position data sequence of the RTK positioning module input by the first input module 301; calculating track point calculated position data of the vehicle at each moment in the same time period according to the initial pose and the IMU compensation data at each moment in the same time period, so as to obtain a track point calculated position data sequence of the vehicle in the same time period; and converging the trajectory point calculated position data of the vehicle at each same moment in the same time period to the position data of the positioning module input by the first input module 301, finishing the training of the neural network model to be trained, and obtaining the trained neural network model.
In one embodiment, the training module 302 includes an angle acquisition sub-module 3021, a compensation sub-module 3022, a trajectory sub-module 3023, a determination sub-module 3024, an adjustment sub-module 3025, and a stop sub-module 3026.
The angle obtaining submodule 3021 is configured to enable the neural network model to be trained to obtain a pitch angle of the vehicle at each time in the same time period according to the position data sequence input by the first input module 301.
In a specific embodiment, the angle obtaining sub-module 3021 enables the neural network model to be trained to obtain the longitude coordinate, the latitude coordinate, and the altitude of the vehicle at each time in the same time period according to the position data sequence of the positioning module input by the first input module 301; and calculating the pitch angle of the vehicle at each moment in the same time period according to the longitude coordinate, the latitude coordinate and the height of the vehicle at each moment in the same time period.
And the compensation submodule 3022 is configured to perform slope compensation on the measurement data sequence input by the first input module 301 according to the pitch angle of the vehicle at each time obtained by the angle obtaining submodule 3021, and output an IMU compensation data sequence.
In one embodiment, the inertial measurement unit is fixed to the vehicle, and the Y-axis of the accelerometer and gyroscope of the inertial measurement unit is oriented from the rear of the vehicle toward the front, parallel to the front-rear direction of the vehicle; the Z-axis of the accelerometer and gyroscope is oriented from below the vehicle to above, parallel to the up-down direction of the vehicle. The pitch angle a is an angle between the front and rear directions and the horizontal plane when the vehicle is running. Y-axis measurement of accelerometers and gyroscopesMeasuring the acceleration and the angular speed of the vehicle forward direction to obtain the acceleration Acc of the vehicle forward directionY And angular velocity GyroY (ii) a The acceleration Acc of the up-and-down movement of the vehicle (i.e. the vehicle going up or down a slope) is obtained by measuring the acceleration and angular velocity of the vehicle in the up-and-down direction on the Z axis of the accelerometer and gyroscopeZ And angular velocity GyroZ . Acceleration Acc of vehicle heading directionY And angular velocity GyroY Is greatly affected by the road gradient. Therefore, in the embodiment of the present application, the acceleration Acc of the vehicle forward directionY And angular velocity GyroY And (6) compensating.
In one embodiment, the compensation submodule 3022 performs slope compensation on the measurement data at each time of the measurement data sequence according to the pitch angle of the vehicle at each time obtained by the angle obtaining submodule 3021, and outputs an IMU compensation data sequence, wherein the compensation submodule 3022 performs slope compensation on the measurement data at each time of the measurement data sequence according to the following formula:
AccY,i = AccY0,i *cosai + AccZ0,i *sinai ;
GyroY,i = GyroY0,i * sinai +GyroZ0,i * cosai ;
in the formula, accY,i Is the compensated acceleration data, acc, of the accelerometer at the Y-axis time i after slope compensationY0,i Is the acceleration data of the accelerometer at time i on the Y-axis, accZ0,i Acceleration data of an accelerometer at a Z-axis time i; gyroY,i Is the compensation angular velocity data of gyroscope Y-axis time i after slope compensation, gyroY0,i Is angular velocity data of gyroscope Y-axis time i, gyroZ0,i Is the angular velocity data of the gyroscope at time i on the Z axisi Is the pitch angle at time i of the vehicle.
And the track submodule 3023 is configured to calculate and obtain a track point calculated position data sequence of the vehicle according to the IMU compensation data sequence obtained by the compensation submodule 3022.
In a specific embodiment, the trajectory sub-module 3023 obtains an initial pose of the vehicle according to the positioning information of the RTK positioning module input by the first input module 301 at the initial time of the same time period, where the initial pose of the vehicle includes position information, heading angle information, and speed information of the vehicle at the initial time; according to the initial pose of the vehicle and the IMU compensation data of each time in the same time period, which are obtained by the compensation submodule 3022, the trajectory point calculated position data of the vehicle at each time in the same time period is calculated, so that a trajectory point calculated position data sequence of the vehicle in the same time period is obtained.
The judgment submodule 3024 is configured to judge whether an error between the trajectory point estimated position data sequence of the vehicle obtained by the trajectory submodule 3023 and the position data sequence input by the first input module 301 is smaller than a preset threshold.
An adjusting submodule 3025 configured to adjust the pitch angle of the vehicle at each time if the judging submodule 3024 judges that the error between the trajectory point estimated position data sequence of the vehicle and the position data sequence is greater than or equal to a preset threshold value.
In a specific embodiment, the determining submodule 3024 obtains an error between the estimated trajectory point position data sequence and the position data sequence of the vehicle in the same time period according to the estimated trajectory point position data of the vehicle in the same time period obtained by the trajectory submodule 3023, and the position data of the positioning module in the same time period. The judgment sub-module 3024 judges whether the error between the track point estimated position data sequence and the position data sequence of the vehicle is smaller than a preset threshold; if the judging submodule 3024 judges that the error between the track point estimated position data sequence and the position data sequence of the vehicle is greater than or equal to the preset threshold, the adjusting submodule 3025 adjusts the pitch angle of the vehicle at each moment; if the judging submodule 3024 judges that the error between the calculated position data sequence and the position data sequence of the trajectory point of the vehicle is smaller than the preset threshold, the stopping submodule 3026 stops the training of the neural network model to be trained, and obtains the trained neural network model. It can be understood that the estimated position data of the track points and the position data of the positioning module at each same time in the same time period are aligned in time.
In one embodiment, if the determining submodule 3024 determines that the track point estimated position data sequence of the vehicle has an error greater than or equal to a preset threshold value with respect to the position data sequence, the adjusting submodule 3025 may adjust the pitch angle of the vehicle at each time according to the set angle range, and obtain the pitch angle of the vehicle at each time in the same time period again; the compensation submodule 3022, the trajectory submodule 3023, the judgment submodule 3024, and the adjustment submodule 3025 are cyclically executed until the judgment submodule 3024 judges that the error between the trajectory point calculated position data sequence and the position data sequence of the vehicle is smaller than the preset threshold value, and the training of the neural network model to be trained is completed.
And the stopping submodule 3026 is configured to, if the judging submodule 3024 judges that the error between the trajectory point calculated position data sequence and the position data sequence of the vehicle is smaller than the preset threshold, stop the training of the neural network model to be trained, and obtain the trained neural network model.
In a specific embodiment, if the determining submodule 3024 determines that the error between the trajectory point calculated position data sequence of the vehicle and the position data sequence of the positioning module is smaller than the preset threshold, the stopping submodule 3026 stops the training of the neural network model to be trained, that is, completes the training of the neural network model to be trained, and obtains the trained neural network model.
And the compensation data acquisition module 303 is configured to input the measurement data sequence of the inertial measurement unit and the position data sequence of the positioning module into the trained neural network model, and acquire an IMU compensation data sequence output by the trained neural network model.
In one embodiment, the compensation data acquiring module 303 acquires an acceleration sequence of the vehicle through an accelerometer of the inertial measurement unit, acquires an angular velocity sequence of the vehicle through a gyroscope of the inertial measurement unit, and acquires a position data sequence of the vehicle through an RTK positioning module. The acceleration, angular velocity and position data sequences are acquired synchronously. The compensation data obtaining module 303 inputs an acceleration sequence and an angular velocity sequence of the vehicle and a position data sequence of the positioning module to the trained neural network model, wherein the acceleration sequence at least includes accelerations at two moments, the angular velocity sequence at least includes angular velocities at two moments, and the position data sequence of the positioning module at least includes position data at two moments. And performing slope compensation on the input acceleration sequence and the input angular velocity sequence of the vehicle by the trained neural network model according to the input position data sequence, outputting the compensation acceleration data and the compensation angular velocity data at each moment, acquiring the compensation acceleration data and the compensation angular velocity data at each moment output by the trained neural network model, taking the compensation acceleration data and the compensation angular velocity data output by the neural network model as the acceleration and the angular velocity of the vehicle after slope compensation, acquiring the compensation acceleration data sequence and the compensation angular velocity data sequence, and completing the compensation of the measurement data of the inertial measurement unit.
According to the technical scheme provided by the embodiment of the application, the neural network model to be trained obtains the pitch angle of the vehicle at each moment in the same time period according to the position data sequence; according to the pitch angle of the vehicle at each moment, carrying out gradient compensation on the measured data sequence, and outputting an IMU compensation data sequence; calculating according to the IMU compensation data sequence to obtain a track point calculation position data sequence of the vehicle; if the error between the track point calculated position data sequence of the vehicle and the position data sequence is larger than or equal to a preset threshold value, adjusting the pitch angle of the vehicle at each moment; according to the adjusted pitch angle of the vehicle at each moment, a track point calculated position data sequence of the vehicle is obtained again; completing the training of the neural network model to be trained until the error between the calculated position data sequence and the position data sequence of the track points of the vehicle is smaller than a preset threshold value, and obtaining the trained neural network model; inputting a measurement data sequence of an inertia measurement unit and a position data sequence of a positioning module into the trained neural network model, and acquiring an IMU compensation data sequence output by the trained neural network model; the pitch angle of the vehicle at each moment is adjusted in a circulating mode, a trained neural network model with higher precision can be obtained, slope compensation can be performed on the measurement data of the inertia measurement unit based on the trained neural network model, and measurement errors of the inertia measurement unit caused by the slope of the road are reduced to the maximum extent.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Fig. 4 is a schematic structural diagram of an electronic device shown in an embodiment of the present application.
Referring to fig. 4, the electronic device 40 includes a memory 401 and a processor 402.
The Processor 402 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 401 may include various types of storage units, such as a system memory, a Read Only Memory (ROM), and a permanent storage device. Wherein the ROM may store static data or instructions for the processor 402 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 401 may comprise any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash, programmable read only memory), magnetic and/or optical disks may also be employed. In some embodiments, memory 401 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, min SD card, micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 401 has stored thereon executable code which, when processed by the processor 402, may cause the processor 402 to perform some or all of the methods described above.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) that, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform some or all of the steps of the above-described methods according to the present application.
The foregoing description of the embodiments of the present application has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.