Skip to content
Active Fluid Control

Cite this work.

The water channel, the software, the datasets, the methods — all open. Build it, fork it, run it, take it further. When you share what you make, drop in a line of credit: it helps the work spread and grow. Here's what that looks like in practice.

A line is enough.

Suggested credit

Active Fluid Control — ETH Zürich (A. Terpin, R. D'Andrea). activefluidcontrol.com

When a specific piece is doing the work, name it too — built on Active Fluid Control V0, images generated with SynthPix (Terpin et al., 2026), benchmarked with Flow Gym (Banelli et al., 2026). For published results, use the full citation below.

Referring to the project as a whole.

The anchor citation is Privileged observations enable rapid and reliable policy discovery directly in the physical world (Terpin & D'Andrea, 2025) — the paper that introduces the physical setup, the closed-loop methodology, and the first set of active fluid control results. When a specific hardware version or software package does the heavy lifting, cite that one too. It costs nothing to add, and it pays off on all sides: readers pick up the context, users find the tools, and we see how the work is impacting the field.

BibTeX for every publication.

  • Featured
    2025 · arXiv preprint Preprint

    Privileged observations enable rapid and reliable policy discovery directly in the physical world

    A. Terpin, R. D'Andrea

    People refine many high-performance skills using information that is available during practice but unavailable or presented differently during later action: think of a figure skater landing a triple jump, a pitcher throwing a curveball for a strike, or a barista pouring latte art. We ask whether privileged information—information available during training but not during execution—about the state of a physical system can be decisive for discovering a high-performing control policy even when reproducing the resulting behavior does not require that information. For this, we directly interface a generalist reinforcement learning agent with a spinning cylinder in a tabletop water channel to maximize or minimize drag. The agent acts directly on the physical flow and receives dense observations of the cylinder wake. This setup has several desirable properties. First, it is a physical system, with the rich interactions and complex dynamics that only the physical world has: the flow is highly chaotic and extremely difficult, if not impossible, to model or simulate accurately. Second, we can state the objective—drag minimization or maximization—simply and encode it directly in the reward, yet good strategies are not obvious beforehand. Third, decades-old experimental studies provide recipes for simple, high-performance, periodic open-loop policies. Relative to the common no-control reference, these periodic open-loop policies increase drag by 26.6% ± 0.7% and reduce it by 29.7% ± 1.3%. With flow observations, the agent learns within tens of minutes closed-loop policies that increase drag by 25.5% ± 0.9% and reduce it by 32.4% ± 1.6%. We record action trajectories during online policy execution and can subsequently replay them open loop as fixed sequences without flow observations; these replays increase drag by 23.2% ± 2.2% and reduce it by 32.1% ± 3.0%. However, when we withhold flow observations during training, the agent still discovers high-performing drag-minimizing policies (31.4% ± 2.1% drag reduction), but no run learns a high-performing drag-maximizing policy (1.8% ± 4.3% drag increase). The experiments provide a physical demonstration that privileged observations can be decisive for policy discovery even in the extreme scenario when we can subsequently replay the resulting action trajectories successfully. Practically, our findings suggest that rich observations accessible during laboratory training can be powerful even when their continuous acquisition and processing would be impractical at deployment.

    2025 · arXiv preprint Preprint

    Privileged observations enable rapid and reliable policy discovery directly in the physical world

    A. Terpin, R. D'Andrea

    People refine many high-performance skills using information that is available during practice but unavailable or presented differently during later action: think of a figure skater landing a triple jump, a pitcher throwing a curveball for a strike, or a barista pouring latte art. We ask whether privileged information—information available during training but not during execution—about the state of a physical system can be decisive for discovering a high-performing control policy even when reproducing the resulting behavior does not require that information. For this, we directly interface a generalist reinforcement learning agent with a spinning cylinder in a tabletop water channel to maximize or minimize drag. The agent acts directly on the physical flow and receives dense observations of the cylinder wake. This setup has several desirable properties. First, it is a physical system, with the rich interactions and complex dynamics that only the physical world has: the flow is highly chaotic and extremely difficult, if not impossible, to model or simulate accurately. Second, we can state the objective—drag minimization or maximization—simply and encode it directly in the reward, yet good strategies are not obvious beforehand. Third, decades-old experimental studies provide recipes for simple, high-performance, periodic open-loop policies. Relative to the common no-control reference, these periodic open-loop policies increase drag by 26.6% ± 0.7% and reduce it by 29.7% ± 1.3%. With flow observations, the agent learns within tens of minutes closed-loop policies that increase drag by 25.5% ± 0.9% and reduce it by 32.4% ± 1.6%. We record action trajectories during online policy execution and can subsequently replay them open loop as fixed sequences without flow observations; these replays increase drag by 23.2% ± 2.2% and reduce it by 32.1% ± 3.0%. However, when we withhold flow observations during training, the agent still discovers high-performing drag-minimizing policies (31.4% ± 2.1% drag reduction), but no run learns a high-performing drag-maximizing policy (1.8% ± 4.3% drag increase). The experiments provide a physical demonstration that privileged observations can be decisive for policy discovery even in the extreme scenario when we can subsequently replay the resulting action trajectories successfully. Practically, our findings suggest that rich observations accessible during laboratory training can be powerful even when their continuous acquisition and processing would be impractical at deployment.

    arXiv Data
    Hardware: v0
  • 2026 · SoftwareX, vol. 34, 102641 Journal

    Flow Gym: a framework for the development, benchmarking, training, and deployment of flow-field quantification methods

    F. Banelli, A. Terpin, A. Bonomi, R. D'Andrea

    Particle image velocimetry (PIV) and related optical-flow methods are widely used to quantify fluid motion, but their development and evaluation are often hindered by fragmented software, inconsistent interfaces, and limited reproducibility. To address these challenges, we present Flow Gym, a framework for developing, benchmarking, training, and deploying flow-field quantification methods, with a primary focus on PIV. Its core contribution is a standardized interface that allows classical and learning-based algorithms to be integrated, compared, and deployed within a common pipeline. The framework includes JAX implementations and wrappers for existing methods, modular pre-processing and post-processing components, and utilities for training and benchmarking. By leveraging JAX, Flow Gym supports hardware-accelerated execution while remaining interoperable with external implementations from libraries such as OpenCV and PyTorch. It can operate on both synthetic and experimental data and supports the same workflow for offline benchmarking and real-time deployment. Flow Gym is designed to improve reproducibility, reduce barriers to method development, and facilitate the translation of flow-field quantification algorithms from research to experimental settings.

    2026 · SoftwareX, vol. 34, 102641 Journal

    Flow Gym: a framework for the development, benchmarking, training, and deployment of flow-field quantification methods

    F. Banelli, A. Terpin, A. Bonomi, R. D'Andrea

    Particle image velocimetry (PIV) and related optical-flow methods are widely used to quantify fluid motion, but their development and evaluation are often hindered by fragmented software, inconsistent interfaces, and limited reproducibility. To address these challenges, we present Flow Gym, a framework for developing, benchmarking, training, and deploying flow-field quantification methods, with a primary focus on PIV. Its core contribution is a standardized interface that allows classical and learning-based algorithms to be integrated, compared, and deployed within a common pipeline. The framework includes JAX implementations and wrappers for existing methods, modular pre-processing and post-processing components, and utilities for training and benchmarking. By leveraging JAX, Flow Gym supports hardware-accelerated execution while remaining interoperable with external implementations from libraries such as OpenCV and PyTorch. It can operate on both synthetic and experimental data and supports the same workflow for offline benchmarking and real-time deployment. Flow Gym is designed to improve reproducibility, reduce barriers to method development, and facilitate the translation of flow-field quantification algorithms from research to experimental settings.

    DOI Code
    Hardware: v0 , v1
  • 2026 · SoftwareX, vol. 34, 102642 Journal

    SynthPix: a lightspeed PIV image generator

    A. Terpin, A. Bonomi, F. Banelli, R. D'Andrea

    We describe SynthPix, a synthetic image generator for Particle Image Velocimetry (PIV) with a focus on performance and parallelism on accelerators, implemented in JAX. SynthPix produces PIV image pairs from prescribed flow fields while exposing a configuration interface aligned with common PIV imaging and acquisition parameters (e.g., seeding density, particle image size, illumination nonuniformity, noise, blur, and timing). In contrast to offline dataset generation workflows, SynthPix is built to stream images on-the-fly directly into learning and benchmarking pipelines, enabling data-hungry methods and closed-loop procedures — such as adaptive sampling and acquisition/parameter co-design — without prohibitive storage and input–output costs. We demonstrate that SynthPix is compatible with a broad range of application scenarios, including controlled laboratory experiments and riverine image velocimetry, and supports rapid sweeps over nuisance factors for systematic robustness evaluation. SynthPix is a tool that supports the flow quantification community and in this paper we describe the main ideas behind the software package.

    2026 · SoftwareX, vol. 34, 102642 Journal

    SynthPix: a lightspeed PIV image generator

    A. Terpin, A. Bonomi, F. Banelli, R. D'Andrea

    We describe SynthPix, a synthetic image generator for Particle Image Velocimetry (PIV) with a focus on performance and parallelism on accelerators, implemented in JAX. SynthPix produces PIV image pairs from prescribed flow fields while exposing a configuration interface aligned with common PIV imaging and acquisition parameters (e.g., seeding density, particle image size, illumination nonuniformity, noise, blur, and timing). In contrast to offline dataset generation workflows, SynthPix is built to stream images on-the-fly directly into learning and benchmarking pipelines, enabling data-hungry methods and closed-loop procedures — such as adaptive sampling and acquisition/parameter co-design — without prohibitive storage and input–output costs. We demonstrate that SynthPix is compatible with a broad range of application scenarios, including controlled laboratory experiments and riverine image velocimetry, and supports rapid sweeps over nuisance factors for systematic robustness evaluation. SynthPix is a tool that supports the flow quantification community and in this paper we describe the main ideas behind the software package.

    DOI Code
    Hardware: v0 , v1
  • 2026 · 65th IEEE Conference on Decision and Control (CDC) Conference

    Particle Image Velocimetry Refinement via Consensus ADMM for Active Fluid Control

    A. Bonomi, F. Banelli, A. Terpin

    Particle Image Velocimetry (PIV) is among the central modalities for measuring flow fields across laboratory, industrial and environmental setting. Traditional PIV approaches typically depend on tuning parameters specific to the imaging setup, making the performance sensitive to variations in illumination, flow conditions, and seeding density. Similarly, state-of-the-art machine learning methods for flow quantification are fragile outside their training set. In our experiments, we observed that flow quantification would improve if different tunings (or algorithms) were applied to different regions of the same image pair. Motivated by this observation, we thus pose flow quantification as a multi-estimator fusion problem: several heterogeneous algorithms process the same image pair in parallel, and their dense flow fields are treated as complementary estimates. To fuse them, we adopt a consensus framework based on the alternating direction method of multipliers, incorporating priors such as smoothness and incompressibility. We perform several numerical experiments to demonstrate the benefits of this approach. For instance, we achieve a decrease in end-point-error of up to 20% of a dense-inverse-search estimator at an inference rate of 60Hz, and we show how performance can be increased with outlier rejection. Our method is implemented in JAX and integrated into Flow Gym, enabling reproducible comparisons with the state of the art and systematic evaluation across different base algorithms. Finally, we demonstrate successful deployment of our method in the same real-world active-fluids-control setup of Terpin and D'Andrea [1], where a reinforcement-learning agent uses our flow estimates to learn to minimize drag (down by 36%) or maximize it (up to 32%) with only two minutes of real-world interaction. Hardware and software are made available at ActiveFluidControl.com.

    2026 · 65th IEEE Conference on Decision and Control (CDC) Conference

    Particle Image Velocimetry Refinement via Consensus ADMM for Active Fluid Control

    A. Bonomi, F. Banelli, A. Terpin

    Particle Image Velocimetry (PIV) is among the central modalities for measuring flow fields across laboratory, industrial and environmental setting. Traditional PIV approaches typically depend on tuning parameters specific to the imaging setup, making the performance sensitive to variations in illumination, flow conditions, and seeding density. Similarly, state-of-the-art machine learning methods for flow quantification are fragile outside their training set. In our experiments, we observed that flow quantification would improve if different tunings (or algorithms) were applied to different regions of the same image pair. Motivated by this observation, we thus pose flow quantification as a multi-estimator fusion problem: several heterogeneous algorithms process the same image pair in parallel, and their dense flow fields are treated as complementary estimates. To fuse them, we adopt a consensus framework based on the alternating direction method of multipliers, incorporating priors such as smoothness and incompressibility. We perform several numerical experiments to demonstrate the benefits of this approach. For instance, we achieve a decrease in end-point-error of up to 20% of a dense-inverse-search estimator at an inference rate of 60Hz, and we show how performance can be increased with outlier rejection. Our method is implemented in JAX and integrated into Flow Gym, enabling reproducible comparisons with the state of the art and systematic evaluation across different base algorithms. Finally, we demonstrate successful deployment of our method in the same real-world active-fluids-control setup of Terpin and D'Andrea [1], where a reinforcement-learning agent uses our flow estimates to learn to minimize drag (down by 36%) or maximize it (up to 32%) with only two minutes of real-world interaction. Hardware and software are made available at ActiveFluidControl.com.

    Hardware: v0

Open licenses. Visible attribution.

In practice: keep the license and copyright headers in source files; credit the project in the README of any fork or derivative; and when you write about or present that derivative, include the line from In slides, posts, and talks. For a paper that relies on the water channel, any of our tools, or reuses our diagrams, style, graphics, or images, cite the relevant entry in BibTeX for every publication.

Edge case, tricky situation, or something not covered here? Get in touch.