In the domestic traffic light control system, the switching time of traffic lights is widely fixed or time intervals that vary in different time periods, or the time interval is adjusted by the traffic control center according to the traffic conditions. It cannot be dynamically switched according to the actual traffic conditions, nor can it intervene in advance according to the road conditions to prevent traffic deterioration. In extreme cases, the red light in the direction with cars may be prohibited, and the green light in the direction without cars may be allowed. This method is inefficient and heavily dependent on the work efficiency of the traffic control department. In general, it can only intervene after the traffic deteriorates, and cannot be prevented in advance. For this reason, this paper proposes a traffic light dynamic adjustment system based on
CAN bus
, which can adjust the traffic light time in real time according to the actual traffic conditions, reduce the probability of road congestion, and ensure smooth traffic.
1 Overall design scheme
The overall design scheme is shown in Figure 1. Figure 1 (a) is the traffic light controller for each intersection, where the dotted line between the ring coil and the traffic light represents the linkage relationship between the two. Figure 1 (b) is a system block diagram. The traffic light controller at each intersection is connected to the control center via the CAN bus. Generally, four ring coil vehicle detectors are installed in four directions of the intersection. When a vehicle passes through the ring coil vehicle detector, a high-level signal is generated, which is fed to the controller. The controller counts and processes the information, and controls the time of traffic light switching in real time to adjust the road to the best traffic state; at the same time, the controller transmits the calculated relevant data to the control center and relevant departments through the CAN bus. The control center can announce it to the public according to the specific situation, and can also send instructions to the controller for remote manual intervention. The system has the advantages of high real-time, objective and accurate, and can also reduce the labor intensity of the traffic management department.
2 Hardware Design of Traffic Light Dynamic Adjustment System Based on CAN Bus
The system hardware consists of a toroidal coil vehicle detector, a controller and a CAN transceiver module. Among them, the toroidal coil vehicle detector can use the products that have been buried in some sections of the domestic road, which can reduce the capital investment.
2.1 Controller Design
The controller uses ST's STR710 as the central processing unit. STR710 has 14 external interrupt inputs, 256 KB program FLASH memory, 64 KB internal RAM, and 5 timers. It is more suitable for processing occasions where there are multiple external interrupt sources to be processed. The controller circuit block diagram is shown in Figure 3. P2.5 is connected to the DI end of MAX485 through an optocoupler to control the conversion of the traffic light; P2.4 is connected to the DE end of MAX485 through an optocoupler to enable the MAX485 sending function.
2.2 Design of CAN transceiver module
The CAN transceiver module consists of CAN bus transceiver SN65VD230D and DB9, as shown in Figure 3.
In Figure 3, R4 is the terminal resistor; R1 and R2 are pull-up resistors; and R3 is the pull-down resistor.
3 Software design of road condition information collection system based on ring coil
3.1 Algorithm principle
Let t0 be the starting time, and the detector detects the vehicle flow Q(Si) and road occupancy C(Si) in time period Si with time T as the cycle. Where:
Where: tHold(Si) is the time that the vehicle is on the coil in one cycle.
Define the relative increment of flow
and the relative increment of occupancy
. In actual use, as shown in Figure 4, detectors are installed on the upstream A and downstream B of the road at the same time. Define the absolute difference of the average occupancy of the upstream and downstream
, and the relative difference of the average occupancy of the upstream and downstream
. The necessary condition for traffic congestion to occur on the section between the upstream and downstream detectors is:
(1) If the relative increment of flow detected by the upstream detector A is less than the relative increment of occupancy, it is considered that the downstream section may be congested in this cycle or the next few cycles.
(2) Based on condition (1), when the absolute difference between the average vehicle occupancy rates of the upstream and downstream detectors is greater than a certain threshold α, and the relative difference between the average vehicle occupancy rates of the upstream and downstream detectors is greater than a certain threshold β, it is determined that a traffic congestion event has occurred. Where: α, β are related to the actual design capacity of the road.
(3) If the absolute difference between the average vehicle occupancy rates of the upstream and downstream detectors is less than or equal to a certain threshold α, and the relative difference between the average vehicle occupancy rates of the upstream and downstream detectors is greater than a certain threshold β, it is determined that the traffic congestion is in the process of dissipating.
3.2 Controller software design
The controller software consists of the main program, interrupt processing, data upload, congestion determination, command processing and traffic light control modules.
3.2.1 Main program
The main program cyclically calls the command processing, traffic status determination and traffic light control modules according to the status returned by the interrupt program, and calls the data upload module at regular intervals. The flow chart is shown in Figure 5.
3.2.2 Traffic status determination
The method of traffic status determination has been explained in the algorithm principle of Section 3.1, so it will not be repeated here. In this module, if the system finds that the number of cars passing through different directions in a unit time is quite different or there is a possibility of congestion in the downstream, the traffic light interval will be automatically modified and called by the traffic light control module.
3.2.3 Interrupt processing
The system sets the four external interrupts of STR710 connected to the ring coil oscillator as FIQ to reduce the interrupt response time. When the vehicle passes, the interrupt subroutine counts and then exits. The main calculation is completed in the congestion determination to improve the system response speed. The system receives the command from the control center in interrupt mode. When receiving the command, it only transfers the command and exits. Further processing is performed by the command processing program. Since the CAN controller of STR710 only has AMR and no ACR, STR710 needs to determine whether it is sent to itself according to the ID after receiving the data. Only when the AMR and ID are the same, it starts to receive the command.
3.2.4 Data upload
The program first packages the data into CAN frame format, then writes it into the buffer, and the hardware automatically sends it out.
3.2.5 Command processing
The system refreshes the time interval buffer according to the mark set by the interrupt handler. The traffic light control module performs the adjustment.
3.2.6 Traffic light control
The block diagram of the traffic light control module is shown in Figure 6. This module adjusts the traffic light interval according to the mark made by command processing or congestion determination.
4 Conclusion
According to the characteristics of traffic congestion and dissipation processes, an algorithm for automatically determining road traffic conditions using microcomputer technology is given, and an attempt is made to control the change cycle of traffic lights in real time on this basis, so as to improve traffic conditions without manual intervention. At the same time, the road condition information is sent to the control center through the CAN bus, and the control center can perform remote manual intervention under special circumstances. The system is efficient, real-time, and objective, and is simple and easy to implement, with good application prospects.
Previous article:HDMI interface technology composed of IP4776CZ38
Next article:Design of PCIE bus expansion card based on FPGA
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- PWM control and driver usage guide and application circuits - SPWM, PFC and IGBT control and driver section
- Buying myoelectric armband
- ESAM external certification for CPU card design
- Test the high and low local oscillator of DVB-S2 sensitivity
- Learn about MPS isolation solutions and answer questions to win prizes!
- [IoT Harmful Gas Detection Smart Device] Material Unpacking
- EEWORLD University Hall----Analog Integrated Circuit Design (Li Zhangquan, Shanghai Jiaotong University)
- Application of high-torque micro-displacement platform based on piezoelectric stack in performance testing of power amplifier
- [Fudan Micro FM33LG0 Series Development Board Review] CAN Test 2
- Repair a weird HC-SR04