75% found this document useful (4 votes)
477 views129 pages

DLMS Example0

This thesis examines designing a system for managing electrical grids in Gaza based on power line communication carrier technology. It conducts a study of hardware, software protocols, and analyzes three similar pilot projects utilizing smart meters compliant with the DLMS/COSEM protocol. The research focuses on low-level programming to demonstrate implementing the DLMS/COSEM protocol using VB6 to communicate with smart meters and retrieve readings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
75% found this document useful (4 votes)
477 views129 pages

DLMS Example0

This thesis examines designing a system for managing electrical grids in Gaza based on power line communication carrier technology. It conducts a study of hardware, software protocols, and analyzes three similar pilot projects utilizing smart meters compliant with the DLMS/COSEM protocol. The research focuses on low-level programming to demonstrate implementing the DLMS/COSEM protocol using VB6 to communicate with smart meters and retrieve readings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 129

The Islamic University–Gaza ‫الجـبمعــــــــــت اإلســـــالميــت – غــزة‬

Research and Postgraduate Affairs ‫شئىن البحث العلمي والدزاسبث العليب‬


Faculty of Engineering ‫كـليــــــــــــــــــــت الهندست‬
Master of Electrical Engineering ‫مبجستيس الهندست الكهسببئيت‬
Communication systems ‫أنظمت االتصبالث‬

Smart Meter Reading Based on DLMS/COSEM


Protocol

‫قراءة العدادات الذكية باالعتماد عمى بروتوكول‬


DLMS/COSEM

Issa Omar Alwaan

Supervised by

Prof. Dr. Mohamed Abdelati


Prof. of Electricity

A thesis submitted in partial fulfilment


of the requirements for the degree of
Master of Engineering in Electrical of Engineering

March/2017
‫إق ـ ـ ـ ـ ـ ـ ـرار‬

:‫أنا الموقع أدناه مقدم الرسالة التي تحمل العنوان‬

Smart Meter Reading Based on DLMS/COSEM


Protocol
‫قراءة العدادات الذكية باالعتماد عمى بروتوكول‬
DLMS/COSEM
‫ باستثناء ما تمت اإلشارة إليو حيثما‬،‫أقر بأن ما اشتممت عميو ىذه الرسالة إنما ىو نتاج جيدي الخاص‬

‫ وأن ىذه الرسالة ككل أو أي جزء منيا لم يقدم من قبل االخرين لنيل درجة أو لقب عممي أو بحثي‬،‫ورد‬

.‫لدى أي مؤسسة تعميمية أو بحثية أخرى‬

Declaration

I understand the nature of plagiarism, and I am aware of the University‘s policy on


this.

The work provided in this thesis, unless otherwise referenced, is the researcher's own
work, and has not been submitted by others elsewhere for any other degree or
qualification.

Student's name: ‫عيسي عمر علوان‬ :‫اسم الطالب‬

Signature: :‫التوقيع‬

Date: 16/3/2017 :‫التاريخ‬

II
Abstract

This research project aims at designing a system for Managing


Electrical Grids based on Power Line Communication Carrier (PLCC).
A comprehensive study and investigation for the relevant hardware
equipment and software protocols is conducted. Three case studies of
similar work of pilot projects are analysed from Palestine in Gaza strip
and West bank cities. It is found that all these projects are utilizing smart
meters compliant with the DLMS/COSEM protocol, which is a world-
wide standard for automatic meter reading (AMR). However; none of
them uses locally developed software instead all of them rely on
software packages which are not only expensive but also complicate the
developing procedure, fault diagnosis and maintenance. Consequently,
we focused on the low level programming to demonstrate the
implementation of DLMS/COSEM protocol using a standard
programming language VB6. The implemented application successfully
communicates with any DLMS-Compliant meter and retrieves the basic
readings such as energy, current, and voltage along with the time stamp.

Keywords: A Power Line Communication, A Power Line Carrier


Communication, PLCC, Broadband, DLMS, COSEM, HDLC, OBIS,
Managing Electrical Grids, Automatic Meter Reading (AMR), smart
meters, smart Grid.

IV
‫الممخص‬

‫يهدف هذا المشروع البحثي إلى تصميم نظام يساهم في ادارة الشبكات الكهربائية بحيث يكون‬

‫نظام االتصاالت و نقل المعمومات عبر خطوط الطاقة نفسها(‪ ،)PLCC‬من خالل استخدام‬

‫اجهزة ذكية مثل العداد الذكي لقراءة قيم جهد و تيار و قدرة الكهرباء ووسائل واجهزة نقل‬

‫المعمومات عبر خطوط نقل الكهرباء باإلضافة الي برتوكول (‪ ،)DLMS\COSEM‬فقد تم‬

‫اجراء دراسة شاممة حول المعدات الالزمة والتحقق من البروتوكوالت المستخدمة والبرمجيات‬

‫المناسبة‪.‬‬

‫تم دراسة وتحميل ثالث مشاريع تجريبية مشابهة‪ ،‬فوجدت جميعها تستخدم العدادات الذكية‬

