## Abstract

The separated flow downstream of a backward-facing step is controlled using visual information for feedback. This is done when looking at the flow from two vantage points. Flow velocity fields are computed in real time and used to yield inputs to a control loop. This approach to flow control is shown to be able to control the detached flow in the same way as has been done before by using the area of the recirculation region downstream of the step as the input for a gradient descent optimization scheme. Visual feedback using real-time computations of two-dimensional velocity fields also allows for novel inputs in the feedback scheme. As a proof of concept, the spatially averaged value of the swirling strength *λ*_{Ci} is successfully used as the input for an automatically tuned proportional–integral–derivative controller.

## 1. Introduction

Flow separation is a subject of scientific and industrial importance. Separated flows can strongly influence the performance of many industrial devices, such as diffusers, airfoils, air conditioning plants, moving vehicles and many other industrial systems [1–3]. Usually, the focus is on minimizing the size of the recirculation region, also called the recirculation bubble, to improve drag, reduce lift, reduce vibrations or lower aeroacoustic noise.

To manipulate a detached flow, many kinds of actuations have been considered. A list of actuations can be found in [4]. In the case of open-loop flow control, passive actuation often improves the characteristics of the flow but only for given operating conditions. Active actuators have also been used in open-loop experiments (see [5,6]), but they are unable to adapt to exogenous parameter changes. Feedback control strategies, or closed-loop flow control, offer the possibility of adapting the actuation to external perturbations or changes in the experimental conditions, thus improving the robustness of the control. Examples of closed-loop control strategies implemented either numerically or experimentally are given in [7,8].

The backward-facing step (BFS) is considered to be a benchmark geometry for studying detached flow. Separation is imposed by a sharp edge, thus allowing the separation process to be examined by itself. The main feature of the BFS flow is the creation of a recirculation downstream of the step together with a strong shear layer in which the Kelvin–Helmholtz instability can trigger the creation of spanwise vortices. The flow downstream of a BFS has been extensively studied both numerically and experimentally [9–12].

An essential part of many control strategies is determining one or several control variables. The variable is either directly computable from sensor data, such as local pressure or drag measurement, or obtained by combining sensor data and a model. This model can be simple ([13] recovers recirculation length via its correlation with pressure fluctuations) or complicated ([14] recovers an approximation of the flow state through Kalman filtering). In the case of the BFS, sensors are almost always pressure sensors, and the control variable is usually the recirculation length. While wall-based sensors present the advantage of high-frequency acquisition, they also present a limited view of the flow: many phenomena are difficult to access because they are buried in noise or simply unobservable. Furthermore, they are intrusive.

Using the flow velocity field computed from visual data to control a flow has been suggested and successfully implemented in numerical simulations [15]. Control using visual feedback was implemented as a proof of concept by Willert & Munson [16]. Roberts [17] was successful in improving the control of the flow behind a flap using real-time instantaneous velocity data. The exponential rise in computing power allows for the computation of large, dense and accurate velocity fields at high frequencies, as shown in [18].

In this paper, we investigate the feasibility of controlling the separated flow behind a BFS using flow velocity fields computed in real time from visual data. The flow is observed both from the side and from above. Two control variables are used—the recirculation area and the spatially averaged swirling intensity. A jet is used to act on the flow. The evolution of the control variables with Reynolds number (based on step height *h*) or the jet velocity is determined. Two basic schemes are implemented to control the flow. To show how visual feedback can be used in the same control schemes as have been previously proposed, the recirculation area is used as the input variable to a gradient descent optimization scheme. To show that visual servoing can be used to control the flow in novel ways, the control variable based on the swirling strength is used as the input to a proportional–integral–derivative (PID) controller. The aim of this paper is to show the relevance of visual feedback for detached flows. Thus, the injection geometry, control variables and control schemes are reduced to their simplest expression.

## 2. Experimental set-up

### (a) Water tunnel

Experiments were carried out in a hydrodynamic channel, in which the flow is driven by gravity. The walls are made of Altuglas for easy optical access from any direction. The flow is stabilized by divergent and convergent sections separated by honeycombs. The test section is 80 cm long with a rectangular cross section 15 cm wide and 10 cm high.

