An Improved Walsh Function Algorithm for Use in Sinusoidal and Nonsinusoidal Power Components Measurement

This paper presents an improved Walsh function IWF algorithms as an alternative approach for active and reactive powers measurement in linear and nonlinear, balanced and unbalanced sinusoidal three-phase load system. It takes advantage of Walsh function unified approach, simple algorithm and its intrinsic high level of accuracy as a result of coefficient characteristics and energy behaviour representation. The developed algorithm was modeled on the Matlab Simulink software; different types of load, linear and nonlinear, were also modeled based on practical voltage and current waveforms and tested with the proposed improved Walsh algorithms.The IEEE standard 1459–2000which is based on fast Fourier transformFFT approachwas used as benchmark for the linear load system. The data obtained from laboratory experiment to determine power components in harmonic load systems using Fluke 435 power quality analyzer PQA which complies with IEC/EN61010-1-2001 standard was modeled and used to validate the improved algorithm for nonlinear load measurement. The results showed that the algorithm has the potential to effectively measure three-phase power components under different load conditions.


Introduction
The awareness of the problems associated with nonlinear devices and their effects on power components measurement algorithms has considerably increased.The use of these power electronics equipment and appliances with microprocessors has been shown to contribute to the distortion of the voltage and current waveforms of the supply system at the distribution end [1].This distortion affects the smooth operation of most algorithms use for power components measurement and invariably has negative effect on the quality of the power supply system.Accurate measurement and evaluation of energy consumption are of utmost importance for effective planning, billing, monitoring, maintenance, and further development of the electricity supply system.The deregulation of the power sector has led electricity operators to seek for ways to make the best use of the supply systems.Proper evaluation of the energy consumption is one of the important tasks in electric power industries, especially in electric bill and the electrical energy quality estimation and control [2,3].Therefore, several companies are into design and manufacture of energy meters using different algorithms to meet the increasing demand of smart metering [4].In the pricing of electric bill based on the value of the integral of the load active power measured using kilowatt-hour meter, the electric utility board incurs losses in revenue for energy delivered to current harmonic generating customers and also those that cause current asymmetry [5].Most times, customers that do not generate harmonics but are supplied with distorted or asymmetrical voltages are made to pay not only for the useful energy but also for the energy which may have caused malfunction of their equipment [6].There is no universally accepted definition for the measurement of reactive power component in the presence of nonlinear and nonsinusoidal waveform [7,8].The IEEE working group on appropriate determination of billing system based on sinusoidal and nonsinusoidal situation defined distortion power in terms of total fundamental and harmonic constituents with less unwieldy theory [8].
The conventional method of determining power consumption is to evaluate using measured values of the voltage (), current (), and power factor (pf).The apparent power , active power , and reactive power  are defined as in [9].This way of power evaluation requires accurate measurement of the root mean square (RMS) values of the voltage and current before performing the multiplication operation so as to determine the apparent power .Precise determination of RMS values of voltage and current is complex and poses a serious challenge in electrical measurement [10].For this method of power calculation to be effective in a three phase network the following has to be satisfied.
(i) The RMS voltages and current on all the three phases must be identical.
(ii) Phase angles between voltage and current must be maintained at 120 ∘ and are time invariant.
These conditions may not be attainable in the real practical world due to the nature of the loads most of which are nonlinear [11].This paper proposed an improved algorithm as an alternative for power components measurement/estimation using the Walsh function which has the advantage of better accuracy and reliability in energy measurement as it takes into consideration among others, elimination of the effect of harmonic on reactive power measurement.Walsh function transform algorithm has a unique and essentially high level of accuracy as a result of coefficient characteristics and energy behaviour representation [12].This proposed algorithm might be integrated into any type of energy meter for measurement.
The remaining of this paper is organized as follows.Section 2 presents Walsh function and its analytical expression, while Section 3 highlights the steps involved in the development of the proposed improved algorithms for measurement using the Walsh function, Section 4 has the modeling and simulation of the improved algorithms, and Section 5 is the simulation with laboratory experiment results.Lastly, Section 6 is the conclusions.

