Adaptive Tracking Method of Distorted Voltage Using IMM Algorithm under Grid Frequency Fluctuation Conditions

This paper newly proposes an interactive multiple model (IMM) algorithm to adaptively track distorted AC voltage with the grid frequency fluctuation. The usual tracking methods are Kalman filter (KF) algorithm with a fixed frequency and KF algorithm with frequency identifier. The KF algorithm with a fixed frequency has a larger covariance parameter to guarantee the tracking robustness. However, it has a large tracking error. The KF algorithm with frequency identifier overly depends on the accuracy and stability of frequency identifier. The advantage of the proposed method is that it is decoupled from frequency detection and does not depend on frequency detection accuracy. First, the orthogonal vector dynamic (OVD) tracking model of the sine wave is established. Then, a model set covering the grid frequency fluctuation range is formed, and a new OVD-IMM tracking algorithm is proposed in combination with IMM algorithm. In the end, the effectiveness and accuracy of the proposed OVD-IMM algorithm are verified through simulations and experiments.

As we all know, as the source-grid-load changes, the power grid frequency is not fixed at 50 Hz but fluctuates with time. Frequency fluctuation obeys non-Gaussian distribution. Its fluctuation range generally reaches 49.5 Hz-50.5 Hz [34]. Some methods in the literature are to use the KF algorithm with a fixed frequency [27,28]. When tracking the AC voltage, the KF algorithm covariance parameter is 0.05. The parameter of 0.05 is larger and the frequency band is wider. It guarantees the robustness of the KF algorithm when the frequency fluctuates. However, it has a large tracking error. Another method uses KF algorithm with real-time frequency identifier, as shown in Figure 1 [29][30][31][32][33]. This kind of tracking method realizes adaptive tracking by feeding back the estimated value of the fundamental frequency. Different frequency detection algorithms are used in the literature, such as extended Kalman filter (EKF) combined with integrator estimation method [29], generalized averaging method [30], frequency locked loop (FLL) [31][32][33], etc. The disadvantage of the KF algorithm with frequency identifier is that it requires a large amount of calculation and high frequency accuracy. If the frequency identifier is inaccurate This paper presents a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. It is shown in Figure 2. By comparing Figures 1 and 2, the advantage of IMM algorithm is that it does not require frequency detection and feedback tracking, and the tracking method is not affected by frequency detection accuracy and can achieve full self-adaptation. The IMM algorithm is an algorithm with Markov switching coefficients, in which multiple models of different frequencies work in parallel, and the tracking output is the result of the interaction of multiple filters [35][36][37][38][39][40][41]. The transfer between models is determined by Markov probability transfer matrix, which can effectively adjust the probability of each model. IMM estimates through the interaction between multiple models. Compared with the single-model algorithm, IMM is more adaptable to the fluctuation of the estimated object. It is used in hybrid control system tracking [38], maneuvering target tracking [39], human pose estimation [40], dynamic state estimation of distribution network [41], etc. The contributions of this paper are as follows: (a) the orthogonal vector dynamic (OVD) model is re-derived from the stochastic process theory [42], which made it clear that the covariance matrix is related to the sampling cycle. The orthogonal vector (OV) model used in conventional KF algorithm lacks theoretical derivation, and the covariance coefficient is only a fixed value of 0.05 [27,28]. The derivation of the OVD model lays the foundation for the application of the IMM algorithm. (b) The OVD-based IMM (OVD-IMM) algorithm of two models is proposed to adaptively track distorted AC grid voltage with the frequency fluctuation. Section 1 introduces a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. In Section 2, the OVD model is re-derived according to of stochastic process theory. The state space of the OVD is expanded. In Section 3, the OVD-IMM algorithm is presented and developed. In Sections 4 and 5, the performances of OVD-IMM algorithm are evaluated and compared by simulation and the experiment data. Section 6 makes a conclusion of the paper.

