A magnetic suspension track tracking detection system and method based on a unmanned aerial vehicle platform
By integrating positioning and mapping, laser ranging, and track tracking control modules into the UAV platform, and combining them with the improved YOLOv5 model, efficient and accurate automatic detection of magnetic levitation tracks was achieved, solving the problems of low efficiency and poor safety of traditional detection methods.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2023-06-15
- Publication Date
- 2026-06-26
Smart Images

Figure CN116795134B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a magnetic levitation track tracking and detection system and method based on an UAV platform. Background Technology
[0002] Maglev trains are undergoing rapid development, with many countries worldwide researching the technology and establishing numerous maglev railway test lines. As maglev technology advances, track safety, which is closely related to it, cannot be ignored. Maglev lines based on F-type tracks experience increased joint width and step height due to factors such as settlement and wear, affecting train operation safety. Furthermore, automatic control technology for rail transit plays an increasingly important role in train operation and the safe and efficient operation of trains. For automatic control systems, train positioning and track condition monitoring are fundamental to control.
[0003] Currently, most methods for controlling and inspecting tracks are traditional track inspection methods. These methods rely mainly on a combination of manual labor and track inspection instruments, which results in low inspection efficiency, unsafe manual high-altitude operations, and a high rate of misjudgment. Summary of the Invention
[0004] Therefore, it is necessary to provide a magnetic levitation track tracking and detection system and method based on an unmanned aerial vehicle (UAV) platform that can improve the efficiency of track tracking and detection, in order to address the above-mentioned technical problems.
[0005] A magnetic levitation track tracking and detection system based on an unmanned aerial vehicle (UAV) platform, the system being loaded onto the UAV, the system comprising a positioning and mapping module, a laser ranging module, a track tracking control module, a track tracking detection module, and PX4 firmware;
[0006] The positioning and mapping module is used to acquire the location and environmental information of the UAV and, based on the environmental information, to create an occupancy grid map containing orbital information in the plane at the UAV's flight altitude.
[0007] The laser ranging module is used to install multiple miniature laser ranging sensors at different positions of the UAV in the occupied grid map to form a laser ranging array. Based on the laser ranging principle, it calculates the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change of the UAV and the track plane.
[0008] The orbit tracking control module is used to design a virtual guiding force based on the offset distance, design the lateral acceleration of the UAV based on the virtual guiding force, calculate the lateral acceleration to obtain the velocity expectation, set the roll expectation value of the UAV attitude controller using the velocity expectation value, and input the roll expectation value into the UAV through the PX4 firmware to complete the orbit tracking control.
[0009] The orbit tracking control module also designs the UAV's heading expectation based on the yaw angle; uses the heading expectation to set the heading expectation value of the UAV's attitude controller; and inputs the heading expectation value into the UAV through the PX4 firmware to complete the orbit heading tracking control.
[0010] The orbit tracking control module also designs the drone's altitude expectation based on the altitude change between the drone and the orbital plane; uses the altitude expectation to set the expected value of the drone's altitude controller; and inputs the altitude expectation value into the drone through the PX4 firmware to complete altitude holding control.
[0011] The orbit detection module is used to improve the pre-acquired YOLOv5 model during orbit tracking to obtain an orbit detection model; and to perform real-time orbit detection on the orbit images captured by the UAV based on the orbit detection model.
[0012] In one embodiment, the laser ranging module is further configured to calculate the offset distance between the matrix array and the track being measured based on the laser ranging principle, including:
[0013] The offset distance between the matrix array and the track being measured is calculated based on the principle of laser ranging.
[0014]
[0015] Δy=yy d
[0016] Where d1, d2, d3, d4, and d5 are the distances between the UAV and the track measured by the five laser rangefinders, and Δy represents the deviation distance. d y represents the distance between the drone and the pre-set orbit, and y represents the distance between the drone and the target being measured.
[0017] In one embodiment, the track tracking control module is further configured to design a virtual guiding force based on the offset distance, including:
[0018] The virtual guiding force is designed based on the offset distance.
[0019]
[0020] Where k is the proportionality parameter, δ, d w w represents different design parameters, L represents the lateral height of the maglev track, and Δy represents the offset distance. This represents the lateral offset speed of the drone relative to its orbit.
[0021] In one embodiment, the orbit tracking control module is further configured to design the lateral acceleration of the UAV based on the virtual guidance force, including:
[0022] The lateral acceleration of the UAV is designed based on virtual guidance force.
[0023]
[0024] Where k is the proportionality parameter, δ, d w Where w represents different design parameters, L represents the side height of the maglev track, Δy represents the offset distance, and d represents the width of the track gap. M represents the lateral offset velocity of the drone from the track, and M represents the mass of the drone.
[0025] In one embodiment, the track tracking control module is further configured to calculate the lateral acceleration to obtain a velocity expectation, including:
[0026] The lateral acceleration is calculated to obtain the expected velocity.
[0027]
[0028] In one embodiment, the orbit tracking control module is further configured to set the roll expectation value of the UAV attitude controller using the velocity expectation, including:
[0029] The desired roll value of the UAV attitude controller is set using the desired velocity.
[0030]
[0031]
[0032] Where, φ c For the expected value of the rollover, Let A be the current lateral velocity, g be the acceleration due to gravity, and A be the acceleration due to gravity. ψ Let k be the state matrix. p ,k i ,k d These are the proportional, integral, and derivative control parameters of the PID controller.
[0033] In one embodiment, the laser ranging module is also used to calculate the yaw angle, including,
[0034] When the drone enters a curve in its tracking track, the drone yaws off the track. The expected yaw angle of the drone relative to the track is...
[0035]
[0036] in, Let l1 be the desired heading angle, l2 be the distance between the two laser rangefinders placed on the upper left and upper right of the UAV, and l2 be the distance between the two laser rangefinders placed on the lower left and lower right of the UAV.
[0037] In one embodiment, the orbit tracking control module is further configured to design the desired value of the UAV altitude control channel based on the distance measurements taken by the four laser rangefinders mounted on the UAV, as follows:
[0038] When d1, d2 >> y d &&d3,d4≈y d At that time, set the desired height h c =h - △h;
[0039] When d1,d2≈y d &&d3,d4>>y d At that time, set the desired height h c =h + Δh;
[0040] When d1,d2≈y d &&d3,d4≈y d At that time, set the desired height h c =h;
[0041] Where h is the current flight altitude of the drone, and Δh is the expected change in altitude set by the user, which is generally a positive constant.
[0042] In one embodiment, the orbit detection module is further configured to improve the pre-acquired YOLOv5 model during orbit tracking to obtain an orbit detection model, including:
[0043] Add small object detection layers to layers 18 to 24 and 31 of the YOLOv5 model to obtain the initial object detection model;
[0044] The CBAM mechanism model is inserted into the initial object detection model, and the CNN network in the initial object detection model is trained end-to-end to obtain the first candidate object detection model;
[0045] In the first candidate object detection model, if a node is only connected to one input node and does not perform feature fusion with other nodes, the node is deleted. When the original input node and output node in the model are in the same layer, an extra edge is added between them to perform multi-feature fusion, resulting in a feature fusion improved model. In the Common.py model component of the feature fusion improved model, a connection module is defined, and then the test file and configuration file are modified to add a weighted bidirectional feature pyramid. Based on the weighted bidirectional feature pyramid, each bidirectional path from top to bottom and from bottom to top is regarded as a feature network layer, and the same layer is repeated multiple times to obtain the second candidate object detection model.
[0046] A Transformer module is added to the second candidate target detection model. The model with the Transformer module is trained based on the pre-acquired training set to obtain the track detection model.
[0047] A method for tracking and detecting magnetic levitation tracks based on an unmanned aerial vehicle (UAV) platform, the method comprising:
[0048] Acquire the location and environmental information of the UAV and build an occupancy grid map containing orbital information in the plane at the UAV's flight altitude based on the environmental information;
[0049] In the occupied grid map, multiple miniature laser ranging sensors are installed at different positions of the UAV to form a laser ranging array. Based on the laser ranging principle, the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change of the UAV and the track plane are calculated.
[0050] The virtual guiding force is designed based on the offset distance, and the lateral acceleration of the UAV is designed based on the virtual guiding force. The lateral acceleration is calculated to obtain the velocity expectation. The roll expectation value of the UAV attitude controller is set using the velocity expectation value. The roll expectation value is input into the UAV through the PX4 firmware to complete the orbit tracking control.
[0051] The desired heading of the UAV is designed based on the yaw angle; the desired heading value of the UAV attitude controller is set using the desired heading value; the desired heading value is input into the UAV through the PX4 firmware to complete the orbital heading tracking control;
[0052] The desired altitude of the drone is designed based on the altitude change between the drone and the orbital plane; the desired value of the drone's altitude controller is set using the desired altitude; the desired altitude value is input into the drone via PX4 firmware to complete altitude holding control;
[0053] During the orbit tracking process, the pre-acquired YOLOv5 model is improved to obtain an orbit detection model; real-time orbit detection is performed on the orbit images captured by the UAV based on the orbit detection model.
[0054] The aforementioned magnetic levitation track tracking and detection system and method based on an unmanned aerial vehicle (UAV) platform, as described above, involves mounting a magnetic levitation track tracking and detection system on the UAV. The system includes a mapping module to acquire the UAV's position and environmental information, and to create an occupancy grid map containing track information within the plane of the UAV's flight altitude based on the environmental information. A laser ranging module is installed on the occupancy grid map, with multiple miniature laser ranging sensors mounted at different positions on the UAV to form a laser ranging array. The offset distance between the matrix array and the track being measured is calculated based on the laser ranging principle. A track tracking control module is set up to design roll expectation values, heading expectation values, and altitude expectation values to complete track tracking control. Finally, a track detection module is used to improve the pre-acquired YOLOv5 model during track tracking to obtain a track detection model. Real-time track detection is performed on track images captured by the UAV based on the track detection model. By using a UAV-mounted magnetic levitation track tracking and detection system, stable track tracking and continuous detection are achieved without manual intervention, significantly improving the efficiency and accuracy of track detection. Attached Figure Description
[0055] Figure 1 This is a framework diagram of a magnetic levitation track tracking and detection system based on an unmanned aerial vehicle (UAV) platform in one embodiment;
[0056] Figure 2 This is a schematic diagram of a laser ranging module in one embodiment;
[0057] Figure 3 This is a schematic diagram of the flight trajectory of a UAV performing orbit tracking control in one embodiment;
[0058] Figure 4 This is a schematic diagram of the attitude control process for UAV orbit tracking control in another embodiment;
[0059] Figure 5 This is a flowchart illustrating a magnetic levitation track tracking and detection method based on an unmanned aerial vehicle (UAV) platform in one embodiment.
[0060] Figure 6 This is a schematic diagram illustrating the target detection effect of a magnetic levitation track in one embodiment;
[0061] Figure 7 This is a schematic side view of the track joint in one embodiment. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0063] In one embodiment, such asFigure 1 As shown, a magnetic levitation track tracking and detection system based on an unmanned aerial vehicle (UAV) platform is provided. The system is loaded on the UAV and includes a positioning and mapping module 102, a laser ranging module 104, a track tracking control module 106, a track tracking detection module 108, and PX4 firmware 110.
[0064] The positioning and mapping module 102 is used to acquire the location information and environmental information of the UAV and to build an occupancy grid map containing orbital information in the plane of the UAV's flight altitude based on the environmental information.
[0065] A crucial prerequisite for UAVs to achieve orbit tracking and controlled flight is the ability to obtain their own position and environmental information in real time, i.e., simultaneous localization and mapping. The localization and mapping module is set up in the plane of the UAV's flight altitude to create an occupancy grid map containing orbital information. This module includes the RealSense localization and mapping sensor. The sensor consists of a D435i depth camera and a T265 tracking camera, enabling real-time position acquisition. The D435i camera primarily consists of a pair of infrared sensors (IR Stereo Cameras), an infrared laser projector, and a color camera, outputting high-resolution color images and infrared distance images to create a point cloud of the surrounding environment, serving as a basis for path planning. The T265 camera is a binocular sensor with VIO-SLAM capabilities, mainly composed of two wide-angle fisheye cameras and an inertial navigation unit (IMU). Its core function is to obtain the UAV's real-time position information.
[0066] The combination of the D435i and T265 cameras can effectively overcome errors caused by severe shaking and sensor noise, and has better robustness compared to LiDAR.
[0067] The laser ranging module 104 is used to install multiple miniature laser ranging sensors at different positions of the UAV in the occupied grid map to form a laser ranging array. Based on the laser ranging principle, it calculates the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change of the UAV and the track plane.
[0068] The laser ranging matrix module mounted on the drone in the grid map consists of five miniature laser ranging sensors, installed in the upper left, upper right, middle, lower left, and lower right positions of the drone, respectively. Figure 2 As shown, the drones are arranged in an array. Based on the principle of laser ranging, the relative distances between the five positions and the target are obtained. This allows for the accurate determination of the relative distance and deviation between the drone's fuselage hub and the target, the yaw angle between the drone and the track, and the height change between the drone and the track plane.
[0069] Meanwhile, the laser ranging module also includes a high-definition camera. This camera reads the number of pixels n and m corresponding to the track joint d and the track height difference h, respectively. Through proportional calculation, h = m * h\n. To address the camera shake issue, the stability of both the drone itself and the camera will be improved. This involves optimizing the drone's flight control algorithm and adding a camera gimbal, which can stabilize the drone's onboard camera.
[0070] The orbit tracking control module 106 is used to design a virtual guiding force based on the offset distance, design the lateral acceleration of the UAV based on the virtual guiding force, calculate the lateral acceleration to obtain the velocity expectation, set the roll expectation value of the UAV attitude controller using the velocity expectation value, and input the roll expectation value into the UAV through the PX4 firmware to complete the orbit tracking control.
[0071] Multi-rotor UAVs used for orbit detection need to track an orbit and maintain a relative distance from the target being measured, such as... Figure 3 As shown, a track tracking control module is therefore set up. This module first designs a virtual guiding force based on the offset distance. Under suitable parameters, the virtual guiding force can maintain good stiffness and damping, ensuring that the UAV accurately tracks the trajectory under its influence. The virtual guiding force generates lateral acceleration, which is then integrated to obtain the lateral velocity.
[0072] Using the lateral velocity as the desired velocity of the multi-rotor UAV on the y-axis, a position control algorithm for maintaining the distance between the multi-rotor UAV and its orbit is formed. The roll expectation value of the UAV's attitude controller is set based on the velocity expectation, and the heading expectation value of the UAV is designed based on the yaw angle. The heading expectation value of the UAV's attitude controller is then set using the heading expectation value. The altitude expectation value of the UAV is designed based on the change in altitude between the UAV and the orbital plane. Finally, the altitude expectation value of the UAV's altitude controller is set using the altitude expectation value. Figure 4 As shown, by inputting the expected roll value, expected heading value, and expected altitude value into the UAV to control the UAV's flight attitude, stable control of the UAV can be achieved to complete the effective tracking of the flight path.
[0073] The orbit detection module 108 is used to improve the pre-acquired YOLOv5 model during the orbit tracking process to obtain the orbit detection model; and to perform real-time orbit detection on the orbit images captured by the UAV based on the orbit detection model.
[0074] Real-time track detection is required during track tracking. Therefore, the pre-acquired YOLOv5 model is improved. One reason why the YOLOv5 model performs poorly in small target detection is its large sampling factor, while the sample size of small targets is small, making it difficult for deeper feature maps to learn the feature information of small targets. This application adds a small target detection layer to layers 18 to 24 of the YOLOv5 model to process images containing small targets and expand their feature maps to facilitate feature extraction. A small target detection layer is added to layer 31 of the network, the detection layer. The improved model uses a total of four layers, namely [21, 24, 27, 30], for detection.
[0075] By inserting the CBAM mechanism into the initial object detection model, which can be seamlessly integrated into any neural network architecture and trained end-to-end synchronously with the basic CNN network, a first-candidate object detection model is obtained. In this first-candidate model, an intermediate feature F(H×W×C) is used as the output of the convolutional layer. Depending on the layer depth, each such feature layer captures useful information, such as simple edges and shapes, enabling the acquisition of more complex semantic representations of the input. Using CBAM helps the model extract attention regions, helping YOLOv5 resist irrelevant information and focus attention on the features of the target object, thus improving the accuracy of feature extraction.
[0076] The first candidate target detection model is improved by feature fusion. A weighted bidirectional feature pyramid is added to the model to enhance the model's feature fusion capability for targets of different scales, simplify the multi-scale feature fusion method, and improve the speed, making the model's detection performance more efficient. General feature fusion mainly treats features of different scales equally, while weights are introduced in the weighted bidirectional feature pyramid to better balance feature information of different scales and improve the model's detection accuracy.
[0077] The YOLOv5 backbone feature extraction network is a CNN network. CNN networks have the characteristics of translation invariance and locality, but lack the ability to model long distances and the world. To solve this problem, this application introduces a Transformer module, thus forming a CNN+Transformer architecture. This architecture can give full play to the advantages of both and achieve the goal of improving the target detection effect. Furthermore, loss functions and training sets are set to train the model after adding the Transformer module. The structural loss function and feature loss function improve the efficiency and robustness of model training and the accuracy of feature extraction, thereby improving the accuracy of orbital target detection.
[0078] Real-time track detection based on UAV-captured images using a track detection model involves detecting track seams, steps, and track side surfaces in photos taken by the UAV's onboard camera. The system also reads the number of pixels (X) corresponding to the track side surface height, and the number of pixels (n, m) corresponding to the track seam length (d) and track height difference (h). Through proportional calculations, the sizes of the track seams and steps can be obtained.
[0079]
[0080] Among them, the target detection effect of the magnetic levitation track is as follows: Figure 6 As shown, the side view of the track joint is as follows. Figure 7 As shown.
[0081] In the aforementioned magnetic levitation track tracking and detection system based on an unmanned aerial vehicle (UAV) platform, this application integrates a magnetic levitation track tracking and detection system onto the UAV. The system includes a mapping module to acquire the UAV's position and environmental information, and to create an occupancy grid map containing track information within the plane of the UAV's flight altitude based on the environmental information. A laser ranging module is installed on the occupancy grid map, with multiple miniature laser ranging sensors mounted at different positions on the UAV to form a laser ranging array. The offset distance between the matrix array and the track being measured is calculated based on the laser ranging principle. A track tracking control module designs roll expectation, heading expectation, and altitude expectation values to complete track tracking control. Finally, a track detection module improves the pre-acquired YOLOv5 model during track tracking to obtain a track detection model. Real-time track detection is performed on track images captured by the UAV based on the track detection model. By utilizing the magnetic levitation track tracking and detection system mounted on the UAV, stable track tracking and continuous detection are achieved without manual intervention, significantly improving the efficiency and accuracy of track detection.
[0082] In one embodiment, the laser ranging module is further configured to calculate the offset distance between the matrix array and the track being measured based on the laser ranging principle, including:
[0083] The offset distance between the matrix array and the track being measured is calculated based on the laser ranging principle.
[0084]
[0085] Δy=yy d
[0086] Where d1, d2, d3, d4, and d5 are the distances between the UAV and the track measured by the five laser rangefinders, and Δy represents the deviation distance. d y represents the distance between the drone and the pre-set orbit, and y represents the distance between the drone and the target being measured.
[0087] In one embodiment, the track tracking control module is further configured to design a virtual guiding force based on the offset distance, including:
[0088] The virtual guiding force is designed based on the offset distance.
[0089]
[0090] Where k is the proportionality parameter, δ, d w w represents different design parameters, L represents the lateral height of the maglev track, and Δy represents the offset distance. This represents the lateral offset speed of the drone relative to its orbit.
[0091] In one embodiment, the orbit tracking control module is further configured to design the lateral acceleration of the UAV based on the virtual guidance force, including:
[0092] The lateral acceleration of the UAV is designed based on virtual guidance force.
[0093]
[0094] Where k is the proportionality parameter, δ, d w Where w represents different design parameters, L represents the side height of the maglev track, Δy represents the offset distance, and d represents the width of the track gap. M represents the lateral offset velocity of the drone from the track, and M represents the mass of the drone.
[0095] In one embodiment, the track tracking control module is further configured to calculate the lateral acceleration to obtain a velocity expectation, including:
[0096] The lateral acceleration is calculated to obtain the expected velocity.
[0097]
[0098] In one embodiment, the orbit tracking control module is further configured to set the roll expectation value of the UAV attitude controller using the velocity expectation, including:
[0099] The desired roll value of the UAV attitude controller is set using the desired velocity.
[0100]
[0101]
[0102] Where, φ c For the expected value of the rollover, Let A be the current lateral velocity, g be the acceleration due to gravity, and A be the acceleration due to gravity. ψ Let k be the state matrix. p ,k i ,kd These are the proportional, integral, and derivative control parameters of the PID controller.
[0103] In one embodiment, the laser ranging module is also used to calculate the yaw angle, including,
[0104] When the drone enters a curve in its tracking track, the drone yaws off the track. The expected yaw angle of the drone relative to the track is...
[0105]
[0106] in, Let l1 be the desired heading angle, l2 be the distance between the two laser rangefinders placed on the upper left and upper right of the UAV, and l2 be the distance between the two laser rangefinders placed on the lower left and lower right of the UAV.
[0107] In one embodiment, the orbit tracking control module is further configured to design the desired value of the UAV altitude control channel based on the distance measurements taken by the four laser rangefinders mounted on the UAV, as follows:
[0108] When d1, d2 >> y d &&d3,d4≈y d At that time, set the desired height h c =h - △h;
[0109] When d1,d2≈y d &&d3,d4>>y d At that time, the desired height is set as hc = h + Δh;
[0110] When d1,d2≈y d &&d3,d4≈y d At that time, the desired height is set to hc = h;
[0111] Where h is the current flight altitude of the drone, and Δh is the expected change in altitude set by the user, which is generally a positive constant.
[0112] In one embodiment, the orbit detection module is further configured to improve the pre-acquired YOLOv5 model during orbit tracking to obtain an orbit detection model, including:
[0113] Add small object detection layers to layers 18 to 24 and 31 of the YOLOv5 model to obtain the initial object detection model;
[0114] The CBAM mechanism model is inserted into the initial object detection model, and the CNN network in the initial object detection model is trained end-to-end to obtain the first candidate object detection model;
[0115] In the first candidate object detection model, if a node is only connected to one input node and does not perform feature fusion with other nodes, the node is deleted. When the original input node and output node in the model are in the same layer, an extra edge is added between them to perform multi-feature fusion, resulting in a feature fusion improved model. In the Common.py model component of the feature fusion improved model, a connection module is defined, and then the test file and configuration file are modified to add a weighted bidirectional feature pyramid. Based on the weighted bidirectional feature pyramid, each bidirectional path from top to bottom and from bottom to top is regarded as a feature network layer, and the same layer is repeated multiple times to obtain the second candidate object detection model.
[0116] A Transformer module is added to the second candidate target detection model. The model with the Transformer module is trained based on the pre-acquired training set to obtain the track detection model.
[0117] In one embodiment, such as Figure 5 As shown, a magnetic levitation track tracking and detection method based on an unmanned aerial vehicle (UAV) platform is provided, including:
[0118] Step 502: Obtain the location and environmental information of the UAV and build an occupancy grid map containing orbital information in the plane at the UAV's flight altitude based on the environmental information.
[0119] Step 504: Install multiple miniature laser ranging sensors at different positions on the UAV in the occupied grid map to form a laser ranging array. Calculate the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change between the UAV and the track plane based on the laser ranging principle.
[0120] Step 506: Design a virtual guiding force based on the offset distance, design the lateral acceleration of the UAV based on the virtual guiding force, calculate the lateral acceleration to obtain the velocity expectation, use the velocity expectation to set the roll expectation value of the UAV attitude controller, and input the roll expectation value into the UAV through the PX4 firmware to complete the orbit tracking control.
[0121] Step 508: Design the desired heading of the UAV based on the yaw angle; set the desired heading value of the UAV attitude controller using the desired heading value; input the desired heading value into the UAV through the PX4 firmware to complete the orbital heading tracking control.
[0122] Step 510: Design the desired altitude of the UAV based on the altitude change between the UAV and the orbital plane; use the desired altitude to set the desired value of the UAV altitude controller; input the desired altitude value into the UAV through the PX4 firmware to complete altitude holding control.
[0123] Step 512: Improve the pre-acquired YOLOv5 model during the orbit tracking process to obtain the orbit detection model; perform real-time orbit detection on the orbit images captured by the UAV based on the orbit detection model.
[0124] In one embodiment, the calculation of the offset distance between the matrix array and the track being measured based on the laser ranging principle includes:
[0125] The offset distance between the matrix array and the track being measured is calculated based on the laser ranging principle.
[0126]
[0127] Δy=yy d
[0128] Where d1, d2, d3, d4, and d5 are the distances between the UAV and the track measured by the five laser rangefinders, and Δy represents the deviation distance. d y represents the distance between the drone and the pre-set orbit, and y represents the distance between the drone and the target being measured.
[0129] In one embodiment, the virtual guiding force is designed based on the offset distance, including:
[0130] The virtual guiding force is designed based on the offset distance.
[0131]
[0132] Where k is the proportionality parameter, δ, d w w represents different design parameters, L represents the lateral height of the maglev track, and Δy represents the offset distance. This represents the lateral offset speed of the drone relative to its orbit.
[0133] In one embodiment, designing the lateral acceleration of the drone based on the virtual guidance force includes:
[0134] The lateral acceleration of the UAV is designed based on virtual guidance force.
[0135]
[0136] Where k is the proportionality parameter, δ, d w Where w represents different design parameters, L represents the side height of the maglev track, Δy represents the offset distance, and d represents the width of the track gap. M represents the lateral offset velocity of the drone from the track, and M represents the mass of the drone.
[0137] In one embodiment, the lateral acceleration is calculated to obtain the velocity expectation, including:
[0138] The lateral acceleration is calculated to obtain the expected velocity.
[0139]
[0140] In one embodiment, the roll expectation value of the UAV attitude controller is set using the velocity expectation, including:
[0141] The desired roll value of the UAV attitude controller is set using the desired velocity.
[0142]
[0143]
[0144] Where, φ c For the expected value of the rollover, Let A be the current lateral velocity, g be the acceleration due to gravity, and A be the acceleration due to gravity. ψ Let k be the state matrix. p ,k i ,k d These are the proportional, integral, and derivative control parameters of the PID controller.
[0145] In one embodiment, the yaw angle is calculated, including,
[0146] When the drone enters a curve in its tracking track, the drone yaws off the track. The expected yaw angle of the drone relative to the track is...
[0147]
[0148] in, Let l1 be the desired heading angle, l2 be the distance between the two laser rangefinders placed on the upper left and upper right of the UAV, and l2 be the distance between the two laser rangefinders placed on the lower left and lower right of the UAV.
[0149] In one embodiment, based on the distance measurements from the four laser rangefinders installed on the UAV, the desired value for the UAV altitude control channel is designed as follows:
[0150] When d1, d2 >> y d &&d3,d4≈y d At that time, set the desired height h c =h - △h;
[0151] When d1,d2≈y d &&d3,d4>>y d At that time, set the desired height h c =h + Δh;
[0152] When d1,d2≈y d &&d3,d4≈yd At that time, set the desired height h c =h;
[0153] Where h is the current flight altitude of the drone, and Δh is the expected change in altitude set by the user, which is generally a positive constant.
[0154] In one embodiment, the pre-acquired YOLOv5 model is improved during orbit tracking to obtain an orbit detection model, including:
[0155] Add small object detection layers to layers 18 to 24 and 31 of the YOLOv5 model to obtain the initial object detection model;
[0156] The CBAM mechanism model is inserted into the initial object detection model, and the CNN network in the initial object detection model is trained end-to-end to obtain the first candidate object detection model;
[0157] In the first candidate object detection model, if a node is only connected to one input node and does not perform feature fusion with other nodes, the node is deleted. When the original input node and output node in the model are in the same layer, an extra edge is added between them to perform multi-feature fusion, resulting in a feature fusion improved model. In the Common.py model component of the feature fusion improved model, a connection module is defined, and then the test file and configuration file are modified to add a weighted bidirectional feature pyramid. Based on the weighted bidirectional feature pyramid, each bidirectional path from top to bottom and from bottom to top is regarded as a feature network layer, and the same layer is repeated multiple times to obtain the second candidate object detection model.
[0158] A Transformer module is added to the second candidate target detection model. The model with the Transformer module is trained based on the pre-acquired training set to obtain the track detection model.
[0159] It should be understood that, although Figure 5 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0160] For specific limitations on a magnetic levitation track tracking and detection method based on an unmanned aerial vehicle (UAV) platform, please refer to the limitations on a device for a magnetic levitation track tracking and detection method based on an UAV platform mentioned above.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A magnetic levitation track tracking and detection system based on an unmanned aerial vehicle (UAV) platform, the system being mounted on the UAV, characterized in that, The system includes a positioning and mapping module, a laser ranging module, a track tracking control module, a track tracking detection module, and PX4 firmware; The positioning and mapping module is used to acquire the location information and environmental information of the UAV and, based on the environmental information, to build an occupancy grid map containing orbital information in the plane of the UAV's flight altitude. The laser ranging module is used to install multiple miniature laser ranging sensors at different positions of the UAV in the occupied grid map to form a laser ranging array, and calculates the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change of the UAV and the track plane according to the laser ranging principle. The orbit tracking control module is used to design a virtual guiding force based on the offset distance, design the lateral acceleration of the UAV based on the virtual guiding force, calculate the lateral acceleration to obtain the speed expectation, set the roll expectation value of the UAV attitude controller using the speed expectation value, and input the roll expectation value into the UAV through the PX4 firmware to complete the orbit tracking control. The orbit tracking control module also designs the desired heading of the UAV based on the yaw angle; sets the desired heading value of the UAV attitude controller using the desired heading value; and inputs the desired heading value into the UAV through the PX4 firmware to complete the orbit heading tracking control. The orbit tracking control module also designs the drone's altitude expectation based on the altitude change between the drone and the orbital plane; sets the expected value of the drone's altitude controller using the altitude expectation; and inputs the altitude expectation value into the drone through the PX4 firmware to complete altitude holding control. The orbit detection module is used to improve the pre-acquired YOLOv5 model during the orbit tracking process to obtain an orbit detection model; and to perform real-time orbit detection on the orbit images captured by the UAV based on the orbit detection model. The track tracking control module is also used to design a virtual guiding force based on the offset distance, including: Based on the aforementioned offset distance, the virtual guiding force is designed as follows: in, k For proportional parameters, , , For different design parameters, L The height of the maglev track side. This is the offset distance. The lateral offset velocity of the drone from the track; The track tracking control module is also used to calculate the lateral acceleration to obtain the velocity expectation, including: The lateral acceleration is calculated to obtain the expected velocity. in, M Indicates the quality of the drone; The orbit tracking control module is also used to set the roll expectation value of the UAV attitude controller using the speed expectation, including: The desired roll value of the UAV attitude controller is set using the desired speed. in, For the expected value of the rollover, The current lateral velocity, It is the acceleration due to gravity. The state matrix, These are the proportional, integral, and derivative control parameters of the PID controller.
2. The system according to claim 1, characterized in that, The laser ranging module is also used to calculate the offset distance between the matrix array and the track being measured based on the laser ranging principle, including: The offset distance between the matrix array and the track being measured is calculated based on the principle of laser ranging. in, The distance between the drone and its orbit was measured by five laser rangefinders. Indicates the distance of deviation. This indicates the pre-set distance between the drone and the orbit. This indicates the distance between the drone and the target being measured.
3. The system according to claim 1, characterized in that, The orbit tracking control module is also used to design the lateral acceleration of the UAV based on the virtual guidance force, including: The lateral acceleration of the UAV is designed based on the virtual guiding force. in, k For proportional parameters, , , For different design parameters, L The height of the maglev track side. This is the offset distance. This refers to the width of the gap between the tracks on the magnetic levitation track. The lateral offset velocity of the drone relative to the track. M This indicates the quality of the drone.
4. The system according to claim 1, characterized in that, The laser ranging module is also used to calculate the yaw angle, including, When the drone enters a curve in its tracking track, the drone yaws off the track. The expected yaw angle of the drone relative to the track is... in, For the desired heading angle, The distance between the two laser rangefinders placed on the upper left and upper right of the drone. The distance is measured by two laser rangefinders placed on the lower left and lower right sides of the drone.
5. The system according to claim 2, characterized in that, The orbit tracking control module is also used to design the expected value of the UAV altitude control channel based on the distance measured by the four laser rangefinders installed on the UAV, as follows: when >> && ≈ At that time, set the desired height h c =h-△h; when ≈ && >> At that time, set the desired height h c =h + △h; when ≈ && ≈ At that time, set the desired height h c =h; Where h is the current flight altitude of the drone, and Δh is the expected change in altitude set by the user, which is generally a positive constant.
6. The system according to claim 1, characterized in that, The orbit detection module is also used to improve the pre-acquired YOLOv5 model during orbit tracking to obtain an orbit detection model, including: Small target detection layers are added to layers 18 to 24 and 31 of the YOLOv5 model to obtain the initial target detection model. The CBAM mechanism model is inserted into the initial object detection model and trained end-to-end with the CNN network in the initial object detection model to obtain the first candidate object detection model; In the first candidate object detection model, if a node is only connected to one input node and does not perform feature fusion with other nodes, the node is deleted. When the original input node and output node in the model are in the same layer, an additional edge is added between them to perform multi-feature fusion, resulting in a feature fusion improved model. A connection module is defined in the Common.py model component of the feature fusion improved model. Then, the test file and configuration file are modified to add a weighted bidirectional feature pyramid. Based on the weighted bidirectional feature pyramid, each bidirectional path from top to bottom and from bottom to top is regarded as a feature network layer, and the same layer is repeated multiple times to obtain the second candidate object detection model. A Transformer module is added to the second candidate target detection model. The model with the Transformer module is trained based on the pre-acquired training set to obtain the track detection model.
7. A magnetic levitation track tracking and detection method based on an unmanned aerial vehicle (UAV) platform, characterized in that, The method includes: Acquire the location and environmental information of the UAV and establish an occupancy grid map containing orbital information in the plane of the UAV's flight altitude based on the environmental information; In the occupied grid map, multiple miniature laser ranging sensors are installed at different positions of the UAV to form a laser ranging array. Based on the laser ranging principle, the offset distance between the matrix array and the track being measured, the yaw angle between the UAV and the track, and the height change of the UAV and the track plane are calculated. A virtual guiding force is designed based on the offset distance, and the lateral acceleration of the UAV is designed based on the virtual guiding force. The lateral acceleration is calculated to obtain a velocity expectation. The velocity expectation is used to set the roll expectation value of the UAV attitude controller. The roll expectation value is input into the UAV through the PX4 firmware to complete the orbit tracking control. The design of the virtual guiding force based on the offset distance includes: Based on the aforementioned offset distance, the virtual guiding force is designed as follows: in, k For proportional parameters, , , For different design parameters, L The height of the maglev track side. This is the offset distance. The lateral offset velocity of the drone from the track; The lateral acceleration is calculated to obtain the expected velocity. in, M Indicates the quality of the drone; The desired roll value of the UAV attitude controller is set using the desired speed. in, For the expected value of the rollover, The current lateral velocity, It is the acceleration due to gravity. The state matrix, These are the proportional, integral, and derivative control parameters of the PID controller. The desired heading of the UAV is designed based on the yaw angle; the desired heading value of the UAV attitude controller is set using the desired heading value; the desired heading value is input into the UAV through the PX4 firmware to complete the orbital heading tracking control; The desired altitude of the UAV is designed based on the altitude change between the UAV and the orbital plane; the desired altitude value of the UAV altitude controller is set using the desired altitude value; the desired altitude value is input into the UAV through the PX4 firmware to complete altitude holding control; During the orbit tracking process, the pre-acquired YOLOv5 model is improved to obtain an orbit detection model; real-time orbit detection is performed on the orbit images captured by the UAV based on the orbit detection model.