ELECTRICITY METER WITH THE FACILITY TO DETERMINE THE QUALITY OF THE ELECTRICITY SUPPLIED

Many areas of activity face the problem of electricity quality. At the same time, diagnosing the quality of the energy provided makes it possible to identify and remedy problems that have arisen in the system. Advanced signal processing techniques and the use of advanced systems allow for a complex analysis of the phenomenon. The paper presents an electricity meter equipped with an electricity quality analysis system. It was developed based on the Xilinx Artix-7 programmable logic matrix. A Digilent Arty A7 development board was used due to its design and experimentation facilities. The developed system determines the power consumed and the main elements that define the quality of electricity: harmonics and other deviations from the frequency of nominal power supply, flicker, voltage gaps, voltage variations, transient surge, temporary surge, etc. The possibility of using an embedded system equipped with the Microblaze soft microprocessor, the existence of a 12bit analog-digital converter and the maximum sampling frequency of 1 MSPS and the possibility of assisted design allows to obtain a measurement system with superior characteristics. The results obtained and the experiments carried out confirm the expected performance for the electricity meter.


INTRODUCTION
The quality of electricity is an extremely complex notion that requires consideration of many factors. In this paper we propose to analyze the quality of electricity at the point of delimitation between supplier and consumer. In this situation, real-time monitoring of phenomena and the use of advanced disturbance processing techniques lead to the avoidance of unforeseen events and increased operational safety. Disturbances occurring in electricity supply networks are disturbances that occur in the time range (such as: flicker, voltage gaps, voltage variations, transient surges, temporary surges, voltage imbalance) and in the frequency field (e.g., harmonics and other deviations from the rated supply frequency) [1 -17].
The device presented in this paper is based on the latest technology of reconfigurable software systems and has as its main function the metering of electricity and as an auxiliary function the analysis of the quality of electricity at the point of interface between the electricity supplier and the electricity consumer. The device is based on an embedded system built around the MicroBlaze microprocessor configurable by software provided by Xilinx for the latest generation programmable logic arrays (FPGAs) [2][3][4].
From the point of view of energy quality, the device monitors the main disturbances manifested in the field of time and those manifested in the field of frequency, the data being stored in a local database accessible via the Internet network.
An Arty A7-35T DIGILENT test board equipped with FPGA Xilinx XC7A35TICSG324-1L and with the following interfaces: Ethernet, GPIO, I2C, JTAG, QSPI, SPI, UART, USB. The programmable logic matrix also comes with an IP module (Intellectual Property) analog-to-digital converter XADC which is a 12-bit analog-digital converter with dual channel, capable of operating at 1 MSPS, an FFT module and other [5][6].

Making the configurable structure
The configurable structure is made on a test kit of type Artix A7-35 of Digilent [5]. This kit is equipped with a Xillinx XC7A35TICSG324-1L programmable logic matrix and the accessories needed to conduct the experiments. To make the electricity meter it was chosen to make a built-in system with the MicroBlaze microprocessor because the design of such a system is greatly simplified by the existence of IP modules (Intellectual Properties). Thus, with the help of the Vivado 2020.2 made available by Xilinx, were used, for the realization of the built-in system, the analog-numeric converter module (XADC Wizard), the RAM memory, the calculation module of the discrete Fourier transform (Fast Fourier Transform), the serial communication module (UART) and of course the module of the microcontroller on 32 bits Microblaze [2,[11][12][13][14][15][16]. Figure 1 shows the simplified block scheme of the built-in system designed for the implementation of the electricity meter. In this block schema, the required interfaces between the system elements were no longer represented. To obtain the carbon soot, the chamber is evacuated of the air until a pressure of 10 -3 -10 -4 Torr ( Figure 1). The arc discharge is start up for 2 -3 minutes, in order, to heat the electrodes at the working temperature. After that, the chamber was filled in with a noble gas (argon or helium) at the pressure between 50 and 200 Torr. The arc intensity is controlled by the distance between the electrodes. During the process, the temperature of the chamber walls is maintained at 302 °C.
For simplicity, in Figure 1, the interfaces necessary to connect the modules were not shown. In this figure, the electrical voltage processed by reduction, limitation and adaptation shall apply to the analog-numeric converter XADC Wizard providing the samples of the voltage applied to the input. The number of samples can be changed in the design phase so that they are consistent with the Fourier analysis to be performed with the Fast Fourier Transform IP module. With the help of the microprocessor, disturbances in the time field (flicker, voltage gaps, voltage variations, transient surges, temporary surges etc.) and harmonics detected by the Fourier transform are stored in memory. The disturbances analyzed can be modified and adapted to the requirements by modifying the microprocessor software. The information is displayed locally on an LCD display or sent remotely via the UART interface.
The FFT module calculates the Fourier transform [8] for N points with N=2 m, m=3... 16. For fixed-point representation of the entry, the entry is in the form of a vector with N complex values. The real and complex values being represented in the two-complement code.
Discreet Fourier Transform X(k), k=0, 1, ..., N-1 of the sequence x(n), n=0, 1, ..., N-1 is given by equation (1): From the calculated harmonics, the counter by default monitors only the odd harmonics to the new harmonics. If you want to track other harmonics, this can be done by modifying the MicroBlaze microcontroller software. For this reason, the number of samples taken shall be restricted to 32 samples taken over a period (over the course of 20 ms) with the possibility of modification if necessary.
The results obtained depend essentially on the characteristics of the digital analogue converter. Thus, XADC allows digital calibration of offset and amplification. The XADC module is equipped with an automatic calibration function that automatically calculates the coefficients of offset and amplification. These coefficients can also be changed to get better results and they will be applied to all conversions made by digital analog modules.

Achieving the program structure
The software component of the configurable structure made allows the implementation of the functions necessary for the electricity meter with the determination of the quality of electricity. Figure 2 shows the simplified flowchart of the software component. The MicroBlaze microcontroller periodically runs a program that starts with a system configuration sequence. At this stage, the number of samples purchased shall be determined, the necessary corrections shall be made, and the serial device shall be configured. After this stage, the program run cyclically is launched.
Here, in parallel with data acquisition, the central unit saves the results of the previous analysis to the memory. During this process, if a data transmission request occurs, the central unit forms the transmission package, and the transmission begins.
Since the data is stored in local memory, the amount of information stored is limited. This value can be determined in the configuration phase where the frequency with which data is acquired, the number of samples and the type of analyses performed are determined.

RESULTS AND DISCUSSION
The electricity meter provided with the possibility of measuring the quality of electricity has proved useful in the activity of detecting and remediation the situations of faulty operation of the electrical grid. The installation in rural zone has enabled the identification of malfunctioning situations. The high accuracy of digital analogue conversion of more than 0.02 % of harmonic analysis allows for reliable results that can be used in network situation research.
Experiments have shown that monitoring the quality of the electricity network allows early detection of defects that can cause serious damage if these defects evolve.

CONCLUSIONS
The electricity meter presented in this paper is an instrument that has proven its usefulness in the numerous experiments carried out on the ground.
The use of configurable technology and the existence of the software allow a great versatility of the instrument and the adaptation of its functions to the needs of specific situations.
The use of reconfigurable structures allows greater flexibility in making a tool by the possibility of easily modifying, on the same medium, both the hardware structure and the software structure.
Because these tools will be used in hard-to-reach areas, in the future they will be provided with the possibility to change the software via the serial interface or via the Internet. This will make it possible to adapt the functions of the electricity meter to various needs that arise without the need to replace it.