Online Estimation of Intrinsic Parameters of Encapsulated Three-Phase Harmonic Filter Capacitors for IoT Applications

A technique for conducting online estimation of the intrinsic parameters of encapsulated three-phase harmonic ﬁlter capacitors is presented. The concept is based on ﬁrstly sampling the line voltage and current associated with the encapsulated capacitor, then formulating a capacitor current estimator to estimate the line currents with the sampled line voltages, and ﬁnally using the errors of the estimated and actual line currents to estimate the intrinsic parameters with a modiﬁed particle swarm optimization algorithm. A decoupled technique is formulated to estimate the unmeasurable circulating current in the encapsulated capacitor with the measured line voltages. A prototype for estimating the intrinsic parameters of an encapsulated three-phase capacitor in the harmonic ﬁlter for an adjustable speed drive for a 1.1kW motor-generator set has been built and evaluated. To facilitate the application of the proposed technology for Internet-of-Things (IoT) devices, the impact of different durations, sampling frequencies, and data lengths on the estimation accuracy is evaluated. The results are favorably compared with the theoretical predictions and the measurement results obtained on a calibrated network analyzer. In addition, the performance of the proposed technique is favorably compared with the Trust-Region-Reﬂective Least Squares Method.


I. INTRODUCTION
Power electronic systems (PES) are switching circuits in nature.Although they consist of input filters for eliminating switching noises from getting into the supply, they still generate low-order input current harmonics in processing the energy converted from the input to the output, causing voltage and current distortion in the distribution network, and deteriorating the power quality of the power grid.Various harmonic mitigation solutions are being taken to tackle such issues.Among them, passive harmonic filters are used extensively, as they are simple in structure, economical, and efficient.
Single-tuned harmonic filter is constructed by connecting a reactor in series with several capacitors.The number The associate editor coordinating the review of this manuscript and approving it for publication was Diego Oliva .
of capacitors is used to adjust the resonant frequency of the filter.Additional resistors are typically connected in parallel with the capacitors for discharging the capacitors during shutdown.Moreover, a wire-wound resistor is connected in parallel with the reactor to form a damped filter to improve quality factor.Theoretically, the resonant frequency of single-tuned filter is well tuned for filtering unwanted harmonic components and exhibiting very low impedance at the tuned frequency.Fig. 1 shows the typical installation method of the harmonic filter with encapsulated capacitor for eliminating harmonics generated by adjustable speed drive (ASD).
It is unable to filter out effectively all harmonics with a single filter.The distribution network will typically consist of multiple single-tuned filters.Statistics reveals that there have been many faults about harmonic amplification problems caused by capacitance reduction of filter capacitors and the change of the equivalent impedance of the power system when the frequencies of parallel resonance are at or near the harmonic orders.In addition, it will cause shifting of the harmonic frequency of the corresponding filter and will change the compensated reactive power.Due to the above reasons, there have been unreasonable even-order harmonic currents in the filters, especially the 8 th order component, in the plant with 5 th , 7 th , 11 th , and 13 th order single-tuned filters installed.As reported in [1], the 8 th order harmonic currents are abnormally large and are the largest in the 7 th and 11 th order filters, causing capacitor failures in the 11 th order filter.The capacitance of aged capacitors can be reduced to 30% of their nominal values.Due to possible load current unbalancing, different levels of capacitance reduction, and drift of the filter parameters, the currents flowing through the filter reactors and capacitors are unbalanced, causing unbalanced capacitor voltage distribution.Apart from increasing component stress, the filter capacitors will also be heated up and might explode.The power loss of the filters and the heat load on the air-conditioning systems in the switch board rooms will be increased substantially.Such aspect will further accelerate the failure of the filter capacitors.Currently, the site staff conducts on-site measurement regularly to observe the magnitude of the capacitor voltages.However, premature failure of the power components, such as filter capacitors, could not be detected easily and accurately.To ensure serviceability and safe operation of the harmonic filters, the capacitors in the harmonic filters will be replaced after a period of service or abnormalities found in the capacitor voltages.In [2], the impact of the variation of AC capacitors in the output filter on the system performance has been studied.
Determination of capacitor values can be performed in time or frequency domain.In time domain, the capacitor is estimated by using the basic function that the capacitance is equal to the ratio between the capacitor current and the rate of change of the capacitor voltage, i.e., C = i/ (dv/dt).In [3], a DC-link capacitor detection technique, based on least-mean-square technique, is proposed.Since the calculation involves differentiation of the filter voltage and filter current, sophisticated filtering function is needed to deal with the noise issue.
The frequency-domain method is based on estimating the frequency response of filter capacitors.In [4], a magnetic flux sensor is used to estimate the change of the degraded filter inductance.By sampling the filter voltage and current, the capacitor values are estimated.In [5], a direct measurement of the filter capacitor voltage and current is adopted.An indirect method is based on using network impedance asymmetry caused by the filter capacitors to detect capacitor degradation [6]- [8], failure during fault conditions [9], and variation in the capacitor voltages [10].Some variants are based on identifying the change of the resonant frequency in an LC filter to determine the variation of the capacitor [6] and the harmonic spectra in the filter current [11].Those methods have the following operational considerations: 1.The methods are more suitable for estimating a single capacitor as the voltage and current associated with the capacitor can be directly measured.For encapsulated capacitors, the internal loop current among the three capacitors is unable to be accessed.
2. The frequency-domain methods require sampling at least one line cycle of voltage and current information.It will give challenges for applying them to devices, such as Internetof-Things (IoT) sensors, with limited computational power and resources.
3. Impedance asymmetry technique [6] has the merit of not introducing extra sensors.However, if the capacitor values are degraded at the similar rate and the filter resonant frequency has drifted without noticeable change, it will give challenges to operators to observe or differentiate different levels of degradation.
4. Line frequency components in the capacitor voltage and current are considered [5].Thus, sophisticated signal processing is needed to extract the components from the noisy currents generated by PES.
A technique for conducting online estimation of the intrinsic parameters of encapsulated capacitors is presented.It can only require a quarter line-cycle information of the measurable line voltage and associated capacitor currents.A prototype for estimating the intrinsic parameters of an encapsulated three-phase capacitor in the harmonic filter for an adjustable speed drive for a 1.1kW motor-generator set has been built and evaluated.The results are favorably compared with the theoretical predictions and the results obtained on a calibrated network analyzer.The effects of different durations, sampling frequencies and data lengths on the estimation results have also been evaluated.Finally, the performance of the proposed technique is compared with the Trust-Region-Reflective Least Squares Method.

