Skip to content

Converting CIMXML DifferenceModel to CIMJSON-LD #279

@Sveino

Description

@Sveino

As part of creating a CIMXML to/from CIMJSON-LD converter we would need to define how the DifferenceModel file defined in
the IEC 61970-552 CIMXML Model exchange format .
A proposal describing the CIMXML DifferenceModel was presented for the W3C and got Tim Berners-Lee support, but was still not approved.
Being able to exchange and validate changes to a digital twin model by change set is critical. It is also very useful for handling alternative changes into the future. The changes would need to be accommodated with meta-data.

A ACLineSegment object is described with the following property:

    <cim:ACLineSegment rdf:ID="_9d58e5bb-834c-4faa-928c-7da0bb1497d9">
        <cim:IdentifiedObject.mRID>9d58e5bb-834c-4faa-928c-7da0bb1497d9</cim:IdentifiedObject.mRID>
        <cim:IdentifiedObject.description>400V Telemarkstien 2 ACLineSegment 1</cim:IdentifiedObject.description>
        <cim:IdentifiedObject.name>04 TELEMA2 ACLS1</cim:IdentifiedObject.name>
        <cim:Equipment.aggregate>false</cim:Equipment.aggregate>
        <cim:Equipment.normallyInService>true</cim:Equipment.normallyInService>
        <cim:Conductor.length>50</cim:Conductor.length>
        <cim:ACLineSegment.bch>0</cim:ACLineSegment.bch>
        <cim:ACLineSegment.gch>0</cim:ACLineSegment.gch>
        <cim:ACLineSegment.r>0.015999999945951</cim:ACLineSegment.r>
        <cim:ACLineSegment.x>0.003769911221053</cim:ACLineSegment.x>
        <cim:PowerSystemResource.AssetDatasheet rdf:resource="#_d25f35ca-69fb-4c06-905b-67ec532e5f14" />
        <cim:Equipment.EquipmentContainer rdf:resource="#_64e21d95-8b55-b941-a923-b74087410a66" />
        <cim:ConductingEquipment.BaseVoltage rdf:resource="#_9598e4a0-67e5-4ad7-879c-c85a1f63159c" />
    </cim:ACLineSegment>

Changing the ACLineSegment object by changing the length from 50 meter to 55 meter would look like:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF  xmlns:cim="http://iec.ch/TC57/CIM100#" 
			xmlns:dm="http://iec.ch/TC57/61970-552/DifferenceModel/1#" 
			xmlns:eu="http://iec.ch/TC57/CIM100-European#" 
			xmlns:md="http://iec.ch/TC57/61970-552/ModelDescription/1#" 
			xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
			
   <dm:DifferenceModel rdf:about="">
      <dm:reverseDifferences rdf:parseType="Statements">
         <rdf:Description rdf:about="#_9d58e5bb-834c-4faa-928c-7da0bb1497d9">
            <cim:Conductor.length>50</cim:Conductor.length>
         </rdf:Description>
      </dm:reverseDifferences>
      <dm:forwardDifferences rdf:parseType="Statements">
         <rdf:Description rdf:about="#_9d58e5bb-834c-4faa-928c-7da0bb1497d9">
            <cim:Conductor.length>55</cim:Conductor.length>
         </rdf:Description>
      </dm:forwardDifferences>
   </dm:DifferenceModel>
</rdf:RDF>

reverseDifferences describe the dataset that will be removed (delete).
forwardDifferences describe the dataset that will be added (add)
An update is describe as reverseDifferences and forwardDifferences (as shown in the example).

Proposal 1: Single Graph

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "cim": "http://iec.ch/TC57/CIM100#",
        "md": "http://iec.ch/TC57/61970-552/ModelDescription/1#",
        "eu": "http://iec.ch/TC57/CIM100-European#",
        "dm": "http://iec.ch/TC57/61970-552/DifferenceModel/1#"
    },

    "@graph": [{
            "@id": "urn:uuid:f52f12c3-db10-4d41-a9f2-b1fe29ab4d6d",
            "@type": "dm:DifferenceModel",
            "dm:reverseDifferences": [{
                    "@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
                    "@type": "cim:ACLineSegment",
                    "cim:Conductor.length": {
                        "cim:Length.value": 50.0
                    }
                }
            ],
            "dm:forwardDifferences": [{
                    "@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
                    "@type": "cim:ACLineSegment",
                    "cim:Conductor.length": {
                        "cim:Length.value": 55.0
                    }
                }
            ]
        }
    ]
}

Alt 2: Two graph

{
    "@context": {
        "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
        "cim": "http://iec.ch/TC57/CIM100#",
        "md": "http://iec.ch/TC57/61970-552/ModelDescription/1#",
        "eu": "http://iec.ch/TC57/CIM100-European#",
        "dm": "http://iec.ch/TC57/61970-552/DifferenceModel/1#"
    },

    "@graph": [{
            "@id": "urn:uuid:f52f12c3-db10-4d41-a9f2-b1fe29ab4d6d",
            "@type": "dm:DifferenceModel",
            "dm:reverseDifferences": [{
                    "@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
                    "@type": "cim:ACLineSegment",
                    "cim:Conductor.length": {
                        "cim:Length.value": 50.0
                    },
                    "cim:IdentifiedObject.name": "04 TELEMA2 ACLS1"
                }
            ]
        }, {
            "@id": "urn:uuid:f1aa3e3a-8391-4bf9-b435-6bd0702f9e0d",
            "@type": "dm:DifferenceModel",
            "dm:forwardDifferences": [{
                    "@id": "urn:uuid:9d58e5bb-834c-4faa-928c-7da0bb1497d9",
                    "@type": "cim:ACLineSegment",
                    "cim:Conductor.length": {
                        "cim:Length.value": 55.0
                    },
                    "cim:IdentifiedObject.name": "04 TELEMA2 ACLS2"
                }
            ]
        }
    ]
}

I do not think the example is correct. I think we might need to use the container structure shown in Example 122 in the JSON-LD 1.1 standard.

Relevant links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions