Kalman Filters for Reference Current Generation in Shunt Active Power Filter (APF) Kalman Filters for Reference Current Generation in Shunt Active Power Filter (APF)

Shunt active power filter (APF) method have been used by many researchers as a solu - tion in reducing the harmonics creating by the non-liner loads. Therefore, this research is targeted to design and implement a three-phase shunt APF employing Kalman filter esti - mator. Conventionally, low-pass filter (LPF) is used to filter out the unwanted DC compo nent of the non-linear load to produce the sinusoidal waveform called the reference current. However, when applying LPF it contributes with the phase shift and high transient at the supply current. Therefore, to reduce these problems, the digital Kalman filter estimator is used to replace the LPF for generating the reference current. Details on the investigation between conventional and proposed methods under simulation based on Matlab Simulink platform and experimental that are made for two types of load, namely, three-phase recti fier with RC-load and three-phase induction motor, are presented. The performance criteria of the shunt APF are determined by the supply current waveform, total harmonic distortion (THD), harmonic spectrum and power quality measurements, which were also obtained by simulation and experimental. In conclusion, by employing Kalman filter estimator for generating the reference current, it reduces the time delay and high transient current at the power supply and, thus, improved the overall THD from 0.1 to 0.42% compared to the LPF.


Introduction
Electrical power is essential to people's modern lifestyle. In recent five decades, due to the development of the industry contributed to the increase of the types and capacity of the grid connected load drastically. For that reason, all the electrical consumers at all levels of usage have facing an issue of power quality problems. Both industrial/commercial sector and domestic environment commonly use sensitive equipment and non-linear loads (NLL). Inadvertently, these result in a non-sinusoidal current being drawn from the supply, which contains the harmful harmonic component and fed back to the supply system on the same point of common coupling (PCC). Passive filter is one of the common methods that have been used to overcome this problem. The passive filter is connected in parallel between the supply and NLL for improvement of power factor and harmonic suppression and thus exhibits lower impedance at tuned harmonic frequency. However, this approach does not solve the problem effectively due to its inability to compensate random frequency variation in the current, tuning problem and parallel resonant. Among the techniques, the d-q algorithm has been widely used to eliminate the harmonics due to its simplicity of control design relative to the rest. Commonly, the d-q algorithm is using LPF to generate the reference current. However, time delay introduced when applying the LPF will contribute to the phase shift in harmonics and higher transient current. Therefore, a new proposed technique of the current reference generator embedded with Kalman filter for shunt APF system is proposed where it reduces the time delay, thus producing improvement of the overall total harmonic distortion (THD) in the system.

