CN103716201A - Open wireless sensing network performance test method and open wireless sensing network performance test system - Google Patents

Open wireless sensing network performance test method and open wireless sensing network performance test system Download PDF

Info

Publication number
CN103716201A
CN103716201A CN201310683276.XA CN201310683276A CN103716201A CN 103716201 A CN103716201 A CN 103716201A CN 201310683276 A CN201310683276 A CN 201310683276A CN 103716201 A CN103716201 A CN 103716201A
Authority
CN
China
Prior art keywords
test
data packet
node
sensor network
host computer
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.)
Granted
Application number
CN201310683276.XA
Other languages
Chinese (zh)
Other versions
CN103716201B (en
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.)
Institute of Information Engineering of CAS
Original Assignee
Institute of Information Engineering of CAS
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 Institute of Information Engineering of CAS filed Critical Institute of Information Engineering of CAS
Priority to CN201310683276.XA priority Critical patent/CN103716201B/en
Publication of CN103716201A publication Critical patent/CN103716201A/en
Application granted granted Critical
Publication of CN103716201B publication Critical patent/CN103716201B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及一种开放型的无线传感网测试方法及系统,具体涉及高精度的延迟、丢包率、拓扑结构等性能的测量,所述平台由上位机、下位机、测试背板、烧写模块和被测节点构成;测试背板之间用时钟同步信号线连接起来,采用软硬件协同配合的方式完成高精度的时间同步;被测节点测量其空中接口和低速有线接口传输过程中的可变延迟,用于修订数据包的传输延迟;测试背板对测试数据包采用的定长分割方法,把可变延迟转化为固定延迟;采用参数定位文件的方式实现灵活的远程烧写;采用链路关联度的方法,获得稳定的传感网拓扑结构;采用顺序号映射算法,解决顺序号溢出问题,实现准确的丢包率计算。

Figure 201310683276

The invention relates to an open wireless sensor network testing method and system, in particular to the measurement of high-precision delay, packet loss rate, topology structure and other performances. The platform consists of an upper computer, a lower computer, a test backboard, a The write module and the node under test are composed; the test backplanes are connected by clock synchronization signal lines, and the high-precision time synchronization is completed by the cooperation of software and hardware; the node under test measures the transmission process of its air interface and low-speed wired interface. The variable delay is used to modify the transmission delay of the data packet; the fixed-length segmentation method adopted by the test backplane for the test data packet converts the variable delay into a fixed delay; the method of parameter positioning file is used to realize flexible remote programming; The link correlation method is used to obtain a stable sensor network topology; the sequence number mapping algorithm is used to solve the sequence number overflow problem and realize accurate packet loss rate calculation.

Figure 201310683276

Description

一种开放型无线传感网性能测试方法及系统An open wireless sensor network performance testing method and system

技术领域technical field

本发明涉及通信领域,尤其涉及一种开放型无线传感网性能测试方法及系统。The invention relates to the communication field, in particular to an open wireless sensor network performance testing method and system.

背景技术Background technique

无线传感网由大量低成本的微型传感器节点构成,协作地实现对所处环境的感知、收集、处理和控制任务,广泛地应用于国防军事、工业控制、城市交通、健康护理、环境监测、楼宇监控等诸多领域。The wireless sensor network is composed of a large number of low-cost miniature sensor nodes, which collaboratively realize the perception, collection, processing and control tasks of the environment, and are widely used in national defense, military, industrial control, urban transportation, health care, environmental monitoring, Building monitoring and many other fields.

无线传感器节点在计算、存储和通信等方面的能力都十分有限,无线传感网的性能测试一直是困扰无线传感网研究和大规模应用的难题。此外,无线传感器网络的软硬件平台众多,硬件平台有Smart Dust、MICA、TELOS、μAMPS,软件平台有Contiki、TinyOS、LiteOS、Nano-RK、t-Kernel等。为众多类型的传感网节点提供一个统一的高精度的测试系统,是一项巨大的技术挑战。The capabilities of wireless sensor nodes in computing, storage and communication are very limited, and the performance testing of wireless sensor networks has always been a problem that plagues the research and large-scale application of wireless sensor networks. In addition, there are many software and hardware platforms for wireless sensor networks. The hardware platforms include Smart Dust, MICA, TELOS, μAMPS, and the software platforms include Contiki, TinyOS, LiteOS, Nano-RK, t-Kernel, etc. It is a huge technical challenge to provide a unified high-precision test system for many types of sensor network nodes.

MoteWorks是Crossbow公司研发的针对MICA节点的传感网测试系统。MoteWorks测试系统主要有三个缺点:它只能针对MICA节点提供测试服务;它在采集测试数据时,会干扰节点的运行状态;它在传输测试数据时,会干扰网络的通信性能。哈佛大学的MoteLab测试系统主要针对TMote Sky节点,俄亥俄州立大学的Kansei主要针对starGate,这些测试系统都不能提供一个开放型的测试系统,为各类传感器节点提供测试服务。MoteWorks is a sensor network test system for MICA nodes developed by Crossbow. The MoteWorks test system has three main disadvantages: it can only provide test services for MICA nodes; when it collects test data, it will interfere with the running status of nodes; when it transmits test data, it will interfere with the communication performance of the network. Harvard University's MoteLab test system is mainly aimed at TMote Sky nodes, and Ohio State University's Kansei is mainly aimed at starGate. These test systems cannot provide an open test system to provide test services for various sensor nodes.

发明内容Contents of the invention

本发明所要解决的技术问题是针对现有技术的不足,提供一种开放型无线传感网性能测试方法及系统。The technical problem to be solved by the present invention is to provide an open wireless sensor network performance testing method and system for the deficiencies of the prior art.

本发明解决上述技术问题的技术方案如下:一种开放型无线传感网性能测试方法,包括如下步骤:The technical solution of the present invention to solve the above-mentioned technical problems is as follows: an open wireless sensor network performance testing method, comprising the following steps:

步骤1:上位机通过有线测试通道向无线传感网的被测节点发送测试命令;Step 1: The host computer sends a test command to the tested node of the wireless sensor network through the wired test channel;

步骤2:无线传感网的被测节点接收到测试命令后,在无线传感网运行过程中,被测节点在无线信道上发送或接收业务数据包时,都会产生封装了业务数据包的,并通过有线测试通道汇报给上位机;Step 2: After the node under test of the wireless sensor network receives the test command, during the operation of the wireless sensor network, when the node under test sends or receives a service data packet on the wireless channel, it will generate a packet of encapsulated service data. And report to the host computer through the wired test channel;

步骤3:无线传感网的被测节点收到上位机发送的结束测试命令后,停止向上位机汇报测试数据包;Step 3: After receiving the end test command sent by the host computer, the tested node of the wireless sensor network stops reporting the test data packet to the host computer;

步骤4:上位机对接收的测试数据包进行处理分析,计算无线传感网的数据包传输延迟、网络拓扑结构和丢包率;Step 4: The host computer processes and analyzes the received test data packets, and calculates the data packet transmission delay, network topology and packet loss rate of the wireless sensor network;

其中,所述每条有线测试通道包括下位机、测试背板和烧写模块,每个下位机通过有线连接的高速接口与一个测试背板相连;每个测试背板提供若干个低速接口,每个低速接口连接一个烧写模块;所述各测试背板间连接有时钟同步信号线,用于同步各个测试背板间的时钟。Wherein, each of the wired test channels includes a lower computer, a test backplane and a programming module, and each lower computer is connected to a test backplane through a wired high-speed interface; each test backplane provides several low-speed interfaces, each A low-speed interface is connected to a programming module; a clock synchronization signal line is connected between the test backplanes for synchronizing the clocks between the test backplanes.

本发明的有益效果是:The beneficial effects of the present invention are:

1、本测试系统通过一个标准的低速接口实现测试信息的采集,可以为各种软硬件结构的无线传感网提供测试服务。由于测试数据是通过有线通道采集的,不会干扰无线信道的正常测试环境。1. This test system realizes the collection of test information through a standard low-speed interface, and can provide test services for wireless sensor networks with various hardware and software structures. Since the test data is collected through the wired channel, it will not interfere with the normal test environment of the wireless channel.

