The supply voltage may be expressed as:

Vs=V1Sinwt

Load current is made up of active current (ip), reactive current (iq) for positive sequence and negative sequence current (i-) can be decomposed in parts as:

The control algorithm is based on the extraction of current component in phase with the unit voltage template. To estimate fundamental frequency positive sequence real component of load current, the unit voltage template should be in phase with the system voltage and should have unit amplitude further it must be undistorted.

**Fig. 4 **: *Block diagram of the ADALINE theory*

For calculation of templates the voltage at Pcc is sensed. The sense voltage is filtered through a band pass filter and the instantaneous rms value is computed. The sensed three phase voltages are divided by this instantaneous rms value to get three phase voltage templates.

The initial estimates of active part of current for single phase can be chosen as:

i p = W p u p

Where weight (Wp) is estimated using Adaline. The weight is variable and changes as per the load current and magnitude of phase voltage. Algorithm for estimating weights corresponding to fundamental frequency real component of current (for three phase system), based on LMS algorithm tuned Adaline tracks the unit voltage templates to maintain minimum error L(K) p(K) p(K)

P ( k + i ) = WP ( k ) +n{iL(k) -WP ( k ) up(k) }u P(k)

The value of n(convergence coefficient) decides the rate of convergence and accuracy of estimation. The practical range of convergence coefficient lies in between 0.1 to 1.0.