## 4 Description of the Developed Method
### Obtaining Harmonic, Interharmonic, and Subharmonic Components in Real Time  
After discarding spectral components that do not exceed the _MVIS_ values, a grouping of spectral bars is performed to estimate which constitutes a true spectral component.  
As previously stated, the aim is not to find the exact values of the spectral components present in the signal under study but rather to identify the number of spectral components (including harmonics, subharmonics, and interharmonics), along with their approximate effective values and frequencies. These approximate values serve as \"seed\" or starting values for developing the KF-PLL structure.  
The grouping criterion follows the approach outlined in [15; 32; 33], which groups adjacent spectral components to obtain a single result. The algorithm employs the following criteria for grouping:  
(a) Results calculated with non-zero value harmonic subgroups are considered as harmonics.  
(b) When a spectral component with a value exceeding _MVIS_ is detected in an interharmonic subgroup, it checks for adjacent components with values exceeding _MVIS_. If there are no adjacent components, the first component is considered a single interharmonic, with its value and frequency identical to that of the component.  
(c) If there are two or three adjacent components, they are considered a single interharmonic. In the case of two components, the output value in magnitude and frequency is that of the first component. For three consecutive components, the values of the central component are considered valid.  
(d) In the case of four-to-six consecutive components, it is considered that there are two consecutive interharmonic components. These two components will have the following values:  
(d1) In the case of four, the central value of the first three is considered valid, and the second value is that of the fourth component.  
(d2) For five components, the first is calculated in the same way as four components, and the second value is adopted from the fourth component.  
(d3) With six components, the values are obtained as if they were two sets of three components, taking the central values of the two groups of three. Figure 6 depicts the result of applying the proposed method to the output of a hypothetical discrete Fourier transform of an unknown signal.  
Figure 7 illustrates the spectral component grouping process to determine which components are real. In the interharmonic subgroup (m), the minimum value of the interharmonic subgroup m (_MVISm_) is shown as a dashed red line. The algorithm groups the spectral components with values exceeding \(MVIS_{m}\) that are adjacent, as seen in the case of those situated at \(f_{m_{k+2}}\) and \(f_{m_{k+3}}\). From this grouping, the algorithm determines that the spectral component at \(f_{m_{k+3}}\) is a real component. The spectral component located at \(f_{m_{k+7}}\), being solitary, is considered a real spectral component since the algorithm identifies any solitary spectral components as real, with the _MVIS_ of each interharmonic group defining the limit. This process continues until all output spectral bars of the DFT are analysed.