[go: up one dir, main page]

CN115294762A - An adaptive traffic control method based on TinyML - Google Patents

An adaptive traffic control method based on TinyML Download PDF

Info

Publication number
CN115294762A
CN115294762A CN202210870154.0A CN202210870154A CN115294762A CN 115294762 A CN115294762 A CN 115294762A CN 202210870154 A CN202210870154 A CN 202210870154A CN 115294762 A CN115294762 A CN 115294762A
Authority
CN
China
Prior art keywords
duration
vehicle
green light
template
model
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
Application number
CN202210870154.0A
Other languages
Chinese (zh)
Inventor
宋晨
葛君正
李锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Shandong Inspur Science Research Institute Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Science Research Institute Co Ltd filed Critical Shandong Inspur Science Research Institute Co Ltd
Priority to CN202210870154.0A priority Critical patent/CN115294762A/en
Publication of CN115294762A publication Critical patent/CN115294762A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0108Measuring and analyzing of parameters relative to traffic conditions based on the source of data
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • G08G1/0141Measuring and analyzing of parameters relative to traffic conditions for specific applications for traffic information dissemination
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/042Detecting movement of traffic to be counted or controlled using inductive or magnetic detectors

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明提供一种基于TinyML的自适应交通控制方法,属于机器学习,TinyML,边缘计算领域,通过传感器和MCU模板,统计计算车辆的速度和长度,计算出通过绿灯所需要的持续时间。更改交通灯的持续时间,缓解交通压力。

Figure 202210870154

The invention provides an adaptive traffic control method based on TinyML, which belongs to the field of machine learning, TinyML, and edge computing. Through sensors and MCU templates, the speed and length of vehicles are statistically calculated, and the duration required to pass a green light is calculated. Change the duration of traffic lights to ease traffic stress.

Figure 202210870154

Description

一种基于TinyML的自适应交通控制方法An Adaptive Traffic Control Method Based on TinyML

技术领域technical field

本发明涉及机器学习,TinyML,边缘计算领域,尤其涉及一种基于TinyML的自适应交通控制方法。The present invention relates to the fields of machine learning, TinyML and edge computing, and in particular to a TinyML-based adaptive traffic control method.

背景技术Background technique

交通运输是经济社会发展的重要基础和支撑。随着城市的发展,各个城市交通车辆逐渐增多。为了解决交通拥堵,交通管理部门出台了各式各样的规定,但结果还是差强人意。Transportation is an important foundation and support for economic and social development. With the development of cities, the number of traffic vehicles in each city has gradually increased. In order to solve traffic congestion, the traffic management department has issued various regulations, but the results are still unsatisfactory.

发明内容Contents of the invention

为了解决上述问题,本发明提供了一种基于TinyML的自适应交通控制方法。In order to solve the above problems, the present invention provides a TinyML-based adaptive traffic control method.

本发明的技术方案是:Technical scheme of the present invention is:

一种基于TinyML的自适应交通控制方法,通过传感器和MCU模板,统计计算车辆的速度和长度,计算出通过绿灯所需要的持续时间。更改交通灯的持续时间,缓解交通压力。An adaptive traffic control method based on TinyML, through the sensor and MCU template, statistically calculate the speed and length of the vehicle, and calculate the duration required to pass the green light. Change the duration of traffic lights to ease traffic stress.

进一步的,further,

