Share this

A fuzzy control system for traffic lights at road intersections based on PLC.

2026-04-06 06:22:36 · · #1
1. Introduction Traditional traffic light control at intersections typically involves pre-setting the delays of traffic lights in both directions based on traffic flow surveys and statistical methods. However, the actual changes are unknown, often resulting in situations where there are almost no vehicles on the green light direction, while long queues form on the red light direction, leading to a loss of control. This paper proposes a fuzzy intelligent traffic intersection command and dispatch control system to address this issue. 2. Sensor Setup at the Traffic Intersection At the intersection, one sensor is installed at the near end j (near the zebra crossing) and the far end y (approximately 100 meters from the zebra crossing) in each of the four directions (e, s, w, n) to count the number of vehicles passing through each location. This is illustrated in Figure 1. The near-end sensor records the number of vehicles passing through the intersection during the green light (denoted as x); the far-end sensor records the number of vehicles entering the intersection and queuing during the red light (denoted as y). To simplify calculations, the x and y values ​​for two opposing directions (n ​​and s, w and e) can be combined into one group, and the maximum value from both directions is taken. 3. Design of the Fuzzy Controller The core of this fuzzy control system design is the design of the fuzzy controller, which mainly involves obtaining the fuzzy control table. 3.1 System Analysis: Determining the input and output variables of the controller and their numerical ranges. The input variables are x and y, and the output variable is t. During the green light period, the speed of vehicles passing through the intersection does not exceed 20 km/h, so the maximum number of vehicles passing through in 15 seconds is approximately 15. Therefore, the range of x is 0–15. When the distance between the far-end and near-end sensors is approximately 100 meters, considering that the average length of a vehicle plus the average distance between two vehicles is about 5 meters, the maximum number of vehicles that may be waiting within 100 meters is 100/5 = 20. Therefore, the range of the number of vehicles queuing in the red light direction, y, is 0–20. The output of this system is the relationship between the red, yellow, and green lights in both directions, the pedestrian crossing lights at the zebra crossing, and the green lights further subdivided according to the direction of travel, as well as the output relationship between the two directions, ultimately boils down to the delay t of the current green light. According to field tests, the output variable t ranges from 15 to 60. 3.2 Selection and Determination of Fuzzyization Method To achieve fuzzy control, the green light time needs to be divided into two parts: one is a fixed 10 seconds as the acquisition time t1 for the vehicle state parameters at the intersection; the other is a delay t2 for fuzzy decision-making based on changes in vehicle flow in both directions. During the green light period, the speed of vehicles passing through the intersection does not exceed 10 m/s, so the maximum number of vehicles passing through within 10 seconds is approximately l5. Taking the instant of the traffic light transition as the starting point, the number of vehicles passing through within 10 seconds is recorded as the domain of variable x, taken as (0-15), and it is divided into three fuzzy subsets: few, medium, and many. Its subordinate function design is shown in Figure 2. Figure 2 Subordinate function design for the number of vehicles passing through the intersection during the green light period (x). Fuzzyization of the number of vehicles queuing during the red light period (y), and the fuzzy classification of the output quantity both adopt a triangular subordinate function design. 3.3 Design of Fuzzy Rules When the states of two directions are of the same magnitude, such as both being more, both being moderate, or both being less, the green light delay t2 is always "short," as shown in Table 1. The purpose is to ensure that the flow rates of both directions are similar and to achieve balanced evacuation as quickly as possible. Table 1 Fuzzy Rules Table 3.4 Fuzzy Inference Algorithm and Defuzzification The result obtained from the fuzzy rules is still a fuzzy quantity, which needs to be restored to a precise quantity by the fuzzy inference algorithm before it can be output. This design adopts the mainstream algorithm of today's fuzzy control algorithms—the simplified fuzzy inference algorithm. For each determined input x and y value, there are different fuzzy subsets with different degrees of membership. The multiple fuzzy rules activated thereby use the smaller strategy to find the degree of membership of each output to the fuzzy set, and then the centroid method (weighted average method) is used to defuzzify and find the precise value of t2: Where: μi is the degree of membership of the different fuzzy subsets corresponding to the determined x and y input values; ti is the centroid value corresponding to each fuzzy subset of the output. 4 System Design 4.1 System Hardware Design The fuzzy controller uses a Mitsubishi FX2N PLC, which is programmed to implement traffic scheduling process control. As shown in Figure 3, data acquisition and A/D conversion in the fuzzy control system are completed by the analog input module FX2N-2AD, and D/A conversion is completed by the analog output module FX2N-2DA. Figure 3 shows the hardware connection of the PLC implementing fuzzy control. Y10-Y12 are the control lines for the east-west traffic lights, Y13-Y15 are the control lines for the north-south direction, and Y0-Y7 are the control lines for the 7-segment display. 4.2 Software Design The PLC has strong programming capabilities, allowing for convenient software implementation of fuzzification, fuzzy decision-making, and defuzzification. The algorithm flow of the fuzzy decision subroutine for the variable-cycle traffic fuzzy controller based on vehicle waiting length at intersections is shown in Figure 4. First, read the displayed values ​​of each detector in the traffic light direction detection area, calculate the maximum number of vehicles x and y. Then, multiply x and y by the quantization factor to obtain the x and y required for the lookup control table represented by the corresponding universe of discourse elements. Then, find the universe of discourse value t of the output control quantity according to the fuzzy control rule table in Table 4. Finally, substitute it into the formula 15 + ki × t to calculate the actual green light duration t after the change of direction. 5. Operation Testing and Result Analysis The PLC-based fuzzy traffic control system designed in this paper underwent trial operation and field testing at an intersection, and was compared with the traditional timed control method (see Table 2). The comparison results show that when the traffic flow is small or close to the expected amount of timed timing, there is no significant difference between fuzzy control and timed control methods. However, when the traffic volume gradually increases, the advantages of the fuzzy control of this system become obvious, effectively reducing the delay queue length and the average vehicle delay time. The average delay in the north-south direction and the east-west direction is reduced by 6.74% and 5.32% respectively compared with timed control. Table 2 Comparison of Fuzzy Control and Timed Control Schemes Table 6 Conclusion Theory and practice have proven that applying a programmable logic controller (PLC) for fuzzy control of traffic lights at intersections yields significantly better results than the fixed-cycle method, especially suitable for intersections with high vehicle traffic volume. Because the PLC is used as the core of this system's controller, the system programming is simple, operation is convenient, and it has good application and promotion value, making it suitable for the current state of traffic control and management in China.
Read next

CATDOLL Coco 95CM TPE

Height: 95cm Weight: 16kg Shoulder Width: 27cm Bust/Waist/Hip: 50/52/63cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm Anal ...

Articles 2026-02-22