This system takes mcf52255 as the core processor, detects the signal of the traverse through the electromagnetic sensor, first processes the detected signal, obtains the road characteristic through the algorithm, then carries on the differential control and the steering control to the wheel through the PID algorithm, enables the intelligent vehicle to move along the traverse smoothly and quickly. The intelligent vehicle system includes inductance acquisition module, signal processing module, path identification algorithm module, PID algorithm module and so on. The main frequency of mcf52255 is 80MHz.
There are 512K Flash ROM and 64K SRAM, 8-channel 12-bit A/D conversion module, 4-channel DMA module, 4 32-bit D TIM module and PWM module. There are also 3 UART modules, 2 IIC modules and QSPI modules. UART module is very convenient for data acquisition and debugging of intelligent vehicle system. The system detects the electromagnetic signals around the conductor through the acquisition module.
Firstly, the acquisition module filters and amplifies the collected signals. Secondly, the road characteristics are obtained by the digital-analog conversion and algorithm analysis of the acquisition signals through mcf52255.
Then, the PWM wave is output by the PID algorithm to control the differential speed and steering of the wheel. The intelligent vehicle can move along the wire smoothly and quickly. The acquisition module of electromagnetic sensor is composed of LC resonant circuit composed of inductance and capacitance and AD8032 operational amplifier.
It is the information source of intelligent vehicle system. The LC resonant circuit composed of inductance and capacitance collects and filters the electromagnetic signals around the conductor, then amplifies the signals through AD8032 amplifier, and then sends them to the control chip for processing. Considering the actual road conditions are straight, curved, cross bend, right angle, so the position of the sensor is determined by these road conditions. So after analysis and experiment, the sensor is placed symmetrically, three left and three left, four middle horizontal, the two outermost sensors are offset inward at a certain angle, thermostatic element and two vertical sensors are placed in front. Four horizontal symmetrical sensors in the middle can judge the straight road condition; the two outermost sensors inclined inward at a certain angle can judge the bend in advance, so that the intelligent vehicle can make a prediction, to a certain extent, improve the accuracy of the intelligent vehicle turning; the first two vertical sensors are used to judge the cross-bend road condition. Digital detection. By digitalizing the data collected by the acquisition module through the AD conversion module of the controller, the road condition can be judged according to the value of the digital quantity, so as to meet the requirements of autonomous patrol. However, this method is not very stable for path identification, and it is easy to make misjudgments. When the conductor current is unstable, the digital quantity will be greatly disturbed and fluctuated, leading to its inability to correctly identify the road conditions, thus making misjudgments.
In order to improve the path recognition ability of intelligent vehicle system, only the number of sensors can be increased to solve the problem, but there are too many sensors, and the interference between them will be very large, and the system will also make misjudgments. So abandon this method and choose the following analog detection method. Simulated detection method. Firstly, the signal value collected by the acquisition module is converted into a reasonable AD value through the AD conversion module of mcf52255. Then the maximum and minimum values of the track are collected by each sensor, and the relative values of each sensor are obtained through certain formulas. Finally, the road condition is judged by this, which is the normalized processing of the signal. Compared with the above method, this method is more sensitive to road condition discrimination and has lower misjudgment rate. Moreover, the influence on the change of current in the conductor is reduced by normalization, which can improve the stability of the intelligent vehicle. Path recognition is the analysis and judgment of the signal output from the signal processing module. It is the soul of the intelligent car. It is the key module of whether the car can complete autonomous tracking steadily and smoothly. A good path recognition algorithm module can make the intelligent vehicle track steadily and smoothly, and has certain adaptability. Because the magnitude and direction of magnetic induction are different in different locations around the wire, the induced electromotive force produced by sensors in different locations is also different. Therefore, the position of inductance can be judged according to the values collected by sensors, and because the distribution of inductance in the smart car is known and fixed, the position of the smart car deviating from the wire can be judged accordingly, so that the smart car can correct the direction in time by controlling the steering gear.
In the case of straight wire, because the left inductance and the right inductance are symmetrically distributed, the left inductance and the right inductance are almost the same, then the intelligent vehicle is controlled to run along the straight line.
If the inductance on the left side is subtracted from the inductance on the right side of the conductor when the difference is positive, it means that the smart car has deviated from the straight line and turned to the left side, and the bigger the difference is, the bigger the angle of deviation of the smart car is; similarly, if the inductance on the right side is subtracted from the inductance on the left side, the difference is positive.
The larger the difference, the larger the deviation angle. The PID controller consists of proportional unit (P), integral unit (I) and differential unit (D). PID is a closed-loop control algorithm. Therefore, if you want to implement the PID algorithm, you must have a closed-loop control module to give feedback information on the hardware. In the intelligent vehicle system, the speed of the motor of the intelligent vehicle needs to be returned, so it is necessary to install an encoder on the intelligent vehicle to measure the speed of the intelligent vehicle and feedback the results. Proportional unit (P) is the current deviation e (t) of the reaction system. When the coefficient P increases in a certain range, it can speed up the adjustment and reduce the error, but if it is too large, the stability of the system will decrease. Integral unit (I) is the cumulative deviation of the reaction system. It can eliminate the steady-state error of the system and minimize the error as much as possible. When there are errors, the integral adjustment will proceed until the error is eliminated. Differential element (D) is the rate of variation e (t) – e (t – 1) of the deviation signal of the reaction system. It can predict the trend of deviation change and can be controlled in advance. It has been eliminated by differential action before the deviation has been formed, so it can improve the dynamic performance of the system. However, the differential effect can amplify the noise.
If the differential effect is too large, the system will be greatly disturbed. Generally speaking, when designing a smart car system, first of all, we should choose a core processor which is powerful and familiar with itself.
Secondly, it is necessary to clarify the principle that intelligent vehicles can track independently, and clarify the principle will be of great help to the future programming and debugging. Next is the design of various hardware modules of the smart car. Finally, the program is written and debugged, and the program needs to process the signal first, then compile the path recognition module according to the principle of tracing, and then debug the program until the intelligent vehicle can track smoothly and quickly.