Intelligent secondary control in smart microgrids: an on-line approach for islanded operations