Next Article in Journal
Safe Path Planning Algorithms for Mobile Robots Based on Probabilistic Foam
Previous Article in Journal
New Results on Radioactive Mixture Identification and Relative Count Contribution Estimation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Multifunctional Smart Meter Using ANN-PSO Flux Estimation and Harmonic Active Compensation with Fuzzy Voltage Regulation

by
Edson A. Batista
1,
Moacyr A. G. de Brito
1,*,
João C. Siqueira
1,
Jeandro C. Dias
2,
Raphael C. Gomez
2,
Maurilio F. R. Catharino
3 and
Matheus B. Gomes
1
1
Graduation Program in Electrical Engineering, Federal University of Mato Grosso do Sul—UFMS, PPGEE, Campo Grande 79070-900, MS, Brazil
2
Electrical Engineering Department, Dom Bosco Catholic University, Campo Grande 79117-900, MS, Brazil
3
FCA US LLC, 1000 Chrysler Drive Auburn Hills, Michigan, MI 48326-2766, USA
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(12), 4154; https://doi.org/10.3390/s21124154
Submission received: 18 March 2021 / Revised: 30 March 2021 / Accepted: 31 March 2021 / Published: 17 June 2021
(This article belongs to the Section Intelligent Sensors)

Abstract

:
This paper aims to present the analysis and development of a complete electronic smart meter that is able to perform four-quadrant measurements, act as a three-phase shunt active power filter (APF), and control three-phase induction motors by stator flux estimation. A transmission control protocol together with Internet protocol (TCP/IP) communication protocol for the remote access of measurement data is embedded into the application to securely transmit reliable information. An artificial neural network trained with particle swarm optimization is used for stator flux estimation, and a fuzzy logic controller is adopted to regulate the power converter DC bus voltage. The present work gathers knowledge from multidisciplinary fields, and all applied techniques have not been proposed altogether before. All control functions are embedded into a field-programmable gate array (FPGA) device, using VHSIC Hardware Description Language (VHDL), to enhance efficiency taking advantage of parallelism and high speed. An FPGA-in-the-loop cosimulation technique was first applied to prove the control functions’ functionality, and, later, experimental evaluations are conducted to finally prove equipment operation and reliability.

1. Introduction

The generation, distribution, and measurement of electricity are some of the main themes studied by scientists and researchers all over the world due to their considerably higher efficiency in processing and transporting over other energy sources. Brazilian electricity scenario remained unchanged for at least a hundred years; however, some factors such as fault detection, remote measurements, fraud, and mainly distributed generation have led to the establishment of intelligent grids, also known as smart grids.
Due to the intense usage of nonlinear loads in industries and companies, the quality of the electric power system is impaired with the more apparent occurrence of harmonics and reactive power flow. Some of the major nonlinear loads are identified as rectifiers, converters, and arc devices that pollute the distribution system [1,2]. Devices such as passive and active filters are widely used for harmonic current mitigation and voltage distortion reduction and can be applied separately or together, forming hybrid filters [3,4,5]. The main difference between these filters is related to their complexity and flexibility of use; nevertheless, both have the goal of eliminating or reducing the harmonic content, achieving reactive power compensation and power factor correction to meet the standards such as IEEE 519, 1547, and IEC 61006. This aids in avoiding the major effects of harmonics in the energy system, which are conductors overheating, equipment failures, resonances occurrence, and the premature aging of components [6,7].
In this sense, the development of a platform—mainly, but not restricted to, 220 VRMS three-phase systems—is proposed. The system’s measurement and control functions are vital to enhancing microgenerators’ power quality for the microgrid current and future scenarios. In addition, this platform has the objective of monitoring, with online web communication and a graphical interface, the bidirectional power flow and harmonic content and providing flux estimation and active harmonic mitigation, forming a multifunctional device (smart meter). Measurements of power flow and harmonic content were performed based on the instantaneous power theory (pq theory), which identifies the harmonic currents injected by nonlinear loads as oscillating power components [8]. In that sense, the proposed system contains an active power filter (APF) not only for the compensation of harmonics but also to compensate for the reactive power flow [9].
A solution for the equipment implementation on systems where certain levels of power quality and speed of response are required can be achieved through rapid prototyping hardware. The usage of reconfigurable logic devices, such as a field-programmable gate array (FPGA), allows that the input data and all the required algorithms are processed in real-time, with concurrent and parallel operation schemes, maximizing system effectiveness.
To provide expert control, with high performance and great robustness, for working with different loads, a fuzzy controller was proposed to control the APF DC bus voltage. The use of fuzzy inference systems is actually present in several areas with outstanding achievements [10,11,12].
A multilayer perceptron artificial neural network (MLP-ANN) was trained via a particle swarm optimization (PSO) algorithm for stator flux estimation. The flux estimation is used for controlling the three-phase induction machines using direct torque control (DTC). The rapid response for the required electromagnetic torque demands associated with the reduced stator flux oscillations is the main advantage of drives using the DTC strategy [13,14,15]. Moreover, the proper choice of switching presents a reduction in the switching frequency and losses reduction. The MPL-ANN was chosen because of its parallel processing ability, speed of response, learning ability, robustness, and great response when dealing with nonlinear systems; in the same sense, PSO is a very interesting alternative for the optimization of problems that fall into complex nonlinear functions (i.e., activation functions in neural networks). The great advantage of the PSO method is the ease of structuring and understanding, as well as the simplicity of implementation [16,17,18,19].
To ensure storage and data security, a web system was developed to receive and send information to the proposed device via a transmission control protocol together with Internet protocol (TCP/IP). The device sends measurement information to the system, and all data are saved on a database. The objective of this web system is the centralization of information from smart meters, as it allows monitoring and data transmission. The web platform was designed so that the server was able to communicate with multiple smart meters in the sense that, through this web system, it is possible to analyze and collect all data sent in one place. This feature is interesting for medium- and long-term analysis.
Some of the main features of the proposed FPGA-based smart meter can be highlighted as monitoring loads and grid power quality, compensating harmonics, increased power factor, and control of induction motors, even in very low-speed situations.
Considering the achievements of the present work regarding the existing literature, we cite no overshoots and zero steady-state error for the four-quadrant measurements. They were achieved with less computation burden than [20] and with less error than [21] because of the correct fixed-point representation with a lower-order filter and better flux estimation than [14], with zero error and only with small oscillations at the waveform peaks, even during speed step changes. In [14], one may verify for the flux space vector (d vs. q flux) low-frequency oscillations in all space vector waveforms, and, thus, the same oscillations are shown in the rotor flux. Verifying [22] and [23], we achieved a lower total harmonic distortion for the grid currents, obeying international standards, and reduced voltage fluctuations at the DC bus with fewer membership functions in the fuzzy inference machine. Finally, the usage of the TCP/IP protocol in the proposed smart meter allows a standardized and popular way to connect the electrical system to the web. In [24], one may verify the tendency to exchange data from the smart meter and the web server, but it is intended only for single-phase low-power systems, whereas the present work deals with three-phase systems.
Therefore, the main advantage of the proposed smart meter consists of having only one device with multifunctional properties as well as instantly monitoring. It is necessary to emphasize that although all concepts are not new in the literature, the present work gathers knowledge from multidisciplinary fields, and all applied techniques have not been proposed altogether before, becoming a challenging task and demonstrating its archival value.
Finally, hardware cosimulation and posterior experimental evaluations are conducted to prove the equipment operation and effectiveness. An overall diagram of the proposed device can be visualized in Figure 1, with exchanged data among blocks.

