CN111785042A - Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee - Google Patents
Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee Download PDFInfo
- Publication number
- CN111785042A CN111785042A CN202010620113.7A CN202010620113A CN111785042A CN 111785042 A CN111785042 A CN 111785042A CN 202010620113 A CN202010620113 A CN 202010620113A CN 111785042 A CN111785042 A CN 111785042A
- Authority
- CN
- China
- Prior art keywords
- zigbee
- traffic flow
- time
- traffic
- certain
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/07—Controlling traffic signals
- G08G1/08—Controlling traffic signals according to detected number or speed of vehicles
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/065—Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/09—Arrangements for giving variable traffic instructions
- G08G1/095—Traffic lights
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention belongs to the field of wireless sensor networks, and particularly relates to a ZigBee-based traffic flow detection and automatic traffic light duration adjustment method. The method comprises the following steps: the vehicle automatically accesses the ZigBee network through the intersection; the vehicle sends vehicle ID information through a ZigBee transmitting module; a ZigBee receiving module arranged at the intersection receives the ID information of the vehicle; the ID information and the base station number are sent to a database through GPRS and stored according to a certain format; the storage data comprises an ID number, a base station number and arrival time; the stored data can count the traffic flow reaching a certain intersection within a certain time period; the traffic flow can automatically adjust the time length of the traffic lights by adopting time-sharing graded fuzzy regulation.
Description
Technical Field
The invention belongs to the field of wireless sensor networks, and particularly relates to a ZigBee-based traffic flow detection and automatic traffic light duration adjustment method.
Background
The high-speed development of the automotive industry has increasingly high requirements on urban traffic. At present, the construction speed of urban traffic infrastructures in China cannot keep up with the rapidly increasing traffic demand, conventional public traffic is atrophied, taxis and private cars are rapidly increased, rail transit starts to start, and the traffic management technical level is low. In the case of the fast-growing Shanghai city of economy, the number of motor vehicles is increasing at a rate of 10% or more each year. At present, the holding capacity of the motor vehicles in the whole city reaches 70.6 thousands. There are about 4.2 ten thousand taxis, in addition to 40 or more ten thousand mops and 700 or more ten thousand bicycles. The saturation of the urban traffic space is over 0.8, especially in the areas of cambodia, luwan and the like in the core section of the city, the saturation is close to or even over 1.0, and the traffic jam is very serious. How to efficiently detect and control the traffic flow becomes an important issue for urban traffic [1 ].
Reference to the literature
[1] Study on dynamic timing strategy of traffic lights [ a ]:
1673-629X(2013)10-0224-03,doi:10.3969/j.issn.1673-629X.2013.10.056.
disclosure of Invention
The invention discloses a ZigBee-based traffic flow detection and automatic traffic light time length adjustment method, which aims to count the traffic flow of a certain intersection in a certain time period and automatically adjust the traffic light time length, and is used for road planning of urban traffic.
The purpose of the invention is realized as follows: a traffic flow detection and automatic traffic light duration adjusting method based on ZigBee comprises the following steps:
the vehicle automatically accesses the ZigBee network through the intersection;
the vehicle sends vehicle ID information through a ZigBee transmitting module;
a ZigBee receiving module arranged at the intersection receives the ID information of the vehicle;
the ID information and the base station number are sent to a database through GPRS and stored according to a certain format;
the storage data comprises an ID number, a base station number and arrival time;
the stored data can count the traffic flow reaching a certain intersection within a certain time period;
the traffic flow can automatically adjust the time length of the traffic lights by adopting time-sharing graded fuzzy regulation.
And the ZigBee transmitting module is used for transmitting the ID information of the vehicle, and the ID information is unique and is used for accurately counting the traffic flow.
And the ZigBee receiving module is used for receiving the ID information of the vehicle and caching the ID information to the microprocessor module.
And the microprocessor module provides a unique base station number for identifying the intersection and sends the intersection and the vehicle ID together to the cloud database for storage through GPRS.
And the data processing module stores the base station number, the vehicle ID information and the arrival time into a MySQL database, takes out data according to the requirement and counts the traffic flow passing through a certain intersection in a certain time period.
The invention has the beneficial effects that: according to the technical scheme, the traffic flow passing through different junctions can be accurately counted by adjusting the transmitting power of the ZigBee. And the traffic flow in different time can be counted according to the unique vehicle ID information and the base station number. When a certain interval T is reached, the traffic flow C2 obtained by subtracting the time before the time T from the traffic flow C1 at the current moment is larger than a certain fixed value S (assumed to be a positive value now), and if S is large (assumed to be larger than 20), fuzzy control is adopted; if the change of S is not large, namely the curve is relatively gentle, the slope of the curve graph is adopted to predict the traffic flow at the next time point, and the time length of the traffic light is automatically adjusted.
Drawings
FIG. 1 is a flow chart of the operation of the present invention.
FIG. 2 is a connection diagram of a single chip microcomputer and a ZigBee transmitting module.
Fig. 3 is a simulation diagram of netlogo according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further described below with reference to the accompanying drawings and embodiments.
1. Principle of project
1.1 principle of traffic flow detection
Traffic flow detects and to divide into dolly, basic station and high in the clouds three, has carried on the dolly zigBee transmitting module, has then carried on the basic station zigBee transceiver module, is responsible for receiving the information that the dolly transmitted out, then with in uploading information to the high in the clouds database. The system mainly uses an ad hoc network technology, a transparent transmission technology and a cloud processing technology.
Under the control of a single chip microcomputer, a ZigBee module on a trolley is set to be in a slave sending mode (the mode can send data to a host), and when the trolley passes through a base station, the ZigBee sends an ID number of the ZigBee module to the base station (the host). After data processing, a ZigBee module of a base station is set to be in a slave sending mode, data are sent to a cloud (database), the cloud records the current time after receiving the data, and received ID information and time information are stored in the database.
1) The base station comprises: ZigBee + singlechip.
The functions are as follows: the base station stores the ID number of one digit, receives the ID number of two digits sent by the trolley, processes the ID number by the programming of the single chip microcomputer, and sends the ID number to the PC after integration.
Data format: dolly ID +'; ' + base station ID.
2) The trolley comprises: trolley Module + E64
The functions are as follows: when the trolley passes through the base station, the trolley and the base station self-networking send the ID number of the trolley to the base station.
3) The cloud constitutes: database + data processing program
The functions are as follows: and after receiving the data from the base station, storing the data into a database for vehicle tracking and traffic light time regulation.
1.2 traffic light duration regulation principle
The ZigBee technology is used as the core of the system design, and a time-sharing grading fuzzy control algorithm which is more suitable for the traffic light algorithm is designed.
(1) For a certain time interval T, the traffic flow C1 at the end moment subtracts the traffic flow C2 at the initial moment, the value delta C is larger than a certain gradient value S, and the time length of the traffic light is automatically adjusted by fuzzy control according to the gradient value S: (setting gradient control) such as:
gradient S (vehicle) | Adjustment time (seconds) |
20 | +5 |
30 | +7 |
40 | +9 |
TABLE 1 time comparison table
When Δ C >20, the current traffic light duration is +5 s.
(2) If the change of the delta C is not large, namely the curve is relatively smooth, the slope of the curve graph is used for predicting the traffic flow at the next time point (a MATLAB function is called in a Java program to obtain the slope k, and the traffic flow C at the next time point is predicted by a formula).
The algorithm assumes that:
traffic flow rate: c ═ kT + C (C is the y-axis intercept at the current time, and T is the time point at a certain time);
flow coefficient: ratio of actual flow to saturated flow. The parameter is not only used for calculating the timing of the related signals, but also is an important index for measuring the degree of crossing blockage. Assuming that the saturated flow rate of a certain traffic lane is s and the actual flow rate is C, the flow rate coefficient can be expressed as: y is C/s;
vehicle range (vehicle) | Green light time p (second) |
0~10 | 10 |
20~30 | 15 |
30~40 | 20 |
TABLE 2 reference table for green time of ordinary street
Time: t ═ 1+ v × p; (v ═ Y ^2 as correction for maximum traffic allowed for different streets)
Therefore, traffic lights can be flexibly adjusted according to traffic flow change conditions, and can be adjusted according to different street conditions.
2. Characteristic of the technology
The transmitting device is used as a transmitting point (mode 1) of the trolley information, a ZigBee module is installed on the trolley, the unique identification code of the trolley is recorded, and the transmitting module is E64.
The E64 module has four modes of operation, set by pins M0, M1.
Mode 0 | Host mode M0-0M 1-0 | Monitoring all numbered slave data in the |
Mode | ||
1 | Slave sending M0-1M 1-0 | Sending data to the host (the receiver must be the host) |
|
Slave receiving M0-0M 1-1 | WOR is turned on, and host data can be waited for |
|
Sleep mode M0 ═ |
The module is dormant and can accept the parameter setting command |
TABLE 3 mode configuration
As shown in fig. 2, where M1M0 can be directly connected to VCC or GND when switching modes is not needed. When the detection buffer is not needed, the AUX may be suspended.
Note that: the GPIO of part of MCU may need to be externally provided with 4-10K pull-up resistor, especially 5V level MCU. The IO pin of the module does not output a level higher than 3.3V at any time.
Both the transmitting and receiving sides work in mode 0, and the receiving and transmitting sides are called. Note that the inter-byte interval is no more than 3 byte times at most, such as 9600 baud, with 1 byte time being about 1 ms. When the singlechip is used for sending vehicle information, the singlechip only needs to be output to an RXD pin of the E64 module through a TXD pin, and the E64 can automatically transmit to the E64 module wirelessly connected with the singlechip.
Example (b):
1. application example of traffic flow detection and automatic traffic light duration adjustment method based on ZigBee
The invention adopts a 433MHz ZigBee module (hereinafter called as an E64 module) and tests under different transmitting powers. When the ZigBee transmitting power is set to be 10dBm, the stable automatic networking distance is within 2 meters; when the ZigBee transmitting power is set to be 20dBm, the stable automatic networking distance is within 10 meters. Taking a double lane at a common intersection as an example, the double lane is 7.5 meters wide, so all vehicles can be detected by setting the transmitting power to 20 dBm.
And (5) simulating a traffic light time length regulation and control effect experiment by utilizing the netlogo. As shown in fig. 3.
By sequentially increasing the number of the vehicles, under the condition that the optimum accommodation capacity of a road is not exceeded, the number of the vehicles is about 150, and the time for the vehicles to wait for traffic lights can be reduced to a certain extent by time-sharing hierarchical fuzzy control. As in simulation 1, when the number of vehicles is 50 and the time length of the automatically adjusted traffic lights is not started, 28 vehicles stop under the traffic lights, and only 14 vehicles stop after the vehicles are started.
Note: left side data is not automatic, right side data is automatic
TABLE 4 comparison of simulation results with and without automatic conditions
2. Summary of the invention
According to the ZigBee-based traffic flow detection and automatic traffic light time length adjustment method, when monitoring work is executed, the monitoring work can be completed only by a small amount of computing power and storage resources without being influenced by light and weather; in contrast, the high-cost snapshot camera not only needs to consume a large amount of computing power and storage resources during working, but also is limited by light and environmental conditions. The invention predicts the traffic flow of specific road sections by recording the traffic flow of each road junction and carrying out algorithm analysis, and intelligently regulates and controls the time length of the traffic lights in each time period, thereby reducing the waiting time of vehicles and traffic jam.
Claims (6)
1. A ZigBee-based traffic flow detection and automatic traffic light time length adjustment method is characterized by comprising the following steps:
the vehicle automatically accesses the ZigBee network through the intersection;
the vehicle sends vehicle ID information through a ZigBee transmitting module;
a ZigBee receiving module arranged at the intersection receives the ID information of the vehicle;
the ID information and the base station number are sent to a database through GPRS and stored according to a certain format;
the storage data comprises an ID number, a base station number and arrival time;
the stored data can count the traffic flow reaching a certain intersection within a certain time period;
the traffic flow can automatically adjust the time length of the traffic lights by adopting time-sharing graded fuzzy regulation.
2. The method of claim 1, wherein the ZigBee module has transmitting power of 10-20 dBm, 4-level adjustability, and corresponding signal ranges are sequentially increased.
3. The method of claims 1-2, the ZigBee ad hoc network is characterized in that the transmitting power of the ZigBee module can be adjusted according to the size of the intersection, so that the vehicle can automatically access the network at a proper position.
4. The method of claim 1, wherein the data is stored in a MySQL database, sequentially stored by arrival time, and the stored data includes an ID number, a base station number, and an arrival time.
5. The method of claim 1, wherein the traffic flow detection is characterized by retrieving 1 based on the base station number to obtain data passing through a certain intersection; on the basis of the retrieval 1, the arrival time is retrieved according to the requirement, and the traffic flow reaching a certain intersection in a certain time period can be obtained.
6. The method according to claim 1, wherein the traffic light duration control is characterized in that for a certain time interval T, the traffic flow C1 at the end of the time minus the traffic flow C2 at the beginning of the time is greater than a certain gradient value S, and the traffic light duration is automatically adjusted by fuzzy control according to the magnitude of the gradient value S; if the delta C is not changed greatly, obtaining the slope k of the traffic flow change curve according to the traffic flow data, calculating the traffic flow C, obtaining the green light delay time t according to a formula, and automatically adjusting the green light time according to the t.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620113.7A CN111785042A (en) | 2020-07-01 | 2020-07-01 | Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620113.7A CN111785042A (en) | 2020-07-01 | 2020-07-01 | Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111785042A true CN111785042A (en) | 2020-10-16 |
Family
ID=72761436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010620113.7A Pending CN111785042A (en) | 2020-07-01 | 2020-07-01 | Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111785042A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201796499U (en) * | 2010-03-10 | 2011-04-13 | 淄博职业学院 | Fuzzy controller for traffic system |
CN105869415A (en) * | 2015-11-30 | 2016-08-17 | 乐卡汽车智能科技(北京)有限公司 | Vehicle road cooperation traffic light and control method of the vehicle road cooperation traffic light |
CN109147363A (en) * | 2018-09-10 | 2019-01-04 | 吉林大学 | Traffic intelligent guides system and bootstrap technique |
CN109559513A (en) * | 2018-12-12 | 2019-04-02 | 武汉理工大学 | A kind of Adaptive Signal Control method based on the prediction of adjacent periods flow difference |
WO2019061933A1 (en) * | 2017-09-28 | 2019-04-04 | 孟卫平 | Traffic signal chord panning control method and system |
-
2020
- 2020-07-01 CN CN202010620113.7A patent/CN111785042A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201796499U (en) * | 2010-03-10 | 2011-04-13 | 淄博职业学院 | Fuzzy controller for traffic system |
CN105869415A (en) * | 2015-11-30 | 2016-08-17 | 乐卡汽车智能科技(北京)有限公司 | Vehicle road cooperation traffic light and control method of the vehicle road cooperation traffic light |
WO2019061933A1 (en) * | 2017-09-28 | 2019-04-04 | 孟卫平 | Traffic signal chord panning control method and system |
CN109147363A (en) * | 2018-09-10 | 2019-01-04 | 吉林大学 | Traffic intelligent guides system and bootstrap technique |
CN109559513A (en) * | 2018-12-12 | 2019-04-02 | 武汉理工大学 | A kind of Adaptive Signal Control method based on the prediction of adjacent periods flow difference |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107818411B (en) | Bus dynamic scheduling system and method based on WiFi detection and GPS positioning | |
CN103761876B (en) | Based on the acquisition of road traffic information method that bus or train route is collaborative | |
CN102622798B (en) | Passenger flow statistical analysis system | |
CN201402531Y (en) | WSN-based geomagnetic parking stall detector and geomagnetic parking stall detection system | |
CN106781647B (en) | A kind of the wisdom road patch and its working method of Multi-sensor Fusion | |
CN103337161A (en) | Optimization method of intersection dynamic comprehensive evaluation and signal control system based on real-time simulation model | |
CN110969871A (en) | Intelligent traffic light control system and control method | |
CN102629420B (en) | Vehicle wireless positioning method and system in parking lot | |
CN103942965B (en) | geomagnetic vehicle detector | |
WO2022036765A1 (en) | Intelligent changeable lane sensing system and method for microwave radar | |
CN102592458A (en) | Road traffic flow detection method and system based on RFID (Radio Frequency Identification) | |
CN205582292U (en) | Parking area parking monitoring management system | |
CN103871251A (en) | Digital photography-based agglomerate fog real time early warning system and method | |
CN105702032A (en) | Roadside accident monitoring and alarming system | |
CN103617733A (en) | Expressway road traffic detecting method and device based on car networking beacon mechanism | |
CN113505346B (en) | Urban street lamp data processing and combined regulation and control system based on artificial intelligence | |
CN205621306U (en) | Car position detecting system based on geomagnetic detector and GPRS network | |
CN105825682A (en) | Geomagnetic vehicle detector | |
CN111785042A (en) | Traffic flow detection and automatic traffic light duration adjusting method based on ZigBee | |
CN111899518A (en) | Electric bicycle violation management system based on Internet of things | |
CN1604149A (en) | Apparatus and method for simultaneously measuring traffic flow and vehicle speed by using two magnetic sensors | |
CN113115203B (en) | Consumption reduction method, device and system for road side unit equipment | |
CN102053606A (en) | Automobile line matching method and device | |
CN103855739B (en) | Charging electric vehicle facility proportional arrangement system and method | |
CN206224805U (en) | A kind of city vehicle transports the Lane use control system of bearing capacity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20201016 |
|
WD01 | Invention patent application deemed withdrawn after publication |