Woestman, E. and Sauceda, J., "Modelify: Semi-Automatic Conversion of Control Systems C Code to Simulink Models," SAE Technical Paper 2016-01-0020, 2016, doi:10.4271/2016-01-0020.
Over the last decade, the automotive industry has embraced model-based development for control systems. Many of these companies have chosen Simulink from MathWorks to design and simulate these models. However, a remaining issue is the fact that many control systems were initially written in C and are still being used. Some companies have attempted to manually convert these C systems to Simulink models but have found this method to be too costly, error-prone, and time consuming.EnSoft decided to tackle this problem by providing a semi-automated conversion using our Atlas for C tool. Atlas is a tool that maps software and creates a relation map for all parts of the program. It then offers the developer tools to query and visualize this graph. We have developed Modelify, a tool built on this framework that performs the necessary queries on a C project and creates equivalent Simulink models and subsystems.In this paper, we will discuss some of the difficulties in such a conversion, including handling conditional logic and global variables. We will then discuss how Modelify can improve on the model generated from the C source, in order to meet customer expectations. We will also discuss how Atlas can be extended to create custom tools for visualizing, understanding, and validating C source code.