Design and implementation of a universal converter for microgrid applications using approximate dynamic programming and artificial neural networks