II. OPERATING PRINCIPLE
Fig. 1 shows the equivalent circuit of an encapsulated three-phase harmonic filter capacitor.It consists of three delta-connected capacitors C ab , C bc , and C ca .The line currents are i 1 , i 2 , and i 3 and the currents through the three capacitors are i ab , i bc , and i ca .The line voltages are v ab , v bc , and v ca .By using Kirchhoff's current and voltage laws, where In principle, C ab , C bc , and C ca can be determined by using their associated voltages, i.e., v ab , v bc , and v ca , and currents, i.e., i ab , i bc , and i ca .Practically, v ab , v bc , and v ca can be measured by voltage sensors.However, i ab , i bc , and i ca are unmeasurable because the capacitors are encapsulated.Instead, only i 1 , i 2 , and i 3 are measurable.However, i ab , i bc , and i ca cannot be obtained from i 1 , i 2 , and i 3 .Mathematically, matrix A in ( 1) is non-invertible, due to the unknown loop current i abc .
An evolutionary computation technique for determining C ab , C bc , and C ca is proposed.The architecture is shown in

A. CAPACITOR CURRENT ESTIMATION (CCE)
Fig. 3 shows the block diagram of the CCE for estimating the capacitor currents, i ab , i bc , and i ca .The n-th sample of the estimated capacitor voltages v c_ab,est , v c_bc,est , and v c_ca,est can be expressed as where  respectively, as where r ab,est , r bc,est , and r ca,est are estimated equivalent series resistance (ESR) of C ab , C bc , and C ca , respectively.Thus, based on (1), the estimated line currents, i 1,est , i 2,est , and i 3,est , are Based on (2), Thus, by using ( 1) and ( 12), the capacitor currents can be expressed as, in terms of the line currents, capacitor voltages, and ESR of the capacitors, ( 13)- (15), as shown at the bottom of the page.
Three error functions, i 1,e , i 2,e , and i 3,e , for comparing the estimated and actual values of the line currents are defined as Based on ( 13)-( 18), the errors of the estimated capacitor currents in ( 6)-( 8), i ab,e , i bc,e , and i ca,e , can be expressed as the error in estimating the line currents as where i ab,act , i bc,act , and i ca,act are the actual currents of i ab , i bc , and i ca , respectively.

