0% found this document useful (0 votes)
9 views

A Realization Method of Protocol Conversion Betwee

Uploaded by

saravanank1423
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

A Realization Method of Protocol Conversion Betwee

Uploaded by

saravanank1423
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Open Journal of Applied Sciences, 2013, 3, 18-23

doi:10.4236/ojapps.2013.32B004 Published Online June 2013 (http://www.scirp.org/journal/ojapps)

A Realization Method of Protocol Conversion Between


Modbus and IEC61850*
Fan Zhang1, Yongli Zhu1, Chunyu Yan2, Jiangang Bi2, Haijun Xiong1, Shuai Yuan2
1
School of Control and Computer Engineering, North China Electric Power University, Baoding, China
2
China Electric Power Research Institute, Beijing, China
Email: [email protected]

Received 2013

ABSTRACT
In order to adapt to the construction needs of the smart grid, smart substation need to solve the problem of protocol
conversion between the conventional non-standardized condition monitoring equipment and the standardized monitor-
ing system. This paper proposed a realization method of conversion method between Modbus and IEC61850. Ob-
ject-oriented technology is used for information model on Modbus. After the analysis of IEC61850 and MMS informa-
tion and service model, to establish the model mapping relationship between IEC61850, MMS and Modbus based on
the principle of minimum information point which is one to one correspondence. Combined with the implementation of
SISCO MMS-EASE LITE software development kit programming, giving a realization method using QT programming
techniques based on the mapping model. Finally, the establishment the interval controller as an example of protocol
scheme verifies the correctness and the feasibility of protocol conversion method.

Keywords: Modbus; IEC 61850; Protocol Conversion; Model Mapping; Consolidated Monitoring Unit

1. Introduction to study the protocol conversion between Modbus and


IEC61850 for the substation condition monitoring
With the gradual popularization and application of intel-
equipment standardization.
ligent substation, IEC61850 standard is widely used in
Model mapping and protocol conversion research be-
substation automation system [1]. State Grid Corporation
tween the IEC61850 standard and MMS, 103, 104 stan-
developed the substation equipment online monitoring
dard has being focused on nowadays. The research on the
system technical guidance in the process of building a
model mapping between Modbus and IEC61850 standard
strong and smart grid by 2011 [2]. It defined that condi-
is less [5]. [6] gives a model mapping method between
tion monitoring system is structured into the process
Modbus and IEC61850 using the System Configuration
layer, the spacer layer and the station layer. The commu-
Description Language schema file for expanded imple-
nication between the layers is used IEC61850 protocol.
mentation of the model, but does not give the specific
To achieve the goal of intelligent substation, on the one
engineering part of the protocol conversion module.[7]
hand to develop the standard specification condition
gives a CORBA-based the IEC61850 protocol conver-
monitoring equipment to replace aging seriously equipment,
sion device. The method can be flexible and facilitate the
on the other hand, the condition monitoring equipment
realization of the protocol conversion, but due to the
which need not replace should be completed the stan-
complexity of the CORBA ability, there are some limita-
dardized transformation to adapt to the current grid de-
tions to realize it. IEC61850-8-1 has given the method to
velopment needs. The conventional condition monitoring
the implementation issues for IEC61850 which is to map
equipment mainly used in Modbus, IEC60870-5-103
the abstract information and services model to the
(103), IEC60870-5-104(104), CAN bus standard as well
Manufacturing Message Specification (MMS) [8]. Due to
as a large number of proprietary protocols nowadays
the complexity of the MMS, most of the current domestic
[3,4]. Modbus whose structure is simple optimization and
manufacturers achieve the mapping of the communica-
support a variety of characteristics of electrical interface
tion services by SISCO MMS-EASE LITE tool package
and transmission medium is a protocol supported by
in the development of IEC61850 substation product.
most condition monitoring devices. Therefore, It is key
[9,10] summarizes the information mapping correspon-
ProjectSupported by the science and technology projects of State Grid
* dence between MMS and IEC61850 and gives the ser-
Corporation (GYl7201200047) vices mapping correspondence between ACSI and MMS

Copyright © 2013 SciRes. OJAppS


F. ZHANG ET AL. 19

service, but it cannot be used in the standardization of by the function code(FC). We can complete the informa-
equipment condition monitoring access issues. tion model of one ASDU by the object-oriented model-
ing technology easily.
2. The Information Model and Mapping
2.3. The Mapping Model between Modbus, MMS
2.1. The information model of IEC61850 and
and IEC61850
MMS
After the above analysis, the mapping from Modbus to
The actual communication functions and device has been
MMS and IEC61850 is same to the flat-screen informa-
described in an abstract way in IEC61850.It defines the
tion points mapping to three-dimensional data objects.
five basic class model which include the Server, the
Figure 2 gives the mapping relationship between Mod-
logical device(LD),the logical node(LN),the data(Data),
bus, MMS and IEC61850. The correspondence is sepa-
the data attribute(DA).A Server includes multiple LD,
rated by dotted lines. In the figure, the address field is the
and each LD contains multiple LN, as well as each LN
slave address of the Modbus RTU as well as the unit
contains multiple Data. It can be seen that IEC61850
identifier of Modbus TCP.
information model is a hierarchical and three-dimen-
 The Information Mapping
sional object-oriented structure.MMS is kind of specific
communication service of IEC61850. The information Modbus address field is used to identify a condition
Model of MMS is consistent with IEC61850. Each MMS monitoring device, so the Modbus address field is
application must contain at least one VMD object. VMD mapped to logical device of IEC61850 and the domain
is the root in the object structure of the entire MMS, and model of MMS.DSA can be uniquely identifies a device
other objects are included in the VMD object. Some measuring point, so DSA is mapped to DA of IEC61850
types are included in the other sub-objects and become and the simple named variables. DS is represented the
deeper sub-object. number of the registers or coils and so on, therefore it
In view of the MMS and IEC61850 model structure will be mapped to the basic data types of IEC61850 and
and its modeling method can carry out a similar analysis that of MMS.
of the information structure of the Modbus protocol to
complete the Modbus information modeling. Modbus RTU Modbus TCP
Transaction identifier
2.2. Modbus and its Information Model (2 bytes)
M
Protocol identifier (2 B
GB/T 19582-2008 national standard gives two commu- Slave Address (1 byte) bytes) A
nication protocols about the Modbus Application proto- Byte Count (2 bytes) P
col and service standards which included the Modbus A
Unit identifier (1 byte)
serial link norms based on the TIA/EIA standard and the S Function Code (1 byte)
Function Code
D (1 byte)
Modbus TCP/IP protocol based on the RFC793 and
U Data Starting Data Starting Address P
RFC791 standard [11,12]. And the Modbus serial link D
Data area

Data area
Address (2 bytes) (2 bytes)
norms can divided into two communication modes of U
Data Size (2 bytes) Data Size (2 bytes)
Modbus RTU and Modbus ASCII. Modbus RTU and
Data Content Data Content
Modbus TCP are mostly supported in substation condi-
CRC error check code
tion monitoring equipment with its simple optimization (2 bytes)
feature. The Modbus parameter type is less, mainly in-
cludes coil, discrete, input registers and holding registers. Figure 1. The ASDU structure of Modbus.
The length of the first two is 1 bit, as the latter two is 2
bytes.
The Modbus data structure of the information is dif-
ferent from the IEC61850 and MMS which is a linear
plane. The information data is defined by a correspond-
ing Application Service Data Unit(ASDU). Figure 1
shows the ASDU structure of two types of Modbus. In
order to more clearly describe it contains information, we
will divide the Protocol Data Unit(PDU) to three parts
which contains the data starting address(DSA), data
size(DS) and data content(DC). DBA and DS here refer
to the read or write the starting address and the length of Figure 2. The mapping relationships between Modbus,
the parameter. The specific parameter type is determined MMS and IEC61850.

Copyright © 2013 SciRes. OJAppS


20 F. ZHANG ET AL.

 The Service Mapping 3.2. Realization of System Software


The function code specifies the different Modbus type
 Design of the Software Architecture
of service, so it should be established the mapping from
QT as the software development tools is used in the
Modbus FC to the ACSI services or MMS services. The
system. Figure 4 is the design of software structure dia-
relationship is shown in Table 1.
gram. The system overall is design for three layers which
include the top-level for MMS service layer, the mid-
3. The Realization of Protocol Conversion
dle-level for protocol conversion layer and the low-level
System Based on the Mapping Model
for Modbus service layer. The top-level provide MMS
3.1. Design of System Architecture services to communicate with the station monitoring unit
(SMU) or the standard client of IEC61850. If the service
We designed the following protocol conversion mode
request which get from SMU is correct, it will send the
based on the mapping model. Firstly, the point data
request to the middle-level. The MMS requested service
model of Modbus map to the variable of MMS, and then
data in MMS-EASE LITE is encapsulated in the struc-
to finish the mapping from MMS to ACSI. Finally, to
ture MVLU_XX_VA_CTRL, if the service is read, XX
complete the Modbus protocol conversion to IEC61850.
is RD, otherwise XX is WR. The low-level receive or
Figure 3 is a system architecture block diagram.The sub-
send Modbus messages as a Modbus Master to commu-
station online monitoring system Technical Guidelines
nicate with the condition monitoring devices(CMD). The
require the protocol conversion module should be deco-
Modbus response data information from the correct re-
rated in comprehensive monitoring unit(CMU) to support
sponse will be sent to the middle layer. The middle-level
multiple protocols translation of the state devices. In or-
will complete the analysis of MMS service data informa-
der to complete the following Modbus status monitoring
tion provided by upper and construct the corresponding
device communication, we need to design the modbus
Modbus request protocol frame to send to lower. And it
master model in protocol conversion module.
will complete the analysis of Modbus response data from
Table 1. The mapping table of modbus function code. lower and construct the corresponding MMS response
service to send to upper. The signals and slots mecha-
MMS Functional nism of QT has good characteristics of inter-thread
FC ACSI Service
Service Description
communication, so the information exchange of system
Read the single between the three layers can utilize the mechanism to
0x01,0x02 GetDataValues Read
point status data
complete. Figure 6 shows the signals and slots function
0x03,0x04 GetDataValues Read
Read the Integers, of the software design and identifies the relationships
floating point data between the different signals and slots. The solid line
Set the single point represents the system receives signals and slots from the
0x05,0x0F SetDataValues Write
of state control Modbus Response from CMD and the data flow. The
SetDataValues Set the control broken line represents the association of the signals and
0x06,0x10 Write
SetSGValues operation status slots after receipt of the MMS request and data flow.
 Design of Modbus class diagram

MMS MMS
Response Request

Signal and Slot Function Signal/Slot Description


mms_service_rd(MVLU_RD_VA_CTRL*)
SIGNAL
mms_service_wr(MVLU_WR_VA_CTRL*)
Top-layer
on_response_rd(MVLU_RD_VA_CTRL*) SLOT
on_response_wr(MVLU_WR_VA_CTRL*)
onWriteDataReady (QByteArray)
onRdResponse(MVLU_RD_VA_CTRL*) SIGNAL
onWrResponse(MVLU_WR_VA_CTRL*) Middle-
onRequestRd(MVLU_RD_VA_CTRL*) layer
onRequestWr(MVLU_WR_VA_CTRL*) SLOT
onRecieveData (QByteArray)
device_data_ready (QByteArray) SIGNAL
Low-layer
write_data_device (QByteArray) SLOT

Modbus Modbus
Response Request

Figure 3. The system architecture block diagram. Figure 4. The design of software structure diagram.

Copyright © 2013 SciRes. OJAppS


F. ZHANG ET AL. 21

We complete the Modbus information modeling with


the object-oriented approach. Figure 5 shows the Mod-
bus class diagram design. The ModbusFrame class is
used to describe the parameters of the Modbus ADU.
Establishing ModbusServer abstract class as an abstract
of the Modbus function can be inherited by different in-
terface communication protocols for service. Modbus-
ServerTCP and ModbusServerRTU inherited from Mod-
busServer what achieve the service of Modbus TCP and
Modbus RTU respectively. We established two subclasses
for ModbusServerRTU. The two subclasses are respon-
sible for building and parsing of the response or request
of the Modbus RTU. In addition, we create an abstract
class FrameBase. FrameBase can be inherited by differ-
ent subclass which is decided by function code and can
complete the building or parsing of different Modbus
frame.
 The process of software
Figure 6 shows the flowchart of the system software.
The system can be designed two threads, one thread is
used for receiving the MMS requests from SMU or
IEC61850 client, and another r is used for receiving the
Modbus response from CMD. As a CMU should connect
to multiple CMD, we provide a thread reincarnation
scanning up to four serial ports or network ports in order
to ensure the overall operating efficiency of the system.
It is to say we should increase the number of threads to
appropriate the number of devices. In addition, taking
into account the MMS communication frequency of the
upper and lower Modbus communication frequency in-
consistency, we establish the policy of the pipe.

-ModbusFrame * m_pframe -quint8 SlaveAddress


-FrameBase * m_pbaseframe -quint8 FC
-quint16 BeginAddress
-QByteArray Data
-quint16 CRC
-QByteArray FrameData
+bool InitialModbus()
+bool initialModbusFrame() +bool IsActiveModbus()
+QByteArray getRequestADU()
+int exeActionFC()
+void closeServer() +virtual QByteArray CreateModbusRequest()
+virtual void NormalResponseProcess()
+virtual void ExceptionResponseProcess()
+bool initialModbusFrame() Figure 6. The flow chart of software.
+QByteArray getRequestADU()
+int exeActionFC()()
+void closeServer() System need tree files at initialization time which in-
+QByteArray CreateModbusRequest()
+void NormalResponseProcess() clude the condition monitoring device description file,
+void ExceptionResponseProcess()
the device IED configuration file and the mapping asso-
ciated file. The device description file is given by the
+bool initialModbusFrame() +QByteArray CreateModbusRequest()
+int exeActionFC() +void NormalResponseProcess() production manufacturers. The file should contain the
+void closeServer() +void ExceptionResponseProcess()
representation method of the device data information in
Modbus PDU and so on.The device IED file is generated
+bool initialModbusFrame() +QByteArray CreateModbusRequest()
+QByteArray getRequestADU() +void NormalResponseProcess() by SCL configuration tools and should follow the SCL
+void closeServer() +void ExceptionResponseProcess()
modeling rules.The mapping associated files need manu-
ally or point table tool to carry out.In order to achieve the
+QByteArray CreateModbusRequest()
+void NormalResponseProcess() procedures of the system mapping relationship conven-
+void ExceptionResponseProcess()
iently and efficiently,A embedded relational database
Figure 5. Modbus class diagram. which is SQLite is needed to establish three relational

Copyright © 2013 SciRes. OJAppS


22 F. ZHANG ET AL.

tables as the mapping model. Table 2 shows the basic 4. Case Study
information mapping table for storage Modbus informa-
MMS-EASE LITE gives the corresponding IED con-
tiong and MMS variable mapping relationship. Table 3
figuration file of the interval controller E1Q1SB1. We
shows the writing services relationship and Table 4
will complete the mapping model of E1Q1SB1 by the
shows the reading services relationship. The initialization
protocol conversion method. First, MMS objects should
of database is to resolve the mapping associated file
be created according to the IED file to complete the
which establish by manual.
mapping from MMS to IEC61850 standard. Then the
Table 2. Basic information mapping table. mapping model should be established from MMS objects
to Modbus information model after the analysis of MMS
Field Type Description objects. In the example, we test a part of data objects and
properties of logical Node MMXU1 and LLN0. The Ta-
MMSVariable VarChar(65) MMS variable name ble 5 shows the testing objects. Finally, we will read or
write the phase current, line voltage and so on from the
SlaveAddress Int Modbus address area
analog interval controller by the IEC61850 standard cli-
StartAddress Int Modbus data starting address ent.
By simulation, we can convert the ACSI or MMS ser-
DataSize Int Modbus data size
vice request to corresponding Modbus request correctly
and return the corresponding Modbus request by the
Table 3. The service relationship of read. analog sub-station of Modbus. The system can parse the
information data integrally and return the response of
Field Type Description
ACSI or MMS correctly. In addition, the pipeline strat-
MMSVariable VarChar(65) MMS variable name egy makes the condition monitoring equipment and sta-
tion-side monitoring device to achieve asynchronous
Modbus Function Code communication and solves the inconsistent problem of
FunctionCode Int
(0x01~0x04) the communication frequency between MMS and Mod-
bus. The process and results of the test results show that
Table 4. The service relationship of write. the system is stable and reliable.

Field Type Description 5. Conclusions


The paper researches the information of MMS, IEC61850
MMSVariable Varchar(65) MMS variable name
and Modbus and their mapping relationship between
Modbus Function Code
their models firstly. The model can accurately describe
FunctionCode Int the point information and can be more easily achieved
(0x05,0x06,0x0F,0x10)
with MMS and IEC61850 mapping. According to the
Modbus information model, a protocol conversion
Table 5. A part of the data object of interval controller
mapping relationship. method is given by QT technology and MMS-EASE
LITE tools package then. The program not only facili-
MMS Modbus tates the realization of the protocol conversion, but also
provides a guideline to the private protocol which has a
Slave linear plane features mapping with IEC61850. Finally,
MMS objects FC DSA DS Description
address Interval controller as an example verifies the feasibility
MMXU1$MX$A$phs A phase
and correctness of the established mapping model and
01 04 0001 2 protocol conversion program. The testing results are sat-
A$cVal$mag$f current
isfactory.
MMXU1$MX$A$phsB B phase
01 04 0003 2
$cVal$mag$f current
REFERENCES
MMXU1$MX$A$phsC C phase
01 04 0005 2
$cVal$mag$f current [1] S. Li, Z. L. Jia and Z. H. Ying, “Reconstruction of
Non-integrated Automation Substation Based on
MMXU1$MX$PPV$p AB line IEC61850,” Electric Power Automation Equipment, Vol.
01 04 0007 2
hsAB$cVal$mag$f voltage 30, No. 5, 2010, pp. 139-141.
Device mode [2] State Grid Corporation, “Online Monitoring System of
LLN0$ST$Mod$stVal 01 0406 0011 2 Substation Equipment Technical Guidelines,” Beijing,
of operation
2011.

Copyright © 2013 SciRes. OJAppS


F. ZHANG ET AL. 23

[3] D. W. Wang, Y. L. Zhu and Y. Wang, “Condition Moni- 2009, pp. 63-66.
toring and Integrating Platform for Power Transmission [8] IEC61850-8-1 Communication networks and systems in
and Transformation Equipment Based on IEC61850,” substations, Part 8-1:Specific communication service
Automation of Electric Power Systems , Vol. 34, No. 13,
mapping(SCSM) — Mappings to MMS(ISO9606-1 and
2010, pp. 43-48.
ISO9506-2) and to ISO/IEC8802-3[S].2004.
[4] D. W. Wang, Y. Wang and J. Di, “Design Scheme of
Condition Monitoring System for Smart Substation,” [9] K. Dong, B. Guan and W. Wang, “Research on Mapping
Automation of Electric Power Systems, Vol. 35, No. 18, between IEC61850 and MMS,” Power System Protection
2011, pp. 51-56. and Control, Vol. 38, No. 10, 2010, pp. 92-95.

[5] J. Zhang and S. Z. Hou, “Research on IEC 61850 Sever [10] S. J. Wang, S. R. Ye and L. Zhang, “Analysis of Imple-
Application Based on MMSEASE Lite,” Telecommunica- menting the IEC61850 Model with MMS-EASE Lite,”
tions for Electric Power System, Vol. 32, No, 227, 2011, Instrumentation Technology, No. 6, 2009, pp. 50-53.
pp. 55-58. [11] GB/T19582.1-2008 National Standard of the People's
[6] D. W. Wang, C. Y. Yan and J. G. Bi, “An Approach to Republic of China “The Industrial Automation Network
Mapping Between Modbus and IEC61850 for Condition Specification Based on Modbus Part 1: Modbus Applica-
Monitoring Communication Gateway in Substations,” tion Protocol,” 2008.
Automation of Electric Power Systems, Vol. 36, No. 19, [12] GB/T19582.2-2008 National Standard of the People's
2010, pp. 78-84. Republic of China “The Industrial Automation Network
[7] W. L. Wang, G. H. Xu and Z. H. Zhu, “Research of Pro- Specification Based on Modbus Part 2: Modbus Protocol
tocol Gateway Device Based on CORBA Technology,” on the Serial Link Implementation Guide,” 2008.
Power System Protection and Control, Vol. 37, No. 7,

Copyright © 2013 SciRes. OJAppS

You might also like