CN105890598A - Quadrotor posture resolving method combining conjugate gradient and extended Kalman filtering - Google Patents
Quadrotor posture resolving method combining conjugate gradient and extended Kalman filtering Download PDFInfo
- Publication number
- CN105890598A CN105890598A CN201610216667.4A CN201610216667A CN105890598A CN 105890598 A CN105890598 A CN 105890598A CN 201610216667 A CN201610216667 A CN 201610216667A CN 105890598 A CN105890598 A CN 105890598A
- Authority
- CN
- China
- Prior art keywords
- axis
- conjugate gradient
- quaternary number
- ekf
- hsx
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Navigation (AREA)
- Gyroscopes (AREA)
Abstract
The invention relates to a quadrotor posture resolving method combining the conjugate gradient and extended Kalman filtering. The method comprises the steps that firstly, information of a sensor is collected to obtain the flying state of a quadrotor; then, an observation model is established with a conjugate gradient method, then a process model is established, and a quaternion obtained with the conjugate gradient method serves as a measurement value of extended Kalman filtering; finally, the optimal quaternion is obtained with an extended Kalman filtering method, and three posture angles of the quadrotor are solved. Compared with a simple gradient method and a complementary filtering method, system errors and measurement noise of the sensor are taken into consideration in the extended Kalman filtering method, and thus the estimated quaternion has higher accuracy. The observation quaternion obtained with the conjugate gradient method is applied to extended Kalman filtering, and thus a linear observation model complex in calculation can be avoided.
Description
Technical field
The present invention relates to a kind of four rotor wing unmanned aerial vehicle attitude course data measuring methods, particularly relate to a kind of conjugate gradient
Be combined with spreading kalman to four rotor wing unmanned aerial vehicles (hereinafter referred to as four rotors) attitude algorithm method, be mainly used in military affairs and detect
Examine, agricultural plant protection, electric inspection process, mapping, take photo by plane.
Background technology
Along with robot and the development of space flight and aviation technology, four rotors have been increasingly becoming Chinese scholars and have sent out with taking photo by plane
Burn the study hotspot of friends.Four rotors are that a kind of many rotors with special flight performances such as VTOL and hoverings are unmanned
Aircraft.In flight course, by changing the rotating speed of four rotors, thus it is possible to vary various flight attitudes.Just because of four rotors
Unmanned plane has VTOL, aerial spot hover, can realize the flight performance that the flight etc. of six degree of freedom is unique so that it is
Military field and civil area are widely used.
Attitude algorithm is the core of four rotors, and it is responsible for provides reliable Flight Condition Data in real time for four rotors
Important task.Utilization at present is compared attitude algorithm method widely and is mainly complementary filter, Kalman filtering method and gradient descent method
Method.Complementary filter method and gradient descent method calculate simple, make use of acceleration transducer and geomagnetic sensor to go to mend
Repay and produce the error that drift causes due to gyro sensor in time, but all do not account for noise and the sensing of system itself
The measurement error of device.Complementary filter method needs to choose dynamic weights and deacclimatizes different state of flights, major part fortune user
Selecting to deacclimatize rapid flight to bigger weights, this will cause aircraft static properties not good enough.Kalman filtering
Considering the measurement error of system and the measurement noise of sensor in method, comparing first two method has more preferable accuracy, and
It is to use widest attitude algorithm method.General Kalman's method needs linearisation observation model, and linearisation is observed
Model needs to face the problem solving Jacobin matrix, and this will bring the biggest amount of calculation.
Summary of the invention
The technical problem to be solved is, for the problem of four rotor attitude algorithms, it is provided that one can be real-time
Obtain attitude and the higher attitude algorithm method of precision, thus preferably control the state of flight of four rotors.
For solving above-mentioned technical problem, the technical solution used in the present invention is:
A kind of four rotor attitude algorithm methods that conjugate gradient is combined with EKF, described four rotors comprise list
Sheet machine and the gyroscope being connected with single-chip microcomputer, acceleration transducer, geomagnetic sensor, single-chip microcomputer leads to ground system host computer
News connect;It is characterized in that comprising the steps:
Step S1: gather sensor information: under body axis system, is sensed by gyroscope, acceleration transducer, earth magnetism
Device gathers four rotor flying status informations, and wherein, four rotor three axis angular rates measured by gyroscope, and four rotations measured by acceleration transducer
The projection on three axles of the wing acceleration, geomagnetic sensor measures three axle magnetic induction of four rotor positions;Described body
Coordinate system is to be fixed on the reference frame of four rotors;
Step S2: process of wafing of respectively gyroscope, accelerometer being zero-suppressed:
Step S3: use Butterworth LPF to filter body acceleration to acceleration of gravity projection on three axles
Impact;Three axle magnetic induction are done zero normalization;
Step S4: utilize conjugate gradient method to set up EKF observation model;
Step S5: set up the process model of extended Kalman filter: that conjugate gradient method is obtained makes error function e(q)
Minimum quaternary number, as measured value, designs extended Kalman filter, utilizes extended Kalman filter to estimate optimum four
Unit's number;
Step S6: simultaneous Euler orientation cosine matrix and Quaternion Matrix, obtains three attitudes utilizing quaternary number form to become
Angle equation;Optimum quaternary number step S5 estimated is brought three attitude angle solution of equations into and is calculated three attitude angle of four rotors:
Course angle γ, pitching angle theta, roll angle
In technique scheme, step S2 zero-suppress gyroscope, the accelerometer specific practice processed of wafing is by four rotations
The wing keeps level, takes 200 sub-values and averages, and this meansigma methods is just zero to waft value, and the value of acquirement all deducts this and zero wafts value later.
In technique scheme, the three axle magnetic induction that geomagnetic sensor is recorded by step S3 do zero normalization
Detailed process is as follows:
First, four rotor horizontal positioned of geomagnetic sensor will be installed, and the most constantly rotate four rotors and sense by earth magnetism
Device rotates a ball, and in rotary course, slave computer constantly sends the data to host computer simultaneously;And then, host computer docks
The data received process, and find out maximum and the minima of each single axle of x-axis, y-axis and z-axis respectively, finally make zero
Normalizing calculates: zero, it is simply that the absolute value that will make the maximum of single axle and minima is equal, right on coordinate axes in other words
Claim;Normalizing, it is simply that make the scope of data of two axles reach unanimity;Computing formula is as follows:
In formula, x-axis is major axis, and y-axis is short axle;Hxi、Hyi、HziFor each single axle of x-axis, y-axis and z-axis through zero normalizing
Calibration value after process;Hsxi、Hsyi、HsziBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect;
Hsxmax、Hsxmin、Hsymax、Hsymin、Hszmax、HszminBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect strong
The maximum of degree and minima.
In technique scheme, step S4 conjugate gradient method is set up to EKF observation model process such as
Under: using perfect condition homogenous gravitational field and earth's magnetic field as reference direction, by quaternary number conversion under navigational coordinate system to body
3-axis acceleration [a' is obtained under coordinate systembx a'by a'bz]TWith magnetic induction [m'bx m'by m'bz]T;By be converted to
3-axis acceleration deducts the acceleration of gravity recorded under body axis system projection on three axles, and the magnetic induction that will be converted to
Intensity deducts the three axle magnetic induction recorded under body axis system, obtains measurement error function e(q), utilize conjugate gradient method to ask
Measurement error of sening as an envoy to function e(q)Minimum measurement quaternary number, i.e. utilizes conjugate gradient method to set up EKF observation
Model.
In technique scheme, step S5 is set up as follows to the detailed process of the process model of EKF:
First by the differential value of quaternary numberCan be expanded the state equations of Kalman filtering with the relation of angular velocity w:
Ω [w] is state-transition matrix, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively;Represent
The differential of quaternary number.Continuous time model is converted into discrete time model, and making the systematic sampling time is Ts, discrete time model
For:
q(k+1)=exp (ΩkTs)*qk (19)
Q in formula(k)Represent kth time sampling, to exp (ΩkTs) carrying out Taylor series expansion reservation single order and second order term, can obtain
Formula (20):
In formula:
Δθ2=(wxTs)2+(wyTs)2+(wzTs)2 (21)
I3*3Represent three-dimensional unit vector, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively.
In technique scheme, step S5 utilizes extended Kalman filter to estimate optimum quaternary number to include walking as follows
Rapid: to model the quaternary number estimating the next moment first with the process model of step S5, then carry out error covariance more
Newly, the 3rd step utilizes the covariance updated to calculate Kalman gain, and the 4th step utilizes observation model in step S4 to solve
Measure quaternary number and deduct the quaternary number in the next moment that the first step estimates, be multiplied by the Kalman gain that the 3rd step is obtained,
Quaternary number plus a upper moment is exactly the optimum quaternary number that extended Kalman filter is obtained;Update subsequent time association afterwards
Variance is prepared for calculating next time.
The EKF method of the present invention take into account the measurement noise of systematic error and sensor, therefore estimates
Quaternary number has more preferable accuracy.Utilize conjugate gradient method to obtain observing quaternary number and apply in EKF, can
To avoid calculating complicated linearisation observation model.
The attitude algorithm method that the conjugate gradient that the present invention selects is combined with spreading kalman, utilizes conjugate gradient method to ask
Go out to observe quaternary number and apply in EKF, it is not necessary to the problem considering linearisation observation model.Conjugate gradient method
Comparing gradient descent method, the step-length of decline is the dynamic value revised in real time, and precision is higher, it is easier to follow the tracks of various flight shape
State.
In addition, the present invention has used the method for current most popular quaternary number to remove to represent the rotation of body, quaternary number
Method is used in R4In space, comparing the method that Eulerian angles represent that body rotates, the method for quaternary number is easier to represent that body is any
Rotation, and do not have singularity problem.
In sum, the four rotor attitude algorithm methods that the conjugate gradient method of the present invention is combined with spreading kalman, mainly
Advantage has three: one utilizes Fusion, is modified low cost sensor drift problem, improves and measures essence
Degree.It two make use of conjugate gradient method to set up the observation model of EKF, and conjugate gradient method is First Order Iterative
Method compares other needs linearisation observation model, and the method amount of calculation of the Jacobin matrix solving complexity is greatly reduced.The side of allowing
The real-time of method has had good guarantee, ready for preferably controlling the attitude of quadrotor.Its three utilizations extension
Kalman's method considers the noise of system own and the measurement error of sensor, improves certainty of measurement, make use of conjugate gradient
Method can adjust descent direction dynamically and step-length can well adapt to different state of flights.
Accompanying drawing explanation
Fig. 1 is the navigational coordinate system and body axis system graph of a relation that the present invention relates to;
Fig. 2 is that the navigational coordinate system that the present invention relates to turns to body axis system figure through three times;
Fig. 3 is the four rotor attitude algorithm method block diagrams that conjugate gradient of the present invention is combined with EKF;
Fig. 4 is the four rotor attitude algorithm method measurement procedures that conjugate gradient of the present invention is combined with EKF
Figure;
Fig. 5 is the four rotor attitude algorithm method measurement result figures that conjugate gradient of the present invention is combined with EKF
(roll angle changes over curve).
Fig. 6 is the four rotor attitude algorithm method measurement result figures that conjugate gradient of the present invention is combined with EKF
(angle of pitch changes over curve).
Detailed description of the invention
Describe the present invention in detail below against accompanying drawing 1-6 and embodiment, the present invention be not restricted to accompanying drawing and reality
Execute example.
The four rotor attitude algorithm methods that the conjugate gradient implemented according to the present invention is combined with EKF are overall
Flow process such as Fig. 3 and 4.It is characterized in that comprising the steps:
Step S1: gather sensor information: under body axis system, is sensed by gyroscope, acceleration transducer, earth magnetism
Device gathers four rotor status informations, and wherein, four rotor three axis angular rates measured by gyroscope, and acceleration transducer is measured four rotors and added
Speed projection on three axles, geomagnetic sensor measures three axle magnetic induction of four rotor positions;Body axis system is
It is fixed on the reference frame of four rotors;
Step S2: process of wafing of respectively gyroscope, accelerometer being zero-suppressed:
Step S3: use Butterworth LPF to filter body acceleration to acceleration of gravity projection on three axles
Impact;Three axle magnetic induction are done zero normalization;
Acceleration transducer is again gravitational accelerometer, and it can measure the projection on three axles of the aircraft gravity;But
The actual acceleration of gravity measured includes body acceleration, owing to body acceleration is high-frequency noise, so using Bart
Butterworth low pass filter filters the impact of body acceleration;It is the Butterworth low pass of 5HZ through experimental selection cut-off frequency
Ripple device;Owing to the characteristic of geomagnetic sensor itself is not full symmetric, so needing the method using zero normalizing to earth magnetism
The three axle magnetic induction that sensor records process;
Step S4: using perfect condition homogenous gravitational field and earth's magnetic field as reference direction, by quaternary under navigational coordinate system
Number conversion obtains 3-axis acceleration [a' under body axis systembx a'by a'bz]TWith magnetic induction [m'bx m'by m'bz]T;
The 3-axis acceleration being converted to is deducted the acceleration of gravity recorded under body axis system projection on three axles, and will conversion
The magnetic induction obtained deducts the three axle magnetic induction recorded under body axis system, obtains measurement error function e(q), utilize
Conjugate gradient method is obtained and is made measurement error function e(q)Minimum quaternary number, i.e. utilizes conjugate gradient method to set up spreading kalman
Filtering observation model;
Step S5: set up the process model of extended Kalman filter: that conjugate gradient method is obtained makes error function e(q)
Minimum quaternary number, as measured value, designs extended Kalman filter, utilizes extended Kalman filter to estimate optimum four
Unit's number;
Step S6: simultaneous Euler orientation cosine matrix and Quaternion Matrix, obtains three attitudes utilizing quaternary number form to become
Angle equation;Optimum quaternary number step S5 estimated is brought three attitude angle equations into and is obtained three attitude angle: course angle γ, bows
Elevation angle theta, roll angle
In technique scheme, step S2 zero-suppress gyroscope, the accelerometer specific practice processed of wafing is by four rotations
Wing unmanned plane keeps level, takes 200 sub-values and averages, and this meansigma methods is just zero to waft value, and the value of acquirement is required for subtracting later
This is gone zero to waft value.
In technique scheme, the three axle magnetic induction that geomagnetic sensor is recorded by step S3 do zero normalization
Detailed process is as follows:
First, four rotor horizontal positioned of geomagnetic sensor will be installed, and the most constantly rotate four rotors and sense by earth magnetism
Device rotates a ball, simultaneously in rotary course slave computer (slave computer is the single-chip microcomputer on four rotors, and three large sensors are integrated
In single-chip microcomputer, slave computer is connected with computer upper machine communication) constantly send the data to host computer;And then, host computer pair
The data received process, and find out maximum and the minima of each single axle of x-axis, y-axis and z-axis respectively, finally return
Zero normalizing calculates: zero, it is simply that the absolute value that will make the maximum of single axle and minima is equal, right on coordinate axes in other words
Claim;Normalizing, it is simply that make the scope of data of two axles reach unanimity;Computing formula is as follows:
In formula, x-axis is major axis, and y-axis is short axle;Hxi、Hyi、HziFor each single axle of x-axis, y-axis and z-axis through zero normalizing
Calibration value after process;Hsxi、Hsyi、HsziBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect;
Hsxmax、Hsxmin、Hsymax、Hsymin、Hszmax、HszminBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect strong
The maximum of degree and minima.
In technique scheme, step S4 utilizes conjugate gradient method to set up the tool to EKF observation model
Body step is as follows:
The most in the ideal case, it is believed that the reference quantity of gravity is fg=[0 0 g]T, the reference quantity in earth's magnetic field is H=[Hn
0 Hd]T;Wherein g represents acceleration of gravity, HnAnd HdIt is that earth's magnetic field north component in east northeast ground coordinate system divides with vertical respectively
Amount;Unitization obtain
Define navigational coordinate system (n system) and body axis system (b system) as shown in Figure 1.In navigation system, body axis system phase
Rotation to navigational coordinate system can represent with rotating quaternary number, it is assumed that initial state VE=xEi+yEj+zEK, x in formulaE、yE、zE
Represent amount the to be rotated projection on three axles respectively;Final state V is arrived through the rotation q of four rotorsb=x'i+y'j
+ z'k, (is the once rotation q representing four rotors by the mode of quaternary number here, then utilizes quaternion differential equation to update
New quaternary number, q cited below0、q1、q2、q3It it is all the quaternary number after quaternion differential equation updates;Due to four rotations
The state being in a continuous motion of wing unmanned plane, so each cycle q is to need the differential equation by quaternary number
Update, thus q also illustrate that quaternion differential equation update after quaternary number.Mono-initial value [1 00 of q is given before starting
0], after, each cycle is updated and is once updated by the differential equation.) wherein: q=q0+q1i+q2j+q3K, q0、q1、q2、q3Table
Showing the component of quaternary number, i, j, k represent three vectors;, the amount throwing on three axles respectively after wherein x', y', z' represent rotation
Shadow, according to the image mode that quaternary number rotates be:
Q in formula*The identical vector of conjugate quaternion i.e. scalar for q is contrary, is expressed as q*=q0-q1i-q2j-q3k.By above formula
Launch, can be such as formula (5):
According to formula (5), it would be desirable in the case of, the reference quantity of gravity and the reference quantity in earth's magnetic field are transformed into body axis system
In, such as formula (6) and (7):
In formula (6) and formula (7)Ideally gravitational field and magnetic induction after representation unit exist respectively
Component on three axles,Respectively north component and vertical component in east northeast ground coordinate system after representation unit, q represents four
Quaternary number after unit's fractional differentiation equation renewal, wherein q0、q1、q2、q3Represent the component of quaternary number, q*Conjugate quaternion for q.Will
Acceleration that formula (6) and formula (7) the data obtained and acceleration transducer and geomagnetic sensor record at body axis system and magnetic strength
Answer intensity to subtract each other, measurement error function e can be obtained(q):
e(q)=[a'bx-abx a'by-aby a'bz-abz m'bx-mbx m'by-mby m'bz-mbz]T (8)
In formula (8), abx、aby、abz、mbx、mby、mbzRepresent that acceleration transducer and geomagnetic sensor are under body axis system
The acceleration recorded and magnetic induction, a'bx、a'by、a'bz、m'bx、m'by、m'bzIt it is the ideal situation that calculates of formula (6), (7)
The acceleration of lower body and magnetic induction.Then the optimization problem to quaternary number can be exchanged into and seeks object function?
The problem of little value.
Computing formula according to conjugate gradient method:
Z(k+1)=Z(k)+λ(k+1)d(k+1) (9)
In formula, λ(k+1)For optimal step size, d(k+1)For the direction declined, Z(k)Represent a upper moment quaternary number, Z(k+1)Represent
The quaternary number that subsequent time estimates, k represents kth time iteration.
According to FR conjugate gradient method:
In formulaIt is an intermediate variable, JTFor e(q)Refined lattice than matrix, concrete launch after refined lattice than matrix such as formula
(11):
In formulaWithRespectively after representation unit in east northeast ground coordinate system the north to north component and vertical direction
Vertical component, n represent the north to, d represents vertical direction;Wherein q0、q1、q2、q3Represent the component of quaternary number.
According to FR conjugate gradient method, formula below is utilized to select step-length, and descent direction:
d1=-g1 (12)
dk+1=-gk+1+βk+1dk (13)
5 formula are that conjugate gradient method selects suitable step-length and the core formula of the fastest descent direction, in formula above
gk+1, βk+1It is two intermediate variables,For formula (10) through the result calculated for k+1 time, dk+1Represent that kth declines for+1 time
Step-length, λk+1The direction declined for+1 time for kth, d1For the direction declined for the first time, g1For intermediate variable gk+1Initial value;
So far conjugate gradient method is utilized to solve the minima of error function, namely to EKF for step S4
Observation model modeling, thus obtain one group of attitude quaternion, this group quaternary number is to pass based on acceleration transducer and earth magnetism
The quaternary number that sensor characterizes, as the measured value of EKF.
Step S5 is set up as follows to the detailed process of the process model of EKF:
First by the differential value of quaternary numberRelation with angular velocity w can obtain the state equations of Kalman filtering:
Ω [w] is state-transition matrix, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively;Represent
The differential of quaternary number.Continuous time model is converted into discrete time model, and making the systematic sampling time is Ts, discrete time model
For:
q(k+1)=exp (ΩkTs)*qk (19)
Q in formula(k)Represent kth time sampling, to exp (ΩkTs) carrying out Taylor series expansion reservation single order and second order term, can obtain
Formula (20):
In formula:
Δθ2=(wxTs)2+(wyTs)2+(wzTs)2 (21)
I3*3Represent three-dimensional unit vector, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively, so far
Complete the modeling of the process model to EKF, the modeling of process model is mainly used in the of EKF
One step, namely estimates the quaternary number in next moment.Need the most exactly to utilize extended Kalman filter to estimate optimum
Quaternary number: model quaternary number i.e. the formula (22) estimating the next moment first with the process model of step S5, so
After carry out second step and utilize formula (23) to carry out error covariance renewal, the covariance that the 3rd step utilizes formula (24) to update calculates
Going out Kalman gain, the measurement quaternary number that the 4th step utilizes the observation model of step S4 to solve deducts what the first step estimated
The quaternary number in next moment, is multiplied by the Kalman gain that the 3rd step is obtained, adds that the quaternary number in a moment extends exactly
The optimum quaternary number that Kalman filter is obtained, the 5th step utilizes formula (26) to update subsequent time covariance for calculate next time
Prepare.Extended Kalman filter is exactly so constantly covariance recurrence, it is thus possible to obtain optimum quaternary number.Give below
Go out to utilize extended Kalman filter to estimate five concrete steps of optimum quaternary number:
The first step: the k moment angular velocity measured according to gyroscope updates the state quaternary number in four rotor k+1 moment, as follows:
The corresponding formula (20) of formula (22),Represent quaternary number, AkRepresent exp (ΩkTs) single order after Taylor series expansion
And second order term,Represent the k+1 moment quaternary number of prediction.
Second step: four rotor states calculate that forward error covariance updates, as follows:
P- (k+1)=A (k) P (k) AT(k)+Q(k+1) (23)
In formula, P(k)Represent the covariance matrix in k moment, Q(k+1)Represent four-dimensional process noise,Represent A(k)Transposition square
Battle array,Represent the covariance matrix in the k+1 moment of prediction.
3rd step: solving of filter gain coefficient is as follows:
In formula, Kk+1Represent Kalman gain, R(k+1)Represent four-dimensional measurement noise, H(k+1)Representation unit matrix,
Represent the covariance matrix in the k+1 moment of prediction.
4th step: obtain observing renewal equation according to conjugate gradient method is as follows:
In formula,Represent the optimum quaternary number that Kalman filter is estimated, Zk+1Ask for conjugate gradient method in step S4
The quaternary number solved,Represent the k+1 moment quaternary number of prediction, H(k+1)Representation unit matrix;
5th step: covariance updates, as follows:
In formula, I is four-dimensional unit matrix,Represent the covariance matrix in the k+1 moment of prediction, H(k+1)Representation unit square
Battle array.
So far, utilize extended Kalman filter to estimate optimum quaternary number process and terminate, utilize estimation the most exactly
Go out optimum quaternary number and solve the process of Eulerian angles.
In technique scheme, step S6 utilizes and estimates the detailed process of optimum quaternary number resolving attitude angle equation such as
Under:
Define the angle that four rotors turn over around z-axisFor course angle;The angle γ turned over around y-axis is roll angle;Turn around x-axis
The angle, θ crossed is the angle of pitch;Assume that four rotors sequentially pass through following three times to rotate and move to body axis system from navigational coordinate system:
First turn over around z-axisAngle;θ angle is turned over further around y-axis;Finally turn over γ angle around x-axis;
1) rotate around z-axis(such as Fig. 2)
2) around y1Rotate θ (such as Fig. 2)
3) around x2Rotate γ (such as Fig. 2)
Here the mode of the once rotation Eulerian angles of four rotors being decomposed into three rotations, x in formula, y, z represent rotation
The x of front body axis system, y, z-axis, become x through rotating body axis system around z-axis for the first time1,y1,z1, through second time around y1
Rotate body axis system and become x2,y2,z2, eventually pass third time around x2Rotate body axis system and become x3,y3,z3。
Above-mentioned three rotations of simultaneous can obtain:
Then can obtain Euler orientation cosine matrix as follows:
Can obtain according to formula (5) and (28):
θ=-arctan2 (q1q3-q0q2) (30)
Fig. 5 is the four rotor attitude algorithm method measurement result figures that conjugate gradient of the present invention is combined with EKF
(roll angle changes over curve).
Fig. 6 is the four rotor attitude algorithm method measurement result figures that conjugate gradient of the present invention is combined with EKF
(angle of pitch changes over curve).
In Fig. 5 and 6, the longitudinal axis represents that corresponding angle changes, and transverse axis is that sampling number (changes over and samples every 4ms
Once).Wherein fine line part is not carry out the attitude that blending algorithm calculates to change over curve, heavy line part
For the attitude algorithm method of the present invention, this it appears that the attitude algorithm method static properties of the present invention and dynamically from figure
Functional, generation drift error will not be changed over, line smoothing does not has time delay, it is possible to well follow the tracks of the change of attitude
Change.
Claims (6)
1. the four rotor attitude algorithm methods that conjugate gradient is combined with EKF, described four rotors comprise monolithic
Machine and the gyroscope being connected with single-chip microcomputer, acceleration transducer, geomagnetic sensor, single-chip microcomputer and ground system upper machine communication
Connect;It is characterized in that comprising the steps:
Step S1: gather sensor information: under body axis system, adopted by gyroscope, acceleration transducer, geomagnetic sensor
Collecting four rotor flying status informations, wherein, four rotor three axis angular rates measured by gyroscope, and acceleration transducer is measured four rotors and added
Speed projection on three axles, geomagnetic sensor measures three axle magnetic induction of four rotor positions;Described body coordinate
System is the reference frame being fixed on four rotors;
Step S2: process of wafing of respectively gyroscope, accelerometer being zero-suppressed:
Step S3: use Butterworth LPF to filter the body acceleration shadow to acceleration of gravity projection on three axles
Ring;Three axle magnetic induction are done zero normalization;
Step S4: utilize conjugate gradient method to set up EKF observation model;
Step S5: set up the process model of extended Kalman filter: that conjugate gradient method is obtained makes error function e(q)Minimum
Quaternary number as measured value, design extended Kalman filter, utilize extended Kalman filter to estimate optimum quaternary number;
Step S6: simultaneous Euler orientation cosine matrix and Quaternion Matrix, obtains three attitude angle sides utilizing quaternary number form to become
Journey;Optimum quaternary number step S5 estimated is brought three attitude angle solution of equations into and is calculated three attitude angle of four rotors: course
Angle γ, pitching angle theta, roll angle
The four rotor attitude algorithm methods that conjugate gradient the most according to claim 1 is combined with EKF, its
It is characterised by: step S2 zero-suppress gyroscope, the accelerometer specific practice processed of wafing is by four rotor holding levels, takes
200 sub-values are averaged, and this meansigma methods is just zero to waft value, and the value later obtained all deducts this and zero wafts value.
The four rotor attitude algorithm methods that conjugate gradient the most according to claim 2 is combined with EKF, its
It is characterised by: the detailed process that the three axle magnetic induction that geomagnetic sensor is recorded by step S3 do zero normalization is as follows:
First, four rotor horizontal positioned of geomagnetic sensor will be installed, and the most constantly rotate four rotors and revolve by geomagnetic sensor
Producing a ball, in rotary course, slave computer constantly sends the data to host computer simultaneously;And then, host computer is to receiving
Data process, find out maximum and the minima of each single axle of x-axis, y-axis and z-axis respectively, finally carry out the normalizing that makes zero
Calculate: zero, it is simply that the absolute value that will make the maximum of single axle and minima is equal, symmetrical on coordinate axes in other words;Return
One, it is simply that make the scope of data of two axles reach unanimity;Computing formula is as follows:
In formula, x-axis is major axis, and y-axis is short axle;Hxi、Hyi、HziFor each single axle of x-axis, y-axis and z-axis through zero normalization
After calibration value;Hsxi、Hsyi、HsziBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect;Hsxmax、
Hsxmin、Hsymax、Hsymin、Hszmax、HszminBe illustrated respectively in x-axis, three axle magnetic induction that y-axis, z-axis collect
Big value and minima.
The four rotor attitude algorithm methods that conjugate gradient the most according to claim 3 is combined with EKF, its
It is characterised by: step S4 conjugate gradient method is set up as follows to EKF observation model process: by perfect condition
Homogenous gravitational field and earth's magnetic field, as reference direction, obtain three by quaternary number conversion under navigational coordinate system under body axis system
Axle acceleration [a'bx a'by a'bz]TWith magnetic induction [m'bx m'by m'bz]T;The 3-axis acceleration being converted to is deducted
The acceleration of gravity recorded under body axis system projection on three axles, and the magnetic induction being converted to is deducted body seat
The three axle magnetic induction recorded under mark system, obtain measurement error function e(q), utilize conjugate gradient method to obtain and make measurement error letter
Number e(q)Minimum measurement quaternary number, i.e. utilizes conjugate gradient method to set up EKF observation model.
The four rotor attitude algorithm methods that conjugate gradient the most according to claim 4 is combined with EKF, its
It is characterised by: step S5 is set up as follows to the detailed process of the process model of EKF:
First by the differential value of quaternary numberCan be expanded the state equations of Kalman filtering with the relation of angular velocity w:
Ω [w] is state-transition matrix, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively;Represent quaternary
The differential of number;Continuous time model is converted into discrete time model, and making the systematic sampling time is Ts, discrete time model is:
q(k+1)=exp (ΩkTs)*qk (19)
Q in formula(k)Represent kth time sampling, to exp (ΩkTs) carry out Taylor series expansion reservation single order and second order term, formula can be obtained
(20):
In formula:
Δθ2=(wxTs)2+(wyTs)2+(wzTs)2 (21)
I3*3Represent three-dimensional unit vector, wx、wy、wzRepresent three axis angular rates that gyro sensor is measured respectively.
The four rotor attitude algorithm methods that conjugate gradient the most according to claim 5 is combined with EKF, its
It is characterised by: step S5 utilizes extended Kalman filter to estimate optimum quaternary number to comprise the steps: first with step
The process model modeling of S5 estimates the quaternary number in next moment, then carries out error covariance renewal, and the 3rd step utilizes more
New covariance calculates Kalman gain, and the measurement quaternary number that the 4th step utilizes observation model in step S4 to solve deducts
The quaternary number in the next moment that one step estimates, is multiplied by the Kalman gain that the 3rd step is obtained, and adds a moment
Quaternary number is exactly the optimum quaternary number that extended Kalman filter is obtained;Update subsequent time covariance afterwards for calculate next time
Prepare.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610216667.4A CN105890598B (en) | 2016-04-08 | 2016-04-08 | Quadrotor attitude algorithm method of the conjugate gradient in conjunction with Extended Kalman filter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610216667.4A CN105890598B (en) | 2016-04-08 | 2016-04-08 | Quadrotor attitude algorithm method of the conjugate gradient in conjunction with Extended Kalman filter |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105890598A true CN105890598A (en) | 2016-08-24 |
CN105890598B CN105890598B (en) | 2019-04-09 |
Family
ID=57012235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610216667.4A Active CN105890598B (en) | 2016-04-08 | 2016-04-08 | Quadrotor attitude algorithm method of the conjugate gradient in conjunction with Extended Kalman filter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105890598B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106767776A (en) * | 2016-11-17 | 2017-05-31 | 上海兆芯集成电路有限公司 | Mobile device and the method for asking for mobile device attitude |
CN108693496A (en) * | 2018-05-07 | 2018-10-23 | 国网山东省电力公司电力科学研究院 | A kind of intelligent electric energy meter error predictor method based on parameter degeneration equation |
CN109631895A (en) * | 2019-01-04 | 2019-04-16 | 京东方科技集团股份有限公司 | A kind of position and orientation estimation method and device of object |
CN109724602A (en) * | 2018-12-17 | 2019-05-07 | 南京理工大学 | A kind of attitude algorithm system and its calculation method based on hardware FPU |
CN110319840A (en) * | 2019-07-05 | 2019-10-11 | 东北大学秦皇岛分校 | Conjugate gradient attitude algorithm method towards abnormal gait identification |
CN110531613A (en) * | 2019-09-05 | 2019-12-03 | 广东工业大学 | Two axis unmanned aerial vehicle (UAV) control method, apparatus, equipment and computer readable storage medium |
CN111141283A (en) * | 2020-01-19 | 2020-05-12 | 杭州十域科技有限公司 | Method for judging advancing direction through geomagnetic data |
CN114234970A (en) * | 2021-12-21 | 2022-03-25 | 华南农业大学 | Real-time measurement method and device for attitude of motion carrier |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101915580A (en) * | 2010-07-14 | 2010-12-15 | 中国科学院自动化研究所 | Self-adaptation three-dimensional attitude positioning method based on microinertia and geomagnetic technology |
WO2012068359A2 (en) * | 2010-11-17 | 2012-05-24 | Hillcrest Laboratories, Inc. | Apparatuses and methods for magnetometer alignment calibration without prior knowledge of the local magnetic |
CN104215244A (en) * | 2014-08-22 | 2014-12-17 | 南京航空航天大学 | Aerospace vehicle combined navigation robust filtering method based on launching inertia coordinate system |
CN104898681A (en) * | 2015-05-04 | 2015-09-09 | 浙江工业大学 | Tetra-rotor aircraft attitude obtaining method by use of three-order approximation Picard quaternion |
-
2016
- 2016-04-08 CN CN201610216667.4A patent/CN105890598B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101915580A (en) * | 2010-07-14 | 2010-12-15 | 中国科学院自动化研究所 | Self-adaptation three-dimensional attitude positioning method based on microinertia and geomagnetic technology |
WO2012068359A2 (en) * | 2010-11-17 | 2012-05-24 | Hillcrest Laboratories, Inc. | Apparatuses and methods for magnetometer alignment calibration without prior knowledge of the local magnetic |
CN104215244A (en) * | 2014-08-22 | 2014-12-17 | 南京航空航天大学 | Aerospace vehicle combined navigation robust filtering method based on launching inertia coordinate system |
CN104898681A (en) * | 2015-05-04 | 2015-09-09 | 浙江工业大学 | Tetra-rotor aircraft attitude obtaining method by use of three-order approximation Picard quaternion |
Non-Patent Citations (1)
Title |
---|
孙金秋等: "基于共轭梯度法和互补滤波相结合的姿态解算算法", 《传感技术学报》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106767776A (en) * | 2016-11-17 | 2017-05-31 | 上海兆芯集成电路有限公司 | Mobile device and the method for asking for mobile device attitude |
CN113804191A (en) * | 2016-11-17 | 2021-12-17 | 格兰菲智能科技有限公司 | Mobile equipment and method for obtaining posture of mobile equipment |
CN113804191B (en) * | 2016-11-17 | 2024-03-19 | 格兰菲智能科技有限公司 | Mobile device and method for calculating gesture of mobile device |
CN108693496A (en) * | 2018-05-07 | 2018-10-23 | 国网山东省电力公司电力科学研究院 | A kind of intelligent electric energy meter error predictor method based on parameter degeneration equation |
CN109724602A (en) * | 2018-12-17 | 2019-05-07 | 南京理工大学 | A kind of attitude algorithm system and its calculation method based on hardware FPU |
CN109631895A (en) * | 2019-01-04 | 2019-04-16 | 京东方科技集团股份有限公司 | A kind of position and orientation estimation method and device of object |
CN110319840A (en) * | 2019-07-05 | 2019-10-11 | 东北大学秦皇岛分校 | Conjugate gradient attitude algorithm method towards abnormal gait identification |
CN110531613A (en) * | 2019-09-05 | 2019-12-03 | 广东工业大学 | Two axis unmanned aerial vehicle (UAV) control method, apparatus, equipment and computer readable storage medium |
CN111141283A (en) * | 2020-01-19 | 2020-05-12 | 杭州十域科技有限公司 | Method for judging advancing direction through geomagnetic data |
CN114234970A (en) * | 2021-12-21 | 2022-03-25 | 华南农业大学 | Real-time measurement method and device for attitude of motion carrier |
Also Published As
Publication number | Publication date |
---|---|
CN105890598B (en) | 2019-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105890598A (en) | Quadrotor posture resolving method combining conjugate gradient and extended Kalman filtering | |
CN106708066B (en) | View-based access control model/inertial navigation unmanned plane independent landing method | |
CN102692225B (en) | Attitude heading reference system for low-cost small unmanned aerial vehicle | |
CN103285599B (en) | A kind of method by remote control means navigator's target drone directly perceived | |
CN103837151B (en) | A kind of aerodynamic model auxiliary navigation method of quadrotor | |
CN107478223A (en) | A kind of human body attitude calculation method based on quaternary number and Kalman filtering | |
CN108803639A (en) | A kind of quadrotor flight control method based on Backstepping | |
CN106643737A (en) | Four-rotor aircraft attitude calculation method in wind power interference environments | |
Saripalli et al. | A tale of two helicopters | |
Cheviron et al. | Robust nonlinear fusion of inertial and visual data for position, velocity and attitude estimation of UAV | |
CN108225308A (en) | A kind of attitude algorithm method of the expanded Kalman filtration algorithm based on quaternary number | |
CN104374388B (en) | Flight attitude determining method based on polarized light sensor | |
CN107063262A (en) | A kind of complementary filter method resolved for UAV Attitude | |
CN107314718A (en) | High speed rotating missile Attitude estimation method based on magnetic survey rolling angular rate information | |
CN105094138A (en) | Low-altitude autonomous navigation system for rotary-wing unmanned plane | |
CN106597017A (en) | UAV angular acceleration estimation method and apparatus based on extended Kalman filtering | |
CN108318038A (en) | A kind of quaternary number Gaussian particle filtering pose of mobile robot calculation method | |
CN102937450B (en) | A kind of relative attitude defining method based on gyro to measure information | |
CN107101636B (en) | A method of more rotor dynamics model parameters are recognized using Kalman filter | |
CN110377056A (en) | Unmanned plane course angle Initialization Algorithms and unmanned plane | |
CN108759814B (en) | Method for estimating transverse rolling axis angular velocity and pitching axis angular velocity of four-rotor aircraft | |
CN105806342A (en) | Unmanned aerial vehicle movement speed prediction method based on machine learning | |
CN116125789A (en) | Gesture algorithm parameter automatic matching system and method based on quaternion | |
CN108871319A (en) | One kind is based on earth gravitational field and the sequential modified attitude algorithm method in earth's magnetic field | |
Lee et al. | Design of integrated navigation system using IMU and multiple ranges from in-flight rotating hexacopter system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |