In this paper a distributed secondary control by using consensus algorithm based on fuzzy logic in islanded microgrids is presented. Inspired by techniques from cooperative control, the presented controllers use local information and neighbor communication to collect perform secondary control actions. Consensus algorithm is used for averaging voltage and sharing the active and reactive power. To tune the consensus’ parameter a smart method based on fuzzy logic is presented. Fuzzy logic based on fuzzy states and their relation between inputs and output to have the qualities of stability estimates the amount of consensus parameters. A microgrid with three sources is used to show the performance of the proposed contribution. MATLAB/SIMULINK® is used for modelling and simulation to verify proposed control levels.