Disclosure of Invention
The inventors of the present invention have found the problems in the prior art described above, and have thus proposed a new technical solution to at least one of the problems.
The invention aims to provide a technical scheme for processing data of an unmanned aerial vehicle, which can improve the real-time performance and the accuracy of the determination of the attitude information of the unmanned aerial vehicle.
According to a first aspect of the invention, a data processing method for an unmanned aerial vehicle is provided, which includes: measuring the flight state of the unmanned aerial vehicle in real time by using a plurality of sensors; determining a state equation according to the change process of the flight state of the unmanned aerial vehicle along with time; acquiring a state transition matrix according to the state equation; and performing data fusion on the measured values of the plurality of sensors by adopting EKF (extended Kalman Filter) according to the state transition matrix, thereby determining the attitude information of the unmanned aerial vehicle.
Optionally, the measuring the flight state of the drone in real time with the plurality of sensors includes: measuring the angular velocity and the acceleration of the unmanned aerial vehicle in real time by utilizing a gyroscope and an accelerometer respectively; and measuring the intensity of the geomagnetic field where the unmanned aerial vehicle is located in real time by using a magnetometer.
Optionally, the determining a state equation according to a time-varying course of the flight state of the drone includes: taking the angular velocity, the angular acceleration and the acceleration of the unmanned aerial vehicle and the geomagnetic field intensity at which the unmanned aerial vehicle is positioned as state variables; and determining the state equation according to the change process of the state variable along with time.
Optionally, the obtaining a state transition matrix according to the state equation includes: and carrying out linearization processing on the state equation, thereby converting an implicit expression containing the state transition matrix into an explicit expression of the state transition matrix, and acquiring the state transition matrix from the explicit expression.
Optionally, the linearizing the state equation, so as to convert an implicit expression including the state transition matrix into an explicit expression of the state transition matrix, and acquiring the state transition matrix from the explicit expression includes: and solving the state variable deviation derivative of the state equation at the position where the state variable is equal to the state variable prior estimation value at the current moment so as to obtain the state transition matrix between the state variable at the current moment and the state variable at the next moment.
Optionally, the performing, according to the state transition matrix, data fusion on the measurement values of the plurality of sensors by using an extended kalman filter EKF, so as to determine the attitude information of the drone includes: and performing data fusion on the measurement values of the gyroscope, the accelerometer and the magnetometer by adopting EKF according to the state transition matrix, thereby determining the attitude information of the unmanned aerial vehicle. The gyroscope measurements may include: the angular velocity is a three-axis component in a machine coordinate system. The accelerometer measurements may include: and the three-axis component of the acceleration under the body coordinate system. The measurements of the magnetometer may include: and the three-axis component of the geomagnetic field intensity under the body coordinate system. The pose information may include: the pitch angle, yaw angle and roll angle of the unmanned aerial vehicle.
Optionally, the value range of the process noise covariance in the EKF data fusion process may be: q
ω∈[0.00008,0.00012]rad/s、
Q
a∈[0.0072,0.0108]μ g and Q
m∈[0.004,0.006]mG, wherein Q
ω、
Q
aAnd Q
mThe process noise covariance of the angular velocity, the angular acceleration, the acceleration and the geomagnetic field strength, respectively. The measurement noise covariance range during the EKF data fusion process may be: r
ω∈[0.00064,0.00096]rad/s、R
a∈[8000,12000]μ g and R
m∈[80,120]mG, wherein R
ω、R
aAnd R
mThe measurement noise covariance of the angular velocity, the acceleration and the geomagnetic field strength, respectively.
According to another aspect of the present invention, there is provided a drone data processing apparatus, including: the flight state measuring unit is used for controlling the plurality of sensors to measure the flight state of the unmanned aerial vehicle in real time; the state transition matrix determining unit is used for determining a state equation according to the change process of the flight state of the unmanned aerial vehicle along with time and acquiring a state transition matrix according to the state equation; and the attitude information determining unit is used for performing data fusion on the measurement values of the plurality of sensors by adopting EKF (extended Kalman filter), so as to determine the attitude information of the unmanned aerial vehicle.
Optionally, the flight state measurement unit includes: the speed measuring subunit is used for controlling the gyroscope and the accelerometer to respectively measure the angular speed and the acceleration of the unmanned aerial vehicle in real time; and the magnetic field measurement subunit is used for controlling the magnetometer to measure the geomagnetic field intensity of the unmanned aerial vehicle in real time.
Optionally, the state transition matrix determining unit includes: the state equation determining subunit is configured to use the angular velocity, the angular acceleration, the acceleration of the unmanned aerial vehicle, and the geomagnetic field intensity where the acceleration is located as state variables, and determine the state equation according to a change process of the state variables with time; and the state transition matrix determining subunit is used for performing linearization processing on the state equation, so that an implicit expression containing the state transition matrix is converted into an explicit expression of the state transition matrix, and the state transition matrix is obtained from the explicit expression.
Optionally, the state transition matrix determining subunit is configured to perform bias derivation on the state variable by the state equation at a position where the state variable is equal to a state variable prior estimation value at a current time, so as to obtain the state transition matrix between the state variable at the current time and the state variable at a next time.
Optionally, the attitude information determining unit is configured to perform data fusion on the measurement values of the gyroscope, the accelerometer, and the magnetometer by using an EKF according to the state transition matrix, so as to determine the attitude information of the drone.
According to yet another aspect of the present invention, there is provided a drone data processing apparatus, including: a memory and a processor coupled to the memory, the processor configured to execute the drone data processing method as previously described based on instructions stored in the memory device.
According to a further aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the drone data processing method as described above.
One advantage of the invention is that EKF is adopted to perform real-time data fusion processing on the measured values of a plurality of sensors, so that the real-time performance of unmanned aerial vehicle attitude information determination is improved, and meanwhile, the measured value of a gyroscope is corrected, so that zero drift is reduced, and the accuracy of unmanned aerial vehicle attitude information determination is improved.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 shows a flow chart of an embodiment of a drone data processing method according to the present invention.
As shown in fig. 1, step 101, a flight state of a drone is measured in real time using a plurality of sensors. For example, inertial sensors, such as gyroscopes and accelerometers, may be utilized to measure the angular velocity and acceleration of the drone in real time.
And 102, determining a state equation according to the change process of the flight state of the unmanned aerial vehicle along with time. For example, the state equation may be determined as a function of angular velocity and acceleration of the drone as a function of time.
And 103, acquiring a state transition matrix according to the state equation. For example, if the state equation is:
wherein,
is a priori estimate of the state variable at time k +1, X
kFor the value of the state variable at the time k, H is directly extracted
kIs a state transition matrix; if the state equation is:
the state equation is linearized and then the state transition matrix is extracted.
And step 104, carrying out data fusion on the measured values of the plurality of sensors by adopting EKF (extended Kalman filter), and determining the attitude information of the unmanned aerial vehicle. For example, the measured values of the multiple sensors may be three-axis components of the angular velocity and acceleration of the unmanned aerial vehicle in a body coordinate system, and the estimated value of the state variable at the current moment may be obtained through the EKF and converted into attitude information, where the attitude information may be a pitch angle, a yaw angle, and a roll angle of the unmanned aerial vehicle.
In the embodiment, the EKF is adopted to perform real-time data fusion processing on the measured values of the plurality of sensors, on one hand, only the estimated value at the previous moment is needed to be used for recursive calculation, and an infinite plurality of historical data are not needed, so that the real-time performance of determining the attitude information of the unmanned aerial vehicle is improved; on the other hand, other sensors can correct the measured value of the gyroscope, so that the zero drift of the gyroscope is reduced, and the accuracy of determining the attitude information of the unmanned aerial vehicle is improved.
Fig. 2 shows a flow chart of another embodiment of the drone data processing method according to the present invention.
As shown in fig. 2, in step 201, the angular velocity and the acceleration of the drone are measured in real time using a gyroscope and an accelerometer, respectively.
And step 202, measuring the intensity of the geomagnetic field where the unmanned aerial vehicle is located in real time by using the magnetometer.
In one embodiment, the measurement matrix at time k is determined from the measurements of the gyroscope, accelerometer, and magnetometer as: z
k=[Ω
mk,A
mk,M
mk]
TWherein Ω is
mkFor the angular velocity of the drone measured at moment k by the gyroscope, an
Wherein ω is
mxk、ω
mykAnd ω
mxkRespectively three-axis components of the angular velocity measured value of the unmanned aerial vehicle at the moment k under a body coordinate system; a. the
mkFor acceleration of the drone measured at time k by the accelerometer, and
wherein a is
mxk、a
mykAnd a
mzkRespectively three-axis components of the acceleration measured value of the unmanned aerial vehicle at the moment k under a coordinate system of the machine body; m
mkFor acceleration of the drone measured at time k by the accelerometer, and
wherein m is
mxk、m
mykAnd m
mzkAnd three-axis components of the geomagnetic field intensity measured value of the unmanned aerial vehicle at the moment k under the body coordinate system are respectively measured.
And step 203, determining a state equation according to the change process of the angular velocity, the angular acceleration and the geomagnetic field strength along with time. For example, angular velocity, angular acceleration and geomagnetic field strength may be taken as state variables, and the value of the state variable at time k may be expressed as:
wherein omega
sk、
A
skAnd M
skAre the values of the state variables of angular velocity, angular acceleration and geomagnetic field strength at time k, respectively, and
wherein ω is
sxk、ω
sykAnd ω
sxkThree-axis components of the value of the angular speed state variable of the unmanned aerial vehicle at the moment k under the coordinate system of the machine body are respectively;
wherein
And
respectively is a three-axis component of the value of the angular acceleration state variable of the unmanned aerial vehicle at the moment k under the coordinate system of the machine body;
wherein a is
sxk、a
sykAnd a
szkRespectively is a three-axis component of the value of the acceleration state variable of the unmanned aerial vehicle at the moment k under a body coordinate system;
wherein m is
sxk、m
sykAnd m
szkAnd the three-axis components of the value of the geomagnetic field intensity state variable of the unmanned aerial vehicle at the moment k under the body coordinate system are respectively.
From the above functional relationship of the state variables with time, the state equation can be determined as:
wherein, Δ t is the update time; n is a radical of
Ωk、
N
AkAnd N
MkAre respectively provided withThe process noises corresponding to the angular velocity, the angular acceleration, the acceleration and the geomagnetic field intensity are all Gaussian white noises; w
kIs an attitude transformation matrix.
And step 204, acquiring a state transition matrix according to the state equation.
In one embodiment, fig. 3 is a flow chart illustrating a further embodiment of a drone data processing method in accordance with the present invention.
As shown in fig. 3, step 304, the state equation is linearized, so as to convert the implicit expression containing the state transition matrix into the explicit expression of the state transition matrix, and the state transition matrix is obtained from the explicit expression.
For example, equation of state
In that
Is aligned with the state variable X
kCalculating a deviation, wherein
Obtaining a state transition matrix between the state variable at the current time and the state variable at the next time by using a priori estimation value of the state variable at the current time as follows:
wherein,
and
respectively are the state variable estimated values of the acceleration and the geomagnetic field intensity at the moment k, and I is a unit vector.
And step 205 (step 305), performing data fusion on the measurement values of the gyroscope, the accelerometer and the magnetometer by using EKF (extended Kalman filter), and determining the attitude information of the unmanned aerial vehicle.
In one embodiment, the measurement equation for the EKF may be determined from the above expression of the state variables and measurement matrix as:
wherein,
Ω、
Aand
Mrespectively the measurement noise of the gyroscope, accelerometer and magnetometer. The value range of the covariance of the measurement noise can be set as follows in the EKF filtering process: r
ω∈[0.00064,0.00096]rad/s、R
a∈[8000,12000]μ g and R
m∈[80,120]mG, wherein R
ω、R
aAnd R
mThe covariance of the measurement noise of angular velocity, acceleration and geomagnetic field strength, respectively; process noise N
Ωk、
N
AkAnd N
MkThe value range of the covariance of (a) can be set as: q
ω∈[0.00008,0.00012]rad/s、
Q
a∈[0.0072,0.0108]μ g and Q
m∈[0.004,0.006]mG, wherein Q
ω、
Q
aAnd Q
mRespectively, the process noise covariance of angular velocity, angular acceleration, and geomagnetic field strength. After EKF filtering, the estimated value X of the state variable at the k moment can be obtained
kAnd thereby determine pose information of the drone. The attitude information may be the current pitch, roll and yaw angles of the drone or other physical quantities that may characterize the attitude of the drone.
In the above embodiment, the flight state of the unmanned aerial vehicle is linearized, a state transition matrix is obtained, and the measured values of the gyroscope, the accelerometer and the magnetometer are subjected to data fusion through the EKF, so that the measured values of the gyroscope can be corrected by using the accelerometer and the magnetometer, the zero drift of the gyroscope is reduced, the zero offset stability is improved, the high-precision attitude information of the unmanned aerial vehicle is further obtained, and reliable information support is provided for unmanned aerial vehicle control.
Fig. 4 shows a block diagram of an embodiment of the drone data processing device according to the invention.
As shown in fig. 4, the apparatus includes: a flight state measurement unit 41, a state transition matrix determination unit 42, and an attitude information determination unit 43.
The flight state measurement unit 41 controls a plurality of sensors to measure the flight state of the unmanned aerial vehicle in real time. For example, inertial sensors, such as gyroscopes and accelerometers, may be used to measure the flight state, such as angular velocity and acceleration, of the drone.
In one embodiment, fig. 5 shows a block diagram of another embodiment of a drone data processing device according to the present invention.
As shown in fig. 5, the flight state measurement unit 51 includes: a speed measurement subunit 511 and a magnetic field measurement subunit 512. For example, the speed measurement subunit 511 controls the gyroscope and the accelerometer to measure the angular speed and the acceleration of the drone, and the magnetic field measurement subunit 512 controls the magnetometer to measure the geomagnetic field strength. Therefore, real-time measurement values of all sensors at a certain moment of the flight state of the unmanned aerial vehicle can be obtained and used as the basis of the state variable estimation value at the moment.
The state transition matrix determination unit 42 determines a state equation according to a change process of the flight state of the unmanned aerial vehicle with time, and acquires a state transition matrix according to the state equation. For example, according to the functional relationship between the speed of the unmanned aerial vehicle and the time, the conversion relationship between the value of the state variable at the current moment and the value of the state variable at the next moment can be determined, so as to determine the state equation.
The attitude information determination unit 43 performs data fusion of the measurement values of the plurality of sensors using the EKF, thereby determining the attitude information of the unmanned aerial vehicle. For example, a matrix of measurements is composed of real-time measurements of a gyroscope, accelerometer and magnetometer, a matrix of state variables is composed of angular velocity, angular acceleration, acceleration and geomagnetic field strength, and a measurement equation is determined from the relationship between the measurement matrix and the matrix of state variables. And determining a real-time estimation value of the state variable through the EKF by combining the state equation and the state transition matrix, and further converting the real-time estimation value into attitude information of the unmanned aerial vehicle.
In the embodiment, the attitude information determination unit performs real-time data fusion processing on the measurement values of the plurality of sensors by using the EKF, so that on one hand, the estimation value at the current moment is only required to be subjected to recursive calculation by using the estimation value at the previous moment, an infinite plurality of historical data are not required, and the real-time performance of determining the attitude information of the unmanned aerial vehicle is improved; on the other hand, other sensors can correct the measured value of the gyroscope, so that the zero drift of the gyroscope is reduced, and the accuracy of determining the attitude information of the unmanned aerial vehicle is improved.
Fig. 6 shows a block diagram of a further embodiment of a drone data processing device according to the invention.
As shown in fig. 6, the apparatus includes: a flight state measurement unit 51, a state transition matrix determination unit 62, and an attitude information determination unit 43. Wherein the flight state measurement unit 51 includes: a speed measurement subunit 511 and a magnetic field measurement subunit 512; the state transition matrix determination unit 62 includes: a state equation determination subunit 621 and a state transition matrix determination subunit 622. The functions of the flight state measuring unit 51 and the attitude information determination unit 43 may refer to the corresponding descriptions of the above embodiments, and are not described herein again for the sake of brevity.
The state equation determining subunit 621 uses the angular velocity, the angular acceleration, the acceleration of the unmanned aerial vehicle, and the geomagnetic field intensity where the unmanned aerial vehicle is located as state variables, and determines the state equation according to the change process of the state variables. For example, with the angular velocity, the angular acceleration, the acceleration and the geomagnetic field intensity of the unmanned aerial vehicle as state variables, according to the functional relationship between the velocity of the unmanned aerial vehicle, the geomagnetic field intensity and the time, the conversion relationship between the value of the state variable at the current moment and the value of the state variable at the next moment can be determined, so as to determine the state equation.
The state transition matrix determination subunit 622 performs linearization processing on the state equation, thereby converting an implicit expression containing the state transition matrix into an explicit expression of the state transition matrix, and acquiring the state transition matrix from the explicit expression.
In one embodiment, the state transition matrix determining subunit 622 performs partial derivation on the state variables of the state equation at a state variable equal to the a-priori estimate of the state variable at the current time, so as to obtain the state transition matrix between the state variable at the current time and the state variable at the next time.
For example, after the state equation determining subunit 621 determines the state variable according to the requirement of acquiring the attitude information of the unmanned aerial vehicle, the state equation is generated according to the time variation process of the state variable, and the state equation is transmitted to the state transition matrix determining subunit 622; then, the state transition matrix determining subunit 622 performs linearization processing on the state equation according to the prior estimation value of the state variable at the current time obtained by the attitude information determining unit 43 in the EKF filtering process, so as to obtain a state transition matrix, and transmits the matrix to the attitude information determining unit 43; finally, the attitude information determination unit 43 performs EKF data fusion according to the state transition matrix provided by the state transition matrix determination subunit 622 and the real-time measurement values of the plurality of sensors provided by the flight state measurement unit 51, so as to obtain the attitude information of the unmanned aerial vehicle.
In the embodiment, the flight state of the unmanned aerial vehicle is linearized to obtain the state transition matrix, and the measured values of the gyroscope, the accelerometer and the magnetometer are subjected to data fusion through the EKF, so that the measured values of the gyroscope can be corrected by using the accelerometer and the magnetometer, the zero drift of the gyroscope is reduced, the zero offset stability is improved, high-precision attitude information of the unmanned aerial vehicle is obtained, and reliable information support is provided for the control of the unmanned aerial vehicle.
Fig. 7 shows a block diagram of yet another embodiment of the drone data processing device according to the present invention.
As shown in fig. 7, the apparatus 70 of this embodiment includes: a memory 701 and a processor 702 coupled to the memory 701, the processor 702 being configured to execute the drone data processing method in any one of the embodiments of the present invention based on instructions stored in the memory 701.
The memory 701 may include, for example, a system memory, a fixed nonvolatile storage medium, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), a database, and other programs.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
So far, the data processing method and device of the unmanned aerial vehicle according to the invention have been described in detail. Some details well known in the art have not been described in order to avoid obscuring the concepts of the present invention. It will be fully apparent to those skilled in the art from the foregoing description how to practice the presently disclosed embodiments.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Although some specific embodiments of the present invention have been described in detail by way of illustration, it should be understood by those skilled in the art that the above illustration is only for the purpose of illustration and is not intended to limit the scope of the invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.