Next Article in Journal
Study on the Design and Performance of a Glove Based on the FBG Array for Hand Posture Sensing
Previous Article in Journal
A Convolutional Neural Network with Spatial Location Integration for Nearshore Water Depth Inversion
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Instrumentation for Verification of Shunt Active Power Filter Algorithms

1
Department of Cybernetics and Biomedical Engineering, VSB–Technical University of Ostrava, 17. Listopadu 15, 708 33 Ostrava, Czech Republic
2
Department of Electronics, VSB–Technical University of Ostrava, 17. Listopadu 15, 708 33 Ostrava, Czech Republic
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(20), 8494; https://doi.org/10.3390/s23208494
Submission received: 25 July 2023 / Revised: 2 October 2023 / Accepted: 11 October 2023 / Published: 16 October 2023
(This article belongs to the Section Industrial Sensors)

Abstract

:
This article presents a comprehensive system for testing and verifying shunt active power filter control methods. The aim of this experimental platform is to provide tools to a user to objectively compare the individual control methods. The functionality of the system was verified on a hardware platform using least mean squares and recursive least squares algorithms. In the experiments, an average relative suppression of the total harmonic distortion of 22% was achieved. This article describes the principle of the shunt active power filter, the used experimental platform of the controlled current injection source, its control system based on virtual instrumentation and control software and ends with experimental verification. The discussion of the paper outlines the extension of the experimental platform with the cRIO RTOS control system to reduce the latency of reference current generation and further planned research including motivation.

1. Introduction

As a result of massive modernization and constant human expansion, there is also a massive expansion of consumer electronics and electrical appliances with power electronic circuits [1]. These appliances typically improve the quality of life and contribute to overall well-being of humankind. However, these benefits are also associated with some unpleasant negatives—the massive use of power electronics contributes to a deterioration of the power quality (PQ) in the distribution system and thus to the quality of the electricity that is distributed and sold to customers. The most common type of load that degrades PQ is non-linear load, which draws a current from the grid that contains a large number of unwanted higher harmonic components.
These harmonic components cause disturbances in the distribution network (outages, undervoltage, overvoltage) and affect the magnitude of the harmonic distortion of the voltage. Since appliances are sensitive to changes in the magnitude and shape of voltage, their lifetime is reduced and service and maintenance costs increase drastically [2,3]. Other problems caused by harmonic components of the current drawn by appliances are low power factor in the distribution network, unwanted acoustic sounds, current spikes or overheating and overloading of conductors in the power network [4,5]. In order to avoid these problems and the damage associated with the considerable financial costs, companies are investing considerable resources in researching ways to reduce and prevent harmonic current components. Harmonically distorted currents can be eliminated by using power filters, which may have passive [6,7], active [8] or hybrid [9,10,11] characteristics.
Active power filters are not as widely used as passive filters due to their higher cost. Therefore, passive filters are deployed for the time being—they are made for a specific case and are deployed on a given part of the distribution network. The main advantages of passive filters are simplicity of design and low deployment costs. The disadvantages are the large size, the problematic debugging resulting in inefficient filtration due to degradation of components and, most importantly, the inability to actively adapt to new states of the distribution network [6]. However, this is an insufficient solution in view of the massive expansion of power appliances in households and the expansion and automation of industrial production factories. To cover a wide range of disturbances, rapid filter adaptation and response to the current situation in the distribution network is required. These advantages are provided by the shunt active power filter (SAPF), which can be deployed where it is required the most [12].
A shunt active power filter (SAPF) is connected in parallel to the network and carries out the compensation by parallel injection or by draining harmonic current in/from the network. Non-linear load drains non-linear current i L ( t ) from the grid current i ( t ) , which consists of fundamental harmonic i ¯ L ( t ) and harmonic components i ˜ L ( t ) parts. The task of the SAPF is to precisely detect the higher harmonic part from the current signal and then inject it into power network with the opposite sign. As a result, the current drawn from the network has compensated harmonics and resembles an ideal sinusoidal waveform. Subsequently, only the fundamental harmonic power is drawn from the distribution network. The basic principle and block diagram of SAPF can be seen in Figure 1.
The control block of SAPF can be divided into four basic sections: harmonic current extraction (HCE), synchronization, DC voltage regulation and current generation. There are many different types of harmonic current extraction methods [14], grouped into several categories: time-domain-based [15,16,17,18,19,20,21,22,23], frequency-domain-based [14,24,25,26], adaptive algorithms [27,28,29,30], genetic-inspired algorithms and machine learning. The task of these methods is to perform mathematical separation of fundamental current and higher harmonic current. Harmonic current extracted by this separation is then used for active filtration. Main requirements for filtration methods are accuracy and rate of current generation. Further requirements for algorithms are the rate of convergence, stability and minimal mean squared error.
Multiple control methods of SAPF have been described in many publications over the years. Many of them were verified by real experiments on a real SAPF [21,27,31,32] or in a SW simulation environment [33,34,35,36,37]. Many of these methods were subjected to comparative experiments, but these experiments did not follow a uniform methodology. The conditions under which the methods were examined and evaluated differed from one publication to another. Therefore, it is not possible to objectively compare individual experiments of different authors [27]. However, the most frequently examined criterion when testing SAPF methods is the ability to suppress harmonic components, quantified in the form of total harmonic distortion of current (THD I ). This parameter describes in percentage how much current waveform differs from ideal sinusoidal shape. Other often examined criteria are method convergence rate, implementation difficulty, ability to work under distorted voltage conditions, parameter configuration and the method’s suitability for single-phase or three-phase power networks.
Another prerequisite that needs to be examined is the objectivity towards the method itself in terms of the used SAPF HW. If an objective evaluation of the method is to be performed, it is necessary that the SAPF control unit does not exhibit a long latency, since it degrades the performance of the SAPF control method. Therefore, it is recommended to use very fast computational units, such as digital signal processors (DSPs) or a field programmable gate array (FPGA). Many authors used inappropriate HW in terms of determinism and latency. On the contrary, different authors used the FPGA [27,38,39], so again, direct comparison cannot be carried out.
For the reasons described above, our motivation was to develop an experimental platform which can evaluate the quality of harmonic extraction methods in different scenarios of power grid parameters using uniform criteria. The experimental platform was designed as an open architecture to access the SAPF problem and is easily modifiable and expandable. The control system is based on virtual instrumentation, which means that the software is responsible for the functionality of the whole platform. By using this approach, the changes in the explored area can be dynamically adapted, and the new SAPF control methods can be implemented and verified without HW adjustments. This allows older and newer methods to be implemented and compared based on uniform criteria.
This article presents a novel design and validation of a unique, custom-built experimental platform that allows evaluation of harmonic extraction methods in different power network parameter scenarios. Section 2 covers the HW & SW design of the presented experimental platform, describing its unique architecture. Section 3 describes the accuracy of the individual modules of the cDAQ control system, including the reason for performing the measurement chain adjustment and calibration. Section 4 discuss the methods used for instrumentation validation. Section 5 describes the early experiments used for system verification and discuss the results of these experiments. Section 6 discusses gaps in the design of the CICS platform and opportunities for improving the CICS system and outlines motivations and opportunities for further research. Lastly, Section 7 contains the evaluation of the achieved results.

2. Controllable Injection Current Source (CICS) Experimental Platform

In order to meet the requirements described in the introduction, it was necessary to design an experimental platform that allows an objective comparison of SAPF control methods [28]. A schematic of the proposed experimental platform can be seen in Figure 2.
The controllable injection current source (hereafter abbreviated as CICS) experimental platform consists of three injection current generators GEN 1–3 and three controllable load modules LOAD 1–3. Data acquisition and generation of the reference current (in the form of voltage shape used for CICS control analog input) is procured by the NI (Austin, TX, USA) cDAQ-9189 system. Measured signals are signal conditioned before connection to A/D converters. A photo collage of the CICS experimental platform can be seen in Figure 3.

2.1. Three-Phase Compensation Current Generator