2、本测试系统采用软硬件协同工作的同步机制,在硬件上,通过定时的同步脉冲就可以获得高精度,在具有较高的时间精度的前提下,由此可测量得到较为准确的传输延迟,并且还通过测量被测节点的空中传输延迟和低速接口传输延迟,并抵消这两类可变延迟对传输延迟的计算影响,最后,在测试背板上,通过定长分包技术,把变长的接收延迟过程,转化为定长的接收延迟过程,进一步提高了延迟计算的精度。2. This test system adopts the synchronization mechanism of software and hardware cooperation. On the hardware, high precision can be obtained through timing synchronization pulses. On the premise of high time precision, a more accurate transmission delay can be measured. , and also by measuring the air transmission delay and low-speed interface transmission delay of the node under test, and offsetting the influence of these two types of variable delays on the transmission delay calculation, finally, on the test backplane, through the fixed-length packet technology, the variable The long reception delay process is transformed into a fixed-length reception delay process, which further improves the accuracy of delay calculation.

3、测试背板提供数量众多的低速接口,为大量的被测节点提供连接通道,这种方式不但可以降低制造成本,而且将减少测试实验需要的测试背板数量;进而降低了需要同步的背板数量,不但降低了硬件数量,而且提高了测试背板间的同步精度。3. The test backplane provides a large number of low-speed interfaces to provide connection channels for a large number of nodes under test. This method can not only reduce manufacturing costs, but also reduce the number of test backplanes required for test experiments; thus reducing the number of backplanes that need to be synchronized. The number of boards not only reduces the number of hardware, but also improves the synchronization accuracy between test backplanes.

在上述技术方案的基础上,本发明还可以做如下改进。On the basis of the above technical solutions, the present invention can also be improved as follows.

进一步,所述测试数据包包括节点号字段、净荷长度字段、净荷字段、校验码、空中传输延迟、串口传输延迟,其中节点号中存储向上位机发送该测试数据包的节点的节点号,净荷长度字段中存储净荷字段的长度,净荷字段中存储该节点发送或接收的业务数据包,所述校验码字段存储测试数据包的循环冗余校验,所述空中传输延迟中存储的该节点发送或接收的业务数据包的空中传输延迟,所述串口传输延迟中存储的是该节点上一次向上位机发送测试数据包时的串口延迟。Further, the test data packet includes a node number field, a payload length field, a payload field, a check code, an air transmission delay, and a serial port transmission delay, wherein the node number of the node sending the test data packet to the upper computer is stored in the node number number, the length of the payload field is stored in the payload length field, the service data packet sent or received by the node is stored in the payload field, the check code field stores the cyclic redundancy check of the test data packet, and the air transmission The air transmission delay of the service data packet sent or received by the node is stored in the delay, and the serial port delay stored in the serial port transmission delay is the serial port delay when the node sent a test data packet to the host computer last time.

进一步,计算数据包传输延迟包括被测节点间传输业务数据包的空中传输延迟和被测节点上传测试数据包的串口传输延迟,具体计算步骤如下:Further, the calculation of data packet transmission delay includes the air transmission delay of the transmission of business data packets between the nodes under test and the serial port transmission delay of the test data packets uploaded by the nodes under test. The specific calculation steps are as follows:

空中传输延迟计算:被测节点在无线信道发送业务数据包时,记录每个业务数据包的发送启动时间戳和发送成功时间戳,利用发送成功时间戳减去发送启动时间戳,得到空中传输延迟,将空中传输延迟封装在本次汇报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算得到准确的空中延迟参数;被测节点在无线信道收到业务数据包后,向上位机上报的测试数据包中,空中传输延迟为零。Air transmission delay calculation: When the node under test sends business data packets on the wireless channel, it records the sending start time stamp and the sending success time stamp of each business data packet, and subtracts the sending start time stamp from the sending success time stamp to get the air transmission delay , encapsulate the air transmission delay in the test data packet reported this time and report it to the host computer through the wired test channel, and the host computer calculates the accurate air delay parameter through the correction algorithm; after the node under test receives the business data packet in the wireless channel , in the test data packet reported to the host computer, the air transmission delay is zero.

串口传输延迟计算:测试数据包上报给上位机时,记录每个测试数据包上报启动时间戳和上报成功时间戳,利用上报成功时间戳减去上报启动时间戳,得到串口传输延迟,将串口传输延迟封装在下一次上报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算出准确的串口延迟参数。Serial port transmission delay calculation: when the test data packet is reported to the host computer, record the report start time stamp and report success time stamp of each test data packet, subtract the report start time stamp from the report success time stamp to get the serial port transmission delay, and transmit the serial port The delay is encapsulated in the next test data packet to be reported to the host computer through the wired test channel, and the host computer calculates the accurate serial port delay parameters through the correction algorithm.

进一步,测试数据包传送到有线测试通道的测试背板处时,测试背板采用定长分割接收,为每个定长分组标记接收时间戳,将可变延迟变为固定延迟。Further, when the test data packet is transmitted to the test backplane of the wired test channel, the test backplane adopts fixed-length segmentation to receive, marks the receiving time stamp for each fixed-length packet, and changes the variable delay into a fixed delay.

进一步,获取传感网的拓扑结构的具体步骤:Further, specific steps to obtain the topology of the sensor network:

上位机采用数据驱动模式,根据用户指定的计算间隔,把测试过程分为若干个时间段,在每个时间段内,被测节点通过有线测试通道向上位机发送测试数据包以汇报每个被测节点的业务数据包传输数量,上位机进而汇总每条链路的业务数据包传输数量,获得链路的相关度,采用相关度高的链路,根据深度优先的拓扑树算法,获得稳定的网络拓扑机构。The upper computer adopts the data-driven mode, and divides the test process into several time periods according to the calculation interval specified by the user. In each time period, the tested node sends a test data packet to the upper computer through the wired test channel to report each tested data. The number of business data packets transmitted by the measurement node, the host computer then summarizes the number of business data packets transmitted by each link, and obtains the correlation degree of the link. Using a link with a high correlation degree, according to the depth-first topology tree algorithm, a stable network topology.

采用上述进一步方案的有益效果是:本测试方法采用数据驱动的模式,获得无线传感网的拓扑变化,不但具有广泛的适应性,而且通过链路的关联度指标,克服了拓扑变化的暂态过程对拓扑计算的影响。The beneficial effect of adopting the above-mentioned further scheme is: this test method adopts the data-driven mode to obtain the topology change of the wireless sensor network, which not only has a wide range of adaptability, but also overcomes the transient state of the topology change through the correlation index of the link. The impact of the process on topological computation.

进一步,丢包率计算步骤:Further, the packet loss rate calculation steps:

被测节点间传送的业务数据包中内嵌有序列号,被测节点在发送或接收业务数据包时,会将发送或接收的业务数据包备份到测试数据包的净荷字段,封装在测试数据包中通过有线测试通道传送给上位机,并存储在数据库中;The service data packets transmitted between the nodes under test have serial numbers embedded in them. When the nodes under test send or receive service data packets, they will back up the sent or received service data packets to the payload field of the test data packets and encapsulate them in the test The data packet is transmitted to the host computer through the wired test channel and stored in the database;

上位机从数据库中,根据测试数据包时间戳的升序,取出所有接收的测试数据包,依次解析每个测试数据包,读取测试数据包净荷字段中存储的数据包的序列号,根据序列号判断是否存在乱序和溢出情况,如果存在,对序列号进行相应的更新,将更新后的序列号放回数据库中,处理下一个测试数据包,直至所有测试数据包均处理完成,再以序列号升序方式取出所有测试数据包,计算缺失的序列号,进而计算丢包率。The host computer takes out all received test data packets from the database according to the ascending order of the test data packet time stamps, parses each test data packet in turn, reads the serial number of the data packet stored in the payload field of the test data packet, and according to the sequence Number to judge whether there is out-of-sequence and overflow. If there is, update the serial number accordingly, put the updated serial number back into the database, and process the next test data packet until all the test data packets are processed, and then use Take out all test data packets in ascending order of sequence numbers, calculate the missing sequence numbers, and then calculate the packet loss rate.

采用上述进一步方案的有益效果是:采用数据包顺序编码技术,有效解决了消息同步、重复传输、多径传输等问题导致的丢包率误差问题,实现了较高准确性的传感网丢包率的测量。The beneficial effect of adopting the above-mentioned further scheme is: adopting data packet sequential encoding technology, effectively solving the problem of packet loss rate error caused by problems such as message synchronization, repeated transmission, multi-path transmission, etc., and realizing a higher accuracy of sensor network packet loss rate measurement.

进一步,还包括实现被测节点远程烧写代码,具体步骤为:上位机编写至少两个节点号、信道号和发射功率均不同的基本烧写文件;通过比较烧写文件由于节点号、信道号和发送功率导致的差异,产生一个参数定位文件;根据基本烧写文件和其对应的参数定位文件,以及用户选择的烧写参数,生产所需的烧写文件;将烧写文件通过有线测试通道传送给相应的烧写模块,利用本地烧写技术,将代码烧写到被测节点上。Further, it also includes realizing the remote programming code of the tested node. The specific steps are: the upper computer writes at least two basic programming files with different node numbers, channel numbers and transmission power; According to the difference caused by the transmission power, a parameter positioning file is generated; according to the basic programming file and its corresponding parameter positioning file, as well as the programming parameters selected by the user, the required programming file is produced; the programming file is passed through the wired test channel Send it to the corresponding programming module, and use the local programming technology to program the code to the node under test.

