UAV control and positioning method, device and storage medium based on digital twin
By building a digital twin model of the drone and gain compensation technology, the problem of drone motor synchronization control accuracy and navigation error is solved, and more efficient navigation path planning and stability are achieved.
Patent Information
- Application Number
- CN202410219730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-02-28
AI Technical Summary
Existing UAV motor synchronization control methods ignore environmental factors, resulting in poor accuracy, integral errors in inertial sensor navigation, lidar navigation with high requirements on object feature points, and poor visual sensor navigation stability and robustness.
Construct a digital twin model of the quad-rotor UAV, realize motor synchronous control through gain compensation between the virtual simulation motor speed and the real motor speed, and use the target detection algorithm and coordinate system conversion to calculate the position and distance between the UAV and obstacles. Plan navigation paths.
It improves the accuracy of UAV motor synchronization control, reduces integration errors, lowers the requirements for environmental lighting and image features, and enhances the stability and robustness of navigation paths.
Smart Images

Figure CN118111440B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics warehousing technology, and in particular to unmanned aerial vehicle control positioning, devices and storage media based on digital twins. Background Art
[0002] The automated three-dimensional warehousing system is used for the storage of goods. The accuracy of the goods accounts is crucial to warehouse management. Due to equipment failures such as stackers, manual entry and exit, etc., there are often deviations between the system records and the actual inventory situation. At this time, it is necessary to check the inventory accounts through inventory counting to confirm the actual inventory quantity and correct the errors.
[0003] Compared with traditional inventory methods, the drone inventory method has the advantages of high efficiency and low energy consumption. Since inventory is usually completed in an indoor environment, the key technologies are drone control, indoor positioning and path planning. The current drone indoor positioning and navigation method is completed using airborne equipment such as inertial sensors, lidar and visual sensors.
[0004] The start-up flight of the quadcopter UAV is mainly achieved by the motor, and the synchronous control of the four motors on the rotor will have an important impact on the precise control of the UAV. However, the existing motor synchronization compensation method ignores the problem that the speed of each motor is not constant due to environmental factors, so the synchronization control accuracy of each motor is poor.
[0005] At the same time, the existing method of completing positioning and navigation of drones by carrying inertial sensors is to collect the angular velocity and acceleration of the device in the inertial reference system, and then calculate the speed, position and other equipment information of the drone through integration to estimate the position and status of the drone.
[0006] The method by which drones equipped with laser radars complete positioning and navigation is to use the laser radar to emit a light beam to detect the distance between the environment and the device itself, thereby achieving device location and navigation.
[0007] The method by which drones equipped with visual sensors complete positioning and navigation is to capture the visual features of the environment, analyze environmental data, and use relevant algorithms to iterate their relative position in the environment;
[0008] However, the existing method of using inertial sensors to complete positioning and navigation in drones has the problem of integral and cumulative errors, and long-term use will cause the errors to continue to increase.
[0009] The method of using a drone equipped with a laser radar to complete positioning and navigation: It has high requirements for object feature points and is prone to problems such as sparse point clouds or even missing points.
[0010] The method of using drones equipped with visual sensors to complete positioning and navigation: However, this method has high requirements on ambient lighting and image features, poor stability and robustness, and is prone to problems such as feature loss. Summary of the invention
[0011] In view of this, the purpose of the present invention is to provide a drone control positioning, device and storage medium based on digital twins, so as to solve the problem in the prior art that the motor synchronization compensation method ignores the environmental factors that cause the rotation speed of each motor to be uncertain, resulting in poor synchronization control accuracy of each motor. At the same time, it solves the problems that the existing drone positioning and navigation methods have integral cumulative errors, high requirements for object feature points, and high requirements for ambient lighting and image features.
[0012] According to a first aspect of an embodiment of the present invention, a method for controlling and positioning an unmanned aerial vehicle based on digital twins is provided, the method comprising:
[0013] Constructing a digital twin model of a quad-rotor storage drone and a digital twin model of a storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone;
[0014] Obtaining power parameters of a real quadcopter storage drone, and controlling the virtual quadcopter storage drone to move in a virtual storage space according to the power parameters;
[0015] Respectively obtain the rotation speed of the motor of the real quad-rotor storage drone and the rotation speed of the motor of the virtual quad-rotor storage drone;
[0016] A gain coefficient is set, and an output compensation value of the motor is obtained through the rotation speed of the motor of the virtual quadrotor drone, the rotation speed of the motor of the actual quadrotor drone, and the gain coefficient, and the output of the motor of the actual quadrotor drone is controlled through the output compensation value of the motor;
[0017] Acquire the surrounding environment image of the real quadcopter drone, and obtain the relative position direction of the environmental obstacles and the real quadcopter drone according to the surrounding environment image;
[0018] The pixel coordinates of the environmental obstacle are converted into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone;
[0019] According to the relative position direction and distance between the environmental obstacles and the actual quadcopter warehouse drone, the actual quadcopter warehouse drone is controlled to perform obstacle avoidance processing, thereby realizing the planning of the navigation path of the actual quadcopter warehouse drone.
[0020] Preferably,
[0021] The setting of the gain coefficient, obtaining the output compensation value of the motor through the rotation speed of the motor of the virtual quad-rotor storage drone, the rotation speed of the motor of the actual quad-rotor storage drone and the gain coefficient, comprises:
[0022] The absolute value of the self-tracking error of the motor is obtained according to the real-time rotation speed of the motor of the actual quadrotor disk library drone, the rotation speed of the motor of the virtual quadrotor disk library drone and the gain coefficient, and the output compensation value of the motor is obtained according to the absolute value of the self-tracking error of the motor.
[0023] Preferably,
[0024] The step of obtaining the output compensation value of the motor according to the absolute value of the self-tracking error of the motor comprises:
[0025] Obtain the accumulated value of the real-time speed difference between any motor of the actual quadcopter drone and the speed of other motors as the synchronous error compensation value of the motor;
[0026] The output compensation value of the motor is obtained according to the synchronous error compensation value of the motor and the absolute value of the self-tracking error.
[0027] Preferably,
[0028] The step of obtaining the surrounding environment image of the actual quad-rotor drone comprises:
[0029] The surrounding environment is scanned by a binocular camera or a laser radar carried by the real four-rotor disk library UAV to obtain a scanned image of the surrounding environment.
[0030] Preferably,
[0031] The step of obtaining the relative position direction of the environmental obstacle and the actual quadcopter drone according to the surrounding environment image includes:
[0032] The scanned image of the surrounding environment is detected by the YOLO target detection algorithm to obtain the relative position direction of the environmental obstacles and the actual four-rotor disk library drone.
[0033] Preferably,
[0034] The step of converting the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone includes:
[0035] According to the relative position direction between the environmental obstacle and the actual quadcopter drone, the pixel coordinates of the environmental obstacle in the scanned image are obtained;
[0036] Obtaining the image coordinates of the environmental obstacle in the image coordinate system according to the conversion relationship between the pixel coordinate system and the image coordinate system;
[0037] According to the image coordinates of the actual quadcopter drone in the image coordinate system and the image coordinates of the environmental obstacles in the image coordinate system, the relative distance between the actual quadcopter drone and the environmental obstacles is calculated.
[0038] According to a second aspect of an embodiment of the present invention, a drone control and positioning device based on digital twin is provided, the device comprising:
[0039] Model building module: used to build a digital twin model of the quad-rotor storage drone and a digital twin model of the storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone;
[0040] Virtual drone control module: used to obtain the power parameters of the real quadcopter storage drone, and control the virtual quadcopter storage drone to move in the virtual storage space according to the power parameters;
[0041] The rotation speed acquisition module is used to respectively acquire the rotation speed of the motor of the real quad-rotor storage drone and the rotation speed of the motor of the virtual quad-rotor storage drone;
[0042] Motor synchronization control module: used to set the gain coefficient, obtain the output compensation value of the motor through the speed of the motor of the virtual quad-rotor disk library drone, the speed of the motor of the actual quad-rotor disk library drone and the gain coefficient, and control the output of the motor of the actual quad-rotor disk library drone through the output compensation value of the motor;
[0043] Obstacle position and direction acquisition module: used to acquire the surrounding environment image of the real quadcopter storage drone, and obtain the relative position and direction of the environmental obstacles and the real quadcopter storage drone according to the surrounding environment image;
[0044] Obstacle distance acquisition module: used to convert the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone;
[0045] Obstacle avoidance control module: used to control the real quad-rotor warehouse drone to avoid obstacles according to the relative position direction and distance between the environmental obstacles and the real quad-rotor warehouse drone, so as to realize the planning of the navigation path of the real quad-rotor warehouse drone.
[0046] According to a third aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the logistics equipment redesign method based on digital twins is implemented.
[0047] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:
[0048] The present application constructs a digital twin model of a panku UAV and sets a gain coefficient. Since the motors in the virtual UAV ignore external interference factors, the speeds of each motor are the same value. Under the addition of a gain compensation formula, the relationship between the virtual and real motors is connected. The output value of the real motor is compensated with the virtual simulation motor value as a guide to achieve precise control of the speed of the four-rotor panku UAV. At the same time, the position, direction and distance between the UAV and the obstacle are calculated through the target detection algorithm and the conversion of the coordinate system, and the navigation path is planned based on this. The problems of existing UAV positioning and navigation methods, such as integral cumulative errors, high requirements on object feature points, and high requirements on ambient lighting and image features, are solved.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] Figure 1 is a flow chart of a method for controlling and positioning a UAV based on digital twins according to an exemplary embodiment;
[0052] Figure 2 is a schematic diagram showing coordinates of an obstacle in a pixel coordinate system according to another exemplary embodiment;
[0053] Figure 3 is a schematic diagram showing the principle of conversion between a pixel coordinate system and an image coordinate system according to another exemplary embodiment;
[0054] Figure 4 is a system schematic diagram of a drone control and positioning device based on digital twins according to another exemplary embodiment;
[0055] In the attached figure: 1-model building module, 2-virtual drone control module, 3-speed acquisition module, 4-motor synchronization control module, 5-obstacle position and direction acquisition module, 6-obstacle distance acquisition module, 7-obstacle avoidance control module. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0057] Embodiment 1
[0058] Figure 1 is a flow chart of a method for controlling and positioning a UAV based on digital twins according to an exemplary embodiment, such as Figure 1 As shown, the method includes:
[0059] S1, constructing a digital twin model of a quad-rotor storage drone and a digital twin model of a storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone;
[0060] S2, obtaining power parameters of the real quadcopter storage drone, and controlling the virtual quadcopter storage drone to move in the virtual storage space according to the power parameters;
[0061] S3, respectively obtaining the rotation speed of the motor of the real quadcopter storage drone and the rotation speed of the motor of the virtual quadcopter storage drone;
[0062] S4, setting a gain coefficient, obtaining an output compensation value of the motor through the rotation speed of the motor of the virtual quadrotor drone, the rotation speed of the motor of the actual quadrotor drone and the gain coefficient, and controlling the output of the motor of the actual quadrotor drone through the output compensation value of the motor;
[0063] S5, obtaining a surrounding environment image of the actual quadcopter storage drone, and obtaining a relative position direction of environmental obstacles and the actual quadcopter storage drone according to the surrounding environment image;
[0064] S6, converting the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone;
[0065] S7, controlling the real quad-rotor storage drone to perform obstacle avoidance processing according to the relative position direction and distance between the environmental obstacle and the real quad-rotor storage drone, thereby realizing the planning of the navigation path of the real quad-rotor storage drone;
[0066] It can be understood that by first analyzing the overall structure of the four-rotor drone, the four-rotor drone can be divided into a mechanical structure and an electrical control structure, wherein the mechanical structure includes the fuselage shell, rotor, etc.; the electrical control structure includes the motor, various regulators and controllers in the flight control system (speed regulator, receiver, alarm, position controller, speed controller, current controller), etc.
[0067] The construction of a twin model is the twin construction of a physical entity. According to the theoretical system of digital twin model construction, it is necessary to ensure that the constructed twin virtual body has the "four requirements" of visualization, lightweight, standardization, and precision, and that it needs to meet the "four" criteria of evolvability, interactivity, reconfigurability, and fusion during the model operation. The twin mechanism model is the core and foundation of the digital twin. In order to ensure the high reliability, high accuracy, and high fidelity of the digital twin, the twin model needs to be constructed from multiple dimensions such as geometric dimension, physical dimension, rule dimension, and behavioral dimension.
[0068] The geometric model is constructed and rendered in original proportion using 3dmax software to characterize the appearance, size, structure and assembly relationship of the quad-rotor UAV.
[0069] On the basis of the geometric model, the ANSYS software and MATLAB software are used to improve its physical model, which is used to reflect the force changes of the quadrotor disk library UAV and express the mechanical coupling characteristics of the quadrotor disk library UAV;
[0070] The geometric model and physical model are imported into the virtual simulation software (AirSim), and the behavior model and rule model of the quadcopter UAV are set under the virtual simulation software (AirSim). The behavior model is used to represent the motion state and motion action of the quadcopter UAV during operation; the rule model is used to represent the operation trajectory, constraint conditions, motion range and expert knowledge of the quadcopter UAV.
[0071] According to the above expression, the twin model of the quadrotor UAV can be decomposed into the twin model of the mechanical structure part and the twin model of the electrical control part. Among them, the twin model of the electrical control part of the quadrotor UAV plays a more critical role in realizing the virtual-real combination and control of the quadrotor UAV.
[0072] Although the twin simulation model of the quadcopter UAV can truly map and restore the state of the physical entity, it is difficult to actually reflect the disturbance around the physical entity, which causes inconsistency between the physical entity and the virtual model over a period of time. Therefore, an optimized synchronization error compensation method for virtual-real interaction is proposed on the basis of fully considering the above factors. This method is optimized and improved on the basis of the deviation coupling algorithm. The traditional deviation coupling algorithm uses the speed to calculate the synchronization error, and then allocates a speed compensation signal to each motor, that is, the real-time speed of the i-th motor is accumulated with the speed of other motors as the synchronization error compensation value of the motor, and then fed back to the speed controller to realize error compensation, thereby achieving speed synchronization;
[0073] The traditional synchronization error calculation formula is:
[0074] Among them, y i is the real-time speed of the motor that needs to be adjusted; i is the synchronous error of the motor that needs to be adjusted;
[0075] y j is the real-time speed of the remaining motors (if there are four motors in total, namely motor 1, 2, 3, and 4, if y i is motor 1, then y j Motors 2, 3, and 4 respectively);
[0076] However, since this method has the phenomenon of excessive error oscillation amplitude during the compensation process, it will cause poor synchronization accuracy. Therefore, this application proposes an optimized synchronization error compensation method. Because the fundamental cause of the synchronization error is the difference in speed, that is, the difference in self-tracking error, the self-tracking error is used to measure the influence of the motor speed on the synchronization error and adjust the synchronization error compensation. Therefore, the optimization here is to optimize the speed compensation signal, that is, introduce the gain compensation formula before calculating the synchronization error, as shown below:
[0077]
[0078] Among them, (1+k i |xy i |) is the gain compensation formula, k i is the gain compensation coefficient, x is the twin simulation speed of the motor that needs to be adjusted, |xy i | is the absolute value of the self-tracking error of the motor that needs to be adjusted;
[0079] With the addition of the gain compensation formula, the relationship between the virtual and real motors is connected. The virtual simulation motor value is used as a guide to subtract the real speed of the real physical motor to achieve virtual-real interaction. The motors are interconnected and respond to the changes in the speed of the real physical motor in a timely manner.
[0080] In the gain compensation formula, the gain compensation coefficient k i The value of needs to be defined, and the other values can be obtained in real time. After taking the absolute value of the speed of each motor in the real physical world and the speed of each motor in the twin simulation, the absolute value of the self-tracking error |α is obtained. i |, and the gain compensation coefficient k i According to |α i |The size is adjusted dynamically in real time, that is, |α i When | is the maximum value, k i =m1;|α i | is the second largest value, k i =m2 (It should be emphasized that: because the actual speed of each motor is not necessarily the same under actual startup conditions, assuming that there are four motors in total, the target speed of each motor is 10, and the actual speed of the first motor is 9.6, the speed of the second motor is 9.8, the speed of the third motor is 10.2, and the speed of the fourth motor is 9.5. Different gain compensation coefficients are set for each motor, and the values of a are 0.4, 0.2, 0.2, and 0.5 respectively, so there is a maximum value, a second maximum value, etc.); and m i The value of is calculated by the optimization function, m i is the optimization object, and the optimization function is Where m is the number of sampling points, β i is the synchronization error value corresponding to the i-th sampling point, and the fitness value fit, i.e., the global synchronization error value, is obtained by accumulating the absolute value; then, by setting the number of iterations and taking the minimum fitness value as the optimization target, the corresponding gain compensation coefficient value is searched;
[0081] Based on the synchronous control of the four-rotor Panku UAV, the digital twin platform of the UAV can realize the mapping of the real with the virtual and the control of the real with the virtual. On the one hand, the flight status and motion trajectory of the physical UAV can be monitored in real time, and then the surrounding environment can be scanned by the binocular camera and lidar carried by the four-rotor Panku UAV, and the scanned image can be detected based on the target detection algorithm to obtain the relative position of the obstacle and the UAV, and on this basis, the flight direction and distance of the UAV can be calculated. On the other hand, the digital twin system of the UAV can also be used to control the UAV to perform navigation and obstacle avoidance operations to prevent the situation where the binocular camera on the UAV fails and cannot effectively navigate and avoid obstacles;
[0082] At present, the research on UAV positioning and navigation is mainly divided into two categories: based on route planning algorithm and based on local collision avoidance algorithm. Based on route planning algorithm, the UAV can obtain a safe and short route, which is also called global planning obstacle avoidance algorithm. This method needs to take into account all obstacles and can only be used when the environment is known. Based on local collision avoidance algorithm, it is not restricted by any external environment, and does not need to know the flight starting point and target point. It only needs to detect obstacles in real time through sensors to perform obstacle avoidance flight.
[0083] Therefore, this application uses a local anti-collision algorithm, and the YOLO algorithm is used for target distance detection. As a common target detection algorithm, the YOLO algorithm has been widely used in various fields. No more details are given here. The YOLO algorithm provided in the system includes YOLOv3, YOLOv4, YOLOv5 and four adapted network models Yolov5s, Yolov5m, Yolov5l, and Yolov5x for users to choose and compare;
[0084] Although the YOLO algorithm can obtain the location and category of obstacles, it cannot detect the distance between the drone and the obstacle very well. Therefore, it is necessary to further calculate the distance of the detected obstacle on this basis.
[0085] When calculating the distance, we need to use the information collected by the laser radar and integrate the position information and distance information of the obstacle to locate the obstacle in three-dimensional space. Because the pictures taken by the binocular camera are accurately represented by pixel coordinates, it is necessary to unify the coordinate system and convert the pixel coordinates into image position coordinates. This is because the pixel coordinate system is in pixels, while the image coordinate system is in millimeters, and the coordinate systems of the two are different. Figure 2 As shown, for a captured image of size a×b, it can be represented in the pixel coordinate system uO1v as shown in the figure below. The origin O1 of the pixel coordinate system is the upper left vertex of the image. The obstacle position in the captured image can be roughly replaced by a small rectangle. P(u1,v1) represents the upper left vertex of the obstacle bounding box, and Q(u2,v2) represents the lower right vertex of the obstacle bounding box.
[0086] As attached Figure 3 As shown, when the image is converted from the pixel coordinate system uO1v to the image coordinate system xO2y, the origin O2 in the image coordinate system xO2y is at the center of the image, which can be expressed using the pixel coordinate system as Therefore, each point can be represented as shown in the figure below. P(u1,v1) in the pixel coordinate system can be represented as point P′(x1,y1) in the image coordinate system, and Q(u2,v2) can be represented as point Q′(x2,y2) in the image coordinate system.
[0087] Because in the pixel coordinate system, an image is composed of countless pixels of the same size, dx and dy represent the actual physical size of one of the pixels, so the conversion relationship between the pixel coordinate system and the image coordinate system can be expressed as follows:
[0088]
[0089] Among them, (u, v) represents the coordinates of a point in the pixel coordinate system, (x, y) represents the coordinates of the point after conversion to the image coordinate system, and (a, b) represents the size of the captured image (pixel coordinate system)
[0090] Therefore, the coordinates of point P' are The coordinates of point Q′ are After completing the coordinate transformation, that is, knowing the coordinates of the obstacle, based on the coordinates of the obstacle and the position of the drone itself, the relative distance between the drone and the obstacle can be obtained;
[0091] The YOLO algorithm is used to quickly identify the type of obstacles and obtain their location information. The spatial positioning of obstacles is achieved based on the coordinate conversion of the captured image information and the distance data received by the LiDAR.
[0092] Based on the location, direction and distance of obstacles, the drone is planned to avoid obstacles, that is, the navigation path of the drone is designed;
[0093] The present application constructs a digital twin model of a panku UAV and sets a gain coefficient. Since the motors in the virtual UAV ignore external interference factors, the speeds of each motor are the same value. Under the addition of a gain compensation formula, the relationship between the virtual and real motors is connected. The output value of the real motor is compensated with the virtual simulation motor value as a guide to achieve precise control of the speed of the four-rotor panku UAV. At the same time, the position, direction and distance between the UAV and the obstacle are calculated through the target detection algorithm and the conversion of the coordinate system, and the navigation path is planned based on this. The problems of existing UAV positioning and navigation methods, such as integral cumulative errors, high requirements on object feature points, and high requirements on ambient lighting and image features, are solved.
[0094] Embodiment 2
[0095] This embodiment also discloses a drone control and positioning device based on digital twins, as shown in the attached Figure 4 As shown, the device comprises:
[0096] Model building module 1: used to build a digital twin model of the quad-rotor storage drone and a digital twin model of the storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone;
[0097] Virtual drone control module 2: used to obtain the power parameters of the real quadcopter storage drone, and control the virtual quadcopter storage drone to move in the virtual storage space according to the power parameters;
[0098] The rotation speed acquisition module 3 is used to respectively acquire the rotation speed of the motor of the real quad-rotor storage drone and the rotation speed of the motor of the virtual quad-rotor storage drone;
[0099] Motor synchronization control module 4: used to set the gain coefficient, obtain the output compensation value of the motor through the speed of the motor of the virtual quadrotor disk library drone, the speed of the motor of the actual quadrotor disk library drone and the gain coefficient, and control the output of the motor of the actual quadrotor disk library drone through the output compensation value of the motor;
[0100] Obstacle position and direction acquisition module 5: used to acquire the surrounding environment image of the real quadcopter storage drone, and obtain the relative position and direction of the environmental obstacles and the real quadcopter storage drone according to the surrounding environment image;
[0101] Obstacle distance acquisition module 6: used to convert the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone;
[0102] Obstacle avoidance control module 7: used to control the real quad-rotor storage drone to avoid obstacles according to the relative position direction and distance between the environmental obstacles and the real quad-rotor storage drone, so as to realize the planning of the navigation path of the real quad-rotor storage drone;
[0103] It can be understood that the model construction module 1 is used to construct a digital twin model of the quadrotor warehouse drone and a digital twin model of the storage space, and the digital twin model of the quadrotor warehouse drone includes a digital twin model of the mechanical structure of the quadrotor warehouse drone and a digital twin model of the electrical control structure; the virtual drone control module 2 is used to obtain the power parameters of the actual quadrotor warehouse drone, and control the virtual quadrotor warehouse drone to move in the virtual storage space according to the power parameters; the speed acquisition module 3 is used to respectively obtain the speed of the motor of the actual quadrotor warehouse drone and the speed of the motor of the virtual quadrotor warehouse drone; the motor synchronization control module 4 is used to set the gain coefficient, and the speed of the motor of the virtual quadrotor warehouse drone and the speed of the motor of the actual quadrotor warehouse drone are used to obtain the gain coefficient. The output compensation value of the motor is obtained by the speed and gain coefficient, and the output compensation value of the motor is used to control the output of the motor of the real four-rotor storage drone; the obstacle position and direction acquisition module 5 is used to obtain the surrounding environment image of the real four-rotor storage drone, and the relative position direction of the environmental obstacle and the real four-rotor storage drone is obtained according to the surrounding environment image; the obstacle distance acquisition module 6 is used to convert the pixel coordinates of the environmental obstacle into image coordinates, and obtain the distance between the environmental obstacle and the real four-rotor storage drone; the obstacle avoidance control module 7 is used to control the real four-rotor storage drone to avoid obstacles according to the relative position direction and distance between the environmental obstacle and the real four-rotor storage drone, so as to realize the planning of the navigation path of the real four-rotor storage drone.
[0104] Embodiment three:
[0105] This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented;
[0106] It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0107] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0108] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0109] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0110] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0111] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0112] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0113] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0114] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0115] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. UAV control and positioning method based on digital twins, It is characterized in that The method comprises: Constructing a digital twin model of a quad-rotor storage drone and a digital twin model of a storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone; Obtaining power parameters of a real quadcopter storage drone, and controlling the virtual quadcopter storage drone to move in a virtual storage space according to the power parameters; Respectively obtain the rotation speed of the motor of the real quad-rotor storage drone and the rotation speed of the motor of the virtual quad-rotor storage drone; A gain coefficient is set, and an output compensation value of the motor is obtained through the rotation speed of the motor of the virtual quadrotor drone, the rotation speed of the motor of the actual quadrotor drone, and the gain coefficient, and the output of the motor of the actual quadrotor drone is controlled through the output compensation value of the motor; The setting of the gain coefficient, obtaining the output compensation value of the motor through the rotation speed of the motor of the virtual quad-rotor storage drone, the rotation speed of the motor of the actual quad-rotor storage drone and the gain coefficient, comprises: Obtain the absolute value of the self-tracking error of the motor according to the real-time rotation speed of the motor of the actual quadrotor disk library drone, the rotation speed of the motor of the virtual quadrotor disk library drone and the gain coefficient, and obtain the output compensation value of the motor according to the absolute value of the self-tracking error of the motor; The step of obtaining the output compensation value of the motor according to the absolute value of the self-tracking error of the motor comprises: Obtain the accumulated value of the real-time speed difference between any motor of the actual quadcopter drone and the speed of other motors as the synchronous error compensation value of the motor; Obtaining an output compensation value of the motor according to a synchronous error compensation value of the motor and an absolute value of a self-tracking error; Acquire the surrounding environment image of the real quadcopter drone, and obtain the relative position direction of the environmental obstacles and the real quadcopter drone according to the surrounding environment image; The pixel coordinates of the environmental obstacle are converted into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone; According to the relative position direction and distance between the environmental obstacles and the actual quadcopter warehouse drone, the actual quadcopter warehouse drone is controlled to perform obstacle avoidance processing, thereby realizing the planning of the navigation path of the actual quadcopter warehouse drone.
2. The method according to claim 1, It is characterized in that The step of obtaining the surrounding environment image of the actual quad-rotor drone comprises: The surrounding environment is scanned by a binocular camera or a laser radar carried by the real four-rotor disk library UAV to obtain a scanned image of the surrounding environment.
3. The method according to claim 2, It is characterized in that The step of obtaining the relative position direction of the environmental obstacle and the actual quadcopter drone according to the surrounding environment image includes: The scanned image of the surrounding environment is detected by the YOLO target detection algorithm to obtain the relative position direction of the environmental obstacles and the actual four-rotor disk library drone.
4. The method according to claim 3, It is characterized in that The step of converting the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone includes: According to the relative position direction between the environmental obstacle and the actual quadcopter drone, the pixel coordinates of the environmental obstacle in the scanned image are obtained; Obtaining the image coordinates of the environmental obstacle in the image coordinate system according to the conversion relationship between the pixel coordinate system and the image coordinate system; According to the image coordinates of the actual quadcopter drone in the image coordinate system and the image coordinates of the environmental obstacles in the image coordinate system, the relative distance between the actual quadcopter drone and the environmental obstacles is calculated.
5. UAV control and positioning device based on digital twin, It is characterized in that The device comprises: Model building module: used to build a digital twin model of the quad-rotor storage drone and a digital twin model of the storage space, wherein the digital twin model of the quad-rotor storage drone includes a mechanical structure digital twin model and an electrical control structure digital twin model of the quad-rotor storage drone; Virtual drone control module: used to obtain the power parameters of the real quadcopter storage drone, and control the virtual quadcopter storage drone to move in the virtual storage space according to the power parameters; The rotation speed acquisition module is used to respectively acquire the rotation speed of the motor of the real quad-rotor storage drone and the rotation speed of the motor of the virtual quad-rotor storage drone; Motor synchronization control module: used to set the gain coefficient, obtain the output compensation value of the motor through the speed of the motor of the virtual quad-rotor disk library drone, the speed of the motor of the actual quad-rotor disk library drone and the gain coefficient, and control the output of the motor of the actual quad-rotor disk library drone through the output compensation value of the motor; The setting of the gain coefficient, obtaining the output compensation value of the motor through the rotation speed of the motor of the virtual quad-rotor storage drone, the rotation speed of the motor of the actual quad-rotor storage drone and the gain coefficient, comprises: Obtain the absolute value of the self-tracking error of the motor according to the real-time rotation speed of the motor of the actual quadrotor disk library drone, the rotation speed of the motor of the virtual quadrotor disk library drone and the gain coefficient, and obtain the output compensation value of the motor according to the absolute value of the self-tracking error of the motor; The step of obtaining the output compensation value of the motor according to the absolute value of the self-tracking error of the motor comprises: Obtain the accumulated value of the real-time speed difference between any motor of the actual quadcopter drone and the speed of other motors as the synchronous error compensation value of the motor; Obtaining an output compensation value of the motor according to a synchronous error compensation value of the motor and an absolute value of a self-tracking error; Obstacle position and direction acquisition module: used to acquire the surrounding environment image of the real quadcopter storage drone, and obtain the relative position and direction of the environmental obstacles and the real quadcopter storage drone according to the surrounding environment image; Obstacle distance acquisition module: used to convert the pixel coordinates of the environmental obstacle into image coordinates to obtain the distance between the environmental obstacle and the actual quadcopter drone; Obstacle avoidance control module: used to control the real quad-rotor warehouse drone to avoid obstacles according to the relative position direction and distance between the environmental obstacles and the real quad-rotor warehouse drone, so as to realize the planning of the navigation path of the real quad-rotor warehouse drone.
6. A storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the main controller, each step of the drone control and positioning method based on digital twins as described in any one of claims 1 to 4 is implemented.