B. M-PSO ENGINE FOR PARAMETER EXTRACTION
Based on utilizing the swarm's behavior depicted in [13], a PSO-based engine is proposed to extract system parameters, including C ab , C bc , and C ca , their ESRs, r ab , r bc , and r ca , and their initial voltages, v c_ab [0], v c_bc [0], and v c_ca [0], by using a population of particles to minimize the mean square error (MSE) of i ab,e , i bc,e , and i ca,e .PSO is simple in operation among different types of evolutionary computation techniques [14], [15].Each particle P is a vector that consists of the above parameters.That is, The particles will be controlled to move in the search space through some operators and search for the global best solution to satisfy an objective function.The operators will adjust the velocity of the particle moving towards the best solution together with other particles.The proposed m-PSO is an enhanced PSO that has random perturbation introduced for searching solution within the operation boundaries.Classical PSO does not have reference to adjust the moving trajectory of the particles.The solution might trap into a local optimum.Random perturbations are introduced into the solution at each step to improve the fitness of the best particle and help the swarm jump out of the local optimum, thereby enhancing the accuracy of the solution and convergence speed.

1) OBJECTIVE FUNCTION
The MSE of a given set of parameter P is defined by averaging the sum of the square of the errors over the time series with N samples.Based on ( 19)-(21), The best set of parameters, P BS , in (22), gives the minimum value of MSE(P).That is, 2) ALGORITHM OF THE M-PSO Fig. 4 shows the flowchart of the algorithm.Let n be the population size -the number of candidates for the solution and G be the total number of optimization cycles (generation) in the entire optimization process.Apart from the parameters, the i-th candidate solution P i has also included a velocity for updating its parameters.The velocity is calculated by considering several factors.They include its velocity in the last generation, its relative position from the global best solution set so far, and its position from its best particle in the last generation.For the g-th generation, the velocity υ where υ (g−1) i is the velocity in the (g−1)-th generation, P G is the globally-best particle in the search so far, P (g−1) i holds the position of the i-th particle in the (g-1)-th generation, P H ,i holds the best position found by the i-th particle in the (g−1)-th generation, w (g−1) ∈ (0, 1) is the learning factor and r (g−1) 1,i and r (g−1) 2,i , initialized randomly, are weighting factors evenly distributed between 0 and 1. w is calculated by a sigmoid decreasing inertia weight for controlling the exploration and exploitation abilities of the swarm [12], [16] and for eliminating the need for velocity clamping.Mathematically, where Distance is a difference between previous particle position and updated position.D G is distance of global best particle.D min , and D max are minimum distance and maximum distance respectively in population, total number of particles.P H ,i in the (g−1)-th generation is G is calculated by considering the MSE of all particles,