采用上述进一步方案的有益效果是:本测试方法利用参数定位文件,实现了灵活的远程烧写功能,能适应各种类型节点的烧写代码变化,提供方便的节点号、信道号和发射功率配置。The beneficial effect of adopting the above-mentioned further scheme is: this test method uses the parameter positioning file to realize the flexible remote programming function, can adapt to the programming code changes of various types of nodes, and provides convenient node number, channel number and transmission power configuration .

本发明解决上述技术问题的另一技术方案如下:一种开放型无线传感网性能测试系统,其特征在于,包括上位机、若干条有线测试通道和若干个被测节点;所述上位机通过有线网络与若干条测试通道相连,每条测试通道的末端通过私有接口连接有一个被测节点;Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: an open wireless sensor network performance testing system, which is characterized in that it includes a host computer, several wired test channels and several tested nodes; The wired network is connected to several test channels, and the end of each test channel is connected to a node under test through a private interface;

所述上位机,其用于通过测试通道向被测节点发送测试命令,还用于对反馈的测试数据包进行处理分析,计算无线传感网的数据包传输延迟、网络拓扑结构和丢包率;所述测试通道,其用于实现被测节点与上位机测试命令的交互和测试数据的上报;所述被测节点,其用于接收测试命令,并产生测试数据,通过测试通道反馈给上位机;The upper computer is used to send a test command to the node under test through the test channel, and is also used to process and analyze the feedback test data packet, and calculate the packet transmission delay, network topology and packet loss rate of the wireless sensor network ; The test channel is used to realize the interaction between the tested node and the upper computer test command and the report of the test data; the tested node is used to receive the test command and generate test data, which is fed back to the upper position through the test channel machine;

其中,所述每条有线测试通道包括下位机、测试背板和烧写模块,每个下位机通过有线连接的高速接口与一个测试背板相连;每个测试背板提供若干个低速接口,每个低速接口连接一个烧写模块;所述各测试背板间连接有时钟同步信号线,用于同步各个测试背板间的时钟。Wherein, each of the wired test channels includes a lower computer, a test backplane and a programming module, and each lower computer is connected to a test backplane through a wired high-speed interface; each test backplane provides several low-speed interfaces, each A low-speed interface is connected to a programming module; a clock synchronization signal line is connected between the test backplanes for synchronizing the clocks between the test backplanes.

在上述技术方案的基础上,本发明还可以做如下改进。On the basis of the above technical solutions, the present invention can also be improved as follows.

进一步,所述烧写模块,还用于接收上位机发送的烧写文件,利用本地烧写技术,将代码烧写到被测节点上。Further, the programming module is also used to receive the programming file sent by the upper computer, and use the local programming technology to program the code to the node under test.

进一步,所述测试背板还用于对被测节点上报的数据采用定长分割接收,为每个定长分组标记接收时间戳,将可变延迟变为固定延迟。Further, the test backplane is also used to receive the data reported by the node under test by using fixed-length division, mark the receiving time stamp for each fixed-length packet, and change the variable delay into a fixed delay.

附图说明Description of drawings

图1为本发明一种开放型的无线传感网测试系统示意图;Fig. 1 is a kind of open wireless sensor network test system schematic diagram of the present invention;

图2为本发明所述测试背板、烧写模块和被测节点的连接关系图;Fig. 2 is the connection diagram of test backplane, programming module and measured node of the present invention;

图3为本发明所述一种开放型的无线传感网测试方法流程图Fig. 3 is a flow chart of an open wireless sensor network testing method according to the present invention

图4为本发明被测节点上报的测试数据包的格式图;Fig. 4 is the format diagram of the test packet reported by the tested node of the present invention;

图5为本发明软硬件协同工作的时钟同步信号流图;Fig. 5 is the clock synchronization signal flow diagram of the software and hardware cooperative work of the present invention;

图6为基于序列号的无线传感网丢包率计算流程图。Fig. 6 is a flow chart of calculating the packet loss rate of the wireless sensor network based on the serial number.

附图中,各标号所代表的部件列表如下:In the accompanying drawings, the list of parts represented by each label is as follows:

1、上位机,2、下位机,3、测试背板,4、烧写模块,5、被测节点。1. Upper computer, 2. Lower computer, 3. Test backplane, 4. Programming module, 5. Node under test.

具体实施方式Detailed ways

以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。The principles and features of the present invention are described below in conjunction with the accompanying drawings, and the examples given are only used to explain the present invention, and are not intended to limit the scope of the present invention.

如图1所示,本测试系统中,只有一台上位机1,该设备通过以太网与N个下位机2物理相连,上位机1和下位机2通过TCP/IP协议实现信息交互。下位机2利用高速接口与测试背板3相连,采用串行外设协议(SPI)实现信息交互。每个测试背板3下连8个烧写模块4,每个烧写模块4连接一个被测节点5。As shown in Figure 1, in this test system, there is only one upper computer 1, which is physically connected to N lower computers 2 through Ethernet, and the upper computer 1 and lower computers 2 realize information exchange through the TCP/IP protocol. The lower computer 2 is connected to the test backplane 3 through a high-speed interface, and uses the Serial Peripheral Protocol (SPI) to realize information exchange. Eight programming modules 4 are connected to each test backplane 3 , and each programming module 4 is connected to a node 5 under test.

如图2所示,测试背板3通过9针的低速连线与烧写模块4相连,其中1和2线用于为烧写模块供电,3和4线用作串口(速率为115200bps)与烧写模块通信,5和6线用于为被测节点供电,7和8线用作串口(速率为115200bps)与被测节点5通信。烧写模块4利用内部连线与被测节点5相连,采用私有协议时下信息交互,其中10线为共地功能,11和12用作串口(速率为115200bps)与被测节点通信,13和14线用于控制被测节点,使之进入烧写状态。As shown in Figure 2, the test backplane 3 is connected to the programming module 4 through a 9-pin low-speed connection, where 1 and 2 wires are used to supply power to the programming module, and 3 and 4 wires are used as serial ports (at a rate of 115200bps) and For programming module communication, wires 5 and 6 are used to supply power to the node under test, and wires 7 and 8 are used as serial ports (at a rate of 115200bps) to communicate with node 5 under test. The programming module 4 is connected to the node under test 5 by means of an internal connection, and uses a private protocol for current information interaction, among which line 10 is a common ground function, lines 11 and 12 are used as serial ports (at a rate of 115200bps) to communicate with the node under test, and lines 13 and 14 are used for communication with the node under test. The line is used to control the node under test to make it enter the programming state.

如图3所示,一种开放型的无线传感网性能测试方法,As shown in Figure 3, an open wireless sensor network performance testing method,

步骤1:上位机通过有线测试通道向无线传感网的被测节点发送测试命令;Step 1: The host computer sends a test command to the tested node of the wireless sensor network through the wired test channel;

步骤2:无线传感网的被测节点接收到测试命令后,在无线传感网运行过程中,被测节点在无线信道上发送或接收业务数据包时,都会产生封装了业务数据包的测试数据包,并通过有线测试通道汇报给上位机;Step 2: After the node under test of the wireless sensor network receives the test command, during the operation of the wireless sensor network, when the node under test sends or receives the service data packet on the wireless channel, it will generate a test packet encapsulated with the service data packet. Data packets, and report to the host computer through the wired test channel;

步骤3:无线传感网的被测节点收到上位机发送的结束测试命令后,停止向上位机汇报测试数据包;Step 3: After receiving the end test command sent by the host computer, the tested node of the wireless sensor network stops reporting the test data packet to the host computer;

步骤4:上位机对接收的测试数据包进行处理分析,计算无线传感网的数据包传输延迟、网络拓扑结构和丢包率;Step 4: The host computer processes and analyzes the received test data packets, and calculates the data packet transmission delay, network topology and packet loss rate of the wireless sensor network;

其中,所述每条有线测试通道包括下位机、测试背板和烧写模块,每个下位机通过有线连接的高速接口与一个测试背板相连;每个测试背板提供若干个低速接口,每个低速接口连接一个烧写模块;所述各测试背板间连接有时钟同步信号线,用于同步各个测试背板间的时钟。Wherein, each of the wired test channels includes a lower computer, a test backplane and a programming module, and each lower computer is connected to a test backplane through a wired high-speed interface; each test backplane provides several low-speed interfaces, each A low-speed interface is connected to a programming module; a clock synchronization signal line is connected between the test backplanes for synchronizing the clocks between the test backplanes.

