Overview of CIM Profiles¶
One of the common misconceptions regarding the CIM is that the entire information model must be adopted and implemented. As an enterprise-focused canonical information model, the full CIM covers an extremely broad range of aspects of modeling, operations, billing, asset management, and energy markets. Any given application or even an entire data-rich environment will only need a small subset of the full common information model.
When choosing CIM for a particular project, application, and data integration effort, it is important to consider the particular use case, what functional objectives must be met, and what is the minimum number of attributes that must be modeled to meet the identified requirements. This section briefly discusses the considerations involved in selecting a CIM profile, building a data profile, populating that profile with power system data, and then selecting a database structure to contain that data.
What is a CIM Profile?¶
Before introducing physical models, a clear understanding of profiles is essential. Profiles are secondary models derived from the information model. Profiles must be based on classes, attributes, and associations contained in the CIM information model. They can never introduce anything new beyond what exists in the CIM UML (formed from canonical classes and custom user extension classes).
The purpose of profiles is to identify a subset of the information model to meet a particular need. Profiles can: - Constrain cardinality of attributes - Remove unwanted attributes and classes - Represent structures required for specific applications - Focus on particular domains (equipment, topology, geography, state estimation, etc.)
After completing the logical model in UML, profiles can be derived to depict structures that support specific topics such as equipment profiles, geographical profiles, single state hypothesis profiles, and topology profiles.
CIM Profile vs Data Profile¶
It's important to distinguish between these two related but distinct concepts:
CIM Profile: A UML-based subset of the CIM information model defining which classes, attributes, and associations are needed for a specific application or use case.
Data Profile: A serialization of a CIM Profile into a specific physical data structure (repository or stream). Examples include: - JavaScript Object Notation (JSON) schema - XML Schema Definition (XSD) - Relational data definition language (DDL) - Resource Description Framework (RDF) serialization - Python dataclass schemas (used by CIMantic Graphs)
The data profile is not the power system data itself. It is an empty structure specifying how network model data should be organized.
Steps for Selecting and Creating a CIM Profile¶
1. Understand Business, Planning, and Operations Processes¶
Adoption of the CIM cannot occur in a vacuum and should consider the set of operational procedures and business processes that will be impacted. This process involves:
- Understanding organizational units and groups involved
- Documenting existing operational procedures
- Identifying current data storage formats
- Mapping legacy application interfaces and data streams
- Translating requirements into functional objectives and performance specifications
Important Consideration: If the project involves operations or planning decisions, ensure data is presented in a format meaningful to operators and dispatchers. Many CIM components are not human-readable in traditional operations contexts, so proper human factors engineering is essential to avoid adding cognitive workload in high-stress control room environments.
2. Identify the Use Case for CIM¶
The next step is identifying the particular use case for adopting CIM and the scope of data integration required. Possible approaches include:
- Project-Level: Strictly using CIM to exchange base power system models between applications
- Platform-Level: Integrating applications through a common message bus with CIM-compliant messaging and models
- Integrated Environment: Creating a data-rich environment using CIM classes, attributes, and message formats to the greatest extent possible
The decision depends on the particular use case and types of data that need to be exchanged. For real-time applications requiring topology mapping with SCADA data, DER dispatch commands, and dynamic switch positions, a CIM-based message bus is more practical than point-to-point exchanges.
3. Identify the Required Information to be Modeled¶
Although it's possible to use the entire CIM to represent every object and attribute in the power system, it's more practical to reduce the modeling scope to the minimum information required to accomplish the functional objectives. This requires careful consideration of:
- What data needs to be exchanged
- Whether a full power flow solution is needed
- The level of modeling accuracy required
Example: For a DER-to-substation mapping application, the minimum required information is simply a topology model of the network connectivity (lines, transformers, switches, DERs). Detailed modeling of line geometry, transformer impedances, tap settings, and reactive control modes is unnecessary since these don't impact connectivity.
4. Identify the Required Classes and Attributes¶
Once the minimum required information has been identified, reduce the CIM information model to a much smaller profile with only the classes, attributes, and associations that are needed. This custom subset is your CIM Profile.
Example: For DER-to-substation topology mapping, an extremely small profile suffices:
- ACLineSegment
- LoadBreakSwitch
- PowerTransformerEnd
- SynchronousMachine
- PowerElectronicsConnection
- ConnectivityNode
- ACDCTerminal
If power flow solutions aren't needed, classes like PhaseImpedanceData, TransformerMeshImpedance, and RatioTapChanger can be omitted.
You can build a custom CIM profile using open-source tools like CIMTool or adopt an existing tested profile. If extensions beyond the base CIM are needed (e.g., home appliances, DER control attributes), involve a domain expert with expertise in both power systems and information modeling.
5. Create a Data Profile¶
Once a CIM Profile has been selected or created, create a data profile (one of the formats listed above) to contain the power system network model. Data profiles may be derived directly from UML information models or UML profiles.
Layered Data Profiles¶
Data profiles can be layered like GIS layers to build up complete power system representations:
- Topology Profile - Describes how buses, switches, and branches connect (connectivity using CIM vocabulary)
- Equipment Profile - Contains nameplate info, physical characteristics, line impedances
- Geographical Profile - Provides geospatial information about asset locations
- State Profile - Represents dynamic operational states and measurements
This layered approach provides flexibility in what information is exchanged and stored. CGMES 3.0 is split this way, and cimprofiles ships it as sub-profiles such as cimprofiles.cim17.cgmes_3_0_0.core_equipment, .topology, .geographical_location, .steady_state_hypothesis and .state_variables.
6. Populate the Data Profile with Network Model Data¶
Populating the data profile with actual power system data typically requires custom scripts that: 1. Interpret the empty data profile structure 2. Read source data from existing tools (PSLF, OpenDSS, etc.) 3. Build XML, JSON, or other format files containing actual network model data
Validation: Multiple validation levels ensure data quality: - Syntactic validation - XML parsers check if files are "well-formed" - Semantic validation - XSD/JSON schemas ensure objects and attributes are defined correctly - Ontological validation - RDFS and OWL ensure the model follows CIM vocabulary
Few tools build distribution feeders or transmission networks natively in CIM, so the practical approach is usually to build models in existing tools and convert them to CIM.
7. The Critical Role of mRIDs (Master Resource Identifiers)¶
One of the most critical aspects of populating CIM models is establishing persistent Universally Unique Identifiers (UUIDs) to be used as Master Resource Identifiers (mRIDs) for all network parameters, asset characteristics, and SCADA measurements.
Why mRIDs Matter:¶
-
Cross-Application Consistency - All applications in the data integration effort must refer to equipment by the same mRID. Inconsistent mRIDs require mapping tables, defeating the purpose of CIM-based integration.
-
Data Mapping Stability - Changes to mRIDs affect other data mappings (e.g., SCADA measurements to assets). Persistent mRIDs ensure edits to network models don't break other data mappings.
-
Inter-Utility Exchange - When exchanging data between utilities:
- Option 1: Use the same mRIDs across both utilities (requires coordination and master lists)
- Option 2: Create reference tables converting mRIDs between utilities
Best Practice: Use UUIDs (RFC 9562, formerly RFC 4122) to ensure global uniqueness.
CIMantic Graphs follows CIM 18 here: every object's identity is Identity.identifier, a UUID, and mRID is kept as a free-form string. Objects built without a UUID get a deterministic one derived from their mRID or name (see Using Objects).
Measurement mRIDs¶
CIM requires every measurement or data source be assigned a unique mRID associated with one terminal of equipment:
- PT voltage measurement → unique mRID → associated with Terminal
- CT current measurement → unique mRID → associated with Terminal
- Calculated MW/MVAr/MVA → unique mRIDs → associated with Terminal
This approach simplifies real-time publishing: measurements can be sent as simple {"meas-mrid-1234": value} pairs without additional metadata, since all context is in the network model.
CIMantic Graphs and Python Data Profiles¶
CIMantic Graphs provides a Python-native approach to working with CIM profiles. Instead of XML or JSON schemas, it uses Python dataclass schemas as the data profile format.
The profiles ship in the separate cimprofiles package, together with the object model they are built on (Identity, CIMUnit, profile merging). cim-graph depends on it, so nothing extra needs installing. Profiles are grouped by CIM version, e.g. cimprofiles.cim17.cimhub_2023 or cimprofiles.cim18.cimhub_2026.
Advantages of Python Dataclasses:¶
- Native Python Integration - Classes can be imported and used directly in Python code
- Type Hints - Full support for Python type checking and IDE autocomplete
- Introspection - Easy to programmatically inspect attributes, types, and metadata
- In-Memory Graphs - Efficient knowledge graph representation in memory
- Auto-Generated Queries - Database queries generated directly from dataclass structure
The CIMTool Builder Workflow:¶
- Create or select a CIM Profile in CIMTool (UML-based)
- Generate the Python dataclass schema and its
__init__.pywith the cimantic-graphs.xsl and cimantic-graphs-init.xsl builders - Add the generated files to the
cimprofilespackage - Import and use:
import cimprofiles.cim17.your_profile_name as cim
Building Profiles walks through these steps.
Example: Importing a CIM Profile¶
cimprofiles.PROFILE_PACKAGES lists the profiles that ship with the package. The short names are the values CIMG_CIM_PROFILE accepts:
import cimprofiles
for short_name, module in cimprofiles.PROFILE_PACKAGES.items():
print(f'{short_name:24} {module}')
cim16v33 cimprofiles.cim16.cim16v33 cgmes_2_4_0 cimprofiles.cim16.cgmes_2_4_0 cgmes_3_0_0 cimprofiles.cim17.cgmes_3_0_0 cim17v40 cimprofiles.cim17.cim17v40 cimhub_2023 cimprofiles.cim17.cimhub_2023 rc4_2021 cimprofiles.cim17.gridappsd_rc4_2021 cim18gad cimprofiles.cim18.cim18gad cim18gmdm cimprofiles.cim18.cim18gmdm cim18v17 cimprofiles.cim18.cim18v17 cimhub_2026 cimprofiles.cim18.cimhub_2026
A profile is a much smaller subset of the full model. Compare the number of classes in the full CIM17 model (cim17v40) with the CIMHub 2023 distribution feeder profile:
from dataclasses import is_dataclass
import cimprofiles.cim17.cim17v40 as cim17v40
import cimprofiles.cim17.cimhub_2023 as cim
def count_classes(profile) -> int:
return sum(1 for name in profile.__all__ if is_dataclass(getattr(profile, name)))
print(f'cim17v40 (full CIM17 model): {count_classes(cim17v40)} classes')
print(f'cimhub_2023 (feeder profile): {count_classes(cim)} classes')
cim17v40 (full CIM17 model): 962 classes cimhub_2023 (feeder profile): 348 classes
Each class is a dataclass whose fields carry the UML metadata of the profile. The fields ACLineSegment declares itself (the rest are inherited from Conductor, ConductingEquipment, ... up to Identity):
print(' -> '.join(cls.__name__ for cls in cim.ACLineSegment.__mro__[:-1]))
print()
for name in cim.ACLineSegment.__annotations__:
field = cim.ACLineSegment.__dataclass_fields__[name]
line = f'{name}: {field.metadata["type"]}'
if field.metadata['type'] == 'Association':
line += f' (inverse: {field.metadata["inverse"]})'
print(line)
ACLineSegment -> Conductor -> ConductingEquipment -> Equipment -> PowerSystemResource -> IdentifiedObject -> Identity b0ch: Attribute bch: Attribute g0ch: Attribute gch: Attribute r: Attribute r0: Attribute shortCircuitEndTemperature: Attribute x: Attribute x0: Attribute ParallelLineSegment: Association (inverse: ParallelLineSegment.ACLineSegment) PerLengthImpedance: Association (inverse: PerLengthImpedance.ACLineSegments) WireSpacingInfo: Association (inverse: WireSpacingInfo.ACLineSegments) ACLineSegmentPhases: Association (inverse: ACLineSegmentPhase.ACLineSegment) Clamp: Association (inverse: Clamp.ACLineSegment) Cut: Association (inverse: Cut.ACLineSegment) LineFaults: Association (inverse: LineFault.ACLineSegment)
Summary and Next Steps¶
This overview introduced the key concepts of CIM profiling:
- Profiles are subsets of the full CIM information model tailored to specific use cases
- Data profiles are physical serializations of CIM profiles (XML, JSON, Python dataclasses)
- Profile selection involves understanding business processes, use cases, and minimum required information
- mRIDs (Master Resource Identifiers) are critical for consistent cross-application integration
- CIMantic Graphs uses Python dataclass schemas from the
cimprofilespackage as data profiles
What's Next:¶
- Building Profiles - Create custom profiles using CIMTool
- Using Objects - Work with CIM dataclass objects in Python
- Using Incrementals - Manage model changes and updates
- Using Units - Handle physical quantities with proper unit conversion
<style>
['pre { line-height: 125%; }\ntd.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\nspan.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\ntd.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\nspan.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n.highlight-ipynb .hll { background-color: var(--jp-cell-editor-active-background) }\n.highlight-ipynb { background: var(--jp-cell-editor-background); color: var(--jp-mirror-editor-variable-color) }\n.highlight-ipynb .c { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment */\n.highlight-ipynb .err { color: var(--jp-mirror-editor-error-color) } /* Error */\n.highlight-ipynb .k { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword */\n.highlight-ipynb .o { color: var(--jp-mirror-editor-operator-color); font-weight: bold } /* Operator */\n.highlight-ipynb .p { color: var(--jp-mirror-editor-punctuation-color) } /* Punctuation */\n.highlight-ipynb .ch { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Hashbang */\n.highlight-ipynb .cm { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Multiline */\n.highlight-ipynb .cp { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Preproc */\n.highlight-ipynb .cpf { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.PreprocFile */\n.highlight-ipynb .c1 { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Single */\n.highlight-ipynb .cs { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Special */\n.highlight-ipynb .kc { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Constant */\n.highlight-ipynb .kd { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Declaration */\n.highlight-ipynb .kn { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Namespace */\n.highlight-ipynb .kp { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Pseudo */\n.highlight-ipynb .kr { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Reserved */\n.highlight-ipynb .kt { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Type */\n.highlight-ipynb .m { color: var(--jp-mirror-editor-number-color) } /* Literal.Number */\n.highlight-ipynb .s { color: var(--jp-mirror-editor-string-color) } /* Literal.String */\n.highlight-ipynb .ow { color: var(--jp-mirror-editor-operator-color); font-weight: bold } /* Operator.Word */\n.highlight-ipynb .pm { color: var(--jp-mirror-editor-punctuation-color) } /* Punctuation.Marker */\n.highlight-ipynb .w { color: var(--jp-mirror-editor-variable-color) } /* Text.Whitespace */\n.highlight-ipynb .mb { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Bin */\n.highlight-ipynb .mf { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Float */\n.highlight-ipynb .mh { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Hex */\n.highlight-ipynb .mi { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Integer */\n.highlight-ipynb .mo { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Oct */\n.highlight-ipynb .sa { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Affix */\n.highlight-ipynb .sb { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Backtick */\n.highlight-ipynb .sc { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Char */\n.highlight-ipynb .dl { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Delimiter */\n.highlight-ipynb .sd { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Doc */\n.highlight-ipynb .s2 { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Double */\n.highlight-ipynb .se { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Escape */\n.highlight-ipynb .sh { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Heredoc */\n.highlight-ipynb .si { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Interpol */\n.highlight-ipynb .sx { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Other */\n.highlight-ipynb .sr { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Regex */\n.highlight-ipynb .s1 { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Single */\n.highlight-ipynb .ss { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Symbol */\n.highlight-ipynb .il { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Integer.Long */']
</style>