包括(1)在马路上布置压电传感器带,计算车辆的速度和长度,车辆离开信号灯(绿灯)的持续时间。(2)建立随机森林模型,并用模型训练上述采集的数据训练。(3)选择MCU模板,把模型部署在模板上。(4)在十字路口通过布置压电传感器带计算出车辆通过信号灯(绿灯)的持续时间,并根据这个时间合理调整绿灯的持续时间。这种发明提供了一种调整交通信号灯时间的优化方法和装置,突破了传统交通通信策略的限制,优化了交通路口的通行策略,会一定程度上缓解交通路口的通行压力,提高了交通通行效率。Including (1) arranging piezoelectric sensor belts on the road, calculating the speed and length of the vehicle, and the duration of the vehicle leaving the signal light (green light). (2) Establish a random forest model, and use the model to train the data collected above. (3) Select the MCU template and deploy the model on the template. (4) Calculate the duration of the vehicle passing through the signal light (green light) by arranging piezoelectric sensor belts at the intersection, and adjust the duration of the green light reasonably according to this time. This invention provides an optimization method and device for adjusting the time of traffic lights, which breaks through the limitations of traditional traffic communication strategies, optimizes the traffic strategy at traffic intersections, relieves the traffic pressure at traffic intersections to a certain extent, and improves traffic efficiency. .

进一步的,further,

步骤包括:数据收集,随机森林模型训练,MCU选型及部署,在十字路口部署压电传感器和模板,计算南北方向车辆通过的绿灯持续时间,计算东西方向车辆通过的绿灯持续时间。The steps include: data collection, random forest model training, MCU selection and deployment, deployment of piezoelectric sensors and templates at intersections, calculation of the duration of green lights for vehicles passing in the north-south direction, and calculation of the duration of green lights for vehicles passing in the east-west direction.

其中,in,

数据收集,在一条马路上布置4条压电传感器带,收集车辆的信息,和车辆离开信号灯(绿灯)的持续时间。For data collection, 4 piezoelectric sensor strips are arranged on a road to collect vehicle information and the duration of the vehicle leaving the signal light (green light).

建立随机森林模型,并用模型训练上述采集的数据。Build a random forest model and use the model to train the data collected above.

通过自主设计或在现有设备中选型,基本要求是基于开源的RISC-V架构的模板,把模型部署在模板上。Through independent design or selection of existing equipment, the basic requirement is to deploy the model on the template based on the template of the open source RISC-V architecture.

在实现的十字路口的四面各布置两条压电传感器带,统计计算出驶入路口的车辆信息,并通过配套的模板计算出通过绿灯的时间。Two piezoelectric sensor belts are arranged on the four sides of the realized intersection, and the information of the vehicles entering the intersection is calculated statistically, and the time to pass the green light is calculated through the matching template.

先统计北面和南面红灯期间积累的车辆,算出两个时间,取两者最大值,作为南北方向绿灯的持续时间。First count the vehicles accumulated during the red lights in the north and south, calculate two times, and take the maximum value of the two as the duration of the green lights in the north and south directions.

再计算这段时间东西方向积累的车辆,算出两个时间,取两者最大值,作为东西方向绿灯的持续时间,再重复上述步骤。Then calculate the vehicles accumulated in the east-west direction during this period, calculate two times, take the maximum value of the two as the duration of the green light in the east-west direction, and repeat the above steps.

附图说明Description of drawings

图1是本发明的工作流程示意图;Fig. 1 is a schematic diagram of the workflow of the present invention;

图2是压电传感器的布置示意图;2 is a schematic diagram of the layout of the piezoelectric sensor;

图3是车辆通过压电感应带时的时间戳示意图。Fig. 3 is a schematic diagram of the time stamp when the vehicle passes through the piezoelectric induction belt.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection of the present invention. scope.