OVD Model
In Section 2, we illustrate the principle of OVD modeling. The covariance matrix of state noise for OVD model is reorganized according to the theory. The relationship between the model and the sampling cycle is clarified. We expand the state space dimension of OVD model. This paper presents a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. It is shown in Figure 2. By comparing Figures 1 and 2, the advantage of IMM algorithm is that it does not require frequency detection and feedback tracking, and the tracking method is not affected by frequency detection accuracy and can achieve full self-adaptation. The IMM algorithm is an algorithm with Markov switching coefficients, in which multiple models of different frequencies work in parallel, and the tracking output is the result of the interaction of multiple filters [35][36][37][38][39][40][41]. The transfer between models is determined by Markov probability transfer matrix, which can effectively adjust the probability of each model. IMM estimates through the interaction between multiple models. Compared with the single-model algorithm, IMM is more adaptable to the fluctuation of the estimated object. It is used in hybrid control system tracking [38], maneuvering target tracking [39], human pose estimation [40], dynamic state estimation of distribution network [41], etc.
Energies 2021, 14, x FOR PEER REVIEW 2 of 18 amount of calculation and high frequency accuracy. If the frequency identifier is inaccurate or unstable, it will affect the electrical signal tracking and parameter measurement accuracy, and even cause tracking failure. This paper presents a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. It is shown in Figure 2. By comparing Figures 1 and 2, the advantage of IMM algorithm is that it does not require frequency detection and feedback tracking, and the tracking method is not affected by frequency detection accuracy and can achieve full self-adaptation. The IMM algorithm is an algorithm with Markov switching coefficients, in which multiple models of different frequencies work in parallel, and the tracking output is the result of the interaction of multiple filters [35][36][37][38][39][40][41]. The transfer between models is determined by Markov probability transfer matrix, which can effectively adjust the probability of each model. IMM estimates through the interaction between multiple models. Compared with the single-model algorithm, IMM is more adaptable to the fluctuation of the estimated object. It is used in hybrid control system tracking [38], maneuvering target tracking [39], human pose estimation [40], dynamic state estimation of distribution network [41], etc. The contributions of this paper are as follows: (a) the orthogonal vector dynamic (OVD) model is re-derived from the stochastic process theory [42], which made it clear that the covariance matrix is related to the sampling cycle. The orthogonal vector (OV) model used in conventional KF algorithm lacks theoretical derivation, and the covariance coefficient is only a fixed value of 0.05 [27,28]. The derivation of the OVD model lays the foundation for the application of the IMM algorithm. (b) The OVD-based IMM (OVD-IMM) algorithm of two models is proposed to adaptively track distorted AC grid voltage with the frequency fluctuation. Section 1 introduces a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. In Section 2, the OVD model is re-derived according to of stochastic process theory. The state space of the OVD is expanded. In Section 3, the OVD-IMM algorithm is presented and developed. In Sections 4 and 5, the performances of OVD-IMM algorithm are evaluated and compared by simulation and the experiment data. Section 6 makes a conclusion of the paper.

OVD Model
In Section 2, we illustrate the principle of OVD modeling. The covariance matrix of state noise for OVD model is reorganized according to the theory. The relationship between the model and the sampling cycle is clarified. We expand the state space dimension of OVD model. The contributions of this paper are as follows: (a) the orthogonal vector dynamic (OVD) model is re-derived from the stochastic process theory [42], which made it clear that the covariance matrix is related to the sampling cycle. The orthogonal vector (OV) model used in conventional KF algorithm lacks theoretical derivation, and the covariance coefficient is only a fixed value of 0.05 [27,28]. The derivation of the OVD model lays the foundation for the application of the IMM algorithm. (b) The OVD-based IMM (OVD-IMM) algorithm of two models is proposed to adaptively track distorted AC grid voltage with the frequency fluctuation. Section 1 introduces a new method for tracking the distorted AC grid voltage of the frequency fluctuation using (interacting multiple models) IMM algorithm. In Section 2, the OVD model is re-derived according to of stochastic process theory. The state space of the OVD is expanded. In Section 3, the OVD-IMM algorithm is presented and developed. In Sections 4 and 5, the performances of OVD-IMM algorithm are evaluated and compared by simulation and the experiment data. Section 6 makes a conclusion of the paper.

