Vehicle control method, system, electronic device and storage medium
By constructing a high-precision vehicle path curve and local coordinate system, combined with the kinematic model of Ackerman steering or articulated steering, control variables are generated, which solves the accuracy and stability problems of vehicle path control under complex paths and realizes accurate path tracking of the vehicle.
Patent Information
- Application Number
- CN202411995327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Under complex path conditions, the existing technology has insufficient vehicle path control accuracy and stability, resulting in large lateral deviations and unstable heading adjustments during vehicle driving.
By obtaining the vehicle's current position and steering type, a high-precision vehicle path curve is constructed. Multiple preset vehicle passing points are fitted using B-spline curves, a local coordinate system is established in segments, and real-time curvature and deviation are calculated. Combined with the kinematic model of Ackerman steering or articulated steering, control variables are generated to achieve precise path tracking.
The accuracy and stability of vehicle path control are improved, ensuring that the vehicle can quickly and accurately track the target path under complex path conditions, reducing path deviation and control delay.
Smart Images

Figure CN120156504B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control technology, and in particular to a vehicle control method, system, electronic equipment and storage medium. Background Art
[0002] With the rapid development of autonomous driving technology, path tracking control of vehicles in complex road environments has become one of the key technologies.
[0003] Currently, autonomous vehicles generally use a control method based on a predetermined path. Sensors acquire the vehicle's real-time position and compare it with a preset path to achieve precise navigation and steering. However, existing technologies often approximate curved paths as a series of short straight segments, relying on high-frequency position sampling and simple path-tracking algorithms for control. This method maintains good control under low-curvature and low-speed driving conditions. However, under high-curvature or complex road conditions, accurate path tracking is often difficult to achieve due to path approximation errors and limitations of the control algorithm, resulting in large lateral deviations and unstable heading adjustments during vehicle operation.
[0004] Therefore, how to improve the accuracy and stability of vehicle path control under complex path conditions has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The present invention provides a vehicle control method, system, electronic device and storage medium to address the defects in the prior art and improve the accuracy and stability of vehicle path control under complex path conditions.
[0006] The present invention provides a vehicle control method, comprising the following steps:
[0007] Obtaining the current position and steering type of the vehicle, and obtaining a vehicle path curve; the vehicle path curve is obtained by fitting a plurality of preset vehicle passing points;
[0008] Determining a reference point on the vehicle path curve that is closest to the current position based on the current position and all sub-path segments; the sub-path segments are obtained by segmenting the vehicle path curve based on all the preset vehicle passing points;
[0009] Calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point;
[0010] The real-time curvature, the position deviation, and the angle deviation are substituted into a control model corresponding to the steering type, and the control model is solved to obtain a control variable for controlling the steering of the vehicle.
[0011] According to a vehicle control method provided by the present invention, determining a reference point on the vehicle path curve that is closest to the current position based on the current position and all sub-path segments specifically includes:
[0012] Establishing a corresponding first local coordinate system for each sub-path segment, where the origin of the first local coordinate system is set at the starting point of the corresponding sub-path segment, and the x-axis direction of the first local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment;
[0013] Convert the current position into each of the first local coordinate systems, and calculate the lateral offset of the converted current position in each of the local coordinate systems;
[0014] selecting the sub-path segment having the smallest lateral offset from all of the lateral offsets;
[0015] A reference point closest to the current position is determined from the selected sub-path segments.
[0016] According to a vehicle control method provided by the present invention, the calculating of the real-time curvature at the reference point specifically includes:
[0017] extracting a first-order derivative and a second-order derivative of the vehicle path curve at the reference point;
[0018] The real-time curvature at the reference point is calculated according to the first-order derivative and the second-order derivative and the definition formula of curvature.
[0019] According to a vehicle control method provided by the present invention, the calculating of the position deviation and the angle deviation between the current position and the reference point specifically includes:
[0020] Establishing a second local coordinate system at the reference point with the reference point as the origin and a tangent direction along the reference point as the x-axis;
[0021] Calculating the tangent inclination angle of the reference point in the world coordinate system;
[0022] Converting the current position to the second local coordinate system according to the tangent inclination angle to obtain a converted abscissa and a converted ordinate of the vehicle in the second local coordinate system;
[0023] Get the current heading angle of the vehicle in the world coordinate system;
[0024] The converted ordinate is used as the position deviation, and the angular difference between the current heading angle and the tangent inclination angle is used as the angular deviation.
[0025] According to a vehicle control method provided by the present invention, the method further includes:
[0026] A cubic B-spline curve is fitted on the plurality of preset vehicle passing points to obtain the vehicle path curve; wherein the B-spline curve adopts a non-uniform node setting, the node parameters are allocated by a centripetal parameterization method, and the head and tail nodes are set in a multiple overlap form of the head and tail nodes, and the node parameters are determined by the cumulative value of the square root of the Euclidean distance between adjacent preset vehicle passing points.
[0027] According to a vehicle control method provided by the present invention, the steering type includes an Ackerman steering type, and the control variable includes a first control parameter; substituting the real-time curvature, the position deviation, and the angle deviation into a preset control model corresponding to the steering type to obtain the control variable for controlling the vehicle steering specifically includes:
[0028] Get the vehicle's current speed and front and rear wheelbase;
[0029] The current speed, the front and rear wheelbase, the real-time curvature, the position deviation, and the angle deviation are substituted into a first kinematic model of a vehicle based on an Ackerman steering type, and the first kinematic model is solved according to a preset method to obtain the first control parameter.
[0030] According to a vehicle control method provided by the present invention, the steering type further includes an articulated steering type, and the control amount further includes a second control parameter; the real-time curvature, the position deviation, and the angle deviation are substituted into a preset control model corresponding to the steering type to obtain a control amount for controlling the vehicle steering, specifically further comprising:
[0031] Get the vehicle's current speed, front wheelbase, and rear wheelbase;
[0032] The current speed, the front wheelbase, the rear wheelbase, the real-time curvature, the position deviation and the angle deviation are substituted into a second kinematic model of a vehicle based on an articulated steering type, and the second kinematic model is solved according to a preset method to obtain the second control parameters.
[0033] According to a vehicle control method provided by the present invention, the preset method is any one of a linear quadratic regulation control method and a model predictive control method.
[0034] The present invention also provides a vehicle control system, comprising the following modules:
[0035] An acquisition module is used to obtain the current position and steering type of the vehicle and obtain a vehicle path curve; the vehicle path curve is obtained by fitting a plurality of preset vehicle passing points;
[0036] a first processing module configured to determine, based on the current position and all sub-path segments, a reference point on the vehicle path curve that is closest to the current position; the sub-path segments being obtained by segmenting the vehicle path curve based on all the preset vehicle pass-through points;
[0037] a second processing module, configured to calculate a real-time curvature at the reference point, and calculate a position deviation and an angular deviation between the current position and the reference point;
[0038] The third processing module is used to substitute the real-time curvature, the position deviation and the angle deviation into a control model corresponding to the steering type, and solve the control model to obtain a control variable for controlling the steering of the vehicle.
[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the vehicle control methods described above is implemented.
[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements any of the vehicle control methods described above when executed by a processor.
[0041] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned vehicle control methods.
[0042] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0043] By acquiring the vehicle's current position and steering type, along with the vehicle's path curve, the system can identify the input information required for path tracking based on the vehicle's current state, ensuring real-time and accurate control calculations. Furthermore, based on the vehicle's current position and all subpaths of the path curve, the system determines the reference point on the path curve closest to the current position. Subpath segments are generated by segmenting the path curve. This segmented search effectively narrows the search range and improves computational efficiency. Furthermore, by fine-tuning the local path segment positioning, the system ensures that the nearest reference point can be found quickly and accurately, avoiding the accumulation of path deviations due to inaccurate searches. Based on this reference point, the system calculates the real-time curvature of the path, as well as the positional and angular deviations between the current position and the reference point. The real-time curvature calculation accurately describes the local curvature of the path, providing feedforward for subsequent control and improving responsiveness on curved paths. Furthermore, the positional and angular deviation calculations accurately measure the lateral displacement error and heading difference between the vehicle and the path, providing real-time error information for vehicle control and ensuring dynamic monitoring and correction of vehicle deviations. Finally, the real-time curvature, position deviation, and angle deviation are substituted into a preset control model corresponding to the steering type. By solving this model, the control variables used to control the vehicle's steering can be generated. Different vehicle steering types, such as Ackerman steering and articulated steering, are solved using corresponding kinematic control models. By introducing real-time curvature as a feedforward control term and combining it with feedback adjustment of position deviation and angle deviation, precise control of the vehicle's path tracking is achieved. This control method not only improves real-time performance and accuracy, but also effectively enhances the precision and stability of vehicle path control under complex path conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is one of the flow charts of the vehicle control method provided by the present invention.
[0046] Figure 2 This is the second flow chart of the vehicle control method provided by the present invention.
[0047] Figure 3 This is the third flow chart of the vehicle control method provided by the present invention.
[0048] Figure 4This is the fourth flow chart of the vehicle control method provided by the present invention.
[0049] Figure 5 This is the fifth flow chart of the vehicle control method provided by the present invention.
[0050] Figure 6 This is the sixth flow chart of the vehicle control method provided by the present invention.
[0051] Figure 7 This is the seventh flow chart of the vehicle control method provided by the present invention.
[0052] Figure 8 It is a structural diagram of the vehicle control system provided by the present invention.
[0053] Figure 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0055] It should be noted that, in the description of the present invention, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. The orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0056] The terms "first," "second," and so forth, used herein are used to distinguish similar objects, not to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, allowing embodiments of the present invention to be implemented in an order other than that illustrated or described herein. Furthermore, the terms "first," "second," and so forth generally distinguish objects of a single type, and do not limit the number of objects. For example, the first object may be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the connected objects.
[0057] The following combination Figures 1-9 The vehicle control method, system, electronic device and storage medium provided by the present invention are described.
[0058] Figure 1 This is one of the flow charts of the vehicle control method provided by the present invention, such as Figure 1 As shown, including but not limited to the following steps:
[0059] Step 101: Obtain the current position and steering type of the vehicle, and obtain a vehicle path curve; the vehicle path curve is obtained by fitting a plurality of preset vehicle passing points.
[0060] This solution is primarily used for automated control of agricultural vehicles, loading and unloading vehicles, and mining transport vehicles. During path tracking control for these types of vehicles, the vehicle's current position and steering type must first be determined, and a path curve suitable for vehicle navigation must be constructed. In this solution, steering types include Ackermann and articulated steering. This is necessary because in autonomous driving scenarios, the vehicle must identify its position in real time and precisely control itself according to a preset path. The quality of the path curve directly impacts the accuracy and control effectiveness of path tracking. If the path curve is discontinuous or inaccurate, especially in curved path scenarios, it can easily cause the vehicle to deviate from the preset path, resulting in reduced control performance and even safety issues. In this application, methods such as B-spline curves and Bezier curves can be used to fit multiple preset vehicle pass-through points. However, B-spline curves offer the best performance for vehicle control. Therefore, to construct a highly accurate, continuous path curve suitable for vehicle control, this application proposes fitting multiple preset vehicle pass-through points using B-spline curves.
[0061] In one possible implementation, refer to Figure 2 , Figure 2 This is the second flow chart of the vehicle control method provided by the present invention, as shown in FIG. Figure 2 As shown, the method for obtaining the vehicle path curve specifically includes step 201:
[0062] Step 201: A cubic B-spline curve is fitted for a plurality of preset vehicle passing points to obtain a vehicle path curve; wherein the B-spline curve adopts a non-uniform node setting, the node parameters are allocated by a centripetal parameterization method, and the head and tail nodes are set in a multiple overlap form, and the node parameters are determined by the cumulative value of the square root of the Euclidean distance between adjacent preset vehicle passing points.
[0063] In the vehicle path tracking control process, in order to obtain a high-precision, continuous and smooth vehicle path curve, it is necessary to perform cubic B-spline curve fitting on multiple preset vehicle passing points. The reason for this is that the core of vehicle path control lies in the accuracy and stability of path tracking, and the quality of the path curve directly affects the subsequent real-time curvature calculation, position deviation judgment and steering control. Existing methods often approximate the path as a short straight line segment. Although the calculation is simple, it will introduce large path errors under high curvature or complex paths, resulting in reduced control accuracy, obvious jitter and deviation during vehicle driving, and cannot meet the requirements of autonomous driving for a smooth path. Therefore, through cubic B-spline curve fitting, the above problems can be effectively solved, providing a continuous, smooth and high-precision path curve.
[0064] Specifically, when fitting the vehicle path curve, we first use multiple preset vehicle passing points as the basic input. These passing points represent the key points on the vehicle's planned path. In order to ensure the smoothness of the fitting curve and the continuity of the path, a cubic B-spline curve is used for fitting. The cubic B-spline curve can not only meet the path Continuity also has good smoothness and local adjustability, that is, when a certain control point is adjusted, it will only affect the curve shape of the local area without destroying the structure of the overall curve, thereby improving the stability of the path curve.
[0065] In terms of node parameter setting, a non-uniform node configuration is employed to accurately reflect the spatial distribution of each pass-through point, and node parameters are assigned using a centripetal parameterization method. This method uses the square root of the Euclidean distance between adjacent vehicle pass-through points as the node parameter. This method adjusts the node spacing based on the actual distance between the pass-through points, avoiding the curve fitting errors associated with a uniform distribution and ensuring that the path curve more closely matches the actual path. Specifically, the centripetal parameterization method improves fitting accuracy in densely populated areas while maintaining sufficient smoothness in sparsely populated areas, resulting in a more natural overall shape for the path curve.
[0066] Furthermore, to ensure that the path curve's tangent direction at the start and end points aligns with the actual path's tangent direction, a special configuration is used for the start and end nodes, using a multiple-node-to-node overlap (i.e., clamped configuration). In this configuration, the start and end nodes are each repeated three times (corresponding to a cubic B-spline curve), forcing the curve to coincide with the tangent direction of the pass-through point at both the start and end points. This configuration effectively avoids undesirable bends or sudden changes in curvature at the start and end points, ensuring continuity and a smooth transition along the path curve.
[0067] In more detail, a B-spline curve is a curve of degree p, with nodes and control points Described, where the degree is p, the number of nodes is m+1, the number of control points is n+1, and m=n+p+1.
[0068] The points on the B-spline curve are ;in is the basis function, is the control point, It can be derived from the following recursive formula:
[0069] when hour,
[0070] ;
[0071] when hour,
[0072] ;
[0073] Since the following discussion will focus on the cases of p=1, p=2, and p=3, when p=1,
[0074] ;
[0075] ;
[0076] When p=2,
[0077] ;
[0078] ;
[0079] ;
[0080] When p=3,
[0081] ;
[0082] ;
[0083] ;
[0084] ;
[0085] ,
[0086] .
[0087] According to the above formula, the following important properties can be obtained:
[0088] for ,when When, and When, only There are p+1 basis functions that are zero, so,
[0089] ;
[0090] In particular, when When, only There are p basis functions that are zero, so,
[0091] .
[0092] Furthermore, the derivative of the B-spline basis function is:
[0093] ;
[0094] ;
[0095] make , then we can get:
[0096] ;
[0097] For the clampedB spline form, , , when both cases are treated as 0, the final form of the derivative of the B-spline is:
[0098] ;
[0099] The derivative of the p-order "Clamped" B-spline is the p-1-order B-spline, and the number of control points of the derivative is 1 less than that of the B-spline, and the number of nodes is 2 less than that of the B-spline. The first and last nodes of the original node sequence are removed respectively, so the derivative curve is also a "Clamped" B-spline.
[0100] According to the definition of B-spline curve, it is assumed that multiple preset vehicle passing points are The node value selection scheme adopts the better performance of the centripetal parameter method, that is, the parameter u of the current value point is the cumulative value of the square root of the length of all previous value points. , and adopt the Clamped form, that is, the first and last nodes are repeated p+1 times, and the first and last points are the first and last points of the control point. The nodes are as follows:
[0101] ;
[0102] All that remains is to find the control points ;
[0103] First, establish the fitting equation. The B-spline curve has an important property, that is, each node The corresponding points on the curve are mapped Satisfy at the same time ,Right now:
[0104] ;
[0105] ;
[0106] ;
[0107]
[0108] ;
[0109]
[0110] ;
[0111] ;
[0112] ;
[0113] It can be seen that ;
[0114] Written in matrix form as follows,
[0115] ;
[0116] The first and last rows of the coefficient matrix above are expressed as The reason is that the spline curve adopts the clamped form, so its first and last points are the first and last control points.
[0117] When p=3, the above equation is The unknown number is Two more equations are needed to fully solve the problem, and the derivatives of the first and last points can provide two more equations.
[0118] 3 known points , estimated .
[0119] Depend on A quadratic curve passing through three points can be fitted, and the equation is as follows:
[0120] ;
[0121] The derivative vector with respect to parameter t is:
[0122] ;
[0123] when hour,
[0124] ;
[0125] make and ;
[0126] ;
[0127] when hour,
[0128] ;
[0129] when hour,
[0130]
[0131] Referring to the centripetal parameter method, the parameter t can be determined as follows:
[0132] ;
[0133] According to the derivation principle of B-spline curve, we can get:
[0134] ;
[0135] ;
[0136] Right now
[0137] ;
[0138] Then the fitting equation is:
[0139] ;
[0140] By solving the above equations, we can get the control points of the curve and then get the vehicle path curve.
[0141] Step 102: Determine the reference point on the vehicle path curve that is closest to the current position based on the current position and all sub-path segments; the sub-path segments are obtained by segmenting the vehicle path curve based on all preset vehicle passing points.
[0142] In vehicle path tracking control, to achieve high-precision tracking of the target path, the vehicle's current position must first be determined to correspond to the corresponding point on the path curve—that is, the reference point closest to the current position. This step is crucial because the vehicle's real-time deviation calculations and subsequent control decisions rely on the accurate positioning of the reference point. If the closest reference point cannot be quickly and accurately determined, path tracking accuracy will be significantly reduced, causing the vehicle to deviate from the target path. This can especially lead to significant lateral offsets or control delays on complex curved paths. Therefore, by segmenting the path curve and performing the closest point search based on a local coordinate system, computational efficiency can be effectively improved while ensuring accurate results.
[0143] In one possible implementation, refer to Figure 3 , Figure 3 This is the third flow chart of the vehicle control method provided by the present invention, as shown in FIG. Figure 3 As shown, step 102 specifically includes steps 301-304:
[0144] Step 301: Establish a corresponding first local coordinate system for each sub-path segment, the origin of the first local coordinate system is set at the starting point of the corresponding sub-path segment, and the x-axis direction of the first local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment.
[0145] Specifically, the vehicle path curve is first segmented to form multiple sub-path segments, each of which corresponds to two adjacent preset vehicle passing points, namely This segmentation process not only ensures that the local characteristics of the path curve are relatively simple, which is convenient for coordinate transformation and deviation calculation, but also provides a natural starting point and direction information for the establishment of the local coordinate system.
[0146] For each sub-path segment, a first local coordinate system is established based on its starting point. The origin of the local coordinate system is set at the starting point of the corresponding sub-path segment. The starting point is the starting point of the sub-path segment, that is, the first preset vehicle passing point of the sub-path segment. The x-axis direction of the local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment. Specifically, by calculating the vector direction between the starting point of the sub-path segment and the starting point of the next sub-path segment, the inclination angle of the tangent direction can be obtained. , and then determine the x-axis direction of the local coordinate system. On this basis, using the definition of the local coordinate system, the vehicle position in the world coordinate system can be converted to the current local coordinate system, simplifying the subsequent deviation calculation and matching process.
[0147] Step 302: convert the current position into each first local coordinate system, and calculate the lateral offset of the converted current position in each local coordinate system.
[0148] During vehicle path tracking control, to accurately determine the relationship between the vehicle's current position and the path curve, particularly within a local path, it is necessary to transform the vehicle's current position into each first local coordinate system and calculate the lateral offset in each local coordinate system. This coordinate transformation is necessary because directly calculating the deviation between the vehicle and the path in the world coordinate system is computationally complex and difficult to optimize. This is especially true for segmented subpaths, where switching coordinate systems and uniformly calculating offsets are crucial. By mapping the vehicle's current position to the local coordinate system corresponding to the subpath, the calculation logic for position deviations can be simplified, improving real-time performance and accuracy.
[0149] Specifically, first, according to the first local coordinate system established in step 301, the origin of the coordinate system is located at the starting point of the sub-path segment. , the x-axis direction is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment, and the tangent inclination angle is The current position of the vehicle is expressed in the world coordinate system as , in order to express the position of the vehicle in the local coordinate system, the coordinate mapping is completed by the following coordinate transformation formula:
[0150] ;
[0151] in, Represents the projection of the vehicle along the x-axis in the local coordinate system, that is, the longitudinal position; Represents the projection of the vehicle along the y-axis in the local coordinate system, that is, the lateral position offset.
[0152] After the coordinate transformation is completed, focus on the lateral offset of the vehicle in the local coordinate system Because the lateral offset reflects the lateral deviation between the vehicle's current position and the subpath's tangent direction, by performing the same coordinate transformation on the local coordinate systems of multiple subpath segments, the vehicle's lateral offset in all local coordinate systems can be obtained. The key to this step is to eliminate the problem of accumulated deviation caused by path curvature in the world coordinate system by unifying the definition of the local coordinate system and tangent direction, thereby simplifying the offset calculation logic and improving the accuracy of offset comparison.
[0153] Step 303: Select the sub-path segment with the minimum lateral offset from all lateral offsets.
[0154] Because global search is computationally intensive and has poor real-time performance on curved paths or in complex environments, comparing the lateral offsets of each sub-path segment and selecting the sub-path segment with the smallest lateral offset can effectively narrow the search range, improve computational efficiency, and improve path matching accuracy.
[0155] Specifically, the vehicle's current position has been mapped to the first local coordinate system of each sub-path segment through coordinate transformation in step 302, and the corresponding lateral offset has been calculated in each local coordinate system. Since the smaller the lateral offset value, the closer the vehicle is to the corresponding sub-path segment, by comparing the lateral offset values of all sub-path segments, the sub-path segment to which the vehicle is closest can be quickly determined.
[0156] Step 304: Determine the reference point closest to the current position from the selected sub-path segment.
[0157] Specifically, within a selected sub-path segment, the corresponding node interval is defined by the starting and ending pass-through points. Within this sub-path segment, the path parameter u is subdivided, discretizing the continuous path curve into several tiny path points. The coordinates of each path point can be obtained by solving the B-spline curve equation.
[0158] Then, the coordinates of the vehicle's current position are Calculate the Euclidean distance between the coordinates of each discrete path point on the sub-path segment. By traversing the Euclidean distance of all discrete path points, the path point with the smallest distance is selected as the closest reference point of the vehicle's current position on the path curve. The corresponding path parameters It is also determined at the same time as the input parameter for subsequent path feature calculation.
[0159] Step 103: Calculate the real-time curvature at the reference point, and calculate the position deviation and angle deviation between the current position and the reference point.
[0160] During vehicle path tracking control, to achieve high-precision path control of the vehicle's current position, it is necessary to calculate the real-time curvature of the path curve at the nearest reference point and further determine the positional and angular deviations between the vehicle's current position and the reference point. This step is necessary because the real-time curvature accurately reflects the local geometric characteristics of the path, while the positional and angular deviations describe the degree of deviation between the vehicle and the path. These key parameters are important inputs for the subsequent generation of control variables in the vehicle control model. Failure to accurately calculate these parameters will result in the control system being unable to adjust the vehicle's steering in a timely manner, especially on curved paths or in complex dynamic environments, resulting in reduced path tracking accuracy and poor system stability.
[0161] In one possible implementation, refer to Figure 4 , Figure 4 This is a fourth flow chart of the vehicle control method provided by the present invention, such as Figure 4 As shown, the method for calculating the real-time curvature at a reference point specifically includes steps 401-402:
[0162] Step 401: Extract the first-order derivative and the second-order derivative of the vehicle path curve at the reference point.
[0163] During vehicle path tracking control, to accurately calculate the real-time curvature of the path curve at the nearest reference point, the first and second derivatives of the path curve at that point must first be extracted. This is necessary because the calculation of real-time curvature depends on the geometric characteristics of the path at that point, and the first and second derivatives reflect the path tangent direction and the degree of curvature of the curve, respectively. Only by accurately extracting these derivatives can the accuracy of curvature calculation be guaranteed, providing high-precision data support for subsequent vehicle steering control.
[0164] Specifically, the path curve is obtained by fitting the cubic B-spline curve, and its mathematical expression is:
[0165] ;
[0166] in, Represents the coordinates of the point at parameter u on the path curve, is the cubic B-spline basis function, is the control point, and n is the number of control points. In order to extract the first-order and second-order derivatives, the above cubic B-spline curve needs to be differentiated.
[0167] According to the derivative properties of the B-spline curve, the first-order derivative of the path curve is It can be expressed as:
[0168] ;
[0169] in, is the derivative of the cubic B-spline basis function. Further, by taking the derivative of the first-order derivative again, we can get the second-order derivative of the path curve :
[0170] ;
[0171] in, is the second-order derivative of the cubic B-spline basis function. The solution of these two derivatives will reduce the degree of the B-spline curve and change the sequence of knots of the basis function. However, the reconstruction of the control points can ensure the continuity and accuracy of the derivative curve with the original curve.
[0172] In actual calculation, firstly, according to the path parameters corresponding to the nearest reference point determined in step 304, , substitute it into the first-order derivative expression And the second-order derivative expression , the first-order derivative of the path curve at this point can be solved and the second-order derivative . First-order derivative Represents the components of the path tangent direction vector, including the x-direction derivative and the y-direction derivative ; Second-order derivative Represents the trend of curvature change, including the second-order derivative in the x direction and the second derivative in the y direction .
[0173] Extracting first- and second-order derivatives is beneficial in several ways: First-order derivatives provide information about the path's tangent direction, providing the foundational data for establishing a local coordinate system and calculating tangent inclination and vehicle deviation. Second-order derivatives provide the curvature trend of the path, serving as the core input for curvature calculations and accurately describing the path's curvature at that point. The extraction of this derivative information relies on the mathematical properties of B-spline curves, ensuring continuity and smoothness in the calculation results and avoiding the oscillations that occur when calculating higher-order derivatives with traditional polynomial curves.
[0174] Step 402: Calculate the real-time curvature at the reference point according to the first-order derivative and the second-order derivative and the definition formula of curvature.
[0175] Specifically, substituting the first and second derivatives into the definition of curvature , calculate the real-time curvature at the reference point. The specific calculation formula is as follows:
[0176] ;
[0177] in: and Represents the tangent direction vector component of the path at the reference point; and Indicates the second-order derivative of the path at the reference point, reflecting the curvature trend of the path. The absolute value of the real-time curvature The larger the value, the higher the curvature of the path at that point. , the path is a straight line at that point.
[0178] By calculating the real-time curvature, the local geometric characteristics of the path curve at the nearest reference point can be effectively reflected. This calculation is effective in two ways: first, as a feedforward input in the vehicle control model, the real-time curvature can provide the control system with advance steering adjustment information when the path curvature changes significantly, reducing the path tracking error caused by sudden changes in curvature; second, the accuracy of the real-time curvature relies on the high-order derivative characteristics of the B-spline curve, avoiding numerical oscillations or discontinuities during the path curvature calculation process, thereby improving the stability and robustness of the system.
[0179] In one possible implementation, refer to Figure 5 , Figure 5 This is a fifth flow chart of the vehicle control method provided by the present invention, such as Figure 5 As shown, the method for calculating the position deviation and angle deviation between the current position and the reference point specifically includes steps 501-505:
[0180] Step 501: Establish a second local coordinate system at a reference point with the reference point as the origin and the tangent direction along the reference point as the x-axis.
[0181] In the process of vehicle path tracking control, in order to accurately describe the positional relationship between the current position of the vehicle and the nearest reference point, a new second local coordinate system needs to be established at the reference point. The reason for doing this is that the local coordinate system can transform complex world coordinate system problems into local coordinate calculations, simplifying the calculation logic of the deviation between the vehicle and the path, especially for the curvature and local geometric characteristics of the path. The construction of the local coordinate system can more intuitively express the position deviation and angular deviation between the vehicle and the path. By establishing a second local coordinate system, subsequent coordinate transformations and deviation calculations can be performed more efficiently, and accurate input data can be provided for the control model. The second local coordinate system is based on the nearest reference point. The origin is the x-axis, which is along the tangent direction of the path curve at the reference point, and the y-axis is perpendicular to the x-axis, following the right-hand coordinate system rule.
[0182] Step 502: Calculate the tangent inclination angle of the reference point in the world coordinate system.
[0183] Specifically, the inclination angle in the tangential direction It can be calculated by the first-order derivative of the path curve at the reference point:
[0184] ;
[0185] in, and They represent the first-order derivatives of the path curve in the x-direction and the y-direction at the nearest reference point, respectively.
[0186] Step 503: Convert the current position to the second local coordinate system according to the tangent inclination angle to obtain the converted horizontal coordinate and the converted vertical coordinate of the vehicle in the second local coordinate system.
[0187] Specifically, the core of constructing the second local coordinate system is to transform the vehicle's current position in the world coordinate system into the second local coordinate system with the reference point as the origin. The essence of this transformation is to transform the vehicle's current position Relative to a reference point Perform coordinate rotation and translation. The specific conversion formula is:
[0188] ;
[0189] in, is the transformed abscissa of the vehicle in the second local coordinate system, is the transformed ordinate of the vehicle in the second local coordinate system.
[0190] Through this transformation, the longitudinal coordinate of the vehicle in the local coordinate system is and horizontal coordinates The deviation relationship between the vehicle and the path can be represented more intuitively.
[0191] Step 504: Obtain the current heading angle of the vehicle in the world coordinate system.
[0192] Specifically, the vehicle's current heading angle This is typically measured in real time using a vehicle-mounted heading sensor or gyroscope. For Ackerman steering vehicles, the heading angle can be calculated directly from the front wheel angle and the vehicle's orientation. For articulated steering vehicles, the heading angle can be estimated using the joint angles of the front and rear bodies and the vehicle's attitude. In practical applications, this data is typically output in real time by the vehicle's attitude sensor or onboard controller to ensure accurate and timely heading angle measurement.
[0193] Step 505: The converted ordinate is used as the position deviation, and the angle difference between the current heading angle and the tangent inclination angle is used as the angle deviation.
[0194] Specifically, the calculation of the vehicle's position deviation and angle deviation is based on the results in the previous steps: directly convert As the position deviation of the vehicle :
[0195] ;
[0196] Among them, the position deviation It reflects the lateral distance error between the vehicle and the path, and its sign can indicate the direction in which the vehicle deviates from the path.
[0197] In addition, the calculation formula for the angular deviation is:
[0198]
[0199] Among them, the angle deviation This reflects the angle between the vehicle's actual heading and the tangent direction of the path, and can directly describe the vehicle's deviation from the correct direction. If the angle deviation is large, the vehicle needs to quickly adjust its heading to return to the correct driving trajectory.
[0200] Through the above calculation process, the position deviation and angular deviation Together, they describe the vehicle's deviation from the path. Position deviation provides lateral position information, while angular deviation provides heading offset information. These two complement each other to comprehensively reflect the vehicle's real-time path tracking error. These deviation parameters serve as key inputs to subsequent vehicle control models, ensuring that the control system generates appropriate control variables based on the actual deviation, effectively adjusting the vehicle's direction and attitude to eliminate position and angular errors.
[0201] Step 104: Substitute the real-time curvature, position deviation, and angle deviation into a preset control model corresponding to the steering type to obtain a control variable for controlling the vehicle steering.
[0202] During the vehicle path tracking control process, to ensure the vehicle can accurately follow the path curve, it is necessary to substitute the real-time curvature, position deviation, and angle deviation calculated above into the preset control model corresponding to the vehicle's steering type to obtain the control variable used to control the vehicle's steering. This is necessary because different types of vehicles (such as Ackerman steering vehicles and articulated steering vehicles) have different kinematic characteristics, and the control variable must be solved for their specific steering models to achieve effective compensation for path tracking deviations and real-time adjustment of the vehicle's posture. Without this step, the control system will not be able to generate appropriate steering commands based on the vehicle's current path tracking state, resulting in increased path deviation or unstable tracking.
[0203] In one possible implementation, refer to Figure 6 , Figure 6This is the sixth flow chart of the vehicle control method provided by the present invention, as shown in FIG. Figure 6 As shown, when the steering type is the Ackerman steering type, step 104 includes steps 601-602:
[0204] Step 601: Obtain the current speed and front and rear wheelbase of the vehicle.
[0205] Specifically, the current speed This information is typically acquired in real time via the vehicle's onboard speed sensor. The speed sensor accurately measures the vehicle's longitudinal velocity, ensuring real-time and accurate speed information. During path tracking, vehicle speed is a core input to the dynamic terms in the control model, influencing the rate of change of vehicle deviation and the system's control response. Inaccurate or delayed vehicle speed acquisition directly impacts control system performance, preventing the vehicle from smoothly tracking the path.
[0206] Furthermore, the front-to-rear wheelbase (L) of an Ackerman steering vehicle is an intrinsic parameter of the vehicle, typically determined during the vehicle design phase and stored in the vehicle's control system. This wheelbase is a crucial geometric parameter that determines the vehicle's steering performance, influencing the required front wheel steering angle during path tracking. Specifically, a larger wheelbase increases the vehicle's turning radius and reduces steering sensitivity. Conversely, a smaller wheelbase allows for more agile steering but also reduces stability. Therefore, accurately determining the vehicle's wheelbase parameter ensures that the control model accurately describes the vehicle's kinematic characteristics.
[0207] Step 602: Substitute the current speed, front and rear wheelbase, real-time curvature, position deviation, and angle deviation into a first kinematic model of the vehicle based on the Ackermann steering type, and solve the first kinematic model according to a preset method to obtain first control parameters.
[0208] Specifically, the lateral control of the Ackermann steering type vehicle is based on a standard kinematic model that takes the vehicle's real-time state parameters as input and describes the vehicle's position deviation. , angle deviation , real-time curvature , current speed , front and rear wheelbase L and the first control parameter (i.e., the front wheel angle). The kinematic model is as follows:
[0209] ;
[0210] In actual calculation, the system will dynamically update the position deviation by combining the current position and heading angle measured by the sensor with the tangent direction and curvature of the path. , angle deviation and real-time curvature . Combine these parameters with the current speed Substitute the front and rear wheelbase L into the above kinematic model to find the optimal first control parameter (i.e., front wheel steering angle) , and solve it using a preset method. In this solution, the preset method is either a linear quadratic regulator (LQR) or a model predictive control (MPC).
[0211] In the LQR control method, the goal is to generate the optimal first control parameter (i.e., the front wheel steering angle) by minimizing the vehicle's state error and control energy consumption. The specific steps include:
[0212] Linearize the kinematic model to obtain a linear model of the vehicle deviation state;
[0213] Design cost function, which usually includes weighting of position deviation, angle deviation and control amount;
[0214] The optimal control law is solved to obtain the first control parameter (i.e., the front wheel steering angle) used to adjust the direction of the vehicle in real time.
[0215] In the MPC control method, the system predicts the future trajectory based on the vehicle's current state and generates the first control parameter (i.e., the front wheel angle) through a rolling optimization method. The MPC method fully considers system constraints (such as the maximum front wheel angle and speed limit), making it more adaptable to path tracking and particularly suitable for highly dynamic scenarios.
[0216] By substituting real-time curvature, position deviation, angular deviation, the vehicle's current speed, and front-to-rear wheelbase into the kinematic model of an Ackerman steering vehicle and solving it using LQR or MPC methods, the system can generate the optimal first control parameter (i.e., the front wheel steering angle). This process is effective in two ways: first, the path curvature acts as a feedforward factor, enabling the control system to adjust the vehicle's steering in advance, reducing path tracking delays; second, combined with feedback control of position deviation and angular deviation, the system can effectively eliminate lateral and heading errors, achieving high-precision path tracking for the vehicle.
[0217] In one possible implementation, refer to Figure 7 , Figure 7 This is the seventh flow chart of the vehicle control method provided by the present invention, as shown in FIG. Figure 7 As shown, when the steering type is the articulated steering type, step 104 includes steps 701-702:
[0218] Step 701: Obtain the current speed, front wheelbase, and rear wheelbase of the vehicle.
[0219] Specifically, the current speed of the articulated steering vehicle Real-time measurement is typically performed by onboard speed sensors. These sensors provide real-time information on the vehicle's longitudinal motion, ensuring the accuracy and timeliness of input data. In articulated steering vehicles, current speed is a key input for dynamically adjusting control variables, influencing the rate of change of vehicle deviation and the system's response speed.
[0220] In addition, the front wheelbase of the articulated steering vehicle and rear wheelbase These are inherent geometric parameters of the vehicle, usually determined during the vehicle design phase and stored in the database of the vehicle control system. These two parameters determine the kinematic geometric relationship between the front and rear bodies of the vehicle. In particular, when the vehicle performs a steering operation, the angle of the hinge point will cause the rear of the vehicle to deviate from the path tracking target. The different lengths of the front and rear wheelbases have a direct impact on the ability to compensate for this deviation. Therefore, accurately obtaining the front wheelbase is necessary. and rear wheelbase It can ensure that the control model accurately describes the motion characteristics of the articulated steering vehicle, thereby providing real and effective data support for the calculation of control quantities.
[0221] Step 702: Substitute the current speed, front wheelbase, rear wheelbase, real-time curvature, position deviation, and angle deviation into a second kinematic model of the vehicle based on the articulated steering type, and solve the second kinematic model according to a preset method to obtain second control parameters.
[0222] Specifically, the lateral control of an articulated steering vehicle is based on a standard kinematic model that takes the vehicle's real-time state parameters as input and describes the vehicle's position deviation. , angle deviation , real-time curvature , current speed , front wheelbase , rear wheelbase and the second control parameter (i.e., the articulation angle). The kinematic model is as follows:
[0223] ;
[0224] In actual calculation, the system will dynamically update the position deviation by combining the current position and heading angle measured by the sensor with the tangent direction and curvature of the path. , angle deviation and real-time curvature . Combine these parameters with the current speed , front wheelbase , rear wheelbase Substitute into the above kinematic model to solve the optimal second control parameter (i.e., articulation angle) , using a preset method to solve. In this solution, the preset method is either a linear quadratic regulator (LQR) or a model predictive control (MPC).
[0225] In the LQR control method, the system minimizes the vehicle's state deviation and control energy consumption by designing a cost function. The cost function usually includes position deviation , angle deviation On this basis, the system linearizes the kinematic model of the articulated steering vehicle, solves the optimal control law, and obtains the second control parameter (i.e., the articulation angle) to minimize vehicle deviation and ensure path tracking stability.
[0226] In the MPC control method, the system uses the vehicle's current state information to predict the future motion trajectory and then optimizes the second control parameter (i.e., the articulation angle) in a rolling manner. The advantage of the MPC method is that it can simultaneously consider vehicle constraints during path tracking, such as the maximum articulation angle and speed limit, thereby ensuring that the system's control variables are consistent with the actual vehicle motion characteristics. This is particularly applicable to complex operating conditions with large path curvature or frequent dynamic changes.
[0227] Using this method, the system generates an optimal second control parameter (i.e., the articulation angle) for articulated steering vehicles. This parameter is used to adjust the steering angle between the front and rear vehicle bodies in real time, ensuring smooth vehicle tracking along the target path. This process is beneficial in two ways: first, by using the real-time curvature of the path as a feedforward variable, the system can proactively respond to changes in path curvature, improving path tracking response speed. Second, by combining feedback control of position and angle deviations, the system effectively eliminates deviations during dynamic driving, improving path tracking accuracy and stability.
[0228] Reference Figure 8 , Figure 8 This is a schematic diagram of the structure of the vehicle control system provided by the present invention, the system includes:
[0229] The acquisition module is used to obtain the current position and steering type of the vehicle and obtain the vehicle path curve; the vehicle path curve is obtained by fitting multiple preset vehicle passing points;
[0230] A first processing module is configured to determine a reference point on a vehicle path curve that is closest to the current position based on the current position and all sub-path segments; the sub-path segments are obtained by segmenting the vehicle path curve based on all preset vehicle pass-through points;
[0231] A second processing module is used to calculate the real-time curvature at the reference point, and calculate the position deviation and angle deviation between the current position and the reference point;
[0232] The third processing module is used to substitute the real-time curvature, position deviation and angle deviation into the control model corresponding to the steering type, and solve the control model to obtain the control amount used to control the vehicle steering.
[0233] In a possible implementation, the first processing module is further configured to:
[0234] Establish a corresponding first local coordinate system for each sub-path segment. The origin of the first local coordinate system is set at the starting point of the corresponding sub-path segment, and the x-axis direction of the first local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment.
[0235] Convert the current position to each first local coordinate system, and calculate the lateral offset of the converted current position in each local coordinate system;
[0236] Selecting a subpath segment with a minimum lateral offset from all lateral offsets;
[0237] Determine the reference point closest to the current position from the selected sub-path segment.
[0238] In a possible implementation, the second processing module is further configured to:
[0239] Extracting the first-order derivative and the second-order derivative of the vehicle path curve at the reference point;
[0240] According to the first-order derivative and the second-order derivative, the real-time curvature at the reference point is calculated according to the definition formula of curvature.
[0241] In a possible implementation, the second processing module is further configured to:
[0242] Establishing a second local coordinate system at the reference point with the reference point as the origin and the tangent direction along the reference point as the x-axis;
[0243] Calculate the tangent inclination of the reference point in the world coordinate system;
[0244] Convert the current position to the second local coordinate system according to the tangent inclination angle to obtain the converted abscissa and ordinate of the vehicle in the second local coordinate system;
[0245] Get the current heading angle of the vehicle in the world coordinate system;
[0246] The converted ordinate is taken as the position deviation, and the angular difference between the current heading angle and the tangent inclination angle is taken as the angle deviation.
[0247] In one possible embodiment, the first processing module is further used to perform cubic B-spline curve fitting on multiple preset vehicle passing points to obtain a vehicle path curve; wherein the B-spline curve adopts a non-uniform node setting, the node parameters are allocated by a centripetal parameterization method, and the head and tail nodes are set in a multiple overlap form of the head and tail nodes, and the node parameters are determined by the cumulative value of the square root of the Euclidean distance between adjacent preset vehicle passing points.
[0248] In a possible implementation, the acquisition module is further configured to acquire the current speed and front-to-rear wheelbase of the vehicle;
[0249] The third processing module is also used to substitute the current speed, front and rear wheelbase, real-time curvature, position deviation and angle deviation into the first kinematic model of the vehicle based on the Ackerman steering type, and solve the first kinematic model according to a preset method to obtain the first control parameters.
[0250] In a possible implementation, the acquisition module is further configured to acquire the current speed, front wheelbase, and rear wheelbase of the vehicle;
[0251] The third processing module is also used to substitute the current speed, front wheelbase, rear wheelbase, real-time curvature, position deviation and angle deviation into the second kinematic model of the vehicle based on the articulated steering type, and solve the second kinematic model according to a preset method to obtain the second control parameters.
[0252] It should be noted that the vehicle control system provided by the present invention can execute the vehicle control method of any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0253] Figure 9 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 9As shown, the electronic device may include: a processor 910, a communications interface 920, a memory 930, and a communications bus 940, wherein the processor 910, the communications interface 920, and the memory 930 communicate with each other via the communications bus 940. The processor 910 may call logic instructions in the memory 930 to execute a vehicle control method, which includes: obtaining a current position and steering type of the vehicle, and obtaining a vehicle path curve; the vehicle path curve is obtained by fitting a plurality of preset vehicle passing points; determining a reference point on the vehicle path curve that is closest to the current position based on the current position and all sub-path segments; the sub-path segments are obtained by segmenting the vehicle path curve based on all preset vehicle passing points; calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point; and substituting the real-time curvature, position deviation, and angular deviation into a preset control model corresponding to the steering type to obtain a control variable for controlling the vehicle steering.
[0254] Furthermore, the logic instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0255] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the vehicle control method provided by the above-mentioned embodiments, which method includes: obtaining the current position and steering type of the vehicle, and obtaining a vehicle path curve; the vehicle path curve is obtained by fitting multiple preset vehicle passing points; based on the current position and all sub-path segments, determining the reference point closest to the current position on the vehicle path curve; the sub-path segment is obtained by segmenting the vehicle path curve based on all preset vehicle passing points; calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point; substituting the real-time curvature, position deviation and angular deviation into the preset control model corresponding to the steering type to obtain the control amount used to control the vehicle steering.
[0256] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by the processor 910, is implemented to execute the vehicle control method provided in the above-mentioned embodiments, the method comprising: obtaining the current position and steering type of the vehicle, and obtaining a vehicle path curve; the vehicle path curve is obtained by fitting a plurality of preset vehicle passing points; based on the current position and all sub-path segments, determining a reference point on the vehicle path curve that is closest to the current position; the sub-path segments are obtained by segmenting the vehicle path curve based on all preset vehicle passing points; calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point; substituting the real-time curvature, position deviation and angular deviation into a preset control model corresponding to the steering type to obtain a control quantity for controlling the vehicle steering.
[0257] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0258] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.
[0259] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A vehicle control method, characterized in that: include: Get the current position and steering type of the vehicle, and obtain the vehicle path curve; The vehicle path curve is obtained by fitting a plurality of preset vehicle passing points; a cubic B-spline curve is fitted to the plurality of preset vehicle passing points to obtain the vehicle path curve; wherein the B-spline curve adopts a non-uniform node setting, the node parameters are allocated by a centripetal parameterization method, and the head and tail nodes are set in a multiple overlap form, and the node parameters are determined by the cumulative value of the square root of the Euclidean distance between adjacent preset vehicle passing points; Determining, based on the current position and all sub-path segments, a reference point on the vehicle path curve that is closest to the current position; the sub-path segments are obtained by segmenting the vehicle path curve based on all the preset vehicle passing points; determining, based on the current position and all sub-path segments, a reference point on the vehicle path curve that is closest to the current position, specifically includes: Establishing a corresponding first local coordinate system for each sub-path segment, where the origin of the first local coordinate system is set at the starting point of the corresponding sub-path segment, and the x-axis direction of the first local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment; Convert the current position into each of the first local coordinate systems, and calculate the lateral offset of the converted current position in each of the local coordinate systems; selecting the sub-path segment having the smallest lateral offset from all of the lateral offsets; Determine a reference point closest to the current position from the selected sub-path segments; Calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point; calculating the position deviation and angular deviation between the current position and the reference point specifically includes: Establishing a second local coordinate system at the reference point with the reference point as the origin and a tangent direction along the reference point as the x-axis; Calculating the tangent inclination angle of the reference point in the world coordinate system; Converting the current position to the second local coordinate system according to the tangent inclination angle to obtain a converted abscissa and a converted ordinate of the vehicle in the second local coordinate system; Get the current heading angle of the vehicle in the world coordinate system; Using the converted ordinate as the position deviation, and using the angular difference between the current heading angle and the tangent inclination angle as the angular deviation; The real-time curvature, the position deviation, and the angle deviation are substituted into a control model corresponding to the steering type, and the control model is solved to obtain a control variable for controlling the steering of the vehicle.
2. The vehicle control method according to claim 1, characterized in that: The calculating the real-time curvature at the reference point specifically includes: extracting a first-order derivative and a second-order derivative of the vehicle path curve at the reference point; The real-time curvature at the reference point is calculated according to the first-order derivative and the second-order derivative and the definition formula of curvature.
3. The vehicle control method according to claim 1, characterized in that: The steering type includes an Ackerman steering type, and the control amount includes a first control parameter; substituting the real-time curvature, the position deviation, and the angle deviation into a preset control model corresponding to the steering type to obtain a control amount for controlling the vehicle steering specifically includes: Get the vehicle's current speed and front and rear wheelbase; The current speed, the front and rear wheelbase, the real-time curvature, the position deviation, and the angle deviation are substituted into a first kinematic model of a vehicle based on an Ackerman steering type, and the first kinematic model is solved according to a preset method to obtain the first control parameter.
4. The vehicle control method according to claim 1, wherein: The steering type includes an articulated steering type, the control amount includes a second control parameter; and the real-time curvature, the position deviation, and the angle deviation are substituted into a preset control model corresponding to the steering type to obtain a control amount for controlling the vehicle steering, specifically including: Get the vehicle's current speed, front wheelbase, and rear wheelbase; The current speed, the front wheelbase, the rear wheelbase, the real-time curvature, the position deviation and the angle deviation are substituted into a second kinematic model of a vehicle based on an articulated steering type, and the second kinematic model is solved according to a preset method to obtain the second control parameters.
5. The vehicle control method according to claim 3 or 4, characterized in that: The preset method is any one of a linear quadratic regulation control method and a model predictive control method.
6. A vehicle control system, characterized in that: include: The acquisition module is used to obtain the current position and steering type of the vehicle and obtain the vehicle path curve; The vehicle path curve is obtained by fitting a plurality of preset vehicle passing points; a first processing module, configured to perform cubic B-spline curve fitting on the plurality of preset vehicle pass-through points to obtain the vehicle path curve; wherein the B-spline curve adopts a non-uniform node setting, node parameters are allocated by a centripetal parameterization method, and the head and tail nodes are set in a multiple overlap form, and the node parameters are determined by the cumulative value of the square root of the Euclidean distance between adjacent preset vehicle pass-through points; a first processing module, configured to determine, based on the current position and all sub-path segments, a reference point on the vehicle path curve that is closest to the current position; the sub-path segments being obtained by segmenting the vehicle path curve according to all the preset vehicle passing points; and determining, based on the current position and all the sub-path segments, a reference point on the vehicle path curve that is closest to the current position, specifically comprising: establishing a corresponding first local coordinate system for each sub-path segment, wherein the origin of the first local coordinate system is set at the starting passing point of the corresponding sub-path segment, and the x-axis direction of the first local coordinate system is from the starting point of the previous sub-path segment to the starting point of the next sub-path segment; converting the current position to each of the first local coordinate systems, and calculating a lateral offset of the converted current position in each of the local coordinate systems; selecting a sub-path segment having a minimum lateral offset from all the lateral offsets; and determining, from the selected sub-path segments, a reference point that is closest to the current position. a second processing module for calculating the real-time curvature at the reference point, and calculating the position deviation and angular deviation between the current position and the reference point; the calculating the position deviation and angular deviation between the current position and the reference point specifically comprising: establishing a second local coordinate system at the reference point with the reference point as the origin and a tangent direction along the reference point as the x-axis; calculating the tangent inclination of the reference point in the world coordinate system; converting the current position to the second local coordinate system according to the tangent inclination to obtain a converted horizontal coordinate and a converted vertical coordinate of the vehicle in the second local coordinate system; obtaining a current heading angle of the vehicle in the world coordinate system; using the converted vertical coordinate as the position deviation, and using the angular difference between the current heading angle and the tangent inclination as the angular deviation; The third processing module is used to substitute the real-time curvature, the position deviation and the angle deviation into a control model corresponding to the steering type, and solve the control model to obtain a control variable for controlling the steering of the vehicle.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the vehicle control method according to any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the vehicle control method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle control method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Four-wheeled independently-driven electric automobile stability control method and system
CN104443022A
Intelligent driving system with autonomous lane changing function and capable of improving lateral safety
CN110356404A