2. Material and Methods

2.1. Artificial Neural Network and PSO

This paper presents the development of a monitoring platform, in four quadrants, ensuring with a single device the control of induction machines and reduced total harmonic distortion (THD) levels for microgrid operation. Hence, a strategy was developed for estimating the stator magnetic flux through an MLP-ANN trained with PSO. Besides being monitored, the flux is necessary for the DTC strategy.
Additionally, an MLP network was chosen as it allows the usage of various activation functions (such as “tansig” or “logsig”) that are more effective than simple step functions and enable the network to be applied to nonlinear problem solutions [13]. Two separate, but identical, recurrent network structures were used, the first for estimating the magnetic flux along the d-axis and the second for evaluating the magnetic flux along the q-axis. The former network structure, which used only information concerning the d-axis, can be separated into two parts as outlined. In the first, the stator current (id) and the stator voltage (Ud) were the inputs, and the output was the stator flux Ψd ~ (k) estimation. In the second, the stator flux on the d-axis was estimated by considering the previous two estimated fluxes, namely Ψd ~ (k−1) and Ψd ~ (k−2). The former network can be visualized in Figure 2. Another identical neural network estimates the q-axis flux.
Offline supervised training was chosen because the data used for training came from simulations. The simulations were performed using the MATLAB/Simulink platform following the equations found in [25]. These networks were trained to estimate the motor flux from low speed to nominal speed and with nominal torque. The main motor characteristics are: 0.5 HP, 220 VRMS, 60 Hz, 4 poles, a stator resistance of 0.43 Ω, a rotor resistance of 0.82 Ω, a stator inductance of 2 mH, a rotor inductance of 2 mH, a mutual inductance of 0.69 mH, and an inertia of 0.089 kg∙m2. The used stopping criteria were an acceptable error of 0.0001 (between the estimated and real flux) or failing on achieving a better result over 50 times.
The network training was performed using the PSO strategy, which emerged from experiments with algorithms that mimic the social behavior observed in flocks of birds, shoals of fish, and groups of human beings [17]. PSO is based on the social cognitive hypothesis that each individual in a population has their own experience and is able to estimate the quality of that experience. However, because the individuals are part of a social group, they also possess knowledge about their neighbor’s behavior [18,19]. Analysis has shown that the learning process depends partly on the unique experiences of the individual and partly on the experiences of neighbors, implying that decision-making is a function of the past performance of the individual and those of some neighbors. Cultural adaptation depends on three principles [18,19]: (i) self-evaluation—individuals have the ability to sense the environment in order to estimate their own behavior; (ii) comparison—individuals use each other as a comparative reference; and (iii) imitation—important for the acquisition and maintenance of abilities. Individuals with the capacity to evaluate, compare, and mimic are those that are best able to find a group solution for problems presented by their environment and, therefore, to define global behavior as a result of such interactions.
In the PSO algorithm, the individuals of the population are represented by a number of particles, which constitute a swarm moving around a search space. Variations in their attributes lead to new points in the search space corresponding to movements in that space [19]. Each particle will move in a direction determined by its current position xi(k) and velocity νi(k), the position i that led to its best performance (pBi) or best fitness so far, and the best overall system performance (G). The particle’s velocity may be determined from Equation (1).
v i ( k + 1 ) = v i ( k ) + γ 1 ( p B i x i ( k ) ) + γ 2 ( G x i ( k ) ) ,
where coefficients γ1 and γ2, known, respectively, as the cognitive and social components, are limited from zero to one and indicate the relative contribution of each factor at instant k. The position of the particle at the next instant, i.e., xi (k + 1), is determined from its previous position xi (k) and its calculated velocity vi (k + 1) as Equation (2).
x i ( k + 1 ) = x i ( k ) + v i ( k + 1 ) .

