Abstract. The prospects of active wake deflection control to mitigate wake-induced power losses in wind farms have been demonstrated by large eddy simulations, wind tunnel experiments and recent field tests. However, it has not yet been fully understood how the yaw control of wind farms should take into account the variability of current environmental conditions in the field and the uncertainty of their measurements. This research investigated the influence of dynamic wind direction changes on active wake deflection by intended yaw misalignment. For this purpose the wake model FLORIS was used together with 5 wind direction measurements recorded at an onshore met mast in flat terrain. The analysis showed that active wake deflection has a high sensitivity towards short-term wind directional changes. This can lead to an increased yaw activity of the turbines.Fluctuations and uncertainties can cause the attempt to increase the power output to fail. Therefore a methodology to optimise the yaw control algorithm for active wake deflection was introduced, which considers dynamic wind direction changes and inaccuracies in the determination of the wind direction. The evaluation based on real wind direction time series confirmed that 10 the robust control algorithm can be tailored to specific meteorological and wind farm conditions and that it can indeed achieve an overall power increase in realistic inflow conditions. Furthermore recommendations for the implementation are given which could combine the robust behaviour with reduced yaw activity.