The mean free-stream velocity ranges between 1.38 and 22 cm s^{−1}. A specific leading-edge profile is used to smoothly start the boundary layer, which then grows downstream along the flat plate, before reaching the edge of the step 33.5 cm downstream. The boundary layer is laminar and follows a Blasius profile. The quality of the main stream can be quantified in terms of flow uniformity and turbulence intensity. The standard deviation *σ* is computed for the highest free-stream velocity featured in our experimental set-up. We obtain *σ*=0.059 cm s^{−1}, which corresponds to turbulence levels of .

### (b) Backward-facing step geometry

The BFS geometry and the main geometric parameters are shown in figure 1. The height of the BFS is *h*=1.5 cm, leading to Reynolds numbers ranging between 0 and 3300 (*ν* being the kinematic viscosity). Channel height is *H*=7 cm for a channel width *w*=15 cm. One can define the vertical expansion ratio *A*_{y}=*H*/*h*+*H*=0.82 and the spanwise aspect ratio *A*_{z}=*w*/*h*+*H*=1.76. The distance between the injection slot and the step edge is *d*=3.5 cm.

### (c) Real-time 2D2C velocimetry

The flow is seeded with 20 μm of neutrally buoyant polyamide seeding particles. The test section is illuminated by a laser sheet created by a 2 W continuous wave laser beam operating at wavelength *λ*=532 nm passing through a cylindrical lens. The pictures of the illuminated particles are captured using a Basler acA 2000-340 km 8-bit complementary metal-oxide–semiconductor camera. The camera is controlled by a camera-link NI PCIe 1433 frame grabber allowing for real-time acquisition and processing. Velocity field computations are run on the graphics processor unit (GPU) of a Gforce GTX 580 graphics card.

The 2D2C (measurements of two components in a two-dimensional plane) velocimetry measurements are obtained using an optical flow algorithm called FOLKI, developed by Champagnat *et al*. [19]. It is a local iterative gradient-based cross-correlation optimization algorithm which yields dense velocity fields, i.e. one vector per pixel. It belongs to the Lucas–Kanade family of optical flow algorithms [20]. The spatial resolution, however, is tied to the window size, like any other window-based particle image velocimetry (PIV) technique. However, the dense output is advantageous as it allows the sampling of the vector field to be very close to obstacles, yielding good results near walls, as shown in [19]. The algorithm was used in earlier studies [21–23].

A description of the algorithm and how it is implemented on a GPU is available in [19]. Moreover, its offline accuracy was extensively studied by Champagnat *et al*. [19]. GPU implementation allows it to run at high frequencies. Its online efficacy at high frequencies was demonstrated in [18]. No changes were made to the algorithm; however, preprocessing routines were written to ensure smooth operation, as described in [19]. Code optimizations and tweaks were also made in order to increase operating frequencies, most of which are detailed in [18]. All postprocessing routines run independently of the core code, and therefore do not affect the quality of the output fields.

The principle of the featured optical flow algorithm is as follows. The original images are reduced in size by a factor of 4 iteratively until intensity displacement in the reduced image is close to 0. This gives a pyramid of images, as described in figure 2. Displacement is computed in the image at the top of the pyramid with an initial guess of zero displacement using an iterative Gauss–Newton scheme to minimize a sum of squared difference criterion. This displacement is then used as an initial estimate for the same scheme in the next pair of images in the pyramid. This scheme continues until the base of the pyramid, corresponding to the initial images, is reached, thus giving the final displacement.

It should be noted that this pyramidal process allows the algorithm to converge for small and high displacements indiscriminately, making it ideally suited to compute velocities in separated flows where regions of low- and high-velocity fluid often coexist.

Because of its intrinsically parallel nature, the algorithm is able to fully use the processing power of modern GPUs. It is not uncommon to reach 99% GPU loads, allowing it to accurately compute flow velocity fields for large images (typically 2 megapixels) at relatively large frame rates (24 frames per second or greater frequencies with the given hardware). Furthermore, it scales exceptionally well with the increasing computing power. Although there are differences from classic PIV algorithms, output velocity field resolution is still tied to the size of the interrogation window. Nevertheless, the output field is dense (one vector per pixel), giving better results in the vicinity of edges and obstacles. Furthermore, this gives exceptionally smooth fields.