‫المتوافقة مع بروتوكول )‪ (DLMS\COSEM‬األقوى واأل كثر انتشا ارً في هذا المجال و الري‬

‫يعد معيا ار عالميا لقراءة العدادات األوتوماتيكية(‪ ،)AMR‬ومع ذلك فإن أي منها ال تعمل عمى‬

‫برامج مصممة محمياً بل تستخدم برمجيات جاهزة‪ ،‬باهظة الثمن‪ ،‬ال يمكن تطويرها محمياً‪،‬‬

‫صعبة التشخيص لألعطال و معقدة الصيانة‪.‬‬

‫وبناء عمى ذلك‪ ،‬ركزنا عمى البرمجة بمغة اآللة ومفردات لغة التجميع‪ ،‬لمعرفة كيفية بنية‬
‫ً‬

‫وتراكيب بروتوكول )‪ (DLMS\COSEM‬ونتمكن من استخدامه بجدارة والتواصل من خالله‬

‫مع العدادات الذكية مستخدمين في ذلك لغة البرمجة فيجوال بيسك اإلصدار السادس‪.‬‬

‫نجح التطبيق الذي أعد خصيصاً في هذا البحث نجاحاً كمياً باالتصال مع العدادات الذكية‬

‫المتوافقة مع برتوكول )‪ (DLMS‬وتم تنفيذ بعض العمميات مثل إرسال أوامر قراءة التاريخ‬

‫والوقت‪ ،‬قراءة فرق الجهد‪ ،‬قراءة التيار‪ ،‬وتم استالم النتائج بدقة لكل منها‪.‬‬

‫‪V‬‬
‫ًْ‬ ‫َ ُ َّ ّ ْ‬
‫وقل ر ِب ِزد ِِن ِعلما‬
‫]طه‪[111 :‬‬

‫‪VI‬‬
Dedication

I dedicate this work to the pure soul of my mother, who taught me how to
write and encouraged me through all my life stages.

VII
Acknowledgment
I am grateful and thankful to Almighty Allah for granting me will and strength to
reach this stage of my life.

I am deeply thankful to my supervisor, Prof. Dr. Mohamed Abdelati for his precious
efforts in supervising all research and implementation stages.

I am very thankful to Qatar Charity, SATCO Electrical Equipment Company and Mr.
Aaed Al Khalili for assistance in sourcing out smart meters and its accessories.

My gratitude is also due to Eng. Samir Mutair the general manager of the electricity
distribution company and his engineering crew for the technical support and
information they provided on Tal Al Hawa pilot project.

I would also like to thank Dr. Mohammed Al Astal for the cooperation he showed
and the information provided on Abasan Al Kabira municipality pilot project.

Finally, I would like to show my gratitude and indebted to my wife and family for
their help, support and understanding throughout the course of my study and project
activities.

VIII
Table of Contents
DECLARATION .................................................................................................... II
EXAMINERS DECISION ................................................................................... III
ABSTRACT.......................................................................................................... IV
DEDICATION ..................................................................................................... VII
ACKNOWLEDGMENT ................................................................................... VIII
TABLE OF CONTENTS...................................................................................... IX
LIST OF TABLES ................................................................................................ XI
LIST OF FIGURES ............................................................................................. XII
LIST OF ABBREVIATIONS .............................................................................XIV
CHAPTER 1 INTRODUCTION .......................................................................... 2
1.1BACKGROUND………………. .............................................................................. 2
1.2THE CLASSICAL ELECTRICAL GRID ...................................................................... 2
1.3LOCAL ELECTRICAL ENERGY SITUATION AND ITS PROBLEMS IN GAZA STRIP ........ 3
1.3.1THE ELECTRICAL GRID OF GAZA STRIP………....... ...................................... 3
1.3.2 ELECTRICAL ENERGY SOURCES IN THE GAZA STRIP……..…………...…....4
1.4TOTAL ELECTRICITY AVAILABLE AND SHORTFALL PERCENTAGE .................... 6
1.5GAZA ELECTRICITY DISTRIBUTION CORPORATION (GEDCO) .......................... 7
1.6PALESTINIAN ENERGY AND NATURAL RESOURCES AUTHORITY....................... 7
1.7PROPOSED SOLUTIONS ........................................................................................... 7
1.8RESEARCH METHODOLOGY ................................................................................... 8
1.9THESIS ORGANIZATION ........................................................................................... 9
CHAPTER 2 .................................................................................................... ….11
LITERATURE SURVEY.................................................................................... 11
2.1COMMUNICATION TECHNOLOGIES USING EXISTING GRID: ........ ………………11
2.1.1POWER LINE COMMUNICATION (PLC) ……………………................….....11
2.1.2POWER-LINE CARRIER COMMUNICATION (PLCC)…………………….... 12
2.1.3TYPES OF PLCC…………………………………………................…….....12
2.1.4ADVANTAGES AND DISADVANTAGE OF POWER LINE COMMUNICATIO…....15
2.1.5APPLICATIONS OF PLCC………………………………………………........16
2.2OFDM…………………………………………………..…………...……...18
3.2BROADBAND...................................................................................................19
2.4SCOPE AND OBJECTIVES: ..………………………………….…………………...20
2.5SIGNIFICATION ......................................................... …………………………….21
2.6LIMITATIONS …………………………………………………………………..…21
CHAPTER 3 ......................................................................................................... 25
SMART METERS AND PROTOCOLS ............................................................... 25

IX
3.1ELECTRICAL METERS: ........................................................................................... 25
3.1.1Type of meters:…………………………………………………..….......... 25
3.2 SMART METERS PROTOCOLS…………………………………………………..31
3.2.1Types of Protocols..............................................................................31
3.2.2DLMS\COSEM Protocol………………………………….………..….…31
3.2.3Four books describe DLMS\COSEM………………………..………....32
3.2.4The concepts of DLMS\COSEM communication…………..…...……32
3.2.5OBIS………………………………………………………………………..36
3.2.6HDLC frames………………………………………………………...…...37
3.2.7HDLC Operations and Frame Types:………………..………...……... 38
3.2.8I-Frames (user data): CTRL BYTE…………………………...…..........38
CHAPTER 4 CASE STUDIE………………………………………...………..41
4.1CASE STUDY NO 1: PILOT PROJECT TAL AL-HAWA - GAZA CITY.... ……………..41
4.2CASE STUDY NO 2: PILOT PROJECT MUNICIPALITY OF ABASSAN ALKABEERA: .... 47
4.3CASE STUDY NO 3: PILOT PROJECT AQRABA MUNICIPALITY – NABLUS CITY .... ..49

CHAPTER 5 ......................................................................................................... 55
EXPERIMENTAL WORK ................................................................................. 55
5.1EXPERIMENTS OF BROADBAND AS APPLICATION TECHNOLOGY OVER PLC..........55
5.1.1EXPERIMENTAL ROUTER MANAGEMENT OVER PLC .............................. 55
5.1.2EXPERIMENT OF MANAGING DELTA DEVICES OVER PLC ................... 57
5.2PREPAID METER WITH UIU USER/ CUSTOMER INTERFACE UNIT OVER PLC.. 60
5.3 EXPERIMENTAL WORK ON THE DLMS\COSEM PROTOCOL . ………………60
5.3.1 How the system works with PLCC:…………………… …….…….. 60
5.3.2 System components:………………………… ………………….….. 61
5.3.3 Experimental work steps:………………………… ……………....... 62
5.3.3.1Phase (1) Test of application GXDLMS-Director……………..…..62
5.3.3.2Phase (2) Create application IUG-DLMS-Analyzer……….............66
5.3.3.3Examples explain details for DLMS/COSEM information exchange:… 69
5.3.4 Systemsoftware screen:…………………… ……………………….. 91
5.3.5 Explanation of System software code on Appendix(A)…………..... 91
CHAPTER 6 ......................................................................................................... 93
RESULTS AND CONCLUSIONS ..................................................................... 93
6.1RESULTS AND CONCLUSIONS ............................................................................... 93
6.2FUTURE WORK ....................................................................................................... 94
THE REFERENCE LIST ...................................................................................... 96
APPENDIX ............................................................................................................ 98
APPENDIX A: INFORMATION ON APPENDICES......................................... 98
APPENDIX B: INFORMATION ON SMART METERS SPECIFICATION .. 110

X
List of Tables
Table(3.1): Open System Interconnection ................................................................. 36
Table(3.2): Frame type .............................................................................................. 39

XI
List of Figures
Figure (1.1): Planet stations ......................................................................................... 3
Figure (1.2): The Electrical Grid of Gaza Strip ........................................................... 4
Figure (1.3): Electrical energy sources in the Gaza strip ............................................. 5

Figure (2.1): OFDM in PLCC.................................................................................... 12


Figure (2.2): System Configuration Including a PLCC Transmitter (T) and Receiver
(R) .............................................................................................................................. 18
Figure (2.3): OFDM Transceiver Block Diagram ..................................................... 19
Figure (2.4): Broadband over powre lines ................................................................. 20

Figure (3.1): Traditional electrical meter ................................................................... 25


Figure (3.2): Digital electrical meter ......................................................................... 26
Figure (3.3): Electrical smart meter ........................................................................... 27
Figure (3.4): Concentrator for DLC meters ............................................................... 29

Figure (4. 1): Connection between single home with GEDCO-Smart meter\GPRS . 42
Figure (4 .2): Connection between building has multi-flat with GEDCO-concentrator
\ GPRS ....................................................................................................................... 42
Figure (4.3): Connection topology between smart meters and concentrator ............. 43
Figure (4.4):Smart meter connection ......................................................................... 44
Figure (4.5):The serial connection of Smart meters .................................................. 44
Figure (4.6): Distribution of smart meters network in Abasan Al Kabira pilot project
................................................................................................................................... 48
Figure (4.7):Connection between Smart meters for buildings and (ICT) information
communication technology center ............................................................................. 48
Figure (4.8):Type of smart meters in Abassn Al-kabeera pilot project ..................... 49
Figure (4.9):Project Chart - Aqrabaa - Nablus City................................................... 50
Figure (4.10):Main management system screen, Aqrabaa project, Nablus City ....... 51
Figure (4.11):The screen of customer information-details, Aqrabaa project, Nablus
City............................................................................................................................. 52
Figure (4.12):The screen of customer information, Aqrabaa project, Nablus City. .. 52
Figure (4.13) Distribution Grid Tree - GEDCO-DCU- Details ................................. 52
Figure (4.14): Distribution Collection Tree Remote Setting .................................... 52

Figure(5.1): Connection between laptop and router through power line 1 phase using
TP-Link power line adaptor ....................................................................................... 56
Figure(5.2):Result of command of configuration Router .......................................... 56
Figure(5.2 ): Connection between Computer and DLTA device over PLCC at the
same electric phase .................................................................................................... 58
Figure(5.4):Control board of programmable logic control lab. ................................. 58
Figure(5.5 ):Lab of programmable logic control was connecting using TP-Link
Adaptor over PLCC. .................................................................................................. 59
Figure(5.6): The result of programmable logic control experimental using software
(Delta -DCI-soft)........................................................................................................ 59
Figure(5.7): Application of managing smart meter using DLMS\COSEM Protocol 61
Figure(5.8):IUG-DLMS-Analyzer equipment ........................................................... 62

XII
Figure(5.9): Voltage and Current port connected ...................................................... 63
Figure(5.01): Addig a new device ............................................................................. 63
Figure(5.00):Gurux Start up ...................................................................................... 64
Figure(5.03): Read time ............................................................................................. 64
Figure(5.02 ):Read voltage line 1 .............................................................................. 65
Figure(5.01 ): Read current line 1 .............................................................................. 65
Figure(5.01): IUG-DLMS-Analyzer .......................................................................... 91

XIII
List of Abbreviations
AAQE Application Association Response
AARQ Application Association Request
AMI Advanced Meter Infrastructure
AMR Advanced Metering Reading
APDU Application Layer Protocol Data Unit
COSEM Companion Specification for Energy Metering
DLMS Device Language Message Specification
DS Down Stream
EEPROM Electrically Erasable Programmable Read Only Memory
HANs Home Area Networks
HDLC High level Data Link Control
IC Integrated Circuit
IEEE Institute of Electrical and Electronics Engineers
LV Low Voltage
LLC Logical Link Control
MV Medium Voltage
MPDU Model to Protocol Data Units
OBIS Object Identification System
OEM Original Equipment Manufacturer
OFDM Orthogonal Frequency-Division Multiplexing
PDU Layer Protocol Data Unit
PLC Power Line Communication
PLCC Power Line Communication Carrier
PQ Power Quality
PQDA Power Quality Data Analytics
SCADA Supervisory Control And Data Acquisition
SNRM Set Normal Response Model
TI’s Texas Instruments
US Up Stream
GEDCO Gaza Electricity Distribution Corporation
NEDCO North Electricity Distribution Company
PRIME Power line Related Intelligent Metering Evolution
FEC Forward Error Correction

XIV
Chapter 1

Introduction

0
Chapter 1
Introduction

1.1 Background

One of the biggest problems of Gaza strip is a shortage of electricity. And until now
there is no solution like as a new power station. And there is one interim solution to
this problem. This solution is the timetable for the distribution of electricity to
consumers. According to the amount of energy available, a distribution table for the
amount of electricity was organized on the neighborhoods within the cities, as further
details will be provided in this chapter. Therefore, this humble research is interested
in helping manage the solution in partially to this problem by designing a system for
Managing Electrical Grids based on Power Line Communication Carrier (PLCC).
Where utilizing smart meters compliant with the DLMS/COSEM protocol, which is
a world-wide standard for automatic meter reading (AMR).

1.2 The Classical Electrical Grid

This type of grid is a large power network for supplying electricity from suppliers to
consumers. It may consist of multi types of generating stations, some of them using
Diesel and others using gas. These generating stations produce electrical power, the
grid contain high-voltage transmission lines that carry power from distant sources to
demand centers, and distribution lines that connect individual customers as shown in
Figure (1.1)

3
Figure (1. 1): Planet stations

Main power stations may be located near a fuel source, or it might be using
renewable energy sources. Main power stations are often located away from cities.
To reach at the consumer side, the power is stepped down from a transmission level
voltage to a distribution level voltage as shown in (Figure 1.2), (Sivanagaraju, S.
2008).

1.3 Local Electrical Energy situation and its Problems in Gaza Strip

1.3.1 The Electrical Grid of Gaza Strip

The electrical grid at Gaza strip is a large power network for distributing electricity
from suppliers to consumers. It consists of one generating station using Diesel.
(www.pec.ps, Palestine Electric Company). This station produces from 40 to 120
MW electrical powers. The grid has also multiple power sources, such as the
electricity lines from Israel and Egypt (www.penra.gov.ps, Palestinian Energy and
Natural Resources Authority). The grid contains high-voltage transmission lines that
carry power from distant sources to demand centers, and distribution lines that
connect individual customers as shown in (Figure 1.2). The current state of the
electrical grid is a complex case because there are several problems:

2
- Gaza is under Israeli occupation.
- Gaza is under siege.
- Gaza is classified as a very poor region.
- Congestion of population, annually increasing number of population leading
to significant annual electricity need growth.

The aforementioned problems lead to the inability of the authorities to provide


electricity adequately.

Figure (1. 2) The Electrical Grid of Gaza Strip

1.3.2 Electrical Energy Sources in the Gaza Strip

- As shown in (Figure 1.3) Electrical Energy Sources in the Gaza Strip from
three main sources:

1
- Power station-Palestine Electric Company-(PEC) produces from 40 to 120
MW (www.gedco.ps, Gaza Electricity Distribution Corporation).
- Israel power line supplies up to 120 megawatt.
- Egypt power line supplies up to 17 megawatt.

Figure (1. 3): Electrical energy sources in the Gaza strip

Power Station

There is only one Power station owned by the Palestine Electric Company (PEC).
This station is a diesel power station located away from Gaza city. It is capable of
generating from 40 to 120 MW of electrical power. PEC was established in 1999,
with commercial operation of the power plant at 140 MW.
In June 2006, Israeli air force has done air attacks, which targeted the PEC station,
causing extensive damage, stoppage and reducing the power plant's capacity. Re-
operation of the power plant commenced in October 2006. The station currently
works at varying capacities from 40 MW to 120 MW, depending on availability of
diesel fuel. The station completely stops working sometimes when fuel is not
available due to the political circumstances explained earlier.

1
Israel Power Line

There are ten Israeli lines that supply electricity to Gaza strip. Each line carries 12
MW. These lines are distributed to different provinces. Therefore, a total of 120 MW
were supplied from Israeli lines. They are distributed as follows:
- Gaza City: 4 lines.
- North Gaza strip (Jabaliya, Beit Lahiya): 2 lines.
- Central Province: 2 lines.
- Khan Yunis: 1 line.
- Rafah: 1 line.

The power lines above are connected by agreement between the Palestinian Energy
Authority and the Israeli side. But the supervision, distribution and maintenance of
these lines are the duties of GEDCO.

Egypt Power Line

Gaza Strip gets only 17 MW from Egypt through Rafah city. The power line from
Egypt is connected based on an agreement between the Palestinian Energy Authority
and the Egyptian government. However, the supervision, distribution and
maintenance of this line are the duty of GEDCO.

1.4 Total Electricity Available and Shortfall Percentage

According to a statement made by GEDCO (www.gedco.ps, Gaza Electricity


Distribution Corporation). The total electrical power energy needed in Gaza strip is
about 450 MW. However, the available electrical power is calculated as follows;
Total of available electrical energy =40+120+17=177 MW.
So, GEDCO faces a deficit of = 450-177 = 237 MW. Therefore, the energy shortfall
percentage is about 52% of the needed electric power.
Notes: the ratio of shortfall decreases and increases depending on:
1- Variations of electrical power consumption in winter and summer.
2- Availability of diesel, sometimes the power station is turned off (siege condition).
3- Power lines connecting from Israel or Egypt may crash or disconnect as a political
decision.
Accordingly, the problem lies in the inability of GEDCO to provide electricity to
consumers, and there is one interim solution to this problem. This solution is the

6
timetable for the distribution of electricity to consumers. According to the amount of
energy available, a distribution table for the amount of electricity was organized on
the neighborhoods within the cities. Therefore, the electricity is available for 8 hours
and then cut for a period of 8 hours. This solution has caused suffering, confusion in
the lives of citizens, and downgrading to the economy.

1.5 Gaza Electricity Distribution Corporation (GEDCO)

The GEDCO has the following tasks:


First: Receiving electricity from energy sources
Second: Distributing power evenly to the Gaza strip provinces.
Third: Providing customer services, maintenance process and development within
cities.
Fourth: Collecting electricity bills.

1.6 Palestinian Energy and Natural Resources Authority

The Palestinian Energy and Natural Resources Authority (PENRA) has some roles in
solving the problem of electricity in Gaza, listed as follows:
1. The signing of the agreement with the Israeli side regarding the electricity lines
from the Israeli side.
2. The signing of the agreement with the Egyptian government regarding the
electricity line from the Egyptian side.
3. Supervising the operation of the power station.
4. Providing the necessary diesel fuel from the Israeli side or donors to run the power
station.

1.7 Proposed Solutions

Smart solutions using smart meters and DLMS\COSEM protocol applicable on


PLCC supporting to solve the problem.
The researcher suggests designing a system for managing electrical grids based on
Power Line Communication Carrier (PLCC). An extensive and deep searched is
done to utilize the DLMS/COSEM protocol and smart meters, which is widely used
in these types of applications. This study was facilitated smart meters,
DLMS\COSEM protocol, concentrators, and modems reading as well as load

7
shedding by utilizing communication through the power lines themselves. The
researcher gets this result and creating a small system that will be tested on internal
electrical grid of the Islamic university, then presented for the specialists at the Gaza
electrical distribution company. It is expected that the research results will attract
attention of decision makers. Consequently, they may implement similar idea of
project on the medium voltage lines.
Thus, in future, we propose a solution to manage distribution transformers from a
centralized control room in GEDCO.
Using the result of a project, a new electrical management system that could help to
solve problem or add a good contribution by proposing a system that is a difference
than systems that use GSM or Wi-Fi because PLCC uses the power lines themselves.
Thus saving in costs. But other systems that use Wi-Fi or GSM, utilize other network
services and need to sign a contract with service provider companies.

1.8 Research Methodology

Methodology and mechanisms followed in the project, started of researching about


the research problem, going on visits to places of pilot projects, practical
applications, monitoring, record the results at the end, aggregation and revision of the
results. The methodology followed can be listed as below:
1. Searching deeply around electrical power and its problem in Gaza Strip.
2. Attending conferences and workshops that focused on electrical power problems
and possible solutions.
3. Visiting places of projects carried out as solutions or attempts to solve the
electricity problems.
4. Studying PLCC, protocols used DLMS\COSEM and other protocols.
5. Finding all the equipment needed for the project and looking for alternative
devices.
6. Purchasing and testing equipment and devices.
7. Operating and connecting of equipment and devices.
8. More application at houses and labs.
9. Collection and revision of the results.
10. Results documenting.

8
1.9 Thesis organization

In the first chapter, an introduction is given on the electricity networks, electric


power situation and its problem in Gaza Strip, and the solution proposed in this
research.
In the second chapter, we are going to talk about the literature survey, previous
studies of the problem and related technologies, such as Power Line Communication
(PLC), Power Line Carrier Communication (PLCC), OFDM, Broadband,
DLMS\COSEM, Protocols, Software protocols, energy meter types.
In the third chapter, display types of meters, and focusing of smart meters and
COSEM\DLMS Protocol, where we used it in our experiments.
In the fourth chapter, detailed explanation is given to case studies and attempts for
smart grid in Gaza Strip, solutions that have been developed, problems and obstacles
faced in these case studies:
Case Study (1); A pilot project Tal al-Hawa - Gaza City.
Case Study (2); A pilot project Municipality of Abassan Al-kabeera.
Case Study (3); A Pilot project Aqraba Municipality – Nablus City
In the fifth chapter presents the experimental work that was done as part of this
research study.
1- Send and receive data and the Internet through 1 phase line using TP-link Power
line adaptor.
2- Connecting DELTA devices with computer and router through 1 phase line using
TP-link Power line adaptor.
3- Connecting to ISKRA smart meters using DLMS\COSEM protocol through 1
phase line using TP-link Power line adaptor.

The experimental work aimed at designing a system for Managing Electrical Grids
based on Power line Communication Carrier (PLCC). It was planned to investigate
and utilize the communication protocol. This experimental facilitate meters reading
as well as load shedding by utilizing communication through the power lines
themselves without using other networks or other communications systems such as
GSM.
Finally, in chapter 6, the conclusions and recommendations of the study are
presented.

9
Chapter 2

Literature survey

01
Chapter 2

Literature survey

2.1 Communication technologies using existing grid:

These are technologies that allow information to be carried on signals that can be
sent and received using existing electricity grid lines. Therefore, in these
technologies, many theories and principles of communications are applied. Such
fields of communications principles include, Frequency Shift Keying, Phase Shift
Keying and Quadrature Amplitude Modulation. Using these technologies, we can use
power lines for controlling systems and networks of houses.
In a given power line cable, the bandwidth varies if a change in physical parameters
like length, diameter and separation between power carrying cables. Bandwidth
increases with increase in separation between live and neutral cables but an increase
in cable length causes reduction in the channel bandwidth. While an increase in the
cable diameter makes the bandwidth to reach its maximum value at a certain
diameter and then drop off. This maximum bandwidth diameter has no effect on its
value if the cable length is changed, but if the separation between the cables is
modified to n times the present separation then the maximum bandwidth is achieved
at a diameter that is also n times the present diameter. These characteristics are of
great importance in determining the achievable maximum bandwidth within a
household. As the data rate is dependable upon the bandwidth, the maximum reliable
data rate can also be estimated using these parameters ( Akarte, Punse, &
Dhanorkar, 2014).
2.1.1 Power Line Communication (PLC)

That grid of power lines used by technology to carrying data as well as


transmitting electric power. PLC does not require a separate communication line it
used the same line of the power grid and can be easily installed. So it is connected to
various networks through a backbone network. Moreover, devices of PLC can be
connected and accessed to a system easily by plugging the power cord into an
electrical outlet. Therefore, PLC has been considered as one of the most appropriate
technologies for smart meter reading systems and automatic control systems to

00
realize advanced metering infrastructure (AMI) systems, which is an essential part of
a smart grid (Carcelle, 2009).
2.1.2 POWER-LINE Carrier Communication (PLCC).

Also known as Power line Digital Subscriber Line (PDSL), mains communication,
power line telecom (PLT), power line networking (PLN), or Broadband over Power
Lines (BPL) are systems for carrying data on a conductor also used for electrical
power transmission as shown in (Figure 2.1). ( Akarte, Punse, & Dhanorkar,
2014).

Figure (2. 1): OFDM in PLCC

2.1.3 Types of PLCC

PLC can be broadly grouped as narrow band PLC and broadband PLC, also known
as low frequency and high frequency respectively. They may also be grouped as AC
or DC. Functionally, there are four basic forms of power-line communications.
- Narrowband in-house applications: where household wiring is used for low
bit rate services like home automation and intercoms.

03
- Narrowband outdoor applications. These are mainly used by the utility
companies for automatic meter reading and remote surveillance and control.
- Broadband In-house mains power wiring can be used for high speed data
transmission for home networking.
- Broadband over Power Line: outdoor mains power wiring can be used to
offer broadband internet access, (www.eetimes.com/document.asp, What is Power
Line Communication).

PLCC can be applied based on three categories of power line:


First: Low Voltage
The low voltage power line network is a new set-up for providing an access
to high speed transmissions. The model of Broadband Power Line
Communications(BPLC) is a feasible mode to build an in-house communication
network or to access the internet. First of all, it will be beneficial to know
the typical distribution network structure and topology. The supply lines of
220/380V low-voltage supply network begin at a transformer station and then extend
over 250 meters, generally.
For example, up to twelve supply lines can lead out from the transformer station and
every supply line can feed up to 30 residential connections. The network can meet all
requirements of home automation and management system. Data broadcast over
power lines begins after the Low Voltage side of the distribution transformer, which
travels up to the customers‘ building through Low Voltage network. The Low
Voltage electrical network has become the most attractive medium for high-speed
digital communication down to an ever-increasing demand as a result of the progress
in communication and information technologies. The Low Voltage network is an
extensive spread network with the distribution transformer secondary as the central
node and many loads connected in parallel. In contrast to the other wired
communication mediums, the power line arrangement was optimized mainly for
50 or 60 Hz and was not intended for data transmission. Therefore, Low Voltage
power cables present an extremely harsh environment for high frequency signals
(Sharma, 2010).

02
Second: Medium Voltage
This system is efficiently applied in distribution automation system such as
remote reading meter, load monitoring, SCADA system etc. The medium-voltage
carrier communication system consists of medium voltage power line, data
acquisition terminal, coupling equipment and carrier modem. Electric Substation
comprises data acquisition terminals, memory unit and clock. It can read meters
automatically and store the data till transmission to with the centre substation.
Data transfer may be also possible through optical cable or phone line at the
same time. The coupling device has coupling capacitance and filters. The electric
substation carrier modem feed the signals in the mode of one to N i.e. Inside
the electric substation, the main modem communicates with a number of second
modems at the sub line.
Third: High Voltage
A High Voltage power line carrier system consists of three distinct components.
They are the terminal assemblies, the coupling & tuning equipment and the
high voltage system itself. Coupling information signals to power line through
interfacing circuits is a difficult task because power line and the communication
system operate at two distinct boundaries i.e. very low frequency and high power
for the power line and very high frequency and very low voltage and current
levels for communication channel. Coupling to power-line conductors are
accomplished by using high voltage coupling capacitors to pass the carrier
signals, while blocking 50 Hz power from the carrier equipment. The coupling
circuit must be designed such that it is capable to withstand the high power at power
line system as well as capable to prevent any damage being done to the electronic
side of the communication system. At the same time it must be reliable enough to
make certain that data bits are transported on to the power line very correctly. There
are some draw backs of high voltage PLCC including the expense of coupling and
isolation components. Isolation is required because several independent PLCC
channels are used on each line section of a large network. Since line sections
are joined at substation buses, there is a possibility for mutual interference between
PLCC signals. High levels of isolation between channels on the same frequency are
difficult to provide across substation buses. Transmitting electricity at high voltage

01
reduces the fraction of energy lost to resistance. For a given amount of power, a
higher voltage reduces the current and thus the resistive losses in the conductor.
(Sharma, 2010).
2.1.4 Advantages and Disadvantage of Power Line Communication

There are always pros and cons for applicability of a system. One should carefully go
through these factors before implementation of the particular system. The knowledge
of advantages and drawbacks helps in accepting and designing the desired technique.
The acceptance and system design are generally application oriented. Given below
are the benefits and inconvenience of using power line carrier communication.
Advantages
When we use power line network as a communication channel there are a number of
advantages. The power network reaches every socket in our homes. The power line
network has excellent geographical coverage and very good performance
characteristics as it uses existing cable infrastructure for both communication
and power which makes it an independent communication network in the world.
In power line communication network one of its main advantages is that its low
cost efficient as it makes use of existing wires and cables already installed in
our homes and no further cost has to be spent on installation of new cables,
hence it is a substitute for wireless and cable communication. It can be installed
anywhere in any home or place without any further cost on cables and installation
and it can even reach remote places where communication has not reached but
electricity is present. Hence it is a very good solution for communication
applications especially in backward places and villages (Wolf, 2012 May).
Disadvantages
In power line communication the parameters such as noise, impedance and
attenuation, are unpredictable and can change with time, frequency and place
which does not happen in case of wired communication mediums such as coaxial
cables and Unshielded Twisted Pair (UTP). Certain factors like installation and
high performance in case of power line communication are dependent on various
architectures of the electrical network being used and Interoperability problems
with different kind of equipment's is also a main disadvantage of power line
communication.

01
Power line communication does not have a set of standards and guidelines as
well as a price at which it can be used. Power line communication needs high
frequency current lines, which can operate at 50-60 Hz to 400 Hz frequency and one
of the main drawbacks is the legal restrictions on frequency bands which limit
data rates, contaminated noise is also unreliable. Power Loss in Power line
communication is directly proportional to the square of current, and also
proportional to distance. But in case of Low Voltage networks channels they are
usually hostile, unusual and unpredictable as the fact that they are designed electrical
energy transmission and not communication purposes. (Wolf, 2012 May).
2.1.5 Applications of PLCC

Most modern Power Line Carrier Communication systems operate with a carrier
frequency of 1MHz to 30MHz. Power Line Carrier Communication (PLCC) is also
used in home entertainment and Internet home appliances and its one of the
major applications is telecommunication, teleportation and tele-monitoring
between electrical various substations through high voltages power lines
operating at 110kV, 220kV, 400kV. In Power line communication the mains
wiring used for data communication as a main of a wiring network is used in
nearly every house. Hence, the installation expenses for power line communication
network involved will be reduced, compared to other communication systems. Due
to these applications power line communication results in a very good alternative for
the automation technology, especially in case of domestic applications. In today
world power-line-communication is being used for many applications to control
various systems such as street lighting or energy management systems. In
homes the so called "baby-phones" are very popular in which power line
communication is used in which low quality analogue voice signals is
transmitted through a 230V mains wiring. In comparison to the old analogue
systems used for communications, digital data which is transferred using the
power-line as communication media is a very useful alternative for domestic
applications, particularly for devices which are already connected to the mains
(e.g. Washing machines or refrigerators, linked together for energy management (Li,
& Jia, 2008, November). Power line communication saves the biggest part of
installation costs, if it is used in buildings where electric wiring is already

06
present hence no need for wiring separately for communication. Hence power
line communication meets the customers‘ needs for low cost. Indoor power line
communication should not be mixed with outdoor power line communication as both
are different from one another regarding the availability of frequency bands and the
maximum signal levels. The result of Experiments we were done indoor power line
communication is capable of transmitting information at a rate of 2.1 Mbps
(megabits per second) at a very low cost, on the other hand, wireless testing at the
same time and the same devices (modem, computer) the result was 1.8 Mbps.
For domestic applications, this rate of data transmission is good enough as in most
of the cases in domestic applications the devices have to transmit only control
signals such as on/off, dimming values etc. (Krishna, Siddhartha, Kumar, & Jogi,
2014).
Power line carrier communications (PLCC) used as a way to solve many of the
problems associated with inverter-based islanding prevention methods. When the
PLCC signal is lost, the receiver can command the inverter(s) to cease operation, or
it can open its own switch to isolate the PV inverter and load from the PCC. PLCC-
based islanding prevention could facilitate the use of PV as a backup power supply
because the receiver could disconnect the customer from the PCC with a utility
signal without deactivating the inverter itself. This possibility could enhance the
value of PV and other distributed generation to the utility and to the customer.
It is possible to use an existing utility PLCC signal for islanding prevention, without
interfering with its normal utility use and without decoding the information in the
signal. The PLCC methods are currently used to load shed with signals sent from the
utility to non-critical loads during periods of high loads and is used today in areas
where there are high population density and industrialized customers. Alternatively,
the automated meter reading is using signals sent from the customer to the utility in a
small number of distribution areas. To be effective in this scheme, the PLCC signal
should have three characteristics. First, it must be sent from the utility end to the
customer end. Several PLCC systems used for automatic meter reading use a signal
that is sent only from the customer end to the utility end. These could be used as part
of a harmonic detection scheme as previously described, but obviously not as a
PLCC-based continuity test of the line. Second, the signal should utilize a continuous

07
carrier. If the carrier is intermittent, the ability to use it as a line continuity test is lost,
because it is not possible to differentiate between a loss of signal due to a break in
the line and a loss of signal due to the cessation of transmission without decoding the
signal. Also, the use of a continuous carrier makes the system essentially fail-safe, in
that a failure of the transmitter or receiver results in a loss of the PLCC signal that
would cause a PV inverter shutdown. Third, the signal should be one that will
propagate well throughout the distribution network to which PV inverters are
connected. Because the series inductances of transformers will block any high-
frequency signals, this requirement will necessitate the use of low-frequency signals.
Sub-harmonic signals would be preferred, as these would propagate easily
throughout the system and would not be mistakenly produced inside an island except
under highly abnormal conditions.

Figure (2. 2): System Configuration Including a PLCC Transmitter (T) and Receiver (R)

They used smart meters, DLMS\COSEM protocol, Concentrates, modems to get new
results, and making a new electrical management system to solving the problem or
added a good contribution off Evaluation of islanding detection methods for
photovoltaic utility interactive power systems (PVPS, 2002).

2.2 OFDM

An Orthogonal Frequency Division multiplexing (OFDM) system consists of a


transmitter and a receiver as shown in (Figure 2.3) and (Figure 2.4) An OFDM
transmitter modulates the data to be transmitted then converted from serial to parallel

08
N sub-carriers. Inverse Fast Fourier Transform (IFFT) is performed on each sub-
carrier data to convert it to time domain and a cyclic prefix is added . (Anatory,
Theethayi, Thottappillil, Mwase, & Mvungi, 2009).

Figure (2. 3): OFDM Transceiver Block Diagram

Figure (2. 4 ): OFDM Transceiver Block Diagram

2.3 broadband

In 2004 The National Telecommunications and Information Administration (NITA(


define BPL or Broadband over Power Line, is an Internet over high voltage
transmission lines approach. The BPL connection is proposed but has not yet been
released, as they study interference.

09
NTIA identified three different network architectures used by BPL equipment
vendors.
System #1 employs Orthogonal Frequency Division Multiplexing (OFDM) to
distribute the BPL signal over a wide bandwidth using many narrow-band sub-
carriers. System #2 also uses OFDM as its modulation scheme, but differs from
System #1 in the way it delivers the BPL signal to the subscriber‘s homes. System
#3 uses Direct Sequence Spread Spectrum (DSSS) to transmit the BPL data over the
MV power lines.
So we can define Broadband over power lines (BPL) as high-speed Internet access
anywhere, anytime that is what we've increasingly come to expect in the 21st-century
information age (Krishna, Siddhartha, Kumar, & Jogi, 2014). BPL is solution to join
old telephone wiring or the room to internet or expensive for a telecoms company to
provide broadband, also called EOP (Ethernet over power) a way of piping
broadband to your home and channelling it from one room to another using the
standard electricity supply as shown in (Figure 2.5).

Figure (2. 5): Broadband over powre lines

2.4 Scope and Objectives:

This research project aims at designing a system for Managing Electrical Grids based
on Power line Communication Carrier (PLCC). It is planned to investigate and utilize

31
the DLMS/COSEM protocol, which is widely used in these types of applications.
This study will facilitate Smart meters reading as well as load shedding by utilizing
communication through the power lines themselves. The system will be developed
at the Islamic university where it will be tested on its internal electrical grid and then
presented for the specialists at the electrical distribution company. It is expected that
the research results will attract attention of decision makers; consequently, they will
implement the project on the medium voltage lines. Thus, we propose a solution to
manage distribution transformers from a centralized control room.
So, the following explanatory paragraph as an example to understand the relationship
between concepts of a project and its component PLCC, smart meter,
DLMS\COSEM protocol, Concentrates, modems and System for Electrical Power
Management in the Distribution Grids.
2.5 Signification

A new System for Managing Electrical Grid, using PLCC and the following
component and technology: Smart meters, DLMS\COSEM protocol, Concentrators,
and Modems. to get a new result, by applying a new electrical management system
that should be help to solving the problem or add a good contribution different than
system using GSM or WI-FI because PLCC used the line grid themselves, then get
less cost, but other system using WI-FI or GSM, they used other network and need to
sign a contract with other company according to its conditions.
2.6 Limitations

One of the biggest problems of Gaza Strip is the diminution of electricity. GEDCO
can‘t provide electricity to Gaza Strip24/7 for the following reasons:
1- Weakness in the Central power generation capacities.
2- Citizens don't pay their bills.
3- Electricity loss in public power line.
4- Illegal stealing for electricity in Gaza strip from some customer.
So GEDCO needs a computerized communication system to transferring control
signal and data through the high voltage and medium voltage to controlling of
extra transformer smart meter and to distribute electricity equally hours over all
Gaza Strip areas, as cut/plug the current.

30
Also, GEDCO often cannot control the main power network because:
1- The main transformer was built in Gaza border of the hot point with Israeli
army, so in most cases, to access these areas they need long time each
requires the process of security coordination and intervention through
international Red Cross (www.gedco.ps, Gaza Electricity Distribution
Corporation).
2- Natural disasters and rain caused the closure of the main streets.

Here the communication technology & PLCC is too necessary to control of power
over power lines and transformer as cut/plugging the current as needed maintenance
process. The methods and technology that are used in GEDCO depend on
traditionally electricity distribution as the following:
1- Generating of electricity from Central power generation.
2- Buying electricity through the high voltage lines from Israeli.
3- Import electricity from Egypt.
4- Connecting the available electricity through the previous three points to the
major distribution transformers (central transformers).
5- Distributing Electricity from the central transformers to medium adapters.
6- The power distribution transformers from big and medium size adapters into
smaller ones inside the larger neighborhoods.
7- Electricity distributed from micro-transformers within neighborhoods to
subscribe, consumers across sub cables.
8- Smart meters or special hours calculated the value of electricity that is
consumed monthly.
9- The employees of GEDCO monthly will read the value consumed from
meters and multiply it in 0.5-NIS to calculate it and print the bills.

2.9.1 Disadvantages of the previous methods for managing electrical grid.


The previous process is very rudimentary so it has the following disadvantages:
First, for dealing with consumer:
1- A number of subscribers does not pay monthly bills.
2- Electricity theft easy from subscriber.

33
3- Unable to connect/disconnect electricity remotely to the consumer at an
emergency event but it is done manually.
4- Don't knowing instantaneous consuming and unable to monitoring the value of
consumption specific subscriber.

Second, for dealing with power network (central transformer & sub
transformer).
1- Tuning transformer connection was handled by an employee using switch
adapters or contactor, so it is impossible to do it in some cases such as the fear of
war and bombing at border areas, and difficult in cases of floods.
2- This process is very cumbersome in the case of distribution electricity evenly,
where the company cutting power of transformer from specific area and link
power to different area as a periodic timetable to be equally distribution
electricity for areas.
3- In the case of transformer power load less than required electricity, it will cause
an overload of the transformer so drop and cutting electricity, and in case
transformer power load over than needed electricity, it will it will lose electricity
without using.

32
Chapter 3

Smart meters and

Protocols

31
Chapter 3

Smart meters and Protocols

3.1 Electrical meters:

There are many types of electrical meters, Electrical smart meter, Traditional
electrical meter and Digital electrical meter, so in this research, we focus on the first
type, Electrical smart meters as a part of problem solution
(http://www.energyineducation.ie, How to Read Your Electricity Meter).
3.1.1 Type of meters:
1. Traditional or Mechanical electrical meter.

The reason of use electrical meters is to account for electrical consumption, and
determine the cost.

Figure (3. 1): Traditional electrical meter

2. Digital electrical meter

The reason of using Digital electrical meter is:


1- To account of electrical consumption, and determine cost as prepaid quantity.
2- Help customers to rationing consumption.
3- Stopping consumption without paying.

31
Figure (2.3): Digital electrical meter

3. Electrical smart meter.

We can define Smart meter as a new kind of gas, water and electricity meter that can
digitally send meter readings and data to your energy supplier and can used for
monitoring and management consumption processing, also its receiving variable
update, order commands control. This can ensure more accurate energy bills. Smart
meters also come with monitors, so you can better understand your energy usage.
Smart meters can be single phase or three-phase or poly phase and it can be with
integrated GSM/GPRS modem. The whole current meter allows for direct connection
of three-phase wiring with loads up to 120A. The smart meter using DLMS\COSEM
protocol is a simple, speedy installation procedure. An optional switching device for
remote client disconnection can also be installed. Remote reading by Sentinel
software online.
Some kinds of smart meters like as ISKRA MT375 working on Three Phase Electric
Smart Meter with GSM Modem (Whole Current) has several functions that make
power management system too easy to serve the customer.
Smart meter using DLMS\COSEM Protocol to connect with power management
system.
The reason of using smart meters is to control of electrical consumption, an attempt
to provide electricity 7/24, management of grid using technology that gives higher
efficiency solutions for the power grid problems.

36
Examples for electric smart meters used in pilot project in Gaza Strip:
Example (1): ISKRA ME372 Single Phase Smart Electric Meter with GSM
Modem.
The ME372 is the UK Standard single-phase smart meter with built-in GSM/GPRS
modem for AMR

Features

 built in GSM/GPRS modem


 100 Amp (BS5685) OFGEM approved
 accuracy class 1 (MID B)
 Import and export, both active and reactive power
 Pulse output
 Highly accurate class 1 accuracy
 Integrated real time clock backup
 RS485 (optional)
 Optical interface IEC 62056-21 mode C protocol
 Event logging for tamper detection
 Integrated switch

Figure (3. 2): Electrical smart meter

37
Product Description:

The ME372 is the OFGEM approved UK Standard single-phase smart meter with
built-in GSM/GPRS modem for AMR. The ME372 will record a half-hourly load
profile of energy consumption and energy generation. This telemetry and the total
meter reading are sent remotely by SMS or GPRS communication. Configuring the
meter for AMR and setting the meter‘s parameters can be done locally through the
optical communications port, or remotely when fitted with a SIM card and using the
manufacturer‘s parameterization software. Remote reading by Sentinel software
online.
Example (2): ISKRA MT375 Three Phase Electric Smart Meter with GSM
Modem.
The main features of MT375 is the UK Standard poly-phase smart meter intended
for industrial and commercial metering, This meter is the three-phase equivalent of
the ME372 with integrated GSM/GPRS modem and The whole current meter allows
for direct connection of three-phase wiring with loads up to 120A.

Example (3): ISKRA P2LPC Data Concentrator for DLC meters.


The main features of P2LPC is works with the ME371 DLC single phase and
MT371 DLC Poly Phase family of meters to communicate and collect data across the
low voltage network in compliance with the DLMS/COSEM communication
protocol. The concentrator can communicate with a data collection facility using a
range of different communication options, including GSM/GPRS, PSTN, ISDN, and
Ethernet. The P2LPC is ‗plug and play‘ so that it can automatically discover and
install meters on the DLC network. Up to 1024 meters can be installed on each DLC
meter network, supported by a single P2LPC Data Concentrator. (Arzberger, Dieper,
Dirnberger, Dornseifer, Frank, & Liebezeit, 2012).

38
Figure (3. 3): Concentrator for DLC meters

Example (4): Holley DTSD5RS Three Phase Electronic Meter specification:


- lace of Origin: Zhejiang, China (Mainland)
- Brand Name: HOLLEY
- Model Number: DTSD545
- Display Type: Digital Only
- Phase: Three Phase
- Accuracy Class: 0.5S
- Output Voltage: 220v/230v/240v
- Operating Temperature: -25℃~70℃
- Dimensions: 298.7mm*170mm*78.8mm
- Standard: IEC62053-21, KEMA
- Pulse Constant: 1000~10000 imp/kWh
For more specification details see appendix (B)

39
Figure (3. 4(Holley smart meter

21
3.2 Smart meters Protocols
3.2.1 Types of Protocols

There are several types of protocols related to smart grids most widely used are:
 DLMS/COSEM: Device Language Message Specification/ Companion
Specification for Energy Metering
 PRIME: Power line Intelligent Metering Evolution
 Meters and More
 G3-PLC
 OSGP : Open Smart Grid Protocol
3.2.2 DLMS\COSEM Protocol

As we have said previously it is planned to investigate and utilize the


DLMS/COSEM protocol, which is widely used in these types of applications. This
study will facilitate smart meters reading as well as load shedding by utilizing
communication through the power lines themselves, to solve a problem Electrical
Power Management in the Distribution Grids.
- DLMS layer
Device Language Message Specification. A layer that accesses the COSEM objects,
to construct and transport the messages, a generalised concept for abstract modelling
of communication entities, DLMS is responsible for data transport
(http://www.dlms.com, DLMS User Association)
- COSEM layer
Companion Specification for Energy Metering. This is an object model that
implements revenue and smart meter various registers and functions, such as tariff,
load profile, max demand, and energy registers, etc... It is an application layer data
modelling as well as rules for data identification by means of Object Identification
System (OBIS).

What is DLMS/COSEM?
- An object model, to view the functionality of the meter, as it is seen at its
interface(s).
- Identification system for all metering data.
- A messaging method to communicate with the model and to turn the data to a series
of bytes.

20
- A transporting method to carry the information between the metering equipment
and the data collection system.

- The DLMS/COSEM standardization framework is based on the principle of one


common data model and application layer, used over a range of communication
media. This principle reflects the fact that the data model standards are driven by
the Table of Open System Interconnection communication standards are driven by
technology evolution. As shown in Table (1.1).
- DLMS/COSEM specifies the COSEM data model, the DLMS application layer
protocol and communication profiles. It continuously evolves to meet new
requirements. It is the only global standard for meter data exchange adopted by
global, regional and national standards organizations (http://www.dlms.com,
DLMS User Association)
3.2.3 Four books describe DLMS\COSEM
The Blue Book Specifies the functional data model of the meter as seen through its
interfaces. Using the object oriented approach, it specifies COSEM objects that
interact with each other to realize the functions required. The objects – and the data
they hold – are identified by the OBIS codes.
The Green Book Specifies how to access data and how to transport the resulting
messages over the communication media. DLMS application layer services allow
establishing secure associations between applications running in meters and central
systems, and accessing COSEM objects to read / write data and execute actions
remotely. Pull and push operation is supported. The Green Book also specifies how
application data and messages are protected using cryptographic algorithms.
Communication profiles specify how DLMS/COSEM is used over various
communication channels and media. Lower protocol layers use widely accepted
international standards.
The Yellow Book Specifies abstract conformance test plans and the testing and
certification process.
The White Book Contains a glossary of terms that help understanding the
specification.
3.2.4 The concepts of DLMS\COSEM communication

23
A main concepts and knowledge of DLMS/COSEM are needed to communicate with
Devices.

1- The Physical Device

Our meter is a Physical device it has a unique physical address, A physical address is
the hardware-level address. Physical address. is often referred to as its MAC (Media
Access Control) address. It‘s had six bytes long and consists of six hexadecimal
numbers.

2- The Logical Device

A physical device hosts one or several Logical Devices. Like as electricity or gas
meter. Each logical device has an address, called the logical device address. Each
physical devices has management logical device must has at least description of all
the logical devices available in the physical meter, with their logical addresses and
names.

3- The COSEM Classes and object instances

Logical device is container for COSEM object, attributes and methods. The first
attribute of each object is its Logical Name.

4- The Logical Name

A logical name is another name for OBIS code its consists of a string of 6 values
defined according OBIS.

5- The Association object

Each logical device contains at least one object of class Association


LN or Association SN. Has an attribute (attribute 2) called the object list containing
the list of all objects available in the logical device. Furthermore, the association
object has the predefined logical name 0.0.40.0.0.255. Therefore, we can find out
what objects are available in a logical device just by reading its object list.

22
6- The most important elements of devices

1- Each physical device has a management logical device, at address 1.

2- A management logical device hosts a list of all the available logical devices
in the physical device. This list is the second attribute of the object of
class SAP Assignment, with the predefined name 0.0.41.0.0.255. Each list
item consists of the name and the address of a logical device.

3- Each logical device hosts a list of all its available objects. This list is the
second attribute of the object of class Association, with the predefined name
0.0.40.0.0.255. Each list item consists (among others) of the logical name and
the class of an object.

4- The Client-Server(requests \ responses) model. The application is the client


sends requests, and the meter as server answers responses.

5- System addressing. Each side of the connection has an address.

6- Connecting the layers. There are 3 layers of the HDLC profile are
the Physical layer, the HDLC layer and the Application layer.

7- The physical layer. Physical layer is the lowest layer, It is the layer 1 in the
OSI model. It boils down to a simple (3-wires) serial cable between a
COMM. Port of PC and the appropriate connector of meter.

8- The HDLC layer. HDLC layer is next layer.MAC addresses is most important
are the HDLC-addresses. The client MAC address is a byte value, it identifies
the client. We will use 16 (decimal) which means a public client.

The meter MAC address is divided in two parts:

 The upper part is the logical device address.

 The lower part is the physical device address.

21
9- HDLC layer, the client address is always a byte, the server address consists of
two parts and there are three variants:

 One byte addressing. There is just an upper address. It is a byte value.

10- Two bytes addressing. There is an upper address on 1 byte and a lower
address on 1 byte.

 Four bytes addressing. There is an upper address on 2 bytes and a lower


address on two bytes.

Note that not all manufacturers support the three variants.

7- The Application layer

The Application layer is last layer. After having connected the physical layer and the
HDLC layer, we have to connect the Application layer. If users of system send
an Association request they expect an Association response.

Application Association REquest (AARQ request)


This is the first command must be started for all connections and device types.
Telling the device if authentication is used and whether Long Name or Short Name
reference is used. The packet can be generated with AARQRequest method and it
uses UseLogicalName and Authentication properties so make sure these are set to
correct values. AARQ sent by the client application layer to the server application
layer.

8- Application Association Response (AARE request)

Once the full reply is received parse it with ParseAAREResponse method. This
method sets the relevant settings to the GXCOSEM component and return a
collection of manufacturer specific tags if there was. AARE sent by the server
application layer to the client application layer.

21
9- Reading Profile Generic objects

The request is generated using ReadProfileGenericData.


Notes :
1- If row indices are used the logical name of the first column must be null.
2- DLMS Application component may supports HDLC Addressing by 1, 2, 4
Bytes and can communicate using HDLC, TCP/IP or UDP. It supports
Lowest, Low and High Level authentications. Both Long and Short Name
Association Types are supported.

OSI Model
Data unit Layer Function DLMS/COSEM
Network process to Application like
7. Application
application GXDLMSDirector

Data representation,
encryption and decryption,
Host 6. Presentation convert machine dependent COSEM
Data data to machine
layers
independent data

Interhost communication,
5. Session managing sessions between DLMS
applications
End-to-end connections,
Segments 4. Transport DLMS
reliability and flow control

Path determination and


Packet/Datagram 3. Network
logical addressing
Media
layers HDLC or IEC
Frame 2. Data link Physical addressing
62056-47
Media, signal and binary Gurux Media like
Bit 1. Physical
transmission Serial, TCP/IP
Table(3. 1): Open System Interconnection

3.2.5 OBIS
The Object Identification System makes it possible to identify the data items used in
common electricity metering equipment. The main advantage of OBIS is the
definition of a unique code for data of interest in energy measurement. The general
structure of the obis code is composed by six values as hexadecimal numbers
(A,B,C,D,E,F) Every single value has a range and a standard definition that makes
possible to uniquely identify data items. It is also possible to identify proprietary
codes for manufacturer specific purposes. Standard codes cannot be reused from

26
manufacturers with different meaning, on the other hand, an object defined by a
manufacturer may be standardized if its use is of common interest. With the OBIS
code even the tariff rates can be exchanged between meters and a remote host
(Attianese, Del Giudice, Landi, Paciello, & Pietrosanto, 2013).
3.2.6 HDLC frames

HDLC frame can be transmitted synchronous or asynchronous serial communication


links. Those links have no mechanism to mark the beginning or end of a frame, so
the beginning and end of each frame must be identified. This is done by using a
frame delimiter, or flag, which is a unique sequence of bits that is guaranteed not to
be seen inside a frame. This sequence is '01111110', or, in hexadecimal notation,
0x7E. Each frame begins and ends with a frame delimiter. A frame delimiter at the
end of a frame may also mark the start of the next frame. A sequence of 7 or more
consecutive 1-bits within a frame will cause the frame to be aborted (Bormann,
1999).

When no frames are being transmitted on a simplex or full-duplex synchronous link,


a frame delimiter is continuously transmitted on the link. Using the
standard NRZI encoding from bits to line levels (0 bit = transition, 1 bit = no
transition), this generates one of two continuous waveforms, depending on the initial
state:

Frame format

Figure (3. 6): Frame format

The image above shows a standard HDLC frame format type 3, according to Clause
H.4 of ISO/IEC 13239: 2002. ISO/IEC 62056-46 specifies this frame format further:

 The SOF SYN and EOF SYN flags are always 0x7E. When sending consecutive
frames, the EOF SYN of a frame may be used as the SOF SYN of the next frame.

27
 The FRAME FORMAT field is 2 bytes in length. It contains 4 bits indicating
the format type (in this case type 3: 011010), one segmentation bit and 11 bits
indicating the frame length.
 The address fields DEST ADDRESS and SRC ADDRESS are both 2 bytes in
length. Addressing is described in paragraph 4.7.1 of ISO/IEC 13239: 2002.
 The control field CTRL is one byte and is described in paragraph 6.4.3.2 of the
described part 46.
 The header check sequence field HCS is 2 bytes in length.
 The INFORMATION field may be any sequence of bytes and in the case of a
data frame it will contain the MAC Service Data Unit (MSDU).
 The frame checking sequence field FCS is 2 bytes in length.
The result is:

Figure (3. 7): Frame checking sequence result


Now we can locate MAC frames in a data stream. Spotting 0x7E is easy, giving
rough points to split up the data-stream into parts. Of course, the frame format field
will be a good way to check whether the frame is correct or has been cut down too
much. After that, the information field can be taken out and examined further as
shown in (Figure 2.3)
3.2.7 HDLC Operations and Frame Types:

There are three fundamental types of HDLC frames.

 Information frames, or I-frames, transport user data from the network layer. In
addition, they can also include flow and error control information piggybacked
on data.
 Supervisory Frames, or S-frames, are used for flow and error control whenever
piggybacking is impossible or inappropriate, such as when a station does not
have data to send. S-frames do not have information fields.
 Unnumbered frames, or U-frames, are used for various miscellaneous purposes,
including link management. Some U-frames contain an information field,
depending on the type (Bormann, 1999).

3.2.8 I-Frames (user data): CTRL BYTE

. The sub-fields in the control field define these functions.


The least significant bit (first transmitted) defines the frame type. 0 means an I-
frame. Except for the interpretation of the P/F(Poll/final) field, there is no difference

28
between a command I frame and a response I frame; when P/F is 0, the two forms are
exactly equivalent (Simpson, 1994).
Some types frame
93// frame type SNRM (Set Normal Response Mode).
73// frame type UA (Unnumbered acknowledge).
10// frame type I frame,

Explanation how can I read frame type?

For Example: how SNMR = 93


From (Table: 2) SNRM = 100P 0011 when Poll is 1 SNMR will be = 1001 0011
these number from binary so, 0011 = 3 in Hexadecimal and 1001 = 9

Binary 1001 0011


Hexadecimal 9 3
Table(3. 2): Frame type

29
Chapter 4

Case Studies

11
Chapter 4
Case Studies

4.1 Case Study No 1: Pilot project Tal al-Hawa - Gaza City

GEDCO decided segmentation problem to be solved through several ideas, as


creating a pilot project for supplies of electricity 24 hours daily as follows:
The project was implemented as a sample of 160 Houses +32 buildings in the area
(Tal al-Hawa - Gaza City). The Electricity connected for eight hours 220 V, capacity
of 20 A. It's increased or decreased depending on availability of electricity from the
power plant. Electricity is then connected in the next eight hours or rest of the day
with a 220V capacity of 2 Amps Using smart metering and controlling system.
1. The executing agency:

Department of customer services, Electricity Distribution Company


2. Reasons of implementing this pilot project:
- Daily Power outages for customers, so it is intended to supply customers with
electricity for 24 hours at least at a rated current of 2 amps.
3. Project goals
- Trying to manage and control the power grid by computerized way.
- Supply customer of electricity 24 hours at least of 2 A at specific area of the
project.
- Studying the possibility of applying the idea to the whole electricity grid in
the Gaza Strip.
4. Steps and implementation mechanism:
- Step (1)- The company allocated Tal al-Hawa district to be the targeted area
of the project implementation as following: the project was implemented of a
sample of 160 House everyone have one smart meter, but 32 building in the
area every building have from 20 to 24 flats. So, every building has one smart
meter called Concentrator and every flat has one normal smart meter.
- Step (2)- Drawing geographical maps of the buildings in place.
- Step (3)- Building a technical executive team.

10
- Step (4)- Installing smart meters for all houses (160 house, every house has
one a smart meter that contains SIM card connected with the GSM network
(jawwal mobile network) As shown in Figure(4.1),Figure(4.2)
- Step(5): Installing smart meters types Iskra ME372 single phase and MT372
3-phase to all 32 buildings, every building has from 20 to 24 flats. So every
building has one meter - smart meter called Concentrator and every flat has
one normal smart meter. All smart meters for each flat into main distribution
board were grouped and connected in electricity sequentially-with serial
number - and connected to the concentrator. As shown in Figure(4.3)

Figure (4. 1): Connection between single home with GEDCO-Smart meter\GPRS

Figure (4. 2): Connection between building has multi-flat with GEDCO-concentrator \ GPRS

13
Figure (4.3): Connection topology between smart meters and concentrator

12
Figure (4.4):Smart meter connection Figure (4.3):The serial connection of Smart
meters
-
- Step (6)- In the case of each house separately.
They gave the smart meter static IP, the IP address is the same as the SIM
card number, and linked all smart meters through GPRS SIM card with
computer software system using TCP.
- Step(7)- In the case of the building has many flats, they gave each smart
meters a static IP which started from no.18 mandatory as shown in Figure(
4.3) and next smart meter has the next number and so on. Then connected all
smart meters to be reached serially, through port has an AP title where the
first two slot are input and last two slot are output. Then they connected the
first smart meter with concentrator, then linked the concentrator through
GPRS with computer software system using data line technology, that
connected with static IP to GEDCO server (computer software system) that
has public IP, connection based on VPN technology.
- Step (8)- Administration and process control of smart meters started by the
computerized system (GEDCO server (computer software system).
5. Protocols and software:
- They used DLMS\COSEM protocol, and Demo software from Iskra
company, HDLC, RS485.

11
6. Testing of the system
- When power provides 20 amp capacity, the system seems normal, over a
period of 8 hours, but when a power outage the system works on supplying
electricity of capacity 2 amperes, where smart meters was programed.
- Activation system operations control and management process to serve
subscribers.
7. Disadvantages and Troubleshooting

Problem (1)- In some houses, smart meters lose contact with the system. As a result
of the following disadvantages:
1. Mismatched place smart meters (electricity room) underground. So, connection
to the GSM network is very weak, and it is sometimes lost. This causes a
problem in communication for the smart meters.

Solution 1: The system tries to reconnect with concentrator or smart meters several
times, and technical team starts maintenance of defects.
2. When the power failure and returned some smart meters lose contact to the
system for up to 20 minutes.

Solution 2: The system tries to reconnect with concentrator or smart meters several
times, and the technical team starts maintenance of defects. Or maintenance team
must restart the transformer.

Problem (2)- Some smart meters when converting from 20 A to 2 A keep an


electrical connection process capacity of 20 Amps, and vice versa; respectively.
Solution: Maintenance team must cut off the power and turning on the transformer.

Problem (3)- The smart meters were programmed to work with schedule time as
follows:
From 7 am until 15:00 by capacity of 20 A
From 15:00 until 23:00 by capacity of 2 A
From 23:00 until 7:00, by capacity of 20 A
So, any change of schedule time turning off / turning on the transformer, even just
minutes smart meters doesn't work correctly with the system.

11
Solution: Sorry, there is no real solution, but maintenance team try turning off /
turning on the transformer. So the smart meters must be upgraded.

Problem (4)- Connection between smart meters and control system through DATA
LINE - GSM (external network communication) causing slow to contact, especially
when it reconnect after a failure case.
Solution: There is no real solution, they looking for a solution as another
communication method within a different system like as PLCC between smart meters
and transformers using concentrators on transformers. or updating generation to G3.
Problem (5) - The system Rreads and controlling through SMS messages, so it's too
expensive.
Solution: Provide communication and control by another system.
Problem (6) Smart meters used ISKRA ME372 single phase and MT372 3 phases
made by ISKRA company production that must connected sequentially with
concentrator. So, if cutting wire any of them, the contact will be lost with other smart
meters.
Solution: Smart meter type must be upgrade.
Problem (7)- The subscriber can‘t figure out the capacity of power by amperes
automatically. So, it causes confusion and breakdowns in electrical equipment in
houses.
Solution: System must be updated.
Problem (8)- Crews executive inexperienced.
Solution: 1- Training of technical and engineering teams globally or in partnership
with the Department of Electricity in universities.
2- Partnership with local specialized companies.
Problem (9)- There is no similar previous projects.
Solution: Activation scientific research.
8. The results:
1. The system did not achieve the desired goals.
2. The project was stopped.

16
4.2 Case Study No 2: Pilot project Municipality of Abassan alkabeera:

A pilot project implemented Under supervision Municipality of Abassan alkabeera:


The project implements to Energy conservation through monitoring and control of
government and public buildings as follows:
1. Beneficiaries of the project:-

The project is implemented on a lot of buildings (government and public buildings


like police station, hospital, schools) Electricity arrived for eight hours 220 v,
capacity of 20 amps. Electricity arrived next eight hours 220v capacity of 2 amps.,
They are planning to use GSM, smart meters, management software system to
conserving of Energy through monitoring and control
The goal of pilot project:
- Increase energy efficiency
- Taking into consideration that smart meters will be able to work in the future as
ON-grid with solar energy and generators.
2. The steps that have been implemented until now:

Step(1) They Allocated Abassan Alkabeera to implement the project as shown in


Figure (4.6) as a following:
The project is implemented on a sample Determine target building as 60 public
buildings everyone have one smart meter.
Step (2) Built a technical executive team.
Step (3) Drawing geographical maps of the buildings in place.
Step (4) Determine expected consumption energy of each building.
Step (5) Develop a plan and measures to reduce energy consumption and save energy
consumption.
Step (6) Survey (by Densitometer transmitter) degree transmitter network GSM, to
positioning place of smart meters that have GSM chip.
Step (7) Tender Awarded to supply provider of Smart meters required type
ISKRA382 3Phase and 1Phase. As shown in Figure(4.8)
For more specification of Smart meters ISKRA382 3Phase and 1Phase see appendix
(B)

17
Figure (4. 4): Distribution of smart meters network in Abasan Al Kabira pilot project

Figure (4. 5):Connection between Smart meters for buildings and (ICT) information
communication technology center

18
Figure (4. 6):Type of smart meters in Abassn Al-kabeera pilot project

The protocol used to communicate with the smart meters DLMS\COSEM using GPRS.
The decision maker in the project contracted with supplier of smart meters and software
system to supply and follow up.
3. Results:
1. The project under processing.

4.3 Case Study No 3: Pilot project Aqraba Municipality – Nablus City

North Electricity Distribution Company (NEDCO) decide to develop an electrical grid


through re-management and update equipment, as creating a pilot project for full control and
management of electricity 24 hours daily as follows:
The project was implemented on a sample of 20 building in the area (Aqraba - Nablus City).
as shown in Figure (4.9)
1. The executing agency:

Department of customer services, North Electricity Distribution Company


(NEDCO).
2. Project equipment specification
1- PRIME FCC PLCModule Specification, see appendix(b)

19
3. ESEP project Chart:

Figure (4. 7):Project Chart - Aqrabaa - Nablus City

4. Project goals
- Trying to manage and controlling the power grid by computerized way over
PLC.
- Studying the possibility of applying idea on the overall electricial grid in west
bank.

5. Steps and implementation mechanism:


Step (1) The company Allocated Aqraba district to implement the project as a
following:
- The project was implemented on a sample of 20 building.
- Every building has one electrical prepaid meter(Holley2).

11
- Then add PLC modem-Built-in RISECOMM PLC MODEM, the modem
connected with user interface unit (UIU) in the same building by FSK/PLC
technology.
- the prepaid meters connected to the grid by PLCC using DCU device with
Powerline Intelligent Metering Evolution –PRIME.

Step (2) Installing Concentrator on transformer (DCU PRIME FCC PLC Module).
Step (3) connected each DCU contain SIM card GPRS network (jawwal mobile
network).
Step (4) administration and Process control of smart meters started by the
computerized system (Nablus Electricity Distribution Company server).
6. Protocols and software:
- They used FSK\PLC, PRIME protocol, and enterprise software from
HOLLEY LTD, RS485,GBRS
7. Testing of the system
- The system was tested over 20 building with 4 DCU only as a pilot project.
- The system operations control and management process was a successfull.
8. Management System screens

Figure (4.8 ):Main management system screen, Aqrabaa project, Nablus City

10
Figure (4.9 ):The screen of customer information-details, Aqrabaa project, Nablus City.

Figure (4. 10):The screen of customer information, Aqrabaa project, Nablus City.

Figure (4. 11) Distribution Grid Tree - GEDCO-DCU- Details

Figure (4. 12): Distribution Collection Tree Remote Setting

13
9. disadvantages and Troubleshooting
1- Problem of communication and loss of communication for the DCU may
happen.
2- PRIME protocol has high Forward Error Correction (FEC) (Hoch, 2011).So,
it will be using a large number of SMS, and this is very costly.
Solution: DLMS\COSEM Protocol can solve problem of using a large number of
SMS causing by Forward Error Correction that happens with PRIME protocol
(Corchado, Manero, Cortés, Sanz& Díez 2016).
10. Results:
1- The project under development.

12
Chapter 5

Experimental Work

11
Chapter 5

Experimental Work
5.1 Experiments of Broadband as Application Technology over PLC.

Broadband broadly categorized into two types :


1. Access Broadband
2. In-house Broadband

In Low Voltage broadband over power lines (BPL), a wide range of power-line
communication technologies are needed for different applications, ranging from
home automation to Internet access. The BPL systems utilize electric power lines not
owned, operated or controlled by an electricity service provider, such as the electric
wiring in a privately owned building. Broadband devices are connected to the in
building wiring and use electrical sockets as access points the only thing that the user
has to do is plug the modem into the socket and connect it to the computer. In-
-house BPL systems use the electrical outlets available within a building to transfer
information between computers and other home electronic devices and appliances,
which eliminate the need to install additional wires among devices. Electrical
Companies can use broadband for system data communication needs
 Automated metering.
 Voltage control.
 Remote equipment monitoring.
 Energy management.
5.1.1 Experimental Router management over PLC

Experimental Router NETIS management using Broadband as application


technology over PLC that manage the router option using operating system Microsoft
windows 7 and internet protocol version 4 TCP/IPv4.
Experimental work steps:
1- Plug first TP-link Ethernet adaptor into a common wall socket, (a BPL modem
is plug_and_play)
2- Plug first TP-link Ethernet adaptor an Ethernet modem.

11
3- Plug second TP-link Ethernet adaptor into another a common wall socket, in
same phase.
4- Connect the second TP-link Ethernet adaptor cable running to laptop and access
to modem through it.
5- Using TCP/IPv4 connects to modem and using HTTP web manages it. Type
command http://192.168.1.1 , then start to managing process.

Figure(51 .): Connection between laptop and router through power line 1 phase using TP-
Link power line adaptor

Figure(5 .2):Result of command of configuration router

16
The Result:
The experiment in-home was successfully repeated with the following observations:
- The signal quality decreased in-home because of many electrical devices
works on the electrical network.
- Length of the distance between modems
- In the case of connected with a direct cable, a successful experiment was
carried out on a 200 meter.( I have investigated actually.)
5.1.2 Experiment of managing DELTA devices over PLC

PLC network for the programmable logic controllers at the automation lab.
Experiment of managing DELTA devices using Broadband as application
technology over PLC that manage the DELTA devices option and operations order
using operating system Microsoft windows 7, ladder programming language and
internet protocol version 4 TCP/IPv4.
Experimental works steps:
1- Plug first TP-link Ethernet adaptor into a common wall socket, (a BPL modem
is plug_and_play)
2- Plug first TP-link Ethernet adaptor an Access point adaptor.
3- Connect all DELTA devices with Access point as shown in (Figure 4.3), (Figure
4.4).
4- Plug second TP-link Ethernet adaptor into another a common wall socket, in
same phase.
5- Connect the second TP-link Ethernet adapter with the cable to the laptop.
6- Give all one IP address in the same class as for example the first DELTA device
IP address 10.10.18..190
7- Give the Access point IP address 10.10.18.1
8- Give the laptop IP address 10.10.18.199
9- Using TCP/IPv4 protocol connect Access point.

17
10- Managing and controlling system using a command of ladder programming
language.

Figure (5. 3): Connection between computer and DLTA device over PLCC at the same electric
phase

Figure (5.4 ):Control board of programmable logic control lab.

18
Figure (5. 5):Lab of programmable logic control was connecting using TP-Link Adaptor over PLCC.

The Result of experimental:

 The experiment in the lab was successfully done.


 All boards of programmable logic control lab in the Islamic university was connecting
together using TP-Link Adaptor over PLCC and connect wireless to computers using the
Access point as shown in (Figure 4.5).
 The devices were connected without needing to a wired computer network, therefore
saving in costs.
 Students can manage, connect, and conduct experiments as shown in (Figure 4.6).

Figure (5. 6): The result of programmable logic control experimental using software (Delta -DCI-soft).

19
5.2 Prepaid meter with UIU or CIU User/ Customer Interface Unit over
PLC

- The User interface unit (UIU) device works by contact with the prepaid meters
over PLC on the same electrical phase line.
- The UIU observe Instantaneously update values in prepaid meters such as
current, voltage, balance.
- The connection between UIU and prepaid meter use DLMS\COSEM protocol.
5.3 Experimental work on the DLMS\COSEM Protocol

A new System Managing Electrical power grid by PLCC. Using Holley DTSD5RS
Three Phase Electronic Meter, DLMS\COSEM Protocol, OBIS code, converter
modules from USB to RS485 and Visual Basic6.
5.3.1 How the system works with PLCC:

Firstly computer communicates with smart meter by sending AARQ command and
receive AARE, through the converter from Comm.Port to the RS485 and then via
power line to smart meter by using OFDM over broadband.
Experimental of managing smart meters devices, (Holley DTSD5RS Three Phase
Electronic Meter) using DLMS\COSEM Protocols over Broadband as application

61
technology for PLCC that manage the Electrical power smart meter devices option
and operations order using OBIS code as shown in (Figure 4.7)
5.3.2 System components:

Figure (5. 7): Application of managing smart meter using DLMS\COSEM Protocol

Application file called :IUG-DLMS-Analyzer, DLMS\COSEM protocol, OBIS code,


Holley DTSD5RS Three Phase Electronic Meter, converter module from USB to
RS485, electrical power, computer with operating system and vb6.
1- Application specification:
- Application name : IUG-DLMS-Analyzer
- Application type: Controlling and management application.
- Application command: command of visual basic 6 Programming language.
- Application protocols : DLMS\COSEM
2- DLMS\COSEM protocol specification: according type IEC62052-11

60
3- OBIS code: comply with smart meter registers and DLMS\COSEM protocol.
4- Holley DTSD5RS Three Phase smart meter as shown specification at 2.6.1
example (4).
5- Computer specifications: computer has CPU Corei3, USB 3 port, RAM 2 GB,
OS Windows7 and Visual basic 6.
6- Converter modules from USB to RS485 specification: A module converts from
USB to RS485.
5.3.3 Experimental work steps:
5.3.3.1 Phase (1) Test of application GXDLMS-Director
1- As shown in (Figure 4.7), (Figure 4.8) configure computer Operating system
Microsoft windows 7, Visual basic 6 programming language and Comm. port3 as
communication port.
2- Plug the Smart meter (Holley DTSD5RS Three Phase Electronic Meter) with 1 of
phase port cable then to a common wall socket.
3- Plug first RS 485 connector with port 23,24 in smart meter and the second with
converter module from USB to RS485 into computer Figure (4.8).

Figure (5. 8):IUG-DLMS-Analyzer equipment

63
Figure (5.9 ): Voltage and Current port connected

4- Setup GXDLMSDirector Application file and run the application short name
GURUX.
Note(1): GXDLMSDirector open source application but we didn‘t find Holley
devices in devices list. So we developed the application by changing specifications,
functions and parameters, then added Holley LTD Devices into GXDLMSDirector
Application file.
5- Click on file menu and Choice add Holley device as show in (Figure 4.10).

Figure (5. 10): Addig a new device

6- Click connect command button as show in (Figure 4.11).

62
Note(2): In first connection GXDLMSDirector read all register OBIS code for all
object devices in smart meter or device. And classified them to gather packet
information from the device.
.

Figure (5. 11):Gurux Start up

7- Test Application command button for example read time.

Figure (5. 12): Read time

61
Figure (5. 13):Read voltage line 1

Figure (5. 14): Read current line 1

Remember that You will get information just if connection was successfully
done.
Note (2): GXDLMSAnalyzer is Demo application.

61
- Experimentally, Gurux system sending the instructions to make start connection
processes, reading time, date, voltage and disconnect, and receiving the response for
every process separately.
- Protocol communication and negotiation are done Using HDLC frame and OBIS
code, then decoding from HEX to decimal.
- Interpreted the code using information assume in the four books that describe the
protocol.
5.3.3.2 Phase (2) Create application IUG-DLMS-Analyzer

Creating application IUG-DLMS-Analyzer using Visual Basic6 programming


language uses the instructions to connect from register directly through protocol
DLMS\COSEM and OBIS.
As we said on note(2) above GXDLMSAnalyzer is Demo application, therefore we
can‘t apply all operations management system. So, created a new application using
programming language visual basic 6 was done, that used DLMS\COSEM protocol
and OBIS code to contact with registers of smart meters to do full control
management system as a following:
1- System installation and connection
1- As show in Figure(5.8) configure computer Operating system Microsoft
windows7, Visual basic6 programming language and Comm.port3 as
communication port.
2- Plug the Smart meter (Holley DTSD5RS Three Phase Electronic Meter) with 1 of
phase port cable then to a common wall socket.
3- Plug first RS 485 connector with port 23, 24 in smart meter and the second with
converter module from USB to RS485 within the computer.
4- The communication between Computer system software using Comm. Port 3 and
DLMS\COSEM, IPV4 and HDLC will done by ICE62056-21E mode
2- Running and testing the system
1- Run visual basic 6 Application file that is named as IUG-DLMS-Analyzer.
2- Click on initialization connect command button.
3- Click on SNMR connect command button.
4- Test other command button for example read line 1 voltage, Read current inst.
and Read date and time.

66
5- Read Date\Time
6- Read voltage
7- Disconnect
8- Using DLMS/COSEM does change, update, read, write and manage the smart
meter.
Remember that: You will get information just if connection was successfully
done.

3- Operating procedures for IUG-DLMS-Analyzer Application expect to do the


following Functions:
1- Energy measurement.
2- Demand measurement.
3- Monitoring.
4- Controlling
5- Management
4- Starting IUG-DLMS-Analyzer

IUG-DLMS-Analyzer application use DLMS/COSEM instructions and commands is


written to simplify communication with DLMS/COSEM devices. Describe and
specify the component that you can easily manage DLMS/COSEM devices, by using
the data connection, and the manufacturer of your choice. The Application interfaces,
instructions, commands, and methods are describing how does the experiment work.

A. Connection Initialization
1- Click the connection initialization button.
 Connection defining Comm.Port values: Z is the most important part of the
device and is defined in a single number:
 MSComm1.CommPort = 3
 MSComm1.Settings = "9600,n,8,1"
 MSComm1.RThreshold = 1
 MSComm1.PortOpen = True
 OLD = 0
 n=0
2- Command Send DLMS\COSEM connection message.

67
3- IUG-DLMS-Analyzer application will use serial Comm.Port3 Plugin with
converter module to connect with other smart meter in the system then
communication start.
4- The protocol handshake before starting to communicate using DLMS protocol,
Initializing serial connection (7E A0 07 03 21 93 0F 01 7E).

The Received data message( 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06
01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E)
5- Command message Send AARQ request(21 10 FB AF E6 E6 00 60 1D A1 09 06
07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF
FF E7 25 7E)
6- The Received data message (7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06
07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08
00 06 5F 1F 04 00 00 10 1C 01 90 00 07 28 73 7E).
B. Application Association REquest (AARQ request)
This is the first command must done for all connections and device types. Telling the
device if authentication is used and whether Long Name or Short Name reference is
used. The packet can be generated with AARQRequest method and it uses
UseLogicalName and Authentication properties so make sure these are set to
correct values. AARQ sent by the client application layer to the server application
layer.
C. Application Association Response (AARE request)
Once the full reply is received parse it with ParseAAREResponse method. This
method sets the relevant settings to the GXCOSEM component and return a
collection of manufacturer specific tags if there was. AARE sent by the server
application layer to the client application layer.
D. Reading Profile Generic objects
The request is generated using ReadProfileGenericData.
Notes:
1. If row indices are used the logical name of the first column must be null.
2. DLMS Application component may supports HDLC addressing by 1, 2, 4 Bytes
and can communicate using HDLC, TCP/IP or UDP. It supports Lowest, Low
and High Level authentications. Both Long and Short Name Association Types
are supported.

68
5.3.3.3 Examples explain details for DLMS/COSEM information exchange:

Example (1): SNRM/UA frame exchange with HDLC parameter negotiation


Sent frame: 7E A0 0F 03 21 93 D7 E4 81 80 03 06 01 80 6B 66 7E

7E A0 0F 03 21 93 D7 E4 81 80 03 06 01 80 6B 66 7E

Header check sequence from byte 1 to 6


LLC From 06
byte 9 to 11 paramet
Frame type where define in OBIS code list

Destination address (server) lower

called er
Source address (client) 0x01

Logical Link identifier


Frame type SNRM

Control, , 01 is
Frame length

HDLC address 0x0011

format the
identifier, length of
group next
identifier, byte of 6B 66
group paramet Frame
length. er check
Group identifier sequence
length , 80
means No. lengths From 15 to
of byte of max. a 17 HDLC
next.= 03 characte frame
(12,13.14) r could closing will
receive byte 17 flag
From byte 1 to 8 called HDLC header of closing

69
For more details see the following tables of examples:
Example (1): SNRM/UA frame exchange with HDLC parameter negotiation
Sent frame: 7E A0 0F 03 21 93 D7 E4 81 80 03 06 01 80 6B 66 7E

No. Byte Byte Frame type Explanation


No. content
1 1 7E HDLC frame opening flag 7E is constant flag has two cases, first
when comes the first byte of frame
called opening flag, second when
comes end of frame called closing flag
2 2,3 A00F frame type and length A0(Hex) = 160 (Dec) frame type
where define in OBIS code list. 0F
(Hex) = 15 in (Dec) frame length

From byte 1 to 8 called HDLC header


means No. of byte nextA0. From byte
3 to 17
3 4 03 destination address (server) destination address (server) lower
lower HDLC address 0x0011 HDLC address 0x0011 // upper HDLC
address is the default (1)

4 5 21 source address (client) 0x01 21// source address (client) 0x01


5 6 93 frame type SNRM (Set Normal 93// frame type SNRM (Set Normal
Response Mode) Response Mode), 73// frame type UA
(Unnumbered acknowledge), 10//
frame type I frame.
information field with HDLC
parameters not present, defaults are
proposed
6 7,8 D7 E4 Header check sequence check sequence from byte 1-6
7 9,10,11 818003 format identifier, group L Group length means No. of byte
identifier, group length L next.= 03 (12,13.14)
C From byte 9 to 11 called Logical Link
Control
8 12,13,14 060180 parameter identifier/length 06 parameter identifier, 01 is the
/value – maximum information length of next byte of parameter
field length receive identifier, 80 lengths of max. a
character could receive
15,16 6B 66 Frame check sequence From 15 to 17 HDLC frame closing
8 17 7E HDLC frame closing flag will byte 17 flag of closing

71
Received frame:
7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01
53 3B 7E
No. Byte No. Byte content Frame type More details
1 1 7E HDLC frame opening flag opening flag
2 2,3 A01E frame type and length A0(Hex) = 160 in (Dec) frame
type where define in OBIS code
list. 1E (Hex) = 30 in (Dec)
frame length means No. of byte

From byte 1 to 8 called HDLC header


next A0. From byte 3 to 32
3 4 21 destination address destination address (client)
(client) 0x01 lower
0x01
4 5 03 source address source address (server)
(server) lower HDLC lower HDLC address
address 0x0011 0x0011
5 6 73 frame type UA 93// frame type SNRM (Set
(Unnumbered Normal Response Mode), 73//
acknowledge) frame type UA (Unnumbered
acknowledge), 10// frame type I
frame.

6 7,8 C37A Header check sequence check sequence from byte 1-6
7 9,10,11 818012 format identifier, group L (81) format identifier, (80)
identifier, group length L group identifier where define in
C OBIS code list, Group length
means No. of byte next from
byte 12 to 29, where 12 (Hex) =
18 in (Dec)
8 12,13,14 050180 parameter identifier, (05) parameter identifier, (01) is
length, value – the length of next byte of

maximum information parameter identifier, 80 lengths

field length transmit of max. information transmit.

9 15,16,17 060180 parameter identifier, (06) parameter identifier, (01) is


length, value – the length of next byte of

maximum information parameter identifier, 80 lengths

field length receive of max. information receive.

10 18,19,20,21, 07040000000 parameter identifier, (07) parameter identifier, (04) is


22,23 1 length, value – the length of next byte of

window size transmit parameter identifier from byte


20 to 23,size transmit (01)
11 24,25,26,27, 08040000000 parameter (08) parameter identifier, (04) is

70
28,29 1 identifier/length/value the length of next byte of
– window size receive parameter identifier from byte
26 to 29,size receive (01)
12 30,31 533B Frame check From 15 to 17 HDLC frame
sequence closing will byte 17 flag of
13 32 7E HDLC frame closing flag closing

Example (2) : AARQ/AARE exchange


AARQ request, Sent frame:
7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E
01 00 00 00 06 5F 1F 04 00 00 10 1C FF FF 5B 10 7E
No. Byte No. Byte Frame type More details
content
1 1 7E opening flag 7E is constant flag has two
cases, first when comes the
first byte of frame called
opening flag, second when
comes end of frame called
closing flag
2 2,3 A02B frame type A0(Hex) = 160 in (Dec)
From byte 1 to 8 called HDLC header

and length where define in OBIS code


list frame type. 2B (Hex) =
43 in (Dec) frame length
means No. of byte next A0.
From byte 3 to 45
3 4 03 destination destination address (server)
address
lower HDLC address 0x0011
(server)
// upper
4 5 21 source address 21// source address (client)
(client) lower
0x01
5 6 10 frame type I 93// frame type SNRM (Set
frame Normal Response Mode),
73// frame type UA
(Unnumbered acknowledge),
10// frame type I frame.

6 7,8 FBAF Header check check sequence from byte 1-6

73
sequence
7 9,10,11 E6E600 format L (E6) format identifier, (E6)
identifier, L group identifier where define
group C in OBIS code list, Group
identifier, length (00)
group length
8 12,13 601D AARQ tag and (60) AARRQ tag, 1D (Hex)
length
= 29 (Dec) is the length of
sub frame from byte 14 after
(AARQ and length) to byte
42 before Frame check

sequence bytes.

9 14,15,16,17,18, A1090607 Application This application association is


608574050 context name established with lowest level
19,20,21,22,23,
80101 tag, length security, so authentication
24
and encoded components are not present
value

10 25,26 BE10 (BE) tag of (BE) tag of AARQ, 10 (Hex) =


AARQ, (10 ) 16 (Dec) is the length of sub
length for
frame from byte 27 after
AARQ user
(AARQ tag and length) to
field.
byte 42 before Frame check

sequence bytes.

11 27,28 040E encoding the (04) encoding the choice for


choice for user-information (OCTET
user- STRING, universal), 0E (Hex)
information
= 14 (Dec).
(OCTET
is the length of sub frame
STRING,
universal) and from byte 29 after (AARQ
length tag and length) to byte 42
before Frame check sequence

bytes

12 29 01 tag for xDLMS-


Initiate
request

13 30 00 usage field for


dedicated-key

72
component –
not used

14 31 00 usage field for


the response
allowed
component –
not used

15 32 00 usage field of
the proposed-
quality-of-
service
component –
not used

16 33 06 proposed proposed DLMS version


DLMS version number used from frame
number 6 check sequence

17 34,35 5F1F tag for used from frame check


sequence
conformance
block

18 36 04 length of the used from frame check


sequence
conformance
(04) (Hex) = 4 (Dec), length
block of the conformance block from
byte 37 to 40
19 37 00 encoding the
number of
unused bits in
the bit string

20 38,39,40 00101C conformance


block

21 41,42 FFFF client-max- FF (Hex) =255 (Dec) that


receive-pdu-
means client of protocol data
size
unit PDU can receive 255

character from every Byte.

22 43,44 5B10 Frame check From 15 to 17 HDLC frame


sequence
closing will byte 17 flag of
13 45 7E HDLC frame
closing
closing flag

71
AARE Request, Received frame:
7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00
A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 1C 01 90 00 07 28 73 7E
No. Byte No. Byte content Frame type More details
1 1 7E opening flag 7E is constant flag has two cases, first when
comes the first byte of frame called opening
flag, second when comes end of frame
called closing flag
2 2,3 A0 37 frame type A0(Hex) = 160 in (Dec) where define in

From byte 1 to 8 called HDLC header


OBIS code list frame type. 37 (Hex) = 55 in
and length
(Dec) frame length means No. of byte next
A0. From byte 3 to 57
3 4,5 21, 03 destination destination address (server) lower HDLC
address 0x0011 // upper, source address
and source
(client) 0x01
addresses
5 6 30 frame type 93// frame type SNRM (Set Normal
Response Mode), 73// frame type UA
(Unnumbered acknowledge), 10// frame
type I frame.

6 7,8 6C 7C Header check sequence from byte 1-6

check
sequence
7 9,10,11 E6E700 format LL (E6) format identifier, (E7) group identifier
where define in OBIS code list, Group
identifier, C
length (00)
group
identifier,
group length
8 12,13 6129 AARQ tag (61) AARRQ tag, 29 (Hex) = 41 (Dec) is
the length of sub frame from byte 14 after
and length
(AARQ and length) to byte 54 before
Frame check sequence bytes.
9 14,15,16, A10906076 Application This application association is established
with lowest level security, so authentication
17,18,19, 0857405080 context
components are not present
20,21,22, 101 name tag,
23,24 length and
encoded
value

71
10 25,26 A203 tag and (A2) tag of AARQ, 03 (Hex) = 3 (Dec) is
the length of sub frame from byte 27 after
length of the
(AARQ tag and length) to byte 29
result
component
11 27 02 encoding the (encoding the choice for the result
(INTEGER, universal)
choice for
the result
(INTEGER,
universal)
12 28,29 0100 length and Check length of result component

value of
result
(accepted)
13 30,31 A305 tag and The response Check the component
identification comparing with AARQ tag
length for
and length
the result-
source-
diagnostic
component
14 32,33 A103 tag and
length of the
case-
service-user
choice
15 34 02 encoding the
choice for
result-
source-
diagnostic
(INTEGER,
universal)
16 35,36 0100 length and
value of
result-

76
source-
diagnostic
18 37,38 BE10 tag and
length for
AARE user-
field
19 39,40 040E encoding the
choice for
user-
information
(OCTET
STRING,
universal)
and length
20 41 08 tag for xDLMS for more information negotiation

xDLMS -
Initiate.
response
42 00 usage field
of the
negotiated-
quality-of-
service
component
43 06 negotiated DLMS\COSEM updated Protocol version 6,
used from frame check sequence for
DLMS
negotiated
version
number 6
44,45 5F1F tag for Use to check conformance data

conformanc
e block

46 04 length of the used from frame check sequence


(04) (Hex) = 4 (Dec), length of the
conformanc conformance block from byte 47 to 50

e block

77
47 00 encoding the
number of
unused bits
in the bit
string
48,49,50 00 10 1C negotiated
conformanc
e block
51,52 1090 server-max- 10 (Hex) =16 (Dec), 90(Hex) =144 (Dec)
protocol data unit PDU can receive 16,144
receive-pdu-
character from two Byte.
size
53,54 0007 VAA name
(0x0007 for
LN
referencing)
22 55,56 0C52 Frame check From 15 to 17 HDLC frame closing will
byte 17 flag of closing
sequence
13 57 7E closing flag
Example (3): Read Date and Time object.
in this example will connect to the smart meter and Read object type "Clock index"
sent frame : 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 08 00 00 01 00 00 FF 02 00
60 1A 7E

No. Byte No. Byte Frame type More details


content
1 1 7E opening flag 7E is constant flag has two cases, first when
comes the first byte of frame called opening
From byte 1 to 8 called HDLC header

flag, second when comes end of frame called


closing flag
2 2,3 A019 frame type and A0(Hex) = 160 in (Dec) where define in OBIS
code list frame type 19 (Hex) = 25 in (Dec)
length
frame length means No. of byte next A0. From
byte 3 to 27
3 4 03 destination destination address (server) lower HDLC
address 0x0011 // upper
address (server)
4 5 21 source address 21// source address (client) 0x01

(client) lower

78
5 6 32 frame type 93// frame type SNRM (Set Normal Response
Mode), 73// frame type UA (Unnumbered
acknowledge), 10// frame type I frame.

6 7,8 FBAF Header check check sequence from byte 1-6

sequence
7 9,10,11 E6E600 format L LLC bytes, (E6) format identifier, (E6) group
identifier where define in OBIS code list,
identifier, L
Group length (00)
group C
identifier,
group length
8 12,13 C001 GET.request.nor The CHOICE for get-request-normal is [1], i.e.
mal 0x01. Hence, Get-Request-Normal is encoded as
C0(Hex) = 192 C001. This is followed by the encoding of
invoke-id-and priority etc.
(Dec)
Get-Request ::= CHOICE{
01(Hex) = 1
//get-request-normal [1] IMPLICIT Get-
(Dec) Request-Normal,
//get-request-next [2] IMPLICIT Get-
Request-Next,
// get-request-with-list [3] IMPLICIT Get-
Request-With-List}

9 14 C1 invoke-id and Get-Request-Normal ::= SEQUENCE


priority {
// invoke-id-and-priority Invoke-Id-And-
Priority,
// cosem-attribute-descriptor Cosem-
Attribute-Descriptor,
// access-selection Selective-Access-
Descriptor OPTIONAL
}

10 15,16 0008 interface class From COSEM Identification System and


8, clock Interface Classes, the Register of Clock Profile
generic = 8
(8 ) means : Clock, class_id: 8
NOTE: Identification code of the class range 0
to 65 535. The class_id of each object is
retrieved together with the logical name by
reading the object_list attribute of an
―Association LN‖ / ‖Association SN‖ object.

79
class_id-s from 0 to 8191 are reserved to be
specified by the DLMS UA.
from 8 192 to 32 767 are reserved for
manufacturer specific interface classes.
from 32 768 to 65 535 are reserved for user
group specific interface classes.
11 17,18,19 00000100 logical name, Logical name 6 digit each digit from from 0 to
00FF OBIS code of 255.so (0000010000FF) =
,20,21,2
the clock (00,00,01,00,00,ff) in hex =
2
(0,0,1,0,0,255)in dec. the logical
name is unique, not repeated.
12 23,24 0200 asking for 2ed Sent Code of DLMS\COSEM protocol to
attribute, logical registers of devices asking of object attribute to
name get results, so the second attribute of clock
object to get date and time.
13 25.26 60 1A Frame check From 25 to 26 HDLC frame closing will byte
27 flag of closing
sequence
14 27 7E HDLC frame
closing flag

81
Received frame:
7E A0 1E 21 03 30 5C 0A E6 E7 00 C4 01 C1 00 09 0C 07 E1 03 1A 07 0F 3B 33 00 FF FF
00 76 1A 7E
No. Byte Byte Frame type More details
No. conten
t
1 1 7E opening flag 7E is constant flag has two cases, first when comes
the first byte of frame called opening flag, second
when comes end of frame called closing flag
2 2,3 A01E frame type A0(Hex) = 160 in (Dec) where define in OBIS code

From byte 1 to 8 called HDLC header


list frame type. 1E (Hex) = 30 (Dec) frame length
and length
means No. of byte next A0. From byte 3 to 32
3 4 21 destination 21// destination address (client) 0x01
address
(client) 0x01

4 5 03 source address source address (server) lower HDLC address


0x0011 // upper HDLC address is the default (1)
(server) lower
5 6 30 frame type 93// frame type SNRM (Set Normal Response
Mode), 73// frame type UA (Unnumbered
acknowledge), 10// frame type I frame.

6 7,8 5C 0A Header check check sequence from byte 1-6

sequence
7 9,10,11 E6 E7 format LL LLC bytes, (E6) format identifier, (E7) group
identifier where define in OBIS code list, Group
00 identifier, C
length (00)
group
identifier,
group length
8 12,13 C401 GET.response. Get-Response ::= CHOICE
normal {
C4(Hex) = //get-response-normal [1] IMPLICIT Get-
Response-Normal,
196 (Dec)
// get-response-with-datablock [2] --
01(Hex) = 1
IMPLICIT Get-Response-With-Datablock,
(Dec) //get-response-with-list [3] IMPLICIT Get-
Response-With-List
}

9 14 C1 invoke-id and Get-Response-Normal ::= SEQUENCE


priority {
invoke-id-and-priority -- Invoke-Id-And-Priority,

80
result -- Get-Data-Result
}
10 15 00 Get-Data- Get-Data-Result choice data
Result choice
data

11 16,17 09 0C octet string (12)

12 18,19 07 E1 Byte of: Year results of the second attribute of clock object to get
date and time.
date
(07E1)hex = (2017) dec, there are date of year.
20 03 Month March (03)hex = (3) dec, there are date of Month.

21 1A Day: 26 (1A)hex = (26) dec, there are date of the day.

22 07 Sunday (07)hex = (7) dec no. day of the week,


Sunday
23,24,2 0F 3B Time 3:59:51 Byte from 23 to 25 get time
33 (0f) hex = (15)dec, (3b) hex = (59)dec, (33) hex =
5
(51)dec
26 FF hundredths
not specified

27.28 0078 deviation 120


minutes

29 00 status OK

13 30,31 76 1A Frame check From 30 to 31 HDLC frame closing will byte 32


flag of closing
sequence
14 32 7E HDLC frame
closing flag

83
Example (4): Read Register object\ L1 Voltage Inst. value.
in this example will connect to the smart meter and Read object "Register \ L1
Voltage Inst. value "
Note: Holley smart meter Type DTSD545-G three phase so we will read 1phase L1 voltage.
sent frame : 7E A0 19 03 21 FE 0F D4 E6 E6 00 C0 01 C1 00 03 01 00 20 07 00 FF
02 00 85 83 7E
No. Byte Byte Frame type More details
No. content
1 1 7E opening 7E is constant flag has two cases, first when comes
the first byte of frame called opening flag, second
flag
when comes end of frame called closing flag
2 2,3 A019 frame type From byte 1 to 8 called HDLC header A0(Hex) = 160 in (Dec) where define in OBIS code
list frame type. 19 (Hex) = 25 in (Dec) frame length
and length
means No. of byte next A0. From byte 3 to 27
3 4 03 destination destination address (server) lower HDLC address
0x0011 // upper
address
(server)
4 5 21 source 21// source address (client) 0x01

address
(client)
lower
5 6,7,8 FE0FD4 Voltage Check voltage Inst. value

Register
address
7 9,10,11 E6E600 format LL LLC bytes, (E6) format identifier, (E6) group
identifier where define in OBIS code list, Group
identifier, C
length (00)
group
identifier,
group
length
8 12,13 C001 GET.reque The CHOICE for get-request-normal is [1], i.e.
From (12 to 16) Get
request – get power

0x01. Hence, Get-Request-Normal is encoded as


st.normal
C001. This is followed by the encoding of invoke-
voltage

C0(Hex) =
id-and priority etc.
192 (Dec) Get-Request ::= CHOICE{
01(Hex) = //get-request-normal [1] IMPLICIT Get-
Request-Normal,

82
1 (Dec) //get-request-next [2] IMPLICIT Get-Request-
Next,
// get-request-with-list [3] IMPLICIT Get-
Request-With-List}

9 14 C1 invoke-id Get-Request-Normal ::= SEQUENCE


{
and priority
// invoke-id-and-priority Invoke-Id-And-
Priority,
// cosem-attribute-descriptor Cosem-Attribute-
Descriptor,
// access-selection Selective-Access-Descriptor
OPTIONAL
}

10 15,16 0003 Register From COSEM Identification System and Interface


Classes, the Register of Active energy Profile
class_id=3,
generic = 3
Total
(3 ) means : register, class_id: 3
Positive NOTE: Identification code of the class range 0 to 65
Active 535. The class_id of each object is retrieved

Energy together with the logical name by reading the


object_list attribute of an ―Association LN‖ /
Register
‖Association SN‖ object.
class_id-s from 0 to 8191 are reserved to be
specified by the DLMS UA.
from 8 192 to 32 767 are reserved for manufacturer
specific interface classes.
from 32 768 to 65 535 are reserved for user group
specific interface classes.
11 17,18,19 01 00 20 logical Logical name 6 digit each digit from 0 to 255.So
(0100200700FF) = (01.00.20.07.00.ff) in
,20,21,2 07 00 FF name,
hex = (1.0.32.7.0.255)in dec. the logical
2 OBIS code
name is unique, not repeated.
of the
register
voltage:
1.0.32.7.0.
255
12 23,24,25 02 00 85 HDLC frame closing flag

,26,27 83 7E

81
Received frame : 7E A0 13 21 03 1E AF 49 E6 E7 00 C4 01 C1 00 12 5A F5 A6 3F
7E
No Byte Byte Frame type More details
. No. content
1 1 7E opening flag 7E is constant flag has two cases, first
when comes the first byte of frame called
opening flag, second when comes end of

From byte 1 to 8 called HDLC header


frame called closing flag
2 2,3 A013 frame type A0(Hex) = 160 in (Dec) where define in
and length OBIS code list frame type. 13 (Hex) = 19
(Dec) frame length means No. of byte next
A0. From byte 3 to 21
3 4 21 destination 21// destination address (client) 0x01
address
(client) 0x01

4 5 03 source source address (server) lower HDLC


address address 0x0011 // upper HDLC address is
(server) the default (1)
lower
5 6 1E frame type 93// frame type SNRM (Set Normal
30 Response Mode), 73// frame type UA
(Unnumbered acknowledge), 10// frame
type I frame.

6 7,8 AF49 Header check sequence from byte 1-6


check
sequence
7 9,10,11 E6 E7 00 format LL LLC bytes, (E6) format identifier, (E7)
identifier, C group identifier where define in OBIS
group code list, Group length (00)
identifier,
group length
8 12,13 C401 GET.respons Get-Response ::= CHOICE
e.normal
{
C4(Hex) = //get-response-normal [1] IMPLICIT Get-Response-
196 (Dec) Normal,
// get-response-with-datablock [2] -- IMPLICIT

81
01(Hex) = 1 Get-Response-With-Datablock,
//get-response-with-list [3] IMPLICIT Get-Response-
(Dec)
With-List

9 14 C1 invoke-id Get-Response-Normal ::= SEQUENCE


and priority {
invoke-id-and-priority -- Invoke-Id-And-Priority,
result -- Get-Data-Result
}

10 15 00 Get-Data- Get-Data-Result choice data


Result choice
data

11 16 12 octet string (12)

12 17,18 5A F5 Voltage results of class –id :3 attribute of register


Instantiation object to get voltage (5AF5)hex =
L1=232.85 (232.85) dec, there are value of voltage
V inst.
13 19,20 A6 3F Frame From 30 to 31 HDLC frame closing will
check byte 32 flag of closing
sequence
14 21 7E HDLC
frame
closing flag

86
Example (5): Read Register object\ L1 Current Inst. value
in this example will connect to the smart meter and Read object "Register \ L1
Current Inst. Value
sent frame : 7E A0 19 03 21 54 5F DE E6 E6 00 C0 01 C1 00 03 01 00 1F 07 00 FF
02 00 DC 79 7E
No. Byte Byte Frame type More details
No. content
1 1 7E opening flag 7E is constant flag has two cases, first when comes
the first byte of frame called opening flag, second
when comes end of frame called closing flag
A0(Hex) = 160 in (Dec) where define in OBIS code
From byte 1 to 8 called HDLC header
2 2,3 A019 frame type
list frame type. 19 (Hex) = 25 in (Dec) frame length
and length
means No. of byte next A0. From byte 3 to 27
3 4 03 destination destination address (server) lower HDLC address
0x0011 // upper
address
(server)
4 5 21 source 21// source address (client) 0x01

address
(client) lower
5 6,7,8 54 5F Current Check Current Inst. value

DE Register
address
7 9,10,1 E6E60 format LLC LLC bytes, (E6) format identifier, (E6) group
identifier where define in OBIS code list, Group
1 0 identifier,
length (00)
group
identifier,
group length
8 12,13 C001 GET.request. The CHOICE for get-request-normal is [1], i.e.
From (12 to 16) Get request –

0x01. Hence, Get-Request-Normal is encoded as


normal
C001. This is followed by the encoding of invoke-
get power voltage

C0(Hex) =
id-and priority etc.
192 (Dec) Get-Request ::= CHOICE{
01(Hex) = 1 //get-request-normal [1] IMPLICIT Get-Request-

(Dec) Normal,
//get-request-next [2] IMPLICIT Get-Request-Next,
// get-request-with-list [3] IMPLICIT Get-Request-
With-List}

87
9 14 C1 invoke-id Get-Request-Normal ::= SEQUENCE
{
and priority
// invoke-id-and-priority Invoke-Id-And-Priority,
// cosem-attribute-descriptor Cosem-Attribute-
Descriptor,
// access-selection Selective-Access-Descriptor
OPTIONAL
}

10 15,16 0003 Register From COSEM Identification System and Interface


Classes, the Register of Active energy Profile
class_id=3,
generic = 3
Total
(3 ) means : register, class_id: 3
Positive NOTE: Identification code of the class range 0 to 65
Active 535. The class_id of each object is retrieved

Energy together with the logical name by reading the


object_list attribute of an ―Association LN‖ /
Register
‖Association SN‖ object.
class_id-s from 0 to 8191 are reserved to be
specified by the DLMS UA.
from 8 192 to 32 767 are reserved for manufacturer
specific interface classes.
from 32 768 to 65 535 are reserved for user group
specific interface classes.
11 17,18, 01 00 logical name, Logical name 6 digit each digit from 0 to 255.So
(01 00 1F 07 00 FF) = (01.00.1f.07.00.ff) in
19,20, 1F 07 OBIS code
hex = (1.0.31.7.0.255)in dec. the logical
21,22 00 FF of the
name is unique, not repeated.
register
voltage:
1.0.31.7.0.25
5
12 23,24, 02 00 HDLC frame closing flag

25,26, DC 79
27 7E

88
Receive frame : 7E A0 13 21 03 1E AF 49 E6 E7 00 C4 01 C1 00 10 01 56 03 B1 7E
No Byte Byte Frame type More details

. No. content
1 1 7E opening flag 7E is constant flag has two cases, first when comes
the first byte of frame called opening flag, second
when comes end of frame called closing flag
2 2,3 A013 frame type A0(Hex) = 160 in (Dec) where define in OBIS code

From byte 1 to 8 called HDLC header


list frame type. 13 (Hex) = 19 in (Dec) frame length
and length
means No. of byte next A0. From byte 3 to 21
3 4 21 destination destination address (client) lower HDLC address
0x01 // upper
address
(client)
4 5 03 source 21// source address (server) 0x0011

address
(server)
lower
5 6,7,8 1E AF 49 Current Check Current Inst. value

Register
address
7 9,10,1 E6E700 format LL LLC bytes, (E6) format identifier, (E7) group
identifier where define in OBIS code list, Group
1 identifier, C
length (00)
group
identifier,
group length
8 12,13 C4 01 GET.request The CHOICE for get-request-normal is [1], i.e.
From (12 to 16) Get request – get power voltage

0x01. Hence, Get-Request-Normal is encoded as


.normal
C401. This is followed by the encoding of invoke-
C4(Hex) =
id-and priority etc.
196 (Dec) Get-response ::= CHOICE{
01(Hex) = 1 //get-Response-normal [1] IMPLICIT Get-

(Dec) Response -Normal,


//get- response -next [2] IMPLICIT Get-
Response -Next,
// get- Response -with-list [3] IMPLICIT Get-
Response -With-List}

9 14 C1 invoke-id Get- Response -Normal ::= SEQUENCE


{
and priority

89
// invoke-id-and-priority Invoke-Id-And-
Priority,
// cosem-attribute-descriptor Cosem-Attribute-
Descriptor,
// access-selection Selective-Access-Descriptor
OPTIONAL
}

10 15,16 0010 Register From COSEM Identification System and Interface


Classes, the Register of current Profile generic =
class_id=16,
16
Current.
(12 ) means : register, class_id: 18
NOTE: Identification code of the class range 0 to 65
535. The class_id of each object is retrieved
together with the logical name by reading the
object_list attribute of an ―Association LN‖ /
‖Association SN‖ object.
class_id-s from 0 to 8191 are reserved to be
specified by the DLMS UA.
from 8 192 to 32 767 are reserved for manufacturer
specific interface classes.
from 32 768 to 65 535 are reserved for user group
specific interface classes.
11 17,18 01 56 Active results of class –id :16 attribute of register object
to get voltage (0156)hex = (342) dec, there are
current =
active current 342 Watt.
0156 Hex =
324 Dec
12 19,20, 03 B1 7E HDLC frame closing flag

21

91
5.3.4 System software screen:

5.3.5 Explanation of System software code on Appendix(A).

Figure (5. 15): IUG-DLMS-Analyzer

90
Chapter 6

Results and Conclusions

93
Chapter 6

Results and Conclusions


6.1 Results and Conclusions
The Electrical energy crises are getting worse every year in the Gaza Strip.
Becoming scares and valuable resource, this energy has to be well monitored,
utilized, and rationally consumed. It is believed that smart grid is the key solution to
this goal. The system operator will be able to allocate this resource for end
consumers depending on their rational behavior. Meanwhile, subscribers will be able
to track their consumption record and work seriously to improve it hoping to have
the service along the whole day. Most probably they will be motivated to upgrade
their electrical equipment and lighting devices to more electrically efficient and
reschedule some activities to be away from peak hours.

There are many approaches to build a smart grid. Basically, it consists of three
components:

1) Smart meters
2) A Communication network
3) A management software.

