CN100568315C - Multi-sensor access device and data fusion method for road traffic information collection - Google Patents
Multi-sensor access device and data fusion method for road traffic information collection Download PDFInfo
- Publication number
- CN100568315C CN100568315C CNB2008100575499A CN200810057549A CN100568315C CN 100568315 C CN100568315 C CN 100568315C CN B2008100575499 A CNB2008100575499 A CN B2008100575499A CN 200810057549 A CN200810057549 A CN 200810057549A CN 100568315 C CN100568315 C CN 100568315C
- Authority
- CN
- China
- Prior art keywords
- data
- sensor
- register
- period
- dsp
- 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
- 238000007500 overflow downdraw method Methods 0.000 title description 8
- 238000004891 communication Methods 0.000 claims abstract description 94
- 230000005540 biological transmission Effects 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 41
- 238000006243 chemical reaction Methods 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 29
- 230000003750 conditioning effect Effects 0.000 claims abstract description 15
- 238000005070 sampling Methods 0.000 claims description 25
- 230000002093 peripheral effect Effects 0.000 claims description 13
- 230000004927 fusion Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 11
- 230000008859 change Effects 0.000 claims description 9
- 239000011159 matrix material Substances 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 239000004973 liquid crystal related substance Substances 0.000 claims description 5
- 101100439969 Arabidopsis thaliana CLPD gene Proteins 0.000 claims description 3
- 238000012935 Averaging Methods 0.000 claims 2
- 238000013519 translation Methods 0.000 claims 2
- 230000008878 coupling Effects 0.000 claims 1
- 238000010168 coupling process Methods 0.000 claims 1
- 238000005859 coupling reaction Methods 0.000 claims 1
- 238000013481 data capture Methods 0.000 claims 1
- 230000000977 initiatory effect Effects 0.000 claims 1
- 239000003550 marker Substances 0.000 claims 1
- 230000005039 memory span Effects 0.000 claims 1
- 230000003287 optical effect Effects 0.000 claims 1
- 230000011218 segmentation Effects 0.000 claims 1
- 230000006870 function Effects 0.000 abstract description 9
- 238000007499 fusion processing Methods 0.000 abstract description 9
- 238000001514 detection method Methods 0.000 abstract description 3
- 230000010354 integration Effects 0.000 abstract description 3
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 11
- 230000003044 adaptive effect Effects 0.000 description 6
- 238000013480 data collection Methods 0.000 description 4
- 238000002955 isolation Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000001208 nuclear magnetic resonance pulse sequence Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Traffic Control Systems (AREA)
Abstract
本发明道路交通信息采集的多传感器接入装置,包括数字信号处理器DSP、复杂可编程逻辑器件CPLD、信号调理与变换电路、CAN通讯控制器和网络通讯控制器。道路交通信息采集的传感器信号通过电流电压变换电路、电压频率变换电路、电平变换电路接入CPLD。CPLD扩展了DSP信号接入数量,并具有信号处理功能。本发明还提供了多传感器数据融合处理的方法。本发明优点是:通过CAN通讯控制器实现现场总线级通讯,通过网络通讯控制器实现与交管中心计算机的大容量数据通讯,可接入现有道路交通信息采集所用传感器,简化了传感器布线和网络传输要求,达到了交通信息检测装置构成一体化和大范区检测的效果。
The multi-sensor access device for collecting road traffic information of the present invention includes a digital signal processor DSP, a complex programmable logic device CPLD, a signal conditioning and conversion circuit, a CAN communication controller and a network communication controller. The sensor signal collected by the road traffic information is connected to the CPLD through the current-voltage conversion circuit, the voltage-frequency conversion circuit, and the level conversion circuit. CPLD expands the number of DSP signal access and has signal processing functions. The invention also provides a method for multi-sensor data fusion processing. The advantages of the present invention are: the field bus level communication is realized through the CAN communication controller, the large-capacity data communication with the computer of the traffic control center is realized through the network communication controller, the sensors used for collecting the existing road traffic information can be connected, and the sensor wiring and network are simplified. The transmission requirements have achieved the effect of integration of traffic information detection devices and large-scale detection.
Description
技术领域 technical field
本发明涉及网络技术应用,特别涉及一种道路交通信息采集的多传感器接入装置及其数据融合方法。The invention relates to the application of network technology, in particular to a multi-sensor access device for collecting road traffic information and a data fusion method thereof.
背景技术 Background technique
目前我国大中城市道路交通系统已部署了大量的交通信息传感器,如线圈、视频、微波、红外、超声、温湿度等传感器,已经初步满足了。At present, the road traffic system of large and medium-sized cities in my country has deployed a large number of traffic information sensors, such as coil, video, microwave, infrared, ultrasonic, temperature and humidity sensors, which have been initially satisfied.
但是目前传感器部署方式相互独立,分属不同系统,无法直接进行数据交互,无法提供综合立体交通信息;传感器功能有限,无法直接获取区间交通参数和将气象信息引入交通信号控制。由于交通系统的各种应用要求多源交通信息,这种传感器部署方式的问题有:However, the current sensor deployment methods are independent of each other and belong to different systems. They cannot directly interact with data and provide comprehensive three-dimensional traffic information. The sensors have limited functions and cannot directly obtain interval traffic parameters and introduce weather information into traffic signal control. Since various applications in the traffic system require multi-source traffic information, the problems with this sensor deployment method are:
(1)占用网络资源巨大,每种传感器都要配置单独的数据传输线,布线工作成为传感器部署的主要工作;(1) Occupying huge network resources, each sensor must be equipped with a separate data transmission line, and the wiring work has become the main work of sensor deployment;
(2)现有传感器部署方式产生了海量异构数据,但现有传感器缺乏在线处理能力,这些数据都需要通过数据传输网络上传至交管中心,因此对于数据传输网络资源要求高;(2) Existing sensor deployment methods generate a large amount of heterogeneous data, but existing sensors lack online processing capabilities, and these data need to be uploaded to the traffic control center through the data transmission network, so the requirements for data transmission network resources are high;
(3)现有传感器部署方式产生的海量数据对后台系统的处理能力要求极高并导致面向全局综合应用的集成复杂性日益增加;(3) The mass data generated by the existing sensor deployment method has extremely high requirements on the processing capacity of the background system and leads to an increasing integration complexity for global comprehensive applications;
(4)现有传感器缺乏在线处理能力,智能交通系统的各种应用需要的交通状态信息又不能在线、实时、准确地获取。(4) Existing sensors lack online processing capabilities, and the traffic status information required by various applications of intelligent transportation systems cannot be obtained online, in real time, and accurately.
造成这一问题的关键是没有传感器综合接入和在线融合装置,使各个交通传感器独立布署,通过各自通讯网络传输至交通管理中心。我国智能交通系统的发展迫切要求改变现有的交通状态信息采集的方式。The key to this problem is that there is no comprehensive sensor access and online fusion device, so that each traffic sensor can be independently deployed and transmitted to the traffic management center through its own communication network. The development of my country's intelligent transportation system urgently requires changing the existing way of collecting traffic status information.
发明内容 Contents of the invention
本发明的目的是克服现有的技术存在的缺陷,提供一种在同一装置中对交通信息采集的多类型传感器进行动态可重构接入装置和自适应数据处理和融合方法,从而简化传感器布线、减轻了网络传输压力,实现交通信息系统构成一体化、大范区检测的道路交通信息采集的多传感器接入装置,并同时提供多源传感器数据融合处理的方法。The purpose of the present invention is to overcome the defects of the existing technology, and provide a dynamic reconfigurable access device and adaptive data processing and fusion method for multi-type sensors for traffic information collection in the same device, thereby simplifying sensor wiring , Reduce the pressure of network transmission, realize the integration of traffic information system, multi-sensor access device for road traffic information collection of large-scale detection, and provide a method for multi-source sensor data fusion processing at the same time.
为达到上述目的,本发明提供的道路交通信息采集的多传感器接入装置,包括数字信号处理器DSP、与所述数字信号处理器DSP相连的网络通讯控制器、CAN通讯控制器和/或若干信号调理与变换电路,所述网络通讯控制器用于在所述数字信号处理器DSP控制下与通讯网络进行通讯,所述CAN通讯控制器用于与具有CAN接口的装置进行通讯,所述信号调理与变换电路用于把模拟量输出的传感器、开关量输出的传感器和脉冲序列输出的传感器数据采集入所述数字信号处理器DSP;In order to achieve the above object, the multi-sensor access device for road traffic information collection provided by the present invention includes a digital signal processor DSP, a network communication controller connected to the digital signal processor DSP, a CAN communication controller and/or several Signal conditioning and conversion circuit, the network communication controller is used to communicate with the communication network under the control of the digital signal processor DSP, the CAN communication controller is used to communicate with the device with CAN interface, the signal conditioning and The conversion circuit is used to collect the sensor data of the analog output sensor, the switch output sensor and the pulse sequence output into the digital signal processor DSP;
所述网络通讯控制器由以太网控制器、隔离变压器、RJ45接口构成,所述网络通讯控制器使用NTCIP协议进行网络通讯;所述CAN通讯控制器由eCAN控制模块、光耦隔离器,CAN控制器接口构成,所述CAN通讯控制器使用CAN协议进行与带CAN接口的装置进行数据通讯或者与带CAN接口的传感器进行数据采集;Described network communication controller is made of Ethernet controller, isolation transformer, RJ45 interface, and described network communication controller uses NTCIP agreement to carry out network communication; Described CAN communication controller is controlled by eCAN control module, optocoupler isolator, CAN The CAN communication controller uses the CAN protocol to perform data communication with a device with a CAN interface or to collect data with a sensor with a CAN interface;
所述数字信号处理器DSP采用型号为TMS320F2812的芯片;Described digital signal processor DSP adopts the chip that model is TMS320F2812;
还包括一个与所述数字信号处理器DSP连接的复杂可编程逻辑器件CPLD,所述复杂可编程逻辑器件CPLD包括读写控制模块、传感器通道选择模块、传感器信号处理模块、外围设备控制模块、矩阵键盘控制模块、LCD显示控制模块,其中:It also includes a complex programmable logic device CPLD connected with the digital signal processor DSP, and the complex programmable logic device CPLD includes a read-write control module, a sensor channel selection module, a sensor signal processing module, a peripheral equipment control module, a matrix Keyboard control module, LCD display control module, in which:
所述读写控制模块,用于所述复杂可编程逻辑器件CPLD与所述数字信号处理器DSP之间数据交换时所用的地址总线、数据总线和控制总线的读写时序控制,根据数据线、地址线以及读写及片选控制信号完成所述CPLD与DSP之间的数据传输;The read-write control module is used for the read-write sequence control of the address bus, data bus and control bus used for data exchange between the complex programmable logic device CPLD and the digital signal processor DSP, according to the data lines, Address lines and read-write and chip select control signals complete the data transmission between the CPLD and the DSP;
所述传感器通道选择模块,用于依据所述数字信号处理器DSP的指令进行传感器动态重构的通道切换;The sensor channel selection module is used to switch channels for dynamic reconfiguration of sensors according to the instructions of the digital signal processor DSP;
所述传感器信号处理模块,用于对所述传感器输入数据进行自适应数据处理;The sensor signal processing module is configured to perform adaptive data processing on the sensor input data;
所述外围设备控制模块,用于扩展外围设备的地址译码和片选控制;The peripheral device control module is used to expand address decoding and chip selection control of peripheral devices;
所述矩阵键盘控制模块,用于判断按键的键值并将所述键值通过数据线输入至所述数字信号处理器DSP;The matrix keyboard control module is used to judge the key value of the button and input the key value to the digital signal processor DSP through the data line;
所述LCD显示控制模块,用于LCD液晶显示器的时序控制,并向LCD显示器传递待显示的数据内容。The LCD display control module is used for timing control of the LCD liquid crystal display, and transmits data content to be displayed to the LCD display.
本发明道路交通信息采集的多传感器接入装置,其中所述CPLD包含的传感器信号处理模块包括定时器、计数器、结果寄存器和中断控制寄存器,其中:The multi-sensor access device for road traffic information collection of the present invention, wherein the sensor signal processing module included in the CPLD includes a timer, a counter, a result register and an interrupt control register, wherein:
所述定时器,用于以外部时钟信号作为时间基准产生自适应定时周期;The timer is used to generate an adaptive timing cycle using an external clock signal as a time reference;
所述计数器,用于在所述自适应定时周期内记录传感器的进入脉冲数量;said counter for recording the number of incoming pulses of the sensor during said adaptive timing period;
所述结果寄存器,用于记录所述计数器的计数结果;The result register is used to record the counting result of the counter;
所述中断控制寄存器,用于存储发出中断的中断类型。The interrupt control register is used to store the interrupt type that sends the interrupt.
本发明道路交通信息采集的多传感器接入装置,其中所述CPLD采用型号为EPM1270T144C5N的芯片,所述CPLD包含的传感器通道选择模块包括通道选择控制寄存器和多路选择器,其中:The multi-sensor access device for road traffic information collection of the present invention, wherein the CPLD adopts a chip with a model number of EPM1270T144C5N, and the sensor channel selection module included in the CPLD includes a channel selection control register and a multiplexer, wherein:
所述通道选择控制寄存器,用于存储从所述数字信号处理器DSP发出的可重构接入方式的数据;The channel selection control register is used to store the data of the reconfigurable access mode sent from the digital signal processor DSP;
所述多路选择器,用于根据所述通道选择控制寄存器的数据决定每一路的通断。The multiplexer is used to determine the on-off of each channel according to the data in the channel selection control register.
本发明道路交通信息采集的多传感器接入装置,其中电流输出传感器的信号经电流电压变换电路、电压频率变换电路输入所述CPLD,电压输出传感器的信号经电压频率变换电路将信号输入所述CPLD,开关量输出传感器的信号经电平变换电路输入所述CPLD;所述CPLD还连接有键盘电路和液晶显示电路。The multi-sensor access device for collecting road traffic information of the present invention, wherein the signal of the current output sensor is input into the CPLD through the current-voltage conversion circuit and the voltage-frequency conversion circuit, and the signal of the voltage output sensor is input into the CPLD through the voltage-frequency conversion circuit , the signal of the switching value output sensor is input into the CPLD through the level conversion circuit; the CPLD is also connected with a keyboard circuit and a liquid crystal display circuit.
本发明道路交通信息采集的多传感器接入装置,所述网络通讯控制器由以太网控制器、隔离变压器、RJ45接口构成,所述网络通讯控制器使用NTCIP协议进行网络通讯;所述数字信号处理器DSP还包括一个eCAN控制模块,所述CAN通讯控制器由eCAN控制模块、光耦隔离器,CAN控制器接口构成,所述CAN通讯控制器使用CAN协议进行与带CAN接口的装置进行数据通讯或者与带CAN接口的传感器进行数据采集。The multi-sensor access device for road traffic information collection of the present invention, the network communication controller is composed of an Ethernet controller, an isolation transformer, and an RJ45 interface, and the network communication controller uses the NTCIP protocol for network communication; the digital signal processing The device DSP also includes an eCAN control module, the CAN communication controller is composed of an eCAN control module, an optocoupler isolator, and a CAN controller interface, and the CAN communication controller uses the CAN protocol to perform data communication with a device with a CAN interface Or carry out data acquisition with sensors with CAN interface.
为达到上述目的,本发明提供的用于多传感器接入装置的数据传输方法,该方法将传感器输入信号经CLPD和/或CAN通讯控制器和/或信号调理电路接入所述数字信号处理器DSP,并由网络通讯控制器将处理的数据网络传输至交管中心计算机,该方法执行如下步骤:In order to achieve the above object, the present invention provides a data transmission method for a multi-sensor access device, in which the sensor input signal is connected to the digital signal processor via CLPD and/or CAN communication controller and/or signal conditioning circuit DSP, and the processed data network is transmitted to the traffic management center computer by the network communication controller, and the method performs the following steps:
步骤1,装置初始化,包括DSP初始化、网络通讯控制器初始化、CAN控制器初始化、外围芯片初始化;
步骤2,所述DSP通过所述网络通讯控制器接收交管中心计算机发送的命令,解析该命令,是否进行传感器数据采集,如果是,则转入下一步;否则,向交管中心计算机发送查询消息或者等待;
步骤3,如果交管中心计算机的命令是指示CAN总线进行数据传输,则启动所述CAN通讯控制器进行数据传输;如果是进行直接数据采集,则启动所述复杂可编程逻辑器件CPLD和所述信号调理电路采集数据;
步骤4,DSP接收并暂存CPLD处理后的数据、DSP接收并暂存CAN总线的数据、DSP暂存直接输入至DSP的数据,检查存储器容量是否已满,如果是则清理内存,并转入步骤6;否则继续操作;
步骤5,进行多源数据融合处理,并存储融合结果;
步骤6,依照交管中心计算机的命令通过所述网络通讯控制器向交管中心计算机进行数据传输;
步骤7,返回到步骤2,等待下一次数据采集处理。
本发明所述的数据融合方法,其中所述传感器为线圈传感器,所述数字信号处理器DSP数据处理的步骤如下:Data fusion method of the present invention, wherein said sensor is a coil sensor, and the steps of said digital signal processor DSP data processing are as follows:
步骤1:读取采样时间值、采样地点、时段值k、采样周期Ti;Step 1: Read the sampling time value, sampling location, period value k, and sampling period T i ;
步骤2:在第k时段的n个相应时刻读入线圈传感器检测的流量数据Qi i=1,…,n,计算第k时段的平均流量Qk;Step 2: Read in the flow data Q i i=1,...,n detected by the coil sensor at the n corresponding moment in the k-th period, and calculate the average flow Q k in the k-th period;
步骤4:计算时间占有率Oi i=1,…,n,计算第k时段的平均时间占有率Ok;Step 4: Calculate the time occupancy rate O i i=1,...,n, and calculate the average time occupancy rate O k in the kth period;
步骤5:存储第k时段平均流量、平均占有率、采集地点、采集时段;Step 5: Store the average flow rate, average occupancy rate, collection location, and collection period of the k-th period;
步骤6:k=k+1,转入步骤1。Step 6: k=k+1, go to
本发明所述的数据融合方法,其中所述传感器为线圈传感器和带CAN接口的地磁传感器,所述数字信号处理器DSP执行多源数据融合处理,步骤如下:In the data fusion method of the present invention, wherein the sensor is a coil sensor and a geomagnetic sensor with a CAN interface, the digital signal processor DSP performs multi-source data fusion processing, and the steps are as follows:
步骤1:初始化路段参数,设置流率μ、读取时段值k、时段T、采样周期Ti、绿灯时间gk、容差δ;Step 1: Initialize road section parameters, set flow rate μ, read period value k, period T, sampling period T i , green light time g k , tolerance δ;
步骤2:从线圈数据读取第k时段的平均流量和占有率数据Step 2: Read the average flow and occupancy data for the kth period from the coil data
(1)在第k时段的n个相应时刻读入线圈传感器检测的流量数据检测的流量数据;(1) read in the flow data detected by the flow data detected by the coil sensor at the n corresponding moments of the k period;
Qi i=1,…,n;计算第k时段的平均流量Qk;Q i i=1,...,n; calculate the average flow Q k of the kth period;
(2)计算时间占有率Oi i=1,…,n;计算第k时段的平均时间占有率Ok;(2) Calculate the time occupancy rate O i i=1,...,n; calculate the average time occupancy rate O k of the kth period;
(3)存储第k时段平均流量、平均占有率、采集时段;(3) Store the average flow rate, average occupancy rate, and collection period of the kth period;
步骤3:从线圈数据估计路段的排队时间,其方法为:Step 3: Estimate the queuing time of the road section from the coil data, the method is:
(1)从线圈传感器读取第k时段线圈流量数据Qk和占有率数据Ok;(1) read the coil flow data Q k and occupancy rate data O k of the kth period of time from the coil sensor;
(2)计算第k时段平均车辆驶入率λk、驶出率μk;(2) Calculate the average vehicle entry rate λ k and exit rate μ k in the k-th period;
(3)采用分段时齐Markov排队模型估计排队时间,计算排队时间为Tq(k);(3) Estimate the queuing time using the segmented time homogeneous Markov queuing model, and calculate the queuing time as T q (k);
步骤4:从带CAN接口的地磁式传感器得到平均排队长度,其方法为Step 4: Get the average queue length from the geomagnetic sensor with CAN interface, the method is
(1)在第k时段n个相应时刻,在第i个采样周期从CAN接口读入带CAN接口的m个地磁传感器采集在第i个采样周期的车辆数据D1(i),D2(i),...,Dm(i),其中i=1,2,...,n;规定靠近路口的地磁传感器编号为m,距离路口最远的地磁传感器编号为1;(1) At the nth corresponding moment in the k period, read the m geomagnetic sensors with the CAN interface from the CAN interface in the i-th sampling period to collect the vehicle data D 1 (i), D 2 ( i), ..., D m (i), wherein i=1, 2, ..., n; it is stipulated that the numbering of the geomagnetic sensor near the intersection is m, and the numbering of the farthest geomagnetic sensor from the intersection is 1;
(2)计算第i个采样周期的排队长度,从第m个数据Dm(i)开始,向D1(i)方向搜索,搜索到第一个Dj(i)=0的数据,则排队长度为从第j个地磁传感器到路口的长度l(i);(2) Calculate the queue length of the i-th sampling period, start from the m-th data D m (i), search in the direction of D 1 (i), and search for the first data of D j (i)=0, then The queue length is the length l(i) from the jth geomagnetic sensor to the intersection;
(3)计算第k时段的平均排队长度Lk;(3) calculate the average queue length L k of the k period;
步骤5:从线圈传感器和带CAN接口的地磁式传感器得到流量在路段的分布:Step 5: Obtain the flow distribution on the road section from the coil sensor and the geomagnetic sensor with CAN interface:
(1)在第k时段,第i个采样周期从线圈传感器中读取流量数据,其中i=1,2,...,n,计算其流量均值和方差,(1) In the kth period, the i-th sampling period reads the flow data from the coil sensor, where i=1, 2, ..., n, and calculates its flow mean value and variance,
第k时段流量均值为Qk,The mean value of flow in the k-th period is Q k ,
第k时段流量标准差SQ(k),The flow standard deviation S Q (k) of the k-th period,
在第k时段,第i个采样周期从m个地磁传感器中读取车辆数据,其中i=1,2,...,n,计算每一个地磁传感器检测的流量均值和方差;In the kth period, the i-th sampling period reads vehicle data from m geomagnetic sensors, where i=1, 2, ..., n, and calculates the mean value and variance of the flow detected by each geomagnetic sensor;
(2)由线圈传感器和m个地磁传感器构成整个路段的流量分布(2) The flow distribution of the entire road section is composed of coil sensors and m geomagnetic sensors
第k时段流量在路段的分布[Qk,D1 k,...,Dm k]The distribution of traffic flow in the k-th period [Q k , D 1 k ,..., D m k ]
第k时段流量标准差在路段的分布
步骤6,若计算未结束则k=k+1,转入步骤1;否则转入步骤7;
步骤7,结束并返回。
本发明所述的数据融合方法,其中所述CAN通讯控制器执行如下步骤:The data fusion method of the present invention, wherein said CAN communication controller performs the following steps:
A、发送流程A. Sending process
步骤1,初始化所述DSP及其eCAN模块,包括:
(1)使能CAN模块时钟,(1) Enable CAN module clock,
(2)设置CANTX和CANRX作为CAN通讯引脚,(2) Set CANTX and CANRX as CAN communication pins,
(3)配置位时间配置寄存器CANBTC,(3) Configuration bit time configuration register CANBTC,
(4)配置接收屏蔽寄存器CANGAM,(4) Configure the receiving mask register CANGAM,
(5)配置主控寄存器CANMC,(5) configure the main control register CANMC,
(6)清除消息控制寄存器MSGCTRLn的所有位;(6) clear all bits of the message control register MSGCTRLn;
步骤2配置发送邮箱,包括:
(1)清除发送请求置位寄存器CANTRS中相应的位;(1) Clear the corresponding bit in the sending request setting register CANTRS;
(2)清除邮箱使能寄存器CANME中相应的位,屏蔽邮箱;(2) Clear the corresponding bit in the mailbox enabling register CANME, and shield the mailbox;
(3)装载邮箱的消息标志符寄存器MSGID;(3) load the message identifier register MSGID of the mailbox;
(4)写数据长度到消息控制区寄存器MSGCTRL的数据长度代码DLC区;(4) Write the data length to the data length code DLC area of the message control area register MSGCTRL;
(5)设置邮箱使能寄存器CANME中相应的位使能邮箱。(5) Set the corresponding bit in the mailbox enabling register CANME to enable the mailbox.
步骤3发送消息,包括:
(1)写消息到相应的发送邮箱的数据区;(1) Write a message to the data area of the corresponding sending mailbox;
(2)在发送请求寄存器CANTRS中设置相应的标志位启动消息发送;(2) corresponding flag bit is set to start message sending in sending request register CANTRS;
(3)等待发送响应寄存器CANTA中相应的邮箱发送响应标志位置位;(3) wait to send the corresponding mailbox in the response register CANTA to send the response flag position setting;
(4)成功发送或者中止发送后,模块将发送请求置位寄存器CANTRS的相应为复位;(4) After successful transmission or abort transmission, the module will reset the corresponding value of the transmission request setting register CANTRS;
步骤4发送结束,返回调用处;Step 4: After sending, return to the calling place;
B、接收流程B. Receiving process
步骤1初始化所述DSP及其eCAN模块,包括:
(1)使能CAN模块时钟,(1) Enable CAN module clock,
(2)设置CANTX和CANRX作为CAN通讯引脚,(2) Set CANTX and CANRX as CAN communication pins,
(3)配置位时间配置寄存器CANBTC,(3) Configuration bit time configuration register CANBTC,
(4)配置接收屏蔽寄存器CANGAM,(4) Configure the receiving mask register CANGAM,
(5)配置主控寄存器CANMC;(5) configure the main control register CANMC;
(6)清除消息控制寄存器MSGCTRLn的所有位;(6) clear all bits of the message control register MSGCTRLn;
步骤2配置接收邮箱,包括:
(1)清除邮箱使能寄存器CANME中的相应位,屏蔽邮箱;(1) Clear the corresponding bit in the mailbox enabling register CANME, and shield the mailbox;
(2)写标志符到相应的消息标志寄存器MSGID;(2) Write the identifier to the corresponding message flag register MSGID;
(3)如果消息标志寄存器MSGID的接收屏蔽寄存器使能位AME置1,则相应的接收屏蔽必须进行配置;(3) If the receive mask register enable bit AME of the message flag register MSGID is set to 1, the corresponding receive mask must be configured;
(4)设置邮箱方向寄存器CANMD,将相应的邮箱配置位接收邮箱;(4) Set the mailbox direction register CANMD, and configure the corresponding mailbox to receive the mailbox;
(5)如果邮箱中数据受保护,需要对覆盖控制寄存器CANOPC进行配置;(5) If the data in the mailbox is protected, it is necessary to configure the coverage control register CANOPC;
(6)设置邮箱使能寄存器CANME中的相应位,使能邮箱;(6) Set the corresponding bit in the mailbox enabling register CANME to enable the mailbox;
步骤3接收消息
查询相应的邮箱对应的接收消息挂起寄存器CANRMP中的相应位RMPx是否置1,如果是则表明邮箱接受数据完成,否则接收尚未完成,继续查询;Query whether the corresponding bit RMPx in the receiving message pending register CANRMP corresponding to the corresponding mailbox is set to 1, if it is, it indicates that the mailbox has completed receiving data, otherwise the reception has not been completed, and continue to inquire;
步骤4接收结束,返回调用处。Step 4: After receiving, return to the calling place.
本发明所述的数据融合方法,其中所述网络通讯控制器执行如下步骤:In the data fusion method of the present invention, the network communication controller performs the following steps:
步骤1初始化所述DSP和以太网络控制器;
步骤2检测是否有来自网络的数据,如果有则步骤3,否则步骤6;
步骤3判断是否是UDP用户数据报协议,否则步骤4;若是则转入UDP处理程序;完成后转入步骤5;
步骤4判断是否是TCP传输控制协议,否则步骤6;若是则程序转入TCP处理程序,完成后转入步骤5;
步骤5将处理后的数据送入所述DSP进行处理,完成后转入步骤2;
步骤6DSP是否有需要发送的数据,若有则转入步骤7,否则转入步骤2;
步骤7如果有且选择UDP协议,则按照UDP协议处理,将数据发送到交管中心计算机;然后转入步骤2,否则转入步骤8;
步骤8是否为TCP协议,若是则按照TCP协议处理,将数据发送到交管中心计算机,发送后转入步骤2,否则转入步骤2。Whether
本发明道路交通信息采集的多传感器接入装置及其数据融合方法的优点在于:The advantages of the multi-sensor access device for road traffic information collection and its data fusion method of the present invention are:
1具有接入多类型传感器和多源数据融合功能:接入装置能够接入覆盖目前道路交通信息采集常用的模拟量输出、开关量输出和脉冲数据量输出的传感器如线圈、微波、超声、红外、视频传感器等等,避免了目前每使用一类传感器,都需要独立部署相关传输与处理系统的问题。装置具有的多源数据融合功能能够满足智能交通系统对综合立体交通信息的需求,避免传输原始海量数据,减轻了后台系统处理的压力。1. It has the function of accessing multi-type sensors and multi-source data fusion: the access device can access sensors covering analog output, switch output and pulse data output commonly used in road traffic information collection, such as coil, microwave, ultrasonic, infrared , video sensors, etc., avoiding the problem that each type of sensor currently used needs to independently deploy related transmission and processing systems. The multi-source data fusion function of the device can meet the needs of the intelligent transportation system for comprehensive three-dimensional traffic information, avoid the transmission of original massive data, and reduce the pressure of background system processing.
2具有底层现场总线通讯和上层数据网络通讯的功能:使本装置构成的系统扩展性好、大大简化传感器布线和对网络传输的要求,本装置符合现有通讯规范,可以直接接入到现有系统中,改造费用很少。2. It has the functions of bottom field bus communication and upper layer data network communication: the system formed by this device has good scalability, greatly simplifies the sensor wiring and the requirements for network transmission. This device conforms to the existing communication specifications and can be directly connected to the existing In the system, the modification cost is very little.
下面结合实施例参照附图进行详细说明,以求对本发明的目的、特征和优点得到更深入的理解。The following will be described in detail with reference to the accompanying drawings in conjunction with the embodiments, in order to gain a deeper understanding of the purpose, features and advantages of the present invention.
附图说明 Description of drawings
图1为本发明道路交通信息采集的多传感器接入装置的方框图;Fig. 1 is the block diagram of the multi-sensor access device of road traffic information collection of the present invention;
图2为本发明道路交通信息采集的多传感器接入装置中CPLD结构的方框图;Fig. 2 is the block diagram of CPLD structure in the multi-sensor access device of road traffic information collection of the present invention;
图3为本发明道路交通信息采集的多传感器接入装置中CAN通讯控制器方框图;Fig. 3 is a CAN communication controller block diagram in the multi-sensor access device of road traffic information collection of the present invention;
图4为本发明道路交通信息采集的多传感器接入装置中网络通讯控制器方框图;Fig. 4 is a block diagram of the network communication controller in the multi-sensor access device for road traffic information collection of the present invention;
图5为本发明道路交通信息采集的多传感器接入装置中CAN通讯控制器的电路原理图;Fig. 5 is the circuit principle diagram of the CAN communication controller in the multi-sensor access device of road traffic information collection of the present invention;
图6为本发明道路交通信息采集的多传感器接入装置中电流电压变换电路的电路原理;Fig. 6 is the circuit principle of the current-voltage conversion circuit in the multi-sensor access device for road traffic information collection of the present invention;
图7为本发明道路交通信息采集的多传感器接入装置中电压调理电路原理图;Fig. 7 is a schematic diagram of the voltage regulation circuit in the multi-sensor access device for road traffic information collection of the present invention;
图8为本发明道路交通信息采集的多传感器接入装置中电平变换电路原理图;Fig. 8 is a schematic diagram of a level conversion circuit in a multi-sensor access device for collecting road traffic information according to the present invention;
图9为本发明道路交通信息采集的多传感器接入装置中电压频率变换电路原理图;Fig. 9 is a schematic diagram of a voltage-frequency conversion circuit in a multi-sensor access device for collecting road traffic information according to the present invention;
图10为本发明道路交通信息采集的多传感器接入装置中网络通讯控制器的电路原理图;Fig. 10 is a schematic circuit diagram of the network communication controller in the multi-sensor access device for collecting road traffic information of the present invention;
图11为本发明道路交通信息采集的多传感器接入装置中DSP的电路原理图;Fig. 11 is the circuit principle diagram of DSP in the multi-sensor access device of road traffic information collection of the present invention;
图12为本发明道路交通信息采集的多传感器接入装置中CPLD的电路原理图;Fig. 12 is the circuit principle diagram of CPLD in the multi-sensor access device of road traffic information collection of the present invention;
图13为本发明道路交通信息采集的多传感器接入装置数据传输流程图;Fig. 13 is a data transmission flow chart of the multi-sensor access device for road traffic information collection of the present invention;
图14为本发明道路交通信息采集的多传感器接入装置中CAN通讯控制器进行数据接收的流程图;Fig. 14 is a flow chart of data reception by the CAN communication controller in the multi-sensor access device for road traffic information collection of the present invention;
图15为本发明道路交通信息采集的多传感器接入装置中CAN通讯控制器进行数据发送的流程图;Fig. 15 is a flow chart of data transmission by the CAN communication controller in the multi-sensor access device for road traffic information collection of the present invention;
图16为本发明道路交通信息采集的多传感器接入装置中网络通讯控制器进行数据发送的流程图。Fig. 16 is a flow chart of data transmission by the network communication controller in the multi-sensor access device for collecting road traffic information according to the present invention.
具体实施方式Detailed ways
本发明解决其技术问题所采用的技术方案是:以数字信号处理器(Digital Signal Processor,DSP)和可编程逻辑器件CPLD(Complex Programmable Logic Device)为核心,还包括CAN(Controller Area Network,CAN)通讯控制器、网络通讯控制器和信号调理与变换电路。The technical scheme adopted by the present invention to solve its technical problems is: take digital signal processor (Digital Signal Processor, DSP) and programmable logic device CPLD (Complex Programmable Logic Device) as the core, also includes CAN (Controller Area Network, CAN) Communication controller, network communication controller and signal conditioning and conversion circuit.
本发明道路交通信息采集的多传感器接入装置能够接入多类型异构传感器,如输出为电流信号的模拟量传感器、输出为电压信号的模拟量传感器、输出为电平信号的开关量传感器、输出为脉冲序列的数字传感器;同时该装置还具有CAN通讯接口,可以接入通过现场总线传输的传感器数据和接入带有CAN接口的传感器。The multi-sensor access device for road traffic information collection of the present invention can be connected to multiple types of heterogeneous sensors, such as analog sensors whose output is current signals, analog sensors whose outputs are voltage signals, switching sensors whose outputs are level signals, The output is a digital sensor with a pulse sequence; at the same time, the device also has a CAN communication interface, which can be connected to sensor data transmitted through the field bus and connected to a sensor with a CAN interface.
本发明多传感器接入装置利用DSP的处理能力,能够嵌入数据融合算法,实现多源异构传感器在线融合。The multi-sensor access device of the present invention utilizes the processing capability of the DSP and can embed a data fusion algorithm to realize online fusion of multi-source heterogeneous sensors.
下面以实施例对本发明多传感器接入装置进行详细说明。The multi-sensor access device of the present invention will be described in detail below with embodiments.
本发明解决其技术问题所采用的技术方案是:参见图1,将现有传感器接入至CPLD和DSP,并对其进行融合处理,将处理结果通过网络通讯控制器传输至交管中心计算机。交通信息采集的传感器如带CAN接口的传感器则经过本装置的CAN通讯控制器将数据输入DSP中;若不带CAN接口的传感器如线圈、视频、微波、红外、超声、温湿度等,可经过信号调理与变换电路进入CPLD或者DSP。The technical solution adopted by the present invention to solve the technical problem is: referring to Fig. 1, the existing sensors are connected to CPLD and DSP, and fusion processing is performed on them, and the processing results are transmitted to the traffic management center computer through the network communication controller. Traffic information collection sensors such as sensors with a CAN interface will input data into the DSP through the CAN communication controller of the device; sensors without CAN interfaces such as coils, video, microwave, infrared, ultrasonic, temperature and humidity, etc. Signal conditioning and conversion circuits enter CPLD or DSP.
其中,DSP部分:参见图11,DSP接收交管中心计算机指令下,对接入的传感器信息进行融合处理,并将所处理的数据传输至交管中心计算机。DSP采用芯片型号为TMS320F2812。Among them, the DSP part: see Figure 11, the DSP receives instructions from the computer of the traffic control center, performs fusion processing on the connected sensor information, and transmits the processed data to the computer of the traffic control center. DSP uses the chip model as TMS320F2812.
CPLD部分:参见图12,CPLD采用芯片型号为EPM1270T144C5N。CPLD部分设有5个功能模块,分别为读写控制模块、传感器通道选择模块、传感器信号处理模块、外围设备控制模块、矩阵键盘控制模块、LCD显示控制模块。CPLD part: see Figure 12, the chip model used by CPLD is EPM1270T144C5N. The CPLD part has 5 functional modules, which are read-write control module, sensor channel selection module, sensor signal processing module, peripheral equipment control module, matrix keyboard control module, and LCD display control module.
●读写控制模块,用于CPLD与DSP之间数据交换时地址总线、数据总线和控制总线的读写时序控制。传感器通道选择模块,根据DSP的指令进行传感器动态重构的通道切换。所谓动态重构的通道切换是指所有道路交通信息采集传感器已经接入至本装置的前提条件下,通过CPLD,在DSP指令下,动态接通或切断传感器接入至CPLD的通道的方法。●The read-write control module is used for the read-write sequence control of address bus, data bus and control bus during data exchange between CPLD and DSP. The sensor channel selection module performs channel switching for dynamic reconstruction of the sensor according to the instructions of the DSP. The so-called channel switching of dynamic reconstruction refers to the method of dynamically connecting or cutting off the channel of the sensor connected to the CPLD through the CPLD under the command of the DSP under the precondition that all road traffic information collection sensors have been connected to the device.
●传感器信号处理模块,用于对传感器输入数据进行自适应数据处理。所谓自适应数据处理,是根据对传感器输入信号的计数结果动态改变计数周期,已满足计数精度的要求。●The sensor signal processing module is used for adaptive data processing on the sensor input data. The so-called adaptive data processing is to dynamically change the counting period according to the counting result of the input signal of the sensor, which has met the requirement of counting precision.
●外围设备控制模块,用于扩展外围设备的地址译码和片选控制。●Peripheral equipment control module, used to expand the address decoding and chip selection control of peripheral equipment.
●矩阵键盘控制模块,用于判断按键的键值并将键值通过数据线输入至DSP。●The matrix keyboard control module is used to judge the key value of the key and input the key value to the DSP through the data line.
●LCD显示控制模块,用于LCD的时序控制,并向LCD显示器传递待显示的数据内容。●LCD display control module, used for LCD timing control, and transmits the data content to be displayed to the LCD display.
在接入现有传感器时,电流输出传感器经电流电压变换电路、电压频率变换电路将信号接入到CPLD,电压输出传感器经电压频率变换电路将信号接入到CPLD,开关量输出传感器经电平变换电路将信号接入到CPLD,CPLD输出端连接至DSP;CPLD还连接有键盘电路,液晶显示电路,负责键盘读取和液晶显示的控制。CPLD部分与DSP的连接为:数据总线D8~D15,地址总线A0~A18,控制线XZCS2,XWE,XRD。When connecting to the existing sensor, the current output sensor connects the signal to the CPLD through the current-voltage conversion circuit and the voltage-frequency conversion circuit; the voltage output sensor connects the signal to the CPLD through the voltage-frequency conversion circuit; The conversion circuit connects the signal to the CPLD, and the output terminal of the CPLD is connected to the DSP; the CPLD is also connected to a keyboard circuit and a liquid crystal display circuit, which are responsible for keyboard reading and liquid crystal display control. The connection between CPLD part and DSP is: data bus D8-D15, address bus A0-A18, control lines XZCS2, XWE, XRD.
CAN通讯控制器:用于将带CAN接口的传感器的数据输入到网络节点中,或者与具有CAN接口的装置进行通讯。参见图3和图5,CAN通讯控制器采用型号为TMS320F2812的芯片,由DSP中的eCAN控制模块、光耦隔离器、CAN控制器接口构成。eCAN模块和CAN控制器接口之间通过若干光耦相连接。光耦隔离器采用型号为6N137的芯片。总线驱动器采用型号为PAC82C250的芯片。CAN通讯控制器与DSP的连接为:进入DSP的信号是CANRXA,从DSP发出信号是CANTXA。CAN communication controller: used to input the data of sensors with CAN interface into network nodes, or communicate with devices with CAN interface. Referring to Figure 3 and Figure 5, the CAN communication controller adopts the chip of model TMS320F2812, which is composed of eCAN control module in DSP, optocoupler isolator, and CAN controller interface. Several optocouplers are connected between the eCAN module and the CAN controller interface. The optocoupler isolator uses a chip of model 6N137. The bus driver adopts the chip of model PAC82C250. The connection between the CAN communication controller and the DSP is: the signal entering the DSP is CANRXA, and the signal sent from the DSP is CANTXA.
网络通讯控制器:用于与交管中心计算机进行数据和指令交互,参见图4和图10,包括以太网控制器、隔离变压器和RJ45接口。以太网控制器采用芯片型号为CS8900A。隔离变压器型号为HR601627。与DSP的连接为:数据总线D0~D15,地址线CSA1~3,控制线xzcs0and1、XRD、XWE。网络通讯控制器使用NTCIP总线协议进行网络通讯。Network communication controller: used for data and instruction interaction with the traffic control center computer, see Figure 4 and Figure 10, including Ethernet controller, isolation transformer and RJ45 interface. The Ethernet controller uses a chip model of CS8900A. The isolation transformer model is HR601627. The connection with DSP is: data bus D0-D15, address line CSA1-3, control line xzcs0and1, XRD, XWE. The network communication controller uses the NTCIP bus protocol for network communication.
信号调理与变换电路:参见图6,电流输出的传感器信号调理与变换电路包括电流电压转换电路和电压频率变换电路。参见图7,电压输出的传感器信号调理与变换电路包括电压频率转换电路。参见图8,开关量输出的传感器信号调理与变换电路包括光耦与电平变换电路。Signal conditioning and conversion circuit: see Figure 6, the current output sensor signal conditioning and conversion circuit includes a current-voltage conversion circuit and a voltage-frequency conversion circuit. Referring to Fig. 7, the voltage output sensor signal conditioning and conversion circuit includes a voltage frequency conversion circuit. Referring to Fig. 8, the sensor signal conditioning and conversion circuit for switching output includes an optocoupler and a level conversion circuit.
多传感器接入装置利用DSP自身的AD转换器、捕获单元可以直接接入传感器信号,利用DSP的eCAN模块构成的CAN通讯控制器可以接收带CAN接口的装置或者传感器的数据。由于DSP自身接入口有限,同时所要完成的融合算法、通讯控制等任务占用其很多资源,因此扩展CPLD来接入更多的传感器并进行数据处理,这样采用DSP+CPLD的核心结构实现了多类型、多通道、多组合方式的灵活可控的传感器信号接入方案,有效地解决了目前城市道路交通所用传感器种类多,数据量大、覆盖区域广的问题。The multi-sensor access device uses DSP's own AD converter and capture unit to directly access sensor signals, and the CAN communication controller composed of DSP's eCAN module can receive data from devices or sensors with CAN interfaces. Due to the limited access of DSP itself, and the fusion algorithm, communication control and other tasks to be completed take up a lot of its resources, the CPLD is extended to access more sensors and perform data processing. In this way, the core structure of DSP+CPLD is used to realize multi-type , multi-channel, multi-combination flexible and controllable sensor signal access scheme, which effectively solves the problems of many types of sensors used in urban road traffic, large data volume, and wide coverage area.
本装置的接入方式主要有以下三种:There are three main access methods for this device:
(1)利用DSP器件的外设资源完成接入;(1) use the peripheral resources of the DSP device to complete the access;
(2)利用CAN接口对具有CAN通信功能的传感器完成接入;(2) Use the CAN interface to complete the access to the sensor with CAN communication function;
(3)利用CPLD进行接入扩展,并由CPLD完成一部分数据处理,减轻DSP压力。(3) Use CPLD for access expansion, and complete part of data processing by CPLD to reduce the pressure on DSP.
另外本装置一方面可以通过键盘进行手动控制,另一方面还可以通过数据网络对装置实现远程监控和指令下发。In addition, on the one hand, the device can be manually controlled through the keyboard, and on the other hand, it can also realize remote monitoring and command delivery to the device through the data network.
下面对本发明多类型异构传感器信息进行融合处理的方法进行详细说明如下。The method for fusion processing of multi-type heterogeneous sensor information of the present invention will be described in detail below.
参见图13,在这一方法的实施例中所述网络采集的传感器输入信号经CLPD和/或CAN通讯控制器和/或信号调理电路接入所述数字信号处理器DSP,并由网络通讯控制器将处理的数据网络传输至交管中心计算机,该方法的步骤是:Referring to Fig. 13, in the embodiment of this method, the sensor input signal collected by the network is connected to the digital signal processor DSP through CLPD and/or CAN communication controller and/or signal conditioning circuit, and is controlled by network communication The processed data network is transmitted to the traffic management center computer by the controller, and the steps of the method are:
步骤1,装置初始化,包括DSP初始化、网络通讯控制器初始化、CAN控制器初始化、外围芯片初始化;
步骤2,所述DSP通过所述网络通讯控制器接收交管中心计算机发送的命令,解析该命令,是否进行传感器数据采集,如果是,则转入下一步;否则,向交管中心计算机发送查询消息或者等待;
步骤3,如果交管中心计算机的命令是指示CAN总线进行数据传输,则启动所述CAN通讯控制器进行数据传输;如果是进行直接数据采集,则启动所述复杂可编程逻辑器件CPLD和所述信号调理电路采集数据;
步骤4,DSP接收并暂存CPLD处理后的数据、DSP接收并暂存CAN总线的数据、DSP暂存直接输入至DSP的数据,检查存储器容量是否已满,如果是则清理内存,并转入步骤6;否则继续操作;
步骤5,进行多源数据融合处理,并存储融合结果;
步骤6,依照交管中心计算机的命令通过所述网络通讯控制器向交管中心计算机进行数据传输;
步骤7,返回到步骤2,等待下一次数据采集处理。
其中,如果传感器为线圈传感器,所述数字信号处理器DSP数据处理的步骤如下:Wherein, if the sensor is a coil sensor, the steps of the digital signal processor DSP data processing are as follows:
步骤1:读取采样时间值、采样地点、时段值k、采样周期Ti;Step 1: Read the sampling time value, sampling location, period value k, and sampling period T i ;
步骤2:在第k时段的n个相应时刻读入线圈传感器检测的流量数据Qi i=1,…,n,计算第k时段的平均流量Qk;Step 2: Read in the flow data Q i i=1,...,n detected by the coil sensor at the n corresponding moment in the k-th period, and calculate the average flow Q k in the k-th period;
步骤4:计算时间占有率Oi i=1,…,n,计算第k时段的平均时间占有率Ok;Step 4: Calculate the time occupancy rate O i i=1,...,n, and calculate the average time occupancy rate O k in the kth period;
步骤5:存储第k时段平均流量、平均占有率、采集地点、采集时段;Step 5: Store the average flow rate, average occupancy rate, collection location, and collection period of the k-th period;
步骤6:k=k+1,转入步骤1。Step 6: k=k+1, go to
如果传感器为线圈传感器和带CAN接口的地磁传感器,所述数字信号处理器DSP执行多源数据融合处理,步骤如下:If the sensor is a coil sensor and a geomagnetic sensor with a CAN interface, the digital signal processor DSP performs multi-source data fusion processing, and the steps are as follows:
步骤1:初始化路段参数,设置流率μ、读取时段值k、时段T、采样周期Ti、绿灯时间gk、容差δ;Step 1: Initialize road section parameters, set flow rate μ, read period value k, period T, sampling period T i , green light time g k , tolerance δ;
步骤2:从线圈数据读取第k时段的平均流量和占有率数据Step 2: Read the average flow and occupancy data for the kth period from the coil data
(1)在第k时段的n个相应时刻读入线圈传感器检测的流量数据检测的流量数据;(1) read in the flow data detected by the flow data detected by the coil sensor at the n corresponding moments of the k period;
Qi i=1,…,n;计算第k时段的平均流量Qk;Q i i=1,...,n; calculate the average flow Q k of the kth period;
(2)计算时间占有率Oi i=1,…,n;计算第k时段的平均时间占有率Ok;(2) Calculate the time occupancy rate O i i=1,...,n; calculate the average time occupancy rate O k of the kth period;
(3)存储第k时段平均流量、平均占有率、采集时段;(3) Store the average flow rate, average occupancy rate, and collection period of the kth period;
步骤3:从线圈数据估计路段的排队时间,其方法为:Step 3: Estimate the queuing time of the road section from the coil data, the method is:
(1)从线圈传感器读取第k时段线圈流量数据Qk和占有率数据Ok;(1) read the coil flow data Q k and occupancy rate data O k of the kth period of time from the coil sensor;
(2)计算第k时段平均车辆驶入率λk、驶出率μk;(2) Calculate the average vehicle entry rate λ k and exit rate μ k in the k-th period;
(3)采用分段时齐Markov排队模型估计排队时间,计算排队时间为Tq(k);(3) Estimate the queuing time using the segmented time homogeneous Markov queuing model, and calculate the queuing time as T q (k);
步骤4:从带CAN接口的地磁式传感器得到平均排队长度,其方法为Step 4: Get the average queue length from the geomagnetic sensor with CAN interface, the method is
(1)在第k时段n个相应时刻,在第i个采样周期从CAN接口读入带CAN接口的m个地磁传感器采集在第i个采样周期的车辆数据D1(i),D2(i),...,Dm(i),其中i=1,2,...,n;规定靠近路口的地磁传感器编号为m,距离路口最远的地磁传感器编号为1;(1) At the nth corresponding moment in the k period, read the m geomagnetic sensors with the CAN interface from the CAN interface in the i-th sampling period to collect the vehicle data D 1 (i), D 2 ( i), ..., D m (i), wherein i=1, 2, ..., n; it is stipulated that the numbering of the geomagnetic sensor near the intersection is m, and the numbering of the farthest geomagnetic sensor from the intersection is 1;
(2)计算第i个采样周期的排队长度,从第m个数据Dm(i)开始,向D1(i)方向搜索,搜索到第一个Dj(i)=0的数据,则排队长度为从第j个地磁传感器到路口的长度l(i);(2) Calculate the queue length of the i-th sampling period, start from the m-th data D m (i), search in the direction of D 1 (i), and search for the first data of D j (i)=0, then The queue length is the length l(i) from the jth geomagnetic sensor to the intersection;
(3)计算第k时段的平均排队长度Lk;(3) calculate the average queue length L k of the k period;
步骤5:从线圈传感器和带CAN接口的地磁式传感器得到流量在路段的分布:Step 5: Obtain the flow distribution on the road section from the coil sensor and the geomagnetic sensor with CAN interface:
(1)在第k时段,第i个采样周期从线圈传感器中读取流量数据,其中i=1,2,...,n,计算其流量均值和方差,(1) In the kth period, the i-th sampling period reads the flow data from the coil sensor, where i=1, 2, ..., n, and calculates its flow mean value and variance,
第k时段流量均值为Qk,The mean value of flow in the k-th period is Q k ,
第k时段流量标准差SQ(k),The flow standard deviation S Q (k) of the k-th period,
在第k时段,第i个采样周期从m个地磁传感器中读取车辆数据,其中i=1,2,...,n,计算每一个地磁传感器检测的流量均值和方差;In the kth period, the i-th sampling period reads vehicle data from m geomagnetic sensors, where i=1, 2, ..., n, and calculates the mean value and variance of the flow detected by each geomagnetic sensor;
(2)由线圈传感器和m个地磁传感器构成整个路段的流量分布(2) The flow distribution of the entire road section is composed of coil sensors and m geomagnetic sensors
第k时段流量在路段的分布[Qk,D1 k,...,Dm k]The distribution of traffic flow in the k-th period [Q k , D 1 k ,..., D m k ]
第k时段流量标准差在路段的分布
步骤6,若计算未结束则k=k+1,转入步骤1;否则转入步骤7;
步骤7,结束并返回。
参见图14和图15,CAN通讯控制器进行数据传输的方法是:Referring to Figure 14 and Figure 15, the method for data transmission by the CAN communication controller is:
A、发送流程A. Sending process
步骤1,初始化所述DSP及其eCAN模块,包括:
(1)使能CAN模块时钟,(1) Enable CAN module clock,
(2)设置CANTX和CANRX作为CAN通讯引脚,(2) Set CANTX and CANRX as CAN communication pins,
(3)配置位时间配置寄存器CANBTC,(3) Configuration bit time configuration register CANBTC,
(4)配置接收屏蔽寄存器CANGAM,(4) Configure the receiving mask register CANGAM,
(5)配置主控寄存器CANMC,(5) configure the main control register CANMC,
(6)清除消息控制寄存器MSGCTRLn的所有位;(6) clear all bits of the message control register MSGCTRLn;
步骤2配置发送邮箱,包括:
(1)清除发送请求置位寄存器CANTRS中相应的位;(1) Clear the corresponding bit in the sending request setting register CANTRS;
(2)清除邮箱使能寄存器CANME中相应的位,屏蔽邮箱;(2) Clear the corresponding bit in the mailbox enabling register CANME, and shield the mailbox;
(3)装载邮箱的消息标志符寄存器MSGID;(3) load the message identifier register MSGID of the mailbox;
(4)写数据长度到消息控制区寄存器MSGCTRL的数据长度代码DLC区;(4) Write the data length to the data length code DLC area of the message control area register MSGCTRL;
(5)设置邮箱使能寄存器CANME中相应的位使能邮箱。(5) Set the corresponding bit in the mailbox enabling register CANME to enable the mailbox.
步骤3发送消息,包括:
(1)写消息到相应的发送邮箱的数据区;(1) Write a message to the data area of the corresponding sending mailbox;
(2)在发送请求寄存器CANTRS中设置相应的标志位启动消息发送;(2) corresponding flag bit is set to start message sending in sending request register CANTRS;
(3)等待发送响应寄存器CANTA中相应的邮箱发送响应标志位置位;(3) wait to send the corresponding mailbox in the response register CANTA to send the response flag position setting;
(4)成功发送或者中止发送后,模块将发送请求置位寄存器CANTRS的相应为复位;(4) After successful transmission or abort transmission, the module will reset the corresponding value of the transmission request setting register CANTRS;
步骤4发送结束,返回调用处;Step 4: After sending, return to the calling place;
B、接收流程B. Receiving process
步骤1初始化所述DSP及其eCAN模块,包括:
(1)使能CAN模块时钟,(1) Enable CAN module clock,
(2)设置CANTX和CANRX作为CAN通讯引脚,(2) Set CANTX and CANRX as CAN communication pins,
(3)配置位时间配置寄存器CANBTC,(3) Configuration bit time configuration register CANBTC,
(4)配置接收屏蔽寄存器CANGAM,(4) Configure the receiving mask register CANGAM,
(5)配置主控寄存器CANMC;(5) configure the main control register CANMC;
(6)清除消息控制寄存器MSGCTRLn的所有位;(6) clear all bits of the message control register MSGCTRLn;
步骤2配置接收邮箱,包括:
(1)清除邮箱使能寄存器CANME中的相应位,屏蔽邮箱;(1) Clear the corresponding bit in the mailbox enabling register CANME, and shield the mailbox;
(2)写标志符到相应的消息标志寄存器MSGID;(2) Write the identifier to the corresponding message flag register MSGID;
(3)如果消息标志寄存器MSGID的接收屏蔽寄存器使能位AME置1,则相应的接收屏蔽必须进行配置;(3) If the receive mask register enable bit AME of the message flag register MSGID is set to 1, the corresponding receive mask must be configured;
(4)设置邮箱方向寄存器CANMD,将相应的邮箱配置位接收邮箱;(4) Set the mailbox direction register CANMD, and configure the corresponding mailbox to receive the mailbox;
(5)如果邮箱中数据受保护,需要对覆盖控制寄存器CANOPC进行配置;(5) If the data in the mailbox is protected, it is necessary to configure the coverage control register CANOPC;
(6)设置邮箱使能寄存器CANME中的相应位,使能邮箱;(6) Set the corresponding bit in the mailbox enabling register CANME to enable the mailbox;
步骤3接收消息
查询相应的邮箱对应的接收消息挂起寄存器CANRMP中的相应位RMPx是否置1,如果是则表明邮箱接受数据完成,否则接收尚未完成,继续查询;Query whether the corresponding bit RMPx in the receiving message pending register CANRMP corresponding to the corresponding mailbox is set to 1, if it is, it indicates that the mailbox has completed receiving data, otherwise the reception has not been completed, and continue to inquire;
步骤4接收结束,返回调用处。Step 4: After receiving, return to the calling place.
参见图16,网络通讯控制器进行数据传输执行如下步骤:Referring to Figure 16, the network communication controller performs the following steps for data transmission:
步骤1初始化所述DSP和以太网络控制器;
步骤2检测是否有来自网络的数据,如果有则步骤3,否则步骤6;
步骤3判断是否是UDP用户数据报协议,否则步骤4;若是则转入UDP处理程序;完成后转入步骤5;
步骤4判断是否是TCP传输控制协议,否则步骤6;若是则程序转入TCP处理程序,完成后转入步骤5;
步骤5将处理后的数据送入所述DSP进行处理,完成后转入步骤2;
步骤6DSP是否有需要发送的数据,若有则转入步骤7,否则转入步骤2;
步骤7如果有且选择UDP协议,则按照UDP协议处理,将数据发送到交管中心计算机;然后转入步骤2,否则转入步骤8;
本发明多传感器接入装置及其数据处理的方法有以下技术效果:The multi-sensor access device and the data processing method thereof of the present invention have the following technical effects:
1具有接入多类型传感器的功能:覆盖目前道路交通信息采集常用的模拟量输出、开关量输出和脉冲序列量输出的传感器如线圈、微波、超声、红外、视频传感器等等,避免了目前每使用一类传感器,都需要独立部署相关传输与处理系统的问题。1. It has the function of connecting multiple types of sensors: covering sensors such as coils, microwaves, ultrasonics, infrared, video sensors, etc., which are commonly used in road traffic information collection at present The use of one type of sensor requires independent deployment of the associated transmission and processing system issues.
2具有在线进行多源数据融合的功能:能够满足智能交通系统对综合立体交通信息的需求,避免传输原始海量数据,减轻了后台系统处理的压力。2. It has the function of online multi-source data fusion: it can meet the needs of intelligent transportation systems for comprehensive three-dimensional traffic information, avoid the transmission of original massive data, and reduce the pressure of background system processing.
3具有底层现场总线通讯和上层数据网络通讯的功能:使本装置构成的系统扩展性好、大大简化传感器布线和对网络传输的要求,本装置符合现有通讯规范,可以直接接入到现有系统中,改造费用很少。3. It has the functions of bottom field bus communication and upper layer data network communication: the system formed by this device has good scalability, greatly simplifies the sensor wiring and the requirements for network transmission. This device conforms to the existing communication specifications and can be directly connected to the existing In the system, the transformation cost is very little.
目前市场上还没有此类产品,该产品对交通信息采集传感器的接入、使用和部署方式有提升和推进的作用。At present, there is no such product on the market, and this product can improve and promote the access, use and deployment of traffic information collection sensors.
以上所述的实施例仅仅是对本发明的优选实施方式进行描述,并非对本发明的范围进行限定,在不脱离本发明涉及精神的前提下,本领域普通工程技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明的权利要求书确定的保护范围内。The above-mentioned embodiments are only descriptions of preferred implementations of the present invention, and are not intended to limit the scope of the present invention. On the premise of not departing from the spirit of the present invention, ordinary engineers and technicians in the field have made technical solutions of the present invention. Various modifications and improvements should fall within the scope of protection determined by the claims of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2008100575499A CN100568315C (en) | 2008-02-03 | 2008-02-03 | Multi-sensor access device and data fusion method for road traffic information collection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2008100575499A CN100568315C (en) | 2008-02-03 | 2008-02-03 | Multi-sensor access device and data fusion method for road traffic information collection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101226689A CN101226689A (en) | 2008-07-23 |
CN100568315C true CN100568315C (en) | 2009-12-09 |
Family
ID=39858660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2008100575499A Expired - Fee Related CN100568315C (en) | 2008-02-03 | 2008-02-03 | Multi-sensor access device and data fusion method for road traffic information collection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100568315C (en) |
Families Citing this family (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483011B (en) * | 2009-02-11 | 2010-11-10 | 北京交通大学 | Sensor network for obtaining urban road traffic state |
CN101877169B (en) * | 2009-11-13 | 2012-11-07 | 北京交通大学 | Data fusion system and method for controlling balance of multi-intersection traffic flow of trunk road |
CN101916099A (en) * | 2010-08-11 | 2010-12-15 | 深圳市中盟科技股份有限公司 | Signal acquisition device and method thereof |
CN102447684B (en) * | 2010-10-14 | 2014-10-29 | 工业和信息化部软件与集成电路促进中心 | Data processing method and equipment |
CN102760367A (en) * | 2011-04-29 | 2012-10-31 | 中国矿业大学 | PSOC-CPLD (Programmable System On Chip-Complex Programmable Logic Device) electronic comprehensive experiment device |
CN102354193B (en) * | 2011-09-08 | 2013-11-06 | 山东科汇电力自动化有限公司 | Switching signal acquisition method |
CN102905281B (en) * | 2012-11-01 | 2015-06-17 | 江苏科技大学 | Wireless sensing network (WSN) combined sensing device and working method thereof |
JP6020092B2 (en) * | 2012-11-29 | 2016-11-02 | ソニー株式会社 | Data processing apparatus, data processing method, and program |
CN103064327A (en) * | 2012-12-20 | 2013-04-24 | 天津七六四通信导航技术有限公司 | Main control unit adopting digital signal processor (DSP) |
CN103885843A (en) * | 2013-03-01 | 2014-06-25 | 上海富欣智能交通控制有限公司 | Method for processing safety parallel buses between DSP (digital signal processor) and CPLD (complex programmable logic device) |
CN103743435A (en) * | 2013-12-23 | 2014-04-23 | 广西科技大学 | Multi-sensor data fusion method |
CN104008024A (en) * | 2014-06-12 | 2014-08-27 | 北京航空航天大学 | Dynamic reconstruction technology application platform based on FPGA |
CN105159225B (en) * | 2015-08-31 | 2017-12-19 | 中国兵器工业集团第二O二研究所 | CAN interface isolation communication module based on programmable logic controller (PLC) |
CN105118314A (en) * | 2015-09-27 | 2015-12-02 | 电子科技大学中山学院 | NTCIP-based instant messaging intelligent traffic guidance screen control system |
CN105759655A (en) * | 2016-04-14 | 2016-07-13 | 四川隧唐科技股份有限公司 | Multi-sensor synchronous control method |
CN106294204B (en) * | 2016-08-18 | 2019-04-23 | 武汉斗鱼网络科技有限公司 | A kind of method and system for searching for specified data in the memory of Windows system |
CN106530693B (en) * | 2016-11-02 | 2019-02-05 | 浙江大学 | Rolling estimation method of urban expressway traffic state based on fusion data |
CN106408940B (en) * | 2016-11-02 | 2023-04-14 | 南京慧尔视智能科技有限公司 | Traffic detection method and device based on microwave and video data fusion |
CN107169443A (en) * | 2017-05-11 | 2017-09-15 | 南宁市正祥科技有限公司 | The unstructured road detection method that multi-model is combined |
CN108332831B (en) * | 2017-11-27 | 2021-02-19 | 西安航天三沃机电设备有限责任公司 | Data fusion method for multi-channel weighing system |
CN109945862A (en) * | 2017-12-21 | 2019-06-28 | 沈阳新松机器人自动化股份有限公司 | An array magnetic navigation sensor |
CN109324553A (en) * | 2018-10-18 | 2019-02-12 | 深圳市朗驰欣创科技股份有限公司 | A kind of standardization detection module interface |
CN109947070B (en) * | 2019-04-28 | 2020-06-19 | 广东德圳智能技术有限公司 | Production equipment data acquisition method and data transmission processor thereof |
CN110148302A (en) * | 2019-05-29 | 2019-08-20 | 江苏理工学院 | Intelligent traffic light command system based on infrared induction Yu narrowband technology of Internet of things |
CN110915719A (en) * | 2019-12-03 | 2020-03-27 | 华东师范大学 | Independent rhythm monitoring device |
CN110968964B (en) * | 2019-12-24 | 2023-11-17 | 交通运输部公路科学研究所 | Research method for system observability based on multi-source traffic sensor |
-
2008
- 2008-02-03 CN CNB2008100575499A patent/CN100568315C/en not_active Expired - Fee Related
Non-Patent Citations (2)
Title |
---|
基于多传感器信息融合技术的驾驶状态监控研究. 李晓明,李埃荣,李同,何国红,梁富.科技情报开发与经济,第17卷第2期. 2007 * |
多传感器信息融合的智能交通控制系统研究. 李秀平,刘智勇,尹征琦,吴今培.信息与控制,第30卷第5期. 2001 * |
Also Published As
Publication number | Publication date |
---|---|
CN101226689A (en) | 2008-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100568315C (en) | Multi-sensor access device and data fusion method for road traffic information collection | |
CN101222400B (en) | Road traffic information acquisition sensor network node device and data transmission method thereof | |
TWI429905B (en) | Automated remote water quality monitoring system with wireless communication capabilities and the method thereof | |
CN102074125B (en) | Low power consumption parking management system based on wireless sensor network, and wireless network nodes | |
CN109598457A (en) | Material-flow method and system, unmanned plane, unmanned vehicle, dispatching platform and handover method | |
CN110221567A (en) | Intelligent managing and control system based on 5G technology of Internet of things | |
CN102420877B (en) | Multi-mode high-speed intelligent asynchronous serial port communication module and realizing method thereof | |
CN106161165A (en) | Rapid data for industrial process network transmits communication protocol | |
CN103312772A (en) | Data acquisition system applied to internet of things and corresponding device | |
CN105490876A (en) | Method for automatic testing of server performance through packet sending linkage and concurrent monitoring | |
CN109525041A (en) | The secondary relay protection chip and data interactive method of intelligent substation | |
CN110708503A (en) | Intelligent gateway system of Internet of things | |
CN201699739U (en) | A Fieldbus Protocol Conversion Gateway Platform Based on AT91RM9200 | |
CN209265713U (en) | Intelligent parking lot management system | |
CN109104692B (en) | Multilink wireless communication network system | |
CN109816996A (en) | Intelligent traffic light control system based on wireless sensor network | |
CN104267312B (en) | A kind of embedded traveling wave ranging device based on LVDS high-speed sampling | |
CN110069430A (en) | A kind of data collection system and adaptive transmission method of daisy chain structure | |
CN114448493A (en) | Satellite integrated data interaction system | |
CN207150253U (en) | Monitoring system for power transformation operation and maintenance | |
CN105721267B (en) | IoT smart terminal gateway device | |
CN109408426A (en) | A kind of agile and all-purpose serial communication method and system | |
CN206224186U (en) | A kind of flight control panel based on dual processor framework | |
CN108055319A (en) | A kind of system and method for remote control Internet of things access equipment | |
CN109714256A (en) | Ship networking multichannel Beidou communication gateway system |
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 | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20091209 Termination date: 20140203 |