CN103761882B - A kind of automatic cross crossroads traffic light control device and application - Google Patents
A kind of automatic cross crossroads traffic light control device and application Download PDFInfo
- Publication number
- CN103761882B CN103761882B CN201310579112.2A CN201310579112A CN103761882B CN 103761882 B CN103761882 B CN 103761882B CN 201310579112 A CN201310579112 A CN 201310579112A CN 103761882 B CN103761882 B CN 103761882B
- Authority
- CN
- China
- Prior art keywords
- intersection
- digital computer
- traffic
- module
- program digital
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Traffic Control Systems (AREA)
Abstract
本发明公开了一种自动十字路口红绿灯控制装置及应用。装置由输入设备—矩阵键盘模块3、输出设备4、传感设备1和存储程序数字计算机2构成。它相应于数字计算机所存储的程序控制信号运行,以感知十字路口的通堵状态进而控制十字路口红绿灯的状态。控制程序按照事先约定的流程根据各个参数和系统的传感设备传送的数据完成交通灯的控制。本发明的有益效果:本发明所述的根据存储程序数字计算机控制的十字路口红绿灯装置在以上述方式运行时将会使十字路口获得最佳的流畅度,同时提高了十字路口的通车效率。
The invention discloses an automatic crossroad traffic light control device and its application. The device is composed of an input device—a matrix keyboard module 3 , an output device 4 , a sensing device 1 and a stored program digital computer 2 . It operates corresponding to the program control signal stored in the digital computer to sense the congestion status of the intersection and then control the status of the traffic lights at the intersection. The control program completes the control of the traffic light according to the agreed flow according to the parameters and the data transmitted by the sensor equipment of the system. Beneficial effects of the present invention: the crossroad traffic light device controlled by a stored program digital computer according to the present invention will enable the crossroad to obtain the best smoothness and improve the traffic efficiency of the crossroad when operating in the above-mentioned manner.
Description
技术领域technical field
本发明涉及一种十字路口红绿灯控制系统,特别涉及一种自动十字路口红绿灯控制装置及应用。The invention relates to a traffic light control system at a crossroad, in particular to an automatic traffic light control device at a crossroad and its application.
背景技术Background technique
随着我国汽车保有量的增多,道路的交通流量逐日增加,交叉路口的压力日益增大,确保交通顺畅和交通安全就越来越显得重要。十字路口堵车是一种典型的交通拥堵。往往开始时路口中心区域出现小堵(也可能路口上其中一路汽车未完全通过),但由于传统交通灯红绿定时交替变化,导致各路汽车相继驶入堵车区域,最终形成汽车纵横交错的严重交通堵塞。With the increase of the number of cars in our country, the traffic flow on the road is increasing day by day, and the pressure on the intersection is increasing day by day. It is becoming more and more important to ensure smooth traffic and traffic safety. Traffic jam at intersection is a typical traffic jam. Often there is a small blockage in the central area of the intersection at the beginning (maybe one of the cars on the intersection does not pass completely), but due to the regular alternation of red and green traffic lights in traditional traffic lights, all cars enter the traffic jam area one after another, eventually forming a serious traffic jam. Traffic jam.
发明内容Contents of the invention
本发明的主要目的是提供一种自动十字路口红绿灯控制装置,用以克服传统十字路口红绿灯的固有缺陷。该装置的基本原理如下,当在十字路口发生局部堵塞的时候,该十字路口的各方向的交通灯都亮红灯,禁止各方向来的汽车进入十字路口内,就能使已被堵在十字路口内的汽车自行地离开,从而避免长时间的严重交通堵塞。当堵车消失后,该十字路口各方向的交通灯都能即刻恢复常态。以达到缓解十字路口严重交通堵塞的目的。The main purpose of the present invention is to provide an automatic crossroad traffic light control device to overcome the inherent defects of traditional crossroad traffic lights. The basic principle of the device is as follows. When a partial blockage occurs at a crossroad, the traffic lights in all directions of the crossroad are all red, and cars coming from all directions are prohibited from entering the crossroad, so that the traffic lights that have been blocked in the crossroad can be prevented. The cars leave on their own, thus avoiding long periods of severe traffic jams. When the traffic jam disappears, the traffic lights in all directions at the intersection can immediately return to normal. In order to achieve the purpose of alleviating serious traffic jams at intersections.
本发明解决上述技术问题的技术方案如下:The technical scheme that the present invention solves the problems of the technologies described above is as follows:
1.一种自动十字路口红绿灯控制装置由输入设备—矩阵键盘模块3、输出设备4、传感设备1和存储程序数字计算机2构成。1. A kind of automatic intersection traffic light control device is made of input device-matrix keyboard module 3, output device 4, sensing device 1 and stored program digital computer 2.
1)所述存储程序数字计算机2用于存储该系统所需要的参数,并处理所有输入设备和传感设备采集的信息,它由中央处理单元(CPU)2-1、电可擦除只读存储器(EEPROM)2-2、随机存取存储器(RAM)2-3、有I、II、III、IV、V五个端口的输入输出端口(I/O)2-4和闪存(FLASH)2-5构成,电可擦除只读存储器(EEPROM)2-2、随机存取存储器(RAM)2-3、输入输出端口(I/O)2-4和闪存(FLASH)2-5分别与中央处理单元(CPU)2-1连接,中央处理单元(CPU)2-1由算数/逻辑单元(ALU)2-1-1,控制及定时电路2-1-3,随机存取存储器(RAM)2-1-2构成,算数/逻辑单元(ALU)2-1-1与随机存取存储器(RAM)2-1-2连接后二者分别与控制及定时电路2-1-3连接。1) The stored-program digital computer 2 is used to store the parameters required by the system and process information collected by all input devices and sensor devices. It consists of a central processing unit (CPU) 2-1, an electrically erasable read-only Memory (EEPROM) 2-2, random access memory (RAM) 2-3, input and output ports (I/O) 2-4 with five ports I, II, III, IV, V, and flash memory (FLASH) 2 -5 composition, electrically erasable read-only memory (EEPROM) 2-2, random access memory (RAM) 2-3, input and output ports (I/O) 2-4 and flash memory (FLASH) 2-5 respectively The central processing unit (CPU) 2-1 is connected, and the central processing unit (CPU) 2-1 is composed of arithmetic/logic unit (ALU) 2-1-1, control and timing circuit 2-1-3, random access memory (RAM ) 2-1-2, the arithmetic/logic unit (ALU) 2-1-1 is connected to the random access memory (RAM) 2-1-2, and the two are respectively connected to the control and timing circuit 2-1-3.
所述输出设备4用于显示整个系统参数和整个系统运行状态,由LCD显示模块4-1和红绿指示灯和控制电路模块4-2组成。The output device 4 is used to display the parameters of the entire system and the operating status of the entire system, and is composed of an LCD display module 4-1, red and green indicator lights and a control circuit module 4-2.
所述传感设备1用于获取所监测十字路口的通堵状态信息,并对这些信息进行处理后传送给存储程序数字计算机2,由摄像头1-1、视频输入与解码芯片1-2和超声波模块1-3组成。The sensing device 1 is used to obtain traffic and blockage status information of the monitored crossroads, and transmit the information to the stored-program digital computer 2 after processing the information. The camera 1-1, the video input and decoding chip 1-2 and the ultrasonic Modules 1-3 are composed.
2)所述传感设备1的摄像头1-1与视频输入与解码芯片1-2连接,视频输入与解码芯片1-2与存储程序数字计算机2的输入端口I连接,传感设备1的超声波模块1-3与存储程序数字计算机2的输入端口II连接;矩阵键盘模块3与存储程序数字计算机2的输入端口III连接;存储程序数字计算机2的输出端口IV与输出设备4的LCD显示模块4-1连接,存储程序数字计算机2的输出端口V与输出设备4的控制电路模块4-2连接。2) The camera 1-1 of the sensing device 1 is connected to the video input and decoding chip 1-2, and the video input and decoding chip 1-2 is connected to the input port I of the stored program digital computer 2, and the ultrasonic wave of the sensing device 1 Modules 1-3 are connected with the input port II of the stored program digital computer 2; the matrix keyboard module 3 is connected with the input port III of the stored program digital computer 2; the output port IV of the stored program digital computer 2 is connected with the LCD display module 4 of the output device 4 -1 connection, the output port V of the stored program digital computer 2 is connected to the control circuit module 4-2 of the output device 4.
上述存储程序数字计算机是依据传感设备摄像头1-1所采集的当前外部环境亮度来动态计算图像帧差阈值。The stored-program digital computer dynamically calculates the image frame difference threshold based on the current external environment brightness collected by the sensor device camera 1-1.
上述存储程序数字计算机包括一个存储程序数字计算机,该存储程序数字计算机除存储动态计算图像帧差阈值的程序和十字路口状态判断程序外,还允许存储更进一步操作的程序。The above-mentioned stored-program digital computer includes a stored-program digital computer. In addition to storing the program for dynamically calculating the image frame difference threshold value and the intersection state judgment program, the stored-program digital computer is also allowed to store a program for further operations.
2.为提供可靠的红绿灯状态控制,并同时尽量提高红绿灯的响应的及时度,上述存储程序数字计算机执行如下步骤:2. In order to provide reliable traffic light state control and improve the timeliness of the traffic light response as much as possible, the above-mentioned stored-program digital computer performs the following steps:
1)需要为图像帧差法选取一个合适的阈值,首先,摄像头1-1进行100帧图像取样后,取出每一帧的亮度值累加后求平均。这样就取得了此时外部环境平均亮度值。然后根据平均亮度值亮度和早中晚参考亮度值TM、TA、TN计算当前图像帧差阈值。1) It is necessary to select an appropriate threshold for the image frame difference method. First, after the camera 1-1 samples 100 frames of images, the luminance values of each frame are taken out and accumulated and then averaged. In this way, the average brightness value of the external environment at this time is obtained. Then calculate the frame difference threshold of the current image according to the average brightness value brightness and the early, middle and late reference brightness values TM, TA, TN.
2)提高红绿灯响应的及时度,避免了误判的发生,首先存储程序数字计算机会读取操作者预先设定的防误判的重复采样次数N,然后进行每次十字路口交通状态判断后,对该重复采样次数进行减1操作,并判断该值是否到0,如果到0,直接退出本轮判断,如果不为0,继续进行下一次判断。直到某种十字路口状态达到了3/4N。然后,再结合超声波模块获取的车辆高度值来决定这个状态是否有效。2) Improving the timeliness of traffic light response and avoiding the occurrence of misjudgment. Firstly, the stored program digital computer will read the repeated sampling times N preset by the operator to prevent misjudgment, and then after each intersection traffic state judgment, Subtract 1 from the number of repeated sampling times, and judge whether the value reaches 0. If it reaches 0, exit the current round of judgment directly. If it is not 0, continue to the next judgment. Until some kind of intersection state reaches 3/4N. Then, combined with the vehicle height value obtained by the ultrasonic module to determine whether this state is valid.
3.一种自动十字路口红绿灯控制装置的应用,在十字路口发生局部堵塞的时候,该十字路口的各方向的交通灯都亮红灯,禁止各方向来的汽车进入十字路口内,就能使已被堵在十字路口内的汽车自行地离开,从而避免长时间的严重交通堵塞,当堵车消失后,该十字路口各方向的交通灯都能即刻恢复常态,以达到缓解十字路口严重交通堵塞的目的;在中央处理单元(CPU)2-1读取完电可擦除只读存储器(EEPROM)2-2中所保存的系统参数后。系统进入真正的十字路口红绿灯控制状态。此时,摄像头1-1和超声波模块1-3都对准了十字路口的重叠区域。考虑下面三种情况:3. The application of an automatic crossroad traffic light control device. When a partial blockage occurs at the crossroad, the traffic lights in all directions of the crossroad are all red, and cars coming from all directions are prohibited from entering the crossroad. The cars blocked in the intersection leave on their own, thereby avoiding long-term serious traffic jams. When the traffic jam disappears, the traffic lights in all directions of the intersection can immediately return to normal, so as to achieve the purpose of alleviating the serious traffic jam at the intersection; After the central processing unit (CPU) 2-1 finishes reading the system parameters stored in the electrically erasable read-only memory (EEPROM) 2-2. The system enters the real intersection traffic light control state. At this time, both the camera 1-1 and the ultrasonic module 1-3 are aimed at the overlapping area of the intersection. Consider the following three situations:
1)道路空旷,没有车通过,此时,摄像头1-1获取的前后两帧图像的亮度分量之间几乎没有差别,在使用帧差算法对两帧图像的亮度分量进行累加后相减,所得到的值必然会远远小于图像帧差阈值,然后,中央处理单元(CPU)(2-1)继续读取超声波模块(1-3)测得的距离值,因为此时道路上没有任何车通过,超声波模块(1-3)所测量到的值必然就是超声波模块(1-3)相对于路面的架设高度,所以,此时中央处理单元(CPU)(2-1)控制红绿指示灯控制电路模块(4-2)进行正常运转,即间隔一定的时间红绿灯强制进行切换;1) The road is empty and there is no car passing by. At this time, there is almost no difference between the brightness components of the two frames of images captured by camera 1-1. The brightness components of the two frames of images are accumulated and subtracted using the frame difference algorithm, so The obtained value must be much smaller than the image frame difference threshold, and then the central processing unit (CPU) (2-1) continues to read the distance value measured by the ultrasonic module (1-3), because there is no car on the road at this time. Through, the value measured by the ultrasonic module (1-3) must be the erection height of the ultrasonic module (1-3) relative to the road surface, so at this time, the central processing unit (CPU) (2-1) controls the red and green indicator lights The control circuit module (4-2) performs normal operation, that is, the traffic lights are forced to switch at regular intervals;
2)道路有车通过,但是不发生拥堵,此时,由于十字路口下车的移动,摄像头(1-1)获取的前后两帧图像的亮度分量必然存在较大的差别,在使用帧差法对两帧图像的亮度分量进行累加后相减,所得到的值必然会大于图像帧差阈值,在这种情况下,存储程序数字计算机(2)直接判定十字路口车流通畅,没有发生任何拥堵,而不会去读取超声波模块(1-3)的测距值,所以,此时存储程序数字计算机(2)控制红绿指示灯控制电路模块(4-2)进行正常运转,即间隔一定的时间红绿灯进行强制切换;2) There are cars passing by on the road, but there is no congestion. At this time, due to the movement of getting off the car at the intersection, there must be a large difference in the brightness components of the two frames of images captured by the camera (1-1). When using the frame difference method The luminance components of the two frames of images are accumulated and then subtracted, and the obtained value must be greater than the image frame difference threshold. In this case, the stored program digital computer (2) directly determines that the traffic flow at the intersection is smooth and no congestion occurs. And can not go to read the ranging value of ultrasonic module (1-3), so this moment, stored program digital computer (2) controls red and green indicator light control circuit module (4-2) to carry out normal operation, promptly interval certain Time traffic lights are forced to switch;
3)道路有车通过,但是在十字路口发生了拥堵,此时,由于十字路口下面的车停止不动,摄像头(1-1)获取的前后两帧图像的亮度分量几乎没有差别,在使用帧差算法对两帧图像的亮度分量进行累加后相减,所得到的值必然远小于图像帧差阈值,然后,存储程序数字计算机(2)继续读取超声波模块(1-3)测得的距离值,因为此时十字路口处发生了拥堵,超声波模块(1-3)所测量到的值必然就是超声波模块(1-3)相对于路面架设的高度减去车辆的高度,所以,此时存储程序数字计算机(2)控制红绿指示灯和控制模块(4-2)强制亮起红灯,禁止各方向来的汽车进入十字路口内,使已被堵在十字路口内的汽车自行地离开,当堵车消失后,该十字路口各方向的红绿灯都能即刻恢复常态。3) There are cars passing by on the road, but congestion occurs at the intersection. At this time, because the cars below the intersection are stationary, there is almost no difference in the brightness components of the two frames of images captured by the camera (1-1). The difference algorithm accumulates and subtracts the brightness components of the two frames of images, and the obtained value must be much smaller than the image frame difference threshold. Then, the stored-program digital computer (2) continues to read the distance measured by the ultrasonic module (1-3) value, because there is congestion at the crossroads at this time, the value measured by the ultrasonic module (1-3) must be the height of the ultrasonic module (1-3) relative to the road surface minus the height of the vehicle, so at this time, store The program digital computer (2) controls the traffic lights and the control module (4-2) to forcibly turn on the red light, and prohibits the cars coming from all directions from entering the intersection, so that the cars that have been blocked in the intersection will leave automatically. After disappearing, the traffic lights in all directions at the intersection can immediately return to normal.
本发明的有益效果:本发明所述的根据存储程序数字计算机控制的十字路口红绿灯装置在以上述方式运行时将会使十字路口获得最佳的流畅度,同时提高了十字路口的通车效率。Beneficial effects of the present invention: the crossroad traffic light device controlled by a stored program digital computer according to the present invention will make the crossroad obtain the best fluency when operating in the above-mentioned manner, and improve the traffic efficiency of the crossroad at the same time.
附图说明Description of drawings
图1是本发明的结构示意图。Fig. 1 is a structural schematic diagram of the present invention.
图中,传感设备1、存储程序数字计算机2、矩阵键盘模块3、输出设备4、摄像头1-1、视频输入与解码芯片1-2、超声波模块1-3、LCD显示模块4-1、红绿指示灯和控制电路模块4-2。In the figure, sensor device 1, stored program digital computer 2, matrix keyboard module 3, output device 4, camera 1-1, video input and decoding chip 1-2, ultrasonic module 1-3, LCD display module 4-1, Red and green indicator lights and control circuit module 4-2.
图2是存储程序数字计算机结构示意图。Figure 2 is a schematic diagram of the structure of a stored-program digital computer.
图中,存储程序数字计算机2、中央处理单元(CPU)2-1、电可擦除只读存储器(EEPROM)2-2、随机存取存储器(RAM)2-3、输入输出端口(I/O)2-4、闪存(FLASH)2-5。In the figure, stored program digital computer 2, central processing unit (CPU) 2-1, electrically erasable read-only memory (EEPROM) 2-2, random access memory (RAM) 2-3, input and output ports (I/ O) 2-4, flash memory (FLASH) 2-5.
图3是存储程序数字计算机中央处理单元(CPU)2-1结构示意图。Fig. 3 is a schematic diagram of the structure of the stored-program digital computer central processing unit (CPU) 2-1.
图中,算数/逻辑单元(ALU)2-1-1,控制及定时电路2-1-3,随机存取存储器(RAM)2-1-2。In the figure, arithmetic/logic unit (ALU) 2-1-1, control and timing circuit 2-1-3, random access memory (RAM) 2-1-2.
图4是本发明最佳实施例的结构示意图。Fig. 4 is a schematic structural diagram of a preferred embodiment of the present invention.
图中,存储程序数字计算机2、传感设备1、摄像头1-1、视频输入与解码芯片1-2、超声波模块1-3、矩阵键盘模块3、LCD显示模块4-1、红绿灯控制接口5、交通灯6、采集的数据7。In the figure, stored program digital computer 2, sensing device 1, camera 1-1, video input and decoding chip 1-2, ultrasonic module 1-3, matrix keyboard module 3, LCD display module 4-1, traffic light control interface 5 , traffic light 6, collected data 7.
图5是本发明的一个整体算法控制程序流程图。Fig. 5 is a flow chart of an overall algorithm control program of the present invention.
图6是本发明的一个自适应算法控制程序流程图。Fig. 6 is a flowchart of an adaptive algorithm control program of the present invention.
图7是本发明的堵车、畅通有效判断算法控制程序流程图。Fig. 7 is a flow chart of the control program of the effective judging algorithm of traffic jam and smooth flow in the present invention.
具体实施方式detailed description
下面结合附图和实施对本发明作进一步描述。The present invention will be further described below in conjunction with drawings and implementation.
本发明是以十字路口红绿灯控制装置的存储程序数字计算机控制系统进行构思的,从而减少了人工对十字路口交通堵塞的干预。当然首先要提供的是可靠的红绿灯状态控制,并同时尽量提高红绿灯的响应的及时度。The present invention is conceived on the basis of a stored-program digital computer control system of a traffic light control device at a crossroad, thereby reducing manual intervention on traffic jams at the crossroad. Of course, the first thing to provide is reliable traffic light status control, and at the same time try to improve the timeliness of traffic light response.
根据上述要求得出两个任务。第一,需要为图像帧差法选取一个合适的阈值,由于不同时间段光照强度都会不一样,导致相应的阈值也会跟着变化。所以,同一个图像帧差阈值不是在任何时间段都是可行的,必须要求系统自身能根据外部环境的光线强度自动进行阈值调整。第二,为了提高红绿灯响应的及时度,系统采用了N次判断取多数的算法,既避免了误判的发生,又提高了红绿灯响应的及时度。Two tasks are derived from the above requirements. First, it is necessary to select an appropriate threshold for the image frame difference method. Since the light intensity will vary in different time periods, the corresponding threshold will also change accordingly. Therefore, the same image frame difference threshold is not feasible at any time period, and the system must be required to automatically adjust the threshold according to the light intensity of the external environment. Second, in order to improve the timeliness of traffic light response, the system adopts the algorithm of taking the majority of N judgments, which not only avoids the occurrence of misjudgment, but also improves the timeliness of traffic light response.
1.本发明一种自动十字路口红绿灯控制装置结构如图1所示,自动十字路口红绿灯控制装置由传感设备1、存储程序数字计算机2、矩阵键盘模块3、输出设备4、摄像头1-1、视频输入与解码芯片1-2、超声波模块1-3、LCD显示模块4-1、控制电路模块4-2组成。摄像头1-1完成了将摄像头采集的模拟视频信号经过A/D转换并解码后传送给存储程序数字计算机的视频处理部分,该模块与存储程序数字计算机通过输入/输出接口I实现数据交换。超声波模块1-3用于确定超声波反射处与超声波模块所在位置的距离,该模块与存储程序数字计算机通过输入/输出接口II实现数据交换。存储程序数字计算机2,它提供了各个模块与中央处理单元(CPU)通信的接口,包括I、II、III、IV、V共5个输入/输出端口。矩阵键盘模块3,用于输入系统的运行参数,该模块与存储程序数字计算机通过输入/输出接口III实现数据交换。输出设备4,包括用于输出系统核心参数的LCD显示模块4-1,该模块与存储程序数字计算机通过输入/输出接口IV实现数据交换。红绿指示灯和控制电路模块4-2,该模块与存储程序数字计算机通过输入/输出接口V实现数据交换,实现十字路口的运行状态的控制。1. A kind of automatic intersection traffic light control device structure of the present invention is as shown in Figure 1, and automatic crossroad traffic light control device is made of sensing equipment 1, stored program digital computer 2, matrix keyboard module 3, output equipment 4, camera 1-1 , Video input and decoding chip 1-2, ultrasonic module 1-3, LCD display module 4-1, control circuit module 4-2. The camera 1-1 completes the video processing part that transmits the analog video signal collected by the camera to the stored-program digital computer after A/D conversion and decoding, and the module and the stored-program digital computer realize data exchange through the input/output interface I. The ultrasonic module 1-3 is used to determine the distance between the ultrasonic reflection point and the location of the ultrasonic module, and the module realizes data exchange with the stored-program digital computer through the input/output interface II. Stored-program digital computer 2, which provides interfaces for each module to communicate with the central processing unit (CPU), including 5 input/output ports I, II, III, IV, and V. The matrix keyboard module 3 is used to input the operating parameters of the system, and this module realizes data exchange with the stored-program digital computer through the input/output interface III. The output device 4 includes an LCD display module 4-1 for outputting system core parameters, and the module realizes data exchange with the stored program digital computer through the input/output interface IV. Red and green indicator lights and control circuit module 4-2, this module realizes data exchange with the stored-program digital computer through the input/output interface V, and realizes the control of the running state of the intersection.
2.存储程序数字计算机2的微控制器结构如图2所示,存储程序数字计算机2的微控制器由中央处理单元(CPU)2-1、电可擦除只读存储器(EEPROM)2-2、随机存取存储器(RAM)2-3、输入输出端口(I/O)2-4、闪存(FLASH)2-5组成。集成电路的中央处理单元(CPU)2-1。电可擦除只读存储器(EEPROM)2-2,是整个十字路口红绿灯控制系统参数存放的地方。随机存取存储器(RAM)2-3,是整个十字路口红绿灯控制系统的控制程序运行的场所。输入输出端口(I/O)2-4,包含与图1相对应的输入/输出端口I、II、III、IV、V,用来实现图1中存储程序数字计算机2与外部装置的互联与数据交换。闪存(FLASH)2-5,用来存储整个十字路口红绿灯控制系统的控制程序。中央处理单元(CPU)2-1通过数据总线和地址总线将上述部件相连,并通过控制总线实现各个部件有序地工作。当将它与十字路口红绿灯组合时,一旦操作者输入系统的参数到存储程序数字计算机2的输入端口时,应用系统首先将操作者输入的数据存入电可擦除只读存储器(EEPROM)2-2,然后应用系统就能完全操纵所有的控制功能。2. The microcontroller structure of the stored-program digital computer 2 is shown in Figure 2. The microcontroller of the stored-program digital computer 2 consists of a central processing unit (CPU) 2-1, an electrically erasable read-only memory (EEPROM) 2- 2. Composed of random access memory (RAM) 2-3, input and output ports (I/O) 2-4, and flash memory (FLASH) 2-5. Integrated circuit central processing unit (CPU) 2-1. Electrically Erasable Read-Only Memory (EEPROM) 2-2 is the place where the parameters of the entire intersection traffic light control system are stored. Random access memory (RAM) 2-3 is the place where the control program of the entire intersection traffic light control system runs. Input and output ports (I/O) 2-4, including input/output ports I, II, III, IV, V corresponding to FIG. 1, are used to realize the interconnection and connection between the stored program digital computer 2 and external devices in FIG. data exchange. Flash memory (FLASH) 2-5 is used to store the control program of the entire intersection traffic light control system. The central processing unit (CPU) 2-1 connects the above-mentioned components through a data bus and an address bus, and realizes orderly work of each component through a control bus. When it is combined with traffic lights at crossroads, once the operator inputs the parameters of the system to the input port of the stored-program digital computer 2, the application system first stores the data entered by the operator into the electrically erasable read-only memory (EEPROM) 2 -2, then the application system can fully handle all control functions.
3.中央处理单元(CPU)2-1的结构如图3所示,中央处理单元(CPU)2-1包括算数/逻辑单元(ALU)2-1-1,控制及定时电路2-1-3,随机存取存储器(RAM)2-1-2。它由一个存储寄存器阵列组成,并且该阵列是公知的。通常,特别包含一个存储将由算数/逻辑单元(ALU)2-1-1操作的运算数之一的累加寄存器,一个程序计数器,一个指令寄存器和解码器以及地址寄存器。3. The structure of the central processing unit (CPU) 2-1 is shown in Figure 3. The central processing unit (CPU) 2-1 includes an arithmetic/logic unit (ALU) 2-1-1, a control and timing circuit 2-1- 3. Random Access Memory (RAM) 2-1-2. It consists of an array of storage registers, and this array is well known. Typically, specifically an accumulation register storing one of the operands to be operated on by the Arithmetic/Logic Unit (ALU) 2-1-1, a program counter, an instruction register and decoder and address registers are included in particular.
算数/逻辑单元(ALU)2-1-1将提供给它的二进制数据实行算数逻辑运算。尽管未显示出,但该算数/逻辑单元(ALU)2-1-1也包括一个地址,该地址能够依据二进制算术的逻辑组合两个寄存器的内容。该装置允许该处理器执行算数操作从存储器获得的数据。控制及定时电路2-1-3是中央处理单元(CPU)2-1中的主要功能单元,用来保持所需处理任务需要过程的正确顺序。当指令被取出并解码后,控制电路采用合适的信号启动适当的处理行为。Arithmetic/logic unit (ALU) 2-1-1 performs arithmetic logic operations on binary data supplied to it. Although not shown, the Arithmetic/Logic Unit (ALU) 2-1-1 also includes an address capable of combining the contents of two registers according to the logic of binary arithmetic. The device allows the processor to perform arithmetic operations on data obtained from the memory. The control and timing circuit 2-1-3 is the main functional unit in the central processing unit (CPU) 2-1, which is used to maintain the correct sequence of the required processing tasks. When the instruction is fetched and decoded, the control circuit initiates the appropriate processing action with the appropriate signal.
4.本发明最佳实施例的结构如图4所示,它对应图1所示的一种自动十字路口红绿灯控制装置结构示意图。整个系统功能通过图2和图3所述的三大总线联系在一起,即存储程序数字计算机2经过多个逻辑接口共同控制交通灯6的状态。其中逻辑接口包括帧差阈值读取、自适应阈值调整、超声波设备高度值读取、循环判断次数读取、堵车/畅通有效判断。所有这些逻辑接口将操作者输入的数据或者摄像头1-1和超声波模块1-3采集的数据7作为输入,经过一系列逻辑运算,输出红绿灯的状态给红绿灯控制接口5,由红绿灯控制接口5完成红绿灯状态转变。4. The structure of the preferred embodiment of the present invention is as shown in Figure 4, which corresponds to the structural schematic diagram of a kind of automatic intersection traffic light control device shown in Figure 1. The functions of the whole system are connected together through the three major buses described in Fig. 2 and Fig. 3, that is, the stored-program digital computer 2 jointly controls the state of the traffic light 6 through a plurality of logical interfaces. The logic interface includes frame difference threshold reading, adaptive threshold adjustment, ultrasonic equipment height value reading, cycle judgment number reading, traffic jam/smooth effective judgment. All these logic interfaces take the data input by the operator or the data 7 collected by the camera 1-1 and the ultrasonic module 1-3 as input, and after a series of logical operations, output the status of the traffic light to the traffic light control interface 5, which is completed by the traffic light control interface 5 The state of the traffic light changes.
5.一个整体算法控制程序流程图如图5所示,整个程序步骤都是通过执行存储在存储程序数字计算机闪存(FLASH)上的一系列相关指令完成的。当操作者开启该套系统后,存储程序数字计算机2首先对各个硬件模块进行初始化,包括:摄像头1-1、超声波模块1-3、LCD显示模块4-1、红绿指示灯和控制电路模块4-2。随后,立即读取保存在存储程序数字计算机电可擦除自读存储器(EEPROM)2-2中的系统参数,包括摄像头帧差的阈值、摄像头防误判的重复采样次数N、汽车高度范围(cm),这三个参数将作为十字路口通堵状况的判定依据,一个合适的参数对整个十字路口红绿灯控制系统来说是相当重要的。由于外部光线强度随着时间的变化而变化,这必然会影响到我们使用帧差法来判断道路通堵情况的准确性。所以,一个固定的帧差阈值是不可能保证系统的可靠性的。相反的,这个阈值必须随着外部的光线变化而自动调节。当然,所有的系统参数都是可以通过操作者手工进行设置的,在系统运行的任何时刻,操作者都可以通过该套系统的输入设备(矩阵键盘模块3)依次设置各个系统参数,设置好的系统参数会立刻被保存到存储程序数字计算机的电可擦除只读存储器(EEPROM)2-2中去。等到系统参数准备就绪后,存储程序数字计算机2开始从摄像头1-1和超声波模块1-3处获取十字路口信息,将这些信息和系统参数一道进行一系列逻辑运算(具体在堵车、畅通有效判断算法控制程序流程图图7中给出)。逻辑运算的结果就是十字路口红绿灯应该保持的状态。存储程序数字计算机就控制红绿灯进行相应的状态切换。5. A flow chart of the overall algorithm control program is shown in Figure 5. The entire program steps are completed by executing a series of related instructions stored in the program-stored digital computer flash memory (FLASH). When the operator turns on the system, the stored program digital computer 2 first initializes each hardware module, including: camera 1-1, ultrasonic module 1-3, LCD display module 4-1, red and green indicator lights and control circuit module 4-2. Then, immediately read the system parameters stored in the stored program digital computer EEPROM (EEPROM) 2-2, including the threshold of the camera frame difference, the number of repeated sampling N of the camera to prevent misjudgment, and the vehicle height range ( cm), these three parameters will be used as the basis for judging the congestion status of the intersection, and a suitable parameter is very important for the entire intersection traffic light control system. Since the intensity of external light changes with time, this will inevitably affect the accuracy of our use of the frame difference method to judge road congestion. Therefore, a fixed frame difference threshold cannot guarantee the reliability of the system. Instead, this threshold must automatically adjust as the external light changes. Of course, all system parameters can be set manually by the operator. At any time when the system is running, the operator can set each system parameter in turn through the input device (matrix keyboard module 3) of the system. The system parameters are immediately saved to the electrically erasable read-only memory (EEPROM) 2-2 of the stored-program digital computer. After the system parameters are ready, the stored-program digital computer 2 starts to obtain intersection information from the camera 1-1 and the ultrasonic module 1-3, and performs a series of logical operations with the information and the system parameters (specifically, effectively judging traffic jams and smooth traffic). The flow chart of the algorithmic control program is given in Fig. 7). The result of the logical operation is the state that the traffic lights at the intersection should maintain. The stored-program digital computer performs corresponding state switching for controlling traffic lights.
6.本发明的一个自适应算法控制程序流程如图6所示,首先摄像头1-1进行100帧取样后,取出每一帧的亮度值累加后求平均。这样就取得了此时外部环境平均亮度值亮度,接着马上判断该亮度值是否在一个可取的范围之内,要求亮度值必须介于我们所设置的系统参数TN(晚间亮度值)和TA(午间亮度值)之间。然后再确定TVAL(帧差阈值),其算法如下:1)如果该平均值介于TN(晚间亮度值)和TM(早上/下午亮度值)之间,其阈值为TVAL=均值/2000;2)如果该平均值介于TM(早上/下午亮度值)和TA(午间亮度值)之间,其阈值为TVAL=均值/1000;6. An adaptive algorithm control program flow of the present invention is shown in FIG. 6 . First, after the camera 1-1 samples 100 frames, the brightness values of each frame are taken out and accumulated and then averaged. In this way, the average brightness value of the external environment at this time is obtained, and then immediately judge whether the brightness value is within a desirable range, and the brightness value must be between the system parameters we set TN (brightness value at night) brightness value). Then determine TVAL (frame difference threshold), the algorithm is as follows: 1) If the average value is between TN (evening brightness value) and TM (morning/afternoon brightness value), the threshold is TVAL=average value/2000; 2 ) If the average value is between TM (morning/afternoon brightness value) and TA (midday brightness value), its threshold is TVAL=average value/1000;
7.本发明的堵车、畅通有效判断算法控制程序流程如图7所示,这部分程序首先会检查循环检查次数是否到0,如果不到0,再继续进行堵车、畅通有效的判断,并且判断完一次后就会将总的循环判断次数减1,该算法的所有逻辑包含一下三种情况:7. The control program flow of the traffic jam and unimpeded effective judgment algorithm of the present invention is as shown in Figure 7. This part of the program will first check whether the number of loop checks reaches 0, if less than 0, continue to judge the traffic jam, unimpeded and effective, and judge After finishing once, the total number of loop judgments will be reduced by 1. All the logic of the algorithm includes the following three situations:
1)道路空旷,没有车通过,此时,摄像头1-1获取的前后两帧图像的亮度分量之间几乎没有差别,在使用帧差算法对两帧图像的亮度分量进行累加后相减,所得到的值必然会远远小于图像帧差阈值。然后,存储程序数字计算机2继续读取超声波模块1-3测得的距离值,因为此时道路上没有任何车通过,超声波模块1-3所测量到的值必然就是超声波模块1-3相对于路面的架设高度。所以,此时存储程序数字计算机2控制红绿灯模块进行正常运转,即间隔一定的时间红绿灯强制进行切换。1) The road is empty and there is no car passing by. At this time, there is almost no difference between the brightness components of the two frames of images captured by camera 1-1. The brightness components of the two frames of images are accumulated and subtracted using the frame difference algorithm, so The obtained value must be much smaller than the image frame difference threshold. Then, the stored program digital computer 2 continues to read the distance value measured by the ultrasonic module 1-3, because there is no any car passing by on the road at this moment, the value measured by the ultrasonic module 1-3 must be the distance value measured by the ultrasonic module 1-3. The erection height of the pavement. Therefore, at this time, the program-stored digital computer 2 controls the traffic light module to operate normally, that is, the traffic light is forcibly switched at regular intervals.
2)道路有车通过,但是不发生拥堵,此时,由于十字路口下车的移动,摄像头1-1获取的前后两帧图像的亮度分量必然存在较大的差别,在使用帧差法对两帧图像的亮度分量进行累加后相减,所得到的值必然会大于图像帧差阈值。在这种情况下,存储程序数字计算机2直接判定十字路口车流通畅,没有发生任何拥堵,而不会去读取超声波模块1-3的测距值。所以,此时存储程序数字计算机2控制红绿灯模块进行正常运转,即间隔一定的时间红绿灯进行强制切换。2) There are cars passing by on the road, but there is no congestion. At this time, due to the movement of getting off the car at the intersection, there must be a large difference in the brightness components of the two frames of images captured by the camera 1-1. The brightness components of the frame images are accumulated and then subtracted, and the obtained value must be greater than the image frame difference threshold. In this case, the stored-program digital computer 2 directly determines that the traffic flow at the intersection is smooth and no congestion occurs, and does not read the distance measurement values of the ultrasonic modules 1-3. Therefore, at this time, the program-stored digital computer 2 controls the traffic light module to operate normally, that is, the traffic light is forced to switch at regular intervals.
3)道路有车通过,但是在十字路口发生了拥堵,此时,由于十字路口下面的车停止不动,摄像头1-1获取的前后两帧图像的亮度分量几乎没有差别,在使用帧差算法对两帧图像的亮度分量进行累加后相减,所得到的值必然远小于图像帧差阈值。然后,存储程序数字计算机2继续读取超声波模块1-3测得的距离值,因为此时十字路口处发生了拥堵,超声波模块1-3所测量到的值必然就是超声波模块相对于路面架设的高度减去车辆的高度。所以,此时存储程序数字计算机2控制红绿灯模块强制亮起红灯,禁止各方向来的汽车进入十字路口内,使已被堵在十字路口内的汽车自行地离开。当堵车消失后,该十字路口各方向的红绿灯都能即刻恢复常态。3) There are cars passing by on the road, but congestion occurs at the intersection. At this time, because the cars below the intersection are stationary, there is almost no difference in the brightness components of the two frames of images captured by camera 1-1. When using the frame difference algorithm The luminance components of the two frames of images are accumulated and then subtracted, and the obtained value must be much smaller than the image frame difference threshold. Then, the stored program digital computer 2 continues to read the distance value measured by the ultrasonic module 1-3, because at this moment there is congestion at the intersection, the value measured by the ultrasonic module 1-3 must be the distance that the ultrasonic module is erected relative to the road surface Altitude minus the height of the vehicle. Therefore, at this time, the program-stored digital computer 2 controls the traffic light module to forcibly turn on the red light, prohibiting cars coming from all directions from entering the intersection, so that the cars that have been blocked in the intersection can leave voluntarily. When the traffic jam disappears, the traffic lights in all directions at the intersection can immediately return to normal.
红绿灯最终状态的确定采用了N次判断取多数的算法,既避免了误判的发生,又提高了红绿灯响应的及时度。The determination of the final state of the traffic light adopts the algorithm of taking the majority of N judgments, which not only avoids the occurrence of misjudgment, but also improves the timeliness of the traffic light response.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310579112.2A CN103761882B (en) | 2013-11-18 | 2013-11-18 | A kind of automatic cross crossroads traffic light control device and application |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310579112.2A CN103761882B (en) | 2013-11-18 | 2013-11-18 | A kind of automatic cross crossroads traffic light control device and application |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103761882A CN103761882A (en) | 2014-04-30 |
| CN103761882B true CN103761882B (en) | 2016-04-27 |
Family
ID=50529113
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310579112.2A Expired - Fee Related CN103761882B (en) | 2013-11-18 | 2013-11-18 | A kind of automatic cross crossroads traffic light control device and application |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103761882B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105206069B (en) * | 2015-10-29 | 2017-10-13 | 常州市规划设计院 | A kind of intersection traffic signal light intelligent control system |
| CN106097705A (en) * | 2015-12-08 | 2016-11-09 | 合肥寰景信息技术有限公司 | A kind of system of the magnitude of traffic flow threshold value calculating control traffic signaling equipment |
| CN110111595A (en) * | 2019-06-14 | 2019-08-09 | 陈旻嗣 | Spare traffic signal control system and method |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE10142250A1 (en) * | 2001-08-29 | 2003-04-03 | Siemens Ag | Traffic flow control system, e.g. for control of traffic lights, is based on local collection and processing of traffic data for control of traffic within a limited range so that less complex hardware can be used |
| CN101389029A (en) * | 2008-10-21 | 2009-03-18 | 北京中星微电子有限公司 | Method and apparatus for video image encoding and retrieval |
| CN202049618U (en) * | 2011-04-25 | 2011-11-23 | 杭州普乐科技有限公司 | Intelligent traffic signal control device based on technology integrating ultrasonic detection and video detection |
| CN202126738U (en) * | 2011-07-03 | 2012-01-25 | 烟台汽车工程职业学院 | Device for automatically reminding passengers in bus of traffic light conversion |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW559308U (en) * | 2001-07-26 | 2003-10-21 | Shi-Je Li | Traffic light control and information transmitting-apparatus |
| KR20110043048A (en) * | 2009-10-20 | 2011-04-27 | (주)아이비코리아이엔지 | Undercarriage |
-
2013
- 2013-11-18 CN CN201310579112.2A patent/CN103761882B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE10142250A1 (en) * | 2001-08-29 | 2003-04-03 | Siemens Ag | Traffic flow control system, e.g. for control of traffic lights, is based on local collection and processing of traffic data for control of traffic within a limited range so that less complex hardware can be used |
| CN101389029A (en) * | 2008-10-21 | 2009-03-18 | 北京中星微电子有限公司 | Method and apparatus for video image encoding and retrieval |
| CN202049618U (en) * | 2011-04-25 | 2011-11-23 | 杭州普乐科技有限公司 | Intelligent traffic signal control device based on technology integrating ultrasonic detection and video detection |
| CN202126738U (en) * | 2011-07-03 | 2012-01-25 | 烟台汽车工程职业学院 | Device for automatically reminding passengers in bus of traffic light conversion |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103761882A (en) | 2014-04-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11823573B2 (en) | Signal control apparatus and signal control method based on reinforcement learning | |
| JP7267333B2 (en) | Traffic light image processing method, device, computer system and roadside device | |
| CN110782681A (en) | Traffic indicator light self-adaptive control method, device, terminal and storage medium | |
| CN109389836B (en) | Control method, device and system of traffic signal lamp and controller | |
| CN103761882B (en) | A kind of automatic cross crossroads traffic light control device and application | |
| WO2021093625A1 (en) | Intelligent analysis algorithm selection method, apparatus and system, and electronic device | |
| CN109754619B (en) | Single-point traffic signal control method and device, traffic signal machine and storage medium | |
| CN205050347U (en) | Intelligence time delay traffic signal lamp system based on PLC control | |
| CN109509369B (en) | Intelligent parking space monitoring method and monitoring system thereof, and urban integrated intelligent transportation system | |
| CN110991224A (en) | Image recognition-based pedestrian red light running detection method and device and related equipment | |
| JP2014191728A (en) | Traffic signal control device | |
| CN105225506A (en) | Crossing public transport based on reverse changeable driveway is turned left preferential road and management-control method | |
| US20220207750A1 (en) | Object detection with image background subtracted | |
| CN117078591A (en) | Real-time road defect detection method, system, equipment and storage medium | |
| CN111508225A (en) | Information processing method, traffic control method, information processing device, traffic control equipment and storage medium | |
| US20230249713A1 (en) | Computer system and method for determining reliable vehicle control instructions | |
| CN119252031A (en) | A control method, system, electronic device and medium for intelligent traffic signal lights | |
| CN115515283A (en) | A smart street lamp control method, device, terminal and storage medium | |
| CN117079175A (en) | Street lamp fault judging method, system, terminal and medium based on single lamp image processing | |
| CN112330957A (en) | Intersection signal lamp control effect analysis system and method | |
| WO2023286221A1 (en) | Signal control system, device, method, and computer-readable medium | |
| CN118471012A (en) | Parking management method, device and system based on vehicle track tracking | |
| CN117456765A (en) | Vehicle scheduling method, device, electronic equipment and storage medium | |
| CN118528915A (en) | Vehicle lamplight fault detection method, device, computer equipment and storage medium | |
| CN114771531B (en) | Lane changing control method, device, equipment, vehicle and medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160427 Termination date: 20191118 |