Microgrids are described as linking many power sources (renewable energy and traditional sources) to meet the load consumption in real-time. Because renewable energy sources are intermittent, battery storage systems are required, typically used as a backup system. Indeed, an energy management strategy (EMS) is required to govern power flows across the entire Microgrid. In recent research, various methods have been proposed for controlling the micro-grids, especially voltage and frequency control. This study introduces a microgrid system, an overview of local control in Microgrid, and an efficient EMS for effective microgrid operations using three smart controllers for optimal microgrid stability. We design the Microgrid, which is made up of renewable solar generators and wind sources, Li-ion battery storage system, backup electrical grids, and AC/DC loads, taking into account all of the functional needs of a microgrid EMS and microgrid stability. In addition, the battery energy storage is managed through the performance control of battery charging and discharging using an efficiency controller. The proposed system control is based on the optimum supply of loads through the available renewable sources and the battery State of Charge (SOC). The simulation results using Matlab Simulink show the performance of the three techniques (PID, ANN, and FL) proposed for microgrid stability.