Design of Intellectual Vehicles with Path Memorizing Function

Based on the deficiencies of current intelligent vehicles, we design a new vehicle system that has a function of storing path data. It has a kind of algorithms to recognize the position and path of the vehicle that neither relies on the external positioning methods such as GPS, WIFI, etc, nor the electromagnetic rails or photoelectric rails. This system is rarely affected by the ground condition, so there is no need for any ground signs.


Introduction
Nowadays there are two kinds of guided vehicles that have found an increasingly wide utilization in the shortdistance transport of goods.
Vehicles are guided by electromagnetic track.
Vehicles are guided by photoelectronic track.Both of them need to rely on the track on the floor, and require a good ground condition.Their limitations are as follows: In the factory or warehouse, the ground condition may not be optimistic.Debris, water, dust and other issues often make it difficult for photoelectric sensors to accurately detect the lane.Similarly, the electromagnetic guidance is also limited by the water, metal debris and other adverse impact.
Before applying these two methods of guidance, workers must lay the black wire or electromagnetic wire on the ground as a "track".This is not convenient for factory to changes the product line, and it is difficult to lay "tracks" on unrepaired ground such as dirt roads and brick roads 1 .In addition to the ground track, we also could adopt wireless location technology, such as GPS and WIFI, to guided vehicles, but both GPS and WIFI have some obvious defects that are hard to overcome.GPS is vulnerable to the interference of buildings and the accuracy is poor in indoor positioning.Similarly, WIFI positioning is usually applicable to indoor space.Moreover, before positioning the vehicles, WIFI transceiver must be installed in some key locations in the room and we have to set the location information to the position system.This process generally takes a long time and is very cumbersome 2 .Also, when the indoor space changes, such as installing a new large mechanical equipment in the plant, the location information needs to be reset.
Based on the above points, it is necessary to design a transportation system that is not limited by the ground condition, and it does not rely on the GPS, WIFI or markers on the ground and can accurately transport the goods from one place to another.
Therefore, we designed a kind of intelligent vehicle with path memory function, which can record path between two locations, and quickly and accurately transport the goods from the starting point to the end point without human operation.

The hardware structural design
The whole hardware design consists of 9 modules: MCU, ultrasonic ranging module, communication module, speed measuring module, motor drive module, electronic compass, CCD camera, SD card and LCD module. 3The hardware structure is shown in Fig. 1.
Fig. 1 The hardware structural design of vehicles The structural design of the search and rescue robots is shown in Fig. 1.And the followings are some of the important details about the hardware structural design.

Ultrasonic ranging module
The ultrasonic ranging module can measure the distance between the vehicle and the surrounding obstacles to prevent the vehicle from hitting them.
Moreover, when the vehicle moves near to the end point of the transport, cooperating with the camera, the ultrasonic sensor can measures the distance between the vehicle and the marker, which is set at the end point, to eliminate the position deviation caused in the transport process, so that the vehicle can reach the destination more accurately.

Optical encoder and electronic compass
The photoelectric encoder records the vehicle traveling distance, electronic compass detects the current direction of the vehicle.With the data from both sensors, we can determine the relative position between the current vehicle and the starting point, as well as the deviation between the current vehicle and the preset travel path.

CCD camera
The camera can detect the terminal markers.With the date from optical encoder and electronic compass, if the MCU identifies that the vehicle is about to reach the terminal point, the camera will look for the terminal marker in its line of sight, and determine the relative angle to the end point.According to the relative angle and relative distance, the MCU could adjust the vehicle to reach the end point more accurately.

Vehicle body structure
As shown in Fig. 2, the vehicle body has three wheels, "A" and "B" are drive wheels, "C" is a mecanum wheel.Compared with the four-wheeled vehicle, the tricycle does not require steering gear, and its cost is lower than the four-wheeled vehicle.
The MUC can control "A" and "B" with different speed to achieve pivot steering, while the fourwheel vehicle cannot do this.Therefore, in the adjustment of moving error, the three-wheeled body has a greater advantage 4 .