OVD Model
In Section 2, we illustrate the principle of OVD modeling. The covariance matrix of state noise for OVD model is reorganized according to the theory. The relationship between the model and the sampling cycle is clarified. We expand the state space dimension of OVD model.

Derivation of OVD Model
In two-dimensional space, the circular movement of the object along the midpoint is projected on the x, y axis as a pure sine and a pure cosine waveform, as shown in Figure 1.
It can be expressed as where, A m is the amplitude, ω 0 is the angular frequency, and θ is the phase angle. The diagram demonstrates how the object circular movement being projected in Figure 3.

Derivation of OVD Model
In two-dimensional space, the circular movement of the object along the midpoint is projected on the x, y axis as a pure sine and a pure cosine waveform, as shown in Figure  1.
It can be expressed as where, m A is the amplitude, 0  is the angular frequency, and  is the phase angle. The diagram demonstrates how the object circular movement being projected in Figure 3. The first derivative can be expressed as The state equation can be obtained from (1).
Equation (3) is discretized, and we get the state equation as follows The covariance matrix of state noise k W can be expressed as From Equation (7), an important conclusion can be known that k Q is related to sampling cycle T . Figure 3. Diagram of the object circular movement being projected.
The first derivative can be expressed as .
where w x (t) and w y (t) are the input white noise, The state equation can be obtained from (1).
d dt where Equation (3) is discretized, and we get the state equation as follows The covariance matrix of state noise W k can be expressed as From Equation (7), an important conclusion can be known that Q k is related to sampling cycle T.

Dimension Expansion of OVD Model
The waveform of the distorted AC signal sampled at time t would be presented as where i = 1, 2, 3, · · · , N represents the number of fundamental and harmonic components, T is the sampling cycle. The fundamental frequency is ω = 100π ± e, while e is the frequency fluctuation value.
w i (t) represent the fundamental and harmonic components, and their state noise, respectively. For Equation (1), the dimensionality of the OVD model is expanded under the consideration of fundamental and harmonic components.
where y i (t) is the orthogonality of x i (t). In the condition of continuous time, the state space expression is established.
where the state noise vector is where ω m represents the fixed frequency of this model, different values of ω m represent different models. The measurement equation is where the measurement noise vector is v(t).
We discretize Equations (10) and (11) in accordance with the principle of OVD model. Then, the state and measurement equation can be where X k = x 1k y 1k x 2k y 2k · · · x nk y nk T , W 1 W 2 · · · W n T k is the state noise. The state transition matrixes and the measurement transfer matrix are shown below as Energies 2021, 14, 7944

of 17
The covariance matrix of state noise W k i is The difference from the traditional OV model in the [27,28] is that Q is different. The OVD model clarifies the relationship between the covariance matrix and the sampling cycle. The IMM algorithm cannot just adopt the traditional OV model's covariance coefficient of 0.05. Otherwise, the IMM algorithm will bring tracking errors.
If we just choose the fixed value of 0.05, when the frequency fluctuates, the traditional OV algorithm still adjusts the amplification factor K according to the covariance Q of the fixed frequency. The lack of dynamic tracking performance results in the algorithm not being able to track the dynamic fluctuations in time. The IMM algorithm uses maximum likelihood estimation to determine the transition probability between models to adaptive tracking dynamic fluctuations. Therefore, the IMM algorithm has stronger and more stable adaptive tracking capability.

