[ieee 2012 ieee/acm third international conference on cyber-physical systems (iccps) - beijing,...

1
Poster Abstract: Numerical Analysis of WSN Protocol Using Probabilistic Timed Automata Fengling Zhang, Lei Bu, Linzhang Wang, Jianhua Zhao and Xuandong Li State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, Jiangsu, P.R.China 210037 Email: zfl@seg.nju.edu.cn, {bulei|lzwang|zhaojh|lxd}@nju.edu.cn I. I NTRODUCTION In order to run Cyber-Physical Systems (CPS) correctly and efficiently, the communication processes, especially the underlying wireless sensor network (WSN) protocols, must be robust and reliable. Timing-sync Protocol for Sensor Networks (TPSN) is a widely used time synchronization protocol which provides synchronization in the whole sensor network. As CPS systems could work in all kinds of open environments, it is critical to ensure the correctness of TPSN and to evaluate the performance of TPSN under different harsh environments. Clearly, if we can build an accurate model of the protocol then verify it, the correctness of the protocol can be proved. For modeling, we build timed automata model to describe the behavior of TPSN. Furthermore, in order to model the uncertainties in the realistic world such as message loss, node failures, probabilistic transitions are extended. For verifica- tion, besides classical model checking of functional properties like verification of deadlock, we also use Statistical Model Checking technique(SMC) to analyze the probabilistic model to evaluate the performance of the protocol under different environments and help with the parameter configuration. II. MODELING OF TPSN The workflow of TPSN basically consists of a level discov- ery phase to assign each node a level, then the synchronization phase to synchronize the clock of all the nodes and several special provisions caused by node dynamics. As TPSN is high time-related, we model the workflow of it with timed automata. In real environments, message loss and node dynam- ics are common. We use probabilistic transitions to de- scribe these phenomenons. Take the sending of message level discovery[id] for example, the probabilities of sending it are marked as SUC and FAIL respectively, and message is only sent after the SUC branch as shown in Fig.1. Similar method is used to model node dynamics. The final probabilistic timed automaton is shown in Fig.2. Due to space limitation, the complete models are available from http://seg.nju.edu.cn/ people/ bl/exp/TPSN.rar. III. VERIFICATION OF TPSN We conduct a series of verification, including functional correctness and numerical analysis, on the probabilistic model built for TPSN. Due to space limitation, we only introduce the numerical analysis done by SMC technique in this abstract. The authors are supported by the National 863 High-Tech Programme of China(No.2011AA010103), the National Natural Science Foundation of China (No.61100036, No.61003025, No.61170066) and by the Jiangsu Province Research Foundation (BK2011558). Parameter Configuration: Resynchronization Interval (RESYNC) is the period a synchronization phase lasts. There is a tradeoff of configuring the value of it. If it is too small, synchronization will be difficult to finish in one cycle. If it is too large, the clock drift will be large also. To decide the proper value of this parameter, we analyze the probabilities of a series of systems, 3-6 nodes, to synchronize in a cycle with different values of RESYNC. We can see the relation between RESYNC and the synchronization probability very clearly from Fig.3, which can help us to configure this parameter easily. Performance Evaluation: To analyze the efficiency of TPSN, like how fast the nodes can be synchronized. We have checked the probabilities of a system consisting of 3 nodes to synchronize successfully in M cycles with FAIL is set to 0, 0.1, 0.2, and 0.3 respectively. The results are plotted in Fig.4. From this graph we can see that TPSN is very sensitive to disturbations, like message loss and node dynamics. Thus, it could not be very suitable to choose this protocol while the CPS system is supposed to work in harsh environments. Fig. 1. Probabilistic Extension Fig. 2. Timed Automaton of TPSN 0 0.05 0.1 0.15 0.2 0.25 50 90 120 150 200 300 500 1000 2000 Probabilities RESYNC N=3 N=4 N=5 N=6 Fig. 3. Sync. Probability VS RESYNC 0 0.2 0.4 0.6 0.8 1 10 100 400 1000 5000 Probabilities Synchronization Cycles FAIL=0 FAIL=0.1 FAIL=0.2 FAIL=0.3 Fig. 4. Sync. Probability VS FAIL IV. CONCLUSION Our works show that probabilistic timed automata can be used to model the WSN protocols more realistically. Fur- thermore, besides classical model checking, statistical model checking can be used in the designing and evaluation of WSN protocols. They can verify the functional correctness of the protocol, and also analyze the performance of the protocol in different configurations, to tell whether the current parameter configuration is reasonable and whether the protocol is a suitable choice for different objectives. 2012 IEEE/ACM Third International Conference on Cyber-Physical Systems 978-0-7695-4695-7/12 $26.00 © 2012 IEEE DOI 10.1109/ICCPS.2012.57 237

Upload: xuandong

Post on 11-Mar-2017

217 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: [IEEE 2012 IEEE/ACM Third International Conference on Cyber-Physical Systems (ICCPS) - Beijing, China (2012.04.17-2012.04.19)] 2012 IEEE/ACM Third International Conference on Cyber-Physical

Poster Abstract: Numerical Analysis of WSN Protocol Using Probabilistic Timed Automata

Fengling Zhang, Lei Bu, Linzhang Wang, Jianhua Zhao and Xuandong LiState Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, Jiangsu, P.R.China 210037

Email: [email protected], {bulei|lzwang|zhaojh|lxd}@nju.edu.cn

I. INTRODUCTION

In order to run Cyber-Physical Systems (CPS) correctlyand efficiently, the communication processes, especially theunderlying wireless sensor network (WSN) protocols, must berobust and reliable. Timing-sync Protocol for Sensor Networks(TPSN) is a widely used time synchronization protocol whichprovides synchronization in the whole sensor network. As CPSsystems could work in all kinds of open environments, it iscritical to ensure the correctness of TPSN and to evaluatethe performance of TPSN under different harsh environments.Clearly, if we can build an accurate model of the protocol thenverify it, the correctness of the protocol can be proved.

For modeling, we build timed automata model to describethe behavior of TPSN. Furthermore, in order to model theuncertainties in the realistic world such as message loss, nodefailures, probabilistic transitions are extended. For verifica-tion, besides classical model checking of functional propertieslike verification of deadlock, we also use Statistical ModelChecking technique(SMC) to analyze the probabilistic modelto evaluate the performance of the protocol under differentenvironments and help with the parameter configuration.

II. MODELING OF TPSN

The workflow of TPSN basically consists of a level discov-ery phase to assign each node a level, then the synchronizationphase to synchronize the clock of all the nodes and severalspecial provisions caused by node dynamics. As TPSN is hightime-related, we model the workflow of it with timed automata.

In real environments, message loss and node dynam-ics are common. We use probabilistic transitions to de-scribe these phenomenons. Take the sending of messagelevel discovery[id] for example, the probabilities of sending itare marked as SUC and FAIL respectively, and message is onlysent after the SUC branch as shown in Fig.1. Similar methodis used to model node dynamics. The final probabilistictimed automaton is shown in Fig.2. Due to space limitation,the complete models are available from http://seg.nju.edu.cn/people/∼bl/exp/TPSN.rar.

III. VERIFICATION OF TPSN

We conduct a series of verification, including functionalcorrectness and numerical analysis, on the probabilistic modelbuilt for TPSN. Due to space limitation, we only introduce thenumerical analysis done by SMC technique in this abstract.

The authors are supported by the National 863 High-Tech Programme ofChina(No.2011AA010103), the National Natural Science Foundation of China(No.61100036, No.61003025, No.61170066) and by the Jiangsu ProvinceResearch Foundation (BK2011558).

Parameter Configuration: Resynchronization Interval(RESYNC) is the period a synchronization phase lasts. Thereis a tradeoff of configuring the value of it. If it is too small,synchronization will be difficult to finish in one cycle. If itis too large, the clock drift will be large also. To decide theproper value of this parameter, we analyze the probabilities ofa series of systems, 3-6 nodes, to synchronize in a cycle withdifferent values of RESYNC. We can see the relation betweenRESYNC and the synchronization probability very clearly fromFig.3, which can help us to configure this parameter easily.

Performance Evaluation: To analyze the efficiency ofTPSN, like how fast the nodes can be synchronized. We havechecked the probabilities of a system consisting of 3 nodes tosynchronize successfully in M cycles with FAIL is set to 0,0.1, 0.2, and 0.3 respectively. The results are plotted in Fig.4.From this graph we can see that TPSN is very sensitive todisturbations, like message loss and node dynamics. Thus, itcould not be very suitable to choose this protocol while theCPS system is supposed to work in harsh environments.

Fig. 1. Probabilistic Extension Fig. 2. Timed Automaton of TPSN

0

0.05

0.1

0.15

0.2

0.25

50 90 120 150 200 300 500 1000 2000

Pro

babi

litie

s

RESYNC

N=3N=4N=5N=6

Fig. 3. Sync. Probability VS RESYNC

0

0.2

0.4

0.6

0.8

1

10 100 400 1000 5000

Pro

babi

litie

s

Synchronization Cycles

FAIL=0FAIL=0.1FAIL=0.2FAIL=0.3

Fig. 4. Sync. Probability VS FAIL

IV. CONCLUSION

Our works show that probabilistic timed automata can beused to model the WSN protocols more realistically. Fur-thermore, besides classical model checking, statistical modelchecking can be used in the designing and evaluation of WSNprotocols. They can verify the functional correctness of theprotocol, and also analyze the performance of the protocol indifferent configurations, to tell whether the current parameterconfiguration is reasonable and whether the protocol is asuitable choice for different objectives.

2012 IEEE/ACM Third International Conference on Cyber-Physical Systems

978-0-7695-4695-7/12 $26.00 © 2012 IEEE

DOI 10.1109/ICCPS.2012.57

237