It is intended in this work to study the Palestinian efforts done in this era and
seek for a possible contribution. Two pilot projects in the Gaza Strip and one in the
west bank are addressed. In Gaza, they utilized Iskra smart meters while Holley
smart meters are utilized in the West Bank pilot project. Regarding the
communication network, In Gaza Strip they utilized the RS485 bus to link smart
meters within each residential building to a concentrator device which is connected
to the backbone network through the GSM network. On the other hand, Power line
communication modems are adopted to link smart meters to the concentrators which
are also connected to the backbone network through the GSM network. For the
management software, all these pilot projects are utilizing software packages which
is not locally developed and most of our involved engineers lack the knowledge of
smart meters‘ communication protocol implementation. We found that the pilot
projects implemented in Palestine are adopting the DLMS/COSEM protocol which is
a world-wide standard for automatic meter reading. Studying the protocol
specification, we found it constructive to demonstrate how to communicate with
these meters using a standard programming language. The implemented application
successfully communicates with any DLMS-Compliant meter and retrieves the basic
readings such as energy, current, and voltage along with the time stamp. Therefore, it
is recommended to encourage developing software packages locally.

For the communication network we recommend using PLCC as it reduces monthly


rent cost of the GSM carrier and enhances integration, security and independency.

92
6.2 Future work
Farther future work is needed to investigate the medium voltage power line modems.
We plane to design a backbone network passed on that technology to support the
future smart grid of the Gaza Strip.
We are recommended to:
 Continuing research on the project.
 Create an expert team from Gaza Strip, able to implement a huge project, and able to
