Abstract-In this paper, a single-phase high-frequency AC (HFAC) microgrid is shown as a novel solution towards integrating renewable energy sources in a distributed generation system. Better utilization of the Microgrid is achieved by solving power flow and power quality issues using p-q theory-based active filtering called universal active power line conditioner and unified power quality conditioner, respectively. A distributed intelligent energy management system (DIEMS) is implemented to optimize operating costs. As the optimization greatly depends on the power generation and the power output from renewable sources strongly depends on the weather, the forecast of power generation is required for DIEMS. A Fuzzy ARTMAP neural network is used to predict hourly day-type outputs based on which generation can be forecasted. Depending on the forecast, an optimization scheme is developed utilizing linear programming along with heuristics. The results obtained show the successful implementation of HFAC Microgrid with adequate power flow and power quality control, as well as the optimization of operation cost by the DIEMS with Fuzzy ARTMAP-based day-type forecasting. The improvement in the battery life is also achieved due to optimization of storage charge states using the proposed DIEMS.Index Terms-Active filters, distributed intelligent energy management system (DIEMS), fuzzy ARTMAP, high-frequency AC (HFAC), linear programming, microgrid, unified power quality conditioner (UPQC), universal active power line conditioner (UPLC).