Introduction
Graphical causal modeling, simulation, model testing, verification, and code generation for control algorithms and embedded software.
Modeloop is a model-based design environment for control algorithms and embedded software. It combines graphical causal modeling, simulation, model testing, verification, and source code generation.
A model specifies an algorithm through its inputs, outputs, computations, internal state, and execution conditions. Block diagrams follow a causal data flow representation. Each connection carries a value from an output port to an input port, explicitly defining the direction of signal flow and the dependencies between operations. State charts describe operating modes and the transitions between them. These representations can be combined in the same model to express control algorithms and supervisory logic.
The model provides the basis for simulation, testing, and code generation. Simulation evaluates its response to specified inputs over time. Test harnesses apply input scenarios and evaluate the responses against defined acceptance criteria. Generated source code implements the modeled behavior for integration into an application. Modeloop is available as a browser application and a desktop application.
For an embedded controller example of this workflow, see Model-Based Design Benefits for Embedded Software.
Modeling concepts
A project contains the models and configuration used to develop a system. A model contains a diagram defining its internal logic and can expose multiple input and output interfaces.
Within a diagram, blocks represent mathematical operations, signal routing, state, or nested behavior. Connections establish the data dependencies between blocks through their input and output ports. Signals have a data type and a shape, including scalar, vector, and matrix values. Parameters configure operations and initial conditions.
Containers organize related logic into nested diagrams with explicit interfaces. Execution can be periodic or activated by an event. The diagram defines the algorithm, while execution settings determine when it runs.
For definitions and modeling rules, see Blocks, Signals, Parameters, State Charts, and Model Hierarchy.
Simulation, testing, and verification
A simulation combines the selected models, an execution configuration, and input scenarios. The runtime advances simulated time in fixed steps, executes the scheduled logic, and records selected signals for analysis. Scenarios define input values over time and allow the same model to be evaluated under different operating conditions.
Modeloop provides test harnesses for evaluating models under controlled input and execution conditions. Test scenarios specify the input profiles, execution duration, and assertions used to assess the model’s response. Assertions define expected values, tolerances, and conditions over time, allowing tests to be repeated as the model evolves.
Model-in-the-loop simulation executes the compiled model representation. Software-in-the-loop testing executes generated code compiled for the host computer. Comparing their responses under equivalent inputs and execution settings provides test evidence for the generated implementation.
Code generation also performs numerical safety and equivalence checks within the supported analysis scope. Verification results identify established properties, detected violations, and checks that remain inconclusive. These results complement simulation and testing.
See Simulation, Testing, and Formal Verification for configuration, interpretation of results, and analysis limitations.
Code generation and integration
Modeloop generates source code from the model for integration into external applications. The generated code exposes functions for initialization and execution. In an embedded application, the surrounding software calls these functions and supplies scheduling, hardware access, and external inputs.
Integration therefore requires both the algorithm defined by the model and an execution environment that respects its interface and timing contracts. See Code Generation for the generated files, calling conventions, and integration procedure.
Project development
Project version control records changes to models and configuration. Semantic comparisons describe changes to blocks, parameters, connections, and interfaces. MDL, Modeloop’s textual modeling language, provides a textual representation for model authoring and inspection. Its editor offers syntax suggestions and checks text edits before they are applied to the diagram.
See Version Control for project history and review, and Modeling Guidelines for modeling conventions.
To begin using Modeloop, follow the Quickstart.
Comparing control design tools
If you are choosing a tool for discrete-time controller design, read the independent comparisons with MathWorks Simulink and Scilab Xcos.