Development of a Sub Meter for remote Energy Monitoring in Three Phase Systems

This study introduces the development of a sub meter at the Electrical Measurement Lab of BMS College of Engineering in Bengaluru India at a location that, constitutes one of the several nodes on a distribution feeder in the first floor of a seven storey building. The system, monitors the behaviour of various electrical parameters during the operation of different types of loads connected to the three phases of the node under consideration. The three phase voltages and currents are sensed in real time and by the use of efficient algorithms usingTMS320F28335 Delfino by Texas Instruments, evaluation of several electrical parameters at a sampling frequency of 20 KHz has been accomplished. An effective strategy using Arduino platform for dynamic data transmission to cloud storage and a web-based Graphic User Interface brings in the graphical visualization of the operational status of the loads and the consumption cost from any remote location. Several such units are planned at various nodes and the data of each would aggregate to measure the total consumption at the secondary of the distribution transformer feeding the building. A prototype of one such typical unit developed is presented here. Keyword-Sub-metering, Online Monitoring, GSM, Bulk Consumers


TOD
p t dt + Penalty component (1) Where,p = charge per KVA of maximum demand= fixed charges. Maximum demand is 75% of contracted demand or recorded maximum demand, whichever is higher. TOD =time of day Tariff 6am to 6pm;TOD =time of day Tariff 6pm to 10pm;TOD =time of day Tariff 10pm to 6am. The consumer has to pay the fixed charges irrespective of the energy consumption. Heavy penalty is levied on the consumer on overshooting the contracted maximum demand. Also, different rates are levied for consumption during on-peak and off-peak periods. Surveys conducted at the premises of the college reveal that the peak demand, has been steadily on the rise over the years as shown in Figure 1. The contracted demand, as per guidelines given by the utility company [1],is 650KVA,heavy penalty is levied when this value of demand is exceeded and when the overall power factor drops below 0.9.Therefore a mechanism to check the rise in maximum demand in the following years is found essential. It is seen that, during peak summer, the incoming supply voltage drops, resulting in a corresponding rise in current drawn by the connected loads leading to a significant rise in apparent power drawn. This requires attention and further action from the utility manager to vary the tap changer at the secondary end of the distribution transformer. In the present scenario, in the college premises, there exists no prior notification to keep the situations such as overvoltage, under voltage, power consumption during the peak period, low power factor etc. under check. Hence there is a need for efficient submetering units at crucial nodes of the distribution network. These units capable of monitoring, displaying the consumption, highlighting various situations such as the occurrence of low power factor, low voltage, maximum demand reaching the contracted demand, unbalance of load, overloading of the phases at the various nodes in real-time would provide valid inputs to the utility manager for efficient management of the system. The record of specific events such as under voltage, over voltage, low power factor, over a period of time would also facilitate studies to identify the causes for such events and possible remedies. The energy consumption patterns recorded and displayed for any date/time of the year facilitates evolution of effective load management through automated load management schemes. Figure.1 . Maximum demand variation over six years II. REAL TIME MONITORING SYSTEMS Most of the real time monitoring systems are IoT based used for remote monitoring of the performance. Several models of real time monitoring systems exist in literature. There are several benefits in a real-time power monitoring system. They are-• Better energy management and conservation • A better knowledge of how energy is used within a facility that allows consumers to identify an array of prospects to improve efficiency, minimize wastage, and reduce energy consumption. • Predict behaviour of loads through load profiling • Power consumption trends can forecast and notify the appropriate people when discrete equipment parameters may be exceeded, allowing users to plan ahead instead of facing an unscheduled shutdown. • Make more energy conscious decisions • Peak demand charges being expensive, bulk consumers can benefit from utilizing energy during off-peak hours and thus reduce their electricity costs. • Incorporate automation and manage systems In literature, Ramazan et al in [4] presents an energy observing system that integrates a visual user friendly interface with powerful and flexible hardware with features to archive parameters measured at critical points and transfer them to a graphical environment. Automatic meter reading methods include technologies using Power Line Carrier (PLC),Supervisory Control and Data Acquisition(SCADA), telephone modem, Internet, Ethernet, Embedded RF Module, WiFi, Bluetooth and Zig Bee, NFC and 6LOWPAN have been developed [6], [7], [8].The above methods are either expensive or require a complex set-up of infrastructure and are prone to error due to noise or weather conditions. Global System Mobile(GSM) has made wireless systems more reliable in terms of data transmission. The SIM card used for the purpose may also be utilized to send alert messages to the consumer/utility manager on occurrence of specific notable events. Most of the real time monitoring units utilize integrated chips (hardware) for evaluation of parameters associated with the signal. Co-ordination in the operation of these units is a concern. power requirement increases, there is also an increase in real estate and hence increase in size of the overall unit. This enhances the need for cooling requirements for the unit. In this work, a power Delfino processor which is the heart of the unit executes all the necessary algorithms for evaluation of the parameters before they are sent to the cloud. The generalized block diagram of the overall system developed is as shown in  The data acquisition system consists of current and voltage sensors. The data processing is carried out in the Delfino processor. The serial port of the processor is hard wired to the Arduino which is interfaced to the GSM module that uses the SIM 900A architecture. The data sent from Arduino is sent to Google docs for further analysis and visualization through the graphical user interface developed.The overall block diagram of the prototype that has been designed with the intent of gathering data of current and voltage and subsequently calculate other parameters using this data is presented in Fig. 3. The processor houses algorithms for frequency measurement and dynamic measurement of the energy consumed by various connected loads. The voltage and current sensors used have their outputs sent to a Digital Signal Processor (DSP), which executes the algorithms to calculates active power, True Power Factor, Total Harmonic Distortion (THD), true power factor and frequency in real time. Each phase of the three phase node is connected to a fixed Analog-to-Digital Converter (ADC) pin of the DSP, through a sensor and is thus identified. The values are sent to Arduino which has a Real Time Clock (RTC) module connected to it for the purpose of providing time stamp to the data. GSM module is used for communication and to upload data onto a cloud. Information from the cloud is retrieved, converted into a spread-sheet and consequently used to obtain a graphical representation of the power consumption of different devices, which is available on a URL for easy access from any location. The Graphic User Interface (GUI) is developed such that, it enables the user to view plots of recorded events such as over voltage, under voltage, low power factor, over currents, as selected by the user at any point in time, total power and energy consumption during a day, week or month, cost of consumption as on the selected date. The image of the unit developed is shown in Fig.4.

