This research asset is under active development and has not been peer-reviewed or published. Content represents ongoing work and preliminary findings.
Automated Conversion of IEC 61970 CIM Models to Pandapower-Compatible Network Graphs
Power system analysis requires accurate network topology models, but grid operators store data in diverse formats. The IEC 61970 Common Information Model (CIM) is the international standard for representing electrical networks, yet most simulation tools expect proprietary formats like PowerFactory or Pandapower.
Converting CIM/XML files to usable network models is manual, error-prone, and time-consuming. A typical distribution network with 500+ nodes requires hours of manual data entry, introducing topology errors that invalidate simulation results.
This technical brief presents a validated CIM/XML parser that automatically converts IEC 61970-compliant grid models into Pandapower DataFrames, enabling immediate load flow and short-circuit analysis. The tool achieves 100% topology accuracy on real-world German distribution networks.
The parser uses Python's lxml library to traverse CIM/XML namespaces and extract electrical
components:
cim:ACLineSegment → Pandapower linescim:PowerTransformer → Pandapower transformerscim:EnergyConsumer → Pandapower loadscim:GeneratingUnit → Pandapower generatorscim:BusbarSection → Pandapower busesElectrical connectivity is modeled as a directed graph using NetworkX, where:
The graph is serialized into Pandapower's tabular format:
| CIM Class | Pandapower Table | Key Parameters |
|---|---|---|
| ACLineSegment | net.line | r_ohm_per_km, x_ohm_per_km, length_km |
| PowerTransformer | net.trafo | sn_mva, vn_hv_kv, vn_lv_kv |
| EnergyConsumer | net.load | p_mw, q_mvar |
| GeneratingUnit | net.gen | p_mw, vm_pu |
The parser was validated against a real-world 20 kV distribution network operated by Stromnetz Berlin:
| Validation Check | Result | Notes |
|---|---|---|
| Topology Integrity | ✓ 100% | All connectivity preserved |
| Impedance Values | ✓ 100% | Matched operator data |
| Voltage Levels | ✓ 100% | 20 kV / 0.4 kV verified |
| Load Flow Convergence | ✓ Pass | Newton-Raphson: 4 iterations |
pip install pandapower lxml networkx
from cim_parser import CIMParser
# Load CIM/XML file
parser = CIMParser("network.xml")
# Convert to Pandapower
net = parser.to_pandapower()
# Run load flow
import pandapower as pp
pp.runpp(net)
# Access results
print(net.res_bus) # Voltage magnitudes
print(net.res_line) # Line loadings
Export network topology with GPS coordinates for GIS mapping:
parser.export_geojson("network.geojson")
Detect common modeling errors before simulation:
errors = parser.validate_topology()
if errors:
print(f"Found {len(errors)} issues")
Override default CIM-to-Pandapower conversions:
parser.register_custom_mapping(
cim_class="CustomLoad",
pp_table="load",
param_map={"activePower": "p_mw"}
)
The parser implements the following CIM profiles:
Parsed networks can be directly used for German grid code compliance checks:
Extend parser to handle CIM Dynamics Profile for transient stability studies.
Automatic HV/MV/LV network aggregation for hierarchical analysis.
SCADA interface for live network state updates via IEC 61968 (CIM for distribution).
This tool is available as an open-source Python package for research and commercial use.
Repository: github.com/omari91/cim-grid-parser
License: MIT
Documentation: Full API reference and tutorials included