An automatic warehousing parking reference trajectory optimization method
Patent Information
- Application Number
- CN202311725754.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-12-14
AI Technical Summary
目前仍然缺少行之有效的参考轨迹规划方法
[0018] This invention addresses the challenge of finding an ideal reference trajectory that is collision-free, smooth, and sufficiently short in the optimization of reference trajectories for automated parking systems. It proposes a gene-correction-based "moth-to-a-flame" optimization algorithm for automated parking systems. Based on the standard automated parking planar coordinate system, a cubic spline fitting method is incorporated to construct a reasonable and high-quality automated parking reference trajectory optimization model. To effectively improve the optimization performance of the automated parking reference trajectory, a nonlinear decreasing weight coefficient "moth-to-a-flame" algorithm integrating gene correction and directed mutation mechanisms is proposed, exhibiting excellent global optimization quality.
Smart Images

Figure CN117565859B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent parking technology, and more specifically to a method for optimizing the reference trajectory of automatic parking. Background Technology
[0002] Automated parking is the act of parking a car that meets the parking requirements from the starting area to the permitted parking space using an automatic parking method. Automated parking generally uses automatic reversing into the parking space. To complete automated reversing into a parking space, a reference trajectory for the vehicle must first be planned, and then the vehicle is controlled to follow the reference trajectory to park autonomously. Currently, there is still a lack of effective methods for planning reference trajectories. Summary of the Invention
[0003] This invention provides a method for optimizing the reference trajectory of an automated parking system. Based on the standard automated parking planar coordinate system, a cubic spline fitting method is used to construct an optimization model for the reference trajectory of the automated parking system. Furthermore, a nonlinear decreasing weight coefficient algorithm incorporating gene correction and directional mutation mechanisms is proposed to solve the model, thereby quickly obtaining a collision-free, smooth reference trajectory with a sufficiently short trajectory length.
[0004] The technical means employed in this invention are as follows:
[0005] An optimization method for automatic parking reference trajectory includes the following steps:
[0006] The current vehicle location, garage location, and standard parking location are obtained. Based on the preset number of reference trajectory feature points, a reference trajectory optimization model is constructed using a cubic spline fitting method. The current vehicle location is represented by the coordinates of the center point of the current vehicle coverage area, the garage location is represented by the coordinates of the four vertices of the garage, and the reference trajectory feature points are the center points of the vehicle coverage area at each sampling time.
[0007] Genetic corrections are applied to the three scenarios—far side line of the collision avoidance parking space, parking tilt, and misalignment—that arise during the optimization process of the reference trajectory optimization model.
[0008] An improved moth-to-flame optimization algorithm is used to solve the genetically modified reference trajectory optimization model, thereby obtaining the optimal reference trajectory.
[0009] Furthermore, before constructing the reference trajectory optimization model, the following steps are taken: determining the feasibility constraints for parking the vehicle based on its current location and the garage location.
[0010] Furthermore, before constructing the reference trajectory optimization model, the process also includes: uniformly converting the current vehicle position and garage position data collected by different location acquisition systems to a standard parking plane coordinate system, wherein the standard parking plane coordinate system has the far point of the bottom edge of the parking space as the origin, the bottom edge line of the parking space as the horizontal axis, and the far side edge line of the parking space as the vertical axis.
[0011] Furthermore, the collision avoidance parking space far side line generated during the optimization process of the reference trajectory optimization model is genetically corrected, including: when the difference between the current vehicle position's ordinate and the first parameter is less than the preset maximum ordinate offset of the corrected collision avoidance parking space far side line, the vehicle position is shifted to the right, where the first parameter is the ordinate of the position point with the smallest abscissa in the set of position point abscissas.
[0012] Furthermore, the parking tilt generated during the optimization process of the reference trajectory optimization model is genetically corrected, including: when the difference between the ordinate of the current vehicle position and the second parameter is less than the preset maximum ordinate offset of the parking tilt, the vehicle position is shifted to the left, where the second parameter is the ordinate of the vehicle position when parking stops.
[0013] Furthermore, the parking space misalignment caused during the optimization process of the reference trajectory optimization model is corrected by means of: when the absolute value of the longitudinal error of the vehicle position when parking is less than a preset threshold, the vehicle position is moved down.
[0014] Furthermore, the improvement of the improved moth-to-flame optimization algorithm lies in:
[0015] A non-linear reduction of weight coefficients is achieved based on a cosine-based decreasing strategy;
[0016] By introducing selection, crossover, and mutation operators from the genetic mechanism, a nonlinear reduction of the directional mutation coefficient and the crossover adjustment coefficient is achieved based on an exponential reduction strategy.
[0017] Compared with the prior art, the present invention has the following advantages:
[0018] This invention addresses the challenge of finding an ideal reference trajectory that is collision-free, smooth, and sufficiently short in the optimization of reference trajectories for automated parking systems. It proposes a gene-correction-based "moth-to-a-flame" optimization algorithm for automated parking systems. Based on the standard automated parking planar coordinate system, a cubic spline fitting method is incorporated to construct a reasonable and high-quality automated parking reference trajectory optimization model. To effectively improve the optimization performance of the automated parking reference trajectory, a nonlinear decreasing weight coefficient "moth-to-a-flame" algorithm integrating gene correction and directed mutation mechanisms is proposed, exhibiting excellent global optimization quality. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of an automatic parking reference trajectory optimization method in an embodiment.
[0021] Figure 2 This is a schematic diagram illustrating the principle of automatic parking in the embodiment.
[0022] Figure 3 This is a schematic diagram of gene modification on the far side edge of the collision avoidance storage site in the embodiment.
[0023] Figure 4 This is a schematic diagram of berth tilt gene correction in the embodiment.
[0024] Figure 5 This is a schematic diagram of berth misplacement gene correction in the embodiment.
[0025] Figure 6 This is a schematic diagram of the nonlinear decreasing function of the weight coefficient ω in the embodiment.
[0026] Figure 7 This is the overall design diagram of the automatic parking experiment in the embodiment.
[0027] Figure 8 The above is the host computer monitoring result of the optimized parking reference trajectory in the embodiment.
[0028] Figure 9 The above is the monitoring result of the host computer for the parking tracking control in the embodiment.
[0029] Figure 10 The above is the host computer monitoring result of the reference trajectory optimization fixed-point feature area in the embodiment.
[0030] Figure 11 The above is the monitoring result of the host computer for tracking and controlling the fixed-point feature area in the embodiment.
[0031] Figure 12 The image shown is an unmanned aerial photograph of a fixed-point feature area for tracking and control, as illustrated in this embodiment. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] like Figure 1 As shown, this invention provides a method for optimizing the reference trajectory of automatic parking, comprising the following steps:
[0034] S1. Obtain the vehicle's current location, garage location, and standard parking location. Based on the preset number of reference trajectory feature points, construct a reference trajectory optimization model using a cubic spline fitting method. The vehicle's current location is represented by the coordinates of the center point of the current vehicle coverage area, the garage location is represented by the coordinates of the four vertices of the garage, and the reference trajectory feature points are the center points of the vehicle coverage area at each sampling time.
[0035] Automated parking is the parking maneuver that involves moving a car from its starting area to a parking space within the permitted parking range using an automatic parking system. Automated parking typically employs an automatic reversing parking method. A schematic diagram illustrating the principle of automated parking is shown below. Figure 1 As shown.
[0036] Figure 2 In this context, it is assumed that during the parking process, the vehicle coverage area is collected ns times in a targeted sequence, denoted as the feature region set (A1,...,A2). is ,…,A ns Clearly, A1 should be the starting region. ns This should be a parking area, P1, P... is and P ns These are the center points of the feature regions; L d These are the baselines for parking spaces in the parking garage; L ne and L fe These are the near and far edges of the parking spaces in the parking garage, respectively; P nt P ft P nb and P fb These are the near-angle point of the parking garage top, the far-angle point of the parking garage top, the near-angle point of the parking garage bottom, and the far-angle point of the parking garage bottom; T R and T c The reference trajectory and the actual tracking control trajectory for parking are compared separately. Due to uncertainties and disturbances during parking, it is impossible to achieve zero-error tracking control, i.e., T... c It is impossible to have T R Completely overlapping; TS The monitoring, tracking, and control trajectory obtained by the sensing and imaging system cannot achieve zero-error tracking and control trajectory monitoring due to limitations in sensor accuracy and measurement errors, i.e., T S It is also impossible to have T c Total overlap.
[0037] Furthermore, successful implementation of automated parking requires the sequential completion of three essential steps: determining that the parking feasibility constraint is met; optimizing and obtaining the parking reference trajectory; and tracking the parking reference trajectory to the allowable parking range. Automated reverse parking typically requires that the parking environment be free of obstacles, the parking space be known, and the bottom and side lines, bottom and top corners of the parking space be clearly identifiable. In addition, the parking start feasibility constraint must be met: the center point P1 of the start area must be within the feasible parking start area Ω. C,1 Inside; the center point P1 of the starting area and its bottom midpoint P b1 The line L d And the bottom line of the storage location L d This is called the starting lean angle Δ∠ B If its absolute value is less than the threshold Δ∠ Bmax The specific feasibility constraint expression for starting parking in the garage is as follows:
[0038]
[0039] Furthermore, the standard parking plane coordinate system uses the far corner of the parking space bottom as the origin and the bottom line of the parking space as the positive horizontal axis (x-axis). Adopting the standard parking plane coordinate system not only simplifies parking calculations but also facilitates drivers' assessment of real-time parking conditions, enhancing the rationality of parking decisions. Based on this, the main components of the intelligent automatic parking system—the parking feasibility determiner, reference trajectory optimizer, parking controller, and parking monitoring host computer—are more suitable for using the standard parking plane coordinate system. Converting the real-scene parking plane coordinate system obtained from the parking image system to the standard parking plane coordinate system requires three steps: first, cropping the largest possible rectangular real-scene parking scene Ω; second, rotating the coordinate system according to the real-scene projection rotation angle ∠α; and finally, translating the origin according to the coordinates (x0, y0) of the far corner of the parking space bottom in the real-scene coordinate system.
[0040] Assume there is a point s within the parking area, whose coordinates in the standard parking plane coordinate system are (x, y, s). s ,y s And the angle between it and the horizontal axis is ∠β, obviously,
[0041] If the coordinates (x) are known s ,y s From this, we can obtain the coordinates (x, y) of the parking space in the real-world parking plane coordinate system. r,y r The conversion formula for ) is:
[0042]
[0043] Similarly, if the coordinates (x) are known r ,y r It is also easy to know the coordinates (x) s ,y s ).
[0044] In the standard parking coordinate system, let the set of decision variables be... x(P is ) and y(P is P is the center point of the i-th feature region. is The horizontal and vertical axes in the standard parking coordinate system. Starting tilt angle Δ∠ B To obtain a parking reference trajectory with the shortest possible length, assuming a sufficiently small feature area, parking experience suggests that the horizontal and vertical coordinates of the center points of the feature areas should decrease sequentially. The specific expression is as follows:
[0045] x(P ns )≤,…,≤x(P is )≤,…,≤x(P1) (3)
[0046] y(P ns )≤,…,≤y(P is )≤,…,≤y(P1) (4)
[0047] Based on the feasibility constraints for starting parking in the garage as shown in equation (1), the starting tilt angle Δ∠ B Small enough.
[0048] Spline interpolation originated in the 1960s. When drafting maps, workers would fix slender, flexible wooden strips to the designated points using weights, allowing them to bend freely at other locations. The resulting curve was called a spline curve. Cubic spline fitting, a method for fitting spline curves using cubic spline interpolation functions, has been widely applied in various industrial sectors. The definition of the cubic spline interpolation function s(x) is as follows:
[0049] Given the interval Δ = [a, b] and its n+1 interpolation points (x0, x1, ..., xn) within the interval. n If the function satisfies the following two conditions:
[0050] First, in any subinterval [x i ,x i+1 s(x) is a cubic polynomial over the region (i∈[0,1,……,n-1]). The specific expression for a cubic polynomial is:
[0051]
[0052] s i (x)=a i+1 ·x 3 +b i+1 ·x 2 +c i+1 ·x+d i+1 (6)
[0053] In the formula, s i (x) is a piecewise cubic polynomial function for cubic spline interpolation; (x0, x1, ..., x) n (a0, a1, ..., a) are interpolation points. n (b0,b1,…,b) n (c0,c1,…,c) n ) and (d0,d1,…,d n ) is a piecewise function s i The polynomial coefficients of (x).
[0054] Secondly, s(x) is twice continuously differentiable on the interval Δ = [a, b].
[0055] If the coordinates of the center points of all feature regions in the standard parking plane coordinate system are obtained, a smooth parking reference trajectory can be quickly obtained using the cubic spline fitting method. This is a significant advantage that geometric fitting methods do not possess. Clearly, the cubic spline fitting method is particularly suitable for solving the parking reference trajectory optimization problem.
[0056] Parking reference trajectory length L(T) R This largely reflects the performance quality of the parking optimization method, and it is the target of parking optimization. Let the number of center points of the feature region be ns. Through ns center points of the feature region P1, P2, ..., P... ns The parking reference trajectory T can be obtained by fitting. R In this context, the center point P1 of the starting region is fixed, while the center points of the other ns-1 feature regions are P2, ..., P... ns These variables can be adjusted within a certain area and are the decision variables for optimizing the reference trajectory of parking. Parking constraints: 1. No collision avoidance between the car and the parking space edge during parking; 2. The attitude angle difference and parking interval distance at any time period are less than the threshold ΔL. max and Δ∠ max Parking area center point P ns Midpoint P at the bottom of the storage location bm The connection T(P) ns ,P bm ) and the far side line L of the storage location fe The included angle is called the parking tilt angle Δ∠. SIf its absolute value is less than the threshold Δ∠ Smax Parking area center point P ns The ordinate y(P) ns ) and the expected vertical axis y H Parking position error Δy ns If its absolute value is less than the threshold Δy Hmax The period of the parking process is set as Δt. The specific automatic parking reference trajectory optimization model is expressed as follows:
[0057]
[0058] In the formula, Ω g P represents the area covered by the two sides of the storage location. g Let n be the set of edge collision avoidance detection points. g To detect the location point, P g (ig) represents the ig-th edge collision avoidance detection point, i∈{1,2,…,ng}, which obviously has ΔL it and Ω c,it T represents the parking interval distance and vehicle coverage area in the it-th cycle. max nt represents the parking time, and nt represents the number of cycles. it∈{1,2,…,nt} This is a round-up operator, and since the car cannot collide with the bottom line and side lines of the parking space, therefore... ΔL it and Δ∠ it These represent the attitude angle difference and parking interval distance in the it-th cycle, respectively; P is Let Ω be the center point of the i-th feature region, i∈{2,…,ns}. C,is Given its adjustable area, there is obviously... tf is the reference trajectory for parking in the garage obtained by fitting. This application uses the cubic spline fitting method.
[0059] The width of parking space marking lines is typically between 0.1 and 0.15 meters, which allows for a maximum collision avoidance tolerance width ΔW. E Set to 0.1 meters. Set the distance between adjacent edge collision avoidance detection points to ΔD. e Based on fundamental geometric knowledge, if ΔD e >2ΔW E When the vehicle's coverage area is close to two adjacent collision avoidance detection points and the angle between its side and the edge line is... At that time, the vehicle collides with the edge of the parking space. Assuming the collision avoidance detection points on the edge line are uniformly distributed, the following constraints must be met:
[0060] ΔD e ≤2·ΔW E(8)
[0061]
[0062] In the formula, L(L ne ) and L(L fe The distribution is the length of the near and far sides of the storage location.
[0063] S2. Genetic corrections are made to the three scenarios of collision avoidance parking space far side line, parking tilt, and misalignment that occur during the optimization process of the reference trajectory optimization model.
[0064] For individual plants with diseased genes, gene modification involves repairing problematic genes to enable correct expression. Traditional optimization algorithms typically discard all infeasible solutions (solutions that do not meet constraints, also known as invalid solutions) generated during the optimization process. This is detrimental to preserving optimization results, but retaining some infeasible solutions negatively impacts optimization efficiency. Appropriate use of gene modification methods can enhance the preservation of optimization results, but excessive use can increase the number of adjustable parameters and computational load, thus increasing computational burden. Considering computational efficiency, this paper applies gene modification to three scenarios in parking reference trajectory optimization: collision avoidance at the far edge of the parking space, parking tilt, and misalignment. Other scenarios are replaced with new solutions. This is an effective way to handle infeasible solutions in parking.
[0065] Furthermore, the collision avoidance parking space far side line generated during the optimization process of the reference trajectory optimization model is genetically corrected, including: when the difference between the current vehicle position's ordinate and the first parameter is less than the preset maximum ordinate offset of the corrected collision avoidance parking space far side line, the vehicle position is shifted to the right, where the first parameter is the ordinate of the position point with the smallest abscissa in the set of position point abscissas.
[0066] Specifically, in the standard parking coordinate system, the far side line of the parking space is equivalent to the vertical axis (y-axis). If the vehicle avoids colliding with the far side line of the parking space during the IT-th cycle of the parking process, then the left bottom corner point (x-axis) of the vehicle at this time... lb,IT ,y lb,IT It must have crossed the far side line of the storage location; in other words, its x-coordinate... lb,IT <0. To correct the far side line of the collision avoidance parking space, the x-coordinate of the center point of the feature area should be shifted to the right by a certain amount. The empirical formula for rightward shift of the x-coordinate of the center point of the i-th feature area is as follows:
[0067] |y(P is )-y(Pxmin(x lb,1 ,x lb,2 ,……,x lb,nt ))|≤ΔY fc,max (10)
[0068] In the formula, Pxmin(P) is a function to obtain the position point with the smallest x-coordinate in the set of position point x-coordinates, and ΔY fc,max To correct the maximum longitudinal offset of the far side line of the collision avoidance storage location.
[0069] If equation (10) holds, then the x-coordinate of the center point of the is-th feature region is appropriately shifted to the right, specifically by the rightward shift of the x-coordinate of the far side edge of the collision avoidance parking space by Δx. is,fc The empirical estimation formula is:
[0070] Δx is,fc = (1+r)·c fc ·x lb,IT (11)
[0071] In the formula, r is a random number in the interval (0,1), and c fc An empirical coefficient was used to correct the rightward shift of the horizontal coordinate of the far side line of the collision avoidance storage location.
[0072] A detailed diagram illustrating the gene modification of the far side line of the collision avoidance storage location is shown below. Figure 3 As shown.
[0073] Furthermore, the parking tilt generated during the optimization process of the reference trajectory optimization model is genetically corrected, including: when the difference between the ordinate of the current vehicle position and the second parameter is less than the preset maximum ordinate offset of the parking tilt, the vehicle position is shifted to the left, where the second parameter is the ordinate of the vehicle position when parking stops.
[0074] Specifically, if the parking tilt angle Δ∠ S The absolute value is less than the threshold Δ∠ Smax This is not true, that is, |Δ∠ S |>Δ∠ Smax This is called parking tilt. From equation (3), we know that the parking tilt angle Δ∠ S It must be greater than 0. To correct the parking tilt, the x-coordinate of the center point of the feature region should be shifted to the left. The empirical formula for shifting the x-coordinate of the center point of the i-th feature region to the left is:
[0075] y(P is )-y(P ns )≤ΔY SI,max (12)
[0076] In the formula, ΔY SI,max To correct for the maximum longitudinal axis offset of the parking tilt.
[0077] If equation (12) holds, then the x-coordinate of the center point of the is-th feature region is appropriately shifted to the left, specifically the leftward shift of the x-coordinate of the corrected parking tilt by Δx. is,SI The empirical estimation formula is:
[0078] Δx is,SI =(y(P) is )-y(P ns ))·tan(Δ∠ S -r·Δ∠ Smax (13)
[0079] A specific diagram illustrating the berth tilt gene correction is shown below. Figure 4 As shown. Figure 4 In the middle, the interval (y) ns ,y ns +ΔY SI,max The center point P of the characteristic region within ) ns-1 P ns-2 The x-coordinate shifts to the left by Δx ns-1,SI Δx ns-2,SI This achieved the goal of correcting the far side line of the collision avoidance storage location.
[0080] Furthermore, the parking space misalignment generated during the optimization process of the reference trajectory optimization model is corrected by means of: when the absolute value of the longitudinal error of the vehicle position when parking is less than a preset threshold, the vehicle position is moved down.
[0081] Specifically, if the parking position error Δy ns The absolute value is less than the threshold Δy Hmax This is not true, that is, |Δy ns |≤Δy Hmax This is called parking misalignment. To correct parking misalignment, the ordinate of the center point of the parking area should be moved appropriately. Specifically, the ordinate movement Δy is used to correct parking misalignment. SP The empirical estimation formula is:
[0082] Δy SP =|Δy ns |-r·Δy Hmax (14)
[0083] A specific diagram illustrating the berth tilt gene correction is shown below. Figure 4 As shown.
[0084] Figure 5 In the middle, due to the center point P of the parking area ns Not parked within the permitted parking area (y H -Δy Hmax ,y H +Δy Hmax It is above the parking area, and it moves down Δy. SP This achieved the goal of correcting the parking misalignment.
[0085] Based on the gene-correction-based infeasible solution for parking in a garage presented in this paper, only three empirical parameters need to be added: the maximum longitudinal axis offset ΔY of the far side line of the collision avoidance parking space. fc,max And the empirical coefficient c for shifting the x-axis to the right fc Correcting the maximum longitudinal offset ΔY of the parking tilt SI,max .
[0086] S3. Based on the improved moth-to-a-flame optimization algorithm, the genetically modified reference trajectory optimization model is solved to obtain the optimal reference trajectory. The improvement of the improved moth-to-a-flame optimization algorithm is as follows: First, a non-linear decreasing strategy based on cosine form is used to achieve the non-linear decreasing of the weight coefficients; second, selection, crossover, and mutation operators from the genetic mechanism are introduced, and a non-linear decreasing strategy based on exponential form is used to achieve the non-linear decreasing of the directional mutation coefficient and the crossover adjustment coefficient.
[0087] The moth-to-a-flame algorithm was proposed in 2015. It imitates the behavior of moths laterally locating and searching for light sources [3]. The optimization process of the moth-to-a-flame algorithm, MFO, can be abstractly represented by a triple. The specific mapping expressions are as follows:
[0088] MFO=(I,P,T) (15)
[0089] I:φ→{M,OM,F,OF} (16)
[0090] P:M→M (17)
[0091]
[0092] In the formula, I represents the behavior of initializing the moth population and flame set, and calculating the fitness values of each moth and flame; M represents the moth population, OM represents its fitness value vector; F represents the flame set, OF represents its fitness value vector. n is the population size, d is the solution dimension, and n f Let n be the number of flames. Initially, the number of flames equals the population size. f =n; P represents the behavior of updating the moth population's trajectory. After updating the moth population, the fitness value of each individual moth must be recalculated. If it is better than the fitness value of the current flame, then the flame set is updated; T represents the behavior of the moths updating their positions according to the logarithmic spiral law, D ij ·e τt ·cos(2πt) is a logarithmic spiral term, M i Let F be the position of the i-th moth. j Let D be the position of the j-th flame. ij Let t be the Euclidean distance between the i-th moth and the j-th flame, τ be the logarithmic spiral morphology adjustment coefficient, and t be a random number in the interval (-1, 1).
[0093] To accelerate the convergence of the "moth to a flame" algorithm, the number of flames is gradually reduced during the iteration process. The specific formula for updating the number of flames is as follows:
[0094]
[0095] In the formula, t is the current iteration number; t max The maximum number of iterations is given by round(x), which means rounding x to the nearest integer.
[0096] To better balance global exploration and local development, and thus effectively improve the moth-to-a-flame algorithm's tendency to get trapped in local convergence, introducing a weight coefficient ω for the logarithmic spiral term is an effective strategy. The mapping expression for the logarithmic spiral position update behavior of a specific moth individual is as follows:
[0097]
[0098] For the moth-to-a-flame optimization algorithm, a larger weight coefficient ω indicates stronger global exploration capability, making it suitable for the early stages of the optimization process; a smaller weight coefficient ω indicates stronger local exploitation capability, making it suitable for the later stages of the optimization process. During optimization, using a fixed or random decreasing rate for the weight coefficient is not conducive to effectively improving the algorithm's global optimization capability. This paper presents a more flexible nonlinear decreasing strategy for the weight coefficient ω based on a cosine-based decreasing rate. The specific formula for calculating the weight coefficient ω is as follows:
[0099]
[0100] In the formula, ω d ω represents the decrease in weighting coefficients. d =ω max -ω min ω min and ω max These are the minimum and maximum weight coefficients, respectively; t r For the iteration progress, t r =t·t max -1 β is the optimization factor for the non-linearly decreasing weight coefficient ω.
[0101] Specific details about the iteration progress t r The nonlinear decreasing function of the weighting coefficient ω is as follows: Figure 6 As shown. By Figure 6As can be seen, by adopting the aforementioned cosine-form nonlinear decreasing strategy, the nonlinear decreasing trend can be adjusted by selecting the most suitable optimization factor β. This strategy is highly adaptable and has a strong adjustment capability. This strategy can adjust the decreasing rate of the weight coefficients in real time during the iteration process, which is beneficial to improving the balance between global exploration and local development, thereby improving the global optimization capability of the algorithm.
[0102] In the initial stage of iterative optimization, emphasis should be placed on population diversity, requiring increased intensity of gene alterations and enhanced global exploration to rapidly improve individual adaptability. In the later stage, the focus should shift to preserving existing optimization results, weakening the intensity of gene alterations and concentrating on local development to avoid destroying existing dominant genes. Therefore, the directional mutation or crossover adjustment coefficient should gradually decrease with increasing iteration count. This paper presents a smoother method for calculating the directional mutation and crossover adjustment coefficient ω based on an exponentially decreasing coefficient. c and ω m Nonlinear decreasing strategy, specific directional mutation and cross-adjustment coefficient ω c and ω m The calculation formula is:
[0103]
[0104]
[0105] In the formula, ω c,min ω c,max and ω m,min ω m,max These are the minimum directional crossover adjustment coefficient, the maximum directional crossover adjustment coefficient, the minimum directional variation adjustment coefficient, and the maximum directional variation adjustment coefficient, respectively; β c and β m These are the directional variation and cross-adjustment coefficients ω, respectively. c and ω m The optimization factor decreases non-linearly.
[0106] As can be seen from equations (26) and (27), by adopting the above-mentioned exponential nonlinear decreasing strategy, the nonlinear decreasing trend can be achieved by selecting the most suitable optimization factor β. c and β m The optimization and adjustment strategy is characterized by its strong smoothness, with particularly smooth nonlinear decrease. This strategy can adjust the deceleration rate of directional mutation and crossover adjustment coefficients in real time during the iteration process, which is beneficial to improving the balance between global exploration and local development, thereby improving the algorithm's global optimization capability.
[0107] In the late optimization stage of the moth-to-flame algorithm, the moth population is highly susceptible to the influence of the flame set, leading to local convergence. Introducing selection, crossover, and mutation operators from genetic mechanisms enhances the diversity of the moth population, thus reducing the risk of the algorithm getting stuck in local convergence. Compared to conventional random crossover and mutation methods based on a certain mutation probability, directional crossover and mutation based on gradient information are more helpful in improving the convergence speed and optimization accuracy of the algorithm. The specific process of directional mutation for optimizing the parking reference trajectory is as follows:
[0108] Parking reference trajectory optimization is a type of optimization problem that seeks to minimize a single objective. Generally, optimization problems that seek to minimize a single objective can be described as follows:
[0109] min y=F(u) (22)
[0110] In the formula, y is the optimization objective, u is the decision variable, and F(u) is the optimization mapping model for solving the optimization objective y of the decision variable u. For the parking reference trajectory optimization problem, the decision variable u is the set of center points PS of the feature region to be decided, PS = {P2,…,P...} ns The optimization function F(u) is the reference trajectory length L(tf(PS)).
[0111] Let PSk be the original decision variable for the directional mutation or crossover, and let PS be the gene inheritance decision variable for the directional mutation or crossover. i Targeted mutations or crossovers of gene alterations are set as decision variables for PS. j Then the direction vector d(PS) can be defined. j PS i )for:
[0112] d(PS j PS i ) = sgn({P 2,j -P 2,i ,…,P ns,j -P ns,i}) (twenty three)
[0113] In the formula, sgn is the sign function, which is the sign indicator of the parameter, including 0, -1 and 1.
[0114] If L(tf(PS) j ))<L(tf(PS i )), vector d(PS i PS j Let L(tf(PS)) be the objective function, and let PS be the genetic inheritance decision variable. i The evolutionary direction of the decision variable PSj is determined by the gene's alteration; conversely, the vector d(PSi,PSj) represents its degenerative direction. The gene inheritance decision variable PS... iTypically, the original decision variable PS is chosen. k Or their direct parents; for genetically modified decision variables, choose those that are as similar as possible to the original decision variable PS. k High-quality solutions with significant differences.
[0115] By using the direction vector d(PSj,PSi), the original decision variable PS can be adjusted. i To perform directional crossover or directional mutation, the specific expression is:
[0116] PS k ′=PS i +ω c ·r·d(PS j PS i ) (twenty four)
[0117] PS k ′=PS i +ω m ·r·d(PS j PS i (25)
[0118] In the formula, PS i ′ represents the original decision variable PS to be mutated or crossed. k The new decision variable ω after directional mutation or directional crossover c and ω m ω is the directional variation or cross-adjustment coefficient. c ∈(0,1), ω m ∈(0,1).
[0119] Assume that in the t-th iteration, the condition t > 1 must hold, and the moth population M must be... t The i-th moth M t,i To determine the direction of crossover, select the moth population M at the (t-1)th iteration. t-1 The i-th and j-th moth individuals M t-1,i and M t-1,j As a decision variable for its directional crossover of gene inheritance and gene alteration. The individual moth M... t-1,i and M t-1,j Recorded as PS i With PS j Moth fitness value OM t-1,i and OM t-1,j denoted as L(tf(PS) i )) and L(tf(PS j Using equations (23) and (24), directional crossover can be achieved. Assume that in the t-th iteration, the current moth population M... t The i-th moth M t,i To be targeted for mutation, it is also used as a decision variable for gene inheritance, and the flame set F is randomly selected.t The j-th flame F t,j Genetic alteration serves as a decision variable for its directional variation. The moth M... t,i With Flame F t,j Recorded as PS i With PS j Moth fitness value OM t,i With flame adaptability value OF t,j denoted as L(tf(PS) i )) and L(tf(PS j By using equations (23) and (25), directional mutation can be completed.
[0120] The following specific application examples further illustrate the solution and effects of the present invention.
[0121] This embodiment uses the automatic parking scenario of garage 155 at the Dalian Shell Museum in Xinghai Square, Dalian, as a real-world parking experiment. The experimental garage has equal lengths on both the near and far sides of the parking space, each 5 meters long. The bottom line of the parking space is 2.5 meters long, and the width of the parking space marking line is 0.1 meters. The experimental vehicle is a Toyota Corolla 1.2T S-CVT GL Pioneer Edition (2019 model), with a length of 4635mm, a width of 1780mm, and a height of 1455mm. The horizontal and vertical distances from the bottom right corner of the starting area of the experimental vehicle to the near corner of the top of the parking space are 2 meters and 2.1 meters, respectively.
[0122] The experimental vehicle used in this embodiment is equipped with an automatic parking system, featuring a real MPC555LFMZP40 trajectory optimizer and trajectory controller chip, a DSP28335 auxiliary control unit (Automatic Reversing Parking, ARP) and execution drive unit chip, and various necessary actuators. During the parking process, at the decision execution layer, the trajectory optimizer transmits the optimized reference trajectory to the trajectory controller to ultimately drive the corresponding actuators. At the perception layer, the driver inside the ARP vehicle views the real-time parking status on the ARP monitoring host computer. This does not interfere with normal parking tracking control; only when necessary, parking commands or emergency avoidance commands are applied to bring the experimental vehicle to a stop or emergency stop. The specific overall design diagram of the automatic parking experiment is shown below. Figure 7 As shown.
[0123] Depend on Figure 7 It can be seen that the ARP experiment results and analysis are partly derived from the real-world environmental photography of the ARP process by the drone, and partly from the processing of the collected ARP data by the ARP monitoring host computer.
[0124] The main configuration of the automatic parking experiment used in this embodiment is as follows: the time limits for parking data acquisition, parking feasibility determination, reference trajectory optimization, reference trajectory tracking control, emergency stop, and parking are 3.5s, 1.5s, 10s, 25s, 0.4s, and 1.5s, respectively; at least one driver with a B2 driving qualification for safe parking inside the vehicle and one safety inspector outside the vehicle, and one aerial drone photographer with good photography skills; one DJI Mavic 2 drone; the performance configuration of the parking monitoring host computer is an iPhone 13 Pro Max, which communicates via vehicle Bluetooth and is fixed with a vehicle phone holder; the hardware processor model is MPC555LFMZP40.
[0125] The specific parameters of the automatic parking reference trajectory optimization model are set as follows: starting tilt angle threshold Δ∠ Bmax for The number of feature center points ns is 10, and the parking tilt angle threshold Δ∠ Smax for Parking position error Δy ns The distance is 0.15m, the parking process cycle is Δt = 1500μs, the attitude angle difference and the parking interval threshold ΔL max and Δ∠ max 5.10 respectively -4 π and 10 -3 m.
[0126] The specific parameters of the gene-modified optimization algorithm for automatic parking moth-to-fire attraction are set as follows: moth population size n is 30, and the number of iterations t. max The value is 80, the logarithmic spiral waveform τ is 1, and the minimum and maximum weighting coefficients ω are... min and ω max The values are 0.3 and 0.9 respectively, the optimization factor β for the non-linearly decreasing weight coefficient ω is 1.85, the probabilities of selection, directional crossover, and directional mutation are 0.45, 0.75, and 0.08 respectively, and the minimum directional crossover adjustment coefficient, maximum directional crossover adjustment coefficient, minimum directional mutation adjustment coefficient, and maximum directional mutation adjustment coefficient ω are also given. c,min ω c,max and ω m,min ω m,max The values are 0.4 and 0.8, and 0.25 and 0.75, respectively, representing the directional variation and cross-adjustment coefficients ω. c and ω m Non-linear decreasing optimization factor β c and β m The values are 1.49 and 1.66 respectively, correcting the maximum vertical axis offset ΔY of the far side line of the collision avoidance parking space. fc,max , empirical coefficient c for rightward shift of the horizontal axis fcand the maximum longitudinal offset ΔY of the corrected parking tilt SI,max The measurements are 0.92m, 0.58m, and 0.84m, respectively.
[0127] To verify the effectiveness of the proposed optimization algorithm, a real-world automated parking scenario under clear, windless weather conditions was conducted. The proposed improved moth-to-a-flame optimization algorithm, a Lévy-based moth-to-a-flame algorithm, a traditional moth-to-a-flame algorithm, and a particle swarm optimization algorithm were used to optimize the parking reference trajectory. Fuzzy proportional-integral-derivative control was employed for all scenarios to track the parking reference trajectory. The presented real-world parking experiment results include not only a set of automated parking optimization and tracking control results obtained from the parking monitoring host computer, but also unmanned aerial images of several fixed-point feature areas during the parking process. Specific automated parking reference trajectory optimization and tracking control curves are shown below. Figure 9 As shown, the host computer monitoring results for the reference trajectory optimization and tracking control fixed-point feature area are as follows: Figure 10 and Figure 11 As shown, the real-world drone aerial image of the fixed-point feature area is as follows: Figure 12 As shown in Tables 1 and 2, the specific results related to the optimization and tracking control of automated parking are presented.
[0128] Table 1. Optimization results of parking reference trajectory based on location and length.
[0129]
[0130] Table 2. Results of parking tracking control for position and length.
[0131]
[0132] Table 3. Results of Parking Inclination Angle Optimization and Tracking Control for Parking Entry
[0133]
[0134] From Table 1 and Figure 8 As can be seen, compared with the three optimization algorithms used for comparison, the improved moth-to-a-flame algorithm proposed in this paper finds a more ideal reference trajectory, and its reference trajectory path is shorter; as shown in Table 2 and Figure 9 As can be seen, compared with the three optimization algorithms used for comparison, the improved "moth to a flame" algorithm proposed in this paper, based on the same tracking control algorithm (fuzzy PID), achieves more ideal tracking control results and has a shorter parking path; Figure 10 It can be seen that, compared with the three optimization algorithms used for comparison, the improved immune moth-to-a-flame algorithm proposed in this paper finds a more ideal reference trajectory. Its optimized reference trajectory is closer to the near side line of the parking space and the expected parking tilt angle is smaller; from Figure 11 and Figure 12As can be seen, compared with the three optimization algorithms used for comparison, the improved immune moth-to-a-flame algorithm proposed in this paper obtains a more ideal tracking control path based on the same tracking control algorithm (fuzzy PID). Its tracking control path is closer to the near side line of the parking space and the actual parking tilt angle is smaller. As shown in Table 3, compared with the three optimization algorithms used for comparison, the improved immune moth-to-a-flame algorithm proposed in this paper can obtain a smaller expected parking tilt angle. If based on the same tracking control algorithm (fuzzy PID), its actual parking tilt angle is also smaller.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing the reference trajectory of an automated parking system, characterized in that, Includes the following steps: The current vehicle location, garage location, and standard parking location are obtained. Based on the preset number of reference trajectory feature points, a reference trajectory optimization model is constructed using a cubic spline fitting method. The current vehicle location is represented by the coordinates of the center point of the current vehicle coverage area, the garage location is represented by the coordinates of the four vertices of the garage, and the reference trajectory feature points are the center points of the vehicle coverage area at each sampling time. Genetic corrections are applied to the three scenarios—far side line of the collision avoidance parking space, parking tilt, and misalignment—that arise during the optimization process of the reference trajectory optimization model. The improved moth-to-flame optimization algorithm is used to solve the genetically modified reference trajectory optimization model to obtain the optimal reference trajectory. The improvement of the improved moth-to-flame optimization algorithm lies in: A non-linear reduction of weight coefficients is achieved based on a cosine-based decreasing strategy; By introducing selection, crossover, and mutation operators from the genetic mechanism, a nonlinear decrease in the directional mutation coefficient and the crossover adjustment coefficient is achieved based on an exponential decreasing strategy. The specific formula for calculating the weight coefficient ω using the cosine-decreasing nonlinear weight coefficient strategy is as follows: ; In the formula, ω d is a weight coefficient decrement, ω d = ω max - ω min , ω min and ω max are the minimum weight coefficient and the maximum weight coefficient, respectively. t r For iterative progress, t r = t·t max -1 ; β is the weight coefficient ω nonlinear decreasing optimization factor; The directional variation and cross-adjustment coefficient ω based on exponentially decreasing form c and ω m Nonlinear decreasing strategy, specific directional mutation and cross-adjustment coefficient ω c and ω m The calculation formula is: ; ; In the formula, ω c,min ω c,max and ω m,min ω m,max These are the minimum directional crossover adjustment coefficient, the maximum directional crossover adjustment coefficient, the minimum directional variation adjustment coefficient, and the maximum directional variation adjustment coefficient, respectively; β c and β m These are the directional variation and cross-adjustment coefficients ω, respectively. c and ω m The optimization factor decreases non-linearly.
2. The automatic parking reference trajectory optimization method according to claim 1, characterized in that, Before constructing the reference trajectory optimization model, the following steps are taken: determining the feasibility constraints for parking the vehicle based on its current location and the location of the garage.
3. The automatic parking reference trajectory optimization method according to claim 1 or 2, characterized in that, Before constructing the reference trajectory optimization model, the following steps are also included: converting the current vehicle position and garage position data collected by different location acquisition systems into a standard parking plane coordinate system. The standard parking plane coordinate system has the far point of the bottom edge of the parking space as the origin, the bottom edge of the parking space as the horizontal axis, and the far side edge of the parking space as the vertical axis.
4. The automatic parking reference trajectory optimization method according to claim 1, characterized in that, Genetic correction is performed on the far side line of the collision avoidance parking space generated during the optimization process of the reference trajectory optimization model, including: when the difference between the ordinate of the current vehicle position and the first parameter is less than the preset maximum ordinate offset of the far side line of the collision avoidance parking space, the vehicle position is shifted to the right, where the first parameter is the ordinate of the position point with the smallest abscissa in the set of position point abscissas.
5. The automatic parking reference trajectory optimization method according to claim 1, characterized in that, Genetic correction is applied to the parking tilt generated during the optimization process of the reference trajectory optimization model, including: When the difference between the current vehicle position's ordinate and the second parameter is less than the preset maximum ordinate offset for correcting parking tilt, the vehicle position is shifted to the left. The second parameter is the ordinate of the vehicle position when parking is complete.
6. The automatic parking reference trajectory optimization method according to claim 1, characterized in that, Genetic correction is applied to the berth misalignment that occurs during the optimization process of the reference trajectory optimization model, including: When the absolute value of the longitudinal error of the vehicle's position is less than a preset threshold when the vehicle is parked, the vehicle's position will be moved down.