Application of Laser Sensor in Urban Vehicle Type Detection

With the development of urban transportation, more and more traffic accidents happened, most of which were caused by ultra-high vehicles, which not only damaged the road facilities, but also endangered the safety of the masses. In this study, a vehicle height detection system was designed and applied to urban transportation to prevent such accidents. The system utilized the laser light curtain principle of the laser sensor to accurately detect the height of vehicles, equipped with an optical signal anti interference system and an anti collision alarm system. The experimental results showed that the system could effectively detect the unqualified vehicles and give alarms, which provided a reference for the application of laser sensor in urban road traffic detection.


INTRODUCTION
With the development of social economy, the number of vehicles increases significantly in recent years.But there are also more and more traffic facilities, which improve road traffic efficiency and ease traffic pressure [1].However, ultra-high and wide vehicles can damage roads and even cause traffic accidents [2].To reduce such kinds of traffic accidents, laser sensors are gradually put into use because they are able to detect the height of vehicles via laser curtain [3].Many scholars have carried out relevant researches in recent years.Wang et al. [4] constructed a vehicle identification system based on piezoelectric induction and laser ranging which could acquire the height, length and width of vehicles, which was helpful in improving the authenticity and reliability of vehicle identification systems.Xin et al. [5] proposed the use of three-dimensional laser sensors and fourdimensional laser sensors to deal with dynamic detection problems.By analyzing and processing the data, the method could realize the detection and tracking of unmanned vehicles, with reliability and accuracy.In this study, a vehicle height detection system was designed, with its MC9S12DG128 single-chip microcomputer [6] design, transmitter and receiver circuit design, signal processing circuit design and anti-collision alarm system design introduced.Besides, it was applied to actual situations with accuracy, which provided references for the application of laser sensors in urban vehicle detection.

SYSTEM HARDWARE DESIGN
Vehicle detection system consists of transmitter module, receiving module and anti-collision alarm module [7].The signal processing circuit relies on the electric coupling to perform the conversion of light spots and uses the optical modulation processing method to modulate and demodulate optical signals so as to solve the problem of external light interference in the operation of the system [8].The transmitter module controls the multivibrator power supply via optocoupler and the receiving module performs data analysis on the received pulse length to calculate the height of the vehicle to be detected [9].Anti-collision alarm system consists of alarm lights, buzzers and warning signs.Once the height of a vehicle exceeds the standard range, alarms will be released.The vehicle height detection system is shown in Fig. 1.

MC9S12DG128 Single-Chip Microcomputer
In this design, the MC9S12DG128 single-chip microcomputer (Freescale Company, USA) was used to control transmitting signals and process receiving signals, with a rich command system and excellent numerical computing capacity as well as online programming ability of its memorizer.The MC9S12DG128 single-chip microcomputer consists of the following parts.
Power supply circuit.It provides stable power source for the single-chip microcomputer.
Clock circuit.It provides Quartz crystal of certain frequency to the single-chip microcomputer.
The single-chip microcomputer completes the conversion between electric levels through serial RS-485 driver circuit.
There is a reset circuit in the single-chip microcomputer which can automatically send reset signals, playing a vital role in the debugging of the singlechip microcomputer.
The BDM provides a channel for the single-chip microcomputer to download and debug procedures.
Debugging buttons and lights can be used to operate debugging operations.

Transmitting and Receiving Circuits Design
The transmitting and receiving circuits were composed of photoelectric switch, photocoupler, singlechip microcomputer, transmitting module and receiving module.

Photoelectric Switch
The radio switch which is photoelectric was selected in this study.It was mainly responsible for light transmission and reception.The light from the emitter can go directly into the receiver.When an object blocks light transmission between two emitters, the photoelectric switch will produce signals.When the object is opaque, the radio switch can effectively detect the shape of the object [10].The specific parameters of the photoelectric switch are as follows: opposite detection type; NPN output mode; 200 mA output current; 10-30 V supply voltage; laser output light source.The object was opaque with a thickness of above 30 mm.The ABS resin flame retardant was taken as the subject material.The length of cable was 2 m and can extend to above 100 m.