2.2. Smart Systems

As technologies for alternative energy sources are in constant development, bidirectional power flow meters will be needed to constitute one of the main requirements for an intelligent grid. By providing information about the active and reactive power flow, one can identify if the client is receiving or providing power to the system.
It is known that it is possible to use four-quadrant measurements for controlling AC induction motors [26] and permanent magnet DC motors [27], as well as for assistance in controlling three-phase power converters [28]. Therefore, this paper demonstrates the usage of the pq theory to extract the active and reactive average powers and represent them in all four quadrants, as well as for compensating harmonic content.
To obtain the oscillating parts for active and reactive powers, the average power is subtracted from the instantaneous power. These calculated average values can be achieved through digital filters such as the moving average or discretized low-pass filters. In this paper, digital low-pass filters were used because they showed good response and used fewer FPGA logic elements. The transfer function for a third-order low-pass filter, with a unitary damping frequency, is given by Equation (3).
H ( s ) = ω c 3 s 3 + 3 ω c s 2 + 3 ω c 2 s + ω c 3 .
The Tustin discretization method is applied at Equation (3) returning Equation (4). The Tustin method [29] was adopted once the s-plane was mapped into the entirely z-plane and the frequency response could be easily verified in the w-plane (complex digital representation of an equivalent of the s-plane).
H ( z ) = k 0 z 3 + k 1 z 2 + k 2 z + k 3 z 3 + k 4 z 2 + k 5 z + k 6 .
Through Equation (4), it is possible to describe the filter into a VHDL code, where the coefficients were implemented with a fixed point (43 bits/1 signal bit and 40 bits for the fractional part), and the filter was implemented through the direct representation of its difference equation according to Equation (5), using registers, multipliers, and adders. Table 1 summarizes the filter coefficients considering an acquisition frequency of 30 kHz and a cut off frequency (ωc) of 20 Hz. The acquisition frequency is the same as the power converter switching frequency to simplify the synchronization procedures among the analog-to-digital converters and the pulse-width modulator. Figure 3 depicts the filter frequency response, with −60 dB/dec and a flat response to maintain the integrity of the DC value.
y ( k ) = k 0 u ( k ) + k 1 u ( k 1 ) + k 2 u ( k 2 ) + k 3 u ( k 3 ) k 4 y ( k 1 ) k 5 y ( k 2 ) k 6 y ( k 3 ) ,
where y is the output; u is the input; k is the current sample; and k− 1, k − 2, and k − 3 are one, two, and three sample delays.
As mentioned, the theory used for detection and compensation is known as the instantaneous active and reactive power theory, or simply, pq theory. It is based on instantaneous values from three-phase systems with or without neutral wires. It is also valid during transients or steady state. The pq theory consists of a Clarke transformation, which converts time-domain signals as voltages and currents from a natural three-phase coordinate system (abc) into a stationary two-phase reference frame (αβ0) [30]. Therefore, it allows active p ( v α i α + v β i β ), reactive q ( v β i α v α i β ), and zero-sequence p0 ( v 0 i 0 ) powers, and their oscillating counterparts p ˜ and q ˜ to be examined distinctly and instantaneously. Equation (6) defines the compensation currents ( i α ) and ( i β ) from the designated powers, and Equation (7) defines the compensation currents to be injected to the grid by means of the inverse Clark transform, considering power invariability.
[ i α i β ] = 1 v α 2 + v β 2 [ v α v β v α v α ] [ p ˜ + p 0 q ˜ ] .
[ i c a i c b i c c ] = 2 3 [ 1 2 1 0 1 2 1 2 3 2 1 2 1 2 3 2 ] [ i 0 i α i β ] .
A current controller is necessary for imposing Equation (7) into the grid through pulse-width modulation (PWM) at the APF converter. The small-signal average modeling was applied to obtain the main transfer functions of the adopted three-phase voltage source inverter (VSI) with inductive filters for grid connection. This controller is based on the average current mode control [31], and the adopted current compensator (Ri(s)) has a pole at the origin, a zero, and another pole at a higher frequency (for reducing switching frequency noise). One current control loop [32,33] is depicted in Figure 4, once the others are similar with only 120 degrees of phase-shift. Some parameters are vital, such as the inductance (Lc) value, obtained from Equation (8), which is based on the maximum output current ripple (ΔiLC), switching frequency (fs), and grid voltage peak (Vgridpeak).
L c = V d c V g r i d p e a k Δ i L c f s .
The APF transfer function is defined in (9), where Vdc is the capacitor DC bus voltage and rLc is the filter resistance.
G i ( s ) = i ( s ) m ( s ) = V d c s L c + r L c .
The transfer function for the current compensator is given by (10), where ωz and ωp are the zero frequency and pole frequency, respectively.
R i ( s ) = k R i s + ω Z s ( s + ω P ) .
To determine (10), one must analyze the open loop transfer function (OLTF), given by (11).
O L T F ( s ) = R i ( s ) K i K P W M G i ( s ) .
This control is tuned based on the Bode diagrams of modulus and phase using the criteria of crossing-over frequency and phase margin [31]. The Bode diagrams are presented in Figure 5, where one can observe the compensated characteristics as 4.5 kHz of crossing-over frequency and almost 67 degrees of the phase margin, guaranteeing system stability. The main APF parameters are summarized in Table 2. Tustin was used as a discretization method with a 30 kHz sampling frequency.
Besides the current loop, the voltage loop is also necessary because it keeps the capacitor voltage at a constant DC value [32,33]. In this work, a capacitance value of 365 μF was chosen for reducing the voltage ripple at the DC bus. The voltage loop is controlled through a fuzzy inference system mainly because of the fuzzy characteristics in dealing with nonidealities and plant perturbations [34,35].
The inference method applied in this controller was Mamdani’s max-prod [36]. The membership function labels are NB, NS, Z, PS, and PB, representing negative big, negative small, zero, positive small, and positive big, respectively. We chose the triangular membership functions (TMF) because of their simplicity and ease of implementation. In this paper, the error (e(k)) and its variation (de(k)) were selected as input variables. The error is defined as the difference between the DC link reference voltage, which is 400 V, and the capacitor actual voltage. The MFs for e(k), d(e(k)) and fuzzy output (u(k)) are shown in Figure 6. At first, it was adopted five MFs for de(k), and because of that, small variations in the error are considered to generate undesirable noises. Therefore, it was decided to decrease and modify the functions in such a way that, in addition to decreasing the number of rules and, consequently, the hardware usage, it would be possible to eliminate the noise and preserve the action of the controller on sudden variations.
Table 3 summarizes the rules considering the MFs and the output u(k) according to the inputs e(k) and de(k). The defuzzification method, obtained through Equation (12), consists of calculating the center of the area (COA) after applying Mamdani’s max-prod inference method.
u ( k ) =   u ( u ( k ) )     u ( k )   u ( u ( k ) ) ,
where u(u(k)) is the MF value of the discrete element of output value u(k).
The overall controller configuration integrates the error and sums it after the fuzzy inference machine, therefore eliminating any steady-state error. The integrative term appears in parallel with the inference machine performing a fuzzy PD + I controller; in such a configuration, the zero steady-state error is obtained by the usage of the integrative term, and the inference machine speeds-up the controller response. The explained configuration is shown in Figure 6, where coefficients k, k1, k2, and k3 are chosen as 100, 1, 0.01, and 5, respectively. The aforementioned coefficients were determined throughout extensive simulation analysis. The control signal obtained finally with the configuration of Figure 7 is the power lost in the converter stage, called ploss. This signal is used in addition to the other power compensation signals ( p ˜ + p 0 ) in Equation (6) to create the compensating currents according to Equation (7).
The communication system was implemented through TCP/IP protocol to enable remote access for monitoring data with a web interface. Hence, access control is a need to secure and ensure the information integrity from the smart meters in a way the user will only have access to these equipment/data through his own profile, and all the information stored in the database allows energy quality analysis.
Figure 8 shows one of the system’s interfaces, in which the average voltages, currents, consumption, and quadrants are shown. This web system is Java-based and communicates with the equipment using an API socket. Some of the exchanged data are voltages, currents, active and reactive power, and energy consumption.