create a software system for managing electrical grids.
 Establishing a smart grid laboratory at the Islamic University - Gaza.
 Teaching students the courses related to building smart Grid.

91
The Reference List

91
The Reference List

Akarte, V., Punse, N., & Dhanorkar, A. (2014). Power Line Communication
Systems. Power, 2(1)709-713.
Anatory, J., Theethayi, N., Thottappillil, R., Mwase, C., & Mvungi, N. H. (2009).
The effects of multipath on OFDM systems for broadband power-line
communications a case of medium voltage channel. Power, 500(1), 1c., 205-207
Arzberger, M., Dieper, S., Dirnberger, J., Dornseifer, H., Fey, B., Frank, R., &
Liebezeit, M. (2012). Smart Meter Rollout: Praxisleitfaden zur Ausbringung
intelligenter Zähler. Springer-Verlag.170-176
Bormann, C. (1999). PPP in a Real-time Oriented HDLC-like Framing.3-10
Carcelle, X. (2009). Power line communications in practice. Artech House.13-26
Corchado, J. A., Manero, E., Cortés, J. A., Sanz, A., & Díez, L. (2016, November).
Application-layer performance analysis of PRIME in Smart Metering networks.
In Smart Grid Communications (SmartGridComm), 2016 IEEE International
Conference on (pp. 332-337). IEEE.
Demler, M. (Ed.). (2013, August 17). What is Power Line Communication? | EE
Times. Retrieved April 11, 2017, from http://www.eetimes.com/document.asp?
Feeney, M. (Ed.). (2011, April 6). How to Read Your Electricity Meter. Retrieved
April11,2017,from,http://www.energyineducation.ie/Energy_In_Education/Infor
mation_for_Schools/Resources_and_links/Factsheet_-
_How_to_Read_Your_Electricity_Meter.pdf
Gaza Electricity Distribution Corporation . (2015, October 16). Retrieved February
22, 2015, from http://www.gedco.ps/posts/details/1821
Hoch, M. (2011, April). Comparison of PLC G3 and PRIME. In Power Line
Communications and Its Applications (ISPLC), 2011 IEEE International
Symposium on (pp. 165-169). IEEE.
Issa, M. Rick, M. Senesi and E. Marthe, ‖Power line communication using medium
voltage networks‖, Proc. GCC International Gulf Conference, Manama, Bahrain,
2003
Jain, S., Kumar, V., Paventhan, A., Chinnaiyan, V. K., Arnachalam, V., & Pradish,
M. (2014, March). Survey on smart grid technologies-smart metering, IoT and
EMS. In Electrical, Electronics and Computer Science (SCEECS), 2014 IEEE
Students' Conference on (pp. 1-6). IEEE.
Kmethy, G. (2014, December). DLMS USER ASSOCIATION. Retrieved March &
april, 2015, from http://www.dlms.com/index2.php
Krishna, R., Siddhartha, R. K., Kumar, N., & Jogi, G. L. (2014). BROADBAND
OVER POWER LINES (BPL) FOR INDIAN TELECOM NETWORK _.
Lewis, R. P., Igict, P., & Zhou, Z. (2009, September). Assessment of communication
methods for smart electricity metering in the UK. In Sustainable Alternative
Energy (SAE), 2009 IEEE PES/IAS Conference on (pp. 1-4). IEEE.
Li, H., Sun, Y., & Jia, F. (2008, November). Application of power line
communication to the home network. In Communication Technology, 2008.
ICCT 2008. 11th IEEE International Conference on (pp. 521-524). IEEE.
Palestine Electric Company. (2015). Retrieved June 2, 2016, from
http://www.pec.ps/index.php?lang=en&page=headline&id=T1dWbVlUZzNaVE

