An algorithm for processing block diagram models of dynamical systems and an open-source visual-programming simulation tool - Torres-Torriti, Miguel; Rojas-Sepulveda, Matias (Simulation modelling practice and theory, 2025)
Visual diagrammatic programming and block diagrams have been indispensable tools for systems modeling and simulation across research, development, and educational fields for several decades. Despite the availability of mature commercial and free software tools, there is a lack of information publicly accessible on algorithms for processing block diagrams that represent dynamical systems and simulate the corresponding models. A gap in the existing literature is the absence of mathematically formal and complete proposals of algorithms for processing block diagrams that are multigraphs containing directed cyclic graphs, and not just simpler directed graphs. The lack of a detailed exposition concerning the practical implementation of such algorithms is also a gap. This gap is likely because the simulation systems based on block diagram descriptions that have become de facto industry standards use proprietary solutions, even if their origins can be traced back to work done in research centers and universities more than seven decades ago. In response to these challenges, this paper summarizes the historical evolution of related paradigms, such as data flow diagrams, signal flow graphs, bond graphs, and block diagrams. We propose a general algorithm for block diagram processing and present an open-source software tool for Python that implements a diagrammatic visual programming interface and the proposed block diagram processing algorithm. The key contributions to the field of systems modeling and simulation can be summarized as follows. Firstly, the exposition of the algorithm formally proving its correctness, offers transparency which facilitates further research and development in the field, enabling academics and professionals to adapt, enhance, or expand upon the existing capabilities of the tool. Secondly, the implementation of a Python library and tool released as an open-source solution for simulating signal processing and dynamical systems through block diagrams by integrating the proposed algorithm capable of efficiently handling multigraph representations, including those with directed cyclic graphs. Ensuring accessibility of the tool to researchers, developers, and educators fosters innovation, research and empowers educators by providing them with a versatile tool that can be used to teach complex systems modeling and simulation concepts in a practical, hands-on manner across various domains, such as control systems, electrical engineering, and computer science.