-
Notifications
You must be signed in to change notification settings - Fork 8
2. Quickstart Guide PowerFactory
Developed with PowerFactory 2024 SP3 with Python 3.8.8 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.
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:
Please consult the Quickstart Guide Excel for further instructions.
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.
There are two main ways to connect the MTB to the model PPC. The first method is to connect the MTB via the execute script, where parameters responsible for the active and reactive power references are attached. If you have used the previous MTB version, this setup resembles the old setup. However, adding and controlling additional signals/parameters in the PPC´s control blocks is now possible. This is further described in Quickstart Guide Excel, and the setup is described in 2.5 Custom cases and signals setup. The second method is to connect the signals from the PPC to the type graphic of the MTB and will be explained in 2.3.2.b
- Open the execute.ComPython script and add the signal names to the respective value rows in the Input Parameters table.
- Add the PPC controller(s) responsible for controlling the active- and reactive power references. Depeding on your specific PPC configuration this can be a single controller or multiple controllers as shown in the picture below.
- 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. Make sure that the variable name for the Qmode corresponds with the name in the PPC´s Qcontrol dsl model. It is usually named something with "mode".
-
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. Make sure that the parameter name for the FSM parameter in the active power control module corresponds with the parameter name after Pcontrol:??????. The variable name is sometimes named FSMenable or somewhere along these lines.
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 folder and add the inverter ElmGenstat to the Machines column.
- 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’ successfully executed” at the bottom.
The study cases that were set to "TRUE" in the testcases.xslx document should be visible in the project overview.
- 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, if relevant for your project, compare them with the results from PSCAD. These can also be found in the 'Results' folder.
There are multiple possibilities to connect additional signals/parameters from the PPC active- and reactive power controller or to control other ds models e.g. the protection block in the model.
- 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 either:
- Mathias Bernhardt Bødker Kristensen at [email protected]
- Casper Vestergård Lindgaard at [email protected]