Stationary cross-flow vortices are excited within the swept Hiemenz boundary layer via surface roughness and actively controlled using an optimally configured control device. Control is modelled using localised wall motion, but in practice the optimisation strategy could be applied to other laminar flow control technologies. A sensor-control iterative procedure, based on solutions of the forward and adjoint linearised Navier--Stokes equations, is applied to both feedforward and feedback loop systems. The former strategy only allows the control settings to be configured once, while the latter approach permits the repeated reoptimisation of the control device. Surface roughness establishes a stationary cross-flow disturbance with a pre-defined set of flow conditions, but an unknown amplitude and phase. A sensor measures the local amplitude of the perturbation and relays the information to the control mechanism. Solutions of the adjoint linearised Navier--Stokes equations are coupled with the sensor measurements to configure and optimise the control mechanism, and establish an anti-phase wave that brings about destructive wave interference. The amplitude of the stationary cross-flow instability is reduced by an order $10^3$ for the feedforward system, while amplitude reductions of the order $10^3$ per iteration and $10^8$ overall are realisable for the feedback modelling approach. Similar levels of flow control are realisable for a multiple controller configuration. However, stationary cross-flow disturbances could not be eliminated indefinitely. Inevitably, the cross-flow instability started to grow again, albeit at a considerably lower magnitude. The analysis is extended to include the effects of systematic error in the sensors measuring capability.