This study explores the implementation of an online control strategy based on dynamic mode decomposition in the context of flow control. The investigation is conducted mainly with a fixed Reynolds number of
$Re = 100$
, focusing on the flow past a circular cylinder constrained between two walls to mitigate vortex shedding. The control approach involves the activation of two synthetic jets on the cylinder through blowing and suction. Velocity fluctuations in the wake, specifically in the
$x$
-direction, are harnessed to ascertain the mass flow rate of the jets using the linear quadratic regulator and online dynamic mode decomposition. The study systematically assesses the control performance across various configurations, including different values of the input penalty factor
${\boldsymbol {R}}$
, varying numbers of probes and distinct probe arrangement methods. The synthetic jets prove effective in stabilising the separation bubble, and their interaction with the unsteady wake leads to a notable reduction in drag force, its fluctuations and the amplitude of the lift force. Specifically, the mean and standard deviation of the drag coefficient witness reductions of
$7.44\,\%$
and
$96.67\,\%$
, respectively, and the standard deviation of the lift coefficient experiences an impressive reduction of
$85.18\,\%$
. The robustness of the proposed control method has also been tested on two more complicated cases, involving unsteady incoming flows with multiple frequency components. Comparatively, the methodology employed in this paper yields results akin to those obtained through deep reinforcement learning in terms of control effectiveness. However, a noteworthy advantage lies in the substantial reduction of computational resource consumption, highlighting the efficiency of the proposed approach.