Documentation Home Page ePHASORSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

PowerFactory Input File

Page Content

Prepare the I/O Pins File

  • A template Excel network file is available in the ePHASORSIM Blockset page in the MATLAB user help.

  • To configure the Excel file, refer to PowerFactory Excel File in this user guide. Only incoming and outgoing pins must be specified: no network data is required in the Excel input file.

  • Save the Excel file in an empty folder in an intuitive location, like 'C:\OPAL-RT\ePHASORSIM' or in your active default project folder.

  • You will use this folder and path throughout this procedure; this is why we recommend an intuitive and/or default location.

Note:

  • The I/O pins file must have a General tab with version v1.8 (or v2.0) to define the Power Base (MVA) and Frequency (Hz) of the network.

  • The Pins page helps the user create measurement probes (outgoing pins) and control signals (incoming pins) to the system. To create the incoming and outgoing pins, the user needs to know the name of each component.

PowerFactory File

PowerFactory data should be exported as *.xml file format. The requirements for this file are explained in PowerFactory. Save the *.xml file in the aforementioned folder (e.g. MyFirstModel).

Notes:

  • The user must export a DGS file of PowerFactory database in XML format to be imported in ePHASORSIM.

  • The imported data from PowerFactory will be mapped in ePHASORSIM to its positive sequence library of models, which are representative of transmission systems.

  • To have a compatible DGS file for ePHASORSIM the 'DGS_Export_Definitions_5_to_ePH.dz' file provided in PHASOR-17 example folder must be used in PowerFactory to export DGS file.

  • This DZ file must not be modified or revised to assure compatibility.

  • Only DGS version 5.0 files from PowerFactory 2019 are supported.

  • MATLAB 2018B or above is required for the PowerFactory import.

Prepare the Simulink Model

  • Change the MATLAB working directory to the previously created folder.

  • Open the Simulink Library.

  • Select RT-LAB/ePHASORSIM.

  • Drag the Solver block into a new Simulink model.

  • Save this model to the previously created directory.

  • Open the mask and do the following:

Network Data Tab

  • Select PowerFactory as the Input file format.

  • Select or insert the name of the Excel file in XLSX format containing the pins in the I/O pins file field.

  • Select or insert the name of the XML file in the DGS file (XML format) field.

  • (Optional) Check Refresh netlist only when simulation starts.

Library Tab

  • Leave the FMU component fields as default (the default is the empty string ‘’, or two single quotes).

Simulation Settings Tab

  • Specify a Time-step (The default value is 10 ms).

  • Power-flow:

    • Select the Initialization method from the drop-down menu,

    • Enter the Power mismatch (max p.u.) tolerance for the power-flow calculation (The default value is 1e-8).

    • Enter the Max number of NR iterations (The default value is 100).

    • Clicking Execute or Execute and export report runs the power-flow. Only the latter writes the power-flow results in CSV format.

  • Dynamic simulations:

    • Check Start from Power-flow to run power flow before dynamic simulation.

    • Enter the Number of partitions to be used for the network solution (The default value is 1).

    • Clicking Export admittance matrix writes the admittance matrix in CSV format.

    • Check Optimize number of threads (Windows only).

  • Press OK. The ePHASORSIM Solver block will be redrawn using the pins from the given Excel file.

    • The network data may also be converted to OPAL format, depending on the configuration of the Refresh netlist option in the Network data tab.

  • Connect Simulink sources and sinks (scopes, displays) to the input/output pins on ePHASORSIM Solver block.

  • Ensure the simulation is set to use a fixed time-step (under Simulation/Model Configuration parameters/Solver), and that the time-step is consistent with that specified in the Simulation settings tab.

  • Once the Solver mask and Simulink model are configured, run the model to verify a reasonable value appears on the scopes. The messages in the figure below will be printed in the MATLAB Command Window.

  • Save your model.

 

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323