96
UyTkRrNU5XRTNOelF6WldOaE9XRmtOak13TWpsbVlUUk5WR015NDAzM
DQxZWQzZTFjZTlhNzcyNTAyNzQ5Mzg0MjM1ZjI
Palestinian Energy and Natural Resources Authority. (2014, November 14).
RetrievedJuly3,2015,from,http://penra.gov.ps/index.php?option=com_content&v
iew=article&id=760:2012-11-14-09-46-28&catid=27:2012-11-14-08-37-
30&Itemid=61
PVPS, I. (2002). Evaluation of islanding detection methods for photovoltaic utility-
interactive power systems. Report IEA PVPS T5-09.
Sharma, M. (2010). PLCC Channel Modelling and Effect of Physical Parameters on
its Bandwidth (Doctoral dissertation, THAPAR UNIVERSITY PATIALA).42-46
Simpson, W. (1994). PPP in HDLC-like Framing.
Sivanagaraju, S. (2008). Electric power transmission and distribution. Pearson
Education India.2-4
Smart metering devices. (2015, August 27). Retrieved February 18, 2016, from
http://www.smsmetering.co.uk/products/
Synchronization of DLMS/COSEM sensor nodes. In 19th IMEKO TC-4 Symposium
Measurements of Electrical Quantities. Barcelona, Spain (pp. 234-239).
Ttianese, A., Del Giudice, A., Landi, M., Paciello, V., & Pietrosanto, A. (2013, July).
Vosough, S., & Vosough, A. (2011). PLC and its Applications. International journal
of multidisciplinary sciences and engineering, 2(8), 209-214.
Wolf, J. (2012, May). Power line communication (PLC) in space—Current status and
outlook. In Aerospace EMC, 2012 Proceedings ESA Workshop on(pp. 1-6).
IEEE.
Zurawski, R. (2014). Industrial communication technology handbook. CRC
Press,209-213.

