Application of ultrasonic ranging and embedded SPT-K controller in automobile automatic braking system[Copy link]
0. Introduction Nowadays, while people enjoy the fun of driving, they pay more attention to the safety of cars. Many "rear-end" accidents are related to improper distance maintenance. In order to solve the safety problem under low visibility, we designed a system based on the principle of ultrasonic ranging and used the SPT-K controller to achieve the function of automatic alarm and automatic braking of the vehicle when the distance between the front and rear vehicles is less than the safe distance and poses a threat to the safety of people and vehicles during driving, so as to reduce the occurrence of traffic accidents. 1. Principle of ultrasonic ranging The frequency of sound that people can hear is: 20Hz~20kHz, which is audible sound wave. Sound beyond this frequency range, that is, sound below 20Hz is called low-frequency sound wave, and sound above 20kHz is called ultrasonic wave. Ultrasonic wave propagates in a straight line. The higher the frequency, the weaker the diffraction ability, but the stronger the reflection ability. For this reason, ultrasonic sensors can be made by using this property of ultrasonic wave. In addition, the propagation speed of ultrasonic wave in air is relatively slow, which is 340m/s, which makes the use of ultrasonic sensor very simple. We choose piezoelectric ultrasonic sensor. The probe is usually made of piezoelectric crystals and piezoelectric ceramics, and it works by using the piezoelectric effect of piezoelectric materials. The inverse piezoelectric effect converts high-frequency electrical vibrations into high-frequency mechanical vibrations, thereby generating ultrasonic waves, which can be used as a transmitting probe; while the direct piezoelectric effect converts ultrasonic vibration waves into electrical signals, which can be used as a receiving probe. As shown in Figure 1, the measured distance is:
2. Functional characteristics of SPT-K controller As the working environment of automobiles is very harsh, the stability and reliability of hardware are very high. Considering the scalability of the device, we chose the embedded system SPT-K controller imported from Finland by Shanghai Pine Technology Co., Ltd. This controller can work in long-term harsh environments (high vibration shock, low temperature, high temperature, drastic temperature changes and high humidity, etc.). It is a high-performance mechanical special controller that integrates programmable logic controller, proportional amplifier, analog input A/D module and relay output functions. The SPT-K controller has the following characteristics: 1. It replaces the proportional amplifier/circuit of traditional electro-hydraulic control and can drive 12 electro-hydraulic proportional valves at the same time, which has an absolute advantage in the design cost of hydraulic systems. 2. It has a large current output port (0~3A) to replace the relay in the traditional circuit. 3. The analog input port of the controller has the ability to process different signals. Whether it is a resistance signal, a current signal or a voltage signal, it can be collected and set using software programming. 4. The logic control function of the controller can easily complete the logical and mathematical operations that were difficult to solve with various relays and modules before. 5. The controller uses several 16-bit high-performance microprocessors and large-capacity memory space inside, which makes it have extremely strong digital processing capabilities. It can complete many complex algorithms that must be programmed by computer high-level languages before, such as straight-line correction multi-PID control, engine oil pump compound control, attitude fuzzy control, automatic driving, etc. 6. The controller is a product developed based on CANBUS, bus. When there are many system nodes or the signal transmission distance is far, more than one controller can be used for networking, saving wiring, improving reliability, and greatly enhancing flexibility and scalability. From the above characteristics, it can be seen that the use of SPT-K controller in the ultrasonic automobile automatic braking system simplifies the system circuit and facilitates design and maintenance. In addition, the reliability of SPT-K controller hardware is far superior to similar products, so that it has extremely high reliability and greatly reduces the failure rate regardless of the extreme cold of the snowfield in Northeast China or the tropical rainforest in Southeast Asia. 3. Overall system design 3.1 System hardware block diagram The hardware block diagram of the entire system is shown in Figure 2. The circuit function modules that constitute the ultrasonic ranging system include the transmitting circuit, the receiving circuit, the keyboard display circuit, the core function module SPT-K controller and some auxiliary circuits. There are two advantages to separating the transmission and reception: first, the transmission and reception signals will not be mixed, and the receiving probe receives pure reflected signals; second, placing the receiving probe in a suitable position can avoid various losses and interferences caused by the reflection of ultrasonic waves on the surface of objects, thereby improving the reliability of the system.
3.2 System Software Design SPT-K controller uses European universal IECll31-1 language programming, multiple languages are optional, easy to learn, readable, can be downloaded numerous times on site by FLASHING, program can be changed through EPROM parameters without re-downloading or modifying the program, usually completed using the vehicle-mounted display, very convenient. The software design flow chart is shown in Figure 3.
Since the conditions on the highway and in the city are different, if we only select the alarm and brake parameters according to these two conditions, so that the vehicle will alarm only when the distance with the front car is shortened to 2m in the city, it is possible that the vehicle is moving very fast, while the front car is stationary or moving very slowly, and even braking cannot avoid the occurrence of a car accident. Therefore, when setting the alarm and brake parameters, we consider the influence of the speed on the distance from braking to stopping, and set the parameters according to a certain algorithm to ensure the absolute safety of the vehicle. 4. System design optimization 4.1 Improve the range of distance measurement Since the absorption of ultrasonic waves by air is proportional to the frequency of ultrasonic waves, the frequency of ultrasonic waves used for distance measurement cannot be very high. On the other hand, the lower the frequency and the longer the wavelength, the greater the absolute error of the measurement. Therefore, the range of 40Kz ultrasonic single-frequency distance measurement is only 5~6 meters, which cannot meet our requirements. In order to solve the contradiction between the measurement range and the measurement accuracy, we adopt the dual-frequency distance measurement method. The distance measurement principle is: the controller now sends out a string of ultrasonic waves with a frequency of fH, the string length can have 10~16 complete waveforms, and then sends out 4~8fL low-frequency ultrasonic waves. This two-frequency ultrasonic wave that is continuous in the time domain is reflected by the target in front and forms an echo. The echo forms echo pulses EchoH and EchoL through the receiver. Since the high-frequency sound wave is emitted first, for the same target, its echo EchoH reaches the CPU first. Therefore, for closer targets, high-frequency ultrasonic waves are used for detection first. When the target is far away, the high-frequency ultrasonic wave is absorbed by the air and greatly attenuated, and only the low-frequency ultrasonic wave EchoL is received in the echo by the receiver. Since the device does not require high accuracy at a long distance, EchoL can be used for detection.
4.2 The impact of the transmitter probe on the receiver probe The time interval from the transmission to the reception of the ultrasonic wave is completed by the timer inside the controller. Since the distance between the transmitter probe and the receiver probe is not large, some waves are directly diffracted to the receiver without passing through the object under test, causing direct crosstalk between the transmitting part and the receiving part. This interference problem can be programmed through software so that the controller does not read the receiver's signal from the start of transmission to the end of the "false reflection wave". In this way, interference is effectively avoided, but on the other hand, a 20cm "blind zone" is formed. This "blind zone" is very small and has no effect on this system. 4.3 Temperature compensation Because the propagation speed of ultrasonic waves:
In the formula: T-the ambient temperature of the ultrasonic wave. Therefore, a temperature sensor needs to be placed next to the two ultrasonic probes to measure the ambient temperature T, which is then corrected by the processor. 5. Conclusion This system has the advantages of simple hardware, easy implementation, large ranging range, high sensitivity, and good reliability, and has high application value.