Ancillary frequency controllers such as droop controllers are beneficial for frequency regulation of a microgrid with high penetration of wind generators. However, the use of such ancillary frequency controllers may cause torsional oscillation in the doubly fed induction generator (DFIG). In this paper, a supplementary torsional damper in a battery energy storage system (BESS) is designed to improve the damping ratio for the DFIG torsional mode. Since the optimal damper gain depends on system variables such as the number of diesel generators, the number of wind generators, and BESS droop gain, an artificial neural network (ANN) is trained using these system variables as inputs and the desired BESS damper gain as the output. After the ANN has been trained with the training patterns, it can provide the desired BESS damper gain in an accurate and efficient manner. The effectiveness of the proposed ANN approach for BESS damper design is demonstrated by MATLAB/SIMULINK R2022b simulations.