Photocoupler
A photocoupler is a device that uses light for signal transmission based on electric-optical-electrical conversion [11].A small flat coupler TLP181 was applied in this study, with its parameters as follows: 100 V collector -emitter voltage; 60 % current conversion rate; 100 % GB level; 3800 Vrms isolation voltage; 570 pk maximum operating isolation voltage; 6000 Vpk maximum voltage.

Transmitting and Receiving Circuits
Transmitting circuit and receiving circuit are directly connected with the single-chip microcomputer [12,18].In the transmitting module, phase method was applied to control the photoelectric switch with the single-chip microcomputer.However, due to the insufficient output voltage of the microcontroller, it is necessary to use the optocoupler to complete the voltage level conversion, which cannot only improve the anti-jamming capability of the transmitter module, but also play the role of electrical isolation.The electrical couplings mentioned above can meet the requirements of scanning speed and accuracy.In the receiving module, the photoelectric switch uses NPN as a receiver sensor, with an output voltage of 12 V.The optocoupler needs to complete the 5-12.V level conversion so that the single-chip microcomputer can successfully receive and process information.The specific circuit is shown in Fig. 2.

Laser Calibration Circuit
The laser calibration circuit is completed by laser diodes [13], which are devices that use semiconductor materials to produce stimulated emission effect [14].The laser diode used in this study is LB-00922 / DX, with its specific parameters as follows: ground wire light shape and continuous laser, with a laser wavelength of 650 and 675 mm and a laser power of between 0.5 and 0.9 mW; 2.5-12V operating voltage; <10-25 mA operating current, taking European power as standard; storage and operating temperature between −35 °C and 65 °C; <1.5-2.5 mm light panel mode.According to actual situations, these parameters can be adjusted.
As the laser has high detection sensitivity and resolution, a laser diode and an infrared receiver sensor was installed at the lowest and the highest end of the light curtain.When both two optical paths can receive the signal, the annunciator would make a noise which represented that the light curtain was aligned; otherwise, it was not.When the vehicle passes, the system will determine the height of the vehicle depending on whether the transmitting sensor is blocked or not.If the transmit sensor signal is blocked, the received signal is of a high level; otherwise, it is not.According to these signals, the vehicle height detection is completed.

Signal Processing Circuit Design
Although the laser measurement accuracy is high, strong light still has a great impact on the received signal.Many of the different frequencies of light in the daylight will be received by the signal receiver, which can interfere with signals [15].Because the light brought by the sun is continuous, we use the optical signal discrete modulation method to exclude the interference of external light on the system.The signal processing circuit is mainly composed of optical modulation module and demodulation module.
In this study, light modulation is carried out by controlling the power switch of the launch sensor and the photosensitive transistor is controlled by controlling the optocoupler with the single-chip microcomputer.Since the 555 timer multivibrator and the photoelectric transistor output channel are connected, the single-chip microcomputer can control the switch of the 555 timer so as to control the switch of the emission sensor.The demodulation circuit of the receiving sensor consists of a monostable circuit consisting of 555 and a low-pass filter.The modulated electrical signal triggers a monostable circuit and then achieves the purpose of demodulating the optical signal.

Height Measurement Algorithm
With the number of signals blocked by vehicles, the vehicle height can be calculated.The accuracy of the measurement is mainly determined by the spacing between sensors in the vertical direction.The greater the number of sensors, the higher the measurement accuracy.During signal processing, dynamic monitoring of vehicles and irregular objects is realized according to whether the vehicles pass by completely.The signal processing control program flow is as follows in Fig. 3.
When a vehicle passes by the sensors, the system can judge the height of it.The calculation formula is as follows: where H refers to the maximum vehicle height, h refers to the height of the sensor at the highest position, a refers to the spacing between sensors, n refers to the number of the sensor at the highest position.H determines the maximum error value of the vehicle.

Alarming System
The alarming system in this study was composed of alarm lights, buzzer and alarm screen.When an ultra-high vehicle appeared, the alarm system would start working, with the alarm light shining, the buzzer releasing alarming sounds and the screen displaying the message.In this way, the driver could know that his vehicle cannot pass and would turn to choose another path.

ACTUAL APPLICATION
To prevent traffic accidents caused by the height of vehicles, the traffic department has already installed height limitation poles at road junctions, which, however, does not work well because the drivers cannot realize that their cars have exceeded the maximum height until they collide with the poles.At that moment, the traffic accidents have happened.The laser sensor which can detect the height of vehicles was applied to reality.