97
Appendix

Appendix A: Information on Appendices


System software code Explanation
N0te: The code details can be obtained from the appendix

Define a general declaration

Dim D_(9) As Byte

Dim D0(17) As Byte

Dim D1(45) As Byte

Dim OutData(27) As Byte

Dim DH(15) As Byte

Dim D2(11) As Byte

Dim D3(11) As Byte

Dim D4(11) As Byte

Dim D5(11) As Byte

Dim buf(27) As Byte

Dim RecBuf As String

Dim Vbuf(3) As Byte

Dim VL As Long

Dim V As Single

Dim s As String

Dim m, Node As Byte

Dim x, OLD As String

Dim n As Integer

When clicking on command get current button, the following code has frame initial connection,
running on smart meter by DLMS\COSEM to make initial connection with meter device

Private Sub CmdInitConnect_Click()

'Text1.Text = Text1.Text + vbCrLf + "<- 7E A0 0F 03 21 93 D7 E4 81 80 03 06 01


80 6B 66 7E" + vbCrLf

MSComm1.Output = D0

End Sub

Private Sub CmdAARQAARE_Click()

98
'Text1.Text = Text1.Text + vbCrLf + " <- 7E A0 2B 03 21 10 FB AF E6 E6 00 60
1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00
10 1C 01 90 B2 6D 7E" + vbCrLf

