Power variations due to uncertainties create fluctuations in voltage/frequency (V/F). Most critical microgrid’s (MG) challenge in smart cities is V/F stability considering uncertainties in different operating conditions. This study proposes an energy management platform based on an intelligent probabilistic wavelet petri neuro-fuzzy inference algorithm (IPWPNFIA) to control the V/F index in the presence of renewable energy sources (RESs) and battery energy storage system (BESS) facing with various uncertainties. The suggested approach is programmed at two central and local controller stages based on the communication system and time-of-use demand response programs execution. The suggested approach is modeled by considering asymmetric membership functions based on the BESS optimal participation to control uncertainties caused by RESs, plug-and-play operations, and load fluctuations. The proposed platform's performance is verified and compared in different scenarios with different methods. The experimental setup and results are based on the rapid control prototyping of the micro-grid platform, MATLAB/Simulink and RT-LAB software, and hardware infrastructure such as the OPAL-RT (OP5600/OP8660) System. The most important highlights of this research are: fast dynamic response, real-time control based on real data, reducing the calculation time and burden based on learning algorithms, and the suitable coordination to adjust the protection equipment pick-up time.