Optimal design of controllers based on artificial intelligence and their application to agc in electrical power systems