MSComm1.Output = D1

End Sub

When clicking on command CmdGetTime, the following code has frame time and date register,
running on smart meter by DLMS\COSEM to make initial connection with meter device

Private Sub CmdGetTime_Click()

For m = 0 To 14

OutData(m) = DH(m)

Next m

For m = 15 To 25

OutData(m) = D2(m - 15)

Next m

OutData(26) = &H7E

MSComm1.Output = OutData

RecBuf = ""

End Sub

When clicking on command CmdGetVolt, the following code has frame voltage register object
(logical name 1.0.32.7.0.255), running on smart meter by DLMS\COSEM to get voltage value
with meter device

Private Sub CmdGetVolt_Click()

For m = 0 To 14

OutData(m) = DH(m)

Next m

For m = 15 To 25

OutData(m) = D4(m - 15)

Next m

OutData(26) = &H7E

MSComm1.Output = OutData

RecBuf = ""

End Sub

When clicking on command get current button, frame has the following code running on smart
meter by DLMS\COSEM

99
Private Sub CmdGetCurrent_Click()

For m = 0 To 14

OutData(m) = DH(m)

Next m

For m = 15 To 25

OutData(m) = D3(m - 15)

Next m

OutData(26) = &H7E

MSComm1.Output = OutData

RecBuf = ""