如图4所示,测试节点通过有线测试信道向上位机上报的测试数据包包括节点号字段、净荷长度字段、净荷字段、校验码、空中传输延迟、串口传输延迟,其中节点号中存储向上位机发送该测试数据包的节点的节点号,净荷长度字段中存储净荷字段的长度,净荷字段中存储该节点发送或接收的业务数据包,所述校验码字段存储测试数据包的循环冗余校验,所述空中传输延迟中存储的该节点发送或接收的业务数据包的空中传输延迟,所述串口传输延迟中存储的是该节点上一次向上位机发送测试数据包时的串口延迟。其中节点号的长度为2个字节,净荷长度为2个字节,净荷内容为变长,校验码长度为2个字节;空中传输延迟的长度为2个字节,所表示的单位为毫秒;串口传输延迟的长度为2个字节,所表示的单位为毫秒。As shown in Figure 4, the test data packet reported by the test node to the host computer through the wired test channel includes the node number field, the payload length field, the payload field, the check code, the air transmission delay, and the serial port transmission delay. Store the node number of the node that sends the test data packet to the upper computer, store the length of the payload field in the payload length field, store the service data packet sent or received by the node in the payload field, and store the test code field in the payload field. The cyclic redundancy check of the data packet, the air transmission delay of the service data packet sent or received by the node stored in the air transmission delay, and the test data sent by the node to the host computer last time stored in the serial port transmission delay The serial delay of the package. The length of the node number is 2 bytes, the length of the payload is 2 bytes, the payload content is variable length, and the length of the check code is 2 bytes; the length of the air transmission delay is 2 bytes, which means The unit is millisecond; the length of the serial port transmission delay is 2 bytes, and the expressed unit is millisecond.

本发明所述系统具有以下功能:The system of the present invention has the following functions:

1.高精度延迟测量1. High precision delay measurement

a.现有的测试技术中,大多采用软件来实现时间同步,这种时间同步都是在下位机之间实现的。软件同步存在两点不足,一是同步精度不高;二是数据包需要经过测试背板的缓冲队列,由于缓冲队列导致的延迟是可变的,在下位机上提供时间戳,会导致更低的时间精度。a. In the existing testing technologies, software is mostly used to realize time synchronization, and this kind of time synchronization is realized between the lower computers. There are two deficiencies in software synchronization. One is that the synchronization accuracy is not high; the other is that the data packets need to pass through the buffer queue of the test backplane. The delay caused by the buffer queue is variable, and providing a timestamp on the lower computer will lead to a lower time precision.

本发明采用软硬件协同工作的同步机制,通过定时的同步脉冲就可以获得高精度的同步时钟。The invention adopts the synchronous mechanism of software and hardware cooperating, and can obtain a high-precision synchronous clock through timing synchronous pulses.

如图5所示,参与测试的N个测试背板中,测试背板1为主时钟控制器,其它测试背板为从时钟控制器。测试背板1在每个整数分钟过10秒时,发送一次软件时钟汇报信号S1到下位机1,并被中转到上位机。信号S1的内容为测试背板1发送信号S1时的当前时钟值。上位机收到信号S1后,发送软件时钟更新信号S2到其它下位机,并被中转到相应的测试背板,信号S2的数值等于信号S1的数值。测试背板1在每个整数分钟过30秒的时刻,在与其它测试背板相连的硬件同步线上发送信号S3。测试背板1在硬件同步线上通常为低,信号S3就使得硬件同步线瞬间置高。其它测试背板的时钟同步算法如下。收到信号S2后,就把本地时钟设置为S2;收到信号S3后,本地时钟的分钟数不变,秒钟数设定为30秒。As shown in FIG. 5 , among the N test backplanes participating in the test, test backplane 1 is a master clock controller, and other test backplanes are slave clock controllers. The test backplane 1 sends a software clock report signal S1 to the lower computer 1 once every integer minute passes 10 seconds, and is relayed to the upper computer. The content of the signal S1 is the current clock value when the test backplane 1 sends the signal S1. After the upper computer receives the signal S1, it sends a software clock update signal S2 to other lower computers, and is transferred to the corresponding test backplane. The value of the signal S2 is equal to the value of the signal S1. The test backplane 1 sends a signal S3 on the hardware synchronization line connected to other test backplanes at the moment when every integer minute passes 30 seconds. The test backplane 1 is usually low on the hardware synchronization line, and the signal S3 makes the hardware synchronization line high instantaneously. The clock synchronization algorithms of other test backplanes are as follows. After the signal S2 is received, the local clock is set to S2; after the signal S3 is received, the minutes of the local clock remain unchanged, and the seconds are set to 30 seconds.

b.在被测节点间的数据通信过程中,业务数据包传输要经历多个延迟,节点内的调度延迟、无线发送模块内的排队延迟,发送过程中的载波侦听延迟和数据碰撞导致的重传延迟,这些延迟长度往往具有变长的特性,会导致较大的延迟计算误差。空中传输延迟计算:被测节点在无线信道发送业务数据包时,记录每个业务数据包的发送启动时间戳和发送成功时间戳,利用发送成功时间戳减去发送启动时间戳,得到空中传输延迟,将空中传输延迟封装在本次汇报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算得到准确的空中延迟参数;被测节点在无线信道收到业务数据包后,向上位机上报的测试数据包中,空中传输延迟为零。b. During the data communication process between the nodes under test, the transmission of business data packets has to experience multiple delays, such as scheduling delays within the nodes, queuing delays within the wireless transmission module, carrier sense delays during transmission, and data collisions. Retransmission delays, these delay lengths often have a variable length, which will lead to large delay calculation errors. Air transmission delay calculation: When the node under test sends business data packets on the wireless channel, it records the sending start time stamp and the sending success time stamp of each business data packet, and subtracts the sending start time stamp from the sending success time stamp to get the air transmission delay , encapsulate the air transmission delay in the test data packet reported this time and report it to the host computer through the wired test channel, and the host computer calculates the accurate air delay parameter through the correction algorithm; after the node under test receives the business data packet in the wireless channel , in the test data packet reported to the host computer, the air transmission delay is zero.

在被测节点间上报测试数据包的过程中,测试数据包传输要经历多个延迟,节点内的调度延迟、低速发送模块内的排队延迟,这些延迟长度往往具有变长的特性,会导致较大的性能分析误差。串口传输延迟计算:测试数据包上报给上位机时,记录每个测试数据包上报启动时间戳和上报成功时间戳,利用上报成功时间戳减去上报启动时间戳,得到串口传输延迟,将串口传输延迟封装在下一次上报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算出准确的串口延迟参数。In the process of reporting test data packets between the nodes under test, the transmission of test data packets has to experience multiple delays, such as scheduling delays in nodes and queuing delays in low-speed sending modules. Large profiling errors. Serial port transmission delay calculation: when the test data packet is reported to the host computer, record the report start time stamp and report success time stamp of each test data packet, subtract the report start time stamp from the report success time stamp to get the serial port transmission delay, and transmit the serial port The delay is encapsulated in the next test data packet to be reported to the host computer through the wired test channel, and the host computer calculates the accurate serial port delay parameters through the correction algorithm.

另外,测试数据包传送到有线测试通道的测试背板处时,测试背板采用定长分割接收,为每个定长分组标记接收时间戳,将可变延迟变为固定延迟,进一步提高了计算延迟的精度。测具体可以把长度可变的测试数据包截断为每10个字节一个分组,并为每个分组增加一个时间戳。In addition, when the test data packet is transmitted to the test backplane of the wired test channel, the test backplane adopts fixed-length division to receive, marks the receiving time stamp for each fixed-length packet, changes the variable delay into a fixed delay, and further improves the calculation The precision of the delay. Specifically, the test data packet with variable length can be truncated into a packet every 10 bytes, and a timestamp can be added to each packet.

2.普适性的拓扑计算2. Universal Topological Computing