本发明提出了一种基于TinyML的自适应交通控制方法,首先需在道路中距离交通信号灯一定距离安装2条间隔D米的压电传感器1和2,用于检测车辆的密度。当车辆通过压电传感器时,会产生很小的电压脉冲。这些电压脉冲被传递到支持 AI的微控制器。通过处理收集的数据,计算车辆长度(以车辆通过同一压电传感器的两个车轴之间的长度)以识别车辆类型,并根据其通过的速度进行分组。再在距离交通信号灯不远处安装2条间隔D米的压电传感器3和4,用于检测车辆离开信号灯(绿灯)的时间(图2)。将车辆类型和数量作为预训练随机森林回归模型的输入,车辆通过信号灯(绿灯)的时间作为输出(标签)。建立模型,部署在开源的模板上。The present invention proposes an adaptive traffic control method based on TinyML. Firstly, two piezoelectric sensors 1 and 2 with an interval of D meters must be installed in the middle of the road at a certain distance from traffic lights to detect the density of vehicles. When a vehicle passes the piezoelectric sensor, a small voltage pulse is generated. These voltage pulses are delivered to an AI-enabled microcontroller. By processing the collected data, the vehicle length (measured as the length between the two axles of the vehicle passing the same piezoelectric sensor) is calculated to identify the vehicle type and grouped according to the speed at which it passed. Then install two piezoelectric sensors 3 and 4 with an interval of D meters not far from the traffic signal light to detect the time when the vehicle leaves the signal light (green light) (Figure 2). The type and number of vehicles are used as the input of the pre-trained random forest regression model, and the time when the vehicle passes through the signal light (green light) is used as the output (label). Build a model and deploy it on an open source template.

模型的输入部分为车辆类型和数量,其中车辆类型主要记录车辆的速度和车辆的长度。当车辆的第一个车轴通过第一条带时计入时间T1,随后计入第一个车轴通过第二条带的时间戳T2,最后是车辆第二个车轴通过第一条带的时间戳T3。于是车辆的速度计算公式为The input part of the model is the vehicle type and quantity, where the vehicle type mainly records the vehicle speed and vehicle length. The time T 1 is counted when the first axle of the vehicle passes the first strip, followed by the time stamp T 2 when the first axle passes the second strip, and finally when the second axle of the vehicle passes the first strip time stamp T 3 . Then the formula for calculating the speed of the vehicle is

Figure BDA0003760739560000031
Figure BDA0003760739560000031

车辆的长度为The length of the vehicle is

s=v(T3-T1) (2)s=v(T 3 -T 1 ) (2)

当车辆存在第三车轴时,计算公式和上述相似,把两部分的长度相加即可。When the vehicle has a third axle, the calculation formula is similar to the above, just add the lengths of the two parts.

根据上述车辆的速度和车辆的长度大致可以把车辆的种类划分为7类,分别为自行车,电动车(摩托车),轿车,公共汽车,大巴(3车轴),卡车(3 车轴),重型卡车(4、5车轴)。According to the speed of the above vehicles and the length of the vehicles, the types of vehicles can be roughly divided into 7 categories, namely bicycles, electric vehicles (motorcycles), cars, buses, buses (3 axles), trucks (3 axles), heavy trucks (4, 5 axles).

算法的具体步骤为(使用Python作为程序语言)The specific steps of the algorithm are (using Python as the programming language)

1)收集数据集,每条数据为2个条带的时间戳列表。1) Collect data sets, each piece of data is a timestamp list of 2 stripes.

2)创建4个列表,分别为2车轴,3车轴,和4、5车轴。2) Create 4 lists, namely 2 axles, 3 axles, and 4 and 5 axles.

3)取出第一条带的时间戳列表和第二条带的时间戳的第一项,使用公式1 算出车辆的速度v。3) Take out the time stamp list of the first band and the first item of the time stamp of the second band, and use formula 1 to calculate the speed v of the vehicle.

4)取出第一条带的时间戳列表的第二项和第一项,根据公式(2)算出车辆的长度s,查看是否有第三项,如果无则把结果存成元组加入2车轴列表,跳到第2)步。4) Take out the second item and the first item of the time stamp list of the first band, calculate the length s of the vehicle according to the formula (2), check whether there is a third item, if not, save the result as a tuple and add it to 2 axles list, skip to step 2).

5)如果存在第三项,则根据公式(2),再一次算出车辆的长度s1,把s和 s1相加,作为新的长度s,查看是否有第4项,如果无则把结果存成元组加入3 车轴列表,跳到第2)步。5) If there is a third item, then according to the formula (2), calculate the length s1 of the vehicle again, add s and s1 as the new length s, check whether there is the fourth item, if not, save the result as Add the tuple to the list of 3 axles, skip to step 2).

