FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 32, N o 3, September 2019, pp. 439-448 https://doi.org/10.2298/FUEE1903439V © 2019 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND A BRIEF OVERVIEW OF STOCHASTIC INSTRUMENTS FOR MEASURING FLOWS OF ELECTRICAL POWER AND ENERGY  Vladimir Vujicic 1 , Dragan Pejic 2 , Aleksandar Radonjic 3 1 Vladimir Vujicic - Entrepreneur Consultant in Electrical Engineering and Energetics, Novi Sad, Serbia 2 Faculty of Technical Sciences, Novi Sad, Serbia 3 Institute of Technical Sciences of the Serbian Academy of Sciences and Arts, Belgrade, Serbia Abstract. This paper gives a brief overview of three instruments suitable for measuring the flow of electrical power and energy. The first instrument is a single-phase power analyzer, while the other two instruments are double and quadruple three-phase power analyzers. In addition to overviewing these instruments, the paper presents a possible improvement of a quadruple three-phase power analyzer. The implementation of this improvement would make it possible to use a quadruple three-phase power analyzer as support for the phasor measurement unit. Key words: electrical power, electrical energy, power grid network, stochastic instruments, measurement accuracy, phasor measurement unit. 1. INTRODUCTION Electrical energy is the most common and widely used type of energy in the world. It can be easily converted to other forms of energy, such as heat, light, or mechanical power. In industry, electrical energy is usually calculated indirectly: as the product of electrical power and time. In contrast to it, electrical power is calculated directly: as the product of voltage and current. The precise measurement of all these quantities is a necessary precondition for the proper operation of technological equipment. Their values give us all the necessary information about the technological process. In the offline mode, this information can be used to analyze and improve the process from the economic point of view. In contrast, in the online mode, the obtained information is used as input data for various SCADA systems. In this way, it is possible to perform real-time control of very complex technological processes. Received October 25, 2018; received in revised form April 23, 2019 Corresponding author: Aleksandar Radonjic Institute of Technical Sciences of the Serbian Academy of Sciences and Arts, Knez-Mihailova 35/IV, 11000 Belgrade, Serbia (E-mail: sasa_radonjic@yahoo.com)  440 V. VUJICIC, D. PEJIC, A. RADONJIC In the last 20 years a large number of methods for measuring electrical power and energy have been developed. They are practically implemented in three types of devices: 1) instruments for measuring the quality of electrical energy, 2) power analyzers, and 3) smart meters. Besides having different roles, these devices have different prices: the instruments for measuring the quality of electrical energy are, respectively, one and two orders of magnitude more expensive than power analyzers and smart meters. 2. THE VMP20 INSTRUMENT The VMP20 instrument is a single-phase power analyzer (Fig. 1). It was designed back in 1996 by the authors and their colleagues. This device, based on national patent [1], is able to measure (at two second time intervals) four quantities: 1) Single phase voltage (with the accuracy of 0.5 % of full scale), 2) Single phase current (with the accuracy of 0.5 % of full scale), 3) Single phase active power (with the accuracy of 1 % of full scale), 4) The grid frequency (with the accuracy of 0.02 % of full scale). Fig. 1 The VMP20 instrument. The instrument is connected to a PC via RS232 interface. The software installed on a supporting PC (VMPCalc 2.1) is intended for additional processing of measured data (Fig. 2). This includes: a) The calculation of the reactive and apparent power, b) The calculation of the impedance, c) The calculation of the minimum and maximum values of all measured quantities, d) The calculation of the mean value and standard deviation of all measured quantities, e) The calculation of the peak power (maximum 15-minute average power), f) The calculation of the maximum 15-minute average current value, g) The calculation of the maximum 15-minute average reactive and apparent power, h) The generation of the reports for a given time interval, i) The graphical representation and visualization of the measured/calculated quantities. Based on the aforementioned, the authors have successfully tested the ability of the VMP20-based system (VMP20 instrument + PC + VMPCalc 2.1 software) to detect various disturbances in a low voltage distribution network (LVDN) [2]. Some examples are illustrated in Figs. 3 and 4. A Brief Overview of Stochastic Instruments for Measuring Flows of Electrical Power and Energy 441 Fig. 2 The basic window of VMPCalc 2.1. Fig. 3 Continual measurement of the phase voltage using the VMP20 instrument. Fig. 4 Continual measurement of the grid frequency using the VMP20 instrument. 442 V. VUJICIC, D. PEJIC, A. RADONJIC 3. THE MM2/MM4 INSTRUMENT As a result of an intensive research, in the early 2010's, the authors and their colleagues have designed two new instruments: a double three-phase power analyzer, called MM2, and a quadruple three-phase power analyzer, called MM4 (Fig. 5). Fig. 5 The MM2 instrument (left) and MM4 instrument (right). Both devices are based on national patents [1] and [3] and use a two-bit SDDFT processor [4] to process some measured data. Owing to this, one MM4 device can measure up to 70 quantities: 1) 3 voltage RMS (with the accuracy of 0.2 % of full scale) [5], 2) 16 current RMS (with the accuracy of 0.2 % of full scale) [5], 3) 12 active powers (with the accuracy of 0.5 % of full scale) [5], 4) 38 fundamental Fourier coefficients (with the accuracy of 0.2 % of full scale) [6], 5) Power grid frequency (with the accuracy of 0.02 % of full scale) [7]. Unlike the VMP20, the MM4 is connected to a PC via the USB cable. The software installed on a PC (VMPCalc 3.0) performs three-phase processing and has the ability to calculate Fryze's reactive power (RP) in the three phases and the fundamental of Budeanu's RP in the three phases (based on the measured values of fundamental Fourier coefficients). The authors have successfully tested the ability of the MM-based system (MM2/MM4 instrument + PC + VMPCalc 3.0 software) to detect, locate and measure unregistered electricity consumption. One such test was performed five years ago for the needs of the Serbian national power distribution company’s branch (formerly called “Elektrovojvodina”). In the mentioned case, along with the company's system (SYSTEM1), the additional MM4- based system (SYSTEM2) was installed as a redundant system. The key hardware elements of this system (two MM2/MM4 instruments and one PC) were placed in the substation and connected at the output of distribution transformer (Fig. 6). On the other hand, on each distant pole one energy power meter (labeled as BR on Fig. 6) was placed and connected. Thanks to such approach, it was possible to measure electricity consumption independently of the company's system. By comparing the measurement results of both SYSTEM1 and SYSTEM2, it was possible to detect and locate unregistered electricity consumption. In this particular case, we have found a huge disproportion between recorded and actual consumption (especially on the 4 th pole) (Fig. 7). A Brief Overview of Stochastic Instruments for Measuring Flows of Electrical Power and Energy 443 Fig. 6 A schematic diagram of the SYSTEM2. Fig. 7 The 96-hour measurement results obtained using the SYSTEM1 (green line) and SYSTEM2 (red line). 444 V. VUJICIC, D. PEJIC, A. RADONJIC 4. FURTHER IMPROVEMENT OF THE MM4 INSTRUMENT Among all of the above mentioned instruments, the most advanced is the MM4. It performs measurements in both the time domain (the measurement of the RMS value of the voltage/current and the measurement of the active power) (Fig. 8) and the Fourier domain (the measurement of Fourier coefficients of the input voltage/current) (Fig .9). From Figs. 8 and 9 it can be seen that the A/D conversion and MAC operations (MAC - multiply and accumulate) are extremely simple. The instrument is, therefore, simple and reliable, and it has a small number of systematic errors that can be easily identified and eliminated [8]. Fig. 8 Two-bit MAC scheme in time domain. Fig. 9 Two-bit MAC scheme in transformation domain. The first scheme is intended for measurement of the mean value of a product of two analog signals f1(t) and f2(t) (e.g. voltage and current). For that purpose, it is needed to add two uncorrelated dithers h1 and h2 (Fig. 8). In that case, the output value  will be equal to 1 2 1 2 1 0 1 1 ( ) ( ) ( ) ( ) TN i i i f t f t dt N T           (1) where T denotes the measurement interval length. The second scheme (Fig. 9), on the other hand, is intended for measuring the harmonic components (Fourier coefficients aj and bj) of the input signal f1(t). As it can be seen, the analog sum of the signals f2(t) and h2 is replaced by memorized two-bit samples of a dithered base function (DBF). For instance, if f2(t) = R2·cos(jωt), the output value  will be equal to A Brief Overview of Stochastic Instruments for Measuring Flows of Electrical Power and Energy 445 2 1 2 1 2 1 0 1 1 ( ) ( ) ( ) cos ( ) 2 2 TN j j i aR i i f t R j t dt a N T                (2) where R2 = 1 represents the DBF range, while ω denotes the fundamental frequency. Analogously, if f2(t) = R2·sin (jωt) , the output value  will be equal to sin 2 2 2 1 2 1 2 1 0 1 1 ( ) ( ) ( ) ( ) TN i R i i f t R j t dt N T                j j b b (3) In [4], it was shown that the MM4 measures all parameters necessary for calculation of the electrical power (according to the IEEE Std. 1459-2010). The whole process of signal processing is performed by two FPGA chips, which were made nine years ago. Thanks to the great advancement of FPGA technology [12], the performance of the MM4 instrument can be greatly improved. One such improvement would make it possible to use the MM4 as support for the phasor measurement unit (PMU). For instance, in [11] it was formulated and solved the problem of measuring the current power value by using four digitized samples of the voltage and current taken in the sliding half-cycle of grid frequency. The authors of [11] have shown that, for this purpose, one needs to know the values of both the fundamental and the largest odd higher harmonic. One solution to this problem is the application of four stochastic digital DFT (SDDFT) processors (Figs. 10 and 11). One SDDFT (Fig. 10) is intended to calculate the Fourier coefficients within one voltage cycle (20 ms). However, by using four SDDFT processors, which are successively "phase-shifted" by π/2 (Fig. 11), it is possible to measure the Fourier coefficients within the sliding quarter-cycle of the voltage signal (Fig. 12). Fig. 10 Optimal two-bit SDDFT processor for measuring 2M Fourier coefficients. 446 V. VUJICIC, D. PEJIC, A. RADONJIC Fig. 11 Optimal two-bit SDDFT processor for measuring i-th Fourier coefficient within the sliding quarter-cycle of the voltage signal. Fig. 12 Optimal two-bit quadruple SDDFT processor for measuring 2k+1 odd Fourier coefficients within the sliding quarter-cycle of the grid frequency. A Brief Overview of Stochastic Instruments for Measuring Flows of Electrical Power and Energy 447 Unlike the MM4, which is synchronized with the grid frequency, that varies [3], the PMU is synchronized with astronomical time that does not vary [10]. As a result, the output data from the MM4 (one quadruple SDDFT processor) may delay up to two sampling periods of the PMU, i.e. 5 ms. By embedding two quadruple SDDFT processors inside the MM4, the mentioned delay can be reduced up to half sampling period of the PMU, i.e. 1.25 ms. A special problem is the determination of the largest odd higher harmonic. It needs to be solved within a few microseconds, which is a topic beyond the scope of this paper. 5. DISCUSSION The instruments described in the previous sections enable control and monitoring the flow of electrical power and energy in a LVDN. The number of the users of electrical energy can be practically arbitrary: from several tens to several thousands. An additional advantage is the fact that MM2 and MM4 instruments are based on FPGA technology. Therefore, they can be improved without new hardware design. Some improvements in that sense were presented in [4] and [8]. The first reference describes the improvement in terms of accuracy, while the second one shows how to determine the consumer's profile (capacitive, inductive, thermogenic or mixed) and its behavior. All these features were obtained by reprogramming FPGA chips. Besides this, practical experience has shown that a PC is the most sensitive component of the system. Thus, in [9] it was suggested its replacement with a BeagleBone device [10]. On the other hand, by replacing existing FPGA chips with more advanced ones, it is possible to measure the Fourier coefficients within the sliding half-cycle of the grid frequency. Consequently, it is also possible to measure the current electrical power within the sliding half-cycle of the grid frequency. It is interesting to note that for this need it is necessary to embed at least three additional SDDFT processors, while the rest of the instrument remains unchanged. 6. CONCLUSION In this paper, we gave an overview of three instruments that have been constructed by the authors and their colleagues. Compared to corresponding commercial solutions, they provide a magnitude of order cheaper and not less reliable control of the flow of electrical power and energy. Because of their significantly lower price, they can also be used as redundant systems along to SCADA systems. One example of such system is described in this paper. Finally, the paper presents the proposal for a significant improvement of the MM4 instrument. It is based on embedding three additional SDDFT processors that are successively "phase-shifted" by π/2. This improvement is a necessary precondition for solving a significant problem in practice: determining the fundamental and largest odd higher harmonic in the power grid, which enables the calculation of the current power value. Acknowledgement: This work was supported by the Serbian Ministry of Education and Science under Grant TR 32019. 448 V. VUJICIC, D. PEJIC, A. RADONJIC REFERENCES [1] V. Vujicic and S. Milovancev, “Digitalni instrument za merenje proizvoda dva analogna periodična signala“, YU patent P-742/95, 1995 (in Serbian). [2] V. Vujicic et al., “Concept of Stochastic Measurements in the Fourier Domain”, In Proceedings of the IEEE 16th International Conference on Harmonics and Quality of Power, May 2014, pp. 288-292. [3] V. Vujicic, “Digitalni instrument za merenje harmonika“, YU patent P-628/96, 1998 (in Serbian). [4] D. Pejic et al., “Stochastic digital DFT processor and its application to measurement of reactive power and energy”, Measurement, vol. 124, pp. 494-504, Aug. 2018. [5] V. Vujicic et al., “Low Frequency Stochastic True RMS Instrument,” IEEE Trans. Instrum. Meas., vol. 48, no. 2, pp. 467-470, Apr. 1999. [6] P. Sovilj et al., “Stochastic Measurement of Reactive Power Using a Two-bit A/D Converter", In Proceedings of the IMEKO TC-4 Int. Symp. on Understanding the World through Electrical and Electronic Measurement, Sept. 2016, pp. 176-179. [7] A. Radonjic, P. Sovilj and V. Vujicic, “Stochastic Measurement of Power Grid Frequency Using a Two- Bit A/D Converter,” IEEE Trans. Instrum. Meas., vol. 63, no. 1, pp. 56-62, Jan. 2014. [8] M. Urekar et al., “Accuracy Improvement of the Stochastic Digital Electrical Energy Meter,” Measurement, vol. 98, pp. 139-150, Feb. 2017. [9] D. Davidovic et al., „Optimalni redundantni merni sistem za nadzor tokova električne snage i energije“, In Proceedings of the Energetika 2017, Zlatibor, Mar. 2017 (in Serbian). [10] https://beagleboard.org/bone [11] A. Ghanavati, H. Lev-Ari and A. Stankovic, “A Sub-Cycle Approach to Dynamic Phasors with Application to Dynamic Power Quality Metrics,” IEEE Trans. Power Delivery, vol. 33, no. 5, pp. 2217- 2225, Oct. 2018. [12] https://indico.cern.ch/event/283113/contributions/1632265/attachments/522019/720041/Zibell_How_FP GAs_work.pdf https://scholar.google.com/scholar?cluster=6392327388801746347&hl=en&newwindow=1&as_sdt=2005&sciodt=0,5 https://scholar.google.com/scholar?cluster=6392327388801746347&hl=en&newwindow=1&as_sdt=2005&sciodt=0,5 https://beagleboard.org/bone https://ieeexplore.ieee.org/author/38314883800 https://ieeexplore.ieee.org/author/38314883800 https://indico.cern.ch/event/283113/contributions/1632265/attachments/522019/720041/Zibell_How_FPGAs_work.pdf https://indico.cern.ch/event/283113/contributions/1632265/attachments/522019/720041/Zibell_How_FPGAs_work.pdf