# IEC 61850 MMS Protocol

Description of the IEC 61850 MMS protocol implementation in the Typhoon HIL toolchain.

IEC 61850 (IEC 61850 – Communication Networks and Systems in Substations) standard defines MMS protocol (Manufacturing Message Specification) as a server/client type communication. This protocol is used for information exchange between IEDs (IED – Intelligent Electronic Device) and higher level devices (such as SCADAs) over the Ethernet. The MMS protocol is mapped on TCP/IP and enables the access to server based on its IP address where client can read/write data, read configuration and exchange files.

IEC 61850 is an object oriented standard. Each physical device consists of logical devices (LD), logical nodes (LN), data objects (DO) and data attributes (DA) as illustrated in the figure below.. The name of each object of IEC 61850 is standardised. Also, IEC 61850 standardizes the access of each object.

Each physical device can consist of one or more logical devices. Logical device is made up of logical nodes, where each logical node defines one function of the IED device. Each logical node consists of mandatory and optional data objects defined by the standard, and each data object has predefined data attributes. Data attributes represent the leafs of this tree structure. An example of IED configuration is illustrated on the figure below. The IED has one logical devise called LD1. There are multiple logical nodes that model one functionality of the IED. For example, XCBR models circuit breaker, CSWI models, switch controller, XSWI models circuit switch and MMXU models measurements. XCBR node has data object Pos that represent the information of the breaker position. Pos has stVal (state value), q (quality), t (time stamp) and other data attributes.

The access to each object in the configuration is also standardised. For example, to read stVal of circuit breaker SXCBR1, the path would be LD1/SXCBR1$Pos$stVal. The client can also access the information of whole data object. For example LD1/SXCBR1$Pos path is used to read all attributes of Pos object of the circuit breaker. ## Data sets and reporting The IEC 61850 enables the arbitrary data to be grouped together to form Data Sets. Data set can group any object in the configuration. For example data set can group Mod data object and Pos$stVal data attribute of circuit breaker node with object or attributes of MMXU node, or even the whole MMXU node.

This data sets are essential part of reporting. Reporting is used to inform the client that the data has changed withouth the need for client to issue a read request. Each reporting block has a reference to one data set. If one element of the data set changes value, the report (containing information for every element of the data set) will be sent to the client.

## MMS protocol in Typhoon HIL tool chain

MMS protocol is implemented through MMS Server inside the Typhoon HIL tool chain. The MMS Server is modeled using Signal Processing component.

## MMS Server component

MMS Server component is shown in Table 1, whereas MMS Server dialog window is shown in Figure 3.

Table 1. MMS Server component
component component properties
• Import SCL file
• Chose IED to simulate
• Server IP address
• Server Netmask
• Server Gateway
• Execution rate

Property description for MMS Server component is given in the table below.

Table 2. MMS Server property description
Property name description
Import SCL file An SCL configuration file is imported using this button.
Choose IED to simulate Choose IED to simulate if SCL configuration has multiple IEDs defined.
Server IP address Server IP address value
Server Netmask Server Netmask value
Server Gateway Server Gateway value
Execution rate Execution rate of the MMS Server component

Once the SCL file is loaded in the dialog, the file is parsed and a tree view of the IED is generated. An example of this view is shown on the Figure 4.

The view can be split into 4 parts:
1. In this window SCL structure is presented to the dept of Logical Node for easier navigation through the configuration. Also Data Sets and Report Blocks are shown here. The acronyms are:
• IED - Inteligente Electronic Device defined in the configuration
• AP - Access Point
• LD - Logical Device
• LN - Logical Node
• DS - Data Set
• RP - Reporting Block
2. Detailed information about the Data Sets and Reporting Blocks are shown in this window. The information about the Data Set consists of the elements of that Data Set. The information about the Reporting Block consists of reported Data Set, integrity period, buffering options, triggering options, and other fields.
3. Detailed information about each Logical Node is shown here. Information about Data Objects and Data Attributes can be viewed and changed here.
4. Identify service response items. These values are returned to Client when identifying the server.
5. Full path of the SCL file is shown here. If the path to the SCL file is changed, it can be changed here instead of importing the file again and changing the Server parameters.

