## 1 Introduction  
It is well known that harmonics and interharmonics may cause transformer overheating, malfunctions of metering devices, or resonances that cause detrimental effects on the other power system components. In recent years, harmonic and interharmonic pollution in the power system has drawn much attention because of the increasing widespread applications of non-linear loads and integration of renewables. There are many techniques proposed for the detection of harmonics and interharmonics, including discrete Fourier transform and window function, wavelet neural network, Prony-based, maximum likelihood and optimization, Kalman filter, and sparse decomposition combined with discrete trigonometric transform-based methods [1; 2; 3; 4; 5; 6; 7; 8; 9; 10]. However, most of these detection methods assume that the measured waveforms are stationary. When the measured waveform contains interharmonics or has time-varying magnitude and frequency, the traditional methods present inaccurate results. To tackle the non-stationary harmonic and interharmonic measurement problems, several techniques have been proposed to perform more accurate assessment of such time-varying signals. These techniques for measuring dynamic harmonics and/or interharmonics include enhanced phase-locked loop mechanism, steepest descent gradient, or Gauss-Newton-based iterative techniques, extended Kalman filter, improved fast Fourier transform with sliding window, compressed sensing-based Taylor-Fourier transform, and deep-learning-based methods [11; 12; 13; 14; 15; 16; 17]. Though these methods have been proved to be efficient in time-varying harmonic and/or interharmonic measurements, the drawbacks are that most of these methods are not effective to show the time-frequency characteristics, and they are more suitable for either near-stationary magnitude-varying or frequency-varying signals. In recent years, time-frequency (TF) analyses have drawn much attention in the field of electric power engineering for the analysis of time-varying non-stationary waveforms, especially when the distorted waveforms contain oscillating components with slowly time-varying magnitudes and instantaneous frequencies. There are several linear TF methods proposed, such as short-time Fourier transform (STFT), S-transform, continuous wavelet transform (CWT), Fourier-based synchrosqueezing transform (FSST), and synchrosqueezing wavelet transform (SSWT) [18; 19; 20; 21; 22; 23; 24; 25; 26]. Much effort has been made to improve the TF resolution of the different time-frequency ridges (TFRs) of a signal. Among these methods, CWT is the most common for power-quality (PQ) analysis. Both STFT and S-transform are also popular for TF analysis [18; 21]. However, the results are sufficiently accurate only when the measured waveforms are close to stationary. Both FSST and SSWT have the ability for signal reconstruction. The advantage of SSWT is that it is good for sharpening the time-frequency representation of the measured time-varying signal through the allocation of the CWT coefficient value to a different location in the time-frequency plane compared to FSST. The other advantages include better anti-noise features and higher resolution of time-frequency curves; even the measured signal has close frequency components. It is proved that the SSWT is robust and is suitable for TF analysis for weakly time-varying signals [26]. Therefore, this paper proposes a time-varying harmonic and interharmonic detection method based on combining synchrosqueezing wavelet transform and the clustering method of density-based spatial clustering of applications with noise (DBSCAN) [27; 28]. The proposed method is first to obtain time-frequency plots of the measured waveform and the clustering methods are then adopted to accurately detect each frequency component. Next, inverse SSWT is performed to reconstruct the time-domain waveform and obtain the corresponding magnitude of each harmonic and interharmonic component.