System Practicability Test
Under an interchange in Zhengjiang, drivers cannot know whether the heights of their vehicles exceed 3 m while driving though there is a definite traffic mark which designates the height limitation of the interchange is 3 m.As a result, traffic accidents caused by the height still happen, which brings great loss and large threaten to the security of people.
We installed the detection system at 250 m away from the highway interchange and set the sensing height of sensors to be 3 m.In this way, the drivers of vehicles with a height of above 3 m can be informed that their cars exceed the maximum height via the screen and have adequate time to park their cars in safe positions.The designed system is easy for operation and can make accurate alarms, which greatly reduced risks of traffic accidents and protected the integrity of transport facilities.Figure 4 shows the vehicle height detection system.
Figure 4 The vehicle height detection system

Accident Rates before and after the Application of the Detection System
The occurrence of traffic accidents at the interchange was observed at four time periods, i.e. 7 am to 8 am, 12 am to 13 pm, 17 pm to 18 pm and 23 pm to 24 pm.The number of traffic accidents from April 2016 to October 2016 when the system has not been installed and from November 2016 to May 2017 when the system has been installed was compared.The comparison is shown in Tab. 1.As shown in Tab. 1, there were 27 traffic accidents induced by overspeed and 18 traffic accidents induced by overheight at the interchange before the application of the system, but the number of accidents significantly reduced after the application of the system (p< 0.05).Overspeed induced traffic accidents mainly happened between 7 am and 8 am and between 23 pm and 24 pm.The time period from 7 am to 8 am is the morning rush hour, and drivers drive fast to race against time.Moreover, few vehicles are on the road and drivers are usually tired between 23 pm to 24 pm.Traffic accidents induced by overheight mainly happened between 12 am and 13 am and between 23 pm and 24 pm because drivers are so tired that they cannot perceive the height of their vehicles.When over-high vehicles passed the sensors, the system would release alarms to remind them to detour or reduce the height.But two accidents happened after the application of the system.It was because the drivers continued to drive on regardless of the alarm.The number of overspeed induced traffic accidents also reduced, which might be because drivers subconsciously slowed down after seeing the height detection system and wanted to have more reaction time if their vehicles exceeded the specified height.

DISCUSSION
Usually, there are height limitation warning boards on highway interchanges to prevent traffic accidents of ultrahigh vehicles [16].Nevertheless, the drivers themselves are not aware of whether their vehicles exceed the maximum height, which causes the occurrence of accidents.For example, a full-loaded bus hit the top of a railway culvert in Gaoxiong, Taiwan on the 4 th , February, 2017 because the driver wrongly estimated the height of his vehicle and the pier during driving.Three people had severe injuries, and 18 people had mild injuries.Some warning boards are often ignored by drivers, and the detection system can timely alarm the drivers if overheight is discovered.Vehicle overheight alarm system designed based on laser sensors has a high accuracy due to its weak light scatting [17].In actual measurement, the height of a vehicle can be precisely calculated by calculating shaded laser signals from top to bottom, and the arrangement of multiple sensors can realize the dynamic passing of vehicles and irregular objects.Once the height of a vehicle exceeded the standard height, the system will release buzzing, open warning lamp, and display the alarm on the screen.The practicability of the system has been verified.Moreover, it was found that there were many overheight induced traffic accidents between 23 pm and 24 pm, and accidents greatly reduced after the application of the system.

CONCLUSION
In conclusion, a vehicle height detection system was designed to reduce traffic accidents induced by overheight of vehicles and great loss of life and property.The experiment showed that laser sensors had high accuracy in detecting vehicle height and could be applied in urban vehicle detection to prevent traffic accidents and it could warn drivers if the height of their vehicle exceeded the standard.The system could intuitionally inform drivers of the problem of overheight.In actual application, the detection will last for a long time if the speed of vehicles is high.The problem needs to be further studied in the future.

Figure 1
Figure 1 Vehicle height detection system

Figure 2
Figure 2 Transmitting module circuit (upper) and receiving module circuit (lower)

Figure 3
Figure 3 Signal processing control program flow

Table 1
Number of accidents before and after the application of the detection system