OVD Model-Based IMM Algorithm
In this section, the OVD Model-based IMM Algorithm (OVD-IMM) is proposed by combining OVD models and IMM algorithm. Then, the parameters of two model OVD-IMM algorithms are selected.

OVD-IMM Algorithm
The block diagram of IMM Algorithm is presented in Figure 4. The IMM algorithm formula is shown in Table 1. The difference from the traditional OV model in the [27,28] is that Q is different. The OVD model clarifies the relationship between the covariance matrix and the sampling cycle. The IMM algorithm cannot just adopt the traditional OV model's covariance coefficient of 0.05. Otherwise, the IMM algorithm will bring tracking errors.
If we just choose the fixed value of 0.05, when the frequency fluctuates, the traditional OV algorithm still adjusts the amplification factor K according to the covariance Q of the fixed frequency. The lack of dynamic tracking performance results in the algorithm not being able to track the dynamic fluctuations in time. The IMM algorithm uses maximum likelihood estimation to determine the transition probability between models to adaptive tracking dynamic fluctuations. Therefore, the IMM algorithm has stronger and more stable adaptive tracking capability.

OVD Model-Based IMM Algorithm
In this section, the OVD Model-based IMM Algorithm (OVD-IMM) is proposed by combining OVD models and IMM algorithm. Then, the parameters of two model OVD-IMM algorithms are selected.

OVD-IMM Algorithm
The block diagram of IMM Algorithm is presented in Figure 4. The IMM algorithm formula is shown in Table 1.   Predicted mode probability: Mixing weight: Mixing estimate:

(2). Model-Conditioned Filtering (for i = 1,2):
Predicted state: Predicted covariance: Measurement residual: Model likelihood:  In the Table 1, j represents the number of different models, π ji and µ (j) k−1 denote the initial given values of mode probability and mixing weight, respectively.X Multiple models with different frequencies ω m in (12) and (13) form a model set, and substituting them into formula Table 1 to form the OVD Model-based IMM (OVD-IMM) algorithm.  (for i = 1,2, . . . ,N):

OVD-IMM Application Development
When the IMM algorithm is applied to AC signal dynamic tracking, in order to obtain the best tracking effect, a model set that covers the frequency fluctuation mode range as much as possible must be used. However, increasing the number of models in the model set will not only increase the computational complexity, but may not necessarily improve the tracking performance. This is because an overly refined pattern space may destroy the completeness of Bayesian inference and the independence between models. Unnecessary competition from too many models will cause algorithm performance degradation.
Therefore, two frequency models covering the upper and lower limits of frequency fluctuations are adopted as a model set in this paper. The frequency of the lower limit model is f 1 = 48.5 Hz, the angular frequency ω m 1 = 2π × f 1 = 2π × 48.5 rad/s. The frequency of the upper limit model is f 2 = 51.5 Hz, the angular frequency ω m 2 = 2π × f 2 = 2π × 51.5 rad/s. We calculate the amplitude and the phase angle.
x i k+1 ,ŷ i k+1 is the fundamental components of the overall estimator in Table 1(4). The harmonics ratio for voltage (HRU) is defined as follow where U 1 is rms value of voltage fundamental components, U n is rms value of n-th voltage harmonic components.

Simulation and Evaluation
In Section 4, a fixed frequency 50 Hz model is selected to form the KF algorithm as a comparison mark to better illustrate the tracking results. We evaluate and compare OVD-IMM and KF algorithms by simulations. The HRU serves as a statistical indicator. The root means squared error (RMSE) values are adopted as statistical indicators for evaluation. At first, we set the setting of simulation. Then the tracking results of simulation data are shown in Section 4.2. Next to it, we obtain RMSE results of simulation data.

Simulation Setting
The distorted AC voltage signal formula with harmonics components is The amplitude is 220 √ 2 V. The percentages of harmonic components are 5% of 3rd, 10% of 5th, and 8% of 7th. The measurement white noise is σ v = 0.01 × 220

