Disclosure of Invention
Aiming at the problems in the prior art, the method for measuring the interference acceleration of the aircraft attitude calculation is provided, the problems that when the aircraft flies in a large-sized motor, the subsequent attitude calculation is wrong and the obtained attitude angle information is not accurate enough due to the fact that the acceleration measured by the aircraft body interferes with the acceleration besides the required gravity acceleration are solved, and meanwhile, a GPS sensor is not used for measuring the interference acceleration, and the method has the advantages of being low in cost, simple in algorithm design and good in effect.
In order to solve the problems in the prior art, the invention adopts the technical scheme that:
an interference acceleration measurement method for aircraft attitude calculation comprises the following steps:
step 1, acquiring attitude angles in an Euler angle form of an aircraft in real time in a set sampling period, wherein the attitude angles comprise a rolling angle, a pitch angle and a yaw angle in the Euler angle form, and converting the attitude angles into attitude quaternions
Step 2, obtaining the measured acceleration a under the coordinate system of the bodymeasureBy attitude quaternionAnd the measured acceleration a under the coordinate system of the machine bodymeasureObtaining the disturbance acceleration a under the reference coordinate systemdrTo obtain discrete disturbance acceleration
Step 3, obtaining the interference acceleration acc through the following formuladr:
Wherein, | | ameasureI and grRespectively representing the measured acceleration a under the coordinate system of the machine bodymeasureAnd the gravity acceleration g under the reference coordinate systemrThe value of the modulus of the (c) component,setting a threshold value;
step 4, adopting a first-order low-pass filter to perform interference acceleration acc obtained in the step 3drAnd performing first-order low-pass filtering to obtain the final interference acceleration acc under the reference coordinate system.
Step 5, converting the final interference acceleration acc under the reference coordinate system obtained in the step 4 into a final interference sum under a body coordinate systemVelocity accfMeasuring acceleration a in a coordinate system of the bodymeasureAnd the final interference acceleration acc under the coordinate system of the machine bodyfAccurate body acceleration a to c for obtaining filtering interference acceleration by subtractingmeasure。
Compared with the prior art, the invention has the following beneficial effects:
1. the cost is low, and a GPS sensor is not required to be added for measurement;
2. the attitude measurement precision of the subsequent multi-sensor fusion technology can be improved.
Detailed Description
The technical scheme of the invention is further specifically described by the following embodiments and the accompanying drawings.
Referring to fig. 1, a method for measuring disturbance acceleration of aircraft attitude calculation includes the following steps:
step 1, acquiring an attitude angle of an aircraft in real time in a fixed sampling period (the sampling period of the embodiment is 2ms), wherein the attitude angle is in an Euler angle form and comprises a rolling angle, a pitch angle and a yaw angle in the Euler angle form, and converting the attitude angle in the Euler angle form into a quaternion expression mode through the following formula, namely acquiring an attitude quaternion
Where cos represents a cosine operation, sin represents a sine operation, φ represents a roll angle in the form of an attitude Euler angle, θ represents a pitch angle in the form of an attitude Euler angle, ψ represents a yaw angle in the form of an attitude Euler angle,is an attitude quaternion, q0、q1、q2、q3Are respectively attitude quaternionsFour elements of (1).
And 2, operating a disturbance acceleration measurement algorithm. In this embodiment, first, the flight control system of the aircraft acquires acceleration data in the MPU6050 sensor on the aircraft through the IIC bus, and since the flight control system is fixedly connected to the aircraft, the acceleration data in the MPU6050 sensor is the measured acceleration a in the body coordinate systemmeasure. At this time, the input of the disturbance acceleration measurement algorithm is the measured acceleration a in the coordinate system of the bodymeasureThe output of the disturbance acceleration measurement algorithm is disturbance acceleration a under a reference coordinate systemdr。
First, the measured acceleration a in the body coordinate systemmeasureDefined in the form:
wherein, ameasureRepresenting the measured acceleration in the coordinate system of the body,is the quaternion of the attitude,representing the conjugate of the attitude quaternion, grRepresenting the gravitational acceleration of the reference coordinate system, adrTo representThe disturbance acceleration in the reference coordinate system, △ a, represents the measurement noise of the accelerometer.
The organism coordinate system in this application refers to the coordinate system of solid antithetical couplet on the aircraft, and the initial point of organism coordinate system is the barycenter of aircraft, and the directional organism the place ahead of x axle, the directional organism of y axle is right-hand, and the directional organism below of z axle. And with reference to a coordinate system, the origin is the center of mass of the aircraft, the xy plane is tangent to the earth, the x axis points to the north, the z axis points to the gravity direction, and the y axis points to the east along the local latitude line. Between the two coordinate systems, the coordinate system can be converted by the attitude matrix, which is used in this embodimentAndthe form represents a coordinate transformation matrix.
Then, the above formula is transformed to obtain the disturbance acceleration a under the reference coordinate systemdrThe solving formula of (2):
obtaining discrete disturbance acceleration according to the above
Wherein,the acceleration of the discrete disturbance is represented,is shown onAn attitude quaternion obtained at an attitude angle sampling instant,is composed ofConjugation of (1).
M in FIG. 1q、NqRespectively representing the above formulaeAndthe form, namely, the transformation matrix representing the reference coordinate system to the body coordinate system, and the transformation matrix representing the body coordinate system to the reference coordinate system.
Step 3, preferably, the obtained discrete disturbance acceleration is subjected toBy segmentation, i.e. according to discrete disturbance accelerationObtaining the disturbance acceleration accdr. In the static state of the aircraft, the aircraft can be considered to have no disturbance acceleration item, so that whether the aircraft is static or not is judged, and whether the disturbance acceleration is solved or not is determined. Wherein, | | ameasureI and grRespectively representing the measured acceleration a under the coordinate system of the machine bodymeasureAnd the gravity acceleration g under the reference coordinate systemrThe value of the modulus of the (c) component,indicating a set threshold value related to accelerometer performance.
Step 4, preferably, a first-order low-pass filter is adopted to perform interference acceleration acc obtained in the step 3drPerforming first-order low-pass filtering to remove interference acceleration accdrAnd (8) obtaining a final required interference acceleration acc in the reference coordinate system by using the noise term △ a.
Step 5, converting the final interference acceleration acc under the reference coordinate system obtained in the step 4 into the final interference acceleration acc under the body coordinate systemfMeasuring acceleration a in a coordinate system of the bodymeasureAnd the final interference acceleration acc under the coordinate system of the machine bodyfAccurate body acceleration a to c for obtaining filtering interference acceleration by subtractingmeasureAnd the method is used for an attitude calculation algorithm.
Wherein, a &measureI.e. the exact body acceleration for which the disturbance acceleration is filtered out,