Package: ieeh-powerfactory-tools
IEEH PowerFactory ToolsA toolbox for Python based control of DIgSILENT PowerFactory.IEEH PowerFactory ToolsField of ApplicationTutorialsGeneral RemarksInstallationCompatibilityDevelopmentAcknowledgementAttributionField of ApplicationThis application is intended to use for an external usage ('engine mode') of the power flow calculation programDIgSILENT PowerFactory.
Therefore, the Python-PowerFactory-API, provided by the company, is utilized.The following functionalities are provided:export of calculation relevant grid data from a PowerFactory project to theIEEH Power System Data Modelbasic control of PowerFactory[intended in future release] import from external grid data into the PowerFactory environmentTutorialsPlease consider theREADMEin the example section. Here, Jupyter notebooks are provided to get in touch with the usage of this toolbox:for export:powerfactory_export.ipynbfor control:powerfactory_control.ipynbIn addition, please see this interactive examplehow to import a PSDM grid representation inMatlabfor grid calculation purposes.General Remarks on ExportPlease find below some important general remarks and assumptions to consider for the application:GeneralAfter successful connection to PowerFactory viaPowerFactoryInterface, atemporary unit conversion to default values is automatically performedto have a project setting independent behavior. The units are reset when the interface is closed.
During an active connection, the following units apply:power in MWvoltage in kVcurrent in kAlength in kmExporterThe grid export follows the rules of usage recommended bypsdm:The passive sign convention is used for all types of loads (consumer as well as producer).TheRated Poweris always defined positive (absolute value).By default, all assests of all active grids within the selected study case are to be exported, seeexample readme.The following type of elements are supported:ElmLne- a symmetrical overhead line / cableElmTerm- a network terminal / busElmCoup- a bus-bus switch (e.g. a circuit breaker in a detailed switching gear)ElmTr2- a symmetrical 2-winding transformersElmTr3- a symmetrical 3-winding transformers (in future releases)ElmLod- a general load (asym. / sym.)ElmLodMv- a medium voltage loadElmLodLv- a low voltage loadElmLodLvp- a partial low voltage loadElmPvsys- a PV system (generator)ElmGenstat- a static generatorElmXNet- an external grid representationRelFuse- a fuse (bus-bus or bus-load)Remarks on export ofloads:Be aware that the reference voltage of the load model must not match the nominal voltage of the terminal the load is connected to.By default, the power factor direction of the rated power is set to "not defined", see docs atLoadPower - as_rated_power().Remarks on export oftransformer:The impedances of all winding objects are referred to the high voltage side of the transformer.The impedance of transformer earthing is an absolute natural value.The zero sequence impedances are exported without considering the vector group, resulting zero sequence must be calculated separately by the user afterwards.The zero sequence magnetising impedances are dependent on the wiring group, see docs atPowerFactoryExporter - create_transformer_2w().Remarks on export offuses:Branch like fuses are exported as switching state.Element fuses does not apply a switching state by their own in PowerFactory but considered in export as applicable switching state.Remarks on export ofSteadyStateCase:The operating points of the loads are specified by the controller and the associated load model in the topology for active or reactive power.By default a consumer load has a CosPhiConst type controller, except in the case where active and reactive power are explicitly specified in the load flow mask in PowerFactory.It is assumed, that a station controller (if relevant) is exclusively assigned to a single generator.
The generator itself ought to be parameterized in the same way as the station controller to ensure that the exported q operating point is the same that set by the station controller.InstallationJust install via pip:pipinstallieeh-powerfactory-toolsCompatibilityTools VersionPSDM VersionPowerFactory VersionPython Version<= 1.3.11.1.020223.9, 3.101.4.x1.1.020223.101.5.11.3.020223.102.1.02.2.020223.10Starting withPowerFactory 2023, a new model for LV and MV loads is available as well as e.g. the result structure of harmonic load flow has changed. AlsoPython 3.11can be used. Related adjustments are on schedule for the next mayor release 3.xDevelopmentInstallpdmWindows(Invoke-WebRequest-Urihttps://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py-UseBasicParsing).Content|python-Linux/Mac:curl-sSLhttps://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py|python3-Or using pipx or pip:pipxinstallpdmpipinstall--userpdmClonepowerfactory-toolsgit@github.com:ieeh-tu-dresden/powerfactory-tools.gitcdpowerfactory-toolsInstallpowerfactory-toolsas a production toolpdminstall--prodin development modepdminstallFor development inVisual Studio Code, all configurations are already provided:ruffblackmypyAcknowledgementPlease note that this work is part of research activities and is still under active development.This code was tested withDIgSILENT PowerFactory 2021 SP5(version < 1.4) andDIgSILENT PowerFactory 2022 SP2.AttributionPlease provide a link to this repository:https://github.com/ieeh-tu-dresden/powerfactory-toolsPlease cite as:Institute of Electrical Power Systems and High Voltage Engineering - TU Dresden,PowerFactory Tools - A toolbox for Python based control of DIgSILENT PowerFactory, Zenodo, 2022.https://doi.org/10.5281/zenodo.7074968.