An algorithm for estimating the heading angle of the path to be tracked by an unmanned system
By obtaining a dense set of discrete points during the movement of the unmanned system, calculating the parameters of the number of rotations of the vehicle around the vertical axis and the tangential angle symbol, the problem of heading angle estimation when the unmanned system is tracking any path is solved, and automatic , Accurate heading angle estimation, suitable for tracking with unlimited range and frequent turns.
Patent Information
- Application Number
- CN202210155075.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-02-21
AI Technical Summary
It is difficult to effectively estimate the heading angle of an unmanned system when tracking an arbitrary path with existing technology, especially in situations of unlimited range and frequent turns, and the manual update method is not applicable.
An algorithm for estimating the heading angle of the path to be tracked by the unmanned system is adopted. By obtaining a dense set of discrete points, the parameters of the number of revolutions of the aircraft around the vertical axis and the tangential angle symbol are calculated in the NED coordinate system, and circular variables are used to traverse the positions. Point, calculate heading angle, suitable for tracking any path.
It realizes the automatic estimation of the heading angle at each point on the path to be tracked by the unmanned system, avoiding manual correction, and is suitable for tracking problems with infinite range and frequent turns. The algorithm has a simple structure, is easy to program, and the program runs fast, and is suitable for any path. Estimation of heading angle.
Smart Images