3. Results

The equipment was tested with a bidirectional meter by changing the three-phase loads: first, a predominant resistive load in delta connection for measuring the active power; second, predominant capacitive and inductive loads inserted with the previous load.
The experimental results characterize the equipment’s ability to measure the bidirectional power flow through pq theory and the digital filters embedded in the hardware. Figure 9 demonstrates the active and reactive powers with the resistive load in series with an inductive load (207 Ω/550 mH for each phase). Figure 10 shows the result for the same loads but with an inverted position of the source while maintaining the position of the sensors. In Figure 11, a capacitive load (12.8 μF) is put in the place of the inductive load. In Figure 12, the load and source positions are inverted again. The power drained by the aforementioned loads, in series connection, are close to 350 W and 350 VAr.
This equipment also has the objective of controlling a three-phase induction motor by estimating the magnetic flux through an MLP-ANN. This strategy was adopted because, at very low speeds, the acquired data from sensors present considerable noise, interfering directly with the motor control. These motors are vastly used in microgeneration systems, and therefore, more optimized usage may interfere directly with power quality and production costs.
The ANN training was performed through the PSO algorithm. The ANN used had two hidden layers with eight neurons in the first and two in the second. PSO was in charge of computing and storing the weights. As explained before, the ANN inputs were voltages, currents, and delayed fluxes from the stator in both the q- and d-axes. The objective function was based on the error; however, minimizing its absolute values was necessary, according to Equation (13). The major advantage is a reduction in computational cost and training time. Due to a large amount of input data, training algorithms such as Levenberg–Marquardt (LM) [37,38] had memory issues, which resulted in a software crash. PSO, in turn, did not present any problems and, even with lower training points, is faster than LM.
E   =     | e s t i m e d f l u x   i d e a l f l u x | .
Through simulations in the MATLAB environment, one can check the quality of the estimation and the motor control. Figure 13 shows a comparison between the estimated and optimum flux, in the q- and d-axes, for the velocities of 10 and 30 rpm controlled by the DTC. An artificial offset was added to facilitate their visualization. Fluxes are also presented in terms of their corresponding axes in Figure 14, where one can verify the quality of the estimated flux, i.e., without error and with small oscillations, even during the step-change.
Hardware described in the VHDL language for testing the control of the APF was implemented. The first part test was taken through FPGA-in-the-loop (FIL), where the hardware is described in VHDL and embedded in the FPGA and the simulation runs on software (MATLAB/Simulink) and hardware (FPGA). The pq theory, current controllers, and PWM were inserted into the FIL as VHDL codes using a 32-bit fixed-point data type for arithmetic purposes. For FIL simulations, the Altera Quartus II was adopted as the compiler, and the system ran at an 8 MHz clock speed. There remains the possibility to generate a customized configuration in case the board lacks predefined configurations and libraries. The FIL block generated by Simulink is shown in Figure 15 with the conversion blocks for sampling rate and data type.
The results obtained for the embedded control module are shown using Cyclone FPGA Altera EP4CE115. The logic occupied only 30% of the device’s total resources, demonstrating the potential of the FPGA and VHDL programming.
In this paper, there is no distortion or unbalance in the voltage source so that the focus of the presented results is on the drained currents. The motor as a load generates considerable distortions in the input source. This is due to the converter input rectifier. As expected, the currents showed a high level of harmonics, as shown in Figure 16. However, Figure 17 shows its currents after the compensation from the APF almost in sinusoidal form, with a total harmonic distortion of 3.5%, far less than the recommendation of 5%.
Figure 18 presents the DC bus voltage with a fuzzy controller. One may note that the voltage fluctuation is within the designed limits, which were 1%, and its average value is 400 V. Its behavior changes after 0.06 s because this is when the equipment finished calculating the average powers and started compensating properly; the small ripple is observed because of the update rate of the algorithm. Because, at all times, the DC voltage is higher than the source voltage and does not exceed the fluctuation limit, even with different loads, the fuzzy controller was validated.
After FIL validation, the equipment was experimentally verified. The complete test workbench is presented in Figure 19a. In Figure 19b, one may verify the block scheme for test bench comprehension. It comprises the web interface, the FPGA platform, the signal conditioning, a three-phase 220 VRMS source, an induction machine (squirrel gage, 220 V, 60 Hz, 0.5 HP, 4 poles), the variable loads, the Fluke energy analyzer, and the power converter.
The results can be seen in Figure 20, which shows that source voltages are balanced. Figure 21 shows the drained distorted currents when driving the three-phase induction motor. The source currents after harmonic compensation are presented in Figure 22. Therefore, even with a nonlinear load, the multifunctional smart meter is able to detect and compensate for the harmonic currents appropriately.