Two configurations are used in the following: the first is the classic vertical symmetry plane (SP) and the second is a horizontal plane (HP), as illustrated in figure 3. The position of the HP, for the HP configuration, was *y*=0.5 cm. The position was the result of a compromise. The plane was placed as close to the lower wall as possible while still getting good image quality. When the plane is too close to the wall, the light reflected by the particles on the bottom wall makes the measurement difficult. Figure 3 shows how the flow was observed both from the side and from above. Characteristics of the measurement for both configurations are detailed in table 1.

### (d) Actuation and feedback loop

The flow is controlled using a spanwise, normal to the wall, slot jet, 0.1 cm long and 9 cm wide. The slot is located 3.5 cm upstream the step edge (figure 1). Water coming from a pressurized tank enters a plenum and goes through a volume of glass beads designed to homogenize the incoming flow. Jet output is controlled by changing the tank pressure. The injection geometry was chosen to avoid three-dimensional effects and keep the perturbation as bidimensional as possible. The control parameter, or manipulated variable, is the mean jet velocity *V* _{j}. Mean jet velocity varies from −5 to 35 cm s^{−1}. As the jet supply tank is below the channel tank, there is some suction when no pressure is supplied to the jet tank, allowing easy refilling of the tank. The dimensionless actuation amplitude is defined as the ratio of the mean jet velocity to the flow velocity .

The feedback loop is summarized in figure 4.

In the following, open-loop experiments are carried out for all Reynolds numbers, whereas closed-loop control experiments are carried out for one single Reynolds number, *Re*_{h}=2900. For all Reynolds numbers, vortex shedding frequency does not exceed 3.62 Hz; figure 5 shows a frequency spectrum for vortex shedding, which was obtained for the highest Reynolds number. It was obtained by spatially averaging *λ*_{Ci} in the vertical direction at *x*=2.5*h*. As a rule of thumb, discrete time control should be effected 10 times as fast as the phenomenon one wishes to control, thus a frequency of 40 Hz should be sufficient to control the flow. The real-time velocimetry allows for a feedback acquisition frequency up to 73 Hz for the SP case and 22.5 Hz for the HP case. The frequency is lower for the HP case because the images are bigger. It should be noted that higher frequencies can be achieved for both cases but they were not needed for the current experiments. As too high a frequency can cause instabilities, the sample rate was fixed at 40 Hz.

The data used to create the graphs displayed hereafter can be found in the electronic supplementary material.

## 3. Characterization of the uncontrolled flow

### (a) Evolution of the recirculation with *Re*_{h}

The first step is to choose and properly define the quantity to be controlled. In the case of separated flows, specifically BFS flows, the recirculation length *X*_{r} is commonly used as the input variable [5,13]. Because two-dimensional velocity data are now available for the flow, the recirculation can be characterized by its area instead of its length. The recirculation area can be considered to be the area occupied by the region(s) of flow where the longitudinal velocity is negative. Recirculation area *A*_{rec} is then defined in equation (3.1)
3.1where *v*_{x}(*x*,*y*) (respectively, *v*_{x}(*x*,*z*) for the HP case) is the streamwise velocity measured in the vertical (*x*,*y*) (respectively, (*x*,*z*)) plane. This definition presents several advantages. It is applicable regardless of camera position. It is simple, straightforward and can be implemented at low computational cost, thus computation does not slow down the feedback loop. Moreover, no past data need to be computed. Figure 6 shows instantaneous bubble areas for both configurations. The black regions correspond to the separated flow. One can see that the regions are well defined. The contours are irregular, with holes especially in the HP configuration. This is consistent with a previous observation of instantaneous recirculation [12]: the reattachment line is fully three dimensional because of the destabilization of the transverse Kelvin–Helmholtz vortices shed in the shear layer. The scalar quantity used as an input for the closed-loop experiments can be *A*_{rec}(*t*), the spatial average of the regions in the instantaneous two-dimensional velocity field where a backward flow is measured at time *t*.

It is also interesting to compute the time-averaged recirculation length 〈*X*_{r}〉_{t} or area 〈*A*_{rec}〉_{t} as a function of the Reynolds number to compare with previous experimental or numerical studies. In the following, 1000 image pairs were taken at a sampling frequency *F*_{s}=3.06 Hz for 16 Reynolds numbers and for both configurations.

