The conventional PI controller of both DGs is decoupled into d-axis and q-axis controllers based on steadiness of grid-voltage to ease the control strategy, which is not valid in the case of VF. As numerical analyses depicted, SOFC DG shows a considerable nonlinear oscillation in its output power under slightly high amplitude VFs while PEMFC DG does not show any significant nonlinearity oscillation. To improve the performances of both DGs under VF, a Fuzzy-PI controller is proposed, while to mitigate the nonlinearity effect of SOFC a small supercapacitor is also suggested which shows satisfactory results. Different VFs are imposed to the grid-voltage in numerical studies. Also, an oscillatory transient is imposed to the grid-voltage to evaluate the performance of the proposed controllers under a typical transient disturbance. Numerical results demonstrate the efficacy of the proposed controller in comparison with PI controller for both DGs.