Research on track memory algorithm for intelligent vehicles
[Copy link]
Abstract: This paper studies the control algorithm of smart cars based on track memory, and introduces four aspects: the implementation premise of the track memory algorithm, initial lap memory, data analysis and processing, and how to make full use of the information obtained from the memory. Actual vehicle tests show that for relatively simple racing tracks, smart cars based on track memory control algorithms can achieve good results. As the tracks become more complex, track memory algorithms also have great potential.
Keywords: smart car; track memory; control algorithm The rules of the Freescale Smart Car Invitational clearly state that the smart car must run two laps on the track, and the best lap will be recorded as the race result. The establishment of this rule makes the track memory algorithm feasible.
As shown in Figure 1, the track memory algorithm drives slowly at the safest speed in the first lap and saves the track information. In the second lap, the speed and cornering decisions are optimized accordingly based on the saved information, so as to achieve a good result in the second lap. No matter how far the smart car's sensor looks ahead, it can only predict the situation of the track within a limited distance when running a lap. The smart car using the track memory algorithm has a comprehensive understanding of the entire track in the second lap, so under the same conditions, it will have an advantage over the smart car that does not use track memory. Figure 1
Prerequisites for the implementation of
the track memory algorithm To successfully implement the track memory algorithm, the following prerequisites must be met:
1. The car must complete the first lap safely. In the first lap, the main purpose of the car is to collect track information. Smart cars using the track memory algorithm generally use a slower and uniform speed to complete the first lap.
2. The car must be able to clearly distinguish the difference between the starting line and the cross line of the track.
3. The car must have enough memory space to record the data of a lap of the track. Due to the limited RAM capacity of the microcontroller chip, algorithm researchers need to optimize the algorithm and change the saved format to save memory space.
4. When running the first lap, the car needs to process the current track data in real time to avoid the data processing in the second lap and bring adverse effects on the real-time control of the car. First lap memory
For smart cars using the track memory algorithm, the main purpose of the first lap is to record the important features of the track in a specific format as a reference for the second lap. The horizontal coordinate of the data to be recorded in the first lap is generally the distance traveled, and the vertical coordinate is the radius of curvature of the track at this point. For the horizontal axis, since the first circle is usually completed at a constant speed, it can usually be directly expressed by time, or by the current number of pulses of the vehicle speed sensor. For the vertical axis, it is impossible to obtain the curvature radius of the current point immediately, and it can only be obtained after the collected raw data has been processed. In the first circle, we can only record the current angle setting value, which can be expressed by the servo duty cycle or the directly converted angle value.
Data analysis and processing Figure 2 is the first lap memory curve of the Korean college student intelligent car competition track
. Figure 2 is the curve of the corner change recorded in the first lap of the Korean competition track. By comparing the track map in Figure 3, it can be found that some characteristics of the real track can be reflected in the memory curve. First, the straight part of the track is reflected in the curve as a straight line with a value of 0, but there will be certain fluctuations, such as point A in Figure 2; the rotation direction of the curve is reflected in the positive and negative values of the corner in the curve, for example, part B corresponds to a short right turn before a large left turn in the track; the curvature radius and arc of the curve are reflected in the size and length of the corner value in the curve, such as part C, which has a large corner value and switches briefly between positive and negative. In the actual track, it is the wave curve segment (part C in Figure 3). In summary, if the change curve of the corner value recorded in the first lap is analyzed and processed, it can fully reflect the characteristics of the track. Figure 3 2004 South Korean College Student Intelligent Car Competition Track Map
Although we can easily determine the characteristics of the track from the curve graph recorded in the first lap, we still need to let the single-chip microcomputer automatically recognize this information and filter out some burrs and fluctuations. After repeated research, we have successfully found a suitable processing method and processed the curve graph in Figure 2 into the route map shown in Figure 4. In the processed route map, when the processed value is 0, it means that the car is on a straight road at this time; when the processed value is greater than 0, it means that the car is on a curve turning left, and the curvature radius is proportional to the processed value; vice versa. In this way, the second lap can make the corresponding optimal decision based on this information. Figure 4 Processed route map Second lap strategy For smart cars using track memory algorithms, the second lap is the most critical and attractive part. In the second lap, how to make full use of the track information collected from the first lap to achieve the best results is a matter of opinion. Here we only briefly introduce some ideas from the three aspects of vehicle speed strategy, corner strategy and other strategies, hoping to play a role in inspiring others. Speed strategy Due to certain limitations of the car itself, such as the influence of factors such as steering gear response time, track friction coefficient, tire grip, sensor layout, etc., for a certain specific curve, the car has its so-called limit speed. If we use the initial lap to get the curvature radius of the curve, and adjust the speed to its corresponding limit speed when passing each curve, then in theory this is the best result it can achieve. For straight roads, especially long straight roads, the advantages of track memory algorithms can be better utilized. For example, after the initial lap memory, it is found that a certain straight section is 2800 pulse points long. In the decision-making process, the motor can be started to accelerate with the maximum duty cycle in the first 2500 pulses, and the speed can be directly decelerated when it exceeds 2500 pulses, and the speed can be adjusted to the limit speed of the next corner to pass the corner. Since the length of the straight road is known in advance, the speed control strategy can be more targeted. Corner strategy If the car adopts a straight-line sensor layout, when you set the center point to a certain degree, the car will also have a certain left-right tendency, thus laying the foundation for "cutting corners" in the corners. After the initial lap memory, the car can directly determine whether the next corner is a left turn or a right turn when running the second lap. In this way, the car can pass the track with a smaller curvature radius than the specified one, thereby reducing the passing path and saving time. Similarly, when a general car is driving at high speed on a straight road, it often oscillates back and forth. If after the initial lap memory, the car judges that it is on a straight road, it can take corresponding measures to solve this problem well. Problems and Prospects Although the track memory algorithm can greatly improve the performance of the car, at present, in order to achieve good results in actual use, more in-depth research is needed. There are two main reasons: First, the tracks of the current college smart car competition are becoming more and more complex and longer, and there will be more than one cross line, which poses a great challenge to the memory and data processing of the first lap. Second, since the track is not announced before the final, there is a great risk in the track memory algorithm, and a more conservative and safe algorithm may be more advantageous in the final. Although the track memory algorithm has certain risks, its unique idea is worth continuing to develop and has great development potential. We predict that in future competitions, this processing method will be widely used, the first lap and the second lap will be distinguished, and the second lap will be improved on the basis of the first lap, rather than simply repeating it.
|