Clear Sky Science · en
A lightweight metaheuristic-driven adaptive PID approach for nonlinear conical tank regulation
Keeping Liquid Levels Steady in a Wobbly World
From clean drinking water to chemical manufacturing, countless industries rely on tanks that hold and move liquids. When those tanks are shaped like cones instead of cylinders, keeping the liquid level steady becomes surprisingly tricky. This paper presents a new way to automatically control the level in such conical tanks using a fast, lightweight optimization method inspired by the flocking behavior of flamingos, making advanced control practical even on low‑cost hardware.
Why Cone-Shaped Tanks Are Hard to Control
Unlike a straight-walled cylinder, a conical tank narrows toward the bottom, so the cross-sectional area changes with height. When the tank is nearly empty, a small amount of inflow raises the level quickly; when it is almost full, the same inflow changes the level much more slowly. As a result, the tank’s responsiveness and stability depend strongly on how full it is. Traditional industrial controllers, which use fixed settings for the proportional, integral, and derivative (PID) actions, are usually tuned for one operating point. In a conical tank, that means they may work well at one height but produce overshoot, slow responses, or poor disturbance handling at other heights.
A Smarter Controller That Learns as It Runs
To tame this changing behavior, the authors design a controller that constantly retunes itself while the tank operates. At the heart of the approach is a "model reference" scheme: a simple target model defines how the water level should ideally rise and settle—fast but not too fast, stable but still responsive. The real tank’s level is continuously compared to this desired response, and the difference becomes the learning signal. Around this, a PID controller adjusts the pump input. Rather than fixing the PID gains, the system updates them over time so that the real tank output follows the reference model as closely as possible, even as operating conditions change.

Flamingos in Silicon: Fast Optimization on a Tiny Computer
The novel twist is how those PID settings are adapted. Many modern optimization methods—like genetic algorithms or particle swarms—can search for good controller parameters, but they often need heavy computation and many iterations, which is impractical for small embedded devices. The authors instead use the Flamingo Search Algorithm, a relatively lightweight metaheuristic inspired by how flocks of flamingos search for food. In software, each "flamingo" represents a candidate set of PID gains. Over short adaptation windows, these candidates are tested on a mathematical model of the tank using recent measurement data, and the mean squared tracking error is computed. The virtual flock moves through the space of possible gains, balancing global exploration with local fine-tuning until a good set is found, all within tens of milliseconds.
From Equations to a Working Lab System
The team first derives a physics-based equation for how the water level in a conical tank changes with inflow and outflow, capturing how the effective area and flow behavior vary with height. They then build a lab-scale setup: a transparent conical tank, a level sensor, a pump, and an ESP32 microcontroller linked to a Jetson Nano edge computer. The control loop runs every second, while the Flamingo algorithm is triggered at longer intervals using a sliding window of recent data. Safety measures such as pump saturation limits and rate limits on changes in the PID gains keep the actuator commands smooth and avoid sudden shocks in the water flow.

How Well Does It Work in Practice?
In experiments across several inflow conditions, the Flamingo-based adaptive controller consistently achieved rise times of about 8–13 seconds and settling times of 30–45 seconds, while keeping overshoot within about 2–5% and steady-state errors below 0.5 cm. It also maintained generous stability margins, meaning it tolerated uncertainties and disturbances without becoming oscillatory. When compared against two widely used tuning recipes for fixed PID controllers—Ziegler–Nichols and Cohen–Coon—the adaptive method showed clearly lower overshoot, faster settling, better disturbance rejection, and tighter level control across the entire operating range of the tank. Statistical analysis over multiple repeated runs confirmed that these advantages were not just lucky single trials but robust, repeatable trends.
What This Means for Real-World Systems
For non-experts, the key message is that advanced, self-tuning control no longer has to be computationally heavy or confined to large, expensive hardware. By combining a simple reference model with a fast, flock-inspired optimizer, the authors demonstrate a controller that can keep a difficult, highly nonlinear tank both responsive and stable, and do so on modest embedded devices. This makes it more realistic to deploy smarter, more robust control strategies in real plants—improving safety, efficiency, and product quality wherever liquids must be kept at just the right level.
Citation: Rajaram , K., Kathirvel, M. & Subburathinam, K. A lightweight metaheuristic-driven adaptive PID approach for nonlinear conical tank regulation. Sci Rep 16, 13288 (2026). https://doi.org/10.1038/s41598-026-42548-2
Keywords: conical tank, adaptive PID control, metaheuristic optimization, embedded control, liquid level regulation