III. OPERATIONAL DETAILS OF THE COMPUTATIONAL HARDWARE
The flow chart consisting of the operational details of the hardware are as shown in Figure.5. The operational functions can be categorized into three parts namely acquisition, calculation through use of algorithms and transmission of the data serially to the Arduino. Three phase voltages and currents are sensed using sensors which are connected to the ADC pins of the DSP. Each of these values are sampled at a rate of 20KHz. Calibration of sensors has been done to obtain the actual current and voltages from the values given by ADC. The ADC pins of the DSP are unipolar, i.e. they can handle voltage from 0 to 3.3V. Hence outputs of the ADC pins must be converted to equivalent value of current and voltage which is done in the process of calibration.
Hall-effect based current sensors -ACS712 with a current range of ± 20A are used to measure the current flowing through the load. The sensor is placed in series with the load. Voltage sensors are connected across the three phase supply. The design of the voltage sensor across one of the phases is as shown in Figure.6.The GSM module used for communicating data requires Arduino Uno for its programming. Real Time Clock Module also has been interfaced to Arduino in order to timestamp the data received from DSP using I2C bus.

IV. ALGORITHMS FOR COMPUTATION OF ELECTRICAL PARAMETERS A. Frequency Measurement
The frequency measurement algorithm used is as mentioned in [9].The original signal is chosen as sinusoidal one and the output of the all pass filter through which the signal is passed giving a phase shift of 90 is used as the cosine component. The alpha and beta components are passed through a low pass filter having the transfer function . Nature of the output signals obtained when passed through low pass filter are as shown in Fig.7.It is observed that, not only the output signals obtained have the same amplitudes, but they also have the same phase shifts with respect to the input signal. Now using the identities, we get sinωT . Acos ωT ∅ cos ωT . Asin ωT ∅ = Asin∅ = (2) sin ωT . Asin ωT ∅ + cos ωT . Acos ωT ∅ = Acos∅ = (3)

