Skip to main content

Automatic Dimensional Analysis of Cyber-Physical Systems

  • Conference paper
FM 2012: Formal Methods (FM 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7436))

Included in the following conference series:

Abstract

The first step in building a cyber-physical system is the construction of a faithful model that captures the relevant behaviors. Dimensional consistency provides the first check on the correctness of such models and the physical quantities represented in it. Though manual analysis of dimensions is used in physical sciences to find errors in formulas, this approach does not scale to complex cyber-physical systems with many interacting components. We present DimSim, a tool to automatically check the dimensional consistency of a cyber-physical system modeled in Simulink. DimSim generates a set of constraints from the Simulink model for each subsystem in a modular way, and solves them using the Gauss-Jordan elimination method. The tool depends on user-provided dimension annotations, and it can detect both inconsistency and underspecification in the given dimensional constraints. In case of a dimensional inconsistency, DimSim can provide a minimal set of constraints that captures the cause of the inconsistency. We have applied DimSim to numerous examples from different embedded system domains. Experimental results show that the dimensional analysis in DimSim is scalable and is capable of uncovering critical errors in models of cyber-physical systems.

This work was supported by NSF Grant CSR-EHCS(CPS)-0834810 and NASA Cooperative Agreement NNX08AY53A. We received useful feedback from our colleagues Bruno Dutertre and Ashish Tiwari and from Professor Martin Hofmann of LMU Munich. We are especially grateful to the anonymous reviewers for their constructive and insightful feedback.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allen, E., Chase, D., Luchangco, V., Maessen, J., Steele Jr., G.L.: Object-oriented units of measurement. In: Proceedings of OOPSLA, pp. 384–403 (2004)

    Google Scholar 

  2. Antoniu, T., Steckler, P.A., Krishnamurthi, S., Neuwirth, E., Felleisen, M.: Validating the unit correctness of spreadsheet programs. In: Proceedings of ICSE, pp. 439–448 (2004)

    Google Scholar 

  3. Astrom, K.J., Murray, R.M.: Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press (2009)

    Google Scholar 

  4. Chutinan, A., Butts, K.R.: Smart vehicle baseline report - dynamic analysis of hybrid system models for design validation. Technical report (2002)

    Google Scholar 

  5. Dreiheller, A., Mohr, B., Moerschbacher, M.: PHYSCAL: Programming Pascal with physical units. SIGPLAN Not. 21, 114–123 (1986)

    Article  Google Scholar 

  6. Galdino, A.L., Muñoz, C., Ayala-Rincón, M.: Formal Verification of an Optimal Air Traffic Conflict Resolution and Recovery Algorithm. In: Leivant, D., de Queiroz, R. (eds.) WoLLIC 2007. LNCS, vol. 4576, pp. 177–188. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  7. Hangal, S., Lam, M.S.: Automatic dimension inference and checking for object-oriented programs. In: Proceedings of ICSE, pp. 155–165 (2009)

    Google Scholar 

  8. Hilfinger, P.N.: An ADA package for dimensional analysis. ACM Trans. Program. Lang. Syst. 10, 189–203 (1988)

    Article  Google Scholar 

  9. Jiang, L., Su, Z.: Osprey: A practical type system for validating dimensional unit correctness of C programs. In: Proceedings of ICSE, pp. 262–271 (2006)

    Google Scholar 

  10. Kennedy, A.: Dimension Types. In: Sannella, D. (ed.) ESOP 1994. LNCS, vol. 788, pp. 348–362. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  11. Kennedy, A.: Types for Units-of-Measure: Theory and Practice. In: Horváth, Z., Plasmeijer, R., Zsók, V. (eds.) CEFP 2009. LNCS, vol. 6299, pp. 268–305. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  12. Petty, G.W.: Automated computation and consistency checking of physical dimensions and units in scientific programs. Softw. Pract. Exper. 31, 1067–1076 (2001)

    Article  MATH  Google Scholar 

  13. Roche, J.J.: The Mathematics of Measurement: A Critical History. Springer (1998)

    Google Scholar 

  14. Roy, P., Shankar, N.: SimCheck: A contract type system for Simulink. ISSE 7(2), 73–83 (2011)

    Google Scholar 

  15. Sandberg, M., Persson, D., Lisper, B.: Automatic dimensional consistency checking for simulation specifications. In: Proceedings of SIMS (2003)

    Google Scholar 

  16. Strang, G.: Introduction to Linear Algebra, 3rd edn. Wellesley-Cambridge Press (2003)

    Google Scholar 

  17. The MathWorks. Simulink - Demos, http://www.mathworks.com/products/simulink/demos.html

  18. Umrigar, Z.D.: Fully static dimensional analysis with C++. SIGPLAN Not. 29, 135–139 (1994)

    Article  Google Scholar 

  19. Valiant, L., Vazirani, V.: NP is as easy as detecting unique solutions. Theoretical Computer Science, 85–93 (1986)

    Google Scholar 

  20. Van Delft, A.: A Java extension with support for dimensions. Softw. Pract. Exper. 29, 605–616 (1999)

    Article  Google Scholar 

  21. Wand, M., O’Keefe, P.: Automatic dimensional inference. In: Computational Logic-Essays in Honor of Alan Robinson, pp. 479–483 (1991)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Owre, S., Saha, I., Shankar, N. (2012). Automatic Dimensional Analysis of Cyber-Physical Systems. In: Giannakopoulou, D., Méry, D. (eds) FM 2012: Formal Methods. FM 2012. Lecture Notes in Computer Science, vol 7436. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32759-9_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32759-9_30

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32758-2

  • Online ISBN: 978-3-642-32759-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics