The utilization of distributed generation (DG) in today's power systems has led to the emergence of the concept of microgrids, in addition to changing the mode of generating and supplying the energy required for network electrical loads. When a microgrid operates in the island mode, energy generation sources are responsible for controlling the microgrid’s voltage and frequency. As the microgrid frequency is proportional to the amount of power generated by the DG, the microgrid requires a precise power-sharing strategy. Considering that DGs do not usually have stable output power despite the importance of power stability, the present paper addresses the voltage and frequency control of an islanded microgrid by considering the power generation uncertainties caused by disturbances and the varying power output of DGs. Given that the disturbance on the first DG's input current is 0.2 A, which is approximately 2.2% of the steady-state value, a simulation was performed, and it was observed that the maximum voltage variation of each bus in the worst case was 0.59% for the first bus and 0.53% for the second bus, which means that the controller could control the voltage and frequency values within the permissible range. If the controller is not used, the change in the frequency of each bus will be 10 times, and the voltage change will be 5 times as great as that of the case the controller is used.