State of the art
The active power filter (APF) technology is now mature in providing compensation for harmonics, reactive power and neutral current in AC networks. It has evolved for the past quarter century of development with varying configurations, control strategies and solid-state devices. Commonly, the APFs are used to eliminate the voltage harmonics, regulate terminal voltage, suppress voltage flicker and improve voltage balance in three-phase systems. This wide range of objectives can be achieved either individually or in combination depending upon the requirements, control strategy and configuration, which have to be selected appropriately. This section describes the history of development and the present status of the APF technology.
With the proliferation of power electronics in energy conversions, power quality is fast becoming an issue of an increasingly important aspect of electrical consumers at all levels of usage. A large number of publications have been covering the power quality survey, measurements, analysis, cause and effects of harmonics and reactive power in the electric networks [1][2][3][4][5][6][7][8][9]. APFs can be categorized into three types, namely, two-wire (single-phase), three-wire and four-wire threephase configurations, to meet the requirements of the three types of NLL on supply systems. Domestic lights and ovens, TVs, computer power supplies, air conditioners, laser printers and Xerox machines behave as NLL and cause power quality problems for single-phase loads. For this type of load, the APFs are investigated in varying configurations and control strategies [10][11][12][13][14][15][16][17][18][19]. Starting in 1971, many configurations of APF have been developed for improving the power system quality. It can be categorized into four basic types, namely, series, parallel (shunt), hybrid APFs and unified power quality conditioner (universal AF). The series APF operates mainly as a voltage regulator and a harmonic isolator between NLL and utility system [20][21][22][23]. In other words, it allows only fundamental component of the current to flow in the system, suppressing other higher-frequency components. It can also be used to regulate the negative sequence voltage at the load. The series active filter is ideal for eliminating and/or maintaining the output voltage while balancing three-phase voltages [20,21,[23][24][25][26]. On the other hand, shunt APF has been widely used to mitigate the harmonics. It cancels the load-current harmonics and provides reactive compensation to the supply, through the act of injecting equal but opposite harmonic compensating current to the supply [27][28][29][30][31][32][33][34][35][36][37][38]. Shunt APF has the advantage of carrying only the compensation current plus a small amount of active fundamental current to compensate for system losses. It is also possible to connect several filters in parallel to cater for higher currents, making this type of circuit suitable for a wide range of power ratings [26,39,40]. The most common configuration of shunt APF is the inverter type where the role of the filter inductor is to suppress the high frequency at tuned current generated at tuned frequency, while the converter provides complementary filtering on others that includes any random variations through switching techniques [28,34,41,42]. The shunt APF controller can be used in direct or indirect connection. Hybrid APF can be characterized by a combination of passive filter and APF in series or parallel. The combination between series APF with parallel passive filter is the most popular arrangement because the solid-state devices used in active series part help in reducing the size and cost, to about 60-80% of load size [43,44]. Furthermore, the passive parallel LC filter is used to eliminate lower-order harmonics at reasonable cost [26,37,[44][45][46][47][48][49]. Another arrangement is the combination of active filter in series with a parallel passive filter, which is used especially for mediumand high-voltage applications [26]. Further arrangements also include a combination of parallel active and passive filters where the APF part is designed to eliminate the lower order of harmonics, while the passive filter works to eliminate the bulk load-current harmonic [26]. The combination of series active and parallel APF will produce unified power quality conditioner (also known as universal AF). The DC-link element of either inductor or capacitor is shared between two current sources or voltage-source bridges operating as active series and active parallel compensator [50,51]. This universal AF is considered as an ideal AF, which eliminates voltage and current harmonics, thus capable of providing clean power to critical and harmonic-prone loads, such as computer, medical equipment and others. The main drawbacks are large costs and complex control due to dependency on the number of solid-state devices involved [26,50,51].
Many control approaches have been developed to extract and estimate the harmonics in the system. Instantaneous reactive power theory (p-q theory), modified p-q theory [52][53][54], p-q-r theory [55,56], vectorial theory [57] and d-q theory [58][59][60] are the techniques that fall into the extraction technique. Due to its simplicity of control design relative to the rest, for that reason this d-q algorithm has been widely used to eliminate the harmonics [61]. On the other hand, estimation approach is used to estimate harmonics of frequency component present in the signal and measurement or estimation of the amplitude and phases of those frequencies [62]. This approach can be divided into two classes, non-parametric and parametric methods. The non-parametric methods are based on transformation of the given time-series data sequence. During the estimation process, these methods are not capable of incorporating with any available information about the system. Frequency domain approach using Fourier transform is most commonly used for spectrum analysis in this harmonic estimation [62]. In addition, parametric methods use an appropriate model to represent the signal and then estimate the parameters of the model from the available data points. Estimated parameters are applied to the selected model to determine harmonic contents in the signal. This parametric methods offer higher resolution and better accuracy than the non-parametric methods [62]. Kalman filter (KF) estimator is one of the methods that fall into the parametric method category which have been widely studied and used for different applications [62][63][64][65][66][67][68][69].

Main contribution
There are three main contributions regarding with this research: a. Developed a new design of shunt APF employing Kalman filter estimator.
• The new design of shunt APF for generating the reference currents using Kalman filter estimator was proposed to reduce the delay time and high transient current when applying the conventional technique. In addition, the developed system was tested for two different types of loads such as three-phase rectifier with RC-load and three-phase induction motor.
b. Investigation of the details of performance based on simulation and experimental for conventional and the proposed technique.
• The investigation criteria are on the harmonic spectrum, THD and power quality for different three types of load because these criteria affect directly the performance of system that used active power filter.
c. Comparative studies between the conventional and the proposed technique upon experimental implementation.
d. An analysis is carried out in terms of harmonic spectrum, THD and power quality as well to validate the advantages offered by employing the new techniques relative to the common implementation of an active power filter.

Proposal of the research
Power quality problems have becoming a critical issue when dealing with power electronic converter and NLL due to the effects of the harmonic contamination in power system. Many techniques have been proposed to overcome these problems such as passive filter which contribute to improve the power factor and harmonic suppression and exhibit lower impedance at a tuned harmonic frequency. However this approach provides incomplete solutions particularly when compensating random frequency variations in the current, tuning and parallel resonant problems. Therefore, various active power filter (APF) configurations with their respective control strategies have been proposed and have been recognized as a viable solution to the problem created by harmonics. Among the technique, the d-q algorithm has been widely used to eliminate the harmonics due to its simplicity of control design relative to the rest. Commonly, the d-q algorithm is using LPF to generate the reference current. However, time delay introduced when applying the LPF will contribute to the phase shift in harmonics and higher transient current. A new proposed technique of the current reference generator embedded with Kalman filter (KF) for shunt APF system is proposed as shown in Figure 1.
The KF in the system was used as a LPF to produce a reference current in three-phase system as shown in Figure 2. The KF used a form of feedback control in which the filter estimates the process at any time and then obtains feedback in the form of noisy measurements. These noisy measurements can be further exploited to improve the next estimates in which KF is able to perform because it has both time update and measurement update equations. The time update also known as predictor equation is responsible for projecting forward (in time) current state and error covariance estimate to obtain the estimation in the next time step, while the measurement update equation also called corrector equation is responsible for the feedback such as for incorporating a new measurement into the estimator to improve the   estimation. Therefore the estimation resembles the combination of predictor-corrector algorithm, which is used in the system. By applying KF, it improves the overall performance and also reduces the time delay and transient current which occurs in the conventional technique. Furthermore, this technique uses every measurement that the system has to further improve on the results by giving a better estimate at each time epoch. The significant improvement can be observed at the total harmonic distortion (THD) reduction at 2.38% compared to when the shunt APF is not implemented at all which performs at 168.39%. The TDH of the source current after the compensation is at 2.18% which is way below the IEEE 519 Standard which imposed a limit at less than 5% of the overall harmonics. In fact, for comparison, the use of KF also performed better than the established low-pass filter, which performs at 2.8% of the THD.

Mathematical formulation
There are three elements that involved in generating the required current reference that is used to compensate the undesirable load current components as shown in Figure 2. These elements are stationary reference frame, Kalman filter (KF) and DC voltage regulator. The mathematical formulation for each element is further explained in the next subtopics.

Stationary reference frame
Stationary reference frame also known as d-q algorithm was developed based on Park transformation. This method transforms three-phase into d-q coordinates (rotating reference frame with fundamental frequency) using Park transformations. In this case, the load currents are measured and transformed into d-q coordinates. The equations to transform a-b-c coordinate into α-β-0 coordinate is presented in Eq. (1): By employing Park transformation, the α-β-0 coordinate is transformed into d-q coordinate as shown in Eq. (1): ) arise due to harmonics at the load [61]. Low-pass filter (LPF) is normally used to determine the DC component. Nevertheless, for such system, phase shift in harmonics and high transient response is unavoidable before attaining its steady state. This is where KF estimator is used to replace the LPF and further improve the overall performance of the system. In order to stabilize the voltage on the DC side of the VSI, the measurement voltage, V dc , measure must follow the reference voltage, V dc ref. Therefore, DC voltage regulator loop is designed by integrating a suitable PI controller.

DC voltage regulator
The DC voltage regulator is controlled with a traditional PI controller. The DC voltage, V dc , is measured and then compared with a constant reference value V dc *. The error is processed by a PI controller with two gains: K p and K i . Both gains are calculated and tuned accordingly to the dynamic response in which the values of both gain are set to 4 for K p and 91 for K i .

Kalman filter
The use of Kalman filter (KF) provides an efficient computational means to estimate the state of a process which is able to minimize the means of the squared error. This is achieved by keeping tracks of the estimated state of the system as well as the variance of the estimates via two distinct phases: predict and update. The basic KF can be defined as. and where A is the state transition matrix, B is the control matrix that is applied to u k , which is the control vector of the system, and H is defined as observation matrix with x k the state of the system and y k the measurement or sometimes called observation vector. w k and v k are the process noise vector and observation noise vector, respectively, and it is assumed to be mutually independent and normally distributed. Relative to the system, since the fundamental positive sequence components of the non-linear load current appears as DC quantities of the synchronous reference frame rotating at 50 Hz, it can then be separated from the load currents using KF as depicted in Figure 3.
In this case, the state transition matrix is the differential equation that relates the state at the previous time step k − 1 to the current step k. Therefore, the state vector x k can be further defined as. Furthermore, the optional control input which defined the control matrix B can be neglected.
Since the system only measured two parameters, respectively, therefore the measurement matrix can be simply represented by two-by-two identity matrix. Therefore, the implementation of the KF can be rewritten as.
for the predictor: The measurement update equation x ̂ k is the estimate reference current of i d and i q , x ̂ k − is the predicted state, z k is the measurement of actual current, P k is the estimate error covariance, R k is the observation covariance matrix and K k is the Kalman gain. In this representation, matrix P is the variance matrix of the error x k − x ̂ k where the goal is to minimize this value. Here the Kalman gain calculation will be based on the conventional calculation defined in Eq. (8): The process noise covariance matrix Q and observation noise covariance matrix R are tuned manually in order to achieve the optimal performance of the filter. Figure 4 shows the cycle of KF.

Simulation and experimental result
The proposed simulation and experimental results designed for the three-phase reference current generation employing KF estimator for three-phase shunt APF are presented. The work is simulated and implemented using Matlab Simulink and dSPACE.

Non-linear load
The results for the APF before and after compensation are simulated using Matlab Simulink, while Fluke Power Quality Analyzer captures the results for the experimental. Figure 5(a) and (b) shows the supply current waveform before the compensation for simulation and experimental result; thus, the harmonic spectrum of both simulation and experimental is shown in Figure 6, respectively.
From the harmonic spectrum results, the total harmonic distortion (THD) can be determined by using the formula defined as.  Therefore, the THD of the line current obtained by the simulation is 56.14%, while the experimental obtains about 47.26%. There are slightly different between the simulation and experimental results because the simulation is simulated at an ideal condition.

Kalman filter estimator result versus low-pass filter
Commonly, a Butterworth low-pass filter (LPF) was applied to filter out the unwanted DC component for d-q algorithm to ensure that the correct reference currents are generated in the system. Failure to obtain the correct reference current resolves reduction of the overall  performance of the active power filter (APF). But, time delay which contributes to the phase shift in harmonics and high transient current is the common effect when applying the LPF. Figure 7 shows the shunt APF when applying Butterworth LPF. It is clearly shown that from the figure, the time delay is recorded at 0.02 s with 43.36% of the THD. On the other hand, there is no time delay when applying the shunt APF using KF estimator which is shown in Figure 8. Therefore, the THD produced by the KF estimator is 98% improvement compared to LPF. On the other hand, the experimental results for low-pass and KF are shown in Figures 9  and 10, respectively.

Three-phase shunt active power filter
In this shunt active power filter feeding a non-linear load, the results between Butterworth LPF and KF estimator are compared between simulation and experimental, which are shown in Figures 11 and 12, respectively.
From the results obtained, it can be concluded that almost the same waveform was produced for both simulation and experimental approaches. Furthermore, the harmonic spectrum form the experimental is shown in Figure 13.
Both methods have demonstrated a harmonic reduction with almost identical fundamental current between simulation and experimental.
The THD results obtained show that the new technique shunt APF abides the regulation of IEEE 519-1992 standard. Tables 1 and 2 show the THD after simulation and experimental results, respectively.
From the observation, the shunt APF using KF estimator technique produces about 0.1% better THD than LPF either in simulation or experimental.

Operation with three-phase induction motor speed drive
A 1.5 kW, 380 V variable speed induction motor (IM) drive is connected in parallel to the APF and the three-phase supply voltages. The motor is operated as a non-linear load and starts to accelerate from standstill at time, t = 0.06 s, until it reached the required reference speed which is set at 1400 rpm. Figures 14 and 15 show the supply current when the IM starts to accelerate without and with shunt APF, respectively. Fluke Power Quality Analyzer was used to measure Figure 13. Harmonics spectrum. the THD at steady-state condition (t = 0.28 s). THD obtained before applying shunt APF is 168.39%, whereas when applying the shunt APF using both KF and LFP, the THD reduced to 2.38 and 2.80%. Furthermore, the harmonic spectrum with or without shunt APF for both KF and LPF is shown in Figures 16-18, respectively. It can conclude that from the results, the shunt APF employing KF-based estimator produced lower THD than LPF for an induction motor drive application.  The overall total harmonic distortion with or without shunt APF is shown tabulated in Table 3, which shows that the KF estimator produces lower THD than LPF for three-phase induction motor.

Conclusion
The new techniques of reference current generator by employing KF estimator for shunt APF technique have been presented. The results of the proposed technique in generating the three-phase reference current towards reducing the THD are established using simulation and experimental. For the three-phase rectifier connected with RC load, the performance of the proposed technique is comparable with those based on the LPF reference current generation. The THD of the source current from the experimental result after the compensation is 2.18% which is less than 5% of the harmonic limit imposed by the IEEE 519 standard. Furthermore, nearly 0.1% THD improvement was gained by the proposed techniques compared to LPF. Thus, the comparison of different reference current grid generations for shunt APF is also presented. The performance of KF estimator reference current generation was also studied for induction motor variable speed drive. In induction motor, almost 0.42% improvement of THD was gathered when applying KF estimator compared to LPF.

Future works
Although the proposed technique improved the overall performance of shunt APF, there is a room of improvement and suggestion for further research work such as:

Reference current generation THD before (%) THD after (%)
Low-pass filter 168. 39 2.80 Kalman filter estimator 2.38 Table 3. THD of supply current before and after applying shunt APF. 1. The hysteresis band plays a significant influence to the THD reduction. With the lower hysteresis band, more accurate PWM generated, thereby improving the THD. In this thesis, the hysteresis band is set to ±0.08 while in simulation at ±0.001. Therefore, in order to have faster and more accurate result, the combination of dSpace and FPGA can be implemented to reduce the computational time from the dSpace.