-
Notifications
You must be signed in to change notification settings - Fork 10
2. Quickstart Guide PowerFactory
Developed with PowerFactory 2024 SP3 with Python x.y.z. Dependencies are listed in requirements.txt and can be installed by entering the command:
python –m pip install –r requirements.txt
In the PC command window. Is this still the case?
Extract or copy all test bench files and your model into a common folder on your PC and make a subfolder for Results and Measurement files used later on.
1.Fill in the model-specific information of the ‘Settings’ sheet in the ‘testcases.xlsx’ file.
- Select the desired case group tests the project will run through. This is done via the drop-down menu pictured below:
The config.ini file in PP-MTB folder must be edited by including a path to the testcases.xlsx sheet (if you have not placed this sheet within the PP-MTB folder) and likewise for the results folder.
It is also possible to edit the number of parallel computations, default value is 8.
- Right-click the Network Data folder in your PowerFactory model and Import PP-MTB.pfd from the common folder. The project must be inactive to import using this method.
- Activate the PP-MTB grid and replace the external grid with PP-MTB. Remember to deactivate the existing external grid, as well as any linked dynamic control used for the external grid, by leaving it Out of Service. Do this by selecting the elements and marking them as Out of Service.
Connect the cubicle at POC, formerly used for the external grid, to the element ”meas.ElmSind”. Copy the cubicle from the busbar used for the external grid (Ctrl+C) and then paste the cubicle to the element ”meas.ElmSind”, Terminal j.
- Open the MTB composite frame type (this can be done by right-clicking and selecting "Mark in Graphic"). Scroll down to the "User blocks" area (shaded area in the navigation pane on the picture below) to insert the PPC active- and reactive power control block types.
- Select the controller type to place in the MTB Slot by selecting the slot ( and selecting the type from the project library that corresponds with the types used in the project's PPC active and reactive power controllers.
- Use the signal wiring to connect the setpoints for P, Q, U, and PF controls to their respective inputs in the P- and Q-control blocks with signals from the plant references (circled in pink).
- Add the ElmDsl models for the PPC P- and Q-control at the bottom of the Net Elements in the MTB composite model "MTB.ElmComp"
- Add the Pcontrol and Qcontrol from the PPC to the external elements columns.
-
The MTB Q control modes are set up with the default values: 0 = Q reference mode, 1 = Q(U) mode, and 2 = PF (cosphi) mode. If these numbers do not correspond with the values in the project Qmode parameter, the script must be used to change the values. To do this open the script tab in the "initializer_script.ComDpl". Scroll to the bottom of the script and uncomment the section of code that assigns a new value to the Qmode parameter.
-
If the frequency sensitivity mode is disabled in the project and enabled by changing a parameter value the FSM part of the scrip highlighted in the black box below the Qmode box, should be uncommented and the control mode parameter set to what it is in the Pcontrol element of the project PPC.
This next part can be done in two ways. The first is to utilize the MTB built in Station- and Power Frequency controllers and connect the inverter to these. The second uses the qdsl element "initializer_qdsl" to control the inverter ElmGenstat
- Open the Station controller under the MTB foulder and add the inverter ElmGenstat to the Machines coulumn.
- Open the Power Frequency controller and under the Load Flow tab add the inverter
- To initialize the testbench the second method is to use the initializer_qdsl.ElmQdsl. The Qdsl script is located in the MTB composite frame folder. It is by default "Out of Service" and should be "put in service" before running the test bench.
- Choose a script type from the MTB library that best fits the setup of the park model and fill in the data that is not "Set by Script"
- Select the load flow tap in the script and connect the respective network elements e.g. the park inverter (setting up the simplified model).
- Edit the "execute.ComPython" script by selecting the python script "execute_pf.py" in the script tab.
The complete filepath must be defined in the field ‘Script file’. Click the ‘…’ button and navigate to the execute_pf.py script.
OBS: There might be some issues with the script while setting up the plots and exporting the result files. To fix this, go to Tools > User Settings > Parallel Computing > Advanced. In this tab check the box "Transfer complete project to all processes".
- Pressing Execute, the script does both simulation and plotting of results automatically.
** When executing the script, active variations are consolidated, meaning all changes recorded in the active varitions will be applied to the Network Data Folder. **
- When the script is finished the output window should look like the snapshot below, with the text ”Python Script ‘execute’ succesfully executed” at the bottom.
- All simulation results are exported to the 'Results' folder, as seen below. Each has a unique ID to match the study case. The study cases created by the MTB allow users to review all simulations in PowerFactory.
- The test bench also creates a set of '.csv'-files that can be used with the PP-MTB Plotter to plot the results and optionally compare them with the results from PSCAD. These can also be found in the 'Results' folder.
- Make sure that the P- and Q-control blocks are from the PPC and not from i.e. an inverter
For further questions or help, please check if the README or the Quickstart Guides contains the answer.
Otherwise, please contact the Energinet simulation model team: [email protected]