4. Discussions

According to Figure 9, Figure 10, Figure 11 and Figure 12, one may verify the bidirectionality of the proposed smart meter. The measurements showed no overshoots and zero steady-state error with almost no ripple for all the four-quadrant measurements. Observing [20], the present work obtained similar results for the active power measurement with less computation burden once we achieved zero steady-state error with a lower-order digital filter. The authors of [21] showed active power measurements with pq theory with errors in the range of 4%, which is far bigger than our results; this happened most probably because they used a limited fixed-point representation for the calculus. As we used an FPGA, we could choose the correct fixed-point representation for each coefficient.
Additionally, regarding the flux estimation, according to Figure 13 and Figure 14, one may conclude a correct flux estimation, with zero error and only small oscillations at the waveform peaks. The correct estimated fluxes were achieved even during velocity step changes. Verifying [14], it presented for the flux space vector (d vs. q flux) low-frequency oscillations in all space vector waveforms, and, thus, the same oscillations are shown in the rotor flux waveforms. This way, we may verify that our work presents a better flux estimation.
Observing Figure 18, the fuzzy logic controller adopted for the control of the DC bus in a constant average value results in a small ripple of less than 1 V, which represents only a 0.25% fluctuation. Finally, one may observe from Figure 22 the correct compensation of the harmonic content in an almost sinusoidal form, with low harmonic distortion in the range of 3%. Similar findings can be verified in [22], but the total harmonic distortion is in the range of 10%, which is not allowed by international standards. In [23], the authors inserted a fuzzy controller to improve the DC bus regulation, and this helped to minimize the total harmonic distortion to 3.88%, which is similar to our work but still slightly higher. In addition to this, the authors of [22] used nine membership functions, which increases computational burden; in our study, we could achieve the aforementioned improvements with only five membership functions.
Finally, an important verification is that all controller functions are presented separately in the literature, which shows the importance of the proposed work.

5. Conclusions

The purpose of this paper is to provide an alternative composed of intelligent monitoring and control systems for use in microgeneration scenarios. This equipment has fundamental properties that meet the concepts necessary for a smart grid, such as four-quadrant measurements, current harmonic mitigation, power factor control, motor control, and data monitoring, via a web system using techniques fully implemented into the VHDL language and embedded processing.
It should be emphasized that the use of PSO training favors a faster and simpler way to estimate the flux using artificial neural networks, assisting in more accurate induction motor control (widely used in some power generation systems) and providing an increase in energy quality. Additionally, the usage of a fuzzy logic controller is an interesting alternative to control the APF DC bus voltage when dealing with different load types. In relation to FPGA and VHDL programming, the logic occupied only 30% of the board’s total resources, demonstrating the potential of the proposed solution.
The results obtained through the energy analyzer are consistent with both software and hardware (FPGA-in-the-loop) simulations and experimental evaluations, serving as the base for the development of more compact, robust, and efficient multifunctional smart meters. The usage of an FPGA as technology to embed the operational logic of the smart meter, as proposed in this work, favors the hardware synthesis of AI algorithms, antifraud systems, the implementation of different communication systems enabling IoT, remote updating capability, and the availability of services to consumers. As FPGA technology favors the execution of algorithms in parallel, the computational resources are attractive to enhance the use of big data and the implementation of advanced measurement infrastructure (AMI), fundamental in the smart grid scenario. The authors aimed to demonstrate a solution that could be used to implement the concepts of Industry 4.0 and IoT in the electricity distribution network, in addition to microgeneration control.
Finally, the present work gathers knowledge from multidisciplinary fields, and all applied techniques have not been proposed altogether before, as we observed from the literature.

