...
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
...
Functional architecture
draw.io Diagram | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
draw.io Diagram border true diagramName fp_conf_data simpleViewer false widthlinks auto tbstyle top lbox true diagramWidth 741 revision 1
Protocol translation
Pivot
...
object 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 formatobject.
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
Single Substation/RTU gateway
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 object 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.
Multiple Substation/RTU gateway
In this alternative scenario, the gateway is connected to multiple RTUs located in multiple substations. Each South plugin (IEC 104 client) is connected to an RTU (IEC 104 server) to collect data. The collected data flow then through the Storage and the North plugin (TASE.2) to expose data to the SCADA.
Use case 2: monitoring and control
Single Scada/single protocol
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 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 object 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 object 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 object 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 object 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
Code Block | ||||
---|---|---|---|---|
| ||||
{
"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 south plugin (client/master)
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.
Attributes definition
...
maximum ASDU size in transmission direction, if set to "0" => maximum possible value is automatically used.
...
Multiple Scadas/multiple protocols
In this alternative scenario, the gateway is connected to multiple SCADAs using two different protocols. The North plugin (TASE.2) exposes data to the TASE.2 SCADA and the North plugin OPC UA exposes data to the OPC UA SCADA. Instead of having a one to one translation process (61850 to TASE.2, 61850 to OPC UA, TASE.2 to 61850, OPC UA to 61850), we use the pivot object to transmit data from 61850 to both TASE.2 and OPC UA. The translation process is done only once for each protocol.
Benefits and challenges of a pivot object
Benefits
The main benefit of the pivot object 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 object that is technically independent from the protocols. The data model should also be neutral regarding protocols data models. The protocol translation should not imply a loss or degradation of the source information, especially in the case where the input and output protocols are identical.
Global process from data acquisition to data exposition
This is an illustration with IEC 104 as input protocol and IEC 104, TASE.2 and OPC UA as output protocols.
We have defined here 3 data processing pipelines (see Fledge documentation about Data processing for more details.)
IEC 104 to IEC 104 direct translation : (1) => (5)
IEC 104 to TASE.2 protocols conversion : (1) => (2) => (3) => (6)
IEC 104 to OPCUA protocols conversion: (1) => (2) => (4) => (7)
Process steps:
(1) IEC 104 ASDU acquisition using the iec104 south plugin, the output is a Datapoint representing the input message.
(2) From IEC 104 to Pivot conversion using the 104toPivot filter plugin, the output is a Datapoint representing a Pivot object of a specific datatype.
(3) Pivot To Tase2 conversion using the PivotToTase2 filter plugin, the output is a Datapoint representing a TASE.2 object of a specific datatype.
(4) Pivot To Opcua conversion using the PivotToOpcua filter plugin, the output is a Datapoint representing a OPCUA object of a specific datatype.
(5) IEC 104 ASDU exposition using the iec104 north plugin, the output is a IEC 104 ASDU.
(6) TASE.2 exposition using the tase2 north plugin, the output is a TASE.2 indication point.
(7) OPCUA exposition using the opcua north plugin, the output is a OPCUA object.
draw.io Diagram | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Pivot object model
The pivot object model is based on 61850 semantic.
PIVOT TM model, representation of a tele measurement
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
PIVOT.GTIM.Beh.stVal | ? | ||
PIVOT.GTIM.Cause.stVal | Cause of transmission | COT Cause of Transmission - FledgePower - LF Energy | Yes |
PIVOT.GTIM.ChgValCnt.stVal | ? | ||
PIVOT.GTIM.ComingFrom | Source protocol name | IEC103, IEC104, TASE.2, OPCUA, 61850, etc... | Yes |
PIVOT.GTIM.Confirmation.stVal | Indicates positive or negative confirmation of activation | true, false, DEFAULT=false | |
PIVOT.GTIM.Identifier | Unique identifier of the pivot object | Any non-empty string | Yes |
PIVOT.GTIM.{CDC} | Common Data Class representing the information object | MVTyp | Yes |
PIVOT.GTIM.NormalSrc.stVal | ? | ||
PIVOT.GTIM.NormalVal.stVal | ? | ||
PIVOT.GTIM.TmOrg.stVal | Timestamp origin, genuine = source otherwise substituted | genuine, substituted, DEFAULT = genuine | Yes |
PIVOT.GTIM.TmValidity.stVal | Timestamp validity | valid, invalid, DEFAULT = valid | Yes |
Example of a pivot model instance representing a Tele Measurement:
Code Block | ||
---|---|---|
| ||
{
"@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
"PIVOT": {
"GTIM": {
"Beh": {
"stVal": "on"
},
"Cause": {
"stVal": 1
},
"ChgValCnt": {
"stVal": 1
},
"ComingFrom": "String",
"Confirmation": {
"stVal": true
},
"Identifier": "String",
"MvTyp": {
"mag": {
"f": 0.1,
"i": 1
},
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"NormalSrc": {
"stVal": "TELEMETERED"
},
"NormalVal": {
"stVal": "NORMAL"
},
"Origin": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": "String",
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"TmOrg": {
"stVal": "genuine"
},
"TmValidity": {
"stVal": "VALID"
}
}
}
} |
PIVOT TS model, representation of a tele signal
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
PIVOT.GTIS.Beh.stVal | ? | ||
PIVOT.GTIS.Cause.stVal | Cause of transmission | COT Cause of Transmission - FledgePower - LF Energy | Yes |
PIVOT.GTIS.ChgValCnt.stVal | ? | ||
PIVOT.GTIS.ComingFrom | Source protocol name | IEC103, IEC104, TASE.2, OPCUA, 61850, etc... | Yes |
PIVOT.GTIS.Confirmation.stVal | Indicates positive or negative confirmation of activation | true, false, DEFAULT=false | |
PIVOT.GTIS.Identifier | Unique identifier of the pivot object | Any non-empty string | Yes |
PIVOT.GTIS.{CDC} | Common Data Class representing the information object | SPSTyp, DPSTyp, BSCTyp | Yes |
PIVOT.GTIS.NormalSrc.stVal | ? | ||
PIVOT.GTIS.NormalVal.stVal | ? | ||
PIVOT.GTIS.TmOrg.stVal | Timestamp origin, genuine = source otherwise substituted | genuine, substituted, DEFAULT = genuine | Yes |
PIVOT.GTIS.TmValidity.stVal | Timestamp validity | valid, invalid, DEFAULT = valid | Yes |
Example of a pivot model instance representing a Tele Signal:
Code Block | ||
---|---|---|
| ||
{
"@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
"PIVOT": {
"GTIS": {
"Beh": {
"stVal": "on"
},
"Cause": {
"stVal": 1
},
"ChgValCnt": {
"stVal": 1
},
"ComingFrom": "String",
"Confirmation": {
"stVal": true
},
"DpsTyp": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": "intermediate-state",
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"Identifier": "String",
"NormalSrc": {
"stVal": "TELEMETERED"
},
"NormalVal": {
"stVal": "NORMAL"
},
"Origin": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": "String",
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"SpsTyp": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": true,
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"TmOrg": {
"stVal": "genuine"
},
"TmValidity": {
"stVal": "VALID"
}
}
}
} |
PIVOT TC model, representation of a tele command
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
PIVOT.GTIC.Beh.stVal | defines different behaviours of a control object: - Direct control with normal security: dct-ctl-wns | enum: dct-ctl-wns, dct-ctl-wes, sbo-ctl-wns, sbo-ctl-wes, DEFAULT = dct-ctl-wes | No |
PIVOT.GTIC.Cause.stVal | Cause of transmission | COT Cause of Transmission - FledgePower - LF Energy | No |
PIVOT.GTIC.ComingFrom | Source protocol name | IEC103, IEC104, TASE.2, OPCUA, 61850, etc... | Yes |
PIVOT.GTIC.DevId.name | ? | No | |
PIVOT.GTIC.{CDC} | Common Data Class representing the information object | SPCTyp, DPCTyp, INCTyp, APCTyp, BSCTyp | Yes |
PIVOT.GTIC.Identifier | Unique identifier of the pivot object | Any non-empty string | Yes |
PIVOT.GTIC.Qu.stVal | ? | No | |
PIVOT.GTIC.ServiceType.stVal | ? | No | |
PIVOT.GTIC.Tag.stVal | ? | No | |
PIVOT.GTIC.TagClass | ? | No | |
PIVOT.GTIC.TaggedReason | ? | No | |
PIVOT.GTIC.TmOrg | Timestamp origin, genuine = source otherwise substituted | genuine, substituted, DEFAULT = genuine | No |
PIVOT.GTIC.TmStamp | Timestamp | No |
Example of a pivot model instance representing a Tele Command:
Code Block | ||
---|---|---|
| ||
{
"@xmlns:xs": "http://www.w3.org/2001/XMLSchema",
"PIVOT": {
"GTIC": {
"Beh": {
"stVal": "dct-ctl-wes"
},
"Cause": {
"stVal": 1
},
"ComingFrom": "String",
"DevId": {
"name": "String"
},
"DevSt": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": true,
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"DpcTyp": {
"ctlVal": true,
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": "intermediate-state",
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"Identifier": "String",
"Qu": {
"stVal": 1
},
"ServiceType": {
"stVal": "select"
},
"SpcTyp": {
"ctlVal": true,
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": true,
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"Tag": {
"stVal": "NO-TAG"
},
"TagClass": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": true,
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
},
"TaggedReason": "String",
"TmOrg": {
"stVal": "genuine"
},
"TmStamp": {
"q": {
"DetailQuality": {
"badReference": true,
"failure": true,
"inconsistent": true,
"innacurate": true,
"oldData": true,
"oscillatory": true,
"outOfRange": true,
"overflow": true
},
"Source": "process",
"Validity": "good",
"operatorBlocked": true,
"test": true
},
"stVal": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
},
"t": {
"FractionOfSecond": 1,
"SecondSinceEpoch": 1,
"TimeQuality": {
"clockFailure": true,
"clockNotSynchronized": true,
"leapSecondKnown": true,
"timeAccuracy": 1
}
}
}
}
}
} |
Protocol translation process
draw.io Diagram | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Exchanged data configuration
In this chapter we will describe the configuration of the exchanged data. This configuration allow to specify a list of supported data objects. The protocol plugin is expected to make some controls against each entry of the configuration to check:
- if protocol message address or reference is known otherwise throw an error message.
- if protocol type of message is known otherwise throw an error message.
- The label attribute shall be used to populate the Fledge's DataPoint Asset Name attribute.
Attributes definition
Attribute | Description | Expected values | Mandatory |
---|---|---|---|
name | this identifies the exchanged data configuration | Yes | |
version | this is the version number of the configuration | x.y where x represents a major version and y a minor change | Yes |
datapoints | array of datapoints that needs to be managed by the instance of the gateway | Yes | |
datapoints.label | label of the datapoint | any non empty string | Yes |
datapoints.pivot_id | unique identifier of the datapoint, this is used to create a pivot object | any non empty string | Yes |
datapoints.pivot_type | type of Common Data Class (CDC), this is used to create a pivot object | enum SpsTyp | DpsTyp | MvTyp | SpcTyp | DpcTyp | ... | Yes |
datapoints.pivot_subtypes | array of additional types of the pivot object | [transient, ...] | No |
datapoints.tfid | identifies the math function to transform the input value | enum "normal" | "square_root" | "quadratic" | "transparent" | No |
datapoints.params | array of parameters for the math function | array of float 32 [a, b, c, ...] | No |
datapoints.deadband | band of input values where the output is zero | array of 2 float 32 [min, max] | No |
datapoints.protocols | array of protocols that needs to be managed for a datapoint | Yes | |
datapoints.protocols.name | name of the protocol | enum "iec104" | "iec103" | "tase2" | "hnz" | "61850" | "opcua" | ... | Yes |
datapoints.protocols.address | address of the datapoint in the given protocol | any non empty string | Yes |
datapoints.protocols.typeid | type id of the datapoint in the given protocol | any non empty string representing a valid protocol type id | Yes |
datapoints.protocols.gi_groups | GI request status for north plugins, if "station" then datapoint is send for south plugins, it determines whether a datapoint is expected in the GI response | enum station | 1 | 2 | ... | No |
datapoints.protocols.alternate_mapping_rule | Alternate mapping rule to convert datapoint from protocol model to pivot or pivot to protocol model, if not specified then default conversion rule is applied | any non empty string representing a function name | No |
datapoints.operations | array of operations applied to produce a value for the current datapoint out of one or more input datapoints | No | |
datapoints.operations.operation | type of operation to perform | enum "or" | No |
datapoints.operations.input | array of Pivot ID of datapoints to use as inputs for the operation | array of Pivot ID strings | No |
Configuration JSON structure
Code Block | ||
---|---|---|
| ||
{
"exchanged_data":{
"name":"SAMPLE",
"version":"1.0",
"datapoints":[
{
"label":"TS1",
"pivot_id":"ID114562",
"pivot_type":"SpsTyp",
"pivot_subtypes":[
"transient"
],
"operations":[
{
"operation":"or",
"input":[
"ID114562",
"ID114563"
]
}
],
"protocols":[
{
"name":"iec104",
"address":"45-672",
"typeid":"M_SP_TB_1",
"gi_groups":"station",
"alternate_mapping_rule":"func_name_1"
},
{
"name":"tase2",
"address":"S_114562",
"typeid":"Data_StateQTimeTagExtended"
},
{
"name":"opcua",
"address":"ID114562",
"typeid":"opcua_sps"
},
{
"name":"iec61850",
|
Configuration JSON file structure
Code Block | ||
---|---|---|
| ||
{
"protocol_stack":{
"name":"iec104client",
"version":"1.0",
"transport_layer":{
"connection":{
"path":[
{
"srv_ip":"192.168.0.10",
"clt_ip":"",
"port":2404
},
{
"srv_ip":"192.168.0.11",
"clt_ip":"",
"port":2404
}
],
"tls":"NONE"
},
"k_value":12,
"w_value":8,
"t0_timeout":10,
"t1_timeout":15,
"t2_timeout":10,
"t3_timeout":20,
"conn_all":true,
"start_all":false,
"conn_passv":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",
"utc_time":"false",
"comm_wttag":false,
"comm_parallel":0,
"exec_cycl_test":false,
"startup_state":"active",
"reverse":false"
}
}
} |
Path exploration
...
In redundant network configuration or generally in cases where several communication paths exist between one client and one server, the path checking exploration mechanism allows the client to try all the paths one by one without making any difference between them. The client uses the first available path. On disconnection this procedure starts again from the beginning.
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.
Configuration JSON file structure
Code Block | ||
---|---|---|
| ||
{
"exchanged_data_layer":{
"name":"iec104client",
"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"
}
]
}
} |
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
Code Block | ||
---|---|---|
| ||
{
"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
draw.io Diagram | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
NB: The conversion process shall produce as many pivot format objects as information objects in the source ASDU.
Pivot format resulting object
Code Block | ||
---|---|---|
| ||
{
"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"
}
} |
IEC 104 north plugin (server/slave)
IEC 104 redundancy server modes
Multiple redundancy groups
The MZ Automation lib60870 server provides 3 different modes regarding the support of redundant connections and events queue handling:
- The default mode (CS104_MODE_SINGLE_REDUNDANCY_GROUP) allows only a single active client connection.
- The second mode (CS104_MODE_CONNECTION_IS_REDUNDANCY_GROUP) allows multiple active client connections.
- The third mode (CS104_MODE_MULTIPLE_REDUNDANCY_GROUPS) allows multiple active client connections while preserving events when no client is connected.
In the case of this design, the south plugin will be implemented with CS104_MODE_MULTIPLE_REDUNDANCY_GROUPS server mode.
This mode allows multiple active client connections while preserving events when no client is connected. In this mode clients can be assigned to specific redundancy groups. The assignment is based on the IP address of the client. A redundancy group can have multiple simultaneous connections but only one of these connections can be active. The number of activated connections is restricted by the number of redundancy groups. Each redundancy group has a dedicated event queue.
It can be set with the CS104_Slave_setServerMode function:
Code Block | ||
---|---|---|
| ||
CS104_Slave_setServerMode(slave, CS104_MODE_MULTIPLE_REDUNDANCY_GROUPS); |
Multiple redundancy groups example
IEC 104 Protocol stack configuration
Configuration JSON file structure
Code Block | ||
---|---|---|
| ||
{
"protocol_stack": {
"name": "iec104server",
"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"
}
}
} |
Pivot format to IEC 104 translation
Pivot format to IEC 104 conversion configuration model
Code Block | ||
---|---|---|
| ||
{
"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
draw.io Diagram | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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 north plugin (server)
ICCP TASE.2 Protocol stack configuration
<not yet designed>
ICCP TASE.2 exchanged data points configuration
<not yet designed>
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
Code Block | ||
---|---|---|
| ||
{ "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 "address":"PointRealValuesimpleIOGenericIO/GGIO1.Ind1", //PointStateValue or PointDiscreteValue "doi_qual_classtypeid":"QualityClassSPS", "doi_quality":"Validity", } "doi_current_src":"CurrentSource", ] "doi_normal_src":"NormalSource"}, "doi_normal_value":"NormalValue",{ "doi_ts_classlabel":"TimeStampClassTM1", "doipivot_tsid":"TimeStampID99876", "doipivot_ts_qualtype":"TimeStamp QualityMVTyp", "doi_cov_classtfid":"COVClasssquare_root", "doi_cov_counterparams":"COVCounter"[ } } } } |
Conversion process
draw.io Diagram | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Pivot format resulting object
Code Block | ||
---|---|---|
| ||
{ "data_object_header":{ 2.0, 49.5 "doh_type":"some_value"], "doh_name":"some_value", "deadband":[ "doh_ca":"not_populated", "doh_oa":"not_populated", -0.02, "doh_cot":"not_populated", "doh_test":"not_populated",0.02 "doh_negative":"not_populated", "doh_version":"some_value"], "doh_src_prot":"some_value" }, "data_object_itemprotocols":{[ "doi_ioa":"not_populated", "doi_value":"some_value", "doi_qual_class":"some_value",{ "doi_quality":"some_value", "doi_current_src":"some_value", "doi_normal_srcname":"some_valueiec104", "doi_normal_value":"some_value", "doi_ts_class":"some_value", "doi_tsaddress":"some_value45-984", "doi_ts_qualtypeid":"some_value", M_ME_NA_1" "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
Code Block | ||
---|---|---|
| ||
{ "protocol_translation_layer":{ "name":"pivot_to_tase2", "version":"1.0", "mapping":{ "data_object_header":{ "address":"S_114562", "PointTypetypeid":"dohData_typeRealQ", "PointName":"doh_name" }, }, "data_object_item":{ { "PointRealValue": "doi_value", //PointStateValue or PointDiscreteValue "QualityClassname":"doi_qual_classopcua", "Validity "address":"doi_qualityID99876", "CurrentSource "typeid":"doiopcua_current_srcmvf", "NormalSource":"doi_normal_src" }, "NormalValue":"doi_normal_value", { "TimeStampClassname":"doi_ts_classiec61850", "TimeStamp "address":"doi_tssimpleIOGenericIO/GGIO1.AnIn1", "TimeStamp Qualitytypeid":"doi_ts_qualMV", "COVClass":"doi_cov_class", } "COVCounter":"doi_cov_counter"] } }] } } |
Conversion process
...
Warning |
---|
Do not use the name "IEC104Command" as a datapoint name in the exchanged data configuration. Doing so could potentially lead to conflicts when trying to read readings from both the South and Dispatcher components. |
...