1
Message Generation Based on the CIM
CIM User Group Meeting Austin, Texas
23 October 2007
2
Acknowledgements
• Alan McMorran, “An Introduction to IEC 61970- 301 & 61968-11: The Common Information Model”, University of Strathclyde, Glasgow, UK
• Jean-Luc Sanson, EDF and Xiaofeng Wang, Xtensible Solutions, “Information Model and Message Modeling”
• Arnold deVos, “UN/CEFACT Modeling and Messaging Framework”
3
Message Generation Based on the CIM
• Initial Take– Generating a message based on the CIM standards
• Second Take– How do you incorporate business constraints and restrictions to
the CIM standard– How do you use the 61968 message standards
• Third Take– How do you incorporate other information meta models into your
enterprise semantic model in addition to the CIM standard
• Fourth Take– How do you test for compliance
4
EMS Replacement with MDI for External Interfaces
EAI Integration BusBased on Vitria BusinessWare Message Bus
EMS
Net
wor
k M
odel
Feed
er S
tatu
san
d A
nalo
gs
PlannedOutage Data(from ISO)Assets
Scheduling Systems- Generation- Interchange
Out
age
Dat
a
Pla
nned
Out
ages
Equ
ipm
ent
Ope
ratin
g Li
mits
Equ
ipm
ent L
imits
OMS
Sch
edul
es
Sch
edul
e
Feed
er S
tatu
s/A
nalo
g va
lues
External Power System
ApplicationsN
etw
ork
Mod
el
5
EMS Replacement Project
• Goal was to implement MDI (Model Driven Integration)• Decision to use Web Services over Vitria BusinessWare
EAI platform• Delivered XML message schemas and WSDLs for
– Status and analog measurements– Outage schedules– Interchange schedules– Generation schedules– Line operating limits– Transformer operating limits– Generic events for log
• Interesting paradigm shift
6
Mapping EMS Interfaces to the CIM – User access to transformer data
• Interface attributes:– TRANS_NAME – The Transformer’s name– WINDINGA_R – The Transformer’s primary winding resistance– WINDINGA_X – The Transformer’s primary winding reactance– WINDINGB_R – The Transformer’s secondary winding resistance– WINDINGB_X – The Transformer’s secondary winding reactance– WINDINGA_V – The Transformer’s primary winding voltage– WINDINGB_V – The Transformer’s secondary winding voltage
7
Transformer Class Diagram
8
CIM Interface Mapping - Beginnings of Message Payload Definition
Two different interface attributes (WINDINGA_R
and WINDINGB_R) map to same CIM attribute
Aggregation changed from 0..n to 2
Multiplicity changed from
0..1 to 1
Multiplicity changed from
0..1 to 1
9
Message Payload in UML
Note:• Associations changed to aggregations• Parent classes removed
• Not required in actual message content• Parent classes already known by both sender and receiver
• Corollary: Only those parts of the CIM used in message exchange need to be supported by interface applications
• End result – modified class structure• Example of application of business context to information model
10
XML Schema for Transformer Message
11
Transformer Interface Message Payload in XML
<cim:PowerTransformer> <cim:Naming.name>Transformer SGT1</cim:Naming.name> <cim:PowerTransformer.Contains_TransformerWindings> <cim:TransformerWinding.r>0.23</cim:TransformerWinding.r> <cim:TransformerWinding.x>0.78</cim:TransformerWinding.x> <cim:TransformerWinding.windingType>WindingType.primary </cim:TransformerWinding.windingType> <cim:Equipment.MemberOf_EquipmentContainer> <cim:VoltageLevel.BaseVoltage> <cim:BaseVoltage.nominaVoltage>400 </cim:BaseVoltage.nominalVoltage> </cim:VoltageLevel.BaseVoltage> </cim:Equipment.MemberOf_EquipmenContainer> </cim:PowerTransformer.Contains_TransformerWindings> <cim:PowerTransformer.Contains_TransformerWindings> <cim:TransformerWinding.r>0.46</cim:TransformerWinding.r> <cim:TransformerWinding.x>0.87</cim:TransformerWinding.x> <cim:TransformerWinding.windingType>WindingType.secondary </cim:TransformerWinding.windingType> <cim:Equipment.MemberOf_EquipmentContainer> <cim:VoltageLevel.BaseVoltage> <cim:BaseVoltage.nominaVoltage>275 </cim:BaseVoltage.nominalVoltage> </cim:VoltageLevel.BaseVoltage> </cim:Equipment.MemberOf_EquipmenContainer> </cim:PowerTransformer.Contains_TransformerWindings>
</cim:PowerTransformer>
12
How can we generate a Message from an Information Model?• First we are define a context : use case, business process
analysis…• At the end of this analysis some exchanges are defined
that are realized by message exchange• Message description must state :
– What are the classes involved in the exchange?– What are the class properties necessary for the exchange?– What kind of constraints should be applied on the properties type?– What is the principal class involved in the exchange?
• In fact what we are doing is defining a view of the information Model
13
Information Model
• An Information Model is a model that represents all classes with :– all their possible properties– all their possible associations
• This has some consequences : – All properties are described as optional– A lot of associations are left optional– All associations are bidirectional ones (except for specialized ones
like inheritance and aggregation)– This means that there is no hierarchy– dataTyping is kept as generic as possible
• An Information Model is context independant• The CIM model is based on this philosophy
14
Information Model (Abstract Model) Business Class
15
Step 1: Selecting Classes involved in the exchange
16
Step 2: Select class properties involved in the exchange:
17
Step 3: Define Properties DataTypes and constraints
Need for a constraint language
18
Step 4: Define main classes (and hierarchy)
Contextual Model Definition
Root Element
19
Define Message Model according to standard assembly rules
Implementation Model level
Assembly Rules
20
Define Syntactic Message Model according to transformation rules
• <?xml version="1.0" encoding="UTF-8"?>• <xsd:element name=« VerbNounMessageType">• <xsd:sequence>• <xsd:element name=« ControlArea"/>• <xsd:sequence>• <xsd:element name=« Verb"/>• <xsd:element name=« Noun"/>• </xsd:sequence>• </xsd:element>
XML Syntax
21
From Information
Model to Syntactic
Model
AbstractModel
SyntacticModel
<?xml version="1.0" encoding="UTF-8"?><xsd:element name="MSG"><xsd:sequence>
<xsd:element name="EnTête"/><xsd:sequence>
<xsd:element name="Source"/><xsd:element name="Creation"/>
</xsd:sequence></xsd:element>
UML World
XML SyntacticWorld
22
UML/XML Modelling layers
Information ModelUML
Modèles ConceptuelsUML
Modèles d’EchangesUML
Modèle d’EchangeXML (XSD)
Modèles ConceptuelsUMLContextual Models
UML
Modèles d’EchangesUMLMessage Models
UML
Modèle d’EchangeXML (XSD)Message Models
XML (XSD)
23
CIM Message Modelling Philosophy
24
CIM UML/XML Modelling layersInformation Model
CIM/UML
Modèles d’EchangesUML
Modèles ConceptuelsUML
Modèle d’EchangeXML (XSD)
Modèles ConceptuelsUMLContextual Models
CIM/UML
Modèles d’EchangesUMLMessage Models Modèle d’Echange
XML (XSD)Message ModelsCIM/XML (XSD)
61970 part 30161968 part 11
61968 part 3 to 10
Guidelines
25
CIM UML/XML Modelling layersInformation Model
CIM/UML
Modèles d’EchangesUML
Modèles ConceptuelsUML
Modèle d’EchangeXML (XSD)
Modèles ConceptuelsUMLContextual Models
CIM/UML
Modèles d’EchangesUMLMessage Models Modèle d’Echange
XML (XSD)Message ModelsCIM/XML (XSD)
61970 part 30161968 part 11
61968 part 3 to 10
Guidelines
UML files
XML Schemasfiles
26
UML/XML Modeling layers in CIMInformation Model
UML
Message ModelMessage ModelUMLUML
Contextual ModelUML
Information ModelXML (XSD)
ContextualContextual ModelModelXML (XSD)XML (XSD)
Modèles d’EchangeXML (XSD)
61968 Parties 3 à 10
Modèles d’EchangeXML (XSD)Message Models
XML (XSD)
61968 part 3 to 10
Contextual ModelsUML
XML Schemasfiles
XML Schemasfiles
27
CIM Context
• CIM defines different contexts mostly in 61968 part 3 to 10
• Those contexts are first defined by the Interface Reference Model– Interface for Network Operations– Interface for Record and Asset Management– Interface for Operational Planning and Optimisation– Interface for Maintenance and Construction….
• Then for each Interface:– There is a selection of classes involved– There is a set of Message Type based on an Message
Architecture
28
IEC TC57 Standards Emphasis
(NE)Network
ExtensionPlanning
(CS)CustomerSupport
(MR)Meter
Reading &Control
(AM)Records &
AssetManagement
(MC)Maintenance
&Construction
IEC 61968-4 IEC 61968-6
IEC 61968-7 IEC 61968-8 IEC 61968-9
(ACT)CustomerAccount
Management
(FIN)Financial
(PRM)Premises
(HR)Human
Resources
(EMS)Energy
Management &Energy Trading
(RET)Retail
IEC 61968-10OAG
(SC)Supply
Chain andLogistics
(NO)Network
Operation
IEC 61968-3and IEC 61970
(OP)OperationalPlanning &
Optimization
IEC 61968-5 andIEC 61970
IEC 61968-10 andIEC 61970
IEC 61968-10 andOAG
IEC 61968-10 andOAG
IEC 61968-10 andOAG
IEC 61968-10 andOAG
IEC 61968-10 andOAG
Utility Electric NetworkPlanning, Constructing,
Maintaining, and Operating
Enterprise Resource Planning,Supply Chain, and General
Corporate Services
IEC TC57 and OAG Standards Emphasis
Interface Reference Model
29
CIM Context – 61968 part 3: Network Operation
• Classes selected :– ActivityRecord, MeasurementValueList, MeasurementValue,
OutageRecord, OutageStep …
• All properties kept• No constraints on properties• No constraints on properties type• So classes are not changed• Root element which defines the noun and the payload
starting point• Keep all associations• Result: a UML diagram
30
Root
31
CIM Context Network Operation: 61968 part 3
• Message Organisation or Architecture, not described in UML (difficult in UML V1.x), it is done at the Syntactic level
32
CIM Context Network Operation: 61968 part 3• Message Types
– Measurement List (created, changed, show)– Operational Restrictions (created, changed, show, deleted)– Outage Records (created, changed, show, get, deleted, canceled,
closed)– Safety Documents ….– Switching Schedules….
• Message Payload defined by UML diagram, used by different messages
33
CIM Context Network Operation: 61968 part 3• Message Payload defined by UML diagram, used by
different messages• UML/XML transformation rules to generate XML Schema• Because there are few constraints on properties, XML
Schema have a lot of optional elements• In this CIM version, it is the responsibility of applications
to populate the instance of a message with relevant information
• One could have at the XML level constraints that are needed
34
CIM UML/XML Modelling layersInformation Model
CIM/UML
Modèles d’EchangesUML
Modèles ConceptuelsUML
Modèle d’EchangeXML (XSD)
Modèles ConceptuelsUMLContextual Models
CIM/UML
Modèles d’EchangesUMLMessage Models
UMLModèle d’Echange
XML (XSD)Message ModelsCIM/XML (XSD)
Context Definition
UML/XML transformation rules
35
Implementing CIM UML/XML Modelling layers
Information ModelCIM/UML
Message ModelUML
Conceptual ModelCIM/UML
Message ModelsCIM/XML (XSD)
Message ModelsXML (XSD)
Constraints expressed in XSLT
CIM Transformation Rules
36
CIM DataTypes• Special package: domain package• Three kinds of dataTypes
1. Primitive (String… + float…)
2. Enumeration
3. Qualifying classes
37
Usually people don’t start from an Information Model
Information ModelInformation ModelUMLUML
Modèles d’EchangeUML
ContextualContextual ModelModelUMLUML
Information ModelInformation ModelXML (XSD)XML (XSD)
ContextualContextual ModelModelXML (XSD)XML (XSD)
Modèles d’EchangeXML (XSD)
Modèles d’EchangeUMLMessage Model
UMLModèles d’Echange
XML (XSD)Message ModelXML (XSD)
38
Discovery Process with CIM
Information ModelCIM/UML
XML Application Message Model
UML ApplicationMessage Model
?
39
Information ModelCIM/UML
Conceptual ModelUML
XML Application Message Model
UML ApplicationMessage Model
Discovery Process with CIM
40
Information ModelCIM/UML
Message ModelUML
Conceptual ModelUML
CIM/XML basedApplication
Message Model
XML Application Message Model
CIM Transformation RulesUML ApplicationMessage Model
Discovery Process with CIM
41
Information ModelCIM/UML
Message ModelUML
Conceptual ModelUML
CIM/XML basedApplication
Message Model
XML Application Message Model
CIM Transformation RulesUML ApplicationMessage Model
XML MappingXSLT Transformation
Discovery Process with CIM
42
Information ModelCIM/UML
Conceptual ModelUML
Description ofMy message
Discovery Process with CIM
43
Information ModelCIM/UML
Conceptual ModelUML
My CIM/XML Message Models
CIM Transformation RulesDescription ofMy message
Discovery Process with CIM
44
Information ModelCIM/UML
My UMLMessage Model
Conceptual ModelUML
Description ofMy message
My messageAssembly
Discovery Process with CIM
45
Information ModelCIM/UML
My UMLMessage Model
Conceptual ModelUML
My XMLMessage Model
Description ofMy message
My UML/XML transformation rules
Discovery Process with CIM
46
Information ModelCIM/UML
My UMLMessage Model
Conceptual ModelUML
My XMLMessage Model
Description ofMy message
My CIM/XML Message Models
Discovery Process with CIM
An Organising Framework
• UN/CEFACT – Information Model– Contextual Model– Message Assembly– Message Syntax
60
61
CIM Compliance
• What is CIM Compliance• How do you specify the use of the CIM• How do you test for compliance
62
What Does CIM Compliance Mean?
• CIM compliance means that at the public interface the data representation complies with the CIM in terms of:
• General principles:– Semantics – naming and meaning of data– Syntax – data type
• A specific profile that specifies which parts of the CIM are in view• Specific services• Specific XML schemas for messages• Specific RDF schemas files to be exchanged• Good practices in the use of the CIM – project guidelines document• Bottom line: Compliance deals with message/data exchanged at an
interface
63
What CIM Compliance Does Not Mean
• There is a database organized exactly like the CIM class diagrams• All aspects of the CIM are included in an implementation
– Profiles can be defined for compliance purposes• NERC has defined a Common Power System Model (CPSM) with mandatory
and optional conformance points (i.e., classes, attributes, associations)• EDF has defined a Distribution Network Model profile• Other profiles can be defined and added to the CIM model as well
– Message standards define a subset of the CIM for a specific information exchange
• Defines which parts of CIM are used, and which are mandatory or optional– A specific system interface may only support a subset of a message
standard• Ex: A multi-step transaction may involve several systems, each of which
supports only a part of the total message standard• Real-world interfaces will also include private extensions
64
How to Specify the Use of the CIM
• Need to be specific in what is asked for– Specific profiles or message schemas
• Or spell out the process to be followed– Map all interfaces to the CIM with extensions added as
necessary to create an enterprise information model– May be other models to also be included– Type of interface envisioned
• Use of middleware• Use of the GID• Use of Web services
– Responsibility for adapters• Part of vendor responsibility or system integrator
65
How to Test for Compliance
• Compliance testing vs. interoperability testing• Rely on previous interoperability tests
– Witnessed test results for vendors that participate– Documented in EPRI technical reports
• Validation tools– CIM/XML with RDF schema for power system model
transfer – used in interop tests– XML schema validation for messages
• Subject of one of the CIMug WGs– Need for a compliance test suite
66
Questions?