Author Contributions

Conceptualization, E.A.B. and J.C.S.; methodology, J.C.D.; software, J.C.S., J.C.D., and M.B.G.; validation, R.C.G. and M.F.R.C.; formal analysis, M.A.G.d.B.; investigation, J.C.S. and E.A.B.; writing—original draft preparation, E.A.B. and M.A.G.d.B.; review and editing M.A.G.d.B. and M.B.G. All authors have read and agreed to the published version of the manuscript.

Funding

This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior-Brasil (CAPES)-Finance Code 001.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to thanks Federal University of Mato Grosso do Sul–UFMS and Fundect/CNPq 05/2011 PPP-process 23/200.649/2012.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bhosale, S.S.; Bhosale, Y.N.; Chavan, U.M.; Malvekar, S.A. Power quality improvement by using UPQC: A review. In Proceedings of the 2018 International Conference on Control, Power, Communication and Computing Technologies (ICCPCCT), Kannur, India, 23–24 March 2018; pp. 375–380. [Google Scholar]
  2. Barcenas, E.B.; Cardenas, V.; Roffiel, J.A. Review of power factor correction in three-phase three wire systems. In Proceedings of the 2006 IEEE International Power Electronics Congress, Puebla, Mexico, 16–18 October 2006; pp. 1–6. [Google Scholar]
  3. Das, J. Passive filters-potentialities and limitations. In Proceedings of the Conference Record of the 2003 Annual Pulp and Paper Industry Technical Conference, Charleston, SC, USA, 16–20 June 2003; pp. 187–197. [Google Scholar]
  4. Wang, F.; Yang, F.; Liu, T.; Hu, X. Measuring energy meter of three-phase electricity-stealing defense system. In Proceedings of the 2011 6th IEEE Conference on Industrial Electronics and Applications, Beijing, China, 21–23 June 2011; pp. 11–15. [Google Scholar]
  5. Da Silva, S.A.O.; Modesto, R.A. Active power line compensation applied to a three-phase line interactive UPS system using SRF method. In Proceedings of the 2005 IEEE 36th Power Electronics Specialists Conference, Recife, Brazil, 12–16 June 2005; pp. 2358–2362. [Google Scholar]
  6. Chang, L.; Diduch, C.; Song, P. Development of standards for interconnecting distributed generators with electric power systems. In Proceedings of the 2005 IEEE 36th Power Electronics Specialists Conference, Recife, Brazil, 12–16 June 2005; pp. 1–7. [Google Scholar]
  7. Bhattacharyya, S.; Van Lumig, M.; Cobben, S.; Myrzik, J.; Kling, W. Consequences of poor power quality for grid operators. In Proceedings of the International Conference and Exhibition on Electricity Distribution, Prague, Czech Republic, 8–11 June 2009; pp. 8–11. [Google Scholar]
  8. Li, E.; Sheng, W.; Wang, X.; Wang, B. Combined compensation strategies based on instantaneous reactive power theory for reactive power compensation and load balancing. In Proceedings of the 2011 International Conference on Electrical and Control Engineering, Yichang, China, 16–18 September 2011; pp. 5788–5791. [Google Scholar]
  9. Kanagavel, R.; Vairavasundaram, I.; Padmanaban, S. Design and prototyping of single-phase shunt active power filter for harmonics elimination using model predictive current control. Int. Trans. Electr. Energy Syst. 2020, 30. [Google Scholar] [CrossRef]
  10. Zadeh, L.A. Fuzzy logic—A personal perspective. Fuzzy Sets Syst. 2015, 281, 4–20. [Google Scholar] [CrossRef]
  11. Bessaad, T.; Taleb, R.; Chabni, F.; Iqbal, A. Fuzzy adaptive control of a multimachine system with single inverter supply. Int. Trans. Electr. Energy Syst. 2019, 29. [Google Scholar] [CrossRef]
  12. Zhou, Y.-S.; Lai, L.-Y. Optimal design for fuzzy controllers by genetic algorithms. IEEE Trans. Ind. Appl. 2002, 36, 93–97. [Google Scholar] [CrossRef]
  13. Akpan, V.A.; Hassapis, G. Adaptive predictive control using recurrent neural network identification. In Proceedings of the 2009 17th Mediterranean Conference on Control and Automation, Thessaloniki, Greece, 24–26 June 2009; pp. 61–66. [Google Scholar]
  14. Krishnamoorthy, S.; Sanjeevikumar, P.; Holm-Nielsen, J.B.; Raja Singh, R.; Rajesh, M. Torque ripple minimization of PMSM using an adaptive Elman neural network-controlled feedback linearization-based direct torque control strategy. Int. Trans. Electr. Energy Syst. 2021, 31. [Google Scholar] [CrossRef]
  15. Costa, B.L.G.; Graciola, C.L.; Angélico, B.A.; Goedtel, A.; Castoldi, M.F.; Pereira, W.C.D.A. A practical framework for tuning DTC-SVM drive of three-phase induction motors. Control. Eng. Pract. 2019, 88, 119–127. [Google Scholar] [CrossRef]
  16. Gong, Y.-J.; Shen, M.; Zhang, J.; Kaynak, O.; Chen, W.-N.; Zhan, Z.-H. Optimizing RFID network planning by using a particle swarm optimization algorithm with redundant reader elimination. IEEE Trans. Ind. Inform. 2012, 8, 900–912. [Google Scholar] [CrossRef]
  17. Kennedy, J.; Eberhart, R.C.; Shi, Y. Swarm Intelligence; Elsevier: Amsterdam, The Netherlands, 2001; p. 512. [Google Scholar]
  18. Del Valle, Y.; Venayagamoorthy, G.K.; Mohagheghi, S.; Hernandez, J.-C.; Harley, R.G. Particle swarm optimization: Basic concepts, variants and applications in power systems. IEEE Trans. Evol. Comput. 2008, 12, 171–195. [Google Scholar] [CrossRef]
  19. Poli, R.; Kennedy, J.; Blackwell, T. Particle swarm optimisation: An overview. Swarm Intell. 2007, 1, 33–57. [Google Scholar] [CrossRef]
  20. Serov, A.N.; Serov, N.A.; Lupachev, A.A. The application of digital filtration for the active power measurement. In Proceedings of the 2018 IEEE International Conference on Electrical Engineering and Photonics (EExPolytech), St. Petersburg, Russia, 22–23 October 2018; pp. 88–92. [Google Scholar]
  21. Chatterjee, D.; Dalapati, S. Single-phase average power measurement using instantaneous power theory in a fixed point processor. In Proceedings of the 2020 IEEE Calcutta Conference (CALCON), Kolkata, India, 28–29 February 2020; pp. 297–301. [Google Scholar]
  22. Acosta, J.; Gonzalez, A.; Martínez, Z. FPGA based control scheme for active power filter. In Proceedings of the 2006 IEEE/PES Transmission & Distribution Conference and Exposition: Latin America, Caracas, Venezuela, 15–18 August 2006; pp. 1–4. [Google Scholar]
  23. Dai, W.; Wang, B.; Xie, Y. A novel fuzzy logic controller for active power filter. In Proceedings of the 2009 IEEE International Conference on Computational Intelligence for Measurement Systems and Applications, Hong Kong, China, 11–13 May 2009; pp. 118–123. [Google Scholar]
  24. Saavedra, E.; Del Campo, G.; Santamaria, A. Smart Metering for Challenging Scenarios: A Low-Cost, Self-Powered and Non-Intrusive IoT Device. Sensors 2020, 20, 7133. [Google Scholar] [CrossRef] [PubMed]
  25. Krishnan, R. Electric Motor Drives—Modeling. Analysis and Control; Prentice Hall: Upper Saddle River, NJ, USA, 2001; 626p. [Google Scholar]
  26. Teja, A.V.R.; Chakraborty, C.; Maiti, S.; Hori, Y. A new model reference adaptive controller for four quadrant vector controlled induction motor drives. IEEE Trans. Ind. Electron. 2011, 59, 3757–3767. [Google Scholar] [CrossRef]
  27. Joice, C.S.; Paranjothi, S.R.; Kumar, V.J.S. Digital control strategy for four quadrant operation of three phase BLDC motor with load variations. IEEE Trans. Ind. Informatics 2012, 9, 974–982. [Google Scholar] [CrossRef]
  28. Jin, T.; Li, L.; Smedley, K.M. A universal vector controller for four-quadrant three-phase power converters. IEEE Trans. Circuits Syst. I Regul. Pap. 2007, 54, 377–390. [Google Scholar] [CrossRef]
  29. Ogata, K. Discrete Time Control Systems, 3rd ed.; Prentice Hall: Upper Saddle River, NJ, USA, 2000; 745p. [Google Scholar]
  30. Mikulovic, J.; Skrbic, B.; Durisic, Z. Power definitions for polyphase systems based on Fortescue’s symmetrical com-ponents. Int. J. Electr. Power Energy Syst. 2018, 98, 455–462. [Google Scholar] [CrossRef]
  31. Erickson, R.W.; Maksimovic, D. Fundamentals of Power Electronics, 2nd ed.; Kluwer Academic Publishers: New York, NY, USA, 2001; 900p. [Google Scholar]
  32. Rahmani, S.; Hamadi, A.; Al-Haddad, K.; Dessaint, L.A. A combination of shunt hybrid power filter and thyris-tor-controlled reactor for power quality. IEEE Trans. Ind. Electron. 2014, 61, 2152–2164. [Google Scholar] [CrossRef]
  33. Limongi, L.R.; Bojoi, I.R.; Griva, G.B.; Tenconi, A. Digital current-control schemes. IEEE Ind. Electron. Mag. 2009, 3, 20–31. [Google Scholar] [CrossRef] [Green Version]
  34. Cai, C.; Wang, L.; Yin, G. A three-phase active power filter based on park transformation. In Proceedings of the 2009 4th International Conference on Computer Science & Education, Nanning, China, 25–28 July 2009; pp. 1221–1224. [Google Scholar]
  35. Pelusi, D. Optimization of a fuzzy logic controller using genetic algorithms. In Proceedings of the 2011 Third International Conference on Intelligent Human-Machine Systems and Cybernetics, Hangzhou, China, 26–27 August 2011; Volume 2, pp. 143–146. [Google Scholar]
  36. Chukhrova, N.; Johannssen, A. Fuzzy regression analysis: Systematic review and bibliography. Appl. Soft Comput. 2019, 84, 1–29. [Google Scholar] [CrossRef]
  37. Augeby, J.; Angeby, J. Estimating signal parameters using the nonlinear instantaneous least squares approach. IEEE Trans. Signal Process. 2000, 48, 2721–2732. [Google Scholar] [CrossRef]
  38. Tomioka, S.; Nisiyama, S.; Enoto, T. Nonlinear least square regression by adaptive domain method with multiple genetic algorithms. IEEE Trans. Evol. Comput. 2007, 11, 1–16. [Google Scholar] [CrossRef]
