In this work, a multiple synchronous reference frame (MSRF) based plus optimized Moving Average Filter (MAF) is employed to extract the harmonics and interharmonics components of a three-phase current waveform recorded from transformer substation that feeds Electric Arc Furnace (EAF). EAF currents are one of the most critical issues in power quality (PQ) that usually cost issues like the light flicker in the point of common coupling (PCC). The purpose of this works is to prepare and generate accurate and fast reference waveform for real-time active filters such as static var compensator (SVC) and synchronous static compensators (STATCOMs) which can be considered as the one of the most important part of smart grids elements for compensating Harmonics, Interharmonics and flicker issues in real time. Obtained results for analyzing of harmonics and interharmonics by using MSRF+MAF is shown that the computational process is done almost real-time (in microseconds)-even faster than the sampling rate of PQ monitoring system - and so accurate (with 98% accuracy). Thus in the system real time compensation would be applicable to the Smart grid system.