由于传感网无线信道易受外部干扰,拓扑结构会发生动态变化,所以会出现短暂的路由和拓扑过渡期,所以传统方法容易受到过渡期的干扰,计算的拓扑结构不准确;传感网种类繁多,会采用各种路由协议和拓扑控制算法,为了使得拓扑分析算法具有广泛的适用性,采用了数据驱动的模式。虽然传感网的拓扑控制和路由计算方法多种多样,但通过数据流向都可以有效地揭示传感网的实际拓扑结构。本方法把测试过程分为用户指定的若干时间段,根据每个时间段的数据流特性计算得到该时间段的拓扑结构。Since the wireless channel of the sensor network is susceptible to external interference, the topology structure will change dynamically, so there will be a short routing and topology transition period, so the traditional method is easily disturbed by the transition period, and the calculated topology structure is inaccurate; the sensor network type Various routing protocols and topology control algorithms are used. In order to make the topology analysis algorithm widely applicable, a data-driven model is adopted. Although there are various methods for topology control and routing calculation of sensor networks, the actual topology of sensor networks can be effectively revealed through data flow. This method divides the test process into several time periods specified by the user, and calculates the topology structure of the time period according to the data flow characteristics of each time period.

上位机采用数据驱动模式,根据用户指定的计算间隔,把测试过程分为若干个时间段,在每个时间段内,被测节点通过有线测试通道向上位机发送测试数据包以汇报每个被测节点的业务数据包传输数量,上位机进而汇总每条链路的业务数据包传输数量,获得链路的相关度,采用相关度高的链路,根据深度优先的拓扑树算法,获得稳定的网络拓扑机构。The upper computer adopts the data-driven mode, and divides the test process into several time periods according to the calculation interval specified by the user. In each time period, the tested node sends a test data packet to the upper computer through the wired test channel to report each tested data. The number of business data packets transmitted by the measurement node, the host computer then summarizes the number of business data packets transmitted by each link, and obtains the correlation degree of the link. Using a link with a high correlation degree, according to the depth-first topology tree algorithm, a stable network topology.

具体获取链路关联度的实现过程如下:The specific implementation process of obtaining the link correlation degree is as follows:

首先初始化所有被测节点的关联度为0,其次,从sink节点开始,获得sink节点的子节点,并根据这些子节点与sink节点的通信量设定这些子节点到sink节点的关联度;再次,找到这些子节点的孙节点,并计算孙节点到子节点的关联度,如果得到的关联度大于孙节点当前的关联度,就更改孙节点的父节点;否则,就不更新。Firstly, initialize the association degree of all measured nodes to 0, and secondly, start from the sink node, obtain the sub-nodes of the sink node, and set the association degree from these sub-nodes to the sink node according to the communication volume between these sub-nodes and the sink node; again , Find the grandchildren of these child nodes, and calculate the degree of association from the grandchildren to the child nodes, if the obtained degree of association is greater than the current degree of association of the grandchildren, change the parent node of the grandchildren; otherwise, do not update.

采用以上深度优先的迭代过程,直到所有的节点均被遍历。The above depth-first iterative process is adopted until all nodes are traversed.

3.准确的丢包率统计3. Accurate packet loss rate statistics

在丢包率的计算过程中,由于测试启动和测试结束命令难以在大量被测节点间同步执行,重复传输和多径传输等原因,会导致接收到的多份相同的业务数据包的情况出现,导致丢包率的计算准确度不高的问题。为此,在各个被测节点间传递的业务数据包内会嵌有序列号,每个被测节点内设有若干个目的地址计数器,每个目的地址维护一个独立的计数器,该节点每发送一个业务数据包,其对应目的地址的计数器就递增。每个被测节点在发送和接收业务数据包时都会向上位机上报测试数据包,其中测试数据包的净荷字段内封装的即为该节点发送或接收的业务数据包(包含有序列号)。In the process of calculating the packet loss rate, due to the difficulty of synchronous execution of the test start and test end commands among a large number of tested nodes, repeated transmission and multi-path transmission, etc., it will cause multiple copies of the same service data packets to be received. , leading to the problem that the calculation accuracy of the packet loss rate is not high. For this reason, serial numbers will be embedded in the business data packets transmitted between each tested node. Each tested node has several destination address counters, and each destination address maintains an independent counter. Every time the node sends a For a service data packet, the counter corresponding to the destination address is incremented. Each node under test will report a test data packet to the host computer when sending and receiving business data packets, where the payload field of the test data packet encapsulates the business data packet sent or received by the node (including the serial number) .

上位机从数据库中,根据测试数据包时间戳的升序,取出所有测试数据包,依次解析每个测试数据包,读取测试数据包净荷字段中存储的业务数据包的序列号,根据序列号判断是否存在乱序和溢出情况,如果存在,对序列号进行相应的更新,将更新后的序列号放回数据库中,处理下一个测试数据包,直至所有测试数据包均处理完成,再以序列号升序方式取出所有测试数据包,计算缺失的序列号,进而计算丢包率。The host computer takes out all the test data packets from the database according to the ascending order of the time stamp of the test data packets, parses each test data packet in turn, reads the serial number of the business data packet stored in the payload field of the test data packet, and according to the serial number Determine whether there is disorder and overflow. If so, update the serial number accordingly, put the updated serial number back into the database, and process the next test data packet until all test data packets are processed. Take out all test data packets in ascending order, calculate the missing sequence numbers, and then calculate the packet loss rate.

对于单个sink节点的网络,其它节点的业务数据包都是发送到sink节点的,所以每个感知节点只需要维护一个计数器,每发送一个业务数据包后,该计数器就递增。这个计数器的存储大小为2个字节,初始值为0x0,最大值为0xFFFF。当该计数器的值到达0xFFFF后,由于计数器溢出的原因,下一个值又为0x0。For a network with a single sink node, the service data packets of other nodes are sent to the sink node, so each sensing node only needs to maintain a counter, and the counter is incremented every time a service data packet is sent. The storage size of this counter is 2 bytes, the initial value is 0x0, and the maximum value is 0xFFFF. When the value of the counter reaches 0xFFFF, due to the overflow of the counter, the next value is 0x0 again.

测试数据包保存在上位机的数据库中时,采用4个字节来保存业务数据包序列号。通过如图6所示算法解决计算器溢出的问题,该算法还需要考虑业务数据包到达乱序的影响。When the test data packet is stored in the database of the host computer, 4 bytes are used to store the sequence number of the service data packet. The problem of calculator overflow is solved through the algorithm shown in Figure 6, which also needs to consider the impact of out-of-order arrival of service data packets.

步骤1:从数据库中,依据测试数据包时间戳的升序,取出所有测试数据包,读入第一个测试数据包中业务数据包的序列号nseq;Step 1: From the database, according to the ascending order of the time stamp of the test data packets, take out all the test data packets, and read in the sequence number nseq of the service data packet in the first test data packet;

步骤2:并对参数count、last_seq和M赋初值,其中count是溢出发生的次数,last_seq是最新的已接收序号,M是两个字节存储空间对应的最小溢出值,本系统中为0x10000;Step 2: Assign initial values to the parameters count, last_seq and M, where count is the number of overflow occurrences, last_seq is the latest received sequence number, and M is the minimum overflow value corresponding to the two-byte storage space, which is 0x10000 in this system ;

步骤3:根据比较nseq与last_seq的关系判断是否发生溢出,如果大于执行步骤4;否则执行步骤5;Step 3: Judging whether overflow occurs according to the relationship between nseq and last_seq, if it is greater than that, execute step 4; otherwise, execute step 5;

步骤4:根据比较nseq与last_seq+M/2的关系判断增长幅度是否在合理范围内,以判断是否存在乱序,如果小于则按照(a)模块更新nseq,如果大于则按照(b)模块更新nseq;Step 4: Judging whether the growth rate is within a reasonable range based on the relationship between nseq and last_seq+M/2, to determine whether there is disorder. If it is less than, update nseq according to (a) module, and if it is larger, update nseq according to (b) module nseq;

步骤5:根据比较判断nseq与last_seq-M/2的关系判断增长幅度是否在合理范围内,如果小于则按照(c)模块更新nseq,如果大于则按照(d)模块更新nseq;Step 5: Judging the relationship between nseq and last_seq-M/2 according to the comparison to determine whether the growth rate is within a reasonable range, if it is less than, update nseq according to (c) module, if it is greater than, update nseq according to (d) module;