Figure 1. Multifunctional device overall diagram.
Figure 1. Multifunctional device overall diagram.
Sensors 21 04154 g001
Figure 2. Network structure for estimating the stator flux in the d-axis.
Figure 2. Network structure for estimating the stator flux in the d-axis.
Sensors 21 04154 g002
Figure 3. Low-pass filter frequency response.
Figure 3. Low-pass filter frequency response.
Sensors 21 04154 g003
Figure 4. Current control loop—PhaseA.
Figure 4. Current control loop—PhaseA.
Sensors 21 04154 g004
Figure 5. Bode diagrams for the compensated open-current loop.
Figure 5. Bode diagrams for the compensated open-current loop.
Sensors 21 04154 g005
Figure 6. Membership functions for the voltage control loop.
Figure 6. Membership functions for the voltage control loop.
Sensors 21 04154 g006
Figure 7. Fuzzy controller for the voltage control loop.
Figure 7. Fuzzy controller for the voltage control loop.
Sensors 21 04154 g007
Figure 8. Instantaneous measurements: web interface.
Figure 8. Instantaneous measurements: web interface.
Sensors 21 04154 g008
Figure 9. Quadrant 1.
Figure 9. Quadrant 1.
Sensors 21 04154 g009
Figure 10. Quadrant 2.
Figure 10. Quadrant 2.
Sensors 21 04154 g010
Figure 11. Quadrant 3.
Figure 11. Quadrant 3.
Sensors 21 04154 g011
Figure 12. Quadrant 4.
Figure 12. Quadrant 4.
Sensors 21 04154 g012
Figure 13. Comparison between estimated (pink) and ideal flux (blue).
Figure 13. Comparison between estimated (pink) and ideal flux (blue).
Sensors 21 04154 g013
Figure 14. Comparison of fluxes in the q- and d-axes.
Figure 14. Comparison of fluxes in the q- and d-axes.
Sensors 21 04154 g014
Figure 15. Field-programmable gate array (FPGA)-in-the-loop (smart meter) simulation block.
Figure 15. Field-programmable gate array (FPGA)-in-the-loop (smart meter) simulation block.
Sensors 21 04154 g015
Figure 16. Source current with three-phase induction motor.
Figure 16. Source current with three-phase induction motor.
Sensors 21 04154 g016
Figure 17. Source current with APF compensation.
Figure 17. Source current with APF compensation.
Sensors 21 04154 g017
Figure 18. Capacitor voltage with a fuzzy controller.
Figure 18. Capacitor voltage with a fuzzy controller.
Sensors 21 04154 g018
Figure 19. Test bench for smart meter compensation with web interface. (a) Experimental setup; (b) test bench block scheme.
Figure 19. Test bench for smart meter compensation with web interface. (a) Experimental setup; (b) test bench block scheme.
Sensors 21 04154 g019
Figure 20. Source voltage measured using the Fluke energy analyzer.
Figure 20. Source voltage measured using the Fluke energy analyzer.
Sensors 21 04154 g020
Figure 21. Source current with a nonlinear load (inverter + motor).
Figure 21. Source current with a nonlinear load (inverter + motor).
Sensors 21 04154 g021
Figure 22. Source current with smart meter active compensation.
Figure 22. Source current with smart meter active compensation.
Sensors 21 04154 g022
Table 1. Digital filter coefficients.
Table 1. Digital filter coefficients.
CoefficientValue
k09.13 × 10 9
k12.739 × 10 8
k22.39 × 10 8
k39.13 × 10 9
k4−2.987
k52.975
k6−0.9875
Table 2. Main active power filter (APF) parameters.
Table 2. Main active power filter (APF) parameters.
SymbolDescriptionValue
LcInductance700 μH
VdcDC bus voltage400 V
fsSwitching frequency30 kHz
ΔiLCCurrent ripple10%
VgridpeakGrid peak voltage311 V
K i Current sensor1/10
k R i Compensator gain3545
ω Z Zero73.2
ω P Pole65,820
Table 3. Fuzzy rules.
Table 3. Fuzzy rules.
u(k)e(k)
de(k) NBNSZPSB
NBNBNBNSNSZ
ZNSNSZPSPS
PBZPSPSPBPB
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Batista, E.A.; de Brito, M.A.G.; Siqueira, J.C.; Dias, J.C.; Gomez, R.C.; Catharino, M.F.R.; Gomes, M.B. A Multifunctional Smart Meter Using ANN-PSO Flux Estimation and Harmonic Active Compensation with Fuzzy Voltage Regulation. Sensors 2021, 21, 4154. https://doi.org/10.3390/s21124154

AMA Style

Batista EA, de Brito MAG, Siqueira JC, Dias JC, Gomez RC, Catharino MFR, Gomes MB. A Multifunctional Smart Meter Using ANN-PSO Flux Estimation and Harmonic Active Compensation with Fuzzy Voltage Regulation. Sensors. 2021; 21(12):4154. https://doi.org/10.3390/s21124154

Chicago/Turabian Style

Batista, Edson A., Moacyr A. G. de Brito, João C. Siqueira, Jeandro C. Dias, Raphael C. Gomez, Maurilio F. R. Catharino, and Matheus B. Gomes. 2021. "A Multifunctional Smart Meter Using ANN-PSO Flux Estimation and Harmonic Active Compensation with Fuzzy Voltage Regulation" Sensors 21, no. 12: 4154. https://doi.org/10.3390/s21124154

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