MSE(P (g−1)
H ,i ), for i = 1, 2, 3, . . ., n (28) If the new value of a parameter is outside the boundary, the velocity of the corresponding particle will be updated by reversing the order to make the parameter fall within the search boundary.
To avoid the solution trapping into local optimum, the parameter set is perturbed randomly to generate other possible solutions.A particle P(g) B is firstly generated by introducing a perturbation δp (g) into the globally-best particle P (g) G before P i is updated with (29).A normal distribution for δp (g) is used.Thus, δp (g) for the m-th parameter is expressed as where Normal(0, 0.8) is a random number in a normal distribution with a zero mean and variance of 0.8, as recommended in [17].X Max m and X Min m are the upper and lower boundary of parameter m, respectively.Normal distribution with higher }, where P (g) G + 2 j δp (g) is within the search boundaries and P (g) G + 2 j+1 δp (g) is outside the boundaries.That is, where r = 0, 1, 2, . . ., j. P (g) w is the worst particle in current generation, which defined as where i = 0, 1, 2, . . .N .The steps of the algorithm are given as follows: Step 1) -The parameters in each particle are initialized with random values within their corresponding search boundaries.Step 2) -The MSEs of all solution candidates in the population are evaluated by (23).
Step 3) -New parameters and velocity of particles are calculated by ( 29) and (25), respectively.By introducing random perturbation with (30), a new particle P(g) B is formed.
Step 4) -By using (32), the best particle in the swarm, P (g) G , will be replaced by Step 5) -The algorithm will go to Step 2) unless the number of generations has reached the target number of generation G.

III. EXPERIMENTAL VERIFICATIONS
The proposed technique is evaluated on a testbed with a threephase ASD for driving a 1.1kW Three-phase squirrel cage induction motor type DEM II No. 9572380007, which is coupled to a DC generator type DEM 4 No. 9572380019.The supply side of the ASD has an LC input filter.Three aged capacitors are delta-connected to emulate an encapsulated capacitor.Figs.5(a) and 5(b) show the schematic and picture of the testbed, respectively.Table 1 shows the component list in the testbed.Table 2 shows the values of the three aged capacitors, C ab , C bc , and C ca , measured by Agilent 4294A Precision Impedance Analyzer.Fig. 5(c) shows the picture of the proposed online diagnostic module.The module is constructed by three current sensing circuits, three voltage sensing circuits, and a microcontroller unit (MCU) with an external memory unit.Each sensing circuit consists of a sensor and a signal conditioning circuit.The major components are listed in Table 1.Before performing the proposed estimation algorithm, the line currents and voltages are sampled for one line cycle by a 12-bit analog-to-digital converter (ADC) with the sampling frequency of 500kHz.The total memory size required for storing the sampled time series of the currents and voltages is around 120 Kilobyte on the MCU.After completing the estimation, the time series and the results will be stored external memory.The MCU can be connected to a communication module for sending the information about the filter to the central control centre.
Fig. 6 shows the waveforms of the supply currents to the ASD, i in,A , i in,B , and i in,C , capacitor voltages, v ab , v bc , and v ca , and the capacitor currents, i 1 , i 2 , and i 3 .Apart from the fundamental frequency component, the capacitor currents  Based on the algorithm described in II.B, Table 2 shows the estimated values of the capacitors.The module takes 97.62 seconds to complete one estimation and the errors are 3.92%, 2.7%, and 2.19%, respectively.The results are practically acceptable.

IV. COMPARATIVE STUDY
With the same values of the aged capacitors used in the Sec.III, a comparative study between the proposed method and the Least Squares Method (LSM), which is recognized to be suitable for non-linear    defined as Three testing specifications are used: SPEC-I: The capacitor voltages and currents have no harmonics.
SPEC-II: The capacitor voltages and currents contain 10% th harmonics.
SPEC-III: The capacitor voltages and currents contain 20% of 5 th harmonics, 14% of 7 th harmonics, and 9% of 11 th harmonics.Such specification is in accordance to the IEEE standard -Std 3002.8 -2018 for typical 6-pulses ASD current harmonic spectrum.
Different sampling durations, including one line-, one halfline, one quarter-line, and one-eighth-line cycles, are tested.
Tables 3 and 4 give the percentage estimation errors under the testing specification SPEC-I with the proposed method and LSM, respectively, using different sampling duration and frequencies.Tables 5 and 6 show the results under the testing specification SPEC-II.Tables 7 and 8 show the results under the testing specification SPEC-III.Fig. 7 shows the simulated waveforms of the capacitor voltages and currents for the three testing specifications.Fig. 8 shows the box and whisker plot of the proposed method and LSM for the three testing specifications.Fig. 9 shows the estimation time and percentage estimation error versus the data length.
Based on the results, the following observations can be observed: 1.With the same sampling duration, the estimation accuracy of both methods increases as the sampling frequency increases, but the data length and computational time also increase.
2. With the same sampling frequency, the estimation accuracy of both methods increases as the sampling duration increases, but the data length and computational time also increase.
3. With the same sampling duration and frequency, the estimation accuracy of both methods increases as the harmonic contents increase.It is because the richer the harmonic content, the more the information the sampled data contains.
4. Both methods can estimate the capacitor values with the estimation error less than 5% if the sampling duration is one line cycle.
5. With the LSM, the estimation error is more than 5% when the data length is one-fourth of the line cycle.
6.According to the results shown in Fig. 8, the difference between the upper quartile and lower quartiles with the LSM is smaller than the proposed method except with the sampling frequency of 10kHz.However, LSM is easily trapped into local optimum.Outlier appears frequently which carry out impact on the mean value of capacitance error with 100 runs.
7. With the sampling frequency of 500kHz and duration of one line cycle, the estimation accuracy is the highest with both methods.The estimation time taken is about 6 seconds (Fig. 9).
8. The estimation error is within ±5% if the sampling frequency is 50kHz and duration is one-half of the line cycle.It is the most optimal choice because the data length is only 0.5 Kilobyte, which is significantly less than the data length with the sampling frequency of 500kHz and duration of one line cycle (which is 10 Kilobyte).The memory resources can be reduced significantly from 120Kilobyte to 6 Kilobyte.