Walsh Function (WF) Analytical Expression
The Walsh function method for the evaluation of energy parameters was presented as a mathematical tool to analyze energy meter output behaviour for indepth error detection [9].The method is faster when compared with other techniques like FFT.It does not require the phase shift of /2 between voltage and current and it has less computation requirement.However, when the load becomes nonlinear and nonsinusoidal the voltage and current waveforms become distorted.This leads to harmonic which is a multiple of the fundamental frequencies of the current and/or voltage.The authors exert that harmonic current affects the reactive power measurement so another attempt using modified approach for power components measurement in both sinusoidal and nonsinusoidal condition was made; the approach reduced computational demand, though the influence of harmonics to the measurement results which was not accounted for, was the main setback of the algorithms [13][14][15].
The attractions to Walsh-function-based technique for use in energy parameter evaluation are the following.
(a) The Walsh transform analyzes signals into rectangular waveform rather than sinusoidal ones and is computed more rapidly when compared with Fourier transform FT.
(b) Walsh-function-based algorithm contains addition and subtractions only and hence results in considerably simplified hardware implementation of power evaluation process.
(c) The IEEE/IEC definition of a phase shift of /2 between the voltage and the current signal mainly used for reactive power evaluation is eliminated from signal processing operation when using Walsh function [8].
Generalized Walsh functions and transforms were introduced in 1923 by J. L. Walsh, but their application to engineering and other fields did not happen until recently [16] with some basic and enlightening properties of these functions and transforms considered.This function can be applied among other uses to develop an algorithm that would be applicable to nonlinear loads problem analysis.It is a full orthogonal system with unique properties, which include that it has only two values +1 and −1 over specified normalized period .This greatly influences the effectiveness of signal processing operation as being related to measurement of power components and characteristics of power distribution system.Analytically the Walsh function is expressed as where  is the order of the function form  = 1, 2, 3, . . .,   which is the th coefficients of the  represented in binary code, that is,  = ( 0 ,  1 ,  2 ,  3 ⋅ ⋅ ⋅   ) 2 ,   = 0,1.With  being the highest order WF serial number in the system,  is the argument of WF that defines the coefficients of   in binary code  = (  ,   ⋅ ⋅ ⋅   ) 2 ,   = 0,1, and  = 1, 2, 3, . . ., .From (1) the graphical representation of the first sixteenth order Walsh function is generated as shown in Figure 1.

Walsh Function Algorithm
The IEEE standard 1459-2000 for the instantaneous voltages (V  , V  , V  ) and currents (  ,   ,   ) in a three-phase distribution network with linear balanced or unbalanced load is given as [17].Instantaneous three-phase sinusoidal voltages are Figure 1: The first 16th order of Walsh function.
Instantaneous three-phase currents are where   ,   ,   and   ,   ,   are the RMS values of the line to neutral voltages and currents for the phases , , and , respectively.  ,   and   are the phase angles between the respective voltage and current. = 2,  = frequency in Hertz,  = 1/.The instantaneous reactive powers for the three phases represented with say   ,   , and   are given by Substituting for (V  , V  , V  ) and (  ,   ,   ) in the previous expressions and solve trigonometrically the instantaneous powers for phases , , and  of the three-phase linear balanced and unbalanced load network are derived as in (5): where From the instantaneous power of ( 5) the algorithms for measuring the reactive powers on these three-phase systems say,   ,   , and   , using the Walsh function are obtained by multiplying both sides of the equations by the thirdorder Walsh function, that is, Wal(3, ) and integrate over the period  of power system frequency.The integral of the third order Walsh function with a constant and also a multiplier of cos(2) is equal to zero.Because cos(2) is orthogonal (right angled) with the third Walsh function so the result is obtained as follows: The algorithms for real or active powers in the three phases , , and  are determined by multiplying ( 5) by the zeroorder Walsh function, that is, Wal(0, ) and integrate over the period .In Walsh algorithm the zero-order function is a constant Wal(0, ) = 1, over the period of  as can be seen from Figure 1, so all the integral terms on the right-hand side of ( 5) that involve product of Wal(0, ) with either cos(2) or sin(2) approach to zero thus giving (7) as Solving the equations further active powers   ,   , and   are obtained for three-phase power system as follows: The modeling and simulation of ( 6) and ( 8) have been presented earlier in [12] and the authors showed that current harmonic affects the reading of the simulation results.The algorithms have to be further improved as to be able to measure the power components in both linear and nonlinear, sinusoidal nonsinusoidal load conditions.It is worthy to mention, at this juncture, that in AC network source voltages are relatively pure sinusoidal waveforms and that it is mostly at the transmission and distribution end that harmonic and other forms of distortions are introduced.The use of statistical estimators to detect distortions like sags and swells using synthetics analysis that allowed the identification of the variance, skewness, and kurtosis associated with normal sinusoidal waveforms was proposed in [18].The increase use of nonlinear loads like computers, fluorescent lamps, adjustable speed drive motors, arc furnaces, arc welding machines, electronic control and power converters among others cause harmonics.This lead to overloading of neutral conductors, overheating of transformers, tripping of circuit breakers, power factor correction capacitors over stress and skin effect [19].Also research has shown that the effect of odd harmonic is more significant in power distribution system while that of even harmonic is negligible [20].