## MMS Server attribute manipulation

Server attribute information can be modified in the window marked with the number 3 on the previous picture. The following information about the attributes are shown:
• Object - The name of the Data Object and Data Attribute
• Type - Class of the Data Object and type of the Data Attribute as defined in the SCL file
• Triggering - triggering options of the Data Attribute. Triggering can be on data change (dchg), data update (dupd) or quality change (qchg). Triggering option defines when the reporting will be generated.
• Value - value of the Data Attribute
• Include - if include is enabled, appropriate signal terminal will be created on the component that alows the user to connect the simulation signal to the MMS Server component
• Direction - specify the direction of the signal terminal
• Alias - if alias is not defined, the terminal label will be generated following the pattern LDname_LNname_DOname_DAname. If the alias is defined, the terminal label will be the same as alias.

## MMS Server capabilities

MMS Server modeled in the Typhoon HIL tool-chain enables only the interface to the Data Attributes and does not model how these attributes are controlled in real life applications. In other words, the MV (Measured Values) common data class ,defined by the IEC 61850 standard, dictates that the mag attribute is updated using instMag value in such a way that if the instMag value is changed more than the threshold value, the mag value will be updated accordingly. On the other hand, the threshold value is defined by the values of db (dead band), min and max attributes. Similar, the range attribute value is defined by the value defined by the rangeC (range configuration) attribute. Quality is also updated according to range and mag values.

Although this is not modeled automatically, it is possible to model this functionality using Signal Processing components. The example of achieving the this is demonstrated in the MMS Server example.

MMS Server implemented in Typhoon HIL tool-chain also supports the mechanism of reporting. The reporting blocks must be properly defined in the SCL.

## MMS Server example

The example of a MMS Server is located in the example folder under the examples\models\communication\IEC 61850 MMS Server. The example model shows how to define the values of attributes, how to connect attributes with the signals from the model and how to achieve the proper functionality of MV (Measured Values) data class as defined by the IEC 61850 standard.

The example model is shown on the Figure 5. The SCL file that is imported is the demo.icd file, which is also located in the example folder. The attributes defined and their values are the same as in figure Figure 4. Once the attribute include and direction fields are defined, appropriate terminals will be created on the component. This terminals are used to connect the Server values to the model. General concept is that everything that the Client reads from the simulation is defined as an input to the component and everything that the Client writes to the simulation is defined as an output.

The subsystem called MV implements the functionality od Measured Values data class as defined by the standard. The content of the MV subsystem is shown on the figure Figure 6.

The value of instMag is used to calculate the value of mag attribute. Also, this values is directly connected to the instMag terminal of the Server component. The value of mag is updated every time the value of instMag is changed more than the dbDelta value. Value of dbDelta is calculated using the following expression:

dbDelta = (max - min)/100000 * db

as defined by the standard. The value of zeroDb is used in the similar fashion to define the threshold around the zero value.

The value of range is defined by the instMag value and the range configuration values (min, max, hhLim, hLim, lLim and llLim). The value of q (quality) is refined by the range value. The scale is:
• insMag > max - range is high-high, q is out of range and questionable
• max > instMag > hhLim - range is high-high
• hhLim > instMag > hLim - range is high
• hLim > instMag > lLim - range is normal
• lLim > instMag > llLim - range is low
• llLim > instMag > min - range in low-low
• min > instMag - range is low-low, q is out of range and questionable

Because all the range configuration attributes are defined as output terminals, Client can change these values and range will be calculated accordingly.

Time synchronization

If there is a need for time synchronization, please take a look at Time synchronization.

## Virtual HIL support

Virtual HIL currently does not support this protocol. When using a Virtual HIL environment (e.g. when running the model on a local computer), inputs to this component will be discarded and outputs from this component will be zeroed.