Navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer
Technical Field
The invention relates to the technical field of navigation, in particular to a navigation algorithm based on INS inertial navigation, GPS navigation and a magnetometer.
Background
In the aspect of navigation technology, the most applications are achieved at present, and the most mature navigation modes comprise INS inertial navigation and satellite navigation. The GPS satellite navigation has the advantages of being global, all-weather and high in long-time positioning accuracy, but has the defects that signals are easy to interfere and shield, the signal quality is poor in a strong electromagnetic environment and when high-rise shielding exists, the output frequency is limited, generally 1-10 Hz, the output is discontinuous, and the defects of the GPS satellite navigation are highlighted in occasions needing quick information updating, such as unmanned aerial vehicle systems with high requirements on maneuverability and real-time performance. The INS inertial navigation system is a fully autonomous navigation mode, so that the system has strong concealment and anti-interference capability, continuous output information and high positioning accuracy in a short time. However, due to the characteristics of the MEMS-INS device, the gyroscope and the accelerometer have errors such as initial zero offset and random drift, and the errors become larger and larger with the cumulative effect of time, so that the positioning accuracy is poor for a long time, and finally the attitude and position information of the unmanned aerial vehicle cannot be accurately reflected.
Disclosure of Invention
The invention aims to solve the technical problem of providing a navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer, which can accurately obtain the attitude and position information of a carrier.
The technical scheme adopted by the invention for solving the technical problems is as follows: the navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer comprises the following steps:
A. measuring carrier angular velocity parameters by using gyroscope of INS inertial navigation systemSubstituting into quaternion differential equation to obtain quaternion q0,q1,q2,q3(ii) a WhereinThe angular velocity information of three axes measured by a gyroscope under the coordinate system of the carrier;
the quaternion differential equation is:
B. q solved in step A0,q1,q2,q3Substituting the following formula to obtain an attitude matrix
According to the followingRelation with direction cosine
Calculating the attitude angles theta, gamma and gamma of the INS inertial navigation module of the carrier,
C. Yaw angle measured by magnetometerReplacing the calculated yaw angle in the step B
D. Measuring an acceleration parameter f of an accelerometer of an INS inertial navigation systembAnd B, solving to obtain an attitude matrixSubstituting the velocity information v of the carrier in the east, north and sky directions under an INS inertial navigation coordinate system to obtain velocity information vNvEvUThe differential equation is:
wherein v isn=[vNvEvU]' are the velocities in the east, north and sky directions of the INS inertial navigation coordinate system respectively,is the angular velocity of the earth's rotation,is the angular velocity g of the carrier in each axial direction around the INS inertial navigation coordinate systemnIs the acceleration of gravity;
E. v calculated in step DNvEvURespectively substituting the position information of the carrier in the INS inertial navigation system into the following formula to obtain the position information of the carrier in the INS inertial navigation system, wherein L is latitude, lambda is longitude, and h is height,
h=h(0)+∫vUdt, where L (0) represents the latitude value of the initial position of the carrier, λ (0) represents the longitude value of the initial position of the carrier, and h (0) represents the initial height of the carrier from the earth's surface. RMRepresenting the radius of curvature, R, in the meridian of the earthNRepresenting the radius of curvature over a circle of latitude;
F. establishing an equation of stateAnd observation equation Z (t) ═ H (t) XI(t)+V(t),
XI(t) represents the error state of the INS inertial navigation system at time t, which is a 15-dimensional vector as follows:
vx,vy,vzthe velocity error of the INS inertial navigation system along the east, north and sky directions; phi is ax,φy,φzIs the attitude angle error of the carrier; l, lambda and h respectively represent latitude, longitude and altitude errors of the carrier;x,y,zrespectively representing the random drift of the gyroscope;respectively, random drift of the accelerometer, whereinIs a matrix of 15 × 15, wherein FN(t) corresponds to vx,vy,vz,φx,φy,φzThe non-zero elements of the INS inertial navigation system matrix of the 9 parameters L, λ, h are as follows:
F(1,5)=-fzF(1,6)=fy
F(2,4)=fzF(2,6)=-fx
F(3,4)=-fyF(3,5)=fxF(3,7)=-2ωievxsinL
F(5,7)=-ωiesinL
F(9,3)=1
FS(t) is vx,vy,vz,φx,φy,φzThe transformation matrix between the 9 parameters L, λ, h and the gyro and accelerometer drifts, whose dimensions are 9 × 6,
FM(t) isx,y,z,The INS inertial navigation system matrix, corresponding to the gyroscope and accelerometer drifts, is a diagonal matrix with dimensions 6 × 6, as follows:
FM(t)=diag[-1/Tgx-1/Tgy-1/Tgz-1/Tax-1/Tay-1/Taz](ii) a Wherein, TgxTime constant, T, of error model representing x-axis of gyroscopegyTime constant, T, of error model representing y-axis of gyroscopegzTime constant, T, of error model representing z-axis of gyroscopeaxTime constant, T, representing an error model of the accelerometer x-axisayRepresenting time of accelerometer y-axis error modelConstant, TazA time constant representing a z-axis error model of the accelerometer;
GI(t)=diag[1 1 1......1 1]15×15;
WI(t) is a 15-dimensional vector, as follows:
WI(t)=[a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15],
a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15representing a systematic process noise sequence;
z (t) is the difference value of the position and the velocity information of the carrier in the INS inertial navigation system and the position and the velocity information of the carrier in the GPS navigation system, is a 6-dimensional vector,
Z(t)=[vx+Nvxvy+Nvyvz+Nvz(RM+h)L+Ny(RM+h)cosLλ+Nxh+Nh]Twherein N isvxIndicating the speed error of the GPS navigation system in the x direction, NvyIndicating the speed error of the GPS navigation system in the y-direction, NvzRepresenting the speed error of the GPS navigation system in the z direction, NxIndicating the position error of the GPS navigation system in the x direction, NyIndicating the position error of the GPS navigation system in the y-direction, NhIndicating a position error of the GPS navigation system in the z direction;
wherein
Vv(t)=[NvxNvyNvz]T
Vp(t)=[NxNyNz]T
G. Using the above obtained continuous equation of stateDiscretizing to obtain Xk=Φk,k-1Xk-1+Wk-1Wherein
The continuous observation equation z (t) ═ h (t) X obtained aboveIDiscretizing (t) + V (t) to obtain Zk=HkXk+Vk;
Wherein I is an identity matrix, F is a state transition matrix of the INS inertial navigation system, and delta t is sampling time of the discretized INS inertial navigation system;
H. subtracting the position and speed information of the carrier in the INS inertial navigation system from the position and speed information of the carrier in the GPS navigation system to obtain observation information z of Z (t) at the moment k;
I. calculating the optimal estimated value of the state of the INS inertial navigation system at the k moment Wherein, for an optimal estimate of the state of the INS inertial navigation system at time k-1,Qk-1is the noise matrix of the INS inertial navigation system, the size of which is determined by the performance of the INS inertial navigation elements, Rkis a variance matrix of system measurement noise, the size of which is determined by the performance of the GPS receiver;
J. will be calculatedThe value is differed with the position and speed information of the carrier in the INS inertial navigation system to obtain the optimal navigation parameter;
K. and repeating the steps H-J to obtain the navigation information parameters of the continuous carrier.
The invention has the beneficial effects that: the navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer utilizes the method of INS inertial navigation and GPS navigation combined navigation to solve the defects that a single GPS navigation technology is easy to interfere and shield, the short-time positioning precision is not high, the output frequency is limited and the output is discontinuous; meanwhile, the defects that the accumulated error of a single INS inertial navigation parameter is larger and the long-time positioning accuracy is dispersed are solved, and the defect that the accumulated error of the INS inertial navigation is dispersed along with the increase of time is made up by utilizing the advantage that the GPS navigation has high positioning accuracy for a long time; the method overcomes the defects that the GPS is easy to interfere and the output frequency is limited by utilizing the characteristics that the INS inertial navigation is not interfered by the outside and the output navigation information is continuous, and corrects the navigation angle calculated by the magnetometer to obtain the geographical true north direction and the stable navigation angle in order to solve the problems that the true north cannot be found by the navigation angle calculated by the inertial navigation and the drift is large.
Drawings
FIG. 1 is a latitude error value calculated by a navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer according to the present invention;
FIG. 2 is a latitude error variance value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer according to the present invention;
FIG. 3 is a longitude error value calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention;
FIG. 4 is a longitude error variance calculated based on the inertial navigation system of INS, the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention;
FIG. 5 is a calculated altitude error value based on the INS inertial navigation, the GPS navigation, and the magnetometer navigation algorithm of the present invention;
FIG. 6 is a calculated altitude error variance value based on the INS inertial navigation, the GPS navigation, and the navigation algorithm of the magnetometer, in accordance with the present invention;
FIG. 7 is an east velocity error value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation, and magnetometer, in accordance with the present invention;
FIG. 8 is an east velocity error variance value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation, and magnetometer, in accordance with the present invention;
FIG. 9 is a north velocity error value calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention;
FIG. 10 is a calculated variance value of the north velocity error based on the INS inertial navigation, the GPS navigation, and the navigation algorithm of the magnetometer, in accordance with the present invention;
FIG. 11 is a calculated value of the sky-direction velocity error based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer;
FIG. 12 is a direction of the sky velocity error variance calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention.
Detailed Description
The navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer comprises the following steps:
A. measuring carrier angular velocity parameters by using gyroscope of INS inertial navigation systemSubstituting into quaternion differential equation to obtain quaternion q0,q1,q2,q3(ii) a WhereinThe angular velocity information of three axes measured by a gyroscope under the coordinate system of the carrier;
the quaternion differential equation is:
B. q solved in step A0,q1,q2,q3Substituting the following formula to obtain an attitude matrix
According to the followingRelation with direction cosine
Calculating the attitude angles theta, gamma and gamma of the INS inertial navigation module of the carrier,
C. Yaw angle measured by magnetometerReplacing the calculated yaw angle in the step B
D. Measuring an acceleration parameter f of an accelerometer of an INS inertial navigation systembAnd B, solving to obtain an attitude matrixSubstituting the velocity information v of the carrier in the east, north and sky directions under an INS inertial navigation coordinate system to obtain velocity information vNvEvUThe differential equation is:
wherein v isn=[vNvEvU]' respectivelyThe velocity in the middle east, north and sky directions of the INS inertial navigation coordinate system,is the angular velocity of the earth's rotation,is the angular velocity g of the carrier in each axial direction around the INS inertial navigation coordinate systemnIs the acceleration of gravity;
E. v calculated in step DNvEvURespectively substituting the position information of the carrier in the INS inertial navigation system into the following formula to obtain the position information of the carrier in the INS inertial navigation system, wherein L is latitude, lambda is longitude, and h is height,
h=h(0)+∫vUdt, where L (0) represents the latitude value of the initial position of the carrier, λ (0) represents the longitude value of the initial position of the carrier, and h (0) represents the initial height of the carrier from the earth's surface. RMRepresenting the radius of curvature, R, in the meridian of the earthNRepresenting the radius of curvature over a circle of latitude;
F. establishing an equation of stateAnd observation equation Z (t) ═ H (t) XI(t)+V(t),
XI(t) represents the error state of the INS inertial navigation system at time t, which is a 15-dimensional vector as follows:
vx,vy,vzthe velocity error of the INS inertial navigation system along the east, north and sky directions; phi is ax,φy,φzIs the attitude angle error of the carrier; l, lambda and h respectively represent latitude, longitude and altitude errors of the carrierA difference;x,y,zrespectively representing the random drift of the gyroscope;respectively, random drift of the accelerometer, whereinIs a matrix of 15 × 15, wherein FN(t) corresponds to vx,vy,vz,φx,φy,φzThe non-zero elements of the INS inertial navigation system matrix of the 9 parameters L, λ, h are as follows:
F(1,5)=-fzF(1,6)=fy
F(2,4)=fzF(2,6)=-fx
F(3,4)=-fyF(3,5)=fxF(3,7)=-2ωievxsinL
F(5,7)=-ωiesinL
F(9,3)=1
FS(t) is vx,vy,vz,φx,φy,φzThe transformation matrix between the 9 parameters L, λ, h and the gyro and accelerometer drifts, whose dimensions are 9 × 6,
FM(t) isx,y,z,The INS inertial navigation system matrix, corresponding to the gyroscope and accelerometer drifts, is a diagonal matrix with dimensions 6 × 6, as follows:
FM(t)=diag[-1/Tgx-1/Tgy-1/Tgz-1/Tax-1/Tay-1/Taz](ii) a Wherein, TgxTime constant, T, of error model representing x-axis of gyroscopegyTime constant, T, of error model representing y-axis of gyroscopegzTime constant, T, of error model representing z-axis of gyroscopeaxTime constant, T, representing an error model of the accelerometer x-axisayTime constant, T, representing the accelerometer y-axis error modelazA time constant representing a z-axis error model of the accelerometer;
GI(t)=diag[1 1 1......1 1]15×15;
WI(t) is a 15-dimensional vector, as follows:
WI(t)=[a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15],
a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15representing a systematic process noise sequence;
z (t) is the difference value of the position and the velocity information of the carrier in the INS inertial navigation system and the position and the velocity information of the carrier in the GPS navigation system, is a 6-dimensional vector,
Z(t)=[vx+Nvxvy+Nvyvz+Nvz(RM+h)L+Ny(RM+h)cosLλ+Nxh+Nh]Twherein N isvxIndicating the speed error of the GPS navigation system in the x direction, NvyIndicating the speed error of the GPS navigation system in the y-direction, NvzRepresenting the speed error of the GPS navigation system in the z direction, NxIndicating the position error of the GPS navigation system in the x direction, NyIndicating the position error of the GPS navigation system in the y-direction, NhIndicating a position error of the GPS navigation system in the z direction;
wherein
Vv(t)=[NvxNvyNvz]T
Vp(t)=[NxNyNz]T
G. Using the above obtained continuous equation of stateDiscretizing to obtain Xk=Φk,k-1Xk-1+Wk-1Wherein
The continuous observation equation z (t) ═ h (t) X obtained aboveIDiscretizing (t) + V (t) to obtain Zk=HkXk+Vk;
Wherein I is an identity matrix, F is a state transition matrix of the INS inertial navigation system, and delta t is sampling time of the discretized INS inertial navigation system;
H. subtracting the position and speed information of the carrier in the INS inertial navigation system from the position and speed information of the carrier in the GPS navigation system to obtain observation information z of Z (t) at the moment k;
I. calculating the optimal estimated value of the state of the INS inertial navigation system at the k moment Wherein, for optimal estimation of INS inertial navigation system state at time k-1,Qk-1Is the noise matrix of the INS inertial navigation system, the size of which is determined by the performance of the INS inertial navigation elements, Rkis a variance matrix of system measurement noise, the size of which is determined by the performance of the GPS receiver;
J. will be calculatedThe value is differed with the position and speed information of the carrier in the INS inertial navigation system to obtain the optimal navigation parameter;
K. and repeating the steps H-J to obtain the navigation information parameters of the continuous carrier.
The invention has the beneficial effects that: the navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer utilizes the method of INS inertial navigation and GPS navigation combined navigation to solve the defects that a single GPS navigation technology is easy to interfere and shield, the short-time positioning precision is not high, the output frequency is limited and the output is discontinuous; meanwhile, the defects that the accumulated error of a single INS inertial navigation parameter is larger and the long-time positioning accuracy is dispersed are solved, and the defect that the accumulated error of the INS inertial navigation is dispersed along with the increase of time is made up by utilizing the advantage that the GPS navigation has high positioning accuracy for a long time; the method overcomes the defects that the GPS is easy to interfere and the output frequency is limited by utilizing the characteristics that the INS inertial navigation is not interfered by the outside and the output navigation information is continuous, and corrects the navigation angle calculated by the magnetometer to obtain the geographical true north direction and the stable navigation angle in order to solve the problems that the true north cannot be found by the navigation angle calculated by the inertial navigation and the drift is large.
FIG. 1 is a latitude error value calculated by a navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer according to the present invention; FIG. 2 is a latitude error variance value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation and magnetometer according to the present invention; FIG. 3 is a longitude error value calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention; FIG. 4 is a longitude error variance calculated based on the inertial navigation system of INS, the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention; FIG. 5 is a calculated altitude error value based on the INS inertial navigation, the GPS navigation, and the magnetometer navigation algorithm of the present invention; FIG. 6 is a calculated altitude error variance value based on the INS inertial navigation, the GPS navigation, and the navigation algorithm of the magnetometer, in accordance with the present invention; FIG. 7 is an east velocity error value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation, and magnetometer, in accordance with the present invention; FIG. 8 is an east velocity error variance value calculated by the navigation algorithm based on INS inertial navigation, GPS navigation, and magnetometer, in accordance with the present invention; FIG. 9 is a north velocity error value calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention; FIG. 10 is a calculated variance value of the north velocity error based on the INS inertial navigation, the GPS navigation, and the navigation algorithm of the magnetometer, in accordance with the present invention; FIG. 11 is a calculated value of the sky-direction velocity error based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer; FIG. 12 is a direction of the sky velocity error variance calculated based on the Inertial Navigation System (INS), the GPS navigation system, and the navigation algorithm of the magnetometer, in accordance with the present invention;
as can be seen from the test result graph, the error variances of the longitude, the latitude and the altitude obtained by the navigation algorithm based on the INS inertial navigation, the GPS navigation and the magnetometer can be quickly converged to smaller values; the navigation information such as position, speed and the like can be filtered and smoothed, large jump cannot be generated, and the stability of the algorithm is strong.