Figure 7*a* shows the evolution of the mean recirculation area (normalized by *h*^{2}) for the SP configuration and mean recirculation length 〈*X*_{r}〉_{t} (normalized by *h*) extracted from the mean longitudinal velocity field, choosing the second point at the wall where the longitudinal velocity changes from negative to positive. Figure 7*b* shows the evolution of the mean recirculation area (normalized by *h*^{2}) for the HP configuration. The normalized values are higher as the area is effectively larger when observed from above; however, the trend is similar. Thus, observing the flow from above allows for the determination of the recirculation state. Moreover, observing from above gives access to the spanwise fluctuations of the recirculation. It can be useful if one wishes to control the spanwise reattachment, as was done by [13] using a grid of 60 pressure sensors.

Recirculation length evolves in a way consistent with previous observations [9]. Furthermore, the normalized recirculation area closely follows the evolution of the normalized recirculation length, therefore making it a relevant parameter to characterize the flow state. These results also show how the evolution of the recirculation can be followed whichever plane the flow is observed from. This enables visual servoing to be used with any control scheme using the recirculation area as the control variable.

### (b) Evolution of the swirling intensity with *Re*_{h}

A great advantage of visual servoing is that it also allows the experimentalist to compute previously inaccessible control variables, such as those proposed by Choi *et al*. [24], i.e. variables involving quantities derived from the flow field, such as velocity fluctuations, pressure fluctuations and vorticity.