6)如果有,重复第4)步,再查看第五项是否存在,不存在把结果存成元组加入4、5车轴列表,跳到第2)步。如果有重复第4)步,把结果存成元组加入4、5车轴列表,跳到第2)步。6) If yes, repeat step 4), and then check whether the fifth item exists, if not, save the result as a tuple and add it to the list of axles 4 and 5, and skip to step 2). If step 4) is repeated, save the result as a tuple and add it to the list of axles 4 and 5, and skip to step 2).

7)循环结束。7) The loop ends.

8)根据车辆的长度和速度添加每个车辆的类别信息。8) Add the category information of each vehicle according to the length and speed of the vehicle.

9)再根据上述算法计算车辆通过路口的时间。9) Calculate the time for the vehicle to pass through the intersection according to the above algorithm.

10)进入预训练,采用随机森林回归器(RFR)将每个类别的车辆数量作为输入,车辆通过路口所需的绿灯持续时间为标签。预测时输入红灯期间记录累积的车辆,预测通过路口所需的绿灯持续时间。10) Enter the pre-training, use the random forest regressor (RFR) to take the number of vehicles in each category as input, and the green light duration required for the vehicle to pass through the intersection as the label. When predicting, enter the accumulated vehicles recorded during the red light period, and predict the green light duration required to pass the intersection.

11)通过自主设计或在现有设备中选型,基本要求是基于开源的RISC-V 架构的模板,把模型部署在模板上,该板的输入是红灯期间累积的车辆,输出是传递给交通信号灯的预测持续时间。11) Through independent design or model selection in existing equipment, the basic requirement is to deploy the model on the template based on the open source RISC-V architecture. The input of the board is the accumulated vehicles during the red light, and the output is passed to Predicted duration of traffic lights.

12)根据十字路口的四个方向,先预测北面和南面红灯期间积累的车辆,算出两个时间,取两者最大值,作为南北方向绿灯的持续时间,再计算这段时间东西方向积累的车辆,算出两个时间,取两者最大值,作为东西方向绿灯的持续时间,再重复上述步骤。12) According to the four directions of the intersection, first predict the vehicles accumulated during the red lights in the north and south, calculate two times, take the maximum value of the two as the duration of the green lights in the north and south directions, and then calculate the accumulated vehicles in the east and west directions during this period For the vehicle, two times are calculated, and the maximum value of the two is taken as the duration of the green light in the east-west direction, and the above steps are repeated.

以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (8)

1. A self-adaptive traffic control method based on TinyML is characterized in that,
and counting and calculating the speed and the length of the vehicle through a sensor and an MCU template, calculating the duration time required by the green light, and changing the duration time of the traffic light.
2. The method of claim 1,
comprises (1) arranging piezoelectric sensor strips on a road, calculating the speed and length of a vehicle, and the duration of the vehicle leaving a signal light (green light); (2) Establishing a random forest model, and training the acquired data by using the model; (3) selecting an MCU template, and deploying the model on the template; (4) The duration of the vehicle passing through a signal lamp (green lamp) is calculated by arranging the piezoelectric sensor strip at the crossroad, and the duration of the green lamp is reasonably adjusted according to the duration.
3. The method of claim 2,
the method comprises the following steps:
1) Collecting data;
2) Training a random forest model;
3) MCU model selection and deployment;
4) Deploying a piezoelectric sensor and a template at the crossroad;
5) Calculating the duration time of the green light passed by the vehicle in the north-south direction;
6) The duration of the green light for the east-west vehicle to pass is calculated.
4. The method of claim 3,
data collection, placement of 4 strips of piezoelectric sensors on a road, collection of vehicle information, and duration of time the vehicle left the signal light (green light).
5. The method of claim 4,
and establishing a random forest model, and training the acquired data by using the model.
6. The method of claim 5,
and (4) selecting a template based on an open source RISC-V framework, and deploying the model on the template.
7. The method of claim 6,
two piezoelectric sensor belts are respectively arranged on four sides of the realized intersection, the information of vehicles entering the intersection is calculated through statistics, and the time of passing through a green light is calculated through a matched template.
8. The method of claim 7,
firstly, counting vehicles accumulated during red light periods of north and south, calculating two times, and taking the maximum value of the two times as the duration time of green light in the north-south direction;
and calculating the vehicles accumulated in the east-west direction in the period of time, calculating two times, taking the maximum value of the two times as the duration of the green light in the east-west direction, and repeating the steps.
CN202210870154.0A 2022-07-22 2022-07-22 An adaptive traffic control method based on TinyML Pending CN115294762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210870154.0A CN115294762A (en) 2022-07-22 2022-07-22 An adaptive traffic control method based on TinyML

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210870154.0A CN115294762A (en) 2022-07-22 2022-07-22 An adaptive traffic control method based on TinyML

