You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Introduction

Being able to configure the way a protocol plugin will manage the communication with the remote servers or clients using the protocol stack parameters, whether communication is secured or not, how the messages attributes are translated from the input protocol data model to the output protocol data model and what kind of rules (filters, math, routing, etc..) to apply to the messages that are exchanges with the remote systems are key features of any protocol translation gateway.

In this design document we will be describing the implementation of the 3 main plugins configuration data models: protocol stack configuration (including application layer, transport layer and security layer), protocols translation configuration and exchanged datapoints configuration.

FledgePOWER being built on top of Fledge, all the configuration will be described using JSON data structures using nested objects and will be sent to the gateway using the provided HTTP API.

Overview Architecture

IEC 104 Protocol stack configuration

The IEC 104 protocol stack configuration specifies communication parameters and is a collection of entries containing information about OSI Transport and OSI Application layers objects.

Each entry is comprised of attributes that describe the object. All the configuration data are structured using JSON.

Each entry shall be mapped with the corresponding configuration function in the chosen implementation protocol library.

IEC 104 Master (client) Protocol stack configuration

{
   "protocol_stack":{
      "name":"iec104master",
      "version":"1.0",
      "transport_layer":{
         "connection":{
            "path":[
               {
                  "srv_ip":"10.132.145.115",
                  "clt_ip":"",
                  "port":2404
               },
               {
                  "srv_ip":"10.132.145.116",
                  "clt_ip":"",
                  "port":2404
               }
            ],
            "tls":"NONE"
         },
         "k_value":12,
         "w_value":8,
         "t0_timeout":10,
         "t1_timeout":15,
         "t2_timeout":10,
         "t3_timeout":20,
         "all_conn":true,
         "all_start":false,
         "passive_conn":false
      },
      "application_layer":{
         "orig_size":1,
         "orig_addr":"",
         "ca_asdu_size":2,
         "ioaddr_size":3,
         "startup_time":180,
         "asdu_size":0,
         "gi_time":60,
         "gi_cycle":0,
         "gi_all_ca":false,
         "gi_repeat_count":2,
         "disc_qual":"NT",
         "send_iv_time":0,
         "tsiv":"REMOVE",
         "tz":"UTC",
         "tz_source":"system",
         "comm_wttag":false,
         "comm_parallel":0,
         "exec_cycl_test":false,
         "startup_state":"active"
      }
   }
}

IEC 104 Slave (server) Protocol stack configuration

{
  "protocol_stack": {
    "name": "iec104slave",
    "version": "1.0",
    "transport_layer": {
      "bind_on_ip": "FALSE",
      "port": 2404,
      "tsecurity": "NONE",
      "k_value": 12,
      "w_value": 8,
      "t1_timeout": 15,
      "t2_timeout": 10,
      "t3_timeout": 20,
      "open_new_path": "TRUE",
      "bind_on_active": "FALSE",
      "disc_on_iframe": "TRUE"
    },
    "application_layer": {
      "orig_size": 1,
      "orig_addr": "0",
      "ca_asdu_size": 2,
      "ioaddr_size": 3,
      "struct_addr": "FALSE",
      "asdu_size": 0,
      "default_class": "CLASS1",
      "time_sync": "FALSE",
      "comm_exec_timeout": 20000,
      "comm_recv_timeout": 5000,
      "auto_comm_actcon": "FALSE",
      "auto_comm_actterm": "TRUE",
      "cmd_block_sel": "FALSE",
      "abs_time": "TRUE",
      "tzsource": "OS",
      "set_wday": "TRUE",
      "tsiv": "IGNORE",
      "spon_in_passive": "TRUE",
      "reset": "TRUE",
      "filter_orig": "FALSE",
      "lifeact": "TRUE",
      "startup": "FALSE",
      "active": "TRUE"
    }
  }
}

IEC 104 exchanged ASDU configuration