Vehicle forward path identification algorithm
The vehicle designed in this paper can travel along the established route that is stored in the SD card.There are two sources of the established route.One is the manual input specific data, such as the distance, steering angle, etc.The other is that the vehicle is remotely controlled to move forward.At the same time, the vehicle automatically records the path in real time 5 .Therefore, it requires the vehicle to have the ability to detect the path in real time, the detailed methods are as follows: The MCU reads the speed data from photoelectric encoders every 500ms.As we know, it is impossible that the speeds of the two drive wheels are exactly the same in the meantime.If we just integrate the average speed as vehicle's path, it will lead a large deviation.Therefore, it can be considered that in this 500ms, the P -157 vehicle moves an arc M as shown in Fig. 3.We need to figure out the line distance L in the 500ms.Where, "a" is the direction difference during the 500ms, which is measured by the electronic compass.Formula 3 can be derived from the formula 1 and 2, and the line distance L can be figured out.
Assuming that the path is shown in Fig. 4   ang ang ang (7)   From Formula 4 to 7, the direction (ang4) and the distance of the path AC can be obtained.And then use the above formula again, we can get the direction and the distance of the path AD.The rest can be done in the same manner.Finally, the straight line distance and direction of path AM can be obtained. 6he direction and the distance of a path can be stored in the SD card as ideal path to guide the vehicle moving.In addition, by calculating the path which the vehicle has traveled in real time, error between authentic path and the ideal path can be figured out.

Vehicle routing correction algorithm
When the vehicle runs autonomously without operator, its real-time position and direction can be obtained by the path identification algorithm, and the ideal forward route can be obtained from the information stored in the SD card.
As shown in Fig. 5, the straight line CD is the ideal forward route of the vehicle, the line AB is the distance deviation between the vehicle and the ideal forward route, and the ANG is the angle deviation between the vehicle and the ideal traveling direction. 7The overall deviation is obtained by Formula 8. Where, "Deviat" is the overall deviation value and is the error input of the PID algorithm.In this correction algorithm, "m" is the ratio adjustment factor of the linear deviation and the angle deviation.That is to say, when the value of m increases, the control algorithm focus much more on reducing the distance deviation.When the m decreases, the angle deviation has more affection to the control algorithm.
According to the above information, it is easily to add the PID in control algorithm. 8-158

Testing and conclusion
We obtained the following data by testing the intelligent vehicle (the test environment is cement ground).
In the 10 times of the random tests (human remote control), the vehicle travels 10m in straight line.The maximum location error for the end point is 2.7cm and the probability of error within 2 cm is 80%.
There is a probability of 90% that the steering error of turning 90 angle is in the range of 0.3.
As shown of the routes in Fig. 6, there is a probability of 90% that the error of vehicle's position in end point is less than 8cm.If adding the recognition algorithm of end point, the probability that the error that is less than 4cm will be 95%, and the probability that the vehicle does not recognize the end point is about 1.5%.It can meet the demand basically.It can realize the transportation of goods without any signs or tracks.It can be applied to a variety of indoor and outdoor occasions.Even if it transports goods in the rainy days or on dirt roads, the transportation could still be proceed very well.It can quickly change the transport path.Thus such feature is convenient for the change of plant production line.However, there are still some defects and shortcomings in this design, which mainly focus on the transport accuracy.Next, we will continue to improve the design on this aspect.
The path recognition algorithm of the design performs better on the ground and on the downhill path.The error is in the acceptable range when on dry dirt roads.However, in the potholes, or on muddy roads the performance is still not ideal.So we will continue to optimize the vehicle recognition algorithm and focus on improving the adaptability of the vehicle to the pavement with poor road conditions.

Fig. 3 .
Fig.3.The calculation of line distance L (a), and Fig.4(b) is the vehicle's actual travel path.The following is the algorithm to calculating the A-M straight-line distance and relate angle.

Fig. 4 .
Fig.4.The algorithm to calculating the travel distance