Proposed Improved Walsh Function Algorithm for Measurement
Harmonic in the power system does not affect the active power measurement but has a great deal of influence on reactive power measurement which invariably affects the power factor and hence the quality of the supply system.To derive the improved Walsh function IWF algorithm for measurement we assume that the load current is contaminated with third-order current harmonic denoted as  3 ,  3 , and  3 , with  3 ,  3 , and  3 being the phase angles between the fundamental voltages, and the third-order current harmonic waveforms of the phases,  3 ,  3 , and  3 are the RMS values of the third-order current harmonic as given below: The instantaneous powers  3 ,  3 , and  3 for the three phases , , and  under this condition are derived as follows: where , and  3 =    3 sin  3 , respectively.
To obtain the improved algorithm for reactive power under this harmonic condition we apply the Walsh function by multiplying (10) with the third-order WF, that is, Wal(3, ) and integrate over the time .According to the Walsh functions all the integrals of the right-hand side terms of (10) that involves the multipliers of cos(2), cos(4), and sin(4) and the constant  are all equal to zero [14].Hence (11) become The product of the 3rd-order WF the expressions, ( 3 −   ) sin(2), (  √ 3 +  3 −   ) sin(2), and (  √ 3 +  3 −   ) sin(2), results in the full-wave rectification of the terms: Solving for   ,   , and 3 ,  3 , and  3 in (13) are the reactive components of the distortion power in the phases; these indicate the influence of the third-order current harmonics  3 ,  3 , and  3 on the reactive power measurement algorithms.The thirdorder Walsh function eliminates the effect of the thirdorder harmonics of the nonlinear load.Harmonics affect the reactive power measurement of a network.The final terms of (10) are the distortion power terms, that is,  3 sin(4), ( 3 +   √ 3) sin(4), and ( 3 +   √ 3) sin(4t).They are oscillating with the frequency of 4 which is similar to the oscillating frequency of the 7th-order Walsh function, Wal(7, ), as can be seen in Figure 2. To estimate these distortions power terms both sides of (10) are multiplied by the 7th-order WF and then integrated over the period  and simplified to obtain the following: The 7th-order WF is the odd function with the frequency similar to the frequency of the distortion terms.The product of the 7th-order WF with the distortion terms results in their rectification.So taking cognizance of these rectifying effects, ( 14) is rewritten as follows: Solving for  3 ,  3 , and  3 produces the following: Equations ( 16) are the improved Walsh function algorithms for measuring the distortion power in a three-phase system.Substituting in ( 13) algorithms for reactive powers are obtained as follows: These algorithms eliminate the effect of the 3rd-to 7thorder harmonics on the reactive power measurement and also essentially reduced the effect of the higher order current harmonics.In other to reduce the computation involved, the 3rd-and 7th-order Walsh are added together which gives the new improved algorithms.The analytical addition of the 3rd and 7th is represented in Figure 3.
From Figure 3 it can be observed that the IWF as a result of the addition of standard 3rd-and the 7th-order WF is defined as follows. Wal The new improved WF algorithms are derived by multiplying (10), with Wal(3; 7, ) and then integrate over the time .Now considering the integrals after the equal sign, the   ,   , and   are constants so are equal to zero because IWF is a periodic function; 2nd and 4th integrals are also equal to zero as they include cosine functions that are orthogonal with the IWF.The 3rd and 5th integrals comprise the rectification of the sin functions waveform, so these integrals are not equal to zero.Thus equations are written as follows: Solving the right-hand side integrals of (18) yields the new improved algorithms in the following: Equations ( 7), (16), and ( 19) are the proposed improved Walsh function IWF algorithms that would be used to measure the active, distortion, and reactive powers, respectively, of a network and also eliminate the effect of higher order harmonic in the three-phase reactive power measurement system.Suffice it to say that in actual cases only lower order harmonics are present in power system signal.