In this chapter we will describe the configuration of the exchanged ASDU. This configuration allow to specify a list of supported ASDU types and a list of ASDU objects. The protocol plugin is expected to make some controls against each entry of the configuration to check:

  • if CA of ASDU is known otherwise throw an error message.
  • if IOA is known otherwise throw an error message.
  • if type of ASDU is known otherwise an error message.
  • The label attribute shall be used to populate the Fledge's DataPoint Asset Name attribute.


{
   "exchanged_data_layer":{
      "name":"iec104_south_conf",
      "version":"1.0",
      "asdu_list":[
         {
            "ca":"41025",
            "type_id":"M_ME_NA_1",
            "label":"TM-1",
            "ioa":"4202832"
         },
         {
            "ca":"41025",
            "type_id":"M_ME_NA_1",
            "label":"TM-2",
            "ioa":"4202852"
         },
         {
            "ca":"41025",
            "type_id":"M_SP_TB_1",
            "label":"TS-1",
            "ioa":"4206948"
         }
      ]
   }
}


Pivot format definition

Before diving into the details of the specification, it is useful to illustrate some use cases. They should help demonstrate how the specification is expected to be used and to help understand the benefits of a pivot format.

The objective of a gateway is to allow communication between different systems by providing some translation mechanisms from one means of communication to another one.

All translation mechanisms introduce a limitation of functionality in the translated space compared to the original space. The major challenge is to provide some correspondences between the two systems, with a limited impact to the original scope of features.

Use case 1: monitoring

In this use case, monitoring data are acquired from a field device called RTU (Remote Terminal Unit) which acts as a IEC 104 server (slave) and are exposed to the central SCADA which acts as a ICCP TASE.2 client. Each incoming message from the RTU comes as an IEC 104 ASDU object. The south service plugin applies a first translation process which consists of (1) reading and checking the ASDU object using the IEC 104 data model and (2) mapping each data attribute to the corresponding pivot format data attribute. Once the message is converted to a pivot format object, it can then be stored or consumed by the north or any other service. The north service plugin can then apply a second translation process which consists of (3) reading and checking the pivot format object using the pivot format data model and (4) mapping each data attribute to the corresponding TASE.2 data attribute. The resulting TASE.2 object can then be exposed to the TASE.2 client by the north service plugin.

Use case 2: monitoring and control

In this use case data flows in two directions: monitoring and control.

Monitoring data are acquired from a field device called IED (Intelligent Electronic Device) which acts as a 61850 MMS server and are exposed to the central SCADA which acts as a OPC UA client. Each incoming message from the IED comes as a 61850 MMS object. The south service plugin applies a first translation process which consists of (1) reading and checking the 61850 MMS object using the 61850 MMS data model and (2) mapping each data attribute to the corresponding pivot format data attribute. Once the message is converted to a pivot format object, it can then be stored or consumed by the north or any other service. The north service plugin can then apply a second translation process which consists of (3) reading and checking the pivot format object using the pivot format data model and (4) mapping each data attribute to the corresponding OPC UA data attribute. The resulting OPC UA object can then be exposed to the OPC UA client by the north service plugin.

Control data are received from the control center SCADA which acts as a OPC UA client and are sent to the IED which acts as a 61850 server. Each incoming message from the control center SCADA comes as an OPC UA object. The north service plugin applies a first translation process which consists of (1) reading and checking the OPC UA object using the OPC UA data model and (2) mapping each data attribute to the corresponding pivot format data attribute. Once the message is converted to a pivot format object, it can then be stored or consumed by the south or any other service. The south service plugin can then apply a second translation process which consists of (3) reading and checking the pivot format object using the pivot format data model and (4) mapping each data attribute to the corresponding 61850 MMS data attribute. The resulting 61850 MMS object can then be exposed to the 61850 client by the south service plugin.

Benefits and challenges of a pivot format

Benefits

The main benefit of the pivot format is it allows decoupling the protocols data model from each other. Each south or north plugin deals with the complexity and the specifics of a given protocol without interfering with the core of the gateway or with another south/north plugin. Adding new protocol plugins or maintaining existing ones is then made much easier. This contributes in maintaining the whole gateway system at a low level of complexity thus minimizing the costs of new developments or maintenance.

Challenges