The CICS module itself is a one-phase-current controlled H-bridge converter that is connected to the grid via coupling inductance L F . The CICS module is a single-phase programmable voltage source, which is phase-coupled to the grid voltage. The CICS module generates voltage shape v G ( t ) that is required to achieve the correct injection current i G ( t ) form. For simplicity, line inductance and resistance are not considered in following equation:
v G ( t ) = v S ( t ) + L F d i G ( t ) d t ,
where v S ( t ) is the distribution network voltage, v G ( t ) is the voltage of the generator, L F is the coupling inductance and the i G ( t ) is the injection current.
The maximum amplitude of current i G ( t ) that can be generated is limited to the difference between the distribution network voltage amplitude value v S ( t ) and the maximum value of generated voltage v G ( t ) . The current i G ( t ) is also affected by the value of the coupling inductance L F . Due to the inductance, the maximum amplitude of injection current i G ( t ) is frequency-dependent, and its value decreases with the increase in frequency. A simplified expression of the I G can be seen in Equations (2) and (3). Another task of inductance L F is to filter the current ripple caused by the high-frequency switching of the IGBT transistors inside the current source.
Due to the nature of the task that this CICS module performs, it is not possible for generator to compensate the fundamental f 1 harmonic of the current signal, but this is not the goal.
v G ( t ) = v S ( t ) + L F Δ I G Δ t
I G = v G ( t ) v S ( t ) L F · Δ t
The control unit that switches the IGBT transistors inside the CICS modules is FPGA-based. As a result, the time required to generate individual samples acquired via voltage analog input is reduced. The current shape that is generated via the CICS module is the same as the shape of the voltage that is applied to the control analog input of the CICS module.
An Intel Cyclone 10 LP FPGA module is used in the CICS module. The FPGA calculates and regulates the current using a variable current hysteresis current control with constrained switching frequency algorithm. The frequency of current measurement and control loop operation is 1 MHz. Another task of the unit is to generate switching PWM pulses for the IGBT transistors. The switching frequency of the transistors is set to 50 kHz. The FPGA communicates with the master MCU unit via the SPI bus. The MODBUS RTU and TCP/IP communication interface is used for communication with other external peripherals (front panel, cDAQ system, PC).
The FPGA module also takes care of regulating the voltage level in the DC link, which is provided by the classic PID algorithm. The PID controller is set to PI with gain parameter Kp(-) = 0.2 and integration time constant Ti(s) = 0.045. The regulated system is astatic with the dominant capacitance of the intermediate circuit C = 1.5 mF and forms a second-order system with the regulator. For the basic setting of the system dynamics, a damping of 1.5 is considered, which was chosen as a compromise between the response speed and the behavior of the real system (the influence of traffic delays and other influences not included in the theoretical consideration, such as filters). The control frequency is 50 kHz. A simplified schematic diagram of the CICS module inner control system can be seen in Figure 4. A schematic diagram of the whole CICS module can be seen in Figure 5.
In the use-case scenario, the CICS system is considered by the user purely as a black box that generates the required current shape. There is no need for any additional settings.

2.2. Three-Phase Controllable Load

Load modules are basically the same as the aforementioned injection modules. Load modules inject defined current into the distribution network, which simulates with its shape of the waveform the real load. The main difference is that these modules can take the active power p ( t ) from the grid. This is ensured by connecting external resistors in which the active power is properly discharged.
In addition to load synthesis, it is also possible to connect a real appliance to the CICS system (up to 6 × 1-phase and 2 × 3-phase) that will be compensated.

2.3. Serial Inductors

Softening serial inductors can be connected to the distribution network to simulate negative voltage conditions. As a result, many negative voltage conditions scenarios can be simulated. From the point of view of filtering issues, the load is defined by the spectrum of the consumed current. Each harmonic component of the current causes a drop in the corresponding voltage component in the series inductance of the supply network. This voltage drop is proportional to the series inductivity and harmonic component frequency and affects the final load voltage. The measured series inductance of the electrical network connected to the experimental workspace was determined to be approximately 150 μ H. Currently, the experimental workspace includes additional softening inductors, which can be connected in series with the power grid to increase the input inductance for observing the effects with different input inductance. The four values of additional installed inductors are 0 mH, 5 mH, 10 mH and 15 mH. A change in induction value can be performed manually by the user or remotely via a MODBUS command.

2.4. Measurement Acquisition