其中,(a)模块中,新测试数据包的序列号nseq大于last_seq,又在合理的增长幅度内,代表序列号正常增加的情况,参数last_seq正常更新即可,比如nseq为5,last_seq为4;(b)模块中,新测试数据包的序列号nseq大于last_seq,但超出了合理的增长幅度,表示前面出现了溢出,当前又收到一个乱序的业务数据包,参数last_seq和count都不需要变更,比如当前last_seq为0,nseq为0xFFFE,连续收到三个序列号为(0xFFFF,0x0,0xFFFE)的数据包,就会进入这样的情况;(c)模块中,新测试数据包的序列号nseq小于last_seq,但不在合理的增长幅度内,代表溢出发生的情况,last_seq正常更新,但count参数需要递增,比如nseq为0x0,last_seq为0xFFFF;(d)模块中,新测试数据包的序列号nseq小于last_seq,又在合理的增长幅度内,代表乱序的情况,参数last_seq不需要更新,比如nseq为8,last_seq为9,表明8号业务数据包比9号业务数据包早发送,但后到达目的节点。分别按照a、b、c、d中的情况对业务数据包的nseq进行更新,把更新的序列号nseq回写到数据库,再取出下一个测试数据包中业务数据包的序列号,并重复以上操作,直到结束。Among them, in the (a) module, the sequence number nseq of the new test data packet is greater than last_seq, and it is within a reasonable growth range, which means that the sequence number increases normally. The parameter last_seq can be updated normally, for example, nseq is 5 and last_seq is 4 ;(b) In the module, the sequence number nseq of the new test data packet is greater than last_seq, but it exceeds the reasonable growth rate, indicating that there is an overflow in the front, and currently another out-of-order business data packet is received, and the parameters last_seq and count are not It needs to be changed. For example, the current last_seq is 0, nseq is 0xFFFE, and it will enter such a situation after receiving three consecutive data packets with serial numbers (0xFFFF, 0x0, 0xFFFE); (c) In the module, the new test data packet The sequence number nseq is smaller than last_seq, but not within a reasonable growth range, which means that overflow occurs. last_seq is updated normally, but the count parameter needs to be incremented. For example, nseq is 0x0 and last_seq is 0xFFFF; in (d) module, the new test data packet The sequence number nseq is smaller than last_seq, and it is within a reasonable growth range, which means out of order. The parameter last_seq does not need to be updated. For example, nseq is 8 and last_seq is 9, indicating that the No. 8 service data packet is sent earlier than the No. 9 service data packet. But then reach the destination node. Update the nseq of the business data packet according to the conditions in a, b, c, and d respectively, write the updated serial number nseq back to the database, and then take out the serial number of the business data packet in the next test data packet, and repeat the above operation until the end.

经过操作后,数据库的业务数据包序列号就没有溢出问题了,于是以业务数据包序列号的升序方式取出所有测试数据包,再计算其中缺失的序列号,就可以得到丢包率了。After the operation, the serial number of the business data packet in the database does not overflow, so all the test data packets are taken out in ascending order of the serial number of the business data packet, and then the missing serial number is calculated to obtain the packet loss rate.

4.远程烧写4. Remote programming

采用传感器节点开发平台编译出的烧写代码都是针对特定节点号、信道号和发射功率配置的,在远程烧写时,需要根据测试场景需求灵活配置为不同的初始化值。通过比较不同节点号的烧写代码差异,就得到节点号的编码位置;通过比较不同信道号的烧写代码差异,就得到信道号的编码位置;通过比较不同发射功率的烧写代码差异,就得到发射功率的编码位置。把以上位置信息,通过把这些编码位置放置到烧写代码对应的参数定位文件中,就可以灵活地远程烧写出各种需要的节点号、信道号和发射功率的节点了。The programming code compiled by the sensor node development platform is configured for a specific node number, channel number, and transmission power. When programming remotely, it needs to be flexibly configured to different initialization values according to the requirements of the test scenario. By comparing the programming code differences of different node numbers, the coding position of the node number is obtained; by comparing the programming code differences of different channel numbers, the coding position of the channel number is obtained; by comparing the programming code differences of different transmission powers, the Get the encoded position of the transmit power. By putting the above location information into the parameter positioning file corresponding to the programming code, you can flexibly and remotely program various required node numbers, channel numbers and transmit power nodes.

在编译被测节点的烧写文件时,编译出节点号为1和节点号为2的两个烧写文件,通过软件自动比较这两个文件的差异,并将差异的位置输出到参数定位文件的节点号定位段中。再编译出信道号为20和信道号为21的两个烧写文件,通过软件自动比较这两个文件的差异,并将差异的位置输出到参数定位文件的信道号定位段中。再编译出发射功率为25和信道号为26的两个烧写文件,通过软件自动比较这两个文件的差异,并将差异的位置输出到参数定位文件的发射功率定位段中。When compiling the programming file of the tested node, two programming files with node number 1 and node number 2 are compiled, and the difference between the two files is automatically compared by the software, and the position of the difference is output to the parameter positioning file The node number of the location segment. Then compile two programming files with channel number 20 and channel number 21, automatically compare the differences between the two files through the software, and output the position of the difference to the channel number positioning section of the parameter positioning file. Then compile two programming files with transmit power 25 and channel number 26, automatically compare the differences between the two files through the software, and output the position of the difference to the transmit power positioning section of the parameter positioning file.

在执行远程烧写命令时,以用户配置的节点号、信道号和发射功率为依据,根据参数定位文件内的节点号定位段、信道号定位段和发射功率定位段所指示的偏移量,修改烧写文件。再将定制的烧写文件发送到烧写模块,完成最后的本地烧写工作,就可以实现被测节点的代码更新功能。这种远程烧写能力,可以方便测试场景的快速部署。When executing the remote programming command, based on the node number, channel number and transmission power configured by the user, according to the offset indicated by the node number positioning section, channel number positioning section and transmission power positioning section in the parameter positioning file, Modify the burning file. Then send the customized programming file to the programming module to complete the final local programming work, and then the code update function of the node under test can be realized. This remote programming capability can facilitate the rapid deployment of test scenarios.

5.多样性的能量消耗展示5. Diversified energy consumption display

在对被测节点开展测试的过程中,测试背板以每秒三十万次的速率对被测节点的电流值采样。由一万个采样点,计算一个电流平均值和方差值。在能量消耗展示图中,同时展示平均电流曲线和电流方差曲线。In the process of testing the node under test, the test backplane samples the current value of the node under test at a rate of 300,000 times per second. From 10,000 sampling points, calculate a current average value and variance value. In the energy consumption display graph, the average current curve and the current variance curve are displayed at the same time.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (10)