Figure CN114625128B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned system motion control, and in particular to an estimation algorithm for a heading angle of a path to be tracked by an unmanned system. Background Art
[0002] Unmanned system tracking control can be divided into two types of problems: path tracking and trajectory tracking. When performing tracking control, it is often necessary to obtain the heading angle at the reference point of the path to be tracked or the heading angle at the trajectory point in advance. Taking the path tracking problem of an unmanned vehicle as an example, when tracking a curved path, the heading angle at the reference point needs to be used to calculate the heading error; taking the trajectory tracking of an unmanned boat as an example, for tracking a series of track points that do not contain heading angle information, a method is needed to estimate the heading angle at each track point; taking the path tracking of an unmanned boat as an example, the design of some guidance algorithms and control laws requires that the heading angle or curvature (or tangent angle) at the reference point of the path to be tracked is known.
[0003] At present, most studies deal with path tracking or trajectory tracking problems, usually using two methods to deal with heading angles:
[0004] 1. If the path or trajectory to be tracked is short, or does not involve frequent turns, and the heading angle is always between 0 and 180° or 0 and -180°, the heading angle is directly replaced by the tangent angle. This method is not suitable for tracking any path.
[0005] 2. When the yaw angle continuously rotates through the north axis, if the problem is not complicated, the heading angle is updated manually. However, manual update can only be used for the study of short-range problems and is not applicable to tracking problems with infinite range and frequent turns. Summary of the invention
[0006] In view of the deficiencies in the prior art, an object of the present invention is to provide an algorithm for estimating the heading angle of a path to be tracked by an unmanned system, which can solve the problem of estimating the heading angle when tracking any path with high accuracy.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] An algorithm for estimating the heading angle of a path to be tracked by an unmanned system, characterized by comprising:
[0009] Step 1: Obtain a dense discrete location set during the movement of the unmanned system;
[0010] Step 2: In the NED coordinate system, let the number of rotations of the aircraft around the vertical axis at a certain point be M. Assuming that the heading of the aircraft at the initial point is consistent with the north direction, the heading angle is 0°, and the number of rotations of the aircraft around the vertical axis at the initial point, M0, is 0;
[0011] Step 3, let the rotation direction parameter of the aircraft around the vertical axis at a certain position be flag1 and the tangent angle symbol be flag2, where flag1=1 means that it is estimated that the aircraft is rotating clockwise within the neighborhood of the position when the aircraft is accurately tracking the path or trajectory, flag1=0 means that it is estimated that the aircraft is rotating counterclockwise within the neighborhood of the position when the aircraft is accurately tracking the path or trajectory, flag2=1 means that the tangent angle of the current position is in the range [0°, 180°], flag2=0 means that the tangent angle of the current position is in the range (-180°, 0°), obtain the rotation direction parameter flag10 and the tangent angle symbol flagg20 of the aircraft around the vertical axis at the initial position P0 (x0, y0);
[0012] Step 4: Define loop variable j to traverse the dense discrete site set D. The initial value of j is 1. Get loop variable j and read site P. j (x j ,y j ) and P j+1 (x j+1 ,y j+1 ), and obtain the site P j (x j ,y j ) of the tangent angle φ j ;
[0013] Step 5: Get parameter M j 、flag1 j 、flag2 j ;
[0014] Step 6: Calculate the current position P j (x j ,y j ) of the heading angle ψ j , and let j=j+1, return to step 4, obtain the loop variable j, until the heading angles of all points except the initial point P0(x0,y0) and the last point in the set D are obtained.
[0015] Furthermore, in step 1, the dense discrete site set D can be composed of dense trajectory points in the trajectory tracking problem, and can also be obtained by sampling the path in the path tracking problem.
[0016] Furthermore, in step 3, the first three points {P0(x0, y0), P1(x1, y1), P2(x2, y2)} of the dense discrete site set D are read, and the calculation formulas of the initial point vehicle rotation direction parameter flag10 around the vertical axis and the tangential angle symbol flag20 are:
[0017]
[0018] Furthermore, in step 4, the site P j (x j ,y j ) is the vector formed by its two adjacent points in the tangential direction Approximately, the site P j (x j ,y j ) is calculated as:
[0019] Furthermore, the step 5 comprises:
[0020] Step 5.1: According to M j-1 、flag1 j-1 、flag2 j-1 and site P j (x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j ) is the number of revolutions of the spacecraft around the vertical axis;
[0021] If φ j ≥0, flag1 j =1 and flag2 j = 0, it is determined that the accumulated yaw angle of the aircraft is 360°, and then the accumulation of the next circle rotation is started, and M is updated. j =M j-1 +1;
[0022] If φ j <0, flag1 j =0 and flag2 j = 1, the yaw angle of the aircraft is determined to return to the accumulation of the previous circle rotation, and M is updated j =M j-1 -1;
[0023] Otherwise, M j =M j-1 ;
[0024] Step 5.2: According to M j-1 、flag1 j-1 、flag2 j-1 and site Pj(x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j) around the vertical axis and the sign of the tangential angle;
[0025] If φ j ≥0, when flag1 is satisfied at the same time j-1 =0,y j+1 -y j-1 ≥0 and flag2 j-1 =1 or flag1 is satisfied at the same time j-1 =0 and y j+1 -y j-1 <0 when flag1 is updated j =0, flag2 j =1, otherwise update flag1 j =1, flag2 j =1;
[0026] If φ j <0, when flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 ≥0 and flag2 j-1 =0 or flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 <0 when flag1 is updated j =1, flag2 j =0, otherwise update flag1 j =0, flag2 j =0.
[0027] Furthermore, in step 6, the parameter M j 、flag1 j 、flag2 j and site P j (x j ,y j ) of the tangent angle φ j Calculate the current position P j (x j ,y j ) of the heading angle ψ j , if flag1 j =flag2 j , then ψ j =φ j +M j *360°; if flag1 j =0, flag2 j =1, then ψ j =φ j +(M j -1)*360°; if flag1 j=1, flag2 j = 0, then ψ j =φ j +(M j +1)*360°.
[0028] Furthermore, for an unmanned system without lateral motion, the heading angle of the unmanned system's path to be tracked can be directly obtained through steps 1 to 6. For an unmanned system with lateral velocity, a small angle correction ε is introduced;
[0029] Then the site P j Heading angle ψ j The calculation formula of ' is:
[0030] ψ j '=ψ j +ε
[0031]
[0032] Among them: u, v are the longitudinal speed and lateral speed of the unmanned system respectively.
[0033] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0034] 1. The algorithm for estimating the heading angle of the path to be tracked by an unmanned system described in the present invention has a simple algorithm structure, is easy to program and implement, and has a fast program running speed. The algorithm estimates "the state of the aircraft at the location when the aircraft accurately tracks the path or trajectory" by updating the parameters of the number of rotations of the aircraft around the vertical axis, the direction of rotation of the aircraft around the vertical axis and the sign parameters of the tangential angle. The algorithm can then automatically estimate and output the heading angle at each point on the path to be tracked, avoiding manual correction of the reference heading angle when the yaw angle continuously rotates through the north axis, and is suitable for tracking problems with unlimited range and frequent turns.
[0035] 2. The algorithm for estimating the heading angle of the path to be tracked by an unmanned system described in the present invention estimates the tangent angle and heading angle at a point based on a set of discrete points on any path, using a vector formed by two adjacent points of a point and an inverse cosine function, thereby avoiding function derivative operations and the situation where the tangent angle and heading angle do not exist at certain points. A reference heading angle can be estimated for the tracking of each point on the path, and the algorithm is suitable for estimating the heading angle on any path.
[0036] 3. The algorithm for estimating the heading angle of the path to be tracked by an unmanned system described in the present invention simplifies the problem by defining the rotation direction parameters of the aircraft around the vertical axis and the sign parameters of the tangential angle at a certain location, thereby facilitating the updating of the parameters of the number of rotations of the aircraft around the vertical axis at the next location. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a flow chart for estimating the heading angle of the path to be tracked according to the present invention.
[0038] Figure 2 This is a flow chart for updating parameters M, flag1, and flag2 in step 5 and step 6 of the present invention.
[0039] Figure 3 The figure is a test schematic diagram of an embodiment of the present invention under a given path to be tracked.
[0040] Figure 4 It is a schematic diagram of the unmanned boat with lateral speed according to the present invention. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0042] In the present invention, the tangent angle is defined as: the angle between the tangent vector direction at a certain point on the path or trajectory to be tracked and the true north direction, with a value range of (-180°, 180°], represented by φ.
[0043] The heading angle or yaw angle is defined as: when the vehicle accurately tracks to a certain point on the path, the sum of the tangential angle at the initial point and the integral of the yaw angular velocity from the initial moment to the current moment, represented by ψ.
[0044] An algorithm for estimating the heading angle of a path to be tracked by an unmanned system includes the following steps: Figure 1 and Figure 2 As shown:
[0045] Step 1: Obtain a dense discrete point set during the motion of the unmanned system, and let the dense discrete point set be D = {P i (x i ,y i ),i=0,1,2,3…,N};
[0046] Step 2: In the NED coordinate system, let the number of rotations of the aircraft around the vertical axis at a certain point be M. Assuming that the heading of the aircraft at the initial point is consistent with the north direction, the heading angle is 0°, and the number of rotations of the aircraft around the vertical axis at the initial point, M0, is 0;
[0047] Step 3, let the rotation direction parameter of the aircraft around the vertical axis at a certain position be flag1 and the tangential angle symbol be flag2, where flag1=1 means that when the aircraft is assuming that the path or trajectory is accurately tracked, it is estimated that it is rotating clockwise within the neighborhood of the position, flag1=0 means that when the aircraft is assuming that the path or trajectory is accurately tracked, it is estimated that it is rotating counterclockwise within the neighborhood of the position, flag2=1 means that the tangential angle of the current position is in the range [0°, 180°], flag2=0 means that the tangential angle of the current position is in the range (-180°, 0°), and obtain the rotation direction parameter flag10 and the tangential angle symbol flag20 of the aircraft around the vertical axis at the initial position P0 (x0, y0);
[0048] Step 4: Define loop variable j to traverse the dense discrete site set D. The initial value of j is 1. Get loop variable j and read site P. j (x j ,y j ) and P j+1 (x j+1 ,y j+1 ), and obtain the site P j (x j ,y j ) of the tangent angle φ j ;
[0049] Step 5: Get parameter M j 、flag1 j 、flag2 j ;
[0050] Step 6: Calculate the current position P j (x j ,y j ) of the heading angle ψ j , and let j=j+1, return to step 4, obtain the loop variable j, until the heading angles of all points except the initial point P0(x0,y0) and the last point in the set D are obtained.
[0051] In step 1, the dense discrete site set D may be composed of dense trajectory points in the trajectory tracking problem, or may be obtained by sampling the path in the path tracking problem.
[0052] In step 1, by obtaining a dense discrete location set during the motion of the unmanned system, the estimation algorithm can solve the heading angle estimation problem during arbitrary path tracking.
[0053] In step 2, the vertical axis also refers to the earth's axis.
[0054] In step 3, the first three points {P0(x0,y0), P1(x1,y1), P2(x2,y2)} of the dense discrete site set D are read. The calculation formulas for the initial point vehicle rotation direction parameter flag10 around the vertical axis and the tangential angle symbol flag20 are:
[0055]
[0056] In step 4, site P j (x j ,y j ) is the vector formed by its two adjacent points in the tangential direction Approximately, the site P j (x j ,y j ) is calculated as:
[0057] The step 5 includes: Figure 2 As shown:
[0058] Step 5.1: According to M j-1 、flag1 j-1 、flag2 j-1 and site P j (x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j ) is the number of revolutions of the spacecraft around the vertical axis;
[0059] If φ j ≥0, flag1 j =1 and flag2 j = 0, it is determined that the accumulated yaw angle of the aircraft is 360°, and then the accumulation of the next circle rotation is started, and M is updated. j =M j-1 +1;
[0060] If φ j <0, flag1 j =0 and flag2 j = 1, the yaw angle of the aircraft is determined to return to the accumulation of the previous circle rotation, and M is updated j =M j-1 -1;
[0061] Otherwise, M j =M j-1 ;
[0062] Step 5.2: According to M j-1 、flag1j-1 、flag2 j-1 and site P j (x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j ) around the vertical axis and the sign of the tangential angle;
[0063] If φ j ≥0, when flag1 is satisfied at the same time j-1 =0,y j+1 -y j-1 ≥0 and flag2 j-1 =1 or flag1 is satisfied at the same time j-1 =0 and y j+1 -y j-1 <0 when flag1 is updated j =0, flag2 j =1, otherwise update flag1 j =1, flag2 j =1;
[0064] If φ j <0, when flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 ≥0 and flag2 j-1 =0 or flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 <0 when flag1 is updated j =1, flag2 j =0, otherwise update flag1 j =0, flag2 j =0.
[0065] In this process, since the parameter flag2 means the current position P j (x j ,y j ), that is, the tangent vector of the current position is on the left or right side of the north axis, so the tangent angle φ of the current position j ≥0, flag2 j =1, and φ j <0, flag2 j =0.
[0066] Since the parameter flag1 indicates the current position P j (x j ,y j) is the rotation direction parameter around the vertical axis, that is, the current position P j (x j ,y j ) The rotation direction in the neighborhood, if φ j ≥0, when flag1 is satisfied at the same time j-1 =0,y j+1 -y j-1 ≥0 and flag2 j-1 =1 or flag1 is satisfied at the same time j-1 =0 and y j+1 -y j-1 <0, the spacecraft is considered to be rotating counterclockwise when it is tracking the path or trajectory accurately, otherwise it keeps rotating clockwise; j <0, when flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 ≥0 and flag2 j-1 =0 or flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 When <0, the aircraft is considered to be rotating clockwise when it is tracking the path or trajectory accurately, otherwise it keeps rotating counterclockwise.
[0067] In step 6, the parameter M j 、flag1 j 、flag2 j and site P j (x j ,y j ) of the tangent angle φ j , if flag1 j =flag2 j , then ψ j =φ j +M j *360°; if flag1 j =0, flag2 j =1, then ψ j =φ j +(M j -1)*360°; if flag1 j =1, flag2 j = 0, then ψ j =φ j +(M j +1)*360°.
[0068] In one embodiment of the present invention, Figure 3As shown in the figure, the path consists of a line segment and three semicircles: the length of the line segment is 50, the radii of the semicircles are 50, 100, and 150 respectively, and the centers of the semicircles are (0,0), (50,0), and (0,0) respectively; the discrete sites are obtained by sampling the path, the sampling interval on the line segment is 0.5, and the sampling interval on the semicircle is 2rad; the initial point coordinate is (0,0), if the aircraft starts from here, the yaw angular velocity direction will remain clockwise throughout the whole process, and the heading angle obtained by the algorithm of the present invention shows a trend of continuous increase, and the estimated result is consistent with the result of the aircraft actually moving along the path. Figure 3 The estimated results and errors of the coordinate points marked a to g are shown in Table 1.
[0069] In step 2, M0 is 0 at the initial point (0,0);
[0070] The coordinates of the first three points in the set are (0,0), (0.5,0), and (1,0). Through step 3, flag10=flag20=1;
[0071] From the initial point (0,0) to the point (50,0) at the serial number a, the point P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 1 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j is 0, 1, 1.
[0072] For the point (50,0) at the serial number a, the coordinates of its two adjacent points are (49.5,0) and (49.97,-1.74), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 1 is about 164.939°; the current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 1 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j are 0, 1, and 1 respectively. According to step 6, the heading angle of this point is 164.939°.
[0073] For the next point (49.97, -1.74) of the point (50, 0) at sequence number a, the coordinates of the two adjacent points of the point (49.97, -1.74) are (50, 0) and (49.88, -3.49), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 2 is about -178.031°; the current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 1 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j are 0, 1, and 0 respectively. According to step 6, the heading angle of this point is 181.969°.
[0074] From the site (49.97, -1.74) to the site (0, -50) at the serial number b, the site P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 0 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j It is 0, 1, 0.
[0075] For the point (0, -50) at serial number b, the coordinates of its two adjacent points are (0.87, -49.99) and (-0.87, -49.99), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 2 is about -90°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 0 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j are 0, 1, and 0 respectively. According to step 6, the heading angle of this point is 270°.
[0076] From the point b (0, -50) to the point c (-50, 0), the point P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 0 respectively. Update the parameter M by steps 4 and 5. j ,flag1j ,flag2 j It is 0, 1, 0.
[0077] For the point (-50,0) at the serial number c, the coordinates of its two adjacent points are (-49.99,-0.87) and (-49.98,1.75), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 3 is about 0.167°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 0, 1, and 0 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j They are 1, 1, and 1 respectively. According to step 6, the heading angle of this point is 360.167°.
[0078] From the point c (-50,0) to the point d (50,100), the point P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, 1 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j It is 1, 1, 1.
[0079] For the point (50,100) at the serial number d, the coordinates of its two adjacent points are (48.25,99.98) and (51.75,99.98), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 4 is about 90°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, and 1 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j They are 1, 1, and 1 respectively. According to step 6, the heading angle of this point is 450°.
[0080] From the site (50,100) at the serial number d to the site (150,0) at the serial number e, the site P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1are 1, 1, 1 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j It is 1, 1, 1.
[0081] For the point (150,0) at the serial number e, the coordinates of its two adjacent points are (149.98,1.75) and (149.97,-2.62), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 5 is about -179.90°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, and 1 respectively. The parameters are updated by step 5. The updated parameters M j ,falg1 j ,flag2 j are 1, 1, and 0 respectively. According to step 6, the heading angle of this point is 540.100°.
[0082] From the site (150,0) at the serial number e to the site (0,-150) at the serial number f, the site P between the two points j (x j ,y j ) all satisfy: M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, and 0 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j It is 1, 1, 0.
[0083] For the point (0, -150) at the serial number f, the coordinates of its two adjacent points are (2.62, -149.98) and (-2.62, -149.98), respectively. Using the tangential angle calculation formula in step 4, the tangential angle at point 6 is about -90°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, and 0 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j are 1, 1, and 0 respectively. According to step 6, the heading angle of this point is 630°.
[0084] From the position at f (0, -150) to the position at g The point P between two points j (x j ,y j ) all satisfy: M j-1,flag1 j-1 ,flag2 j-1 are 1, 1, and 0 respectively. Update the parameter M by steps 4 and 5. j ,flag1 j ,flag2 j It is 1, 1, 0.
[0085] For the site at sequence number g The coordinates of the two adjacent points are (-104.20, -107.90) and (-107.90, -104.20), respectively. Using the tangent angle calculation formula in step 4, the tangent angle at point 7 is about -45.00°. The current parameter M j-1 ,flag1 j-1 ,flag2 j-1 are 1, 1, and 0 respectively. The parameters are updated by step 5. The updated parameters M j ,flag1 j ,flag2 j 1, 1, and 0 respectively. According to step 6, the heading angle of this point is 675°
[0086] Table 1 Aircraft Figure 3 Estimation of heading angle of mid-path points a to g
[0087]
[0088] As can be seen from Table 1, the algorithm of the present invention can make a relatively accurate estimate of the heading angle of the location of the path to be tracked by the unmanned system. Sequence number 1 is the intersection of the line segment and the semicircle. The path is not differentiable at this point, so the true value of the heading angle is null. The results given in Table 1 can be used as a reference value for tracking control. For non-differentiable points, a reference heading angle can also be given, and the heading angle direction at this point points to the next switching path, indicating that the aircraft is expected to turn at the corner, which can be used as a reference for actual navigation.
[0089] Since the basis for estimating the heading angle of the present invention is the coordinates of two adjacent points, and any path can be expressed as a set of discrete sites, the algorithm of the present invention is applicable to any path, and the denser the discrete site set, the closer the estimation result is to the true value (expected value). In the tangent angle estimation formula given in step 4 of the embodiment, the arc cosine function is used instead of the arc tangent function, avoiding the situation where the tangent angle cannot be solved at 90°.
[0090] For unmanned systems without lateral motion, such as unmanned vehicles, wheeled robots, etc., the reference heading angle information when tracking the path or trajectory can be directly estimated by the present invention. For unmanned systems with lateral speed, such as unmanned boats, Figure 4As shown in the figure, there is an angle between its heading and the actual direction of motion. The lateral velocity of the unmanned boat is smaller than the longitudinal velocity, so a small angle correction ε can be introduced, then the position P j Heading angle ψ j The estimate of ' is: j '=ψ j +ε. Among them, u and v are the longitudinal speed and lateral speed of the unmanned boat respectively. Since the speed of the unmanned boat changes slowly, the present invention is applied to the unmanned boat trajectory tracking, and has good performance when estimating the reference heading angle for a period of time in the future online.
[0091] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An algorithm for estimating the heading angle of a path to be tracked by an unmanned system, characterized in that: include: Step 1: Obtain a dense discrete location set during the movement of the unmanned system; Step 2: In the NED coordinate system, let the number of rotations of the aircraft around the vertical axis at a certain point be M. Assuming that the heading of the aircraft at the initial point is consistent with the north direction, the heading angle is 0°, and the number of rotations of the aircraft around the vertical axis at the initial point, M0, is 0; Step 3, let the rotation direction parameter of the aircraft around the vertical axis at a certain position be flag1 and the tangential angle symbol be flag2, where flag1=1 means that when the aircraft is assuming that the path or trajectory is accurately tracked, it is estimated that it is rotating clockwise within the neighborhood of the position, flag1=0 means that when the aircraft is assuming that the path or trajectory is accurately tracked, it is estimated that it is rotating counterclockwise within the neighborhood of the position, flag2=1 means that the tangential angle of the current position is in the range [0°, 180°], flag2=0 means that the tangential angle of the current position is in the range (-180°, 0°), and obtain the rotation direction parameter flag10 and the tangential angle symbol flag20 of the aircraft around the vertical axis at the initial position P0 (x0, y0); Step 4: Define loop variable j to traverse the dense discrete site set D. The initial value of j is 1. Get loop variable j and read site P. j (x j ,y j ) and P j+1 (x j+1 ,y j+1 ), and obtain the site P j (x j ,y j ) of the tangent angle φ j ; Step 5: Get parameter M j 、flag1 j 、flag2 j ; Step 6: Calculate the current position P j (x j ,y j ) of the heading angle ψ j , and let j=j+1, return to step 4, obtain the loop variable j, until the heading angles of all points except the initial point P0(x0,y0) and the last point in the set D are obtained.
2. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: In step 1, the dense discrete site set D can be composed of dense trajectory points in the trajectory tracking problem, and can also be obtained by sampling the path in the path tracking problem.
3. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: In step 3, the first three points {P0(x0, y0), P1(x1, y1), P2(x2, y2)} of the dense discrete site set D are read, and the calculation formulas of the initial point vehicle rotation direction parameter flag10 around the vertical axis and the tangential angle symbol flag20 are:
4. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: In step 4, the site P j (x j ,y j ) is the vector formed by its two adjacent points in the tangential direction Approximately, the site P j (x j ,y j ) is calculated as:
5. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: The step 5 comprises: Step 5.1: According to M j-1 、flag1 j-1 、flag2 j-1 and site P j (x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j ) is the number of revolutions of the spacecraft around the vertical axis; If φ j ≥0, flag1 j =1 and flag2 j = 0, it is determined that the accumulated yaw angle of the aircraft is 360°, and then the accumulation of the next circle rotation is started, and M is updated. j =M j-1 +1; If φ j <0, flag1 j =0 and flag2 j = 1, the yaw angle of the aircraft is determined to return to the accumulation of the previous circle rotation, and M is updated j =M j-1 -1; Otherwise, M j =M j-1 ; Step 5.2: According to M j-1 、flag1 j-1 、flag2 j-1 and site P j (x j ,y j ) of the tangent angle φ j Get the site P j (x j ,y j ) around the vertical axis and the sign of the tangential angle; If φ j ≥0, when flag1 is satisfied at the same time j-1 =0,y j+1 -y j-1 ≥0 and flag2 j-1 =1 or flag1 is satisfied at the same time j-1 =0 and y j+1 -y j-1 <0 when flag1 is updated j =0, flag2 j =1, otherwise update flag1 j =1, flag2 j =1; If φ j <0, when flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 ≥0 and flag2 j-1 =0 or flag1 is satisfied at the same time j-1 =1,y j+1 -y j-1 <0 when flag1 is updated j =1, flag2 j =0, otherwise update flag1 j =0, flag2 j =0.
6. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: In step 6, the parameter M j 、flag1 j 、flag2 j and site P j (x j ,y j ) of the tangent angle φ j Calculate the current position P j (x j ,y j ) of the heading angle ψ j , if flag1 j =flag2 j , then ψ j =φ j +M j *360°; if flag1 j =0, flag2 j =1, then ψ j =φ j +(M j -1)*360°; if flag1 j =1, flag2 j = 0, then ψ j =φ j +(M j +1)*360°.
7. The algorithm for estimating the heading angle of the path to be tracked by the unmanned system according to claim 1, characterized in that: For unmanned systems without lateral motion, the heading angle of the unmanned system's path to be tracked can be directly obtained through steps 1 to 6. For unmanned systems with lateral velocity, a small angle correction ε is introduced; Then the site P j Heading angle ψ j The calculation formula of ′ is: ψ j ′=ψ j +e Among them: u, v are the longitudinal speed and lateral speed of the unmanned system respectively.