End Sub

when software starting, the default setting form load as the initial setting of comm.Port, arrays
value, Initializing the serial connection must be as in the following code

Private Sub Form_Load()

MSComm1.CommPort = 3

MSComm1.Settings = "9600,n,8,1"

MSComm1.RThreshold = 1

MSComm1.PortOpen = True

OLD = 0

n=0

'7E A0 07 03 21 93 0F 01 7E

D_(0) = &H7E

D_(1) = &HA0

D_(2) = &H7

D_(3) = &H3

D_(4) = &H21

D_(5) = &H93

D_(6) = &HF

D_(7) = &H1

D_(8) = &H7E

'Initializing serial connection

'Send SNRM request

011
'7E A0 0F 03 21 93 D7 E4 81 80 03 06 01 80 6B 66 7E

D0(0) = &H7E

D0(1) = &HA0

D0(2) = &HF

D0(3) = &H3

D0(4) = &H21

D0(5) = &H93

D0(6) = &HD7

D0(7) = &HE4

D0(8) = &H81

D0(9) = &H80

D0(10) = &H3

D0(11) = &H6

D0(12) = &H1

D0(13) = &H80

D0(14) = &H6B

D0(15) = &H66

D0(16) = &H7E

'Send AARQ request

'7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E
01 00 00 00 06 5F 1F 04 00 00 10 1C 01 90 B2 6D 7E

D1(0) = &H7E

D1(1) = &HA0

D1(2) = &H2B

D1(3) = &H3

D1(4) = &H21

D1(5) = &H10

D1(6) = &HFB

D1(7) = &HAF

D1(8) = &HE6

D1(9) = &HE6

D1(10) = &H0

010
D1(11) = &H60

D1(12) = &H1D

D1(13) = &HA1

D1(14) = &H9

D1(15) = &H6

D1(16) = &H7

D1(17) = &H60

D1(18) = &H85

D1(19) = &H74

D1(20) = &H5

D1(21) = &H8

D1(22) = &H1

D1(23) = &H1

D1(24) = &HBE

D1(25) = &H10

D1(26) = &H4

D1(27) = &HE

D1(28) = &H1

D1(29) = &H0

D1(30) = &H0

D1(31) = &H0

D1(32) = &H6

D1(33) = &H5F

D1(34) = &H1F

D1(35) = &H4

D1(36) = &H0

D1(37) = &H0

D1(38) = &H10

D1(39) = &H1C

D1(40) = &HFF '&H1

D1(41) = &HFF '&H90

013
D1(42) = &H5B '&HB2

D1(43) = &H10 '&H6D

D1(44) = &H7E

DH(0) = &H7E

DH(1) = &HA0

DH(2) = &H19

DH(3) = &H3

DH(4) = &H21

DH(5) = &H32

DH(6) = &H6F

DH(7) = &HD8

DH(8) = &HE6

DH(9) = &HE6

DH(10) = &H0

DH(11) = &HC0

DH(12) = &H1

DH(13) = &HC1

DH(14) = &H0

' get time

'7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 08 00 00 01 00 00 FF 02 00 60 1A 7E

'7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 03 01 00 1F 07 00 FF 02 00 DC 79 7E

D2(0) = &H8

D2(1) = &H0

D2(2) = &H0

D2(3) = &H1

D2(4) = &H0

D2(5) = &H0

D2(6) = &HFF

D2(7) = &H2

D2(8) = &H0

012
D2(9) = &H60

D2(10) = &H1A

'get Current

'03 01 00 1F 07 00 FF 02 00 DC 79

D3(0) = &H3

D3(1) = &H1

D3(2) = &H0

D3(3) = &H1F

D3(4) = &H7

D3(5) = &H0

D3(6) = &HFF

D3(7) = &H2

D3(8) = &H0

D3(9) = &HDC

D3(10) = &H79

'get voltage

'7E A0 19 03 21 FE 0F D4 E6 E6 00 C0 01 C1 00 03 01 00 20 07 00 FF 02 00 85 83 7E

'7E A0 19 03 21 10 7F DA E6 E6 00 C0 01 C1 00 03 01 00 20 07 00 FF 02 00 85 83 7E

D4(0) = &H3

D4(1) = &H1

D4(2) = &H0

D4(3) = &H20

D4(4) = &H7

D4(5) = &H0

D4(6) = &HFF

D4(7) = &H2

D4(8) = &H0

D4(9) = &H85

D4(10) = &H83

'Power L1 03 01 00 15 07 00 FF 02 00 D2 50

D5(0) = &H3

011
D5(1) = &H1

D5(2) = &H0

D5(3) = &H15

D5(4) = &H7

D5(5) = &H0

D5(6) = &HFF

D5(7) = &H2

D5(8) = &H0

D5(9) = &HD2

D5(10) = &H50

End Sub

Disconnect with Comm.Port

Private Sub Form_Unload(Cancel As Integer)

MSComm1.PortOpen = False

End Sub

Function to convert from Hexadecimal to Decimal

Function Hex2Dec(HexStr As String) As Byte

On Error Resume Next

Hex2Dec = CByte("&H" & HexStr)

End Function

Private Sub MSComm1_OnComm()

x = MSComm1.Input

If (x <> "") Then y = Asc(x) Else y = &H24

M1 = Int(y / 16)

If M1 < 10 Then M1 = M1 + &H30 Else M1 = M1 + &H37

M2 = y And 15

If M2 < 10 Then M2 = M2 + &H30 Else M2 = M2 + &H37

If (x <> "") Then

If Asc(x) = &H7E And Asc(OLD) = &H7E Then

Text1.Text = Text1.Text + vbCrLf & Chr$(M1) + Chr$(M2) + " "

Else

011
Text1.Text = Text1.Text + Chr$(M1) + Chr$(M2) + " "

End If

RecBuf = RecBuf & x

End If

Dim i, i2 As Integer

Dim z1, z2, year1, year2, year3, MINUTS, SEC As String

z1 = Chr(&H7E) & Chr(&HA0) & Chr(&H1E) & Chr(&H21) & Chr(&H3) & Chr(&H52) &
Chr(&H48) & Chr(&H4A) & Chr(&HE6)

z2 = Chr(&H7E) & Chr(&HA0) & Chr(&H1E) & Chr(&H21) & Chr(&H3) & Chr(&H54) &
Chr(&H7E) & Chr(&H2F) & Chr(&HE6)

If (x <> "") Then OLD = x Else OLD = 0

i = InStr(RecBuf, z1)

If i = 0 Then i = InStr(RecBuf, z2)

If i <> 0 And Len(RecBuf) >= i + 31 Then

year1 = Asc(Mid$(RecBuf, i + 17, 1))

year2 = Asc(Mid$(RecBuf, i + 18, 1))

'year3 = Hex(year1) & Hex(year2)

Hrs = Asc(Mid$(RecBuf, i + 22, 1))

MINUTS = Asc(Mid$(RecBuf, i + 23, 1))

SEC = Asc(Mid$(RecBuf, i + 24, 1))

year3 = 256 * year1 + year2

year3 = Str(year3) & " Time is " & Str(Hrs) & ":" & Str(MINUTS) & ":" & Str(SEC)

Text3.Text = year3

RecBuf = Mid$(RecBuf, i + 32)

End If

016
Dim VL1h, VL1l, VL1 As Single

'7E A0 13 21 03 1E AF 49 E6 E7 00 C4 01 C1 00 12 5A F5 A6 3F 7E V

'7E A0 13 21 03 54 F1 A4 E6 E7 00 C4 01 C1 00 12 00 00 03 B1 7E I

'7E A0 15 21 03 54 6B EF E6 E7 00 C4 01 C1 00 17 00 00 00 00 79 A7 7E E

z1 = Chr(&H7E) & Chr(&HA0) & Chr(&H13) & Chr(&H21) & Chr(&H3)

i = InStr(RecBuf, z1)

If i <> 0 And Len(RecBuf) >= i + 20 Then

VL1h = Asc(Mid$(RecBuf, i + 16, 1))

VL1l = Asc(Mid$(RecBuf, i + 17, 1))

VL1 = (256 * VL1h + VL1l) / 100

If OutData(18) = &H1F Then Text7.Text = VL1

If OutData(18) = &H20 Then Text6.Text = VL1

If OutData(18) = &H15 Then TxtEnergy.Text = VL1 * 100

RecBuf = Mid$(RecBuf, i + 20)

End If

Text2.Text = RecBuf

Text4.Text = Len(RecBuf)

End Sub

Function to scheduled castes in timer modulus when click auto refresh command to result in
automatically every second

Private Sub Timer1_Timer()

n = (n + 1) Mod 6

Select Case n

Case 0:

MSComm1.Output = D0

Case 1:

MSComm1.Output = D1

Case 2:

DH(5) = &H32

DH(6) = &H6F

017
DH(7) = &HD8

CmdGetTime_Click

Case 3:

DH(5) = &H54

DH(6) = &H5F

DH(7) = &HDE

CmdGetVolt_Click

Case 4:

DH(5) = &H76

DH(6) = &H4F

DH(7) = &HDC

CmdGetCurrent_Click

Case 5:

DH(5) = &H98

DH(6) = &H3F

DH(7) = &HD2

CmdEnergy_Click

End Selec

Text5.Text = n

End Sub

The following code makes Auto read Current, voltage and time every 1 second by change setting
of timer option and set result in the text boxes.

Private Sub CmdAutoRefresh_Click()

If Timer1.Enabled = True Then

Timer1.Enabled = False

Else

Timer1.Enabled = True

End If

RecBuf = ""

Text1.Text = ""

End Sub

This Code makes Clean the information text boxes.

018
Private Sub CmdClearLog_Click()

RecBuf = ""

Text1.Text = ""

Text2.Text = ""

'MSComm1.Output = D_

End Sub

This Code Close the system project.

Private Sub CmdEXIT_Click()

End

End Sub

019
Appendix B: Information on Smart meters specification
1. Features of Smart meters ISKRA ME372

Item Parameters
Accuracy(kWh) Class 0.5S (IEC62053-21)
Measuring current(A) 1(6)A, 5(6)A
Minimum current 0.05lb
Starting current 0.001lb
3x58/100~69/120V 3x110/190~133/230V
Rated voltage (Un) 3x220/380~240/415V 3x58/100~240/415V
extended operating voltage range:
Operating voltage range 0.8Un~1.15Un
Operating frequency 50Hz/60Hz
1 circuit optical interface
Communication interface
1 circuit RS485 or GPRS
Local: IEC62056-21
Communication Protocol
Remote: DLMS HDLC
Optical interface IEC standards
TOU (Optional) Tariff control available, up to 4 tariffs
Load Profile (Optional) Minutes/Hourly/Daily/Monthly Load Profile
RTS ≤0.5s/day (Normal Temperature)
10 years battery operation life
RTS Support
Operating for at least 2 years in case of any power failure
Backup battery Battery can be replaced
Pulse constant 1000~10000 imp/kWh
Current circuit power consumption ≤2.2VA
Power consumption
Voltage circuit power consumption ≤1.8W/10VA
Compression strength 4kV, 50Hz, 1 minute
Anti-surge
Voltage 6kV, 1.2/50μs
Current 5kA, 8/20μs
Immunity to short-circuit current 30 Imax
Anti-magnetic Anti-strong magnetic, magnetic detection and display
Protection IP54
Operating temperature range -25°c~+70°c
Storage temperature -40°c~+85°c
Anti-tamper open meter cover, open terminal cover, current reverse
Dimension(L*W*H) 298.7mm*170mm*78.8mm
Weight Approx. 1.2kg

2. Features of Smart meters ISKRA382

 Remote connection/disconnection
 Multi-Energy management (gas, water, heat)
 Extensive anti-tampering features
 Customer port for in-house display (RJ11)
 Secure communication with encryption and authentication

001
 Photovoltaic friendly design
 Integrated demand/response functions
 DLMS protocol for easy integration
 Import/export energy measurement
 The Iskra ME382 meter is approved according to IEC 62052-11, IEC 62053-21, IS0
9001, EN 50470-1, EN 50470-3.
 Incorporates a fully integrated GSM/GPRS modem that can be exchanged with
integrated RS485 communications interface for block installations.
 100A Direct Connected
 Single Phase Network
 OFGEM Approved
 Import/Export Energy
 Tariff control input
 Small size modern design
 Accuracy class: 2 or 1
 Voltage range: 1.15 Un
 Max. current: 85A or 100A
 Reference voltage: 230V
 Reference frequency: 50/60Hz
 Operating temp. range: -25 to+60° C
 Extended temp. range:-40 to +70° C
 Storage temperature: -40 to+85° C
 Self-consumption current 0.5VA
 Self-consumption Voltage 2W / 10VA
 Short-circuit current: 30 Imax
 Time-of-use measurement of active energy and maximum demand (in up to 8 tariffs)
 Load-profile registration
 Digital Display in compliance with VDEW specification, with two modes of data display
 Internal real-time clock
 Two keys: Reset and Scroll key
 Optical port (IEC 62056-21 standard) for local meter programming and data
downloading
 Built-in interface (IR) and GSM/GPRS modem for a remote two-way communication,
meter programming and data downloading
 Wired M-Bus

000
 Alarm input
 Non-potential key input
 Opto-MOS: switching functionality (for low current loads), metropulse functionality
(configurable energy pulses)
 Bi-stabile relay: switching external loads up to 6A, external disconnector functionality
 Integrated disconnector with 1-phase meters
 Detectors of the meter and the terminal block covers opening.
 Disconnector for remote disconnection / reconnection of the customer premises.
 M-Bus for reading other meters (heat, gas, water)
 Remote display ON/OFF configuration
 Two different console type (reduced and normal)

Functionality

Measurement features

 Two way (―energy―) measurements


 Active energy & power, 4Q Reactive energy
 & power, Apparent energy & power, Instantaneous value of voltage, Current, Power
factor, Frequency and Power
 Absolute measurement of active energy & power

Tariff functions

 Time-of-use (TOU) measurement of active energy and maximum demand (up to 8


tariffs, 12 seasons, 12 weekly programs, 16 masks, 16 switches)

Load profiles

 Two Load profiles with different daily and hourly registration periods with up to 32
objects
 Four separate profiles for sub-metering (M-bus)
 Seven separate Event logs for different objects

003
Communication

1. Full DLMS-COSEM and IEC 1107 compliance Four independent communication


interfaces:
– Optical port
– RJ11 (for in-house display)
– M-bus (wired)
– GSM/GPRS/UMTS Power quality
2. Voltage sag, swell and cut, Daily peak and minimum, Voltage and current asymmetry,
Power failure

Unit Specifics

 Backlit LCD display


 Detection of opening main and terminal cover External magnetic field detector
 Detection of meter wiring
 Prepayment
 In-house display support
 Power quality supervision
 Photovoltaic ready
 Secured communication channels
 Switching device up to 3x100A (UC3)
 Remote FW upgrade
 RTC (Super-Cap)

3. PRIME FCC PLCModule Specification

Item Sub-item Parameter


Standard reference voltage Un 3x230 V

Extended operating voltage range 0.5Un~1.3Un

Operating frequency 50Hz(±5%)


Basic
Limit operating temperature range -45ºC ~ +75ºC

Limit temperature range for storage and -45ºC ~ +85ºC


transport

Type of modulation OFDM


Parameters
Communication phase of PLC Three phase

002
Item Sub-item Parameter
PLC frequencies(kHz):

f0 260.742

f1 261.230

f2 261.718

f3 262.207

f4 262.695

f5 263.183

f6 263.671

f7 264.160

F96 307.617

PLC output level ( dBµV ) 120

Average: 1000m
PLC coverage distances(m):
Maximal: 3000m
128-bit end-to-end
Data Security encryption for PLC
communication

Network establishment structure Tree network topology

IEC 61334-5-4
IEC 61334-4-32
IEC 62056
IEC 61000
Applicable standards
PRIME specification
revision v1.3
PRIME specification
revision v1.4

Data transmission rates Up to 128kbps

Mechanical Dimensions(LxWxH) 100mmx75mmx35mm

Characteristics Weight 0.1kg

001
1- Built-in RISECOMM PLC MODEM Specification

Item Sub-item Parameter


Parameters Type of modulation BPSK

Communication phase of PLC Three phase


PLC frequencies(kHz): 132
PLC output level ( dBμV ) 120
PLC coverage distances(m): Average: 1000m
Maximal: 3000m
Network establishment structure Tree network topology
Applicable standards EN50065-1
EIA-709.2
Data transmission rates Up to 5400bps

001

You might also like