Simulation and Evaluation
In Section 4, a fixed frequency 50 Hz model is selected to form the KF algorithm as a comparison mark to better illustrate the tracking results. We evaluate and compare OVD-IMM and KF algorithms by simulations. The HRU serves as a statistical indicator. The root means squared error (RMSE) values are adopted as statistical indicators for evaluation. At first, we set the setting of simulation. Then the tracking results of simulation data are shown in 4.2. Next to it, we obtain RMSE results of simulation data.

Simulation Setting
The distorted AC voltage signal formula with harmonics components is   u( ) 220 2 1.0sin( ) 0.05sin(3 ) 0.1sin(5 ) 0.08sin (7 ) The amplitude is 220 2 V. The percentages of harmonic components are 5% of 3rd, 10% of 5th, and 8% of 7th. The measurement white noise is The sampling cycle is 0.00004 s.  The parameters of the two algorithms are selected as follows. The R of the two algorithms is 3.11 V. The initial covariance matrices of two algorithms are employed as P 0/0 = 1000 × I 10×10 .  , like [27,28]. The covariance Q array of KF is larger and the frequency band is wider.
IMM algorithms: The initial given values of mode probability and mixing weight, respectively, are: The covariance matrix of the two models is:

Tracking Results of Simulation Data
The simulation tracking results of two algorithms for heavy and slight fluctuations are shown in Figures 7 and 8. The tracking results include fundamental and harmonics components. k−1 = 0.5. The covariance matrix of the two models is: In the condition of voltage frequency heavy fluctuations, the frequencies of the two models are ω m 1 = 2π × 48.5 rad/s, ω m 2 = 2π × 51.5 rad/s. And in the condition of voltage frequency slight fluctuations, the frequencies of the two models are ω m 1 = 2π × 49.85 rad/s, ω m 2 = 2π × 50.15 rad/s.

Tracking Results of Simulation Data
The simulation tracking results of two algorithms for heavy and slight fluctuations are shown in Figures 7 and 8. The tracking results include fundamental and harmonics components.
It can be seen from Figures 7 and 8 that the IMM algorithm is stable and accurate in tracking no matter the fundamental wave or harmonic elements, and is not affected by frequency fluctuations. In Figures 7c,d and 8c,d, the accuracy of fundamental wave amplitude and harmonic tracking results is more obvious. Although the Q matrix of KF is large (0.05) and robust, the frequency mismatch also brings large tracking errors.
In order to quantitatively analyze the tracking results, the RMSE tracking results are evaluated at Section 4.3. It can be seen from Figures 7 and 8 that the IMM algorithm is stable and accurate in tracking no matter the fundamental wave or harmonic elements, and is not affected by frequency fluctuations. In Figures 7c,d and 8c,d, the accuracy of fundamental wave amplitude and harmonic tracking results is more obvious. Although the Q matrix of KF is large (0.05) and robust, the frequency mismatch also brings large tracking errors.
In order to quantitatively analyze the tracking results, the RMSE tracking results are evaluated at Section 4.3.

RMSE Results of Simulation Data
The RMSE results of two algorithms calculated by 100 times Monte Carlo simulations are shown in Figures 9 and 10. The RMSE evaluation results are shown in Tables 2 and 3. RMSE is defined as follows

RMSE Results of Simulation Data
The RMSE results of two algorithms calculated by 100 times Monte Carlo simulations are shown in Figures 9 and 10. The RMSE evaluation results are shown in Tables 2 and 3.         (20) where N = 100 is the number of simulations, x ij is j-sampled values of x i andx ij j-sampled values ofx i . From Figures 9 and 10, the simulation tracking results of the IMM algorithm are stable and accurate. The KF algorithm has a large error. Especially after 200 ms, the KF algorithm has large errors in both the fundamental and the harmonics components, while the IMM algorithm is not affected.
From Table 2 to Table 3, we know that the IMM algorithm is better than the KF algorithm whether tracking results are fundamental components or harmonic components.