We chose to compute the swirling strength criterion *λ*_{Ci} (*s*^{−1}), which was first introduced by Chong *et al*. [25], who analysed the velocity gradient tensor and proposed that the vortex core be defined as a region where ∇**u** has complex conjugate eigenvalues. For two-dimensional data, we have when such a quantity is defined, else *λ*_{Ci}=0. It was later improved and used for the identification of vortices in three-dimensional flows by Zhou *et al*. [26]. This criterion allows for an effective detection of vortices even in the presence of shear [27]. The value 2*π*/*λ*_{Ci} at a given position is the time an element of fluid at this position would take to rotate around the nearest vortex core.

Figure 8 shows an instantaneous map of *λ*_{Ci} for *Re*_{h}=2900. Regions of high swirling intensity are vortices created in the shear layer. It is then possible to spatially average *λ*_{Ci} to compute a scalar, hereafter noted as , which effectively measures the combined intensity of the vortices present in the flow at a given time. Computation of *I*_{v}(*t*) is implemented on a GPU to maintain high-frequency sampling. Figure 8*b* shows the evolution of spatially and time-averaged swirling strength 〈*I*_{v}〉_{t} for the SP configuration. Only the SP configuration is used because it is best suited to detecting vortices in the shear layer. The figure shows how the mean swirling strength increases linearly with *Re*_{h}.

## 4. Open-loop experiments

Before turning to closed-loop experiments, it is important to characterize the open-loop response of the system for both configurations, with *Re*_{h}=2900. It is a necessary step in order to choose a proper closed-loop algorithm. Twelve actuation amplitudes were sampled for each configuration. Figure 9 shows the evolution of the mean recirculation length for both configurations as a function of actuation amplitude.

Both plots present the same qualitative characteristics: an increasing recirculation area until jet output is null followed by a decrease to a minimum and a subsequent increase. When the actuation amplitude is negative (suction) the recirculation shrinks, it grows in size as the suction amplitude diminishes. Once the amplitude becomes positive the flow remains unperturbed until the jet is strong enough to affect the recirculation. Once this happens, the recirculation area quickly diminishes. In both cases, recirculation is minimum when *a*_{0}≈1, i.e. when the jet velocity is close to the free-stream velocity. At the optimal actuation point, the shear layer is thickened by the jet, and instabilities appear sooner in the flow, thereby lowering the overall recirculation. When the actuation amplitude becomes strong enough, the jet creates a fluid wall, essentially protecting the recirculation region from the incoming flow, causing the recirculation area to increase once again. Since the relation between *A*_{rec} and the actuation amplitude presents a global minimum (−60% in both cases), a gradient-descent-type control algorithm is advisable.

Figure 10 shows the spatially and time-averaged values of the swirling strength 〈*I*_{v}〉_{t} as a function of jet intensity. It increases with actuation amplitude. At first, actuation reinforces the vortices present in the shear layer. Once the jet is strong enough to create vortices outside of the shear layer the strength of these vortices is added to the vortices created in the shear layer, resulting in an overall higher swirling intensity *I*_{v}.

## 5. Closed-loop experiments

### (a) Gradient-descent algorithm

As mentioned previously, the evolution of the manipulated variable *A*_{rec} as a function of the actuation amplitude exhibits a clear minimum. It is thus well suited to a gradient-descent control such as slope-seeking [7,28]. However, it is not possible with the present experimental set-up to add a periodic excitation. A simpler, albeit less robust, implementation of gradient descent will be used in order to demonstrate the feasibility and advantages of visual servoing when controlling a separated flow. The algorithm used is a basic gradient-descent algorithm. Actuation is changed iteratively in opposition to the controlled variable’s slope.

Figure 11*a* shows the evolution of *A*_{rec} as a function of time during minimum-seeking. Figure 11*b* shows the corresponding evolution of the actuation amplitude. One can see that, when actuation starts, *A*_{rec} decreases regularly until reaching a minimum (giving −60% reduction) after 20 s. The system remains in this state as long as actuation is applied. The actuation amplitude increases regularly until reaching a plateau at *a*_{0}=0.95, which corresponds to the optimal amplitude leading to the minimal recirculation obtained in the open-loop experiment.

This clearly demonstrates how a visual feedback system can be used to implement the same control methods as those using recirculation length as the control variable. Convergence speed is 20 s and this could be improved by improving the control algorithm.

### (b) Proportional–integral–derivative control

Because 〈*I*_{v}〉_{t} is a monotonous function of the actuation amplitude, it is well suited to control via a PID algorithm. The PID controller is fundamental in control theory and is very useful when no model of the system is available. For informations on PID control, see [29]. Essentially, an arbitrary setpoint command is given to the controller, which then computes the appropriate actuation required to bring the system to a state giving the desired setpoint value. Following the methodology described in [30], an automatically tuned PID controller was implemented. The controller is made to bring the output variable into a state of controlled oscillations. It does this in the following way: a constant actuation is given, as soon as output goes above a predetermined value, actuation is turned off, this is done many times. Over time the autotune algorithm computes PID variables best suited to the response of the system. The PID algorithm is detailed in figure 12. The control action *a*_{0} on the flow is a function of the difference *e* between the output and the setpoint. Control action is a sum of three terms. A term proportional to *e*, a term proportional to *e* integrated over time, and finally a term proportional to the derivative of *e*.

Figure 13*a* shows the evolution of the control variable during PID control, and figure 13*b* the corresponding changes in actuation amplitude. These figures show how mean swirling strength can be drastically changed.

## 6. Conclusion

An experimental study of control by visual feedback on the detached flow downstream of a BFS has been carried out in an hydrodynamic channel. High-frequency, low-latency computations of the velocity field behind the step were used to define and compute two novel control variables: recirculation area and mean swirling strength. The evolution of these variables as a function of the Reynolds number and as a function of actuation amplitude for a given Reynolds number have been studied.

*A*_{rec} is shown to behave in much the same way as its length. Hence, visual information can be used to control the BFS flow using standard feedback schemes. As the open-loop evolution of the recirculation area presents a minimum when the actuation amplitude is varied, a gradient-descent algorithm has been chosen and successfully implemented in the feedback loop.

Thanks to the real-time velocity measurements, new control variables can be defined. The spatially averaged swirling strength allows for the estimation of the intensity of the vortices created in the separated flow. This is the first time such a variable has been computed in real time from online flow velocity data, demonstrating the new avenues opened up for control by visual servoing. The open-loop response shows a relatively smooth evolution of the mean swirling strength as a function of the actuation amplitude, well fitted for a PID controller. A closed-loop implementation demonstrates how swirling strength in a detached flow can be dynamically controlled through visual feedback.

- Received June 19, 2013.
- Accepted September 20, 2013.

- © 2013 The Author(s) Published by the Royal Society. All rights reserved.