## 5 Results
### Simulation 3: Noise-Effect Analysis  
To study the effect of noise on the results obtained by the proposed algorithm, a white noise signal (30% of the fundamental component, Figure 42) has been generated in order to be added to the input signal. For this analysis, the signal of Figure 42 is added to the input signal used in Point 5.2 for the first part of Simulation 2 (Figure 25), composed of the spectral components summarized in Table 5. The resulting input signal is presented in Figure 43.  
Figure 41: Estimation of the frequency values of the spectral components at 214.3 Hz (green), 229 Hz (red), and 250.3 Hz (blue). Figure 42: White noise signal used in the simulation. Table 9 summarizes the spectral components, as well as their corresponding frequency and magnitude values, obtained once the first part of the algorithm is applied to the output of the DFT. In order to facilitate the comparison, the results obtained with the input signal without noise are presented in Table 6 and are also included in Table 9. The results demonstrate that the effect of the noise does not affect the proposed identification algorithm. The same number of spectral components, as well as the same frequencies, are obtained. Only neglectable differences can be observed in the identified rms voltage values. Once the first identification is done, LKF starts the estimation of the five components at t = 0.3 s. Following the same procedure as in the previous cases, Figure 44 shows the input signal (in blue) compared with the signal estimated by the Kalman filter (in red), and Figure 45 shows the error as the difference between the two signals. It can be observed that the error signal basically corresponds to the large noise of the input signal. Therefore, to better appreciate the effect of noise on Kalman performance, it is necessary to show the estimated components individually. In this way, Figure 46 shows the estimation (in red) obtained for the first spectral component of the input signal (in blue, 23 Vrms and 33.9 Hz). Figures 47 and 48 present the frequency estimation for the 33.9 Hz component and for all components, respectively. Comparing these results with those presented in Figures 29 and 30, it can be clearly seen how noise affects the signals estimated by the LKF. In terms of frequency, the estimated signals show an error of less than 1% for all the components studied. Figure 46: Subharmonic estimation comparison. LKF estimation (red) versus 33.9 Hz component of the input signal (blue). Figure 44: Input signal (blue) versus Kalman filter estimated signal (red). Figure 45: Error signal obtained as the difference between input and estimated signals. Figure 50 shows the time evolution of the estimated rms voltage value using the LKF of the spectral components that form the input signal. Figure 47: Subharmonic frequency estimation. Figure 48: Frequency estimation of the five components that form the input signal. As a result, Table 10 shows the absolute maximum error and the RMSE measured during the last 100 rms of the simulation. Since noise is not a component that can be modeled in the Kalman filter structure, noise is translated into Kalman states because the recursive Kalman structure attempts to reproduce the original signal. Frequency estimations show fluctuations within a band very close to the real value. The rms estimated values show a higher deviation, with RMSE errors up to 2.84%, which is good enough considering the high noise added to the input signal. Regarding the estimations made for the instantaneous voltage values of the spectral components, they lack good precision. However, Figure 44 demonstrates good results in global estimation, with instantaneous error never reaching the maximum allowable error (MAE) that could have forced the algorithm to restart the identification process unnecessarily. The problems raised above can be corrected by studying the noise signal and calculating an optimal R matrix for high noise values.