Direct repetitive control with gain scheduling feature for stand-alone generating applications