In order to reach the goal of simplicity we want to achieve, the main challenge is to be able to build a pivot format that is technically independent from the protocols. The data model should also be neutral regarding protocols data models.

Pivot format design proposition

pivot_format_data_model
{
   "data_object_header":{
      "doh_type":"some_value",
      "doh_name":"some_value",
      "doh_ca":"some_value",
      "doh_oa":"some_value",
      "doh_cot":"some_value",
      "doh_test":"some_value",
      "doh_negative":"some_value",
      "doh_version":"some_value",
      "doh_src_prot":"some_value"
   },
   "data_object_item":{
      "doi_ioa":"some_value",
      "doi_value":"some_value",
      "doi_qual_class":"some_value",
      "doi_quality":"some_value",
      "doi_current_src":"some_value",
      "doi_normal_src":"some_value",
      "doi_normal_value":"some_value",
      "doi_ts_class":"some_value",
      "doi_ts":"some_value",
      "doi_ts_qual":"some_value",
      "doi_ts_sum_time":"some_value",
      "doi_ts_subs":"some_value",
      "doi_cov_class":"some_value",
      "doi_cov_counter":"some_value"
   }
}

The pivot format uses JSON with a header and item structure.

The header object holds the common attributes of a telecontrol message.

Each item object holds the specific attributes of an information point whether it is a measurement, a state, a command, etc...

IEC 104 to pivot format translation

IEC 104 ASDU data model

Reference: NF EN 60870-5-101 § 7.3.1.22

TYPE IDENT 30: M_SP_TB_1

DATA UNIT IDENTIFIER

TYPE IDENTIFICATION
VARIABLE STRUCTURE QUALIFIER
CAUSE OF TRANSMISSION
COMMON ADDRESS OF ASDU

INFORMATION OBJECT 1

INFORMATION OBJECT ADDRESS
SIQ
CP56Time2a

INFORMATION OBJECT i

INFORMATION OBJECT ADDRESS
SIQ
CP56Time2a

IEC 104 to pivot format conversion configuration model

{
   "protocol_translation_layer":{
      "name":"iec104_to_pivot",
      "version":"1.0",
      "mapping":{
         "data_object_header":{
            "doh_type":"type_id",
            "doh_ca":"ca",
            "doh_oa":"oa",
            "doh_cot":"cot",
            "doh_test":"istest",
            "doh_negative":"isnegative"
         },
         "data_object_item":{
            "doi_ioa":"ioa",
            "doi_value":"value",
            "doi_quality":"quality_desc",
            "doi_ts":"time_marker",
            "doi_ts_flag1":"isinvalid",
            "doi_ts_flag2":"isSummerTime",
            "doi_ts_flag3":"isSubstituted"
         }
      }
   }
}

Conversion process

NB: The conversion process shall produce as many pivot format objects as information objects in the source ASDU.

Pivot format resulting object

{
   "data_object_header":{
      "doh_type":"some_value",
      "doh_name":"not_populated",
      "doh_ca":"some_value",
      "doh_oa":"some_value",
      "doh_cot":"some_value",
      "doh_test":"some_value",
      "doh_negative":"some_value",
      "doh_version":"some_value",
      "doh_src_prot":"some_value"
   },
   "data_object_item":{
      "doi_ioa":"some_value",
      "doi_value":"some_value",
      "doi_qual_class":"not_populated",
      "doi_quality":"some_value",
      "doi_current_src":"not_populated",
      "doi_normal_src":"not_populated",
      "doi_normal_value":"not_populated",
      "doi_ts_class":"not_populated",
      "doi_ts":"some_value",
      "doi_ts_qual":"some_value",
      "doi_ts_sum_time":"some_value",
      "doi_ts_subs":"some_value",
      "doi_cov_class":"not_populated",
      "doi_cov_counter":"not_populated"
   }
}

Pivot format to IEC 104 translation

Pivot format to IEC 104 conversion configuration model

