A consistent part of the research in the hydropower field in Norway is being done at NTNU. The Faculty of Information Technology and Electrical Engineering is an active player in this research through the Department of Electric Power Engineering. This research is established through a long-term plan and is organized in four main areas: hydropower structures, turbines and generators, markets and services, and environmental design. For this purpose, NTNU is the host institution and the main research partner, through Hydrocen whereas SINTEF Energy Research and The Norwegian Institute for Nature Research NINA, also contribute in their respective areas.At Hydrocen, the research in variable speed machinery based on converter-fed technology is one of the main topics.The synchronous generator is controlled by an inverter and feeds a DC link, which is connected through the grid by means of the grid side converter, also called Active Front End Converter (AFE).This Thesis is related to the controls used by the AFE. The control of the AFE is a cascade control, which includes a hysteresis current and resonant voltage control loop, AC voltage and frequency droop, and other dynamic features as virtual damping and inertia effects.The focus of this thesis has been the development of a tuning methodology of the resonant controller considering the PI control, resonant control and active damping by means of the Nyquist diagrams and robust control theory guidelines. Also, a delay compensation method has been developed and tested in a simulation environment. The impact of the most important variables has been evaluated and recommendations are given to continue the work.