Quickstart

Build, simulate, and inspect your first Modeloop model — a low-pass filtered sine wave — in about five minutes.

This guide walks you through the full Modeloop workflow once: create a project, model a small dynamic system, simulate it, and look at the results. No installation is required — Modeloop runs directly in the browser.

1. Create a project and a model

  1. Open Modeloop and create a new project.
  2. Add a model — the top-level unit of your design. Name it SignalConditioning.

Every model owns a diagram: the canvas where you build its logic.

2. Build the diagram

We will model a classic first-order low-pass filter driven by a noisy input:

Input ──▶ Sum ──▶ Gain ──▶ Integral ──┬──▶ Output
           ▲                          │
           └──────── (feedback) ◀─────┘
  1. Drag a Model Input block onto the canvas. This is the boundary where external data enters the component. Name its signal raw_signal.
  2. Add a Sum block. Connect raw_signal to its first input.
  3. Add a Multiply block with a constant gain (use a Constant block or a block parameter, e.g. 10.0 for a ~10 rad/s bandwidth).
  4. Add an Integral block after the multiply — this is the filter state.
  5. Connect the integral’s output back into the sum’s second input with a negative sign, closing the feedback loop.
  6. Finish with a Model Output block named filtered_signal.

As you connect blocks, Modeloop validates each connection live: port directions, data types, and structural rules are checked the moment you drop the wire. Invalid connections are rejected with an explanation, not silently accepted.

Feedback loops need memory. The loop above is legal because it passes through an Integral block, which is a memory block: its output depends on the previous step, not the current one. A feedback loop made only of instantaneous math blocks would be an algebraic loop and is rejected. See The Solver for why.

3. Give it a schedule (optional, but let’s do it)

You could simulate the flat diagram as-is. Here we make the timing explicit by turning the logic into a task — a scheduled unit of execution:

  1. Select your blocks and group them into a Container.
  2. Convert the container into a task and choose Periodic activation with a period, e.g. 10 ms.

The task now behaves like a real periodic function: at every 10 ms tick of the solver, it reads its inputs, executes its blocks in data-flow order, and publishes its outputs. On a real target, this is exactly the function your scheduler would call every 10 ms.

4. Configure the scenario

Simulation inputs come from scenario profiles — time-varying generators attached to your model inputs:

  1. Open the scenario configuration and select the raw_signal input.
  2. Assign a Sine profile: amplitude 1.0, frequency 1.0 Hz, offset 0.0.

Available profile types are constant, sine, ramp, step, and table (linear interpolation between time/value points). See Simulation for the full parameter reference.

5. Run the simulation

  1. Open the Build Configuration, select your task, and confirm the scheduling order.
  2. Press Run.

Modeloop compiles your model, runs the fixed-step solver for the configured duration, and streams the results back. Plot raw_signal against filtered_signal: you should see the filter’s output tracking the sine wave with attenuated high-frequency content and a small phase lag — exactly what a first-order low-pass filter does.

You can export any logged signal as CSV for external analysis.

6. Where the workflow goes from here

What you just did manually scales to full systems:

You didThe full workflow
One modelMany models communicating through typed interface signals
One periodic taskMulti-rate tasks, event-triggered tasks, explicit scheduling order
Sine scenarioScenario suites with tables, ramps, and steps for test coverage
Interactive plotsCSV export, runtime diagnostics, signal tracing
One-click simulationProduction Python and MISRA C:2012 code generation

Continue with Blocks to understand what you were actually placing on the canvas.