This content is not included in your SAE MOBILUS subscription, or you are not logged in.
A Comparison of Componentization Constructs for Supporting Modularity in Simulink
ISSN: 0148-7191, e-ISSN: 2688-3627
Published April 14, 2020 by SAE International in United States
This content contains downloadable datasetsAnnotation ability available
The Model-Based Development (MBD) paradigm is widely used for embedded controls development, with the MathWorks Simulink modelling environment being extensively used in the automotive industry. As production-scale Simulink models are typically large and complex, there exists a need to decompose them properly in order to facilitate their maintainability, understandability, and evolution. MathWorks recommends the use of three constructs for model “componentization” or decomposition: the Subsystem, Library, and Model Reference. However, a recently added construct introduced in Simulink R2014b, the Simulink Function, can also be used for this purpose, while also supporting information hiding due to the construct’s ability to be scoped and encapsulate data. This paper provides an in-depth comparison of these Simulink constructs to fully understand the differences in their reusability, sharing of program state, encapsulation, and code generation, with the goal of facilitating model evolution. An automotive powertrain example is provided to highlight the differences between approaches. Conventions for structuring models are also presented.
CitationJaskolka, M., Pantelic, V., Wassyng, A., and Lawford, M., "A Comparison of Componentization Constructs for Supporting Modularity in Simulink," SAE Technical Paper 2020-01-1290, 2020, https://doi.org/10.4271/2020-01-1290.
Data Sets - Support Documents
|[Unnamed Dataset 1]|
|[Unnamed Dataset 2]|
|[Unnamed Dataset 3]|
- Alalfi, M.H., Cordy, J.R., Dean, T.R., Stephan, M. et al. , “Models Are Code Too: Near-Miss Clone Detection for Simulink Models,” in Proceedings of the 28th IEEE International Conference on Software Maintenance (ICSM), Sept. 2012, IEEE, 295-304.
- Astrov, I. and Pedai, A. , “Three-Rate Neural Control of Tuav with Coaxial Rotor and Ducted Fan Configuration for Enhanced Situational Awareness,” in Proceedings of the 1st International Conference on Control, Automation and Information Sciences (ICCAIS), Ho Chi Minh, Vietnam, Nov. 2012, 78-83.
- autosar.org , “Autosar Classic Platform Release 4.4.0,” Oct. 2018, www.autosar.org/standards/classic-platform/classic-platform-440.
- Baldwin, C.Y. and Clark, K.B. , Design Rules: The Power of Modularity. Vol. 1 (MIT Press, 2000).
- Bender, M., Laurin, K., Lawford, M., Pantelic, V. et al. , “Signature Required: Making Simulink Data Flow and Interfaces Explicit,” Science of Computer Programming 113, Part 1, 29-50. Model Driven Development (Selected & Extended Papers from MODELSWARD 2014), Dec. 2015.
- Bialy, M., Pantelic, V., Jaskolka, J., Schaap, A. et al. , Software Engineering for Model-Based Development by Domain Experts, First Edition (Cambridge, MA, Elsevier, Oct. 2016), Chapter 3, 39-64.
- Dajsuren, Y., van den Brand, M.G.J., Serebrenik, A., and Roubtsov, S. , “Simulink Models Are Also Software: Modularity Assessment,” in Proceedings of the 9th International ACM Sigsoft Conference on Quality of Software Architectures (QoSA), Vancouver, Canada, 2013, 99-106.
- Edwards, S.H. , “Representation Inheritance: A Safe Form of “White Box” Code Inheritance,” IEEE Transactions on Software Engineering 23(2):83-92, Feb. 1997.
- Hoare, C.A.R. , “Towards a Theory of Parallel Programming,” in Hoare, C.A.R. andPerrot, R.H. (Eds.), Operating SystemsTechniques (Academic Press, 1971), 61-71.
- International Standards Organization , “Systems and Software - Vocabulary,” ISO/IEC/IEEE 24765:2017(E), Aug. 2017.
- Lublinerman, R. and Tripakis, S. , “Modularity vs. Reusability: Code Generation from Synchronous Block Diagrams,” in Proceedings of the Conference on Design, Automation and Test in Europe (DATE), 2008, ACM, 1504-1509.
- MacCormack, A., Rusnak, J., and Baldwin, C.Y. , “The Impact of Component Modularity on Design Evolution: Evidence from the Software Industry,” Harvard Business School Tech. & Operations Mgt. Unit Research Paper, Dec. 2007, 1-36.
- O’Hearn, P.W., Yang, H., and Reynolds, J.C. , “Separation and Information Hiding,” ACM Transactions on Programming Languages and Systems (TOPLAS) 31(3):11, 2009.
- Oualline, S. , “Practical C Programming,” Nutshell Handbooks, Third Edition (Sebastopol, CA: O’Reilly Media, 1997).
- Parnas, D.L. , “On the Criteria to Be Used in Decomposing Systems into Modules,” Communications of the ACM 15(12):1053-1058, Dec. 1972.
- Parnas, D.L., Clements, P.C., and Weiss, D.M. , “The Modular Structure of Complex Systems,” in Proceedings of the 7th International Conference on Software Engineering (ICSE), Volume SE-11, Piscataway, NJ, 1984, IEEE Press, 408-417.
- Rau, A. , “On Model-Based Development: Decomposition and Data Abstraction in SIMULINK,” Softwaretechnik-Trends 21(3):1-6, Feb. 2001.
- Saltzer, J.H. and Schroeder, M.D. , “The Protection of Information in Computer Systems,” Proceedings of the IEEE 63(9):1278-1308, 1975.
- Schwinghammer, J., Yang, H., Birkedal, L., Pottier, F. et al. , “A Semantic Foundation for Hidden State,” in Ong, L. (Ed.), Foundations of Software Science and Computational Structures, Volume 6014 (Berlin, Springer, 2010), 2-17.
- Snyder, A. , “Encapsulation and Inheritance in Object-Oriented Programming Languages,” in Proceedings of Object-Oriented Programming, Systems, Languages & Applications (OOPSLA), Nov. 1986, ACM, Volume 21, 38-45.
- Srivastava, S., Hicks, M., Foster, J.S., and Jenkins, P. , “Modular Information Hiding and Type-Safe Linking for C,” IEEE Transactions on Software Engineering 34(3):357-376, May 2008.
- Stephan, M., Alalfi, M.H., Cordy, J.R., and Stevenson, A. , “Evolution of Model Clones in Simulink,” in ME 2013 - Models and Evolution Workshop Proceedings, Sept. 2013, 40-49.
- The MathWorks , “Mathworks Automotive Advisory Board (MAAB): Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow,” Aug. 2012, www.mathworks.com/solutions/automotive/standards/maab.html, Version 3.0, accessed July 2019.
- The MathWorks , “Embedded Coder User’s Guide,” Mar. 2019a, https://www.mathworks.com/help/pdf_doc/ecoder/ecoder_ug.pdf, Version R2019b, accessed July 2019.
- The MathWorks , “Simulink Coder User’s Guide,” Mar. 2019b, https://www.mathworks.com/help/pdf_doc/rtw/rtw_ug.pdf, Version R2019b, accessed July 2019.
- The MathWorks , “Simulink User’s Guide,” Mar. 2019c, https://www.mathworks.com/help/pdf_doc/simulink/sl_using.pdf, Version R2019b, accessed July 2019.
- Tran, Q.M., Wilmes, B., and Dziobek, C. , “Refactoring of Simulink Diagrams via Composition of Transformation Steps,” in International Conference on Software Engineering Advances, 2013, 140-145.
- Tripakis, S. and Lublinerman, R. , “Modular Code Generation from Synchronous Block Diagrams: Interfaces, Abstraction, Compositionality,” in Lecture Notes in Computer Science (Springer International Publishing, 2018), 449-477.
- Whalen, M.W., Murugesan, A., Rayadurgam, S., and Heimdahl, M.P.E. , “Structuring Simulink Models for Verification and Reuse,” in Proceedings of the 6th International Workshop on Modeling in Software Engineering (MiSE), Hyderabad, India, June 2014, ACM, 19-24.
- Xiao, Y. and Agbossou, K. , “Interface Design and Software Development for PEM Fuel Cell Modeling Based on Matlab/Simulink Environment,” in 2009 WRI World Congress on Software Engineering, Volume 4, Xiamen, China, May 2009, 318-322.
- Yang, Y., Shen, D., Xie, Y., and Li, X. , “Matlab Simulink of COST231-WI Model,” International Journal of Wireless & Microwave Technologies 3:1-8, 2012.