Experiment and Evaluation
In Section 5, we employ experiment data to evaluate and compare two algorithms. At the beginning, we introduce the experiment settings. Secondly, we compare tracking results of experiment sampling data for voltage frequency heavy and slight fluctuations.

Experiment Settings
The experiment platform is introduced in Figure 11a. It includes the programmable power supply and the oscilloscope. The schematic diagram of the programmable power supply is introduced in Figure 11b. Experiment data for voltage frequency heavy and slight fluctuations is conducted through a programmable power supply. The percentages of harmonic components are 5% of 3rd, 10% of 5th, and 8% of 7th. The oscilloscope of Tektronix GDS-2102 serves to sample the experiment voltage data. From Figures 9 and 10, the simulation tracking results of the IMM algorithm are stable and accurate. The KF algorithm has a large error. Especially after 200 ms, the KF algorithm has large errors in both the fundamental and the harmonics components, while the IMM algorithm is not affected.
From Table 2 to Table 3, we know that the IMM algorithm is better than the KF algorithm whether tracking results are fundamental components or harmonic components.

Experiment and Evaluation
In Section 5, we employ experiment data to evaluate and compare two algorithms. At the beginning, we introduce the experiment settings. Secondly, we compare tracking results of experiment sampling data for voltage frequency heavy and slight fluctuations.

Experiment Settings
The experiment platform is introduced in Figure 11a. It includes the programmable power supply and the oscilloscope. The schematic diagram of the programmable power supply is introduced in Figure 11b. Experiment data for voltage frequency heavy and slight fluctuations is conducted through a programmable power supply. The percentages of harmonic components are 5% of 3rd, 10% of 5th, and 8% of 7th. The oscilloscope of Tektronix GDS-2102 serves to sample the experiment voltage data.
The sampling cycle is selected to be 0.00004 s. The experiment sampling voltage situations are shown in Figures 12 and 13.

Tracking Results of Experiment Sampling Data
The model parameters of the two algorithms are the same as that of the simulation evaluation in Section 4. The experiment tracking results of voltage frequency heavy and slight fluctuations are shown in Figures 14 and 15.

Tracking Results of Experiment Sampling Data
The model parameters of the two algorithms are the same as that of the simulation evaluation in Section 4. The experiment tracking results of voltage frequency heavy and slight fluctuations are shown in Figures 14 and 15.

Tracking Results of Experiment Sampling Data
The model parameters of the two algorithms are the same as that of the simulation evaluation in Section 4. The experiment tracking results of voltage frequency heavy and slight fluctuations are shown in Figures 14 and 15. From comparison results in Figures 14 and 15, the IMM algorithm is significantly better than the KF algorithm in the estimation. It is consistent with the simulation tracking results and conclusions.

Conclusions
This paper newly presents the IMM algorithm to track the fundamental and harmonic components of the AC voltage signal under grid frequency fluctuation conditions. First of all, the orthogonal vector dynamic (OVD) model is re-derived from the stochastic process theory, which made it clear that the covariance matrix is related to the sampling cycle. Then, the IMM algorithm based on the two OVD models (OVD-IMM) is proposed. The advantage of the proposed OV-IMM algorithm is that it does not require the signal frequency detection and feedback like conventional tracking algorithms. In this paper, we simulate by two kinds of scenario data separately, which are (a) voltage frequency heavy fluctuations and (b) voltage frequency slight fluctuations. The experiment applies the same scenario data as the simulation. The results show that the fundamental and harmonic components tracking accuracy of IMM algorithm is higher than single model algorithm. Both the fundamental and harmonic components, the proposed OVD-IMM algorithm is stable and accurate, and is not affected by grid frequency fluctuations. In the future, it would be employed in some real world applications, such as synchronous control in power system [43].

Conflicts of Interest:
The authors declare no conflict of interest.