Modeling the Proposed IWF Algorithm
Equations ( 7) and ( 19) are used to create the model for the active and reactive powers measurement based on the proposed improved algorithms using the Matlab Simulink software tool.Then some of the commonly used nonlinear domestic and industrial loads were modeled along and used in the simulation of the improved Walsh function algorithms for active and reactive powers measurement.Examples are compact fluorescent lamps (CFL) and computers.Loads can be resistive , inductive , capacitive , or a combination, for example, , , ,  depending on the type of load being modeled. was used to model the loads used in this simulation (see Figures 4 and 5).The  nonlinear loads were modeled using universal bridge rectifier; the values for the   and   were determined using the expressions where   = nominal power of three phase converter VA,   = nominal line AC voltage  rms,  = fundamental frequency Hertz, and   = sample time.
The  and  of an  load on dc side of the universal bridge rectifier are calculated using data recorded on the standard 435 fluke power quality analyzer PQA during the laboratory experiment involving measurement of power components of harmonic generating loads.

Simulation and Discussion of Results.
For the simulation of the linear loads a synthetic line to neutral voltages ( phases) is chosen as follows: Load impedances for two different cases of unbalanced threephase systems are chosen as shown in cases A and B below for the simulation to verify the algorithms.Knowing the supply voltage and the impedance of the loads () the resistance () and inductive reactance (  ) of each phase load were calculated and the obtained results for  and   were used to configure standard RLC load taken from the Matlab simulink power blocks.
Figure 6 shows the voltage and current waveform for the three-phase sinusoidal linear unbalanced load system obtained from simulation with the new improved algorithms.

Linear Load System.
For the linear sinusoidal load system, IEEE standard 1459-2000 which is based on FFT approach was used as benchmark for measurement of active and reactive powers of case A for the three phases  and compared with the results using the proposed improved algorithms (7) and (19).The results are displayed in Table 1.Similarly for case B results are shown in Table 2. From the results using the IEEE standard 1459-2000 which is based on FFT as reference it can be observed that the proposed Walsh function algorithm has the potential to measure the active and reactive powers with a high degree of accuracy.In terms of computational complexity the proposed Walsh function algorithm has less computational requirement than the FFT.

Nonlinear Harmonic Load.
Experimental results using harmonic load bank and other harmonic generating loads in the laboratory as recorded by fluke PQA meters were used in modeling of the nonlinear loads.The computer and CFL lamps were modeled as  loads and simulated using both FFT approach and the proposed improved Walsh algorithms for the measurement of active and reactive powers.The laboratory experimental results were used as benchmark.The nonlinear load currents waveform for the experiment using the Fluke PQA meter and that of the model simulation is recorded as shown in Figures 7 and 8.The results of the simulations and experimental measurement of nonlinear loads are presented in Table 3.It can be observed that the standard FFT approach recorded significant error which could be due to the spectral leakage and picket fence effect phenomenon of the FFT approach when used for measurement in nonlinear harmonic load system.On the other hand, the proposed improved Walsh function algorithm for measurement gave a near accurate result as the influence of the harmonics of the nonlinear load has been address in the improved Walsh algorithms.The Fluke power quality analyzer and FFT graphical user interface analyze signals of one phase at a time so the figure shown is for one of the phases and the same is applicable to the other two phases but has been withheld for convenience, clarity, and space.Walsh function transform is a special form of the Fourier transforms [21,22].So it is sometimes called Walsh Fourier.

Conclusion
A new improved Walsh function algorithm for active and reactive powers measurement was presented.The IEEE standard 1459-2000 fast Fourier transform approach was used as benchmark to validate the algorithm when the load system is linear and sinusoidal.The Fluke 435 power quality analyzer PQA meter was used as reference for nonlinear harmonic load system simulation and measurement.The results show that the proposed improved Walsh function has the potentials of accurately measuring power components under different load conditions.If the algorithm is integrated into measuring instrument it would be able to properly record the active and reactive powers components under sinusoidal and nonsinusoidal load system for proper monitoring, management, and maintenance planning.The approach is simpler with less computation when compared with Fourier transform.The

Figure 4 :Figure 5 :
Figure 4: The model of the proposed improved Walsh function algorithm.

Table 1 :
The result of case A.

Table 2 :
The result of case B.

Table 3 :
Simulation and experimental results.