This paper discusses the power quality issues for distributed generation systems based on renewable energy sources, such as solar and wind energy. A thorough discussion about the power quality issues is conducted here. This paper starts with the power quality issues, followed by discussions of basic standards. A comprehensive study of power quality in power systems, including the systems with dc and renewable sources is done in this paper. Power quality monitoring techniques and possible solutions of the power quality issues for the power systems are elaborately studied. Then, we analyze the methods of mitigation of these problems using custom power devices, such as D-STATCOM, UPQC, UPS, TVSS, DVR, etc., for micro grid systems. For renewable energy systems, STATCOM can be a potential choice due to its several advantages, whereas spinning reserve can enhance the power quality in traditional systems. At Last, we study the power quality in dc systems. Simpler arrangement and higher reliability are two main advantages of the dc systems though it faces other power quality issues, such as instability and poor detection of faults.