Publications (1)

Publication Number Publication Date
CN115294762A true CN115294762A (en) 2022-11-04

Family

ID=83824664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210870154.0A Pending CN115294762A (en) 2022-07-22 2022-07-22 An adaptive traffic control method based on TinyML

Country Status (1)

Country Link
CN (1) CN115294762A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220167480A1 (en) * 2020-11-24 2022-05-26 William Tulloch Sensor to control lantern based on surrounding conditions
CN114677835A (en) * 2021-11-30 2022-06-28 浪潮集团有限公司 A system and method for self-adaptive traffic scheduling based on microcontroller device and micro-machine learning

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220167480A1 (en) * 2020-11-24 2022-05-26 William Tulloch Sensor to control lantern based on surrounding conditions
CN114677835A (en) * 2021-11-30 2022-06-28 浪潮集团有限公司 A system and method for self-adaptive traffic scheduling based on microcontroller device and micro-machine learning

Similar Documents

Publication Publication Date Title
CN105185115B (en) A kind of traffic forecast method and forecasting system
CN106297333B (en) A kind of green wave appraisal procedure of main line for vehicle record of being made a slip of the tongue based on intersection
CN104778834B (en) Urban road traffic jam judging method based on vehicle GPS data
CN101383091B (en) Network control system for traffic induction outdoor screen
CN105096643B (en) Real-time public transport arrival time Forecasting Methodology based on multi-line front truck service data
WO2019047905A1 (en) Road traffic analysis system, method and apparatus
CN111951549A (en) Adaptive traffic signal control method and system in networked vehicle environment
CN106251661B (en) Tunnel portal section wagon flow control method
CN108230217A (en) A kind of energy consumption total emission volumn accounting system and its accounting method based on expressway tol lcollection data
CN110111592A (en) Method based on traffic signal controlling machine Dynamic Matching Optimal Signals timing scheme
CN101281684A (en) Regional traffic management system with cooperative operation of display board guidance and regional control
CN102376162B (en) Method for setting optimal distance between curb parking lot of intersection exit lane and intersection
CN101739823A (en) Road-section average travel time measuring method suitable for low-frequency sampling
CN103593988A (en) Method for arranging steering buses in sequence in bus stop at inner side of road
CN110807926B (en) Road impedance prediction method and device based on hybrid traffic
CN110633558B (en) A Modeling System of Urban Traffic System
CN114596700B (en) Real-time traffic estimation method for expressway section based on portal data
CN109493566A (en) A kind of fatigue driving prediction technique based on GPS data
CN104318315A (en) City road traffic pollutant discharge monitoring early warning system and method
CN106803347A (en) Urban intersection traffic state judging method based on RFID data
CN110070720B (en) Calculation method for improving fitting degree of traffic capacity model of intersection road occupation construction area
CN111724592B (en) Highway traffic jam detection method based on charging data and checkpoint data
CN109785627A (en) A kind of crossroad access flux monitoring system
CN115294762A (en) An adaptive traffic control method based on TinyML
CN111695767A (en) Highway network traffic efficiency evaluation method, electronic device and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20221104

RJ01 Rejection of invention patent application after publication