Data acquisition of required electrical quantities is carried out by the NI cDAQ-9189 network chassis. A total of 12 currents (grid i ( t ) , load i L ( t ) , injection i G ( t ) , neutral i N ( t ) ) and three voltages (grid v ( t ) ) are measured and connected to the cDAQ acquisition system via signal conditioning modules (SCMs). The amplitude range of voltage modules is up to ±400 V and current modules is up to ±21 A. The purpose of the SCM is to provide signal conditioning to voltages in the ±10 V amplitude range that are correctly measured by the AI measurement modules over the full range. Four NI-9215 AI modules are used for data acquisition, and two NI-9263 AO modules are used for data generation to control the current generators and loads. The measurement system complies with the IEC 61000-4-30 standard (https://www.technicke-normy-csn.cz/csn-en-61000-4-30-333432-181262.html# (accessed on 24 July 2023)) used in the power quality field [40]. More information about adjustment and calibration of the data acquisition system is described in Section 3.

2.5. External Controller—Software

The power modules are controlled through an application that is programmed in the LabVIEW programming environment. The application itself runs on a higher-level system (PC) that communicates with the CICS platform via an Ethernet interface. Currently, the application can communicate with the power modules, perform measurements with respect to standards, carry out simple grid scenarios and implement various SAPF control methods. The application is designed to be modular due to the future extension of functions. The event-driven queued message handler (EQMH) was chosen as a suitable application architecture to meet all the requirements of the application. Details on this architecture are described in [41]. Communication between modules is maintained via first-in first-out (FIFO) messages. In order to make FIFO as usable and flexible as possible, every message/data point is transformed into the “variant” data type. One FIFO can be therefore used to send multiple data types, which is the main advantage of this approach. A simplified application diagram can be seen in Figure 6.
There are currently nine developed LabVIEW modules, which run in parallel and independently of each other.

2.5.1. Graphical User Interface

This module maintains handling of every event created by the user (e.g., button click, keyboard stroke) and is considered as a main module. In its initialization state, the system calls and subsequently runs every other “slave” module. From its front panel, the user can control the whole application, access other subpanels, run scenarios, set the CICS parameters, turn output on/off or run the logger.

2.5.2. MODBUS Communication Module

MODBUS module maintains communication with the machine which occurs in the background. Mainly, it converts the messages from the GUI module to MODBUS packets, which controls the CICS machine. The module can also restart the watchdog timer every 200 ms, or the timeout error occurs and the system enters an error state. This module in its default state is not accessible to the user and runs in the background.

2.5.3. Continual Data Acquisition

The objective of this module is to continuously acquire all the available data at the DAQ buffer by using the DAQmx library functions. As stated in Section 2.4, there are total of 15 channels that must be read for each cycle run. Every channel is represented as a waveform of instantaneous data. Sampling frequency is set to 62.5 kS/s, and the time window T W is 200 ms. These data are then distributed to other processes for additional processing via FIFO. If an error occurs, the DAQ process restarts itself without restarting the main application. If the error persists, the main application is terminated.

2.5.4. Calculations and Graphical Representation of Data

The main objective of this module is to inform the user about the current value of all electrical quantities that are measured or calculated. From sampled values of voltage and current frequency, U R M S and I R M S , voltage and current spectra, group spectra, amplitudes and phases of individual harmonic components, apparent power, active power, reactive power and total harmonic distortion for voltage and current are calculated. All electrical data can be saved on local storage.

2.5.5. Harmonic Current Extraction

This module takes care of application of harmonic current extraction (HCE) method on data. Every HCE method is considered as a separate entity, a function VI which is dynamically called on application startup. Due to this architecture, implementation of a new method into the application becomes easy. User can change the method on the fly. This process is precisely optimized so that the computational method is not burdened by any “unnecessary” operations. The processed current after the harmonic extraction is then adjusted to the actual phase of distribution network voltage ϕ ( t ) (if necessary) and then sent to other processes to be generated by the analog output module.

2.5.6. Synchronization Module

This module functionality is partly optional because not every HCE method needs to “know” about actual voltage phase value. The main objective of this task is to correct the phase delay Δ ϕ caused by the measurement, calculation and injection process. Because the used HW is not ideal (cDAQ system controlled by PC) and the delay caused by the flow of information is not zero, the phase delay has to be compensated. It is necessary to implement a phase-locked loop (PLL) that locks to the phase value of the voltage signal [42].
Approximation delay of the system Δ t can be calculated as:
Δ t = t ACQ + t HCE + t SYN + t GEN + t SHIFT ( s ) ,
where t ACQ is the time at which the data are acquired by analog input modules, buffered and sent to the PC via TCP-IP. t HCE is the time at which the selected harmonic extraction method reaches its goal and calculates the reference current to be generated; the value of this delay is dependent on the method used. t SYN is the time until the PLL Δ ϕ reaches zero value. t GEN is the time needed for all samples to be generated by the analog output module. Finally, t SHIFT is the delay caused by the phase shift of the waveform. This shift occurs because the ratio between the sampling frequency f s and frequency of the grid f is not an integer. The waveform then tends to be “sliding” inside the measurement window.

2.5.7. Continual Generation of Injection Current

After all calculations and corrections of the injection signals are carried out, they are finally generated by the analog output module. Because the generation is not executed point by point, it is necessary to truncate this process to a minimum. The goal of this process is to generate the required samples of the injection reference signals that are sent via FIFO from other process. Other necessary operations are carried out outside this task because the DAQ output operations are very sensitive to buffer overflow. The sampling frequency f S is 62.5 kS/s, but the size of the buffer is set only for 5 kS. If data are not available in time, the timeout state is initiated, which is considered by the application as a error, thus terminating the process.

2.5.8. Controllable Load Control

This part of the application takes care of execution of scenarios. A scenario is a set of CICS system parameters that can change over time. The parameters are configured by the definition text file in the form of a table. The format of the input table can be seen in Table 1. The text table is processed and converted to a series of generated waveforms. This software module keeps track of the elapsed time and sets the value of individual phases according to the current state of the scenario through the analog output voltage. Each phase can be set independently of others. Every harmonic up to the 50th can be set in the form of a percentage value from the fundamental amplitude of the current.

2.5.9. Continual Data Logger

This module continuously saves the acquired data into the NI TDMS data file structure. Channels are stored in the form of the waveforms and are divided into voltage and current groups. All calculated data (from Section 2.5.4) are included in the file.

3. CICS Measurement Part Accuracy and Calibration

In terms of measurement, it is necessary to mention the accuracy of the measuring system. As mentioned in Section 2.4, signal measurement and control voltage generation are provided by the NI cDAQ-9189 chassis containing NI-9215 analog inputs and NI-9263 analog outputs. The NI-9215 contains four differential analog inputs, 16-bit A/D converters, 100 kS/s sampling rate, simultaneous sampling and ±10 V range. NI-9263 includes four differential analog outputs, 16-bit DACs, 100 kS/s sampling rate and ±10 V range. NI, as the manufacturer of the analogue modules NI-9215 and NI-9263, provides their error limits, which can be seen in Table 2.
The measured signals are adjusted by the signal conditioning module (SCM) before being connected to the NI-9215 ADCs. The SCM is part of the CICS platform and its characteristics are determined by the circuit design proposed by the CICS manufacturer. The electronics of the SCM are not ideal from a metrological point of view and introduce amplitude errors, phase errors and frequency dependence into the measurement chain, mainly caused by the integrated anti-aliasing filter. The IEC 61000-4-30 Power Quality Analyzer Measurement Accuracy Standard was used to determine the limiting error of the measurement chain. In order to meet the required accuracy of the measurement chain (SCM + AD converter), an automatic adjustment must be performed to detect non-linearities, phase shifts and frequency dependence. A special software has been developed for the adjustment in the LabVIEW environment, and the measurement chain can be seen in Figure 7.
The resulting calibration report is used to verify the accuracy and to determine whether the detected errors fall within the error limits of the IEC 61000-4-30 standard. The constants detected during the adjustment are then applied in the measurement software, which processes the data from the AD converters to minimize the errors detected by the adjustment. To verify the accuracy of the entire measuring system, including the measuring software, calibration was performed after adjustment. The calibration provided information about errors of the measurement chain used for CICS control purposes and resulted in an accuracy verification report that the measurement system met the requirements of the measurement and test technology standard 61000-4-30. The results of the adjustment and calibration cannot be included in this article due to the large quantity of data (calibration of voltages and currents in five parts of the range and also in the frequency range (2nd–50th harmonic) on each part of the range). The OMICRON CMC 256plus calibrator, which was used for both the adjustment and calibration, is capable of generating a voltage of 0–300 V r m s and a current of 0–12.5 A r m s . For this purpose, this calibrator is sufficient in terms of accuracy and also range. The accuracy of this calibrator is shown in Table 3.

4. Implemented Methods

In order to conduct a verification of the CICS system, the Notch–least mean squares (Notch–LMS) and Notch–recursive least squares (Notch–RLS) algorithm were chosen as candidates for verification. Compared to other classical time-domain methods, these algorithms are difficult to implement, computationally demanding and require proper setup for optimal functionality. An adaptive filter with this structure is able to process multiple reference input signals x i ( n ) from different sources. Every reference input has its own weight coefficient w i [27].
Notch filters were chosen, since one of the parameters (filter order) is hardcoded. The implementation is also easier (the memory requirements are also lower). Both filters are adaptive and can therefore react to any changes to noise characteristics (usually sooner than one period of signal).

4.1. Notch–Least Mean Squares

Notch–LMS is a modification of the original LMS [43] algorithm. There are three basic steps in this algorithm:
y ( n ) = w 1 T ( n ) · x 1 ( n ) w 2 T ( n ) · x 2 ( n ) ,
e ( n ) = d ( n ) y ( n ) ,
w 1 ( n + 1 ) = w 1 ( n ) + 2 μ · e ( n ) · x 1 ( n ) , w 2 ( n + 1 ) = w 2 ( n ) + 2 μ · e ( n ) · x 2 ( n ) ,
where y ( n ) is the output of FIR filter, e ( n ) is the estimated error signal, w i ( n ) are the weight coefficients, μ is the convergence constant (step size) and x i ( n ) are the reference input signals.
It is worth mentioning that the choice of the μ significantly influences the function of the filter. A larger value of the μ results in loss of stability and also inaccurate filtration. On the other hand, lower values of the convergence constant cause an increase in computation time and augment computation demands.
With lower values of μ , the system that uses the LMS algorithm is able to achieve good results in terms of lowering the THD I value, but the convergence time takes too long. On the other hand, the higher the μ gets, the more dynamical the system becomes, but it loses its stability in terms of mitigating higher harmonic components, thus being ineffective.
The input signal d(n) to the LMS algorithm is current phase, and x(n) and x(n) 90 are reference signals. In order to generate reference signals, it is necessary to perform Clarke transformation, which transforms three-phase currents from abc to α β coordinates:
i α ( t ) i β ( t ) i 0 ( t ) = 2 3 · 1 1 2 1 2 0 3 2 3 2 1 2 1 2 1 2 · i a ( t ) i b ( t ) i c ( t ) .
After the transformation, it is necessary to filter out i α ( t ) and i β ( t ) from the fundamental harmonic component. These signals are then considered as x(n) and x(n) 90 .
After execution of the Notch–LMS algorithm, the negative value of error signal e ( n ) is then considered as i r e f ( n ) and is generated via the analog output module.

4.2. Notch–Recursive Least Squares

As with the Notch–LMS algorithm, the Notch–RLS algorithm is based on the original RLS algorithm [43]. The output of the FIR filter y ( n ) equation is similar to Equation (5), but the weights are recursively calculated from past iterations. Mean gain vectors k 1 ( n ) and k 2 ( n ) are: Response “We confirm this is correct.”
k 1 ( n + 1 ) = P 1 ( n ) · x 1 ( n + 1 ) λ + x 1 T ( n + 1 ) · P 1 ( n ) · x 1 ( n + 1 ) , k 2 ( n + 1 ) = P 2 ( n ) · x 2 ( n + 1 ) λ + x 2 T ( n + 1 ) · P 2 ( n ) · x 2 ( n + 1 ) .
Estimated error value e ( n ) is:
e ( n ) = d ( n ) y ( n ) .
Weights w i ( n ) of FIR filter are updated according to:
w 1 ( n + 1 ) = w 1 ( n ) + e ( n + 1 ) · k 1 ( n + 1 ) , w 2 ( n + 1 ) = w 2 ( n ) + e ( n + 1 ) · k 2 ( n + 1 ) .
Inverse matrices P 1 ( n ) and P 2 ( n ) are calculated with:
P 1 ( n + 1 ) = λ 1 P 1 ( n ) λ 1 k 1 ( n + 1 ) x 1 T ( n + 1 ) P 1 ( n ) P 2 ( n + 1 ) = λ 1 P 2 ( n ) λ 1 k 2 ( n + 1 ) x 2 T ( n + 1 ) P 2 ( n )
The functionality of this algorithm is fundamentally influenced by the correct choice of the forgetting factor λ value. The forgetting factor is in the range λ ( 0 , 1 ] . If the forgetting factor equals 1, then the estimation is performed without forgetting. In practical implementation, we usually consider range of values from λ = 0.98 to λ = 1.00 . The value of λ coefficient is directly related to the contribution of previous samples to the covariance matrix. This results in the filter being insensitive to the past samples.

5. Experimental Verification

In order to prove the functionality of the whole CICS system, a series of experiments were conducted. Figure 8 shows 30 s of I L ( t ) current with which all experiments were performed in order to investigate the behavior of the harmonic extraction methods with step changes in the current drawn by the loads. Important transients are marked there. Transient A shows the switching of the load from standby mode to run mode. B shows change from a lower to higher load current value. Next, C shows the transient of switching inventor from the run mode back to the standby mode. Finally, the D shows the same transient as A but for a much higher current value. In standby mode, the presence of distortion is detected due to current draw by the electronics to power the control electronics and network elements. The amplitude of the fundamental harmonic component of the current I L ( t ) in standby mode is 0.1 A. Current distortion is caused by the 7th and 15th harmonic components of the current with an amplitude of 10% of the fundamental harmonic component and unwanted noise. All experiments on the CICS platform were performed in three phases, but, for better description and representation in the graphs, data from only one phase L1 are shown.
Because of the nature of the CICS system application, the main criterion according to which all experiments were evaluated was the average relative THD I improvement. It is calculated as the ratio between the reference (original) THD I value of one cycle and its compensated counterpart, expressed as a percentage.
Total current harmonic distortion is calculated as the ratio of the sum of all higher current harmonics and current fundamental harmonic value I 1 . This is all according to:
THD I = I 2 2 + I 3 2 + I 4 2 + + I N 2 I 1 2 ,
where I 1 is the value of the fundamental harmonic component. The currents with an index higher than 1 are higher harmonic components. N is the highest considered harmonic component.
Due to transients, the THD I value cannot be calculated from the entire signal. The signal must be separated into individual periods. Individual THD I values are then calculated from these periods. This process is performed both for the current signal before compensation and for the one after compensation is performed. This results in an original non-compensated THD R E F value and its compensated counterpart THD C O M P in the form of vectors.
From these vectors, relative improvement (marked as δ ) of THD I value in percentage is calculated according to:
δ j = THD R E F j THD C O M P j THD R E F j · 100 ( % ) ,
where j is the index of the investigated current signal period. This value is then used as a criterion that assesses the quality of SAPF filtering in a given period.
Furthermore, as the last step, the average relative THD I improvement value ø δ THD I is calculated as:
ø δ THD i = 1 N j = 1 N δ j ( % ) ,
where N is the quantity of the all periods contained in the examined current signals. This result can be used to assess the overall average active filtration result in the experiment.

5.1. CICS System Verification

In order to prove system functionality, namely the higher harmonic current component mitigation and thus the reduction in THD I , a basic experiment with signal generation was performed. As the CICS system allows the synthesis of the load through the controllable analog input, the reference signal for calculation of THD I reduction can be easily generated. The “method” for this experiment is presented as “ideal”, since both the load current signal and its injection counterpart, without the fundamental harmonic, are predetermined in advance. The results of this simple experiment can be seen in Figure 9. In this case, the reference values of THD I contain only phase-locked loop time shift error because of the non ideal state of the used system (cDAQ controlled by the PC) and because the used sampling frequency f S is not an integer multiple of the grid frequency f. This causes continual shifting of the measured waveform that needs to be compensated. This error does not contain any delay originating from HCE method calculation or SW because the injection current waveform is known and prepared in advance.
To make the experiment more meaningful, it is necessary to simulate the HCE method calculation delay. To simulate this, the delay of 2 T W (two lengths of measurement window) has been incorporated. When applying the SAPF system, the most critical point is the transient between two steady states. The error is influenced by the delay of the phase-locked loop, as well as the HCE calculation method itself which is used to adapt to the new situation. However, this causes additional detuning of the phase-locked loop. Results with this incorporated delay can be seen in Figure 10. The reduction in the THD I has been little degraded, approximately by 2%.

5.2. Notch–LMS Algorithm Verification

As stated above, the adaptive algorithms from the LMS branch are very sensitive to the value of the convergence constant μ , which significantly affects its functionality. Because of this, the dependency between μ and the resulting THD I was examined. All settings of the μ and its result on the average relative THD I improvement can be seen in Table 4.
For this experiment, the optimal value of the convergence constant is μ = 1 · 10 6 . It should be noted that the optimal settings will be different for each experiment, but it is possible to specify a range of values where the adaptive algorithm will work properly. Furthermore, the value of the μ parameter can be tweaked on the fly, but this would need an additional layer of the control above the method itself.
Figure 11 shows the THD I values after the application of the Notch–LMS algorithm. Significant improvement in reduction in the THD I can be seen. However, when the transient occurs, the reduction decreases due to the fact that the phase-locked loop is detuned and the system tries to adapt to a new state. When the state is steady (the PLL is locked), the THD I is improved and decreases to the values below 5%.
Figure 12 shows the Notch–LMS application and its behavior in transient A (taken from Figure 8). The waveforms show the transition between standby and run mode. It is worth mentioning that due to the architecture of the application, there is a delay of two time windows and additional delays due to the communication, generation and other factors. Compensation starts at 0.48 s, but the filtering starts to work properly around 1.4 s. Adaptation time is therefore approximately 900 ms.
Figure 13 shows the Notch–LMS application and its behavior in transient B (taken from Figure 8). The plot shows the transition from the lower current value to the higher one with different harmonic settings. Again, the delayed compensation is noticeable, but this time there is a partial compensation included. This is due to the fact that after the load change in the time of 5.55 s, the compensation works for previous load settings up to the time of 5.6 s. Then, the compensation takes the correct form, but it takes approximately 500 ms before filter enters the steady state.
Figure 14 shows the Notch–LMS application and its behavior in transient C (taken from Figure 8). The waveforms show the transition from run mode to standby mode. Due to the latency, there is an unwanted injection into the grid which lasts for approximately 225 ms. This causes the SAPF to decrease power quality instead of improving it, which is undesirable.
Figure 15 shows the Notch–LMS application and its behavior in transient D (taken from Figure 8). In contrast to transient A, the phase-locking in this case takes longer to enter the steady state. In this case, the correct compensation does not take effect until approximately 2 seconds later. This delay is higher than in the case of transient A by 1.1 s.

5.3. Notch–RLS Algorithm Verification

Adaptive algorithms from the RLS family require correct setting of the forgetting factor for their optimal function. In case of power quality applications, the value of the forgetting factor tends to be close to the value of 1. Examined values in the experiment were in the range from 0.9 to 1. All values set and their corresponding results can be seen in Table 5. For this experiment, the optimal value of the forgetting factor is 0.9999.
Figure 16 shows the THD I values before and after the Notch–RLS application. As with the Notch–LMS algorithm, a significant reduction in the THD I can be noticed. The ability to mitigate THD I is reduced during transients. The RLS algorithm shows slightly better results than the LMS algorithm.
As for individual transients, the behavior of the Notch–RLS algorithm is very similar to the Notch–LMS. In transient A, RLS algorithm shows better results in adaptation time. The algorithm reaches the steady state 200 ms faster. Transients B and C shows same results as LMS. Convergence time is approximately the same. Transient D is processed faster by the RLS algorithm than LMS, again approximately by 200 ms.

6. Discussion

The quality of the resulting compensation is influenced by a number of factors—i.e., the type of the used adaptive algorithm, the setting of the phase delay or the latency of the filter control unit (FCU). Experiments have shown that the currently implemented filter control unit does not meet the expected functionality of a compensator of higher harmonic components under all operating conditions. The reasons for the imperfect functionality of CICS are twofold: (1) the non-RTOS used in the FCU and (2) the HW cDAQ used to measure and generate signals. Thus, the FCU exhibits significant latency. CICS shows good results of suppressing harmonic components in the steady state of the distribution network with compensation. However, during transients, compensation is experienced with a delay of up to 2 s, which corresponds to approximately 100 periods of the distribution network signal in a 50 Hz system. This delay is unacceptable.
To improve the CICS functionality, it is necessary to replace the non-RTOS FCU based on a Windows PC and cDAQ with other technology that has a lower latency. For comparison purposes, experimental latency measurements of three types of FCUs based on NI hardware components were performed. The following variants were compared: (1) Windows PC and NI PCI-6221, (2) Windows PC and NI cDAQ-9185 Ethernet chassis, (3) NI cRIO-9039 RTOS controller with the FPGA.

6.1. Latency Comparison of Three Control System Variants

The scheme of the comparison experiment can be seen in Figure 17. The function generator generates a rectangular signal v 1 ( t ) with increasing amplitude. This signal is digitized by the analog input of the FCU into a sample vector v 1 ( n ) . The sample vector v 1 ( n ) is immediately generated by the analog output of the FCU without any modification and takes the form of a voltage v 2 ( t ) . Signals v 1 ( t ) and v 2 ( t ) are connected to an oscilloscope where the delay Δ t is measured between individual signals.

6.1.1. Windows PC and NI PCI-6221

NI PCI-6221 is a multifunction DAQ board that has 16x AI and 2x AO. The resolution of both the ADC and DAC is 16 bits. The sampling rate is up to 250 kS/s. To minimize FCU latency, the DAQ card’s HW-timed single-point mode of operation has been used for both analog input and analog output.
In this mode, samples are measured and generated continuously sample-by-sample using hardware timing and without any buffers. Due to the lack of a dedicated buffer, it is necessary to ensure that reads and writes are only performed at the speed that is suitable for hardware timing of a Windows PC with non-RTOS. If an excessive sampling rate is requested or if the filter algorithm takes too long to calculate the value of the generated sample, a DAQ process error will be raised.
The programmer must ensure that the computation time per sample of the filter algorithm is lower than the inverse of the desired sampling rate 1 f S . The computation of the filter algorithm must be sufficiently fast to keep up with the HW timing. Since the computation time per sample of the filter algorithm depends on the chosen algorithm (method), the maximum sampling rate f S is also directly connected to the used method.
For comparison purposes, the sampling rate f S was gradually increased throughout the experiment, while the FCU latency was measured. The FCU was not calculating any harmonic extraction algorithms, and the samples were immediately generated at the analog output. The results are shown in Table 6.
Based on the results, it is clear that the HW timing in HW-timed single-point mode is not accurate and is influenced by jitter with a variance of units to tens of μ s. The DAQmx library offers a partial solution, as there is a function that can be used to eliminate jitter—Wait For Next Sample Clock. However, after implementing this function, it was not possible to set the value of the sampling rate f S above 1 kHz—this setting is, however, unsuitable for SAPF purposes. In the case of the HCE method implementation, the jitter was additionally increased by the variable delay caused by the computation of the implemented method.

6.1.2. Windows PC and NI cDAQ-9185 Ethernet Chassis

CompactDAQ is a modular measurement and signal generation platform consisting of a chassis and optional I/O modules. cDAQ-9185 is a four-slot chassis with a 2x Gb Ethernet interface. Timing and synchronization is provided by an internal clock. The NI-9215 module (4x simultaneous analog inputs, 16-bit ADC, 100 kS/s) and the NI-9263 module (4x simultaneous analog output, 16-bit DAC, 100 kS/s) were used to detect FCU delay. These identical modules are part of the FCU in the CICS platform for measurement and signal generation.
The cDAQ communicates with the Windows PC via TCP/IP protocol and uses N-sample methods based on a dedicated buffer. The time required to perform one iteration of data acquisition and subsequent generation includes the following subparts:
  • t 1 : Measuring the data via the AD converter and inserting the data into the internal input buffer of the cDAQ system.
  • t 2 : Sending the buffered data via Ethernet to the input buffer of the RAM memory in the PC.
  • t 3 : Calculation of harmonic extraction algorithm and buffering of data into the output buffer of RAM memory in the PC.
  • t 4 : Sending buffered data via Ethernet to the internal output buffer of the cDAQ system.
  • t 5 : Generating data available in the cDAQ output buffer using the DAC module.
For the visual representation, refer to Figure 18.
The measurement window length T W is based on the ratio of the readings N and the sampling frequency f S . The algorithm calculation time between each iteration of the control loop cannot exceed the T W , since the buffer would accumulate unread samples.
The analog output operation is based on a different principle than the analog input operation. The program writes data to the buffer and must deliver the new data before the buffer is emptied. If this does not happen, the data are lost. It follows that the sum of t 4 + t 5 must be smaller than the sum of t 1 + t 2 + t 3 , which is difficult to achieve. Times t 2 and t 3 are directly proportional to the length of the measurement window T W .
One possible solution is to minimize the length of T W by setting a low number of N sample readings. The combination of a high sampling rate f S and a small number of N samples is not realistic, since the speed of frequent communication of small quantities of data over Ethernet is not sufficient. Another solution would be to reduce the value of the sampling rate f S and leaving the number of N samples at a higher value. In this case, the frequency band of the measured signal would be reduced, and thus the quality of the compensation would be degraded. It is also possible to increase the size of the PC’s output RAM buffer. This will in turn increase the latency, which is also unsuitable.
One of the advantages of this approach is that the implementation in a LabVIEW programming environment is very simple, mainly thanks to the DAQmx library. However, this approach has its own significant disadvantage—the amount of latency is at least the sum of the length of the measured window T W and the communication latency. A comparison of the different settings of this solution can be seen in Table 7 and Table 8. Harmonic current extraction cannot be performed on this approach due to the unacceptably high latency, even though efforts were made to achieve a compromise between the sampling rate and the length of the measurement window T W .

6.1.3. NI cRIO-9039 RTOS Controller with FPGA

The CompactRIO (cRIO) platform consists of a controller with RTOS, an FPGA chassis and individual I/O modules. The cRIO controller is a high-performance controller that deterministically executes LabVIEW code in real time (RT). The platform chassis is directly interfaced with I/O to achieve high performance. The first two modules are directly connected to the FPGA chip and do not communicate through the bus. This design achieves almost negligible system response latency compared to the previously described architectures. The rest of the modules communicate through the SPI bus.
The cRIO-9039 contains a 1.91 GHz Intel Atom processor with four cores and an NI Linux RTOS operating system. One of the main parts of the cRIO platform is a 40 MHz Xilinx Kintex FPGA. The measurement modules used are the same as in the previous experiment. The principle for RTOS processors with the FPGA is different from the cDAQ system because the code can run on both the processor and the FPGA. There is no operating system on the FPGA itself, and the programmer does not have to deal with the communication latency over the device bus. The code for the FPGA takes the form of a logic circuit that is implemented directly on the hardware layer ensuring that the system latency can be considered constant. The LabVIEW programming environment allows the programmer to create code for the FPGA, but the code must be translated from LabVIEW to HDL and then synthesized using Xilinx. The disadvantage of developing code for FPGAs is the difficulty of programming and debugging and also the increase in compile time of the entire program as the code is extended.
Another significant disadvantage of FPGA code is the lack of floating-point data type operations. All numeric operations must be converted to a fixed-point data type (FXP). The conversion of these operations must be performed manually, and if errors occur in the code it can lead to significant inconsistencies of the achieved results.
Despite these major disadvantages, this approach is inevitable when developing and working with the RT controller cRIO-9039 containing FPGAs. The controller itself was verified in a comparison experiment, where the latency reached 12 μ s. This latency was caused by the used I/O modules, which can only operate at a maximum sampling rate of 100 kS/s. The inverse of this rate corresponds to the minimum latency of 10 μ s. This latency is more than sufficient for the purpose of the SAPF compensator.

6.2. Result of Comparison

The presented comparison showed that out of the three HW platforms, only the cRIO-9039 controller can meet the high demands required for SAPF compensation. Solutions that include a Windows PC as a control system are not applicable mainly due to the non-deterministic nature of the operation system that has to buffer data, which directly increases latency of the whole platform. The cDAQ-9189 Ethernet Chassis controller currently installed in the CICS platform will remain for voltage and current measurements and subsequent analysis and evaluation of experiments. The CICS platform will be extended with the cRIO-9039 controller to measure voltage and harmonically biased current in the network, perform harmonic extraction according to the implemented compensation method and then generate a reference current with a latency in units of microseconds.

6.3. Active Filter Implementation on NI cRIO-9039

To verify the earlier statements, an implementation of the active filter on the cRIO-9039 platform was performed. A three-phase distribution network containing harmonic voltage components was simulated using two NI-9263 modules with analog outputs. The FCU of the compensator consists of a cRIO-9039 equipped with an NI-9215 analog input module and an NI9263 analog output module. The Notch–LMS compensation method was chosen. A schematic diagram of the experimental setup can be seen in Figure 19, while the photograph can be seen in Figure 20.
The results from the experiment can be seen in Figure 21. Figure 21a shows the current distorted by higher harmonic components. Figure 21b shows the injection current generated by the cRIO-9039. Figure 21c shows the current signal after mathematical compensation. Mathematical compensation was carried out by summing the signals i S ( t ) + i G ( t ) from the measured data.
The quality of the compensation was evaluated based on the resulting THD I . Results in Table 9 clearly show that cRIO-9039 is suitable for use as an FCU for SAPF functionality. The value of THD I was on average improved by 97.75%.

6.4. Efficiency Evaluation of Notch Family Algorithms

A great influence on the functionality of the used adaptive algorithms Notch–LMS and Notch–RLS depends on the correct setting of their input parameters. As far as Notch–LMS is concerned, this algorithm requires a correct value of the convergence constant μ . For Notch–RLS, the most important parameter is the forgetting factor λ . The filter order for both of these algorithms is fixed to 2. With the correct setting of the aforementioned parameters, the minimum value of error is achieved. The results of the effect of setting the mentioned parameters can be seen in Table 4 and Table 5.
However, the problem is that it may be necessary to set the parameters differently for different tasks or signals. Therefore, it can be concluded that there is no universal value for these parameters, and the user is usually forced to set them empirically according to experience. Another solution that is offered is the use of optimization techniques that would automatically set the aforementioned parameters and therefore make the system work without the added error of the human factor. It should be emphasized that most optimization techniques are computationally intensive, but, due to the implementation of the algorithms on the FPGA, the speed of computation is greatly accelerated.

6.5. Further Research

After augmenting the CICS platform with the cRIO-9039 controller, the next area of research is a more detailed evaluation of experimental measurements such as convergence time, algorithm stability, computational complexity, response to different types of transients and ability to operate under different distribution network conditions.
The main goal of the ongoing research is the implementation of additional types of methods, modifications of individual methods for given load conditions, and combination of methods, which should provide better results under certain conditions of real distribution networks. The following approach was chosen to further increase the number of sites for potential SAPF deployment on real distribution network cases and thus move the research on SAPF issues forward:
1.
Comprehensive measurements using a PQ mobile analyzer in production plants.
2.
Power load analysis of specific production machines.
3.
Scenario simulation on SAPF programmable loads.
4.
Deployment of methods on a specific case.
5.
Optimization and transfer back to the production plant.
With sufficient experimental measurements and testing using various harmonic extraction methods on different states of the distribution network, useful and applicable results can be obtained. These results can lead to the extension and deployment of SAPFs to manufacturing plants or public and private deployments in major facilities, such as production halls, GIGA factories, public lighting, shopping malls, hospitals, server rooms, schools, office buildings and supermarkets.

7. Conclusions

This paper presents a uniquely designed and constructed experimental platform, CICS, which allows testing and validation of harmonic extraction methods. With its open architecture and unique design (controllable current generators, controllable synthetic loads, SCM electronics, virtual instrumentation-based control system, etc.), the CICS platform can be used to evaluate the quality of SAPF control algorithms in different scenarios of power grid parameters while maintaining a uniform background. The main advantage of the CICS platform is the use of controllable synthetic loads that ensure repeatability of measurements and experiments, as well as the possibility to set up different scenarios of the power grid. This also allows for further and detailed research through testing and conducting experiments of both control and synchronization harmonic extraction methods. Prior to the actual experimentation on the CICS platform, adjustment and calibration were performed to ensure the adjustment of the calibration constants, which were then used in the software for the actual measurement by the platform controller. The subsequent calibration verified that the measurement system meets the measurement conditions of IEC 61000-4-30.
Subsequently, verification of the capability of the designed CICS system to correctly filter the harmonic components of the current and thus reduce the value of the total harmonic distortion in the current signals flowing through the network was performed. For this verification, the Notch–LMS and Notch–RLS adaptive algorithms were selected and used. In order to make the verification meaningful, the experimental verification of both algorithms was performed on step changes in load parameters (step changes in current draw) and also switching the load from standby mode to run mode and back.
The main and only criterion for successful classification was the average relative improvement in THD I . The Notch–LMS algorithm was able to reduce the THD value by 22.073% when the convergence constant μ was set to 1 · 10 6 . The Notch–RLS algorithm provided slightly better results with a THD improvement of 22.346% for which the forgetting factor was set to 0.9999. Due to the nature of the LMS/RLS algorithms used (Notch family), the filter length is set to 2. Higher values have always had a negative effect on system performance.
Despite the very similar results of both methods, the Notch–LMS algorithm is currently the main candidate for real deployment. Compared to the Notch–RLS algorithm, it is simpler to implement, has a lower computational complexity and only one parameter needs to be set. It is also conventionally known and often used in other areas of signal filtering. The disadvantage of the Notch–RLS method is its high sensitivity to the correct setting of the forgetting coefficient λ . Despite the fact that both methods show similar values of relative THDI improvement in harmonic extraction results, the above facts about each method make it preferable to implement the Notch–LMS algorithm.
The quality of the resulting filtering is influenced, for example, by the type of adaptive algorithm used, the setting of the phase delay or the delay of the filter controller. According to the results of the experimental verification performed, it was found that the currently implemented NI cDAQ-9189 filter controller does not meet the expected functionality of the higher harmonic components of the current under all operating conditions. The conclusion of the experiment is the necessity of using a filter controller with RTOS, which has lower latency, for the filtering of harmonic components and correct functionality of the whole CICS system. Hence, another experiment was conducted to verify and compare the latency for three types of filtering controllers based on NI hardware components.
Throughout the experiment, it was discovered that the filtering controller showing the lowest latency between signal measurement using AI and signal generation using AO is the NI cRIO-9039 RTOS controller with an FPGA that had latency of 12 us. Finally, it was verified that the latency between signal measurement, applying the filtering algorithm and signal generation, is sufficient. From the results, it was verified that the cRIO-9039 is suitable for use as an FCU for the SAPF function in the CICS experimental platform. The THD I value was improved by 97.75% on average.

Author Contributions

Conceptualization, R.J., L.D. and J.S.; Methodology, J.B.; Software, J.B.; Validation, R.J., L.D. and L.H.; Formal analysis, R.J.; Investigation, J.B.; Resources, J.B., P.B. and R.M.; Data curation, J.B.; Writing—original draft, J.B., R.J., L.D., J.S. and L.H.; Writing—review & editing, J.B., R.J., L.D., J.S. and L.H.; Visualization, P.B. and R.M.; Supervision, P.B., R.J. and R.M.; Project administration, P.B. and R.M.; Funding acquisition, P.B. and R.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Ministry of Education of Czechia (Project No. SP2023/042 and SP2023/090).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

This article was supported by the Ministry of Education of Czechia (Project No. SP2023/042 and SP2023/090). We would like to thank Tomas Bubela from Bubela Power Electronics LTD (Turanka 115a, 627 00 Slatina, Brno, Czech Republic) for designing and constructing the CICS injection source (e-mail: [email protected]).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rudnick, H.; Dixon, J.; Moran, L. Delivering Clean and Pure Power. IEEE Power Energy Mag. 2003, 1, 32–40. [Google Scholar] [CrossRef]
  2. Mansoor, A.; Grady, W.; Staats, P.; Thallam, R.; Doyle, M.; Samotyj, M. Predicting the Net Harmonic Currents Produced by Large Numbers of Distributed Single-Phase Computer Loads. IEEE Trans. Power Deliv. 1995, 10, 2001–2006. [Google Scholar] [CrossRef]
  3. Thakur, P. Load Distribution and VFD Topology Selection for Harmonic Mitigation in an Optimal Way. IEEE Trans. Ind. Appl. 2020, 56, 48–56. [Google Scholar] [CrossRef]
  4. Xu, Y.; Xiao, X.; Liu, H.; Wang, H. Parallel Operation of Hybrid Active Power Filter with Passive Power Filter or Capacitors. In Proceedings of the 2005 IEEE/PES Transmission & Distribution Conference&Exposition: Asia and Pacific, Dalian, China, 18 August 2005; pp. 1–6. [Google Scholar] [CrossRef]
  5. Akagi, H. Control Strategy and Site Selection of a Shunt Active Filter for Damping of Harmonic Propagation in Power Distribution Systems. IEEE Trans. Power Deliv. 1997, 12, 354–363. [Google Scholar] [CrossRef]
  6. Das, J. Passive Filters—Potentialities and Limitations. IEEE Trans. Ind. Appl. 2004, 40, 232–241. [Google Scholar] [CrossRef]
  7. Peng, F.; Su, G.-J.; Farquharson, G. A Series LC Filter for Harmonic Compensation of AC Drives. In Proceedings of the 30th Annual IEEE Power Electronics Specialists Conference, Record. (Cat. No. 99CH36321), Charleston, SC, USA, 1 July 1999; Volume 1, pp. 213–218. [Google Scholar] [CrossRef]
  8. Akagi, H. Active Harmonic Filters. Proc. IEEE 2005, 93, 2128–2141. [Google Scholar] [CrossRef]
  9. Tischer, H.; Pfeifer, T. Hybrid Filter for Dynamic Harmonics Filtering and reduction in Commutation Notches—A Case Study. In Proceedings of the 2016 17th International Conference on Harmonics and Quality of Power (ICHQP), Belo Horizonte, Brazil, 16–19 October 2016; pp. 261–265. [Google Scholar] [CrossRef]
  10. Rahmani, S.; Hamadi, A.; Al-Haddad, K.; Dessaint, L.A. A Combination of Shunt Hybrid Power Filter and Thyristor-Controlled Reactor for Power Quality. IEEE Trans. Ind. Electron. 2014, 61, 2152–2164. [Google Scholar] [CrossRef]
  11. Rastogi, M.; Mohan, N.; Edris, A.A. Hybrid-Active Filtering of Harmonic Currents in Power Systems. IEEE Trans. Power Deliv. 1995, 10, 1994–2000. [Google Scholar] [CrossRef]
  12. Singh, B.; Al-Haddad, K.; Chandra, A. A Review of Active Filters for Power Quality Improvement. IEEE Trans. Ind. Electron. 1999, 46, 960–971. [Google Scholar] [CrossRef]
  13. Baros, J.; Sotola, V.; Bilik, P.; Martinek, R.; Jaros, R.; Danys, L.; Simonik, P. Review of Fundamental Active Current Extraction Techniques for SAPF. Sensors 2022, 22, 7985. [Google Scholar] [CrossRef]
  14. Hoon, Y.; Mohd Radzi, M.; Hassan, M.; Mailah, N. Control Algorithms of Shunt Active Power Filter for Harmonics Mitigation: A Review. Energies 2017, 10, 2038. [Google Scholar] [CrossRef]
  15. Benhabib, M.; Saadate, S. New Control Approach for Four-Wire Active Power Filter Based on the Use of Synchronous Reference Frame. Electr. Power Syst. Res. 2005, 73, 353–362. [Google Scholar] [CrossRef]
  16. Hasim, A.S.B.A.; Dardin, S.M.F.B.S.M.; Ibrahim, Z.B. Kalman Filters for Reference Current Generation in Shunt Active Power Filter (APF). In Kalman Filters—Theory for Advanced Applications; Serra, G.L.d.O., Ed.; InTech: London, UK, 2018. [Google Scholar] [CrossRef]
  17. Herrera, R.S.; SalmerÓn, P.; Kim, H. Instantaneous Reactive Power Theory Applied to Active Power Filter Compensation: Different Approaches, Assessment, and Experimental Results. IEEE Trans. Ind. Electron. 2008, 55, 184–196. [Google Scholar] [CrossRef]
  18. Kim, H.; Akagi, H. The Instantaneous Power Theory on the Rotating P-q-r Reference Frames. In Proceedings of the IEEE 1999 International Conference on Power Electronics and Drive Systems, PEDS’99 (Cat. No. 99TH8475), Hong Kong, China, 27–29 July 1999; Volume 1, pp. 422–427. [Google Scholar] [CrossRef]
  19. Kim, H.; Blaabjerg, F.; Bak-Jensen, B.; Choi, J. Instantaneous Power Compensation in Three-Phase Systems by Using p-q-r Theory. In Proceedings of the 2001 IEEE 32nd Annual Power Electronics Specialists Conference (IEEE Cat. No. 01CH37230), Vancouver, BC, Canada, 17–21 June 2001; Volume 2, pp. 478–485. [Google Scholar] [CrossRef]
  20. Massoud, A.; Finney, S.; Williams, B. Review of Harmonic Current Extraction Techniques for an Active Power Filter. In Proceedings of the 2004 11th International Conference on Harmonics and Quality of Power (IEEE Cat. No.04EX951), Lake Placid, NY, USA, 12–15 September 2004; pp. 154–159. [Google Scholar] [CrossRef]
  21. Montero, M.I.M.; Cadaval, E.R.; Gonzalez, F.B. Comparison of Control Strategies for Shunt Active Power Filters in Three-Phase Four-Wire Systems. IEEE Trans. Power Electron. 2007, 22, 229–236. [Google Scholar] [CrossRef]
  22. Revuelta, P.S.; Herrera, R.S. Application of the Instantaneous Power Theories in Load Compensation with Active Power Filters. In Proceedings of the 10th European Conference on Power Electronics and Applications, Toulouse, France, 2–4 September 2003; pp. 2–4. [Google Scholar]
  23. Salam, Z.; Tan, P.C.; Jusoh, A. Harmonics Mitigation Using Active Power Filter: A Technological Review. Elektr. J. Electr. Eng. 2006, 8, 17–26. [Google Scholar]
  24. Sadigh, A.K.; Barakati, S.M. Active Power Filter with New Compensation Principle Based on Synchronous Reference Frame. In Proceedings of the 41st North American Power Symposium, Starkville, MS, USA, 4–6 October 2009; pp. 1–6. [Google Scholar] [CrossRef]
  25. Dolen, M.; Lorenz, R. An Industrially Useful Means for Decomposition and Differentiation of Harmonic Components of Periodic Waveforms. In Proceedings of the Conference Record of the 2000 IEEE Industry Applications Conference, Thirty-Fifth IAS Annual Meeting and World Conference on Industrial Applications of Electrical Energy (Cat. No. 00CH37129), Rome, Italy, 8–12 October 2000; Volume 2, pp. 1016–1023. [Google Scholar] [CrossRef]
  26. Girgis, A.; Chang, W.; Makram, E. A Digital Recursive Measurement Scheme for Online Tracking of Power System Harmonics. IEEE Trans. Power Deliv. 1991, 6, 1153–1160. [Google Scholar] [CrossRef]
  27. Martinek, R.; Bilik, P.; Baros, J.; Brablik, J.; Kahankova, R.; Jaros, R.; Danys, L.; Rzidky, J.; Wen, H. Design of a Measuring System for Electricity Quality Monitoring within the SMART Street Lighting Test Polygon: Pilot Study on Adaptive Current Control Strategy for Three-Phase Shunt Active Power Filters. Sensors 2020, 20, 1718. [Google Scholar] [CrossRef] [PubMed]
  28. Martinek, R.; Rzidky, J.; Jaros, R.; Bilik, P.; Ladrova, M. Least Mean Squares and Recursive Least Squares Algorithms for Total Harmonic Distortion Reduction Using Shunt Active Power Filter Control. Energies 2019, 12, 1545. [Google Scholar] [CrossRef]
  29. Dash, P.; Swain, D.; Liew, A.; Rahman, S. An Adaptive Linear Combiner for On-Line Tracking of Power System Harmonics. IEEE Trans. Power Syst. 1996, 11, 1730–1735. [Google Scholar] [CrossRef]
  30. Wang, R.; Huang, W.; Hu, B.; Du, Q.; Guo, X. Harmonic Detection for Active Power Filter Based on Two-Step Improved EEMD. IEEE Trans. Instrum. Meas. 2022, 71, 1–10. [Google Scholar] [CrossRef]
  31. Chandra, A.; Singh, B.; Singh, B.; Al-Haddad, K. An Improved Control Algorithm of Shunt Active Filter for Voltage Regulation, Harmonic Elimination, Power-Factor Correction, and Balancing of Nonlinear Loads. IEEE Trans. Power Electron. 2000, 15, 495–507. [Google Scholar] [CrossRef]
  32. Mortezaei, A.; Lute, C.; Simoes, M.G.; Marafao, F.P.; Boglia, A. PQ, DQ and CPT Control Methods for Shunt Active Compensators—A Comparative Study. In Proceedings of the 2014 IEEE Energy Conversion Congress and Exposition (ECCE), Pittsburgh, PA, USA, 14–18 September 2014; pp. 2994–3001. [Google Scholar] [CrossRef]
  33. Gupta, N.; Singh, S.P.; Dubey, S.P. Fuzzy Logic Controlled Shunt Active Power Filter for Reactive Power Compensation and Harmonic Elimination. In Proceedings of the 2011 2nd International Conference on Computer and Communication Technology (ICCCT-2011), Allahabad, India, 15–17 September 2011; pp. 82–87. [Google Scholar] [CrossRef]
  34. Garcia Campanhol, L.B.; Oliveira da Silva, S.A.; Goedtel, A. Application of Shunt Active Power Filter for Harmonic Reduction and Reactive Power Compensation in Three-phase Four-wire Systems. IET Power Electron. 2014, 7, 2825–2836. [Google Scholar] [CrossRef]
  35. Kabir, M.A.; Mahbub, U. Synchronous Detection and Digital Control of Shunt Active Power Filter in Power Quality Improvement. In Proceedings of the 2011 IEEE Power and Energy Conference at Illinois, Urbana, IL, USA, 25–26 February 2011; pp. 1–5. [Google Scholar] [CrossRef]
  36. Dongre, G.A.; Choudhari, V.V.; Diwan, S.P. A Comparison and Analysis of Control Algorithms for Shunt Active Power Filter. In Proceedings of the 2015 International Conference on Computation of Power, Energy, Information and Communication (ICCPEIC), Melmaruvathur, Chennai, India, 22–23 April 2015; pp. 0129–0133. [Google Scholar] [CrossRef]
  37. Jou, H.L. New Single-Phase Active Power Filter. IEE Proc.-Electr. Power Appl. 1994, 141, 129. [Google Scholar] [CrossRef]
  38. Tiwari, V.K.; Umarikar, A.C.; Jain, T. Measurement of Instantaneous Power Quality Parameters Using UWPT and Hilbert Transform and Its FPGA Implementation. IEEE Trans. Instrum. Meas. 2021, 70, 1–13. [Google Scholar] [CrossRef]
  39. Russo, D.; Ricci, S. FPGA Implementation of a Synchronization Circuit for Arbitrary Trigger Sequences. IEEE Trans. Instrum. Meas. 2020, 69, 5251–5259. [Google Scholar] [CrossRef]
  40. Baros, J.; Danys, L.; Jaros, R.; Martinek, R. Wireless Power Quality Analyser Based on Virtual Instrumentation. IFAC-PapersOnLine 2019, 52, 465–472. [Google Scholar] [CrossRef]
  41. Baros, J.; Martinek, R.; Jaros, R.; Danys, L.; Soustek, L. Development of Application for Control of SMART Parking Lot. IFAC-PapersOnLine 2019, 52, 19–26. [Google Scholar] [CrossRef]
  42. Sahoo, A.; Mahmud, K.; Ravishankar, J. An Enhanced Frequency-Adaptive Single-Phase Grid Synchronization Technique. IEEE Trans. Instrum. Meas. 2021, 70, 1–11. [Google Scholar] [CrossRef]
  43. Tamboli, D.A.; Chile, R.H. Reference Signal Generation for Shunt Active Power Filter Using Adaptive Filtering Approach. In Proceedings of the 2015 International Conference on Industrial Instrumentation and Control (ICIC), Pune, India, 28–30 May 2015; pp. 766–770. [Google Scholar] [CrossRef]
Figure 1. Simplified block diagram and working principle of SAPF [13].
Figure 1. Simplified block diagram and working principle of SAPF [13].
Sensors 23 08494 g001
Figure 2. Controllable injection current source experimental platform schematic diagram.
Figure 2. Controllable injection current source experimental platform schematic diagram.
Sensors 23 08494 g002
Figure 3. CICS platform photo collage.
Figure 3. CICS platform photo collage.
Sensors 23 08494 g003
Figure 4. Simplified schematic diagram of inner controller (FPGA + MCU) functionality.
Figure 4. Simplified schematic diagram of inner controller (FPGA + MCU) functionality.
Sensors 23 08494 g004
Figure 5. Simplified schematic diagram of the CICS module. Energy dissipation circuit is included only in load modules (orange polygon).
Figure 5. Simplified schematic diagram of the CICS module. Energy dissipation circuit is included only in load modules (orange polygon).
Sensors 23 08494 g005
Figure 6. Simplified application flow diagram.
Figure 6. Simplified application flow diagram.
Sensors 23 08494 g006
Figure 7. Measurement chain during adjustment and calibration.
Figure 7. Measurement chain during adjustment and calibration.
Sensors 23 08494 g007
Figure 8. Load current I L (t) waveform with highlighted transients.
Figure 8. Load current I L (t) waveform with highlighted transients.
Sensors 23 08494 g008
Figure 9. THD I value of every period before and after the ideal harmonic mitigation.
Figure 9. THD I value of every period before and after the ideal harmonic mitigation.
Sensors 23 08494 g009
Figure 10. THD I value of every period before and after the ideal harmonic mitigation with 2 T W delay incorporated.
Figure 10. THD I value of every period before and after the ideal harmonic mitigation with 2 T W delay incorporated.
Sensors 23 08494 g010
Figure 11. THD I value of every period after Notch–LMS application.
Figure 11. THD I value of every period after Notch–LMS application.
Sensors 23 08494 g011
Figure 12. Notch–LMS application on A phase, transient A: (a) change from standby mode to run mode, (b) compensation delay, (c) adaptation time of adaptive filter and PLL, (d) steady state of the adaptive filter and PLL.
Figure 12. Notch–LMS application on A phase, transient A: (a) change from standby mode to run mode, (b) compensation delay, (c) adaptation time of adaptive filter and PLL, (d) steady state of the adaptive filter and PLL.
Sensors 23 08494 g012
Figure 13. Notch–LMS application on A phase, transient B: (a) change from lower to higher current, (b) compensation delay, (c) adaptation time of adaptive filter and PLL, (d) steady state of the adaptive filter and PLL.
Figure 13. Notch–LMS application on A phase, transient B: (a) change from lower to higher current, (b) compensation delay, (c) adaptation time of adaptive filter and PLL, (d) steady state of the adaptive filter and PLL.
Sensors 23 08494 g013
Figure 14. Notch–LMS application on A phase, transient C: (a) change from turned on load to standby mode, (b) compensation delay, (c) steady state of the adaptive filter and PLL.
Figure 14. Notch–LMS application on A phase, transient C: (a) change from turned on load to standby mode, (b) compensation delay, (c) steady state of the adaptive filter and PLL.
Sensors 23 08494 g014
Figure 15. Notch–LMS application on A phase, transient D: (a) change from standby mode to higher current, (b) compensation delay, (b,c) adaptation time of PLL for load, (d) adaptation time of adaptive filter and PLL, (e) steady state of the adaptive filter and PLL.
Figure 15. Notch–LMS application on A phase, transient D: (a) change from standby mode to higher current, (b) compensation delay, (b,c) adaptation time of PLL for load, (d) adaptation time of adaptive filter and PLL, (e) steady state of the adaptive filter and PLL.
Sensors 23 08494 g015
Figure 16. THD I value of every period after Notch–RLS application.
Figure 16. THD I value of every period after Notch–RLS application.
Sensors 23 08494 g016
Figure 17. Delay measurement schematic and principle.
Figure 17. Delay measurement schematic and principle.
Sensors 23 08494 g017
Figure 18. Example of cDAQ timing operations.
Figure 18. Example of cDAQ timing operations.
Sensors 23 08494 g018
Figure 19. cRIO-9039 SAPF schematic and principle.
Figure 19. cRIO-9039 SAPF schematic and principle.
Sensors 23 08494 g019
Figure 20. cRIO-9039 experimental SAPF setup.
Figure 20. cRIO-9039 experimental SAPF setup.
Sensors 23 08494 g020
Figure 21. Harmonic current compensation experiment conducted on cRIO-9039 platform.
Figure 21. Harmonic current compensation experiment conducted on cRIO-9039 platform.
Sensors 23 08494 g021
Table 1. Example of the scenario in the form of a .csv file that can be executed.
Table 1. Example of the scenario in the form of a .csv file that can be executed.
IndexPhaseFundamental
Current
Harmonics DefinitionTime (s)
Amplitude (A)IndexRatio (%)IndexRatio (%)IndexRatio (%)
11231052150.55
20.753852150
30.531075210.1
21231050970.04
20.753550.597
30.5337197
N1--------
2-------
3-------
Table 2. Accuracy of analogue measuring modules NI-9215 and NI-9263.
Table 2. Accuracy of analogue measuring modules NI-9215 and NI-9263.
Type of ModuleMeasurement ConditionsPercent of Reading
(Gain Error)
Percent of Range
(Offset Error)
NI-9215CalibratedMaximum (−40 C to 70 C)0.2%0.082%
Typical (23 ± 5 C)0.02%0.014%
UncalibratedMaximum (−40 to 70 C)1.05%0.82%
Typical (23 ± 5 C)0.6%0.38%
NI-9263CalibratedMaximum (−40 to 70 C)0.35%0.75%
Typical (23 ± 5 C)0.03%0.1%
UncalibratedMaximum (−40 to 70 C)2.2%1.7%
Typical (23 ± 5 C)0.3%0.25%
Table 3. Output voltage and current parameters of the OMICRON CMC 256plus calibrator.
Table 3. Output voltage and current parameters of the OMICRON CMC 256plus calibrator.
OutputRangeTypical AccuracyResolutionPhase (50 Hz)
Voltage0 …300 V r m s <0.015% reading + 0.005% range10 mV<0.02 guar.
Current0 …12.5 A r m s <0.01% reading + 0.005% range50 μ A<0.02 guar.
Table 4. Notch-LMS algorithm function verification. Comparison of various μ settings on THD I improvement.
Table 4. Notch-LMS algorithm function verification. Comparison of various μ settings on THD I improvement.
Method μ -Convergence Constant (-)Avg. Rel. THD I Improv. (%)
Ideal-29.281
Ideal + delay-27.473
LMS 1 · 10 15 19.669
1 · 10 14 19.412
1 · 10 13 21.345
1 · 10 12 19.276
1 · 10 11 21.144
1 · 10 10 20.612
1 · 10 9 18.792
1 · 10 8 21.230
1 · 10 7 19.494
1 · 10 6 22.073
1 · 10 5 21.544
1 · 10 4 21.423
1 · 10 3 21.872
1 · 10 2 21.624
1 · 10 1 17.011
Table 5. Notch-RLS algorithm function verification. Comparison of various forgetting factor settings on THD I improvement.
Table 5. Notch-RLS algorithm function verification. Comparison of various forgetting factor settings on THD I improvement.
MethodForgetting Factor (-)Avg. Rel. THD I Improv. (%)
Ideal-29.281
Ideal + delay-27.473
RLS0.900009.205
0.9900021.545
0.9990022.207
0.9999022.346
0.9999921.773
121.620
Table 6. Effect of sample rate settings on system latency.
Table 6. Effect of sample rate settings on system latency.
f S (kS)12.551015253540455051.025252<
Latency ( μ s)13205204302161001386068464670ErrorError
Table 7. Comparison of cDAQ9185 system delay for T W = 100 ms, various f S and minimized RAM output buffer length.
Table 7. Comparison of cDAQ9185 system delay for T W = 100 ms, various f S and minimized RAM output buffer length.
f S (kHz)62.55040302015954.51
Number of samples (kS)6.2554321.50.90.50.450.1
A O buff. length (S)12,000740050003500265023001200750600200
A O buff. delay (ms)192148125117133153133150133200
Expected min. delay (ms)292248225217233253233250233300
Measured delay (ms)269230187200214225199215202264
Table 8. Comparison of cDAQ9185 system delay for decreasing T W , f S = 5 kHz and minimized RAM output buffer length.
Table 8. Comparison of cDAQ9185 system delay for decreasing T W , f S = 5 kHz and minimized RAM output buffer length.
T W (ms)10090807060504030
Number of samples (S)500450400350300250200150
A O buff. length (S)750570620550400350370410
A O buff. delay (ms)15011412411080707482
Expected min. delay (ms)350294284250200170154142
Measured delay (ms)215176227187144200140148
Table 9. Settings and results of the experiment.
Table 9. Settings and results of the experiment.
Notch–LMS Filter
FCU f S (kS)52
Phase123
μ (-)0.000994510.000994510.00099451
THD I (%)33.4842.1121.05
Filtration results
THD I (%)0.561.190.47
Δ THD i (%)32.9240.9220.58
δ THD i (%)98.3297.1897.77
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Baros, J.; Bilik, P.; Jaros, R.; Danys, L.; Strossa, J.; Hlavaty, L.; Martinek, R. Instrumentation for Verification of Shunt Active Power Filter Algorithms. Sensors 2023, 23, 8494. https://doi.org/10.3390/s23208494

AMA Style

Baros J, Bilik P, Jaros R, Danys L, Strossa J, Hlavaty L, Martinek R. Instrumentation for Verification of Shunt Active Power Filter Algorithms. Sensors. 2023; 23(20):8494. https://doi.org/10.3390/s23208494

Chicago/Turabian Style

Baros, Jan, Petr Bilik, Rene Jaros, Lukas Danys, Jan Strossa, Lukas Hlavaty, and Radek Martinek. 2023. "Instrumentation for Verification of Shunt Active Power Filter Algorithms" Sensors 23, no. 20: 8494. https://doi.org/10.3390/s23208494

APA Style

Baros, J., Bilik, P., Jaros, R., Danys, L., Strossa, J., Hlavaty, L., & Martinek, R. (2023). Instrumentation for Verification of Shunt Active Power Filter Algorithms. Sensors, 23(20), 8494. https://doi.org/10.3390/s23208494

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop