An advanced nonlinear control technique for grid connected generating units - Part I: Theory