Now, Equation 1 ÷ Equation 2
gives 'ωT' where 'T' is the filter time constant. Thus the angular frequency of the signal which is 'ω' and the frequency of signal 'f' in Hertz can be obtained. Thus, if the two orthogonal components of the signal are known and passed through low pass filters, frequency of the signal can be obtained.

B. Displacement Power Factor Measurement
The power factor can be defined as the cosine of the angle between the current and the voltage signals. This power factor is also known as the displacement power factor. The conventional measurement of the power factor is relevant only for loads that are linear with waveforms that are purely sinusoidal. With the increase in non-linear loads such as inverters, drives, etc. this definition of the power factor is not adequate. The true power factor refers to the measured power factor at the system frequency which is adjusted for the harmonic distortion. Thus for loads which have harmonic content, the True Power factor needs to be calculated. The theory considered for finding the true power factor involves instantaneous p-q Theory [10]. It deals with instantaneous powers p and q which are different from the conventional active and reactive powers. The details of the algorithm are as follows: For a single phase system, the quadrature axes transformations namely, alpha-beta can be done by keeping the original signal as the alpha ( in phase) component and passing the signal through an all pass filter the output of which will give the beta (quadrature axis) component. The instantaneous voltages and currents can be written in terms of the two co-ordinate system as follows.
Where 'e' and 'i' are instantaneous voltages and currents respectively. The instantaneous power is thus given by, = . * = + = + + p q Therefore, the real and imaginary part of instantaneous power 's' are denoted by p and q termed as the instantaneous active and reactive power. In matrix form p and q are given by = After finding instantaneous p and q through alpha and beta components of voltage and currents, apparent power can be calculated as = + * ; | | = + True power factor is given by

V. COMMUNICATION OF THE COMPUTED ELECTRICAL PARAMETERS
The following steps are followed in the communication of the computed data described in the earlier section, to the cloud.
1. The computed data sent by the DSP controller to Arduino is bit by bit. The data to be communicated is16 bit. Delphino transmits only 8 bit at once. The 16 bit data is split into 8 bits each as Least Significant and Most Significant Bits (LSB and MSB) with MSB read first. Arduino receives the 16 bit data and then converts both into decimal value separately. This value is transmitted. Similar computation is done for all the parameters of all the three phases. 2. GSM and Arduino are interfaced through a program [11].The flowchart is given in Fig.9. 3. Arduino and RTC interface is carried out to obtain the timestamp of the data at the time of recording. This data will also be communicated to the cloud storage and then displayed. The Google response sheets are auto generated each time the data is sampled. The delay between measurement and transmission is found to be about 2 minutes and this difference is constant for each record. 4. The GSM module uses SIM900A architecture. This module is interfaced to the cloud storage using internet connectivity through the SIM. The data sent from Arduino is sent to Google docs and this data will be used for further analysis and monitoring. 5. Different Google response forms are created for different phases and the measured data is communicated to the cloud space with minimal support of the hardware unit. This form is inspected for each of its entry point. This entry point is concatenated with the URL that auto submits the data. The URL is created in the processor using concatenation.

