**4.5.1 Effects of outliers**

In this Section the effects of outliers (unusual events on the system waveforms) are studied, and we compare the new proposed filter and the well-known Kalman filtering algorithm. In the first Subsection we compare the results obtained using the simulated data set of Section 2, and in the second Subsection the actual recorded data set is used.

#### **Simulated data**

38 Power Quality Harmonics Analysis and Real Measurements Data

Fig. 37. Fourth harmonic power in the three phases against time steps at various window sizes. The fundamental powers, in the three phases, are unequal; i.e. the system is unbalanced. The fourth harmonic of phase *C*, and later after 1.5 cycles of phase *A*, are absorbing power from the supply, whereas those for phase *B* and the earlier phase *A* are supplying power to the

The sixth harmonic of phase *B* is absorbing power from the network, whereas the six harmonics of phases *A* and *C* are supplying power to the network; but the total power is still

Fig. 38. Sixth harmonic powers in the three phases against time steps at various window

The fundamental power and the fourth and sixth harmonics power are changing from one

network.

sizes.

data window to another.

the sum of the three-phase power.

The simulated data set of Section 4.3 has been used in this Section, where we assume (randomly) that the data set is contaminated with gross error, we change the sign for some measurements or we put these measurements equal to zero. Fig. 40 shows the recursive estimate of the fundamental voltage magnitude using the proposed filter and the wellknown Kalman filtering algorithm. Careful examination of this curve reveals the following results.

The proposed dynamic filter and the Kalman filter produce an optimal estimate to the fundamental voltage magnitude, depending on the data considered. In other words, the voltage waveform magnitude in the presence of outliers is considered as a time-varying magnitude instead of a constant magnitude.

The proposed filter and the Kalman filter take approximately two cycles to reach the exact value of the fundamental voltage magnitude. However, if such outliers are corrected, the discrete least absolute value dynamic filter almost produces the exact value of the fundamental voltage during the recursive process, and the effects of the outliers are greatly reduced Figure 41.

Electric Power Systems Harmonics - Identification and Measurements 41

Fig. 42. Estimated fundamental current when the data set is contaminated with outliers.

Fig. 43. Estimated fundamental current before and after correction for outliers.

the harmonics with time-varying magnitudes.

filtering to identify and eliminate this bad data.

contaminated with bad data.

affected by the size of the data window.

The discrete least absolute dynamic filter (DLAV) can easily handle the parameters of

The DLAV and KF produce the same estimates if the measurement set is not

The DLAV is able to identify and correct bad data, whereas the KF algorithm needs pre-

It has been shown that if the waveform is non-stationary, the estimated parameters are

**4.6 Remarks** 

Fig. 40. Effects of bad data on the estimated fundamental voltage.

#### **Actual recorded data**

In this Section the actual recorded data set that is available is tested for outliers' contamination. Fig. 42 shows the recursive estimate of the fundamental current of phase A using the proposed filter, as well as Kalman filter algorithms. Indeed, both filters produce an optimal estimate according to the data available. However, if we compare this figure with Fig. 42, we can note that both filters produce an estimate different from what it should be. Fig. 42 shows the recursive estimates using both algorithms when the outliers are corrected. Indeed, the proposed filter produces an optimal estimate similar to what it should be, which is given in Fig. 43.

Fig. 41. Estimated fundamental voltage magnitude before and after correction for outliers.

Fig. 42. Estimated fundamental current when the data set is contaminated with outliers.

Fig. 43. Estimated fundamental current before and after correction for outliers.

#### **4.6 Remarks**

40 Power Quality Harmonics Analysis and Real Measurements Data

In this Section the actual recorded data set that is available is tested for outliers' contamination. Fig. 42 shows the recursive estimate of the fundamental current of phase A using the proposed filter, as well as Kalman filter algorithms. Indeed, both filters produce an optimal estimate according to the data available. However, if we compare this figure with Fig. 42, we can note that both filters produce an estimate different from what it should be. Fig. 42 shows the recursive estimates using both algorithms when the outliers are corrected. Indeed, the proposed filter produces an optimal estimate similar to what it should

Fig. 41. Estimated fundamental voltage magnitude before and after correction for outliers.

Fig. 40. Effects of bad data on the estimated fundamental voltage.

**Actual recorded data** 

be, which is given in Fig. 43.


It has been shown that if the waveform is non-stationary, the estimated parameters are affected by the size of the data window.

Electric Power Systems Harmonics - Identification and Measurements 43

(*k*) is *n* 1 state vector to be estimated. It could be harmonic or sub-harmonic

*w*(*k*) is an m noise vector to be minimized and is assumed to be random white noise

*xk xk w k*

noise *w*(*k*). If the elements of *H*(*kt*) are given by equation (25), it is clear that

 

*k k k wk* 1 (54)

, the amplitude, damping constant, and the phase

(*k*) in the absence of

(53)

parameters depending on both *H*(*k*) and *z*(*k*)

*H*(*kt*) is a time-varying matrix.

Equation (67) can be rewritten in vector form as:

*w*(*k*) is *n* 1 plant noise vector

Having estimated the parameter vector

**5.2 Testing kalman filter algorithm 5.2.1 Description of the load** 

**5.2.2 Sub-harmonic estimation** 

one cycle to another (non-stationary waveforms).

to be a time varying matrix.

with known covariance construction.

*H*(*k*) is *m n* matrix giving the ideal connection between *z*(*kt*) and

Equation (52) describes the measurement system equation at time *kt*. The state space variable equation for this model may be expressed as

> 

(*k*) is *n n* state transition matrix and it is an identity matrix

angle can be determined using equations (30) to (32), at any step

 

 

<sup>1</sup> 1 1 <sup>1</sup> 2 2 <sup>1</sup> 3 3

*xk xk xk xk*

1

*xk xk u u*

> 

Together equation (52) and (54) form the system dynamic model. It is worthwhile to state here that in this state space representation the time reference was chosen as a rotating time reference which caused the state transition matrix to be the identity matrix and the *H* matrix

The proposed algorithm is tested on an actual recorded data to obtain the damped subharmonics which contaminated the three phase current waveforms of a dynamic load. The load is a variable frequency drive controlling a 3000 HP induction motor connected to an oil pipe line compressor. The solid state drive is of 12 pulses designed with harmonic filter. The data given is the three phase currents at different motor speed, and is given in per unit. The three phase currents are given in Figure 42. This figure shows high harmonics in each phase current as well as sub-harmonics. It is clear that the currents have variable magnitudes from

After the harmonic contents of the waveforms had been estimated, the waveform was reconstructed to get the error in this estimation. Figure 71 gives the real current and the reconstructed current for phase A as well as the error in this estimation. It has been found

 

where 

It has been pointed out in the simulated results that the harmonic filter is sensitive to the deviations of frequency of the fundamental component. An algorithm to measure the power system frequency should precede the harmonics filter.
