In this study, an optimisation method, based on bacteria foraging, is investigated to tune the parameters of the proportional-integral (PI) controllers in a doubly-fed induction generator (DFIG) wind energy system connected to the grid. The generator is connected to the grid directly at the stator and through the back-to-back converter at the rotor. The control system includes PI controllers, at the rotor side, to regulate the rotor currents and PI controller to regulate the dc-link voltage for efficient power transfer. The control parameters, of three PI controllers, are optimised offline using the bacteria foraging optimisation algorithm and a modelled DFIG wind energy system. Various performance criteria, based on the tracking errors, are used to assess the efficiency of the optimisation method. Furthermore, the conventional tuning method and genetic algorithm optimisation method are conducted and compared to the bacteria foraging optimisation method to demonstrate its advantages. The optimised control parameters are evaluated on a DFIG wind energy experimental setup. Experimental and simulation results are provided to validate the effectiveness of each optimisation method.