VI. THE WEB-BASED MONITORING
It has a dashboard developed to help visualize the variation of the monitored parameters. The online web-based monitoring has a dashboard developed to help visualize the variation of the monitored parameters. The online visualization system developed can be accessed at http://powermanagement.esy.es/Final-Project/main/one/. The GUI (Graphical Unser Interface) in the website is such that it enables the user to view real-time plots of the parameters chosen, view total consumption during a certain selected time period, get information on the remaining life of loads connected so that prior arrangements for replacement can be made.
System Integration deals with combining the units to arrive at the end prototype. The overall diagram of the integrated system is as shown in Fig.10. At time intervals of one minute the electrical parameters from sensors of each phase are acquired and uploaded on to the data cloud in the form of spread sheet. Using API (Application Programme Interface) data is pulled from the cloud and the parameters such as Voltage, Frequency, Current, True Power Factor, Low Power factor, Voltage Harmonic Distortion, Current Harmonic Distortion, Cost, Active Power and Apparent Power utilization are shown online. These parameters are stored on cloud using Google Spreadsheets. This reduces the cost of the system and at the same time provides a secure database storage. Google visualization chart query APIs were used to display dynamic plots on to user web browser. The dynamic plots are interactive which will enable user to select the time intervals for selected parameter visualization. Apart from dynamic plot visualization, the system also shows the parameters in tabular form. Notifications are important for device utility managers to monitor online the increase or drop in the parameter values beyond their nominal range. To take care of this, the system provides an interface called Voltage Notification. Under this interface the utility manager can see the record of over/under voltage events. The cost of energy consumption per phase is also determined using an interface called Cost Calculation. This interface allows utility manger to select the phase to which the load is connected and the month for which the cost of the energy consumption is calculated and displayed. The survey of the existing power visualization systems indicate that they are not customizable for the requirement of electrical device sensor data visualization. Hence an online web-based dash board was developed using Google cloud storage and chart APIs. The developed dashboard can be accessed at http://powermanagement.esy.es/Final-Project/main/one/ .

VII. RESULTS
The home page of web based power visualization system is shown in Fig. 11. The sample screenshots of the dashboard developed are shown in Fig. 12,13, 14 and 15.Itprovides a graphic visualization to the data monitored and aggregated over a day, months and year. This visualization enables the utility manager to initiate actions from his side. The most important variations noteworthy of being monitored especially for bulk consumers are the power factor and total harmonic distortion. The variation of power factor is important due to its huge impact on the current being drawn and the resulting energy cost. True power factor monitoring is important in cases of non sinusoidal current and voltage. The voltage reductions that occur in the supply mains notification are not noticeable otherwise except by the sudden increase in current drawn by the loads. The visualization facilitates, providing information to the utility manager about such occurrences.  To test the effectiveness of the THD measurement algorithm, A CFL was connected to the test bench with current sensor connected in series. The value evaluated by the digital signal processor was verified with that obtained on a mixed domain oscilloscope. The results are as shown in Fig. 19 and 20. To test the accuracy of the algorithm developed for measurement of true power factor, the results obtained were compared with that obtained by a standard power analyser equipment connected to the same mains. The deviation is as observed in the plot of Fig.20. From the results in Figures 19,18 and 21, the successful implementation of the algorithms to evaluate the electrical parameters are verified.

VIII. CONCLUSION
The need for a three phase sub-metering system in a low power distribution network is justified and the complete design of the prototype with features for measurement of various parameters explained. The results obtained show the successful implementation of the algorithms for measurement of various parameters such as RMS Voltage, RMS current, average power, frequency and true power factor. They match with that obtained from standard recording devices. The parameters gathered can be analysed further and extended for automated control of loads, such as switch-off of flexible loads during on-peak period and scheduling switch-on of various loads in such a way that the net KVA is well below the contracted demand. With the growing trend in the use of Solar Energy as part of the Smart Grid or otherwise, DC parameter sensing is of importance. This power monitoring system can also be used to sense DC parameters with additional DC current and voltage sensors. The data obtained on the dash board can further be utilized for detailed analysis using machine learning for obtaining predictive information on the behavioural trends associated with the monitored parameters that would facilitate an efficient method to manage several critical loads in the system.