Path following method and device of aircraft, electronic equipment and storage medium
By adaptively adjusting the guidance direction of the aircraft, combining the parameters of the hover mission and the ground speed of the aircraft, the smooth switching of the aircraft from the route mission to the hover mission is achieved, solving the problem of poor path tracking effect and improving the hover control performance.
Patent Information
- Application Number
- CN202311573085.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-06-10
AI Technical Summary
During the process of switching to the circling mission, the path tracking effect is not smooth enough, and obvious oscillations are prone to occur during the transition process.
By obtaining the hovering center position and hover radius of the hover task, the pre-sight distance is determined in combination with the aircraft's ground speed, and the gradient hover cutting distance, gradient hover cutting distance and stable hover cutting distance are determined according to the pre-sight distance. Get the current relative distance between the aircraft and the hovering center position in real time, and adaptively adjust the guidance direction to achieve smooth switching.
It realizes smooth switching between the aircraft from the route task to the hover task, reduces oscillation during the transition process, and improves the hover control performance of the aircraft.
Smart Images

Figure CN120122673A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of aircraft, and particularly relates to a path following method and device for an aircraft, an electronic device, and a storage medium. Background Art
[0002] The path following of an aircraft refers to controlling the aircraft to move along a given path, including a wire following task and a hovering task. The wire following task refers to a task that needs to move along a predefined straight or curved path, and the hovering task refers to a task that needs to hover around a target point. Currently, during the process of the aircraft switching from the wire following task to the hovering task, the path tracking effect is not smooth enough, and obvious oscillations are likely to occur in the transition process of the tracking path. Summary of the Invention
[0003] The purpose of the present application is to propose a path following method and device, an electronic device, and a computer-readable storage medium to achieve a smooth switch of the aircraft from executing the wire following task to executing the hovering task.
[0004] To achieve the above purpose, an embodiment of the present application provides a path following method, and the method includes:
[0005] When the aircraft needs to switch from executing a linear task to executing a hovering task, obtain the hovering center position and hovering radius of the hovering task;
[0006] Obtain the ground speed of the aircraft, determine the preview distance according to the ground speed, and determine the gradual hovering cut-in distance, gradual hovering cut-out distance, and stable hovering cut-in distance according to the preview distance; where r_t < d_cir < d_cut_out < d_cut_in, r_t is the hovering radius, d_cir is the gradual hovering cut-in distance, d_cut_out is the gradual hovering cut-out distance, and d_cut_in is the stable hovering cut-in distance;
[0007] Obtain the current relative distance between the aircraft and the hovering center position in real time;
[0008] If the current relative distance is greater than the stable hovering cut-in distance, adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual hovering cut-in distance, gradual hovering cut-out distance, and stable hovering cut-in distance, and control the movement of the aircraft according to the guiding direction;
[0009] If the current relative distance is less than or equal to the stable hovering cut-in distance, execute the hovering task according to the hovering center position and hovering radius.
[0010] An embodiment of the present application also provides a path following device for an aircraft, including:
[0011] An information acquisition module, configured to obtain the center position and radius of a hover of the hover task when the aircraft needs to switch from performing a linear task to performing a hover task;
[0012] A first distance calculation module, configured to obtain the ground speed of the aircraft, determine a preview distance according to the ground speed, and determine a gradual hover cut-in distance, a gradual hover cut-out distance, and a stable hover cut-in distance according to the preview distance; wherein, r_t < d_cir < d_cut_out < d_cut_in, r_t is the radius of the hover, d_cir is the gradual hover cut-in distance, d_cut_out is the gradual hover cut-out distance, and d_cut_in is the stable hover cut-in distance;
[0013] A second distance calculation module, configured to obtain the current relative distance between the aircraft and the center position of the hover in real time;
[0014] A first control module, configured to, if the current relative distance is greater than the stable hover cut-in distance, adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual hover cut-in distance, the gradual hover cut-out distance, and the stable hover cut-in distance, and control the movement of the aircraft according to the guiding direction;
[0015] A second control module, configured to, if the current relative distance is less than or equal to the stable hover cut-in distance, perform a hover task according to the center position and radius of the hover.
[0016] An embodiment of the present application further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the path following method as described above is implemented.
[0017] An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the path following method as described above is implemented.
[0018] The embodiments of the present application provide a path following method, apparatus, electronic device, and computer-readable storage medium, which disclose a progressive spiral geometric path tracking technology. Specifically, during the process of switching from a linear task to a spiral task, first, the preview distance is determined according to the ground speed of the aircraft, and the gradual spiral entry distance, gradual spiral exit distance, and stable spiral entry distance are determined according to the preview distance. Then, the current relative distance between the aircraft and the spiral center position is obtained in real time. According to the magnitude relationship between the current relative distance and the gradual spiral entry distance, gradual spiral exit distance, and stable spiral entry distance, the guidance direction of the aircraft is adaptively adjusted, and the movement of the aircraft is controlled according to the guidance direction. Finally, the aircraft smoothly enters the spiral path and then executes the spiral task according to the spiral center position and spiral radius given by the path planning module of the aircraft, and stably spirals along the set circular trajectory, realizing the smooth switching of the aircraft from executing the wire following task to executing the spiral task and improving the spiral control performance of the aircraft. Description of the Drawings
[0019] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1 It is a flowchart of a path following method in an embodiment of the present application.
[0021] Figure 2 It is a schematic diagram of progressive spiral in an embodiment of the present application.
[0022] Figure 3 It is a schematic diagram of yaw angle in an embodiment of the present application.
[0023] Figure 4 It is a structural diagram of a path following apparatus in another embodiment of the present application. Detailed Description of the Embodiments
[0024] The detailed description of the drawings is intended to illustrate some current embodiments of the present application, rather than representing the only form in which the present application can be implemented. It should be understood that the same or equivalent functions can be completed by different embodiments intended to be included within the scope of the present application.
[0025] An embodiment of the present application provides a path following method for an aircraft. Refer to Figure 1 , the method of this embodiment includes the following steps:
[0026] Step S1, when the aircraft needs to switch from performing a linear task to performing a hovering task, obtain the hovering center position and hovering radius of the hovering task.
[0027] Specifically, the hovering center position refers to the center point around which the aircraft rotates during hovering. It can be a coordinate point of a geographical location or the position of an object or target, and the aircraft will rotate around the hovering center position.
[0028] The hovering radius refers to the distance between the aircraft and the hovering center position during hovering. It determines the size of the hovering range of the aircraft. A smaller hovering radius will result in a tighter hovering trajectory, while a larger hovering radius will result in a looser hovering trajectory.
[0029] Parameters such as the hovering center position and hovering radius jointly define the movement trajectory of the aircraft in the hovering task. By controlling the hovering center position and hovering radius, the aircraft can be made to hover around a specific point or target to meet the task requirements.
[0030] Step S2, obtain the ground speed of the aircraft, determine the preview distance according to the ground speed, and determine the gradual hovering cut-in distance, gradual hovering cut-out distance, and stable hovering cut-in distance according to the preview distance; where r_t < d_cir < d_cut_out < d_cut_in, r_t is the hovering radius, d_cir is the gradual hovering cut-in distance, d_cut_out is the gradual hovering cut-out distance, and d_cut_in is the stable hovering cut-in distance.
[0031] Specifically, in this embodiment, the speed of the aircraft includes the northward speed vel_x and the eastward speed vel_y. The northward speed refers to the component of the speed in the due north direction of the geography, and the eastward speed refers to the component of the speed in the due east direction of the geography. The ground speed v_g is the actual speed of the aircraft in the horizontal direction and can be obtained by the speed measurement module of the aircraft.
[0032] Among them, v_g = sqrt(vel_x * vel_x + vel_y * vel_y);
[0033] The preview distance refers to the distance that the aircraft should aim at the target in advance at the current speed. The determination of the preview distance is to enable the aircraft to control or navigate the target at the appropriate time and distance. Determining the preview distance according to the ground speed of the aircraft is to make the preview distance adapt to the speed change of the aircraft, so as to ensure that the aircraft can accurately preview the target at different speeds. The determination of the preview distance is an important parameter in the navigation and control system, which affects the response time and target tracking ability of the aircraft. In this embodiment, the preview distance is calculated according to the following formula;
[0034] len_t = k_t * v_g;
[0035] Where len_t is the preview distance, and k_t is a preset preview coefficient; in a specific embodiment, upper and lower limits can also be added to len_t, i.e., lower limit ≤ len_t ≤ upper limit.
[0036] In this embodiment, three distance parameters, d_cir, d_cut_out, and d_cut_in, are designed, and r_t < d_cir < d_cut_out < d_cut_in. Different distance ranges can be defined by d_cir, d_cut_out, and d_cut_in. When the current relative distance between the aircraft and the hovering center position is in different distance ranges, different path following control methods are adopted. See the subsequent steps.
[0037] Step S3, obtain the current relative distance between the aircraft and the hovering center position in real time.
[0038] Specifically, the hovering task information output by the planning module of the aircraft includes the hovering radius, the hovering center position, and the hovering direction. The hovering center position includes the longitude lon_t and latitude lat_t of the hovering center position, and the hovering direction is counterclockwise or clockwise; the position information of the aircraft can be obtained through the positioning module of the aircraft. The position information of the aircraft includes the longitude lon_p and latitude lat_p of the aircraft; according to the hovering center position and the position information of the aircraft, the relative position relationship between the hovering center position and the aircraft can be calculated. The relative position relationship includes the relative distance and the relative coordinate relationship; for example, taking the hovering center position as the origin O(0, 0), taking the geographical due north as the X-axis, and taking the geographical due east as the Y-axis, calculate the position coordinates pos_2d and the relative distance pos_d of the aircraft relative to the hovering center position. For example, a simple calculation scheme is shown in the following formula:
[0039] pos_2d = (pos_x, pos_y);
[0040] pos_x = (lat_p - lat_t) / Re;
[0041] pos_y = (lon_p - lon_t) / Ra;
[0042] pos_d = sqrt(pos_x * pos_x + pos_y * pos_y);
[0043] Ra = Re * cos(lat_t * DEG2RAD);
[0044] Wherein, Re is the constant of the Earth's radius, DEG2RAD is the constant for converting angles to radians, and Ra is the radius corresponding to the local latitude circle.
[0045] Step S4: If the current relative distance is greater than the stable hovering cut-in distance, then according to the magnitude relationship between the current relative distance and the gradual hovering cut-in distance, the gradual hovering cut-out distance, and the stable hovering cut-in distance, adaptively adjust the guiding direction of the aircraft, and control the movement of the aircraft according to the guiding direction.
[0046] Specifically, in this embodiment, according to the change in the relative distance between the aircraft and the hovering center, the control strategy is continuously adjusted. If the current relative distance is greater than the stable hovering cut-in distance, it means that the aircraft is in the transition process from performing the line-tracking task to performing the hovering task. Compare the current relative distance with the gradual hovering cut-in distance, the gradual hovering cut-out distance, and the stable hovering cut-in distance. According to the comparison result, adaptively adjust the guiding direction of the aircraft, and finally make the aircraft smoothly cut into the hovering path and then stably hover along the set circular trajectory, realizing the smooth switch of the aircraft from the line-tracking task to the hovering task.
[0047] Step S5: If the current relative distance is less than or equal to the stable hovering cut-in distance, perform the hovering task according to the position of the hovering center and the hovering radius.
[0048] Specifically, if the current relative distance is less than or equal to the stable hovering cut-in distance, it means that the aircraft has completed the smooth switch to performing the hovering task, and the transition process ends. At this time, perform the hovering task according to the position of the hovering center and the hovering radius, and control the aircraft to make a hovering motion around the position of the hovering center, effectively improving the hovering control performance of the aircraft and greatly improving the riding experience of the aircraft.
[0049] In some embodiments, please refer to Figure 2 , step S4 specifically includes:
[0050] Step S41: If the current relative distance is greater than the gradual hovering cut-in distance, the guiding direction is for the aircraft to move towards the position of the hovering center.
[0051] Specifically, as Figure 2 shown, the arrow indicates the guiding direction. In the first stage of the gradual hovering, d_cut_in < pos_d, the distance between the aircraft and the hovering center is relatively far, and no special control is required temporarily. Only need to control the aircraft to move towards the hovering center.
[0052] Step S42: If the current relative distance is greater than the gradual spiral cut-out distance and less than or equal to the gradual spiral cut-in distance, the guiding direction is for the aircraft to move towards the tangent point of the gradual circle; where the tangent point of the gradual circle refers to the point where the extension line starting from the aircraft is tangent to the gradual circle, the center of the gradual circle is the spiral center position, and the radius increases as the current relative distance decreases.
[0053] Specifically, referring to Figure 2 further, in the second stage of the gradual spiral, d_cut_out < pos_d ≤ d_cut_in. The distance between the aircraft and the spiral center is relatively close, and smooth transition processing is required. The center of the gradual circle remains unchanged, and the radius is determined according to pos_d. Where the smaller pos_d is, the larger the radius r_chg of the gradual circle is. When pos_d = d_cut_in, r_chg = 0; when pos_d = d_cut_out, r_chg = r_t.
[0054] Step S43: If the current relative distance is greater than the stable spiral cut-in distance and less than or equal to the gradual spiral cut-out distance, the aircraft moves towards the tangent point of the target circle; where the tangent point of the target circle refers to the point where the extension line starting from the aircraft is tangent to the target circle, the center of the target circle is the spiral center position, and the radius is the spiral radius.
[0055] Specifically, referring to Figure 2 further, in the third stage of the gradual spiral, d_cir < pos_d ≤ d_cut_out. The distance between the aircraft and the spiral center is very close, and the aircraft needs to adaptively adjust the guiding position (select the circle tangent point) to cut into the spiral circle.
[0056] Referring to Figure 2 further, in the fourth stage of the gradual spiral, pos_d ≤ d_cir, the aircraft enters the stable spiral stage, that is, the above-mentioned step S5.
[0057] Based on the above steps, the method of this embodiment can adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual spiral cut-in distance, the gradual spiral cut-out distance, and the stable spiral cut-in distance, and finally enable the aircraft to cut into the spiral path smoothly. The transition process is reasonable, so it can reduce the error convergence time and the dynamic process tracking error is small.
[0058] In some embodiments, the radius of the gradual circle is specifically determined according to the following expression:
[0059] r_chg = r_t * (pos_d - d_cut_out) / (d_cut_in - d_cut_out);
[0060] Among them, r_chg is the radius of the gradually changing circle.
[0061] Specifically, r_t, pos_d, d_cut_in, and d_cut_out are determined, and pos_d is a dynamically changing value. Therefore, the gradually changing circle is a variable circle. The specific value of r_chg depends on the specific value of pos_d. The closer it is to d_cut_out, the closer the value of r_chg is to 0. The closer it is to d_cut_in, the closer the value of r_chg is to r_t. This reflects that according to the position of pos_d, r_chg will be adjusted accordingly according to the relative size of the current distance. Therefore, within this range, the value of r_chg will gradually increase as pos_d decreases.
[0062] It should be noted that the determination method of r_chg can adopt other methods, but it is necessary to ensure that the smaller pos_d is, the larger r_chg is, pos_d = d_cut_in corresponds to r_chg = 0, and pos_d = d_cut_out corresponds to r_chg = r_t.
[0063] In some embodiments, the gradually changing spiral cut-in distance, the gradually changing spiral cut-out distance, and the stable spiral cut-in distance are determined according to the preview distance, specifically including:
[0064] d_cut_in = k_cut_in * len_t;
[0065] d_cut_out = k_cut_out * len_t;
[0066] d_cir = k_cir * len_t;
[0067] max(r_t / len_t, 1) < k_cir < k_cut_out < k_cut_in;
[0068] Among them, r_t is the spiral radius, len_t is the preview distance, d_cut_in is the gradually changing spiral cut-in distance, d_cut_out is the gradually changing spiral cut-out distance, d_cir is the stable spiral cut-in distance, k_cir is the magnification factor corresponding to the stable spiral cut-in distance, k_cut_out is the magnification factor corresponding to the gradually changing spiral cut-out distance, and k_cut_in is the magnification factor corresponding to the gradually changing spiral cut-in distance.
[0069] In some embodiments, refer to Figure 2, in the second stage, there are two extension lines starting from the aircraft that are tangent to the gradient circle. Therefore, there are two tangent points of the gradient circle, including the left tangent point and the right tangent point. If the hovering direction is clockwise, in the second stage, control the aircraft to move towards the left tangent point of the gradient circle. If the hovering direction is counterclockwise, control the aircraft to move towards the right tangent point of the gradient circle. Among them, the hovering direction refers to the rotation direction of the aircraft during hovering, which can be clockwise or counterclockwise. The hovering direction is given by the planning module of the aircraft.
[0070] Specifically, the tangent points of the gradient circle are calculated according to the following formula:
[0071] (x*x + y*y) = r_chg*r_chg;
[0072] (x – pos_x)*(x – pos_x) + (y – pos_y)*(y – pos_y) = r_d*r_d;
[0073] r_d = sqrt(pos_d*pos_d - r_chg*r_chg);
[0074] Two solutions pos1 = (x1, y1) and pos2 = (x2, y2) can be obtained by solving the above formula. Among the two points pos1 and pos2, one point must correspond to the clockwise hovering tangent point, and the other point corresponds to the counterclockwise hovering tangent point;
[0075] Take:
[0076] vec1 = pos1 - pos_2d = (vec1_x, vec1_y);
[0077] vec2 = pos2 - pos_2d = (vec2_x, vec2_y);
[0078] If vec1_y*pos_x – vec1_x*pos_y > 0 and vec2_y*pos_x – vec2_x*pos_y < 0, then pos1 corresponds to the left tangent point of clockwise hovering, and pos2 corresponds to the right tangent point of counterclockwise hovering. On the contrary, if vec1_y*pos_x – vec1_x*pos_y < 0 and vec2_y*pos_x – vec2_x*pos_y > 0, then pos1 corresponds to the right tangent point of counterclockwise hovering, and pos2 corresponds to the left tangent point of clockwise hovering.
[0079] In some embodiments, refer to Figure 2, in the third stage, there are two extension lines starting from the aircraft that are tangent to the target circle. Therefore, there are two tangent points of the target circle, including the left tangent point and the right tangent point. If the hovering direction is clockwise, in the third stage, control the aircraft to move towards the left tangent point of the target circle. If the hovering direction is counterclockwise, control the aircraft to move towards the right tangent point of the target circle.
[0080] Specifically, the calculation of the tangent point of the target circle is the same as the calculation principle of the tangent point of the gradient circle. The tangent point of the target circle can be calculated according to the following formula:
[0081] (x * x + y * y) = r_t * r_t;
[0082] (x – pos_x) * (x – pos_x) + (y – pos_y) * (y – pos_y) = r_d * r_d;
[0083] r_d = sqrt(pos_d * pos_d - r_t * r_t);
[0084] Two solutions pos3 = (x3, y3) and pos4 = (x4, y4) can be obtained by solving the above formula. One of the two points pos3 and pos4 must correspond to the clockwise hovering tangent point, and the other corresponds to the counterclockwise hovering tangent point.
[0085] Take:
[0086] vec3 = pos3 - pos_2d = (vec3_x, vec3_y);
[0087] vec4 = pos4 - pos_2d = (vec4_x, vec4_y);
[0088] If vec3_y * pos_x – vec3_x * pos_y > 0 and vec4_y * pos_x – vec4_x * pos_y < 0, then pos3 corresponds to the left tangent point of clockwise hovering, and pos4 corresponds to the right tangent point of counterclockwise hovering. Conversely, if vec3_y * pos_x – vec3_x * pos_y < 0 and vec4_y * pos_x – vec4_x * pos_y > 0, then pos3 corresponds to the right tangent point of counterclockwise hovering, and pos4 corresponds to the left tangent point of clockwise hovering.
[0089] In some embodiments, the step S4 controls the movement of the aircraft according to the guiding direction, specifically including:
[0090] Step S41, obtain the velocity vector and the guiding direction vector of the aircraft;
[0091] Specifically, the guiding direction vector in the first stage is vec_cen, and the guiding directions in the second and third stages are vec_t; in the second stage, vec_t is vec1 or vec2, and in the third stage, vec_t is vec3 or vec4; vec_cen = -pos_2d = (-pos_x, -pos_y), and the velocity vector is vel_2d, which includes vel_x and vel_y.
[0092] Step S42: Determine the yaw angle according to the guiding direction vector and the velocity vector, and determine the aircraft acceleration according to the yaw angle, the preview distance, and the ground speed.
[0093] Specifically, as Figure 3 shown, the yaw angle is the included angle between the velocity direction and the guiding direction. Define the yaw angle as TKE, then there is:
[0094] res_dot = vel_x * vec_tx + vel_y * vec_ty;
[0095] res_cross = -vel_y * vec_tx + vel_x * vec_ty;
[0096] TKE = atan2(res_cross, res_dot);
[0097] acc_cmd = k_a * v_g * v_g * sin(TKE) / len_t;
[0098] where k_a is the amplification coefficient corresponding to the preset aircraft acceleration.
[0099] Step S43: Control the movement of the aircraft according to the acceleration acc_cmd obtained in step S42.
[0100] It should be noted that the method of this embodiment can be widely applied to the corresponding path tracking schemes of aircraft such as unmanned vehicles, unmanned ships, and unmanned aerial vehicles. According to the characteristics of different vehicles, relevant parameters such as k_t, k_a, k_p, and k_d can be adjusted according to requirements; moreover, for different vehicles, the heading adjustment methods are different, and the aircraft acceleration acc_cmd obtained in step S42 needs to be converted into corresponding specific instructions to control the vehicle. For example, an unmanned vehicle needs to be converted into the corresponding steering wheel angle, an unmanned ship needs to be converted into the rudder or the differential rotation speed of the left and right engines, and an unmanned aerial vehicle needs to be converted into the roll angle instruction or the heading instruction.
[0101] In some embodiments, step S5 specifically includes:
[0102] Step S51: Determine the yaw offset based on the current relative distance and the turning radius, and determine the radial component and tangential component of the aircraft speed along the target circle according to the relative position relationship between the aircraft and the center position of the turning circle.
[0103] Specifically, the calculation of the yaw offset, radial component, and tangential component is as follows:
[0104] XTK = pos_d – r_t;
[0105] err_v = (vel_x * pos_x + vel_y * pos_y) / pos_d;
[0106] v_tan = (vel_y * pos_x - vel_x * pos_y) / pos_d;
[0107] Where XTK is the yaw offset, err_v is the radial component, and v_tan is the tangential component.
[0108] Step S52: Perform PD control based on the yaw offset and the radial component to obtain the PD control acceleration of the aircraft, and determine the centripetal acceleration of the aircraft according to the tangential component.
[0109] Specifically, the PD control principle is as follows:
[0110] acc_pd = kp * XTK + kd * err_v;
[0111] Where k_p is the proportional coefficient of the PD controller, k_d is the differential coefficient of the PD controller; XTK is used to control the position deviation, err_v is used to control the speed deviation, based on multiplying the position control error by the control gain of the position controller, plus multiplying the speed control error by the control gain of the speed controller, for calculating the acceleration command for dual control of position and speed.
[0112] The calculation of the centripetal acceleration is as follows:
[0113] acc_cir = v_tan * v_tan / r_t;
[0114] Where v_tan is the tangential speed with respect to the target circle, and the centripetal acceleration can be calculated based on v_tan and r_t.
[0115] Step S53: Obtain the aircraft acceleration based on the PD control acceleration and the centripetal acceleration, and control the movement of the aircraft according to this acceleration.
[0116] Specifically, the calculation of the aircraft acceleration is as follows:
[0117] acc_cmd = acc_cir + acc_pd.
[0118] In some embodiments, the parameter d_cut_out can be directly designed in relation to r_t. For example, when pos_d =
[0119] d_cut_out, the included angle between vec_t and vec_cen can be designed to be 45 degrees, and it is required to satisfy:
[0120] d_cut_out = sqrt(2) * r_t = k_cut_out * k_t * v_g;
[0121] If the empirical cruise speed is v_cru and v_g = v_cru is taken, then the product of the two amplification factors satisfies:
[0122] k_cut_out * k_t = sqrt(2) * r_t / v_cru.
[0123] Corresponding to the path following method of the aircraft in the above embodiment, another embodiment of the present application provides a path following device for an aircraft. The device in this embodiment can be used to execute the steps of the path following method of the aircraft in the above embodiment. Refer to Figure 4 , and the device in this embodiment includes:
[0124] An information acquisition module 1, configured to acquire the position of the center of the circle and the radius of the circle of the hovering task when the aircraft needs to switch from executing a linear task to executing a hovering task;
[0125] A first distance calculation module 2, configured to acquire the ground speed of the aircraft, determine the preview distance according to the ground speed, and determine the gradual hovering cut-in distance, the gradual hovering cut-out distance, and the stable hovering cut-in distance according to the preview distance; where r_t < d_cir < d_cut_out < d_cut_in, r_t is the radius of the circle, d_cir is the gradual hovering cut-in distance, d_cut_out is the gradual hovering cut-out distance, and d_cut_in is the stable hovering cut-in distance;
[0126] A second distance calculation module 3, configured to acquire the current relative distance between the aircraft and the position of the center of the circle in real time;
[0127] A first control module 4, configured to, if the current relative distance is greater than the stable hovering cut-in distance, adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual hovering cut-in distance, the gradual hovering cut-out distance, and the stable hovering cut-in distance, and control the movement of the aircraft according to the guiding direction;
[0128] A second control module 5, configured to execute a hovering task according to the position of the center of the circle and the radius of the circle if the current relative distance is less than or equal to the stable hovering cut-in distance.
[0129] In some embodiments, the first control module 4 is specifically configured to:
[0130] If the current relative distance is greater than the gradually changing spiral cut-in distance, the guiding direction is for the aircraft to move towards the spiral center position;
[0131] If the current relative distance is greater than the gradually changing spiral cut-out distance and less than or equal to the gradually changing spiral cut-in distance, the guiding direction is for the aircraft to move towards the tangent point of the gradually changing circle; wherein, the tangent point of the gradually changing circle refers to the point where the extension line starting from the aircraft is tangent to the gradually changing circle, the center of the gradually changing circle is the spiral center position, and the radius increases as the current relative distance decreases;
[0132] If the current relative distance is greater than the stable spiral cut-in distance and less than or equal to the gradually changing spiral cut-out distance, the aircraft moves towards the tangent point of the target circle; wherein, the tangent point of the target circle refers to the point where the extension line starting from the aircraft is tangent to the target circle, the center of the target circle is the spiral center position, and the radius is the spiral radius.
[0133] In some embodiments, the second control module 5 is specifically configured to:
[0134] Determine the yaw offset according to the current relative distance and the spiral radius, and determine the radial component and tangential component of the aircraft speed along the target circle according to the relative position relationship between the aircraft and the spiral center position;
[0135] Perform PD control according to the yaw offset and the radial component to obtain the PD control acceleration of the aircraft, and determine the centripetal acceleration of the aircraft according to the tangential component;
[0136] Obtain the aircraft acceleration according to the PD control acceleration and the centripetal acceleration, and control the movement of the aircraft according to this acceleration and the spiral direction.
[0137] The path following device of the above-described embodiments is merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the path following device of the embodiments.
[0138] It should be noted that the path following device of the above embodiments corresponds to the path following method of the above embodiments. Therefore, for the parts not detailed in the path following device of the above embodiments, reference can be made to the content of the path following method of the above embodiments, and details will not be repeated here.
[0139] Moreover, when the path following device in the above embodiments is implemented in the form of software function modules and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0140] Another embodiment of the present application provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the path following method described in the above embodiments is implemented.
[0141] Among them, the electronic device may further include a bus connecting different components (including the memory and the processor). The memory may include a computer-readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The memory may also include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present application. The electronic device may also communicate with one or more external devices (such as a keyboard, a pointing device, a display, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device, and / or communicate with any device (such as a network card) that enables the electronic device to communicate with one or more other computing devices. Such communication may be performed through an input / output (I / O) interface. Moreover, the electronic device may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter.
[0142] Another embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path following method as described in the above embodiments.
[0143] Specifically, the computer-readable storage medium may include: any entity or recording medium capable of carrying the computer program instructions, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0144] The embodiments of the present application have been described above. The above description is exemplary and not exhaustive, and is also not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to technologies in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A path following method for an aircraft, characterized in that, the method includes: When the aircraft needs to switch from performing a linear task to performing a hovering task, obtain the hovering center position and hovering radius of the hovering task; Obtain the ground speed of the aircraft, determine the preview distance according to the ground speed, and determine the gradual hovering entry distance, gradual hovering exit distance, and stable hovering entry distance according to the preview distance; where, r_t < d_cir < d_cut_out < d_cut_in, r_t is the hovering radius, d_cir is the gradual hovering entry distance, d_cut_out is the gradual hovering exit distance, d_cut_in is the stable hovering entry distance; Continuously obtain the current relative distance between the aircraft and the hovering center position; If the current relative distance is greater than the stable hovering entry distance, adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual hovering entry distance, gradual hovering exit distance, and stable hovering entry distance, and control the movement of the aircraft according to the guiding direction; If the current relative distance is less than or equal to the stable hovering entry distance, perform the hovering task according to the hovering center position and hovering radius.
2. The method according to claim 1, characterized in that, The adaptively adjusting the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual hovering entry distance, gradual hovering exit distance, and stable hovering entry distance specifically includes: If the current relative distance is greater than the gradual hovering entry distance, the guiding direction is for the aircraft to move towards the hovering center position; If the current relative distance is greater than the gradual hovering exit distance and less than or equal to the gradual hovering entry distance, the guiding direction is for the aircraft to move towards the tangent point of the gradual circle; where, the tangent point of the gradual circle refers to the point where the extension line starting from the aircraft is tangent to the gradual circle, the center of the gradual circle is the hovering center position, and the radius increases as the current relative distance decreases; If the current relative distance is greater than the stable hovering entry distance and less than or equal to the gradual hovering exit distance, the aircraft moves towards the tangent point of the target circle; where, the tangent point of the target circle refers to the point where the extension line starting from the aircraft is tangent to the target circle, the center of the target circle is the hovering center position, and the radius is the hovering radius.
3. The method according to claim 2, characterized in that, The radius of the gradual circle is specifically determined according to the following expression: r_chg = r_t * (pos_d - d_cut_out) / (d_cut_in - d_cut_out); where, r_chg is the radius of the gradual circle.
4. The method according to claim 2, characterized in that, Determining the gradual hovering entry distance, gradual hovering exit distance, and stable hovering entry distance according to the preview distance specifically includes: d_cut_in = k_cut_in * len_t; d_cut_out = k_cut_out * len_t; d_cir = k_cir * len_t; max(r_t / len_t, 1) < k_cir < k_cut_out < k_cut_in; Wherein, len_t is the preview distance, k_cir is the magnification factor corresponding to the stable turning-in distance, k_cut_out is the magnification factor corresponding to the gradual turning-out distance, and k_cut_in is the magnification factor corresponding to the gradual turning-in distance.
5. The method according to claim 1, characterized in that, the controlling the movement of the aircraft according to the guiding direction specifically includes: obtaining the velocity vector and the guiding direction vector of the aircraft; determining the yaw angle according to the guiding direction vector and the velocity vector, and determining the acceleration of the aircraft according to the yaw angle, the preview distance and the ground speed; controlling the movement of the aircraft according to the acceleration.
6. The method according to claim 1, characterized in that, the performing the turning task for the aircraft according to the turning center position and the turning radius specifically includes: determining the yaw offset according to the current relative distance and the turning radius, and determining the radial component and the tangential component of the aircraft speed along the target circle according to the relative position relationship between the aircraft and the turning center position; performing PD control according to the yaw offset and the radial component to obtain the PD control acceleration of the aircraft, and determining the centripetal acceleration of the aircraft according to the tangential component; obtaining the acceleration of the aircraft according to the PD control acceleration and the centripetal acceleration, and controlling the movement of the aircraft according to the acceleration.
7. A path following device for an aircraft, characterized in that, comprising: an information acquisition module, configured to acquire the turning center position and the turning radius of the turning task when the aircraft needs to switch from performing a linear task to performing a turning task; a first distance calculation module, configured to acquire the ground speed of the aircraft, determine the preview distance according to the ground speed, and determine the gradual turning-in distance, the gradual turning-out distance and the stable turning-in distance according to the preview distance; wherein, r_t < d_cir < d_cut_out < d_cut_in, r_t is the turning radius, d_cir is the gradual turning-in distance, d_cut_out is the gradual turning-out distance, and d_cut_in is the stable turning-in distance; a second distance calculation module, configured to acquire the current relative distance between the aircraft and the turning center position in real time; a first control module, configured to, if the current relative distance is greater than the stable turning-in distance, adaptively adjust the guiding direction of the aircraft according to the magnitude relationship between the current relative distance and the gradual turning-in distance, the gradual turning-out distance and the stable turning-in distance, and control the movement of the aircraft according to the guiding direction; a second control module, configured to, if the current relative distance is less than or equal to the stable turning-in distance, perform the turning task according to the turning center position and the turning radius.
8. The device according to claim 7, characterized in that, the first control module is specifically configured to: If the current relative distance is greater than the gradually changing spiral entry distance, the guiding direction is for the aircraft to move towards the spiral center position; If the current relative distance is greater than the gradually changing spiral exit distance and less than or equal to the gradually changing spiral entry distance, the guiding direction is for the aircraft to move towards the tangent point of the gradually changing circle; wherein, the tangent point of the gradually changing circle refers to the point where the extension line starting from the aircraft is tangent to the gradually changing circle, the center of the gradually changing circle is the spiral center position, and the radius increases as the current relative distance decreases; If the current relative distance is greater than the stable spiral entry distance and less than or equal to the gradually changing spiral exit distance, the aircraft moves towards the tangent point of the target circle; wherein, the tangent point of the target circle refers to the point where the extension line starting from the aircraft is tangent to the target circle, the center of the target circle is the spiral center position, and the radius is the spiral radius.
9. The device according to claim 7, wherein, the second control module is specifically configured to: determine the yaw offset according to the current relative distance and the spiral radius, and determine the radial component and the tangential component of the aircraft speed along the target circle according to the relative position relationship between the aircraft and the spiral center position; perform PD control according to the yaw offset and the radial component to obtain the PD control acceleration of the aircraft, and determine the centripetal acceleration of the aircraft according to the tangential component; obtain the aircraft acceleration according to the PD control acceleration and the centripetal acceleration, and control the movement of the aircraft according to this acceleration and the spiral direction.
10. An electronic device, wherein, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the path following method according to any one of claims 1 to 6 is implemented.
11. A computer-readable storage medium, wherein, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the path following method according to any one of claims 1 to 6 is implemented.