## 4 Proposed Solution Procedure for Harmonic and Interharmonic Detection
### Setting the Value of Parameter \(\sigma\) for Time-Frequency Analysis  
We select Morlet wavelet as the wavelet function, which is defined in (9).  
\[\phi(\mathrm{t})=ce^{i\omega t}e^{(-t^{2}/2\sigma^{2})} \tag{9}\]  
where \(c=\sigma/\sqrt{\pi}\), \(\omega\) is the center angular frequency of the window, \(\sigma\) is the factor of Morlet wavelet width. The corresponding frequency band covered by the window is actually limited in the range \([\frac{\omega}{2\pi}-\frac{\varphi}{2},\ \frac{\omega}{2\pi}+\frac{\varphi}{2}]\). When increasing the parameter, \(\sigma\), the width of the Gaussian window is also increased and consequently increases the frequency resolution of the TF analysis. Based on the Heisenberg uncertainty principle of signal processing, the higher the required resolution in time, the lower resolution in frequency must be [35]. The comparison of time-frequency resolution under different sizes of time resolution, \(\Delta t\), is shown in Table 1.  
The width of the window determines the frequency resolution of the wavelet transform. A better resolution can improve the accuracy of the frequency detection, but the width of the window will affect the computational efficiency and the length of the calculation time. Therefore, a useful method proposed in [36] is adopted to find the optimal \(\sigma\) value used in the Morlet wavelet. In (10), it defines the entropy-magnification factor, \(em(\sigma)\), for the selection of the optimal \(\sigma\) value. The optimal value of \(\sigma\) can result the maximum value of \(em(\sigma)\).  
\[em(\sigma)=\frac{c_{r}(\sigma)}{E(\sigma)} \tag{10}\]  
\begin{table}
\begin{tabular}{c c} \hline \hline
**When At Is Large** & **When At Is Small** \\ \hline Large scaling factor(\(|\)\(|\)\(1\)), low frequency & Small scaling factor(\(|\)\(|\)\(1\)), high frequency \\ Good frequency resolution & Poor frequency resolution \\ Poor time resolution & Good time resolution \\ \hline \hline \end{tabular}
\end{table}
Table 1: The performance of time–frequency resolution under different sizes of \(\Delta t\).  
Figure 4: Density-reachable and density-connected.  
where the magnification factor \(c_{r}(\sigma)\) is defined in (11).  
\[c_{r}(\sigma)=\frac{M_{N}\text{max}(C_{w}(i,j))}{\sqrt{\sum_{ij}C_{w}(i,j)^{2}}} \tag{11}\]  
and where the matrix \(C_{w}(i,j)=|W_{s}(i,j)|\) is developed based on the magnitudes of the elements of the complex matrix \(W_{s}(i,j)\) of (2) with discrete signal of \(s(j)\), \(j=1\), \(2\),..., \(M\), and \(M\) is the number of samples. The \(i\)-th row of \(W_{s}\) is associated with a specific center frequency, \(f_{i}\), and the \(j\)-th column is associated with a different time instant. The elements of \(C_{w}\) are the values of the envelopes of the signal at each frequency band \(i\) and each time instant \(j\).  
\(E(\sigma)\) of (11) is the Shannon entropy defined by (12).  
\[E(\sigma)=-\sum_{p=1}^{M}d_{p}\log d_{p} \tag{12}\]  
where \(d_{p}=|c_{p}|/\sum_{j=1}^{M}|c_{j}|\). The optimal value of \(\sigma\) for (12) is the one yielding the minimal entropy \(E\) of \(C_{w}\).  
The optimal value of \(em(\sigma)\) is then the \(\sigma\) that leads to the maximum value of (10), which is selected for use in the Morlet wavelet of (9). The entropy-magnification factor \(em\) is tested on a simulated signal includes a set of harmonics and interharmonics. For one simulated signal tested for a range of values of \(\sigma\), one can obtain the set of entropy-magnification factor \(em(\sigma)\). To obtain an optimal value of \(\sigma\) for detection of general harmonic and interharmonic data, a great number of simulated waveforms can be used for test. The optimal \(\sigma\) is then obtained and results in the maximum value of \(em(\sigma)\).