{
   "protocol_translation_layer":{
      "name":"pivot_to_iec104",
      "version":"1.0",
      "mapping":{
         "data_object_header":{
            "type_id":"doh_type",
            "ca":"doh_ca",
            "oa":"doh_oa",
            "cot":"doh_cot",
            "istest":"doh_test",
            "isnegative":"doh_negative"
         },
         "data_object_item":{
            "ioa":"doi_ioa",
            "value":"doi_value",
            "quality_desc":"doi_quality",
            "time_marker":"doi_ts",
            "isinvalid":"doi_ts_qual",
            "isSummerTime":"doi_ts_sum_time",
            "isSubstituted":"doi_ts_subs"
         }
      }
   }
}

Conversion process

IEC 104 ASDU resulting object

DATA UNIT IDENTIFIER

TYPE IDENTIFICATION
VARIABLE STRUCTURE QUALIFIER
CAUSE OF TRANSMISSION
COMMON ADDRESS OF ASDU

INFORMATION OBJECT 1

INFORMATION OBJECT ADDRESS
SIQ
CP56Time2a

ICCP TASE.2 to pivot format translation

DataValue Indication Point data model

PointName
PointType
PointRealValue
PointStateValue
PointDiscreteValue
QualityClass
Validity
CurrentSource
NormalSource
NormalValue
TimeStampClass
TimeStamp
TimeStamp Quality
COVClass
COVCounter

ICCP TASE.2 to pivot format conversion configuration model

{
   "protocol_translation_layer":{
      "name":"tase2_to_pivot",
      "version":"1.0",
      "mapping":{
         "data_object_header":{
            "doh_type":"PointType",
			"doh_name":"PointName"
         },
         "data_object_item":{
            "doi_value":"PointRealValue", //PointStateValue or PointDiscreteValue
            "doi_qual_class":"QualityClass",
            "doi_quality":"Validity",
            "doi_current_src":"CurrentSource",
            "doi_normal_src":"NormalSource",
            "doi_normal_value":"NormalValue",
            "doi_ts_class":"TimeStampClass",
            "doi_ts":"TimeStamp",
            "doi_ts_qual":"TimeStamp Quality",
            "doi_cov_class":"COVClass",
            "doi_cov_counter":"COVCounter"
         }
      }
   }
}

Conversion process

Pivot format resulting object

{
   "data_object_header":{
      "doh_type":"some_value",
      "doh_name":"some_value",
      "doh_ca":"not_populated",
      "doh_oa":"not_populated",
      "doh_cot":"not_populated",
      "doh_test":"not_populated",
      "doh_negative":"not_populated",
      "doh_version":"some_value",
      "doh_src_prot":"some_value"
   },
   "data_object_item":{
      "doi_ioa":"not_populated",
      "doi_value":"some_value",
      "doi_qual_class":"some_value",
      "doi_quality":"some_value",
      "doi_current_src":"some_value",
      "doi_normal_src":"some_value",
      "doi_normal_value":"some_value",
      "doi_ts_class":"some_value",
      "doi_ts":"some_value",
      "doi_ts_qual":"some_value",
      "doi_ts_sum_time":"not_populated",
      "doi_ts_subs":"not_populated",
      "doi_cov_class":"some_value",
      "doi_cov_counter":"some_value"
   }
}

Pivot format to ICCP TASE.2 translation

Pivot format to ICCP TASE.2 conversion configuration model

{
   "protocol_translation_layer":{
      "name":"pivot_to_tase2",
      "version":"1.0",
      "mapping":{
         "data_object_header":{
            "PointType":"doh_type",
			"PointName":"doh_name"
         },
         "data_object_item":{
            "PointRealValue": "doi_value", //PointStateValue or PointDiscreteValue
            "QualityClass":"doi_qual_class",
            "Validity":"doi_quality",
            "CurrentSource":"doi_current_src",
            "NormalSource":"doi_normal_src",
            "NormalValue":"doi_normal_value",
            "TimeStampClass":"doi_ts_class",
            "TimeStamp":"doi_ts",
            "TimeStamp Quality":"doi_ts_qual",
            "COVClass":"doi_cov_class",
            "COVCounter":"doi_cov_counter"
         }
      }
   }
}

Conversion process

  • No labels