Skip to main content

Learning and analysis of sensors behavior in IoT systems using statistical model checking


Analyzing the behavior of sensors is becoming one of the key challenges due to their increasing use for decision making in IoT systems. The paper proposes an approach for a formal specification and analysis of such behavior starting from existing sensor traces. A model that embodies the sensor measurements over time in the form of stochastic automata is built, then temporal properties are fed to Statistical Model Checker to simulate the learned model and to perform analysis. LTL properties are employed to predict sensors’ readings in time and to check the conformity of sensed data with the sensor traces in order to detect any abnormal behavior. We also use LTL properties to analyze the collective behavior of a set of sensors and build a formal model that checks the conformity of a combination of sensors’ readings in time.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21





  • Agha, G., & Palmskog, K. (2018). A Survey of Statistical Model Checking. ACM Transactions on Modeling and Computer Simulation, 28(1), 1–39.

    Article  MathSciNet  Google Scholar 

  • Al-Turjman, F., & Malekloo, A. (2019). Smart parking in IoT-enabled cities: A survey. Sustainable Cities and Society, 49, 101608.

    Article  Google Scholar 

  • Alur, R., & Henzinger, T. (1993). Real-Time Logics: Complexity and Expressiveness. Information and Computation, 104(1), 35–77.

    Article  MathSciNet  MATH  Google Scholar 

  • Alvarez Carmona, M. A., Carrasco Ochoa, J. A., & Martinez Trinidad, J. F. (2013). Combining techniques to find the number of bins for discretization. In: 2013 32nd International Conference of the Chilean Computer Science Society (SCCC), pp 54–57.

  • Ballarini, P., Barbot, B., Duflot, M., Haddad, S., & Pekergin, N. (2015). Hasl: A new approach for performance evaluation and model checking from concepts to experimentation. Performance Evaluation, 90, 53–77.

    Article  Google Scholar 

  • Barbier, M., Renzaglia, A., Quilbeuf, J., Rummelhard, L., Paigwar, A., Laugier, C., Legay, A., Ibanez-Guzman, J., & Simonin, O. (2019). Validation of perception and decision-making systems for autonomous driving via statistical model checking. In: 2019 IEEE Intelligent Vehicles Symposium (IV), pp 252–259.

  • Basu, A., Bensalem, S., Bozga, M., Combaz, J., Jaber, M., Nguyen, T. H., & Sifakis, J. (2011). Rigorous Component-Based System Design Using the BIP Framework. IEEE Software, 28(3), 41–48.

    Article  Google Scholar 

  • Beaulaton, D., Said, N. B., Cristescu, I., & Sadou, S. (2019). Security Analysis of IoT Systems Using Attack Trees. In M. Albanese, R. Horne, & C. W. Probst (Eds.), Graphical Models for Security (Vol. 11720, pp. 68–94). Cham: Springer International Publishing.

    Chapter  Google Scholar 

  • Breunig, M. M., Kriegel, H. P., Ng, R. T., & Sander, J. (2000). LOF: identifying density-based local outliers. ACM SIGMOD Record, 29(2), 93–104.

    Article  Google Scholar 

  • Chehida, S., Baouya, A., Bensalem, S., & Bozga, M. (2020). Applied statistical model checking for a sensor behavior analysis. In R. Pérez-Castillo (Ed.), Shepperd M, Brito e Abreu F, Rodrigues da Silva A (pp. 399–411). Springer International Publishing, Cham: Quality of Information and Communications Technology.

    Google Scholar 

  • COSMOS. (2015). Cosmos tool.

  • Daissaoui, A., Boulmakoul, A., Karim, L., & Lbath, A. (2020). IoT and Big Data Analytics for Smart Buildings: A Survey. Procedia Computer Science, 170, 161–168.

    Article  Google Scholar 

  • David, A., Larsen, K. G., Legay, A., Mikučionis, M., & Poulsen, D. B. (2015a). Uppaal SMC tutorial. International Journal on Software Tools for Technology Transfer 17(4), 397–415.

  • David, A., Larsen, K. G., Legay, A., Mikucionis, M., Poulsen, D. B., & Sedwards, S. (2015b). Statistical model checking for biological systems. International Journal on Software Tools for Technology Transfer, 17(3), 351–367.

    Article  Google Scholar 

  • Dougherty, J., Kohavi, R., & Sahami, M. (1995). Supervised and unsupervised discretization of continuous features. In: Prieditis A, Russell S (eds) Machine Learning Proceedings 1995, Morgan Kaufmann, San Francisco (CA), pp 194 – 202.

  • Franco, J. M., Correia, F., Barbosa, R., Zenha-Rela, M., Schmerl, B., & Garlan, D. (2016). Improving self-adaptation planning through software architecture-based stochastic modeling. Journal of Systems and Software, 115, 42–60.

    Article  Google Scholar 

  • Giannoni, F., Mancini, M., & Marinelli, F. (2018). Anomaly Detection Models for IoT Time Series Data.

  • He, Z., Xu, X., & Deng, S. (2003). Discovering cluster-based local outliers. Pattern Recognition Letters, 24(9–10), 1641–1650.

    Article  MATH  Google Scholar 

  • Hérault, T., Lassaigne, R., Magniette, F., & Peyronnet, S. (2004). Approximate probabilistic model checking. Verification, Model Checking, and Abstract Interpretation (pp. 73–84). Berlin Heidelberg, Berlin, Heidelberg: Springer.

    Chapter  Google Scholar 

  • Hill, D. J, Minsker, B. S., & Amir, E. (2009). Real-time Bayesian anomaly detection in streaming environmental data: Real-time bayesia anomaly detection. Water Resources Research 45(4).

  • Kwiatkowska, M., Norman, G., & Parker, D. (2011). Prism 4.0: Verification of probabilistic real-time systems. In G. Gopalakrishnan & S. Qadeer (Eds.), Computer Aided Verification (pp. 585–591). Heidelberg: Springer, Berlin Heidelberg, Berlin.

    Chapter  Google Scholar 

  • Malhotra, P., Vig, L., Shroff, G., & Agarwal, P. (2015). Long short term memory networks for anomaly detection in time series. In: European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning. Bruges, Belgium.

  • Mediouni, B. L., Nouri, A., Bozga, M., Dellabani, M., Legay, A., & Bensalem, S. (2018). SBIP 2.0: Statistical Model Checking Stochastic Real-time Systems. In: ATVA 2018 - 16th International Symposium Automated Technology for Verification and Analysis, Springer, Los Angeles, CA, United States, pp 536–542.

  • Mercaldo, F., Martinelli, F., & Santone, A. (2019). Real-Time SCADA Attack Detection by Means of Formal Methods. In: 2019 IEEE 28th International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE), IEEE, Napoli, Italy, pp 231–236.

  • MRMC. (2011). Mrmc tool.

  • Naskos, A., Gounaris, A., Mouratidis, H., & Katsaros, P. (2016). Online Analysis of Security Risks in Elastic Cloud Applications. IEEE Cloud Computing, 3(5), 26–33.

    Article  Google Scholar 

  • Nouri, A., Bensalem, S., Bozga, M., Delahaye, B., Jegourel, C., & Legay, A. (2015). Statistical model checking QoS properties of systems with SBIP. International Journal on Software Tools for Technology Transfer, 17(2), 171–185.

    Article  Google Scholar 

  • Nouri, A., Mediouni, B. L., Bozga, M., Combaz, J., Bensalem, S., & Legay, A. (2018). Performance evaluation of stochastic real-time systems with the SBIP framework. International Journal of Critical Computer-Based Systems, 8(3/4), 340.

    Article  Google Scholar 

  • Park, C., Kim, Y., & Jeong, M. (2018). Influencing factors on risk perception of IoT-based home energy management services. Telematics and Informatics, 35(8), 2355–2365.

    Article  Google Scholar 

  • Pnueli, A. (1977). The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science, IEEE Computer Society, USA, pp 46–57.

  • Saives, J., Pianon, C., & Faraut, G. (2015). Activity Discovery and Detection of Behavioral Deviations of an Inhabitant From Binary Sensors. IEEE Transactions on Automation Science and Engineering, 12(4), 1211–1224.

    Article  Google Scholar 

  • Shahid, N., Naqvi, I. H., & Qaisar, S. B. (2015). One-class support vector machines: analysis of outlier detection for wireless sensor networks in harsh environments. Artificial Intelligence Review, 43(4), 515–563.

    Article  Google Scholar 

  • Stewart, W. J. (2009). Probability, Markov chains, queues, and simulation: the mathematical basis of performance modeling. Princeton University Press.

  • Tao, Z. (2020). Advanced Wavelet Sampling Algorithm for IoT based environmental monitoring and management. Computer Communications, 150, 547–555.

    Article  Google Scholar 

  • Yang, Y., Webb, G. I., & Wu, X. (2010). Discretization Methods (pp. 101–116). US, Boston, MA: Springer.

    Google Scholar 

  • Xie, Yi., & Shun-Zheng, Yu. (2009). A Large-Scale Hidden Semi-Markov Model for Anomaly Detection on User Browsing Behaviors. IEEE/ACM Transactions on Networking, 17(1), 54–65.

    Article  Google Scholar 

  • Younes, H. L. S. (2005). Ymer: A statistical model checker. Computer Aided Verification (pp. 429–433). Berlin Heidelberg: Springer.

    Chapter  Google Scholar 

  • Younes, H. L. S., & Simmons, R. G. (2002). Probabilistic verification of discrete event systems using acceptance sampling. In E. Brinksma & K. G. Larsen (Eds.), Computer Aided Verification (pp. 223–235). Berlin Heidelberg: Springer.

    Chapter  Google Scholar 

  • Yu, Y., Zhu, Y., Li, S., & Wan, D. (2014). Time Series Outlier Detection Based on Sliding Window Prediction. Mathematical Problems in Engineering, 2014, 1–14.

    Article  MATH  Google Scholar 

Download references


The authors would like to thank EMALCSA Company for the data collected from the dam infrastructure.


The research leading to these results has been supported by the European Union through the BRAIN-IoT project H2020-EU.2.1.1. Grant agreement ID: 780089.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Salim Chehida.

Ethics declarations

Conflicts of interest

The authors declare that they have no conflict of interest.

Ethical approval

This article does not contain any studies involving animals or human participants performed by any of the authors

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Chehida, S., Baouya, A., Bensalem, S. et al. Learning and analysis of sensors behavior in IoT systems using statistical model checking. Software Qual J 30, 367–388 (2022).

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


  • IoT
  • Sensor Behavior
  • Stochastic Automata
  • Statistical Model Checking
  • LTL
  • BIP