V. CONCLUSION
This paper has proposed the use of a m-PSO technique for conducting online estimation of the intrinsic parameters of encapsulated three-phase harmonic filter capacitors.The technique has been demonstrated on a testbed for estimating VOLUME 9, 2021 the intrinsic parameters of an encapsulated three-phase capacitor in the harmonic filter for an adjustable speed drive for a 1.1kW motor-generator set has been built and evaluated.Finally, a comparative study between the proposed technique and the Trust-Region-Reflective Least Squares Method (LSM) has been conducted.Results show that the proposed technique gives higher estimation accuracy then the LSM technique.An optimal sampling duration and sampling frequency that require low computational resources has been identified.Such aspect facilitates the proposed technique for IoT applications.

Fig. 2 .
It consists of two main components, including a capacitor current estimation (CCE) and a modified particle swarm optimization (m-PSO) engine [12].The CCE estimates the time series of the capacitor current with the time series of the measured line voltages and the estimated values of C ab , C bc , and C ca , and their initial voltages from the m-PSO engine.The m-PSO engine compares the estimated values of the line currents from the CCE and the actual line currents to estimate the values of C ab , C bc , and C ca .The operations of the CCE and m-PSO are described as follows.

FIGURE 2 .
FIGURE 2. Proposed architecture for estimating the capacitances in encapsulated capacitors.

FIGURE 3 .
FIGURE 3. Capacitor current estimator and error functions.
variance results in a wider spread of random initial values within the searching boundaries.The perturbation generates possible solutions that are located out of the globally best solution, thereby avoiding the solution trapping into local optima.The MSEs of P(g) B and P (g) G are then computed by using (23).If MSE( P(g) B ) < MSE(P (g) G ), P (g) G will be replaced by the best one in the set {P (g)

FIGURE 9 .
FIGURE 9. Mean estimation time of 100 runs and percentage estimation error by m-PSO and LSM with different data lengths.(a) SPEC-I.(b) SPEC-II.(c) SPEC-III.

TABLE 1 .
List of components in the test setup.

TABLE 2 .
Nominal, actual, and estimated values of the capacitors.

TABLE 3 .
Average percentage estimation errors with the proposed method for SPEC-I.

TABLE 4 .
Average percentage estimation errors with the LSM for SPEC-I.problemswith bound constraints, in estimating the capacitor values is conducted.The LSM is performed on MATLAB with the same capacitor current estimator given in Sec.II-A and the objective function using the sum of square error (SSE)

TABLE 5 .
Average percentage estimation errors with the proposed method for SPEC-II.

TABLE 6 .
Average percentage estimation errors with the LSM for SPEC-II.

TABLE 7 .
Average percentage estimation errors with the proposed method for SPEC-III.

TABLE 8 .
Average percentage estimation errors with the LSM for SPEC-III.