In recent years, renewable resources have widely been used to provide necessary energy due to the increasing fossil fuel prices, environmental pollution concerns, and the necessity to meet the growth in energy demands. The output of renewable resources especially solar and wind energies is associated with meteorological parameters, so their reliability creates many challenges for the energy sector. The consumption peak of the gas network is taken into account to adjust the frequency of the microgrid (MG). Both gas network load and electric load distributions are adjusted at the same time. In a multicarrier network, the frequency is regulated in a nonlinear manner. Meanwhile, new necessary loads for production and electric vehicles have imposed new loads on the power network; if proper management is not performed to respond to these new loads, the increase of network frequency deviations may lead the network to fail and even break down. In this paper, a network of various sources including the wind turbine, solar panel, storage (battery and flywheel), electric vehicle (EV), diesel generator (DG) electric power generation, and multicarrier energy hub (MCEH) with combined heat and power (CHP) was designed to examine vehicle-to-grid (V2G) electric vehicles. The ANFIS adaptive fuzzy control method was used to provide a fine-tuning frequency of the network. A comparison between the suggested approach and a fuzzy controller system was carried out to examine the superiority of the introduced approach to the frequency control. The simulations were obtained using MATLAB/SIMULINK software. The simulation outcomes indicated that the SMART controller can achieve good efficiency in frequency regulation and reliable output power in the examined microgrid. Further comparison in terms of effective (RMS) values and maximum frequency deviation indicates the superior performance of the proposed method over the fuzzy method.