1.一种开放型无线传感网性能测试方法,其特征在于,包括如下步骤:1. an open wireless sensor network performance testing method, is characterized in that, comprises the steps: 步骤1:上位机通过有线测试通道向无线传感网的被测节点发送测试命令;Step 1: The host computer sends a test command to the tested node of the wireless sensor network through the wired test channel; 步骤2:无线传感网的被测节点接收到测试命令后,在无线传感网运行过程中,被测节点在无线信道上发送或接收业务数据包时,都会产生封装了业务数据包的测试数据包,并通过有线测试通道汇报给上位机;Step 2: After the node under test of the wireless sensor network receives the test command, during the operation of the wireless sensor network, when the node under test sends or receives the service data packet on the wireless channel, it will generate a test packet encapsulated with the service data packet. Data packets, and report to the host computer through the wired test channel; 步骤3:无线传感网的被测节点收到上位机发送的结束测试命令后,停止向上位机汇报测试数据包;Step 3: After receiving the end test command sent by the host computer, the tested node of the wireless sensor network stops reporting the test data packet to the host computer; 步骤4:上位机对接收的测试数据包进行处理分析,计算无线传感网的数据包传输延迟、网络拓扑结构和丢包率;Step 4: The host computer processes and analyzes the received test data packets, and calculates the data packet transmission delay, network topology and packet loss rate of the wireless sensor network; 其中,所述每条有线测试通道包括下位机、测试背板和烧写模块,每个下位机通过有线连接的高速接口与一个测试背板相连;每个测试背板提供若干个低速接口,每个低速接口连接一个烧写模块;所述各测试背板间连接有时钟同步信号线,用于同步各个测试背板间的时钟。Wherein, each of the wired test channels includes a lower computer, a test backplane and a programming module, and each lower computer is connected to a test backplane through a wired high-speed interface; each test backplane provides several low-speed interfaces, each A low-speed interface is connected to a programming module; a clock synchronization signal line is connected between the test backplanes for synchronizing the clocks between the test backplanes. 2.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,所述测试数据包包括节点号字段、净荷长度字段、净荷字段、校验码、空中传输延迟、串口传输延迟,其中节点号中存储向上位机发送该测试数据包的节点的节点号,净荷长度字段中存储净荷字段的长度,净荷字段中存储该节点发送或接收的业务数据包,所述校验码字段存储测试数据包的循环冗余校验,所述空中传输延迟中存储的该节点发送或接收的业务数据包的空中传输延迟,所述串口传输延迟中存储的是该节点上一次向上位机发送测试数据包时的串口延迟。2. a kind of open wireless sensor network performance test method according to claim 1, is characterized in that, described test packet comprises node number field, payload length field, payload field, check code, air transmission delay , Serial port transmission delay, wherein the node number stores the node number of the node sending the test data packet to the upper computer, the payload length field stores the length of the payload field, and the payload field stores the service data packet sent or received by the node , the check code field stores the cyclic redundancy check of the test data packet, the air transmission delay of the service data packet sent or received by the node stored in the air transmission delay, and the serial port transmission delay stores the The serial port delay when the node sent a test packet to the host computer last time. 3.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,计算数据包传输延迟包括被测节点间传输业务数据包的空中传输延迟和被测节点上传测试数据包的串口传输延迟,具体计算步骤如下:3. a kind of open wireless sensor network performance test method according to claim 1, is characterized in that, calculates the data packet transmission delay and comprises the air transmission delay of the transmission service data packet between the nodes under test and the upload test data packet of the node under test The serial port transmission delay, the specific calculation steps are as follows: 空中传输延迟计算:被测节点在无线信道发送业务数据包时,记录每个业务数据包的发送启动时间戳和发送成功时间戳,利用发送成功时间戳减去发送启动时间戳,得到空中传输延迟,将空中传输延迟封装在本次汇报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算得到准确的空中延迟参数;被测节点在无线信道收到业务数据包后,向上位机上报的测试数据包中,空中传输延迟为零;Air transmission delay calculation: When the node under test sends business data packets on the wireless channel, it records the sending start time stamp and the sending success time stamp of each business data packet, and subtracts the sending start time stamp from the sending success time stamp to get the air transmission delay , encapsulate the air transmission delay in the test data packet reported this time and report it to the host computer through the wired test channel, and the host computer calculates the accurate air delay parameter through the correction algorithm; after the node under test receives the business data packet in the wireless channel , in the test data packet reported to the host computer, the air transmission delay is zero; 串口传输延迟计算:测试数据包上报给上位机时,记录每个测试数据包上报启动时间戳和上报成功时间戳,利用上报成功时间戳减去上报启动时间戳,得到串口传输延迟,将串口传输延迟封装在下一次上报的测试数据包中通过有线测试通道上报给上位机,上位机通过修正算法,计算出准确的串口延迟参数。Serial port transmission delay calculation: when the test data packet is reported to the host computer, record the report start time stamp and report success time stamp of each test data packet, subtract the report start time stamp from the report success time stamp to get the serial port transmission delay, and transmit the serial port The delay is encapsulated in the next test data packet to be reported to the host computer through the wired test channel, and the host computer calculates the accurate serial port delay parameters through the correction algorithm. 4.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,测试数据包传送到有线测试通道的测试背板处时,测试背板采用定长分割接收,为每个定长分组标记接收时间戳,将可变延迟变为固定延迟。4. a kind of open wireless sensor network performance testing method according to claim 1, it is characterized in that, when test data packet is sent to the test backboard place of wired test channel, test backboard adopts fixed-length division to receive, for each A fixed-length packet marks the received timestamp, changing the variable delay into a fixed delay. 5.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,获取传感网的拓扑结构的具体步骤:5. a kind of open wireless sensor network performance test method according to claim 1, is characterized in that, obtains the concrete steps of the topology of sensor network: 上位机采用数据驱动模式,根据用户指定的计算间隔,把测试过程分为若干个时间段,在每个时间段内,被测节点通过有线测试通道向上位机发送测试数据包以汇报每个被测节点的业务数据包传输数量,上位机进而汇总每条链路的业务数据包传输数量,获得链路的相关度,采用相关度高的链路,根据深度优先的拓扑树算法,获得稳定的网络拓扑机构。The upper computer adopts the data-driven mode, and divides the test process into several time periods according to the calculation interval specified by the user. In each time period, the tested node sends a test data packet to the upper computer through the wired test channel to report each tested data. The number of business data packets transmitted by the measurement node, the host computer then summarizes the number of business data packets transmitted by each link, and obtains the correlation degree of the link. Using a link with a high correlation degree, according to the depth-first topology tree algorithm, a stable network topology. 6.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,丢包率计算步骤:6. a kind of open wireless sensor network performance testing method according to claim 1, is characterized in that, packet loss rate calculation step: 被测节点间传送的业务数据包中内嵌有序列号,被测节点在发送或接收业务数据包时,会将发送或接收的业务数据包备份到测试数据包的净荷字段,封装在测试数据包中通过有线测试通道传送给上位机,并存储在数据库中;The service data packets transmitted between the nodes under test have serial numbers embedded in them. When the nodes under test send or receive service data packets, they will back up the sent or received service data packets to the payload field of the test data packets and encapsulate them in the test The data packet is transmitted to the host computer through the wired test channel and stored in the database; 上位机从数据库中,根据测试数据包时间戳的升序,取出所有接收的测试数据包,依次解析每个测试数据包,读取测试数据包净荷字段中存储的业务数据包的序列号,根据序列号判断是否存在乱序和溢出情况,如果存在,对序列号进行相应的更新,将更新后的序列号放回数据库中,处理下一个测试数据包,直至所有测试数据包均处理完成,再以序列号升序方式取出所有测试数据包,计算缺失的序列号,进而计算丢包率。The host computer takes out all received test data packets from the database according to the ascending order of the test data packet time stamps, parses each test data packet in turn, and reads the serial number of the business data packet stored in the payload field of the test data packet, according to The serial number judges whether there is disorder and overflow. If there is, update the serial number accordingly, put the updated serial number back into the database, and process the next test data packet until all the test data packets are processed. Take out all test data packets in ascending order of sequence number, calculate the missing sequence number, and then calculate the packet loss rate. 7.根据权利要求1所述一种开放型无线传感网性能测试方法,其特征在于,还包括实现被测节点远程烧写代码,具体步骤为:上位机编写至少两个节点号、信道号和发射功率均不同的基本烧写文件;通过比较烧写文件由于节点号、信道号和发送功率导致的差异,产生一个参数定位文件;根据基本烧写文件和其对应的参数定位文件,以及用户选择的烧写参数,生产所需的烧写文件;将烧写文件通过有线测试通道传送给相应的烧写模块,利用本地烧写技术,将代码烧写到被测节点上。7. A kind of open type wireless sensor network performance test method according to claim 1, is characterized in that, also comprises realizing the remote programming code of the node under test, concrete steps are: upper computer writes at least two node numbers, channel number The basic programming file with different transmission power; by comparing the difference between the programming file due to the node number, channel number and transmission power, a parameter positioning file is generated; according to the basic programming file and its corresponding parameter positioning file, and the user Select the programming parameters to produce the required programming files; transmit the programming files to the corresponding programming module through the wired test channel, and use the local programming technology to program the code to the node under test. 8.一种开放型无线传感网性能测试系统,其特征在于,包括上位机、若干条有线测试通道和若干个被测节点;所述上位机通过有线网络与若干条测试通道相连,每条测试通道的末端通过私有接口连接有一个被测节点;8. An open wireless sensor network performance testing system is characterized in that it comprises an upper computer, several wired test channels and several tested nodes; the upper computer is connected with several test channels by a wired network, and each The end of the test channel is connected to a node under test through a private interface; 所述上位机,其用于通过测试通道向被测节点发送测试命令,还用于对反馈的测试数据包进行处理分析,计算无线传感网的数据包传输延迟、网络拓扑结构和丢包率;所述测试通道,其用于实现被测节点与上位机测试命令的交互和测试数据的上报;所述被测节点,其用于接收测试命令,并产生测试数据,通过测试通道反馈给上位机;The upper computer is used to send a test command to the node under test through the test channel, and is also used to process and analyze the feedback test data packet, and calculate the packet transmission delay, network topology and packet loss rate of the wireless sensor network ; The test channel is used to realize the interaction between the tested node and the upper computer test command and the report of the test data; the tested node is used to receive the test command and generate test data, which is fed back to the upper position through the test channel machine; 其中,所述每条有线测试通道包括下位机、测试背板和烧写模块,每个下位机通过有线连接的高速接口与一个测试背板相连;每个测试背板提供若干个低速接口,每个低速接口连接一个烧写模块;所述各测试背板间连接有时钟同步信号线,用于同步各个测试背板间的时钟。Wherein, each of the wired test channels includes a lower computer, a test backplane and a programming module, and each lower computer is connected to a test backplane through a wired high-speed interface; each test backplane provides several low-speed interfaces, each A low-speed interface is connected to a programming module; a clock synchronization signal line is connected between the test backplanes for synchronizing the clocks between the test backplanes. 9.根据权利要求8所述一种开放型无线传感网性能测试系统,其特征在于,所述烧写模块,还用于接收上位机发送的烧写文件,利用本地烧写技术,将代码烧写到被测节点上。9. A kind of open wireless sensor network performance test system according to claim 8, it is characterized in that, described programming module is also used for receiving the programming file that host computer sends, utilizes local programming technology, code Burn to the node under test. 10.根据权利要求8所述一种开放型无线传感网性能测试系统,其特征在于,所述测试背板还用于对被测节点上报的数据采用定长分割接收,为每个定长分组标记接收时间戳,将可变延迟变为固定延迟。10. A kind of open wireless sensor network performance test system according to claim 8, it is characterized in that, described test backplane is also used for adopting fixed-length division to receive the data reported by the node under test, for each fixed-length Packets are stamped with receipt timestamps, turning variable latency into fixed latency.
CN201310683276.XA 2013-12-12 2013-12-12 Open wireless sensing network performance test method and open wireless sensing network performance test system Expired - Fee Related CN103716201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310683276.XA CN103716201B (en) 2013-12-12 2013-12-12 Open wireless sensing network performance test method and open wireless sensing network performance test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310683276.XA CN103716201B (en) 2013-12-12 2013-12-12 Open wireless sensing network performance test method and open wireless sensing network performance test system

