Disclosure of Invention
In view of this, in order to solve the problems of high structural design difficulty and poor state detection accuracy of the unmanned aerial vehicle in the cargo throwing state detection process of the unmanned aerial vehicle, embodiments of the present invention provide a method and an apparatus for detecting an aircraft, which acquire a first state parameter of the aircraft, complete detection of a carrying state of the aircraft and a first device by combining with an artificial intelligence algorithm, and improve accuracy of detection of the carrying state of the aircraft and the first device.
According to an aspect of an embodiment of the present invention, there is provided a method of detecting an aircraft, including:
acquiring a first state parameter of an aircraft, wherein a separable first device is carried on the aircraft;
obtaining a second state parameter related to the carrying states of the first equipment and the aircraft based on a preset state detection function;
comparing the second state parameter to a predetermined first threshold; and
and obtaining the embarkation states of the first equipment and the aircraft based on the comparison result.
Preferably, the on-board state of the first device and the aircraft comprises: a disconnected state and a connected state.
Preferably, the acquiring a first state parameter of the aircraft includes:
acquiring a sampling value of a third state parameter of the aircraft in real time;
selecting a preset number of continuous sampling values; and
and calculating an average value of the selected continuous sampling values to obtain the first state parameter.
Preferably, said predetermined number is determined according to a frequency of a navigation system of said aircraft.
Preferably, the obtaining a second state parameter related to the embarkation states of the first device and the aircraft based on a preset state detection function includes:
establishing the state detection function;
and taking the first state parameter as an input value of the state detection function to obtain the second state parameter.
Preferably, the establishing the state detection function includes:
establishing a target function of the state detection function based on an artificial intelligence algorithm;
training the objective function based on training samples;
verifying the target function based on a verification sample; and
and adjusting and optimizing the target function according to the verification result to obtain the state detection function.
Preferably, the obtaining of the mounting states of the first device and the aircraft based on the comparison result includes:
if the second state parameter is less than the first threshold value, the embarkation state of the first device and the aircraft is the separation state;
and if the second state parameter is larger than or equal to the first threshold value, the embarkation state of the first equipment and the aircraft is the connection state.
Preferably, the third state parameter comprises at least one of the following state parameters: the total mass of the engine body, the vertical acceleration, the throttle control quantity and the PWM output of the motor.
Preferably, the merits of the state detection function are determined by the accuracy of its judgment of the embarkation states of the first equipment and the aircraft.
According to another aspect of the embodiments of the present invention, there is provided a detection apparatus for an aircraft, including:
a first state parameter acquisition unit configured to acquire a first state parameter of an aircraft on which a detachable first device is mounted;
a second state parameter obtaining unit configured to obtain a second state parameter regarding the embarkation states of the first device and the aircraft based on a preset state detection function;
a comparison unit configured to compare the second state parameter with a predetermined first threshold; and
a state detection unit configured to obtain the embarkation states of the first device and the aircraft based on a comparison result.
According to a further aspect of embodiments of the present invention, there is provided a computer readable storage medium storing computer instructions which, when executed, implement the method of detecting an aircraft as described above.
According to still another aspect of the embodiments of the present invention, there is provided a detection control apparatus for an aircraft, including: a memory for storing computer instructions; a processor coupled to the memory, the processor configured to perform a detection method that implements an aircraft as described above based on computer instructions stored by the memory.
One embodiment of the present invention has the following advantages or benefits:
the method includes the steps of obtaining a first state parameter of an aircraft carrying separable first equipment. And obtaining a second state parameter related to the carrying states of the first equipment and the aircraft based on a preset state detection function. The on-board states of the first device and the aircraft include: a disconnected state and a connected state. The second state parameter is compared to a predetermined first threshold value. And obtaining the embarkation states of the first equipment and the aircraft based on the comparison result of the second state parameter and a predetermined first threshold value. The aircraft does not need a load sensor and uses a ground sensor to acquire data, the structural design difficulty and the manufacturing cost of the aircraft are reduced, and the external signal interference when the aircraft transmits data with the ground sensor is avoided, so that the accuracy of the carrying state detection of the aircraft and the first equipment is improved.
And establishing an objective function of the state detection function based on an artificial intelligence algorithm. The objective function is trained based on the training samples. And verifying the target function based on the verification sample. And adjusting and optimizing the target function according to the verification result to obtain a state detection function. The accuracy of the state detection function in detecting the carrying states of the aircraft and the first equipment is further improved.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, and procedures have not been described in detail so as not to obscure the present invention. The figures are not necessarily drawn to scale.
Fig. 1 is a flowchart of a method for detecting an aircraft according to an embodiment of the present invention, which specifically includes the following steps.
In step S101, a first state parameter of an aircraft is obtained, wherein a detachable first device is mounted on the aircraft.
In this step, a first state parameter of an aircraft carrying a detachable first device is acquired.
In step S102, second state parameters regarding the embarkation states of the first device and the aircraft are obtained based on a preset state detection function.
In this step, second state parameters relating to the onboard state of the first device and the aircraft are derived on the basis of a preset state detection function. The on-board states of the first device and the aircraft include: a disconnected state and a connected state.
In step S103, the second state parameter is compared with a predetermined first threshold value.
In this step, the second state parameter is compared with a predetermined first threshold value.
In step S104, the embarkation states of the first device and the aircraft are obtained based on the comparison result.
In this step, the embarkation status of the first device and the aircraft is derived based on the comparison of the second status parameter with a predetermined first threshold value.
According to an embodiment of the invention, a first state parameter of an aircraft carrying a detachable first device is obtained. And obtaining a second state parameter related to the carrying states of the first equipment and the aircraft based on a preset state detection function. The on-board states of the first device and the aircraft include: a disconnected state and a connected state. The second state parameter is compared to a predetermined first threshold value. And obtaining the embarkation states of the first equipment and the aircraft based on the comparison result of the second state parameter and a predetermined first threshold value. The aircraft does not need a load sensor and uses a ground sensor to acquire data, the structural design difficulty and the manufacturing cost of the aircraft are reduced, and the external signal interference when the aircraft transmits data with the ground sensor is avoided, so that the accuracy of the carrying state detection of the aircraft and the first equipment is improved.
FIG. 2 is a flow chart of a method of detecting an aircraft including the steps of:
in step S201, a first state parameter of an aircraft is obtained, wherein a detachable first device is mounted on the aircraft.
It has been found that a series of third state parameters of the aircraft itself may be changed before and after separation of the first device from the aircraft. When the aircraft and the first device perform the separation action, the fixed-point state is entered, and the position and the posture are kept stable. At this time, the flight control system of the aircraft sends a separation command to the separation mechanism, and simultaneously sends a control command for increasing the throttle to the power system of the aircraft. The aircraft separation mechanism executes the separation operation of the aircraft and the first equipment according to the separation instruction, the total mass of the aircraft body of the aircraft changes suddenly at the separation moment, so that the vertical acceleration changes suddenly, and the aircraft climbs upwards in the sky by using the vertical acceleration generated by the first equipment; and the power system of the aircraft controls the aircraft to climb to the air according to the control instruction for increasing the throttle control quantity. Meanwhile, the output of PWM waves of a motor for driving the aircraft is different before and after the aircraft and the first device are separated.
In this step, sampled values of third state parameters of the aircraft carrying the detachable first device are acquired in real time. Wherein the third state parameter comprises at least one of the following state parameters: the total mass of the engine body, the vertical acceleration, the throttle control quantity and the PWM output of the motor. A predetermined number of consecutive sample values are selected from the sample values of the third state parameter. And calculating the average value of the selected continuous sampling values to obtain a first state parameter of the aircraft. An appropriate number of samples N (N > -10) can be selected according to the frequency of the navigation system. For example, when the frequency of the navigation system is high, the setting of the number of samples is large.
In step S202, the state detection function is established.
In this step, a state detection function is established. Fig. 3 is a flowchart of a method for detecting an aircraft, in particular, a flowchart for establishing a state detection function, according to an embodiment of the present invention. As shown in fig. 3, a state detection function is established, including:
step S301: and establishing an objective function of the state detection function based on an artificial intelligence algorithm.
Step S302: the objective function is trained based on the training samples.
Step S303: and verifying the target function based on the verification sample. If the verification result of the objective function is not qualified, step S304 is performed. If the verification result of the objective function is qualified, step S305 is performed.
Step S304: and adjusting and optimizing the objective function. After the objective function is adjusted and optimized, step S303 is performed to further verify the objective function.
Step S305: a state detection function is obtained.
Specifically, take unmanned aerial vehicle to carry on goods as an example.
First, an objective function of the state detection function is established based on an artificial intelligence algorithm, such as one of a neural network, a deep neural network, a decision tree, an SVM, and the like. Then, under the condition of carrying different quality goods, carry out the training of throwing goods to unmanned aerial vehicle, gather the numerical value of the first state parameter before throwing goods and after throwing goods, constitute training sample. And performing fitting training and machine learning on the target function based on the training samples.
In one example, the cargo mass on the unmanned aerial vehicle is set to be m, the vertical acceleration a, the throttle detection amount f and the PWM output p of four motors1,p2,p3,p4Obtaining N before and after the cargo throwing respectively1And N2(N1,N2>10000) first state parameters, the obtained training samples before the goods are:
the training samples after the cargo throwing are:
before the target function is trained based on the training sample, the data of the training sample can be preprocessed, for example, normalization processing is performed on each data of the training sample by using an open source machine learning framework TensorFlow, so as to ensure the reliability of the data participating in sample training, and the hyper-parameters such as the learning rate, the number of neural network layers, the number of hidden units and the like are debugged.
Based on training sample before and after the cargo, the target function is (m, a, f, p)1,p2,p3,p4) Fitting training and machine learning are carried out. And l is more than or equal to 0 in the state of throwing goods and less than 0 in the state of not throwing goods. Generally, the larger the number of samples adopted by artificial intelligence is, the more accurate the finally obtained state detection function is. In addition, sample training can be respectively carried out on different unmanned aerial vehicle models to obtain a state detection function applied to various unmanned aerial vehicle models.
Then, the drone collects new first state parameters to form verification samples, and the target function l is (m, a, f, p) based on the verification samples1,p2,p3,p4) And verifying, and adjusting and optimizing the objective function according to a verification result. And according to the verification result, if the accuracy of the target function for judging the carrying states of the unmanned aerial vehicle and the goods is unqualified, adjusting and optimizing the target function. According to the verification result, if the accuracy of the target function in judging the carrying states of the unmanned aerial vehicle and the goods is qualified, a state detection function for detecting the carrying states of the unmanned aerial vehicle and the goods is obtained. For example, collecting n before and after a dump1And n2A first state parameter constituting a verification sample (n)1,n2Not less than 100), the accuracy of the carrying state of the unmanned aerial vehicle and the goods is obtained through sample verification so as to verify the quality of the target function. In one embodiment, a determination criterion may be preset for determining the goodness of the objective function, and the objective function may be adjusted when the accuracy is lower than the criterion. Of course, even after the state detection function is applied to production, the state detection function can be continuously adjusted and optimized based on the accuracy of the state of the unmanned aerial vehicle and the cargo when the state detection function is used.
In step S203, the first state parameter is used as an input value of the state detection function, so as to obtain the second state parameter.
In this step, the first state parameter is used as an input value of the state detection function to obtain a second state parameter.
In step S204, the second state parameter is compared with a predetermined first threshold value.
In this step, the second state parameter is compared with a predetermined first threshold value. For example, the second state parameter is l ═ (m, a, f, p)1,p2,p3,p4) The first threshold value is 0.
In step S205, the embarkation statuses of the first device and the aircraft are obtained based on the comparison result.
In this step, the embarkation status of the first device and the aircraft is a detached status if the second status parameter is smaller than the first threshold value. And if the second state parameter is larger than or equal to the first threshold value, the embarkation state of the first equipment and the aircraft is a connection state. For example, if l is (m, a, f, p)1,p2,p3,p4) If the number is less than 0, the carrying state of the first equipment and the aircraft is a separation state. If l is (m, a, f, p)1,p2,p3,p4) And if the loading state of the first equipment and the aircraft is more than or equal to 0, the loading state of the first equipment and the aircraft is a connection state.
In an embodiment of the application, an objective function of the state detection function is established based on an artificial intelligence algorithm. The objective function is trained based on the training samples. And verifying the target function based on the verification sample. And adjusting and optimizing the target function according to the verification result to obtain a state detection function. The accuracy of the state detection function in detecting the carrying states of the aircraft and the first equipment is further improved.
In an alternative embodiment of the application, the next instruction is sent according to the embarkation state of the aircraft and the first device. For example, for the connection state and the disconnection state of the aircraft and the first device, if it is determined that the aircraft and the first device are in the connection state, the disconnection instruction is continuously sent to the disconnection mechanism of the aircraft to disconnect the first device from the aircraft. And if the aircraft and the first equipment are in the separated state, sending a flight instruction to a control system of the aircraft to control the aircraft to return. Further, in some aircraft designs, if it is determined that the aircraft and the first device are in a connected state, the detach command may be continuously sent until the first device and the aircraft are detached. In other designs, however, when the continuous sending time of the separation instruction exceeds the time threshold or the continuous sending times exceeds the time threshold, it is determined that the separation mechanism of the aircraft has a problem, and the aircraft is locked when the aircraft lands on the ground for maintenance.
Fig. 4 is a schematic structural diagram of a detection device of an aircraft according to an embodiment of the present invention. As shown in fig. 4, theapparatus 40 includes: a first state parameter acquisition unit 401, a second state parameter acquisition unit 402, a comparison unit 403, and a state detection unit 404.
A first state parameter acquiring unit 401 configured to acquire a first state parameter of an aircraft on which a detachable first device is mounted.
The unit is configured to obtain a first state parameter of an aircraft carrying a detachable first device.
A second state parameter obtaining unit 402 configured to obtain a second state parameter regarding the embarkation states of the first device and the aircraft based on a preset state detection function.
The unit is configured to derive a second state parameter regarding the onboard state of the first device and the aircraft based on a preset state detection function. The on-board states of the first device and the aircraft include: a disconnected state and a connected state.
A comparison unit 403 configured to compare the second state parameter with a predetermined first threshold.
The unit is configured to compare the second state parameter with a predetermined first threshold.
A state detection unit 404 configured to obtain the embarkation states of the first device and the aircraft based on a comparison result.
The unit is configured to derive the piggyback status of the first device and the aircraft based on a comparison of the second status parameter with a predetermined first threshold.
In an optional embodiment of the present application, the first status parameter obtaining unit 401 is configured to obtain in real time a sampled value of a third status parameter of an aircraft carrying the detachable first device. Wherein the third state parameter comprises at least one of the following state parameters: the total mass of the engine body, the vertical acceleration, the throttle control quantity and the PWM output of the motor. A predetermined number of consecutive sample values are selected from the sample values of the third state parameter. And calculating the average value of the selected continuous sampling values to obtain a first state parameter of the aircraft. An appropriate number of samples N (N > -10) can be selected according to the frequency of the navigation system. For example, when the frequency of the navigation system is high, the setting of the number of samples is large.
In an optional embodiment of the present application, the second state parameter obtaining unit 402 is configured to establish the state detection function; and taking the first state parameter as an input value of the state detection function to obtain the second state parameter.
Specifically, fig. 3 is a flowchart of a detection method of an aircraft according to an embodiment of the present invention, specifically, a flowchart of establishing a state detection function. As shown in fig. 3, a state detection function is established, including:
step S301: and establishing an objective function of the state detection function based on an artificial intelligence algorithm.
Step S302: the objective function is trained based on the training samples.
Step S303: and verifying the target function based on the verification sample. If the verification result of the objective function is not qualified, step S304 is performed. If the verification result of the objective function is qualified, step S305 is performed.
Step S304: and adjusting and optimizing the objective function. After the objective function is adjusted and optimized, step S303 is performed to further verify the objective function.
Step S305: a state detection function is obtained.
Specifically, take unmanned aerial vehicle to carry on goods as an example.
First, an objective function of the state detection function is established based on an artificial intelligence algorithm, such as one of a neural network, a deep neural network, a decision tree, an SVM, and the like. Then, under the condition of carrying different quality goods, carry out the training of throwing goods to unmanned aerial vehicle, gather the numerical value of the first state parameter before throwing goods and after throwing goods, constitute training sample. And performing fitting training and machine learning on the target function based on the training samples.
In one example, the cargo mass on the unmanned aerial vehicle is set to be m, the vertical acceleration a, the throttle detection amount f and the PWM output p of four motors1,p2,p3,p4Obtaining N before and after the cargo throwing respectively1And N2(N1,N2>10000) first state parameters, the obtained training samples before the goods are:
the training samples after the cargo throwing are:
before the target function is trained based on the training sample, the data of the training sample can be preprocessed, for example, normalization processing is performed on each data of the training sample by using an open source machine learning framework TensorFlow, so as to ensure the reliability of the data participating in sample training, and the hyper-parameters such as the learning rate, the number of neural network layers, the number of hidden units and the like are debugged.
Based on training sample before and after the cargo, the target function is (m, a, f, p)1,p2,p3,p4) Fitting training and machine learning are carried out. And l is more than or equal to 0 in the state of throwing goods and less than 0 in the state of not throwing goods. In general, artificial intelligenceThe larger the number of samples used, the more accurate the resulting state detection function. In addition, sample training can be respectively carried out on different unmanned aerial vehicle models to obtain a state detection function applied to various unmanned aerial vehicle models.
Then, the drone collects new first state parameters to form verification samples, and the target function l is (m, a, f, p) based on the verification samples1,p2,p3,p4) And verifying, and adjusting and optimizing the objective function according to a verification result. And according to the verification result, if the accuracy of the target function for judging the carrying states of the unmanned aerial vehicle and the goods is unqualified, adjusting and optimizing the target function. According to the verification result, if the accuracy of the target function in judging the carrying states of the unmanned aerial vehicle and the goods is qualified, a state detection function for detecting the carrying states of the unmanned aerial vehicle and the goods is obtained. For example, collecting n before and after a dump1And n2A first state parameter constituting a verification sample (n)1,n2Not less than 100), the accuracy of the carrying state of the unmanned aerial vehicle and the goods is obtained through sample verification so as to verify the quality of the target function. In one embodiment, a determination criterion may be preset for determining the goodness of the objective function, and the objective function may be adjusted when the accuracy is lower than the criterion. Of course, even after the state detection function is applied to production, the state detection function can be continuously adjusted and optimized based on the accuracy of the state of the unmanned aerial vehicle and the cargo when the state detection function is used.
In an optional embodiment of the present application, the comparing unit 403 is configured to compare the second state parameter with a predetermined first threshold. For example, the second state parameter is l ═ (m, a, f, p)1,p2,p3,p4) The first threshold value is 0.
In an optional embodiment of the application, the status detection unit 404 is configured to determine that the embarkation status of the first device and the aircraft is a detached status if the second status parameter is smaller than a first threshold value. If the second state parameter is larger than or equal to the first threshold value, the embarkation state of the first equipment and the aircraftIs in a connected state. For example, if l is (m, a, f, p)1,p2,p3,p4) If the number is less than 0, the carrying state of the first equipment and the aircraft is a separation state. If l is (m, a, f, p)1,p2,p3,p4) And if the loading state of the first equipment and the aircraft is more than or equal to 0, the loading state of the first equipment and the aircraft is a connection state.
Fig. 5 is a block diagram of a detection control apparatus of an aircraft according to an embodiment of the present invention. The apparatus shown in fig. 5 is only an example and should not limit the functionality and scope of use of embodiments of the present invention in any way.
Referring to fig. 5, the apparatus includes a processor 501, a memory 502, and an input-output device 503, which are connected by a bus. Memory 502 includes Read Only Memory (ROM) and Random Access Memory (RAM), with various computer instructions and data required to perform system functions being stored in memory 502, and with various computer instructions being read by processor 501 from memory 502 to perform various appropriate actions and processes. An input/output device including an input portion of a keyboard, a mouse, and the like; an output section including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section including a hard disk and the like; and a communication section including a network interface card such as a LAN card, a modem, or the like. The memory 502 also stores the following computer instructions to perform the operations specified by the aircraft detection method of the embodiment of the invention: acquiring a first state parameter of an aircraft, wherein a separable first device is carried on the aircraft; obtaining a second state parameter related to the carrying states of the first equipment and the aircraft based on a preset state detection function; comparing the second state parameter to a predetermined first threshold; and obtaining the embarkation states of the first equipment and the aircraft based on the comparison result.
Accordingly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that, when executed, implement the operations specified by the above-described aircraft detection method.
The flowcharts and block diagrams in the figures and block diagrams illustrate the possible architectures, functions, and operations of the systems, methods, and apparatuses according to the embodiments of the present invention, and may represent a module, a program segment, or merely a code segment, which is an executable instruction for implementing a specified logical function. It should also be noted that the executable instructions that implement the specified logical functions may be recombined to create new modules and program segments. The blocks of the drawings, and the order of the blocks, are thus provided to better illustrate the processes and steps of the embodiments and should not be taken as limiting the invention itself.
The above description is only a few embodiments of the present invention, and is not intended to limit the present invention, and various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.