Microsoft Word - Article 11 - TC4 Paper 7.docx ACTA IMEKO  August 2013, Volume 2, Number 1, 40 – 48  www.imeko.org    ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 40  Real‐time smart meters network for energy management  Giuseppe Del Prete, Daniele Gallo, Carmine Landi, Mario Luiso   Department of Industrial and Information Engineering, Second University of Naples,Via Roma 29, 81031 Aversa, Italy      Keywords: Smart Metering; Smart Grid; Power and Energy Meter; Distributed Measurement System; Real‐Time Measurement  Citation: Giuseppe Del Prete, Daniele Gallo, Carmine Landi, Mario Luiso, “Real‐time smart meters network for energy management”, Acta IMEKO, vol. 2,  no. 1, article 11, August 2013, identifier: IMEKO‐ACTA‐02(2013)‐01‐11  Editors: Paolo Carbone, University of Perugia, Italy; Ján Šaliga, Technical University of Košice, Slovakia; Dušan Agrež, University of Ljubljana, Slovenia   Received January 11 th , 2013; In final form April 27 th , 2013; Published August 2013  Copyright: © 2013 IMEKO. This is an open‐access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits  unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited  Funding: none reported  Corresponding author: Daniele Gallo, e‐mail: Daniele.gallo@unina2.it    1. INTRODUCTION  The traditional electricity distribution network has been designed essentially as a passive network that carries the energy one way: from a few big power stations to the consumption points of end users. The increased cost of energy production and the growing up of its demand require different management system, based on real-time measurements, which make more efficient its use. We are moving to an upgraded electricity network to which two-way digital communication between supplier and consumer, intelligent metering and monitoring systems have been added. These are known as smart grid paradigm [1][2]. An essential requirement for the application of smart grid approach is the development of an advanced metering network. Basically, it consists in a set of electricity meters that records consumptions of electric energy and make this information available to the grid operator and energy supplier for monitoring and billing purposes. Typically, these meters are implemented with embedded microcontrollers designed for a specific application and capable to run stand alone. In addition these meters should include a communication front-end that allows them to exchange information within a network and to communicate with external devices. Then a new generation of meters is required: smart meters [2]. In this way, the implementation of smart metering network is the first step towards the creation of a "smart grid" electricity network that can intelligently integrate the actions of all logged users: generators, consumers and prosumers (those who simultaneously perform the dual role), in order to offer efficiency with a sustainable supply of electricity, cheapness and safety. An important feature of smart metering is the possibility to make available some basic information, such as current energy absorption, with stringent time constraints that reach the real time requirements. For a full functionality, another important feature that a smart meter should have is the ability of exchanging information or services, or any part of them, with other devices, also not homogeneous. This can be implemented ABSTRACT  In this paper, an architecture of a low‐cost ARM‐based Smart Metering network is presented. The system is designed to be suitable for  Smart Grids applications aimed to a more efficient energy use according to the article 13 of Directive 2006/32/EC. The network  is  composed by several slave smart meters that continuously monitor loads and energy generators to make available information in real‐ time such as power and energy consumption/generation and several power quality parameters communicating them via CAN bus to  specific master device called data aggregator. This device, integrating the information coming from field devices (energy demands of  loads, the current energy production and co‐generator status), with information obtained through the web access (a prevision on the  expected availability of energy produced by renewable sources, current and future energy price, customer remote setting), can take  decisions to  implement a suitable energy management aimed to cost saving or whatever else strategy chosen by customer. Data  aggregator also allows checking current consumption  locally, thanks to a display, and remotely, using the web browser access. To  prevent external attacks a low computational burden protection software based on Message Authentication Code (MAC) has been  implemented.  Finally,  characterization  test  of  realized  apparatus  have  shown  good  performance  both  in  terms  of  communication  delays and measurement uncertainty.  ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 41  only on the basis of a set of open standards. The most important initiative is this field is the Open Meter project [3]. Already in 2008, the European smart metering community agreed that there were several barriers that prevented the large adoption of advanced metering infrastructures at European or global level. One of the most important barriers was considered the lack of a set of widely accepted open standards for smart metering, capable to guarantee the interoperability of both systems and devices produced by different manufacturers in the metering and control industry. This barrier was also acknowledged by the European Commission and as a response to overcome this barrier the M/441 mandate was issued by the EC to CEN, CENELEC and ETSI. The objective of the mandate is to make the development of an open architecture for utility meters involving communication protocols enabling interoperability [4]. The main aim of the Open Meter project is to specify a set of open standards for Advanced Metering Infrastructure (AMI) to support smart meters for electricity, gas, water and heat. The project's aim is to bridge the knowledge gap for the adoption of open standards for smart multi-metering equipments, smart metering functions and all prescriptive aspects; the communication protocols and data formats are also considered part of the project. The OPEN Meter project was taken as a guideline for application layer of the implemented meters [3]. In this paper a multi-meter device for smart grid applications, capable to manage the energy consumption and to communicate in real-time with decentralized control unit by means of a modified CAN protocol, is proposed. To prevent external attacks, a protection software with low computational burden based, on Message Authentication Code (MAC), has been implemented. Furthermore, the user is able to check several information as the current power/energy consumption or information on current intensity of load use, remotely, through the implemented web server in the data aggregator, and locally, through the display interface. The smart energy meter network is designed with the aim to obtain a low-cost equipment for a widespread usage. The paper is organized as follows. In section 2 the smart metering network architecture is presented. Then, in sections 3 and 4 the hardware implementation and the measurement software of the realized smart meters are shown. In section 5 the communication protocol among smart meter is described. Section 6 presents how the network is managed and, finally, section 7 show the characterization of the smart metering network, in terms of measurement accuracy and communication capability. 2. SMART METERING NETWORK ARCHITECTURE  In Figure 1, the simplified scheme of the proposed smart meter network is shown [5], [6]. It includes a master data aggregator and several slaves. The data aggregator, thanks to the implemented web server contains, in a table, information regarding:  Renewable source availability  Co-generator status,  Actual Energy prices. The first information is important because the level of energy generated by renewable sources often suffers of high time variability due to climatic changes. Therefore due to this time variability it is not possible to guarantee a specific level of power availability in a specific time. For this reason often the renewable source are used jointly with storage systems. Monitoring of the charge level of storage systems could be an additional feature of the smart meter network that is not treated in this paper but it is one of the enhancements that the authors intend to implement in the next future. For an integrated management some information regarding the co-generator are needed such as the status, thermal energy requirement, etc. Finally the data aggregator needs to know the energy price that can be updated daily or even hourly. The slave smart meters are connected to the single node of power network. Each device acquires continuously voltages and currents and it calculates power and energy consumption/generation and several power quality parameters. The master microcontroller, in addition, acquires information about energy pricing and therefore it is able to make decisions for an efficient use of the energy such as to disconnect a single load or to decide the time of use of a load. 3. HARDWARE IMPLEMENTATION OF THE SMART METER  From a functional point of view, it consists of the following blocks: i) a metering unit that tracks the energy usage of the customer and processes the billing, ii) a communication unit that enables two way digital communication with the energy company iii) a switching unit that starts and shuts down the energy supply. From a physical point of view, each equipment consists of: i) a transduction section composed by voltage and current sensors and level adapters, ii) an elaboration section that acquires the output of the sensors and processes the acquired samples, iii) a display monitoring several information, iv) a memory section which stores the billing value in an EEPROM [7]. The transduction stage and the elaboration section are described in the following subsections. 3.1. Voltage and Current Sensing Section  Voltage and current sensing section is composed a prototype of a Combined Voltage and Current Transducer (CVCT) [8], [9]. The block scheme is shown in Figure 2 and a photo is in Figure 3. As it can be seen it is made of simple electrical and electronic components and thus its cost is very Figure 1.  Architecture of the proposed smart metering network.   ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 42  low. The two sections of the CVCT take supply from voltage input: a simple half-wave rectifier and a linear regulator obtain single supply 5 VDC from 230 VAC. Voltage transducer is a high impedance resistive divider with a differential operational amplifier, current transducer is a low resistance resistive shunt with a differential operational amplifier. Input voltage is in the range 460√2,460√2 V, which corresponds to a root mean square (rms) value equal to 460 VRMS, in order to make the meter able to measure power quality parameters like voltage swells. Current input is in the range 30√2,30√2 A, which corresponds to a rms value equal to 30 ARMS. Both the outputs are in the range 0,3 V, in order to be suitable for microcontroller analog inputs; with zero inputs the outputs are 1.5 VDC. The realized CVCT has been simulated in Multisim environment. Figure 4 and Figure 5 show, respectively, inputs (230 VRMS and 15 ARMS) and outputs of the CVCT. From Figure 5 it can be seen that: 1) outputs are inverted with respect to inputs, 2) the signal becomes stationary after a small transient due to stabilization of supply voltage by linear regulator, 3) mean values are 1.5 V for both outputs. In Figure 6 magnitude and phases of the outputs, from the AC analysis simulation, are shown: it can be seen that in the range of interest for power quality analysis, i.e. until 10 kHz, frequency bandwidth of the CVCT is suitable for the application for which it has been realized. 3.2. Elaboration Section  The hardware implementation is built around a STM32F107VCT6 microcontroller, which incorporates the high-performance ARM®Cortex™-M3 32-bit RISC core operating at a 72 MHz frequency. Its main features are: 1) 256 Kbytes of Flash memory and 64 Kbytes of general-purpose SRAM, 2) Low power: Sleep, Stop and Standby modes, 3) 2 × 12-bit, 1 µs A/D converters (16 channels) with conversion range from 0 to 3.6 V and up to 2 MHz in interleaved mode, 4) 2 × 12-bit D/A converters, 5) 12-channel DMA controller, 6) up to 80 fast I/O ports, 7) CRC calculation unit, 96-bit unique ID, 8) Up to four 16-bit timers, 1 × 16-bit motor control PWM timer, 2 × watchdog timers, 9) Up to 2 × I2C, 5 USARTs, 2 × CAN interfaces (2.0B Active) with 512 bytes of dedicated SRAM, USB 2.0 full-speed device/host/OTG controller, 10/100 Ethernet MAC with dedicated DMA and SRAM (4 Kbytes) and with IEEE1588 hardware support. Figure 3.  A photo of the realized CVCT.  Figure 4.  Voltage and current at the input of CVCT.  Figure 5.  Outputs of CVCT with voltage and current input of Figure 4.  Figure 6.  AC analysis of the realized CVCT: magnitudes and phases of the  outputs.  Figure 2.  Circuit diagram of the CVCT.  R1 480kΩ R2 1.2kΩ R3 22kΩ R4 22kΩ V1 230 Vrms 50 Hz 0° C1 10µF R20 10kΩ D2 DIODE_VIRTUAL U3 LM7805CT LINE VREG COMMON VOLTAGE C2 10µF V1 V1 V1 Rload 15.35Ω Rshunt 2.5mΩ R8 14.2kΩ R7 1kΩ V1 U2A AD8032AN 3 2 4 8 1 U2B AD8032AN 5 6 4 8 7 R10 49.2kΩ R9 1kΩ V1 R5 6.6kΩ R6 1.2kΩ C3 100pF C4 150pF ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 43  4. MEASUREMENT SOFTWARE IMPLEMENTATION  In this smart meter, the elaboration section is able to calculate the following parameters: i) voltage and current rms values, ii) active power (P) and power factor (PF), iii) energy consumption, iv) power consumption profile, v) frequency, vi) voltage and current Total Harmonic Distortion (THDV and THDI) and vii) voltage dip events. As for the implemented software, it adopts on line data processing to obtain the desired quantities. For this aim, an accurate synchronization is essential because most parameters depend on the actual fundamental frequency, so frequency deviation from nominal value should be continuously monitored. The synchronization of the input sequence is implemented through: i) the hysteresis block that selects a number of samples between the first and second zero crossing and ii) least square linear regression block that rebuilds the real index position of the input samples zero crossing. Defining and , respectively, the fundamental and the sampling frequencies, 1 and 0 , respectively, the index values for the first and second zero crossing, ∆ and ∆ their residuals, adopting the mathematical relation (1) it is possible to obtain the fundamental frequency value: 1 1 ∆ 1 0 ∆ 0 (1) A section monitors dip events through rms continuous processing. Considering N the ratio between the sampling rate and the input signal frequency, the relations (2), based on the Eulero’s equation, calculate the rms values: 1 1 (2) The algorithm adopts a sliding window technique and this leads to (3): 1 1 (3) The Active Power is calculated as in (4): 1 (4) The Power Factor is calculated with (5): (5) where P is the active power and S the apparent power. Subsequently a digital re-sampling is made to obtain in exactly ten cycles of the fundamental a number of samples that is a power of two. The results of all the measurement sections are validated using flag control: flagged results are not accounted for subsequent analysis, not flagged data are grouped with reference to absolute time in order to obtain measurement with 10 min clock boundary. THDV and THDI are evaluated through Fast Fourier Transform (FFT) of voltage and current signals, after a resampling process to obtain a number of samples equal to 256 for each signal, i.e. a power of four [10]. The new samples are taken at non integer index corresponding to (6): 2 ∀ 1,…,2 (6) The integer and decimal part of the index corresponding to the k-th new sample are respectively and . The value of new samples can be calculated as in (7): ∆ 1 10 (7) where and 1 are two consecutive samples adopted to calculate , and finally the distance between and is . 5. COMMUNICATION PROTOCOL  5.1. CAN Protocol  The implemented smart meter network requires a reliable low level communication interface. Its main required features should be: i) low cost implementation, ii) noise immunity, iii) easy configuration, iv) multicast network. For these reasons, the authors chose the CAN protocol [11]. It was specifically designed to operate seamlessly even in presence of high electromagnetic disturbances thanks to the adoption of transmission signals with a balanced difference of potential. The immunity to electromagnetic interference can be further increased by using twisted pair cable type. The bit rate can be up to 1 Mbit/s to less than 40-meter nets. Slower speeds let you reach greater distances (125 kbit/s to 500 m) as in the considered case. The CAN communication protocol is standardized in ISO 11898-1 [12]. If the bus is idle, any node may begin to transmit. If two or more nodes begin to send messages at the same time, the message with the higher id (which has more dominant bits, i.e., zeroes) will overwrite other nodes lower id's, so that eventually (after this arbitration on the id) only the dominant message remains and it is received by all nodes. This mechanism is referred to as priority based bus arbitration. Messages with numerically smaller values of id have higher priority and they are transmitted first. The CAN communication was implemented by the STM32F107VCT6, in order to efficiently manage a large number of incoming message [13]. The simplified architecture of the STM32 CAN interface is shown in the Figure 7. 5.2. Practical Utilization of CAN architecture  The master data aggregator (see Figure 1) sends a message, with a “remote frame”. It is a message without information content, aimed to request a data frame from the slaves. Three transmit mailboxes are provided to the software for setting up messages. The transmission scheduler decides which ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 44  mailbox has to be transmitted first, for example the energy consumption of a single load. The message is converted by a parallel-serial converter and it is sent to the CAN TX Pin. The master receives the remote frame through the CAN RX Pin. Then, the message is converted in parallel through a serial- parallel converter. The frame is sent to an acceptance filter that is composed of 14 configurable identifier filter banks for selecting the incoming messages that the software needs and discarding the others. Two reception FIFO (First In First Out) buffers are used by hardware to store the incoming messages. Three complete messages can be stored in each FIFO. The FIFOs are completely managed by hardware. When a remote frame is received, the device sets up a response message, a data frame corresponding to the remote frame, and sends it to the other device that previously sent the remote frame. The structure of the data and remote frame is the following. The start of frame denotes the start of the frame transmission. The ID is the identifier for the data and also represents the message priority. The remote transmission request is set to dominant (zero). The Identifier extension bit and reserved bit must be dominant (zero). The data length code consists of four bits and indicates the number of data bytes (0-8 bytes). The data field denotes the data to be transmitted (0-8 bytes) and it only is in the data frame. The cyclic redundancy check, composed by 15 bits, is an error-detecting code used to detect accidental changes to raw data. The ACK slot is sent recessive (1) from the transmitter and any receiver can assert a dominant (0); the End of Frame must be recessive (1). 6. SMART METER NETWORK MANAGEMENT  6.1. Operating System  A Real Time Operating System has been implemented, to support the different operations of each smart meter. There is a main task that enables and disables all the four tasks that we have implemented [14], [15]. They are:  CAN manage to manage locally slave microcontrollers  UIP Server to manage the communication over TCP/IP protocol  Measure to measure the parameters reported in Tab. I.  User Interface to show the Power and Energy Profile consumption and manage the Touch Screen. In Figure 8 and Figure 9, respectively, the display of a smart meter with all tasks and the Power Consumption, through the task User Interface, are shown. 6.2. Communication over TCP/IP  In the data aggregator a web server collects the statistics of each household and extracts other information [15]. Through the web server, the user can remotely monitor the Power profile of a single load. For these reasons, an HTTP web server has been implemented. It can serve dynamic web pages and files from a read-only ROM file system, and provides several scripting languages. We report an example for the Power consumption request. The steps of the CGI (Common Gateway Interface) are the following: i) User clicks Power Graph, ii) Client Browser is shown, iii) Request is sent to the Web Server. The Web Server: i) Loads the UIP Packet Management Routine, ii) Check UIP Packet, iii) Starts the Routine httpd_add_call, iv) Checks the request (Power Graph). The Service Procedure of the Script is the following: i) Sends the file header.html, ii) Writes the text “Load Power Profile” iii) Calls the function Create Graph, iv) Terminates the script. In the development of Web Server application, HTML protocol is used to provide static web pages to the client . Concrete steps are: i) users, in the client browser, make a request to the web server, ii) web server will make a judgment on the request, iii) web server will transfer file directly to the client browser, iv) the header part contains the title of the website and several links to view other pages, v) the body contains the linked pages. In Figure 10 the Web Page is shown. It is possible to remotely monitor the instantaneous Power consumption of a specific load, as shown in Figure 11. Figure 7.  CAN communication device architecture.   Figure 8.  User interface for accessing to the implemented tasks.  Figure 9.  Graphical representation of the results from the executed task.   ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 45  6.3. Cyber Security  Security becomes an important issue in the new scenario of the smart grid. To maintain the steady operation for smart power grid, massive measurement devices must be allocated widely among the power grid [16], [17]. This expansion exposes more to the external attacks that can alter the load through the web server. It can create several problems, for example: disconnect a load, increasing the amount of the billing connecting the washing machine in the morning instead of the night, as the user decided to save the amount of the billing. For these reasons, it becomes fundamental to develop system control algorithms to improve cyber security of the communication network. With this aim the authors present an algorithm that does not use any encryption algorithm. The idea is to use a MAC (Message Authentication Code) used to check the message and the authenticity of the sender. The steps, as shown in Fig. 6, for the message authentication are the following:  The sender adds a Sync Code, a non-decreasing number, and a secret key, shared with the receiver, to the original message  With a hash function is calculated the MAC that the sender replaces with the secret key  Therefore the receiver replaces the MAC with the same secret key used to calculate MAC by the sender and obtains new MAC using the same hash function.  If the receiver notes that the two MAC are the same, states that the message is the original one. The Sync Code is used to verify the authenticity of the message; in fact being a non-decreasing number, an old message has a value that should be smaller than that of a new message. If the values are different, there surely were not any external attacks. 7. SMART METER NETWORK CHARACTERIZATION  The realized smart meter network has been characterized, in terms of measurement accuracy and communication performance. They are shown in the following subsections. 7.1. Characterization of measurement accuracy  In order to prove reliability of the implemented instrument, a characterization, in static and dynamic conditions, has been performed [14], [18]. The following instruments, as shown in Figure 12, were used:  Function Generator Yokogawa FG320 (Features: Dual channel output, frequencies range 1 µHz to 15 MHz, Amplitude range ± 10V, AC Amplitude accuracy ±(0.8% of setting + 14 mV), DC output accuracy ±(0.3% of setting + 20 mV)  PXI 1042 chassis with a PXI-DAQ 6123 (Features: 16-Bit, 500 kHz/ch, Simultaneous Sampling)  Pacific Power Source 3120 AMX (Features: Maximum Power: 12 kVA; ii) Frequency Range: 20 Hz to 50 kHz; iii) Line Regulation: 0.027 mV; iv) Load Regulation: 0.00135 mV; v) THD: 0.1%; vi) Voltage Ripple and Noise: -70 dB). 7.2. Static characterization  For static characterization only behavior of A/D conversion systems of microcontroller are taken into account and it is directly tested with the experimental set-up reported in Figure 12. In fact the adopted function generator has two independent output channels that can be separately configured with proper values of amplitude and phase. These signals were acquired at the same time by the two A/D channels of the microcontroller and by the A/D channels a PXI-DAQ 6123 that was adopted as reference. Through a software developed in Labview environment, it was possible to monitor and store continuously the values supplied by the generator and to obtain expected measurement results. These values were then compared with those shown on the display of the power meter. In the first set of tests a dc voltage was has been generated at different level varied with a step of 10 % of full scale range. Each test was repeated ten times. A systematic deviation was found for each input level with a Figure 10.  The web page.  Figure 11.  Power graph of a specific load.  Figure 12.  Experimental set‐up for static characterization.  ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 46  value that is within the range 0.1 - 0.8 %. Starting from the obtained results it is possible evaluate, with the least squares method, gain and offset correction parameters for each input channel. After the compensation the mean error is lower than 0.05 % and the standard deviation is lower than 0.03 %. 7.3. Dynamic characterization  For dynamic characterization, the output signals of function generator were amplified by the power amplifier, the Pacific Source 3120 AMX and the PXI measurement system was again adopted as reference value as depicted in the simplified scheme reported in Figure 13. The test sets were chosen accounting considerations reported in [14], [18]. The tests were performed in sinusoidal and non-sinusoidal conditions. In sinusoidal conditions the effects of frequency deviation and phase angle variation on active and reactive power were evaluated. The sinusoidal tests have been performed varying input parameters around rated values: frequency (50 Hz ±15%), input voltage amplitude (50% to 100 %), input current amplitude (0% to 100 %), finally the phase displacement between –π/4 to π/2. In Figure 14 and Figure 15 the percentage relative uncertainties for active and reactive powers in sinusoidal conditions are reported. In non-sinusoidal conditions, the effects of the fundamental phase angle and the harmonic order variation on active and non-active power, were evaluated. For the non-sinusoidal tests, according to [19] a fixed THD to 8% has been adopted. For each tests five harmonic components spanning between 3rd and 39th harmonic order are superimposed to fundamental tone, with fixed THD. The testing procedures is well described in [14], [18], [20], [21]. In the Figure 16 and Figure 17 the percentage relative uncertainties for active and non-active powers in non-sinusoidal conditions are reported. A summary of the obtained results are shown in the Table 1 reporting the uncertainty for each measured quantity. Figure 13.  Experimental set‐up for dynamic characterization.  Figure 14.  Active  Power  Uncertainty  Estimation  vs  phase  angle  and  fundamental frequency.  Figure 15.  Reactive  Power  Uncertainty  Estimation  vs  phase  angle  and  fundamental frequency.    Figure 16.  Active  Power  Uncertainty  Estimation  vs  harmonic  order  and  phase angle.  Figure 17.  Non Active Power Uncertainty Estimation vs harmonic order and  fundamental frequency.  Table 1. Value of the mean squared deviations in the sinusoidal and non‐ sinusoidal tests.  Quantity  Uncertainty  (sin. test)  Uncertainty   (non‐ sin. test)  Units Voltage (r.m.s.)  0.03  0.04  % Current (r.m.s.)  0.03  0.04  % Frequency  0.67  0.67  mHz Active Power  0.043  0.061  % Apparent Power  0.13  0.15  % PF (conventional)  0.002  0.002  p.u. Non Active Power  0.60  0.62  % Voltage THD  ‐‐‐  0.072  % Current THD  ‐‐‐‐  0.070  % ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 47  7.4. Network communication characterization  Distributed energy meters transfer measurement results to the data aggregator through CAN protocol. In the Figure 18 an example with two slave microcontrollers that communicates with a data aggregator is reported. They continuously acquire voltage and current and calculate several parameters shows on the display. Several tests have been performed to evaluate the transmission time. The measurement time in these tests were performed through a Tektronix TDS3012B oscilloscope. In order to check the time latency, an output bit of the DAC was used to generate a square wave as signal to acknowledge the microcontroller operation. A first test was made to calculate the delay between the instant when the master microcontroller sends the request and the instant when a slave detects an interrupt for the reception of the request. The estimated time is approximately 3.6 ms (Figure 19a). In the second test, the data aggregator requires data relating the active power to both slaves with two different priority levels. It receives the data from the slave with the highest priority approximately after 25 ms (Figure 19b) and the data from the lower priority slave after approximately 60 ms (Figure 19c). A complete analysis of the utilized protocol, in terms of communication capabilities in dependence on number of units in the network and its throughput, has been performed in [22]. Regarding the throughput, it is shown that it slightly increases when the number of devices increases from 5 to 20: when the number of devices is higher than 20 the throughput remains constant. In [22] it also reported a correlation between number of devices, latency time, throughput and payload, i.e. the length of the message. In particular, it is observed that observe that the latency time remains practically constant with payload equal 8 bytes, that is the length used in the smart meter network, and number of devices. 8. CONCLUSIONS  In this paper a smart energy meter network is presented with the aim to obtain a low-cost device for a sustainable use of electrical energy. The architecture provides a several slave smart meters connected to the single node of power network. Each microcontroller acquires continuously voltages and currents and it calculates: Level of Power , Energy consumption and several Power Quality parameters. The master microcontroller, called data aggregator, acquires information about the single load via CAN Protocol. Furthermore a web server was implemented: in addition to acquisition of the several parameters, it daily updates the energy price. With that information it calculates the amount of the billing and it is able to make decisions for an efficient use of the energy such as to disconnect a single load or to decide its time of use. However the users can locally control their consumption through the display of the data aggregator and remotely using a web browser. Metrological characterization has shown good performance. Furthermore the performed tests on communication network have shown negligible character error rate. Considering the performance and the low cost of the realized smart meter network, its application and commercialization potential may be quite high: it can be employed in domestic and industrial application in order to have real-time control on the network and to rapidly intervene in case of failures. REFERENCES  [1] T. Flick, J. Morehouse, “Securing the smart grid: next generation power grid security”, 2011 Elsevier Inc., Burlington, MA, USA, ISBN 978-1-59749-570-7. [2] K. Moslehi, R. Kumar, “A reliability perspective of the smart grid”, IEEE Trans. on Smart Grid, vol. 1, 2010, pp. 57-64. [3] OPENmeter, “Open Public Extended Network Meter”, http://www.openmeter.com/ [4] N. Arcauz, A. Goñi, M. Adriansen, B. Roelofsen, T. Schaub, F. Tarruel, B.Schumacher, “Open Meter Overview Of The Market For Smart Metering”. Open metering deliverables public report 31/1/2012, http://www.openmeter.com. [5] G. Del Prete, C. Landi, “Energy saving smart meter using low- cost arm processor”, 18th Symp. IMEKO TC4 – Meas. of Elec. Quantities Natal, Brazil, 2011. (a)  (b)  (c)  Figure 19.Time latency results in the first (a) and second (b and c) test.  Figure 18.  Example of device connection for data transmission.  ACTA IMEKO | www.imeko.org  August 2013 | Volume 2 | Number 1 | 48  [6] C. Landi, G. Del Prete, D. Gallo, “Real-time smart meters network for energy management”, XX IMEKO World Congress, Busan, Republic of Korea, 2012. [7] H. Serra, J. Correira, A.J. Gano, A.M. de Campos, I. Teixera, “Domestic power consumption measurement and automatic home appliance detection”, IEEE International Workshop on Intelligent Signal Processing, University of Algarve, Portugal, 2005, pp.128-132. [8] A. Delle Femine, D. Gallo, C. Landi, M. Luiso, “Broadband voltage transducer with optically insulated output for power quality analyses”, IEEE Instr. and Meas. Tech. Conf. IMTC 2007, Warsaw, Poland, 2007. [9] D. Gallo, C. Landi, M. Luiso, E. Fiorucci, G. Bucci, F. Ciancetta, “Realization and characterization of an electronic instrument transducer for MV networks with fiber optic insulation”, WSEAS Transactions on Power Systems, vol. 8, no. 1, 2013, pp. 45-56. [10] D. Gallo, C. Landi, N. Rignano, “Multifunction DSP based real- time power quality analyzer”, XVIII IMEKO World Congress, Rio de Janeiro, Brazil, 2006, pp. 38-43. [11] F. Moraes, A. Amory, N. Calazans, E. Bezerra, J. Petrini, “Using the CAN protocol and reconfigurable computing technology for web-based smart house automation”, 14th Symp. on Integrated Circuits and Systems Design, Pirenopolis, Brazil, 2001. [12] ISO 11898-1:2003, “Road vehicles -- Controller area network (CAN) -- Part 1: Data link layer and physical signalling”. [13] STM32F107VCT6 datasheet, http://www.st.com/st-web- ui/static/active/en/resource/technical/document/datasheet/CD 00220364.pdf [14] D. Gallo, G. Ianniello, C. Landi, M. Luiso, “An advanced energy/power meter based on ARM microcontroller for smart grid applications”, 17th Symp. IMEKO TC4, 3rd Symp. IMEKO TC19 and 15th IWADC, Kosice, Slovakia, 2010. [15] F. Ciancetta, E. Fiorucci, B. D'Apice, C. Landi, “A peer-to-peer distributed system for multipoint measurement techniques”, IEEE Inst. and Meas. Tec. Conf., Warsaw, Poland, 2007. [16] “IEEE Recommended Practice for Monitoring Electric Power Quality”, IEEE Std 1159-2009 (Revision of IEEE Std. 1159-1995), 2009, pp. c1–81. [17] A. Delle Femine, D. Gallo, C. Landi, M. Luiso, “Power quality monitoring instrument with FPGA transducer compensation”, IEEE Transactions on Instrumentation and Measurement, vol. 58, no. 9, 2009, pp. 3149–3158. [18] A. Delle Femine, D. Gallo, C. Landi, M. Luiso, “Advanced instrument for field calibration of electrical energy meters”, IEEE Transactions on Instrumentation and Measurement, vol. 58, no. 3, 2009, pp. 618–625. [19] IEC EN 50160, “Voltage characteristics of electricity supplied by public distribution systems”, CENELEC ,1999. [20] G. Del Prete, D. Gallo, C. Landi, M. Luiso, “The use of real-time instruments for smart power systems”, IEEE International Energy Conference and Exhibition, Florence, Italy, 2012. [21] IEC Standard EN 61000-4-7, “Testing and measurement techniques - General guide on harmonics and interharmonics measurements and instrumentation, for power supply systems and equipment connected thereto”, 2003. [22] S. Dridi, B. Gouissem, S. Hasnaoui, H. Rezig, “Coupling latency time to the throughput performance analysis on wireless CAN networks”, International Multi-Conference on Computing in the Global Information Technology, 2006, p. 39.