Publications (2)

Publication Number Publication Date
CN103716201A true CN103716201A (en) 2014-04-09
CN103716201B CN103716201B (en) 2017-01-18

Family

ID=50408806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310683276.XA Expired - Fee Related CN103716201B (en) 2013-12-12 2013-12-12 Open wireless sensing network performance test method and open wireless sensing network performance test system

Country Status (1)

Country Link
CN (1) CN103716201B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301060A (en) * 2014-10-27 2015-01-21 北京必创科技股份有限公司 A method and system for synchronous acquisition of nodes based on hardware-triggered sampling
CN104703206A (en) * 2015-02-15 2015-06-10 中国科学院上海微系统与信息技术研究所 Network protocol performance test bed system and test method for wireless sensor network
CN105634836A (en) * 2014-10-27 2016-06-01 香港理工大学 Information processing method and device
CN106936664A (en) * 2017-01-18 2017-07-07 中国电子科技集团公司第五十研究所 Software defined network path performance test apparatus and method
CN108712348A (en) * 2018-05-18 2018-10-26 王逸人 Flow control methods, system, equipment and computer readable storage medium
CN109714221A (en) * 2017-10-25 2019-05-03 阿里巴巴集团控股有限公司 The determination method, apparatus and system of network packet
CN111008167A (en) * 2019-11-28 2020-04-14 四川观想科技股份有限公司 Distributed computer bus back plate
CN112887140A (en) * 2021-01-25 2021-06-01 中国科学院沈阳自动化研究所 Multi-cloud collaborative network-cut-off disaster recovery method
CN114665990A (en) * 2022-03-10 2022-06-24 深圳市欣博跃电子有限公司 Wireless repeater test method, device, electronic equipment and medium
CN115001999A (en) * 2022-05-31 2022-09-02 北京交通大学 A network state detection method in a wireless ad hoc network
WO2023123105A1 (en) * 2021-12-29 2023-07-06 新华三技术有限公司 Csqf scheduling cycle collecting method and apparatus applied to deterministic network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102711095A (en) * 2012-05-18 2012-10-03 中国科学院信息工程研究所 Method for updating nodes of wireless sensor network in wireless mode
CN102752843A (en) * 2012-06-20 2012-10-24 中国科学院信息工程研究所 Time synchronization method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102711095A (en) * 2012-05-18 2012-10-03 中国科学院信息工程研究所 Method for updating nodes of wireless sensor network in wireless mode
CN102752843A (en) * 2012-06-20 2012-10-24 中国科学院信息工程研究所 Time synchronization method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KRISHNA CHINTALAPUDI等: "《Monitoring Civil Structures with a Wireless Sensor Network》", 《IEEE INTERNET COMPUTING》 *
ZHONGHUA ZHAO等: "An Open Conformance Test Systemtowards the Standardization of Wireless Sensor Networks", 《INTERNATIONAL JOURNAL OF DISTRIBUTED SENSOR NETWORKS》 *
赵忠华等: "基于零打扰测试背板的无线传感器网络测试平台", 《软件学报》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634836B (en) * 2014-10-27 2020-03-17 香港理工大学 Information processing method and device
CN105634836A (en) * 2014-10-27 2016-06-01 香港理工大学 Information processing method and device
CN104301060B (en) * 2014-10-27 2017-09-15 北京必创科技股份有限公司 A kind of node synchronous collection method and system sampled based on hardware trigger
CN104301060A (en) * 2014-10-27 2015-01-21 北京必创科技股份有限公司 A method and system for synchronous acquisition of nodes based on hardware-triggered sampling
CN104703206B (en) * 2015-02-15 2018-05-18 中国科学院上海微系统与信息技术研究所 Network protocol performance test bed system and test method for wireless sensor network
CN104703206A (en) * 2015-02-15 2015-06-10 中国科学院上海微系统与信息技术研究所 Network protocol performance test bed system and test method for wireless sensor network
CN106936664B (en) * 2017-01-18 2020-04-07 中国电子科技集团公司第五十研究所 Software defined network path performance testing device and method
CN106936664A (en) * 2017-01-18 2017-07-07 中国电子科技集团公司第五十研究所 Software defined network path performance test apparatus and method
CN109714221A (en) * 2017-10-25 2019-05-03 阿里巴巴集团控股有限公司 The determination method, apparatus and system of network packet
CN108712348A (en) * 2018-05-18 2018-10-26 王逸人 Flow control methods, system, equipment and computer readable storage medium
CN111008167A (en) * 2019-11-28 2020-04-14 四川观想科技股份有限公司 Distributed computer bus back plate
CN112887140A (en) * 2021-01-25 2021-06-01 中国科学院沈阳自动化研究所 Multi-cloud collaborative network-cut-off disaster recovery method
WO2023123105A1 (en) * 2021-12-29 2023-07-06 新华三技术有限公司 Csqf scheduling cycle collecting method and apparatus applied to deterministic network
US12301439B2 (en) 2021-12-29 2025-05-13 New H3C Technologies Co., Ltd. Methods and apparatuses for collecting CSQF schedule cycles applied to deterministic network
CN114665990A (en) * 2022-03-10 2022-06-24 深圳市欣博跃电子有限公司 Wireless repeater test method, device, electronic equipment and medium
CN114665990B (en) * 2022-03-10 2024-03-22 深圳市欣博跃电子有限公司 Wireless repeater testing method and device, electronic equipment and medium
CN115001999A (en) * 2022-05-31 2022-09-02 北京交通大学 A network state detection method in a wireless ad hoc network
CN115001999B (en) * 2022-05-31 2024-04-02 北京交通大学 A network status detection method in wireless ad hoc networks

Also Published As

Publication number Publication date
CN103716201B (en) 2017-01-18

Similar Documents

Publication Publication Date Title
CN103716201B (en) Open wireless sensing network performance test method and open wireless sensing network performance test system
CN104702474B (en) A kind of EtherCAT master station devices based on FPGA
Carneiro NS-3: Network simulator 3
CN102833062B (en) Intelligent substation IEEE1588 master-salve clock synchronization message setting means and system
CN103117900B (en) Configurable industrial Ethernet data parsing system and parsing method
CN103427935B (en) A kind of network delay measuring method eliminating site error and system
CN103365286B (en) A kind of intelligent building integrated communication control system
CN103117933B (en) The method and system of data is transmitted in multi-point communication network
Yang et al. A systematic network traffic emulation framework for digital twin network
CN105846941B (en) Clock transparent transmission device and method based on 1588 standards of IEEE
CN103532790B (en) Transformer station process layer network performance quantitative testing system
CN104144088A (en) A network delay measurement method for improving delay measurement accuracy
CN103326963A (en) Digital substation process level data exchanging device
CN103746783A (en) Extended communication method based on Modbus communication protocol
CN102523136A (en) Wireless sensor network data link layer protocol test method and system
CN103678522B (en) A kind of data acquisition of intelligent substation metering system and conversion method
Bai et al. Compact Modbus TCP/IP protocol for data acquisition systems based on limited hardware resources
CN103117881A (en) Resource management system of Internet of Things
CN106027674A (en) Technology architecture of "Internet & smart manufacturing"
CN110380923A (en) Site element protection looped network test device
CN110858811A (en) Method and network device for measuring delay
CN101951300B (en) Method for realizing accurate time tick of Ethernet
CN110430210A (en) A kind of protocol conversion apparatus and its method for converting protocol based on colony intelligence network
CN204733178U (en) A kind of EtherCAT master station device based on FPGA
CN102510383A (en) Middleware system with network traffic shaping function for aircraft electronic communication

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170118

Termination date: 20191212