scieee AI-readable full text Open interactive document viewer

Validation Handbook, Deliverable of the iTesla Project

Maria Helena Vasconcelos

Abstract

This handbook aims to facilitate the validation of the iTesla toolbox. It compiles commands made available and describes the validation method. This document is meant to evolve regularly along with the evolutions of the platform. So far: - The validation methodology is described for a 7-bus test network and the French network - The offline part is fully implemented (except for the importance sampling part) - The online part is now available to the validators - Only Eurostag is integrated (not Dymola)

Full text

iTesla Innovative Tools for Electrical System Security within Large Area Grant agreement number 283012 Funding scheme Collaborative projects Start date 01.01.2012 Duration 48 months Call identifier FP7-ENERGY-2011-1 Validation Handbook Dissemination level PU Public. License: MPLv2. X TSO Restricted to consortium members and TSO members of ENTSO-E (including the Commission Services). RE Restricted to a group specified by the consortium (including the Commission services). CO Confidential, only for members of the consortium (including the Commission services). iTesla WP7: Validation Handbook V14 1/ 98 Document Name: Validation Handbook Work Package: WP7 Task: Deliverable: - Responsible Partner: Author Approval Name Visa Name Date DIFFUSION LIST For action For information DOCUMENT HISTORY Index Date Author(s) Main modifications 0.11 28.07.2015 0.12 20.10.2015 0.13 06.01.2016 0.14 11.01.2016 0.15 01.02.2016 Section 4 (many) and Section 6 (small changes) 0.16 15.02.2016 Section 5.4 and Section 7.11 0.17 25.02.2016 Section 4.7 and Section 6 0.18 21.03.2016 Section 6.3.12 (IPSO return codes). Diffusion switched to public with MPLv2 license. iTesla WP7: Validation Handbook V14 2/ 98 Table of contents 1. EXECUTIVE SUMMARY ...................................................................................................................................... 8 2. TECHNICAL GENERALITIES: ............................................................................................................................... 9 2.1. TEST PLATFORM GENERALITIES: .............................................................................................................................. 9 2.2. DESCRIPTION OF THE GENERAL ARCHITECTURE: .......................................................................................................... 9 2.3. WP4 ARCHITECTURE: ........................................................................................................................................... 9 2.4. WP5 ARCHITECTURE: ......................................................................................................................................... 11 3. OFFLINE VALIDATION METHODOLOGY: .......................................................................................................... 13 3.1. ELABORATION OF A SMALL TEST NETWORK .............................................................................................................. 13 3.1.1. Transient stability ................................................................................................................................ 14 3.1.2. Small-signal stability ............................................................................................................................ 14 3.1.3. Overload .............................................................................................................................................. 15 3.1.4. Overvoltage.......................................................................................................................................... 15 3.1.5. Undervoltage ....................................................................................................................................... 15 3.1.6. Synthesis .............................................................................................................................................. 15 3.1.7. Implementation in the platform .......................................................................................................... 16 3.2. STEP BY STEP VALIDATION .................................................................................................................................... 16 3.2.1. Characterize the general workflow results obtained before DT computation .................................... 16 3.2.2. WP4.1 (sampling of stochastic variables) ............................................................................................ 17 3.2.3. WP4.2 (starting points) ........................................................................................................................ 17 3.2.4. WP4.4 (time domain simulation) ......................................................................................................... 18 3.2.5. WP4.3 (security indices computation) ................................................................................................. 18 3.2.6. WP4.5 (decision trees computation) ................................................................................................... 18 3.3. WP4 OVERALL VALIDATION ................................................................................................................................ 20 4. ONLINE VALIDATION METHODOLOGY: ........................................................................................................... 21 4.1. SECURITY CRITERIA UNDER UNCERTAIN DOMAINS ..................................................................................................... 21 4.2. BENCHMARK FOR SECURITY ASSESSMENT UNDER UNCERTAINTY................................................................................... 22 4.3. PERFORMANCE INDICES FOR VALIDATION ................................................................................................................ 23 4.3.1. Indices applying to a single base case .................................................................................................. 24 4.3.2. Indices applying to a set of base cases ................................................................................................ 25 4.3.3. Use of the indices................................................................................................................................. 25 4.3.4. Additional indices for MCLA................................................................................................................. 26 4.4. PROCEDURE FOR VALIDATION OF WCA .................................................................................................................. 26 4.4.1. Validation of the uncertainty domain against MCLA domain .............................................................. 26 4.4.2. Validation of the security classification against the benchmark ......................................................... 27 4.4.3. Validation of security classification against MCLA security classification............................................ 27 4.5. PROCEDURE FOR VALIDATION OF MCLA ................................................................................................................ 28 4.6. REMARKS ON THE QUALITY OF THE VALIDATION SET SIGNIFICANCE ............................................................................... 29 4.7. VALIDATION OUTPUTS IN THE ONLINE WORKFLOW .................................................................................................... 29 4.8. VALIDATION OF OPTIMIZER .................................................................................................................................. 30 4.9. VALIDATION OF FPF ........................................................................................................................................... 30 5. COMMAND LINE USER GUIDE FOR THE OFFLINE PART: .................................................................................. 32 5.1. HOW CAN THE PLATFORM BE ACCESSED? ................................................................................................................ 32 5.2. WHAT DOES AN OFFLINE ITESLA COMMAND LINE LOOK LIKE? ..................................................................................... 32 iTesla WP7: Validation Handbook V14 3/ 98 5.3. HOW CAN ALL THE EXISTING COMMANDS BE LISTED? ................................................................................................ 32 5.4. WHAT ARE THE AVAILABLE COMMAND LINES? ......................................................................................................... 33 5.4.1. WP4 commands ................................................................................................................................... 33 5.4.2. WP4/WP5 commands .......................................................................................................................... 44 5.5. HOW CAN THE DEFAULT SIMULATOR BE CHANGED? .................................................................................................. 47 5.6. HOW IT IS POSSIBLE TO USE DIFFERENT CONFIGURATION FILES IN PARALLEL? .................................................................. 47 5.7. HOW IS IT POSSIBLE TO DEAL WITH AN ERROR MESSAGE? ........................................................................................... 47 5.8. HOW CAN THE RESULTS OF AN OFFLINE WORKFLOW BE REPLICATED? ........................................................................... 48 5.9. HOW CAN COMMANDS BE AUTOMATED? ............................................................................................................... 48 5.1. WHAT IS THE CONTENT OF OFFLINEDB.CSV? ............................................................................................................ 48 5.2. IS THERE A GRAPHICAL USER INTERFACE? ................................................................................................................ 49 5.3. HOW IS IT POSSIBLE TO SWITCH BETWEEN THE FRENCH NETWORK AND THE 7-BUS NETWORK IN THE OFFLINE PART? ............. 49 5.4. HOW CAN THE VERSION BE CHECKED? .................................................................................................................... 50 5.5. EXAMPLES OF LISTS OF COMMANDS ....................................................................................................................... 51 5.6. SPECIFIC NEEDS ................................................................................................................................................. 52 5.6.1. Specific commands to have a few details about the indexes: ............................................................. 52 5.6.2. Specific commands to run again the KTH indexes in Matlab and analyze them ................................. 52 5.6.3. Script to change the data between the 4.1 and 4.2 parts ................................................................... 53 6. COMMAND LINE USER GUIDE FOR THE ONLINE PART: ................................................................................... 54 6.1. WHAT DOES AN ONLINE ITESLA COMMAND LINE LOOK LIKE? ...................................................................................... 54 6.2. HOW CAN ALL THE EXISTING COMMANDS BE LISTED? ................................................................................................ 54 6.3. WHAT ARE THE AVAILABLE COMMAND LINES? ......................................................................................................... 55 6.3.1. Run forecast errors analysis for the Monte-Carlo like approach ......................................................... 55 6.3.2. Run forecast errors analysis for the WCA ............................................................................................ 56 6.3.3. List stored forecast errors analysis results........................................................................................... 57 6.3.4. Delete a Forecast Errors Analysis ......................................................................................................... 57 6.3.5. Run online workflow ............................................................................................................................ 57 6.3.6. List stored online workflows ................................................................................................................ 58 6.3.7. Print the processing status of the steps of an online workflow .......................................................... 59 6.3.8. Print the Online Workflow Failures and Violations Summary Table .................................................... 60 6.3.9. Print the Online Workflow Performances............................................................................................ 62 6.3.10. Print the results of the WCA step of an online workflow .................................................................... 63 6.3.11. Print the results of the security rules application for an online workflow .......................................... 64 6.3.12. Print the results of the corrective control optimizer of an online workflow ....................................... 65 6.3.13. Print the results of the T-D simulation step of an online workflow ..................................................... 66 6.3.14. Delete an online workflow ................................................................................................................... 67 6.3.15. List stored states of an online workflow .............................................................................................. 67 6.3.16. Delete online workflow states ............................................................................................................. 68 6.3.17. Export a predefined online workflow state ......................................................................................... 68 6.3.18. Export online workflow states ............................................................................................................. 68 6.3.19. Run the security rules on a predefined online workflow state ............................................................ 69 6.3.20. Run the impact analysis on a predefined online workflow state ......................................................... 69 6.3.21. Print metrics (debugging) .................................................................................................................... 70 6.3.22. Print the stored violations of an online workflow ............................................................................... 71 6.3.23. Print post-contingency violations ........................................................................................................ 72 6.3.24. Print post-contingency load flow violations ........................................................................................ 73 6.3.25. Run a dynamic simulation on a specific basecase (or a list of base cases) .......................................... 74 6.3.26. Run a FPF on a specific basecase ......................................................................................................... 75 6.4. HOW IS IT POSSIBLE TO DEAL WITH AN ERROR MESSAGE? ........................................................................................... 75 iTesla WP7: Validation Handbook V14 4/ 98 6.5. HOW IS IT POSSIBLE TO SWITCH BETWEEN THE FRENCH NETWORK AND THE 7-BUS NETWORK? .......................................... 75 6.6. HOW IS IT POSSIBLE TO SWITCH BETWEEN THE HADES AND HELM LOAD FLOW METHOD IN THE ONLINE WORKFLOW? ......... 76 6.7. HOW IS IT POSSIBLE TO DISABLE THE STEP UP TRANSFORMERS? ................................................................................... 76 7. ANNEXES: ....................................................................................................................................................... 76 7.1. CONFIGURATION FILES FOR THE OFFLINE PART: ........................................................................................................ 76 7.1.1. iTesla configuration files ...................................................................................................................... 76 7.1.2. Main configuration files ....................................................................................................................... 77 7.2. CONFIGURATION FILES FOR THE ONLINE PART: ......................................................................................................... 77 7.2.1. iTesla configuration files ...................................................................................................................... 78 7.2.2. Main configuration files ....................................................................................................................... 78 7.3. DETAILED CONTENT OF THE DATABASES: ................................................................................................................. 78 7.3.1. CIM repository: .................................................................................................................................... 79 7.3.2. Historical DB: ....................................................................................................................................... 79 7.3.3. Dynamic DB: ......................................................................................................................................... 79 7.3.4. Step-up transformers DB: .................................................................................................................... 79 7.3.5. Contingencies DB: ................................................................................................................................ 80 7.3.6. Simulation DB: ..................................................................................................................................... 80 7.3.7. Validation DB: ...................................................................................................................................... 80 7.3.8. Forecast error repository ..................................................................................................................... 80 7.3.9. Security rules DB: ................................................................................................................................. 80 7.3.10. Online DB ............................................................................................................................................. 81 7.4. UPLOAD HISTORICAL DATA ON THE HISTORICAL DATABASE: ........................................................................................ 81 7.5. UPLOAD DYNAMIC DATA TO THE DYNAMIC DATABASE: .............................................................................................. 82 7.6. DATA FORMATS: ................................................................................................................................................ 83 7.7. FAULT PATTERN: ................................................................................................................................................ 83 7.8. UNITS.............................................................................................................................................................. 84 7.9. USEFUL LINUX COMMANDS .................................................................................................................................. 84 7.9.1. Useful linux particularities ................................................................................................................... 84 7.9.2. How is it possible to copy/paste from windows to linux terminal and vice versa? ............................. 84 7.9.3. How can intermediary results be saved for later? ............................................................................... 84 7.9.4. How is it possible to copy files from the linux server to another linux computer? ............................. 85 7.10. CONFIGURED INDEXES: ....................................................................................................................................... 85 7.11. SPECIFIC USER GUIDE FOR THE 7-BUS NETWORK IN THE OFFLINE PLATFORM: .................................................................. 86 7.11.1. IDs ........................................................................................................................................................ 86 7.11.2. File tree ................................................................................................................................................ 86 7.11.3. Choice of the variant ............................................................................................................................ 87 7.11.4. Specific databases to be changed ........................................................................................................ 87 7.11.5. Commands for the 7-bus network ....................................................................................................... 89 7.11.6. Configuration files ................................................................................................................................ 89 7.12. IMPERIAL COLLEGE WP4.1 VALIDATION MODULE .................................................................................................... 90 7.12.1. Description of the module ................................................................................................................... 90 7.12.2. How to use it in the platform ............................................................................................................... 92 7.13. QUERIES TO THE HISTORICAL DATABASE ................................................................................................................ 93 7.13.1. Introduction ......................................................................................................................................... 93 7.13.2. General syntax ..................................................................................................................................... 93 7.13.3. Query type ........................................................................................................................................... 93 7.13.4. Attributes ............................................................................................................................................. 94 7.13.5. Examples .............................................................................................................................................. 96 iTesla WP7: Validation Handbook V14 5/ 98 iTesla WP7: Validation Handbook V14 6/ 98 Figures Figure 2 - 1: General architecture (functional) ................................................................................................ 9 Figure 2 - 2: WP4 general computer architecture ......................................................................................... 10 Figure 2 - 3: WP4 detailed computer architecture ........................................................................................ 11 Figure 2 - 4: WP5 general computer architecture ......................................................................................... 11 Figure 2 - 5: Workflow instance for WP5 ...................................................................................................... 12 Figure 2 - 6: Interaction with the databases ................................................................................................. 12 Figure 3 - 1: 7-bus test network .................................................................................................................... 13 Figure 3 - 2: Description of the 7-bus variants .............................................................................................. 16 Figure 3 - 3: Sampling of stochastic variables ............................................................................................... 17 Figure 3 - 4: Elaboration of starting network states ..................................................................................... 17 Figure 3 - 5: Time domain simulation ............................................................................................................ 18 Figure 3 - 6: Security indices computation .................................................................................................... 18 Figure 3 - 7: Extraction of screening rules ..................................................................................................... 18 Figure 4 - 1: Benchmark calculation procedure ............................................................................................ 23 Figure 4 - 2: Comparison between benchmark and filtering/assessment results ........................................ 24 Figure 4 - 3: Performance index computation for MCLA. This process also validates the security rules ..... 28 Figure 4-4 Comparison of contingency analysis results between main online work flow and FPF. Results are classified as “correct” or “wrong” according to comparison against the benchmark. ................................. 31 Figure 5 - 1: DataMaestro snapshot .............................................................................................................. 40 Figure 5 - 2: Decision Tree in DataMaestro ................................................................................................... 41 Figure 7 - 1: Structure of the DDB ................................................................................................................. 82 Figure 7 - 2: "stabilization" pattern ............................................................................................................... 83 Figure 7 - 3: "impact analysis" pattern .......................................................................................................... 83 Figure 7 - 4: 7-bus IDs .................................................................................................................................... 86 Figure 7 - 5: 7-bus file tree ............................................................................................................................ 87 Figure 7 - 6: Example outputs of the visual comparison module; variable aggregation (left) and single variable selection (right). ............................................................................................................................................ 91 iTesla WP7: Validation Handbook V14 7/ 98 Glossary DB: Data Base CIM: Common Information Model – data exchange format agreed internationally among transmission system operators. SN: Snapshot DACF: Day Ahead Congestion Forecast IDCF: Intra Day Congestion Forecast FO: Forecast (includes DACF and IDCF files) IIDM XML: data exchange format internal to the project iTesla. IIDM means Internal iTesla Data Model. MCLA: “Monte Carlo-Like” Approach OVH: iTesla hosting service provider SSH: Secure Shell - protocol for secure network communications WCA: Worst Case Approach OPF: Optimal Power Flow FPF: Fuzzy Power Flow iTesla WP7: Validation Handbook V14 8/ 98 1. EXECUTIVE SUMMARY This handbook aims to facilitate the validation of the iTesla toolbox. It compiles commands made available and describes the validation method. This document is meant to evolve regularly along with the evolutions of the platform. So far:  The validation methodology is described for a 7-bus test network and the French network  The offline part is fully implemented (except for the importance sampling part)  The online part is now available to the validators  Only Eurostag is integrated (not Dymola) iTesla WP7: Validation Handbook V14 15/ 98 3.1.3. Overload Maximal admissible currents were adjusted to the limit in chosen lines after a given fault. The appropriate parameters were changed in the input .CIM file. The dynamic files remained unchanged. Currents are affected by the different load situations leading to overload situations in some cases. This variant was used for many tests and presentations. It is particularly useful for training. 3.1.4. Overvoltage Impedances of the lines were adjusted in order to reach an upper voltage limit after a given fault. The appropriate parameters were changed in the input .CIM file. The dynamic data files remained unchanged. Voltage is affected by the different load situations leading to overvoltage situations in some cases. This variant was difficult to use because of the lack of historical data for the voltages making the initialization of states (WP4.2) difficult (no quantile calculation). 3.1.5. Undervoltage Impedances of the lines were adjusted in order to reach a lower voltage limit after a given fault. The appropriate parameters were changed in the input .CIM file. The dynamic data files remained unchanged. Voltage is affected by the different load situations leading to undervoltage situations in some cases. This variant was difficult to use because of the lack of historical data for the voltages making the initialization of states (WP4.2) difficult (no quantile calculation). 3.1.6. Synthesis The figure below summarizes what is related to the variants: iTesla WP7: Validation Handbook V14 16/ 98 Figure 3 - 2: Description of the 7-bus variants The voltage stability index has not been implemented in the platform yet so will not be tested in a first step. 3.1.7. Implementation in the platform Although all the commands described in chapter 5 apply to the 7-bus network, it may be useful to describe how the 7-bus network was implemented in the platform in order to conduct the tests properly. The technical specificities of the 7-bus network are described in annex 7.11. 3.2. Step by step validation The blocks constituting the offline part are to be checked one by one. The main steps of this validation procedure are described next. 3.2.1. Characterize the general workflow results obtained before DT computation After running a workflow from WP4.1 to WP4.4 (i.e. before decision trees computation), perform the following:  Evaluate the number of ‘OK’, ‘NOK’ (i.e. crashes) states for each step of the offline process (from WP4.1 to WP4.4), by analyzing the contents of the obtained offlinedb.csv file.  Evaluate the rate of success of each step of the workflow to generate network states by computing: 𝑺𝒖𝒄𝒄𝒆𝒔𝒔 𝑹𝒂𝒕𝒆𝒔𝒕𝒆𝒑 = (#(𝑶𝑲 states)𝒔𝒕𝒆𝒑∕#(𝑶𝑲 states)𝒔𝒕𝒆𝒑−𝟏).𝟏𝟎𝟎%  Evaluate the rate of success of the overall workflow to generate network states by computing: 𝑺𝒖𝒄𝒄𝒆𝒔𝒔 𝑹𝒂𝒕𝒆𝒇𝒊𝒏𝒂𝒍 = (#(𝑶𝑲 states)𝒇𝒊𝒏𝒂𝒍∕#(𝒔𝒂𝒎𝒑𝒍𝒆𝒅 𝒔𝒕𝒂𝒕𝒆𝒔 in WP4.1)).𝟏𝟎𝟎%  Evaluate the number of generated stable and unstable states for each contingency/security index pair. Variant name Changes Index tested smallsignal regulations, r, x… SMALLSIGNAL synchroloss fault duration and location TSO_SYNCHROLOSS, TRANSIENT overvoltage r, x, voltage limits TSO_OVERVOLTAGE undervoltage r, x, voltage limits TSO_UNDERVOLTAGE overload current limits TSO_OVERLOAD, OVERLOAD iTesla WP7: Validation Handbook V14 17/ 98 3.2.2. WP4.1 (sampling of stochastic variables) Figure 3 - 3: Sampling of stochastic variables  Validate the sampling quality by checking consistency of the generated sampled stochastic variables with the input SN historical data: o Run Imperial college validation module 1 on relevant sets of stochastic variables to check that historical and sampled data present similar statistical attributes (this tool mainly provides visual comparison between historical and sampled data and analysis of some statistical indicators). o Other tests can be performed using the raw historical and sampled data extracted thanks to the same module.  Some additional test procedure can be performed for WP7 use cases (not valid for the small test system, since it is a fictitious use case), namely the following: o When running Imperial college validation module on relevant sets of variables, check correlation for chosen subset of variables. o Check consistency using special knowledge on behavior by zones, production type, etc. o Analyze random loads (correlations, probability densities, phase shift, etc.) o Analyze particular points (specificities familiar to operators). 3.2.3. WP4.2 (starting points) Figure 3 - 4: Elaboration of starting network states  List cases of divergence and analyze their origins with WP4.2 experts using the metrics.csv file. Focus on nonextreme sampled cases.  Analyze the accuracy of steady-state operating conditions, which requires expertise on the system. For this analysis, initialized states can be visualized on the offlinedb.csv file. Besides, selected states can be exported to input data of a dynamic simulator (Eurostag, dymola…) for analysis. Examples of operating conditions that can be checked are: 1 See full description in annex 7.12 WP4.1 - Sampling of Stochastic Parameters Historical Data Set of Sampled States WP4.1 –Sampling of stochastic variables WP4.2 - Starting Point Initialization Set of Sampled States Network Topology Historical Data Set of Initialized States WP4.2 –Elaboration of starting network states iTesla WP7: Validation Handbook V14 18/ 98 o Production repartition. o Phase shift transformer taps. o Voltage references. o Switched on capacitors/inductors (not valid for the small test system). o Topology choice consistency (not valid for the small test system). o If U/Q/P static domain of generating units is compatible with the dynamic simulation data (this may have a strong impact on the quality/feasibility of the dynamic simulations performed for each initialized state). 3.2.4. WP4.4 (time domain simulation) Figure 3 - 5: Time domain simulation  Analyze “crashes” in dynamic simulation.  If necessary, export selected initialized states to input data of a dynamic simulator (Eurostag, dymola…) for analysis.  Check accuracy of event sequences. 3.2.5. WP4.3 (security indices computation) Figure 3 - 6: Security indices computation  Compare the computed indices with the results of dynamic simulations (for a selected number of samples): o Run again picked simulations (randomly or according to the obtained security classification results) in a dynamic simulator (Eurostag, dymola…) manually and confront the results with WP4.3 outputs (i.e., with the security indices results that are described in the offlinedb.csv file and some other detailed information about the violated operating conditions that are described in specific debug files).  For misclassified samples: check parameters of the module and, if necessary, report to developers. 3.2.6. WP4.5 (decision trees computation) Figure 3 - 7: Extraction of screening rules  For each security problem (contingency/security index couple): WP4.3 - Impact Assessement Dynamic Simulation Results for the States States Classification WP4.3 –Impact assessment WP4.5 - Extraction of Screening Rules States Classification WP4.5 –Extraction of screening rules iTesla WP7: Validation Handbook V14 19/ 98 a) Compute alternative DTs with “DataMaestro” software by using different values for the training parameters (namely for the alpha, trueThreshold and maxSplit parameters). The k-fold Cross validation method must be activated. As an alternative, the iTesla toolbox also enables the computation of DTs with “Matlab”. b) Evaluate the test set accuracy of each computed DT, by analyzing the following indicators:  #ucu: Number of Unstable states classified Unstable  #scs: Number of Stable states classified Stable  #ucs: Number of Unstable sates classified Stable (Number of missed alarms)  #scu: Number of Stable sates classified Unstable (Number of false alarms)  (#ucs + #scu)/(#states) x 100%: Global Classification Error  #ucs/(#unstable states): Missed Alarm Error  #scu/(#stable states): False Alarm Error  #ucs/(#ucs+#scs): Probability of a case is unstable while classified stable  (#ucs+#scs)/(#states): Probability of a state being classified stable c) Select the best DT (for the WCSA and for the MCLA), by pursuing the following criteria:  Probability of a case is unstable while classified stable < 5%, to obtain a minimal missed alarm error;  Max {Probability of a state being classified stable}, to increase the filtering capability of the online part;  The test set errors are similar to the training set errors, to avoid over-fitting or under-fitting.  For each selected DT: a) Perform an exploratory data analysis of the stability domain by plotting the stable and unstable states that were correctly and incorrectly classified by the DT in a 2 - dimensional space given by:  principal component analysis 2 .  the predictor variables identified by the DT 3 . This analysis may give valuable information about the dispersion, convexity and representativeness of the data set used for DT computation. b) Check accuracy of the DT with the historical data that was used for DT computation:  Run a dynamic simulation impact analysis (i.e. run WP4.4 and WP4.3) for all the SN of the historical data that was used for DT computation and then compare the classifications provided by dynamic simulation with the classifications provided by the DT. Analyze the usual statistics to evaluate the generalization capability of the DT 4 . c) Check consistency between the sampled and historical data used for DT computation: 2 Functionality provided by a developed Matlab interface described in annex to be written… 3 Functionality provided by a developed Matlab interface described in annex to be written… 4 Functionality provided by a developed Matlab interface described in annex to be written… iTesla WP7: Validation Handbook V14 20/ 98  Obtain other statistical comparison between the historical and sampled data used for DT computation (like the distribution of stable/unstable states for the samples and the historical data, for the variable selected to split the tree, at each splitting test) 5 . The two types of data must present similar statistical attributes. 3.3. WP4 Overall Validation The main objective of this global validation is to assess the generalization capability of the DTs, selected to be used online, with more realistic conditions, namely by evaluating the accuracy of the DTs:  with historical data not used for training;  for the states immediately preceding a recorded severe contingency (only for the DTs that consider the same contingency). The WP4 overall validation procedure comprises the following steps: a) Separate the available historical data (SN) into two sets: Set A that will be used to sample states and create the DTs and Set B that will be used as an independent test set containing historical data not used for training. Set A must contain SN that occurred before the SN of Set B. If possible, Set B should contain chronologically connected SN collected just before of the contingency under analysis that lead to the security issue of the underlying use case. b) For the contingency and security problem under analysis, execute all WP4 commands before DT computation. If necessary, check offlinedb.csv file to detect possible inconsistencies in the modules output and to make sure that a representative set of data exists for the DT computation. c) For each security problem (contingency/security index couple), perform a fine tune the DT parameters by following the training procedure already described in section 3.2.6. d) Check the generalization capability of the computed DTs with Set B historical data, not used for DT computation: Run a dynamic simulation impact analysis for all the SN of the selected historical data and then compare the classifications provided by dynamic simulation with the classifications provided by the DT. Infer the usual statistics to evaluate the generalization capability of the DT. In the special case of the 7 bus use case, there are no consistent network states in the historical CIM data base, only copies of the base case in which the loads were replaced with the generated “historical” load data. It is then hardly possible to create a big test set from the historical data base. Nevertheless, several options are possible:  Test the security rules on the base case  Create a few new CIM files from the base case changing manually the load values and the production values (using Convergence for example). 5 Functionality provided by a developed Matlab interface described in annex to be written… iTesla WP7: Validation Handbook V14 21/ 98 4. ONLINE VALIDATION METHODOLOGY: The online platform consists of several sub-modules, as defined in D5.2 and whose implementation is described in D5.3. Further enhancements are presented in D5.4. The validation of the online platform consists of different steps: 1) Checking of the operation of each module integrated into iTESLA against its functional specifications. This part includes verifying the consistency of the data porting from IIDM format (i.e. iTESLA format) to the format of the modules, and the consistency between models. It also implies to check module results against suitably defined benchmarks, in order to validate the functional specifications themselves. 2) Testing of the online workflow operation. 3) Evaluating the performances of the individual modules. 4) Evaluating the overall online workflow performances. Task 1) was carried out and reported in D5.4. Task 2) was partially carried out within WP5.3 and WP5.4, and it will be completed in WP7. Tasks 3)-4) are specifically targeted in this document. The different stages of validation may be carried out with different sets of input data, from simpler to more complex: a) A small input data set (7-bus network), consisting of “controlled” (i.e. known, purposely defined) data; b) A small input data set (portion of a real grid), consisting of real data (e.g. real forecasts and snapshots); c) A real case data set (full grid). Before defining the validation criteria of the online platform, this section starts with introducing the new concepts for security assessment in the iTESLA perspective. Following, the benchmark for security assessment is proposed. Performance indices for validation are then defined, for a single forecast and for a set of forecasts. Procedures for validation of the modules are then described. Indices to evaluate the quality of the validation set are also proposed. In order to better understand the set of intermediate outputs produced by the different modules in the validation mode, a scheme providing an overall picture of the online workflow is provided, in which the specific outputs are described. 4.1. Security criteria under uncertain domains Compared to conventional security assessment, iTESLA has the additional feature of considering uncertainties in dynamic analyses. This requires to extend the security criterion definition to uncertain domains. The following definitions are proposed. Conventional security analyses: The system state under analysis is secure with respect to a contingency, if no security index exceeds defined thresholds in the response of the system to the contingency, starting from the considered state. Security analyses with uncertain domains (i.e. as with iTESLA): iTesla WP7: Validation Handbook V14 22/ 98 The state under analysis (base case forecast) is secure with respect to a contingency, if no security index exceeds defined thresholds in the response of the system to the contingency, starting from the considered base case and from any state within the uncertainty domain of the base case. In practice, when considering uncertainties, security must be assured in the whole region of uncertainty. The issue is of course to define this region: Suitable methods and criteria to define the uncertainty region must be defined. 4.2. Benchmark for security assessment under uncertainty Before introducing performance indices for the iTESLA online assessment, a reference (benchmark) procedure must be defined, that implements the security criterion for uncertain domains, stated above. The following procedure is proposed to analyze the security of an uncertain forecast state with respect to a contingency: 1. Starting from the base case, sample a (significant) set of states by MCLA. 2. Perform detailed T-D simulation of the contingency applied to the base case and to the samples. 3. Compute the security indices for all T-D simulation results (i.e. the same ones used for security rule training). 4. Evaluate the security of the contingency with respect to the base case and to each sample, by applying the security judgement criterion relevant to each security index (i.e. comparison of the index with predefined threshold). 5. If at least one security index for one of the above simulations is beyond the relevant security threshold, the case under analysis is unsecure with respect to the considered contingency; otherwise it is secure. The next figure provides a scheme of the computation procedure, that can be repeated for the whole set of contingencies under analysis. In particular, the detail of the different phenomena, caught by different security indices, is shown. The following remarks apply: • The uncertainty domain model computed in MCLA is assumed as the “most complete” available one. It has been validated in WP5. • The security indices have been validated in WP4. • T-D simulation is assumed as representing the «real» system behavior. • If the sampling is “large enough”, then it may cover the uncertainty domain. However, as the number of stochastic variables increases, as it is with real cases, it is more and more difficult that the dimensions of the uncertainty domain are explored exhaustively. iTesla WP7: Validation Handbook V14 23/ 98 Base case + Samples Base case 13 24 5 LEGEND U = unsecure S = secure Different security indices refer to different stability phenomena T-D simulationCtg c Security index Security index Security index … … Security criterion Security criterion Security criterion … … S U S U S U 1 1 1 2 2 2 3 3 3 444 5 55 … … For each ctg Overall assessment per contingency Aggregation per security criterion Aggregation per security criterion Aggregation per security criterion … … S U S U S U … … S U Security classification per sample, per security criterion, per ctg Aggregate security classification per security criterion, per ctg Aggregate security classification per ctg Figure 4 - 1: Benchmark calculation procedure 4.3. Performance indices for validation As recalled above, the online platform consists of modules for merging, filtering, control, detailed assessment, fuzzy power flow, and GUI. Performance criteria for the computational modules (i.e. all modules except the GUI) regard: (1) the quality of the judgement, i.e. the ability to distinguish between  correct judgement;  missed alarms;  false alarms. Missed alarms refer to contingencies that are judged secure by the assessment process (namely iTESLA) but are classified insecure by the benchmark assessment approach. False alarms refer to contingencies that are classified as insecure but are actually found secure. These concepts are sketched in the next figure. (2) the speed of the evaluations: iTesla WP7: Validation Handbook V14 24/ 98  Computation time. S/S U/U U/S S/U Benchmark: Secure Modules/platform: Secure OK Benchmark: Unsecure Modules/platform: Unsecure OK Benchmark: Unsecure Modules/platform: Secure Missed alarm Benchmark: Secure Modules/platform: Unsecure False alarm Figure 4 - 2: Comparison between benchmark and filtering/assessment results The approach to evaluate the above performances is based on the comparison between the benchmark and the modules output. In particular, as far as the quality is concerned, the following classes of indices are introduced:  Accuracy;  Efficiency. which have to do with missed and false alarms, respectively. The indices can be defined:  for individual base cases (individual forecasts);  in an aggregated way, for a set of forecasts. In particular, the second class is important to report about the generality of the performance level of the classifications. 4.3.1. Indices applying to a single base case The following basic indices apply to the results of analysis of individual forecast states. Accuracy By accuracy we indicate the guarantee that no unsecure contingency is discarded. This property should have the highest priority in filtering methods, i.e. it is mandatory that dangerous contingencies are retained for detailed analysis and/or operator alert. Indices are defined first for a single base case, then for a generic set of base cases. The contingency list is assumed to be fixed and sufficiently exhaustive. o Accuracy = [1 – ( #Missed_alarm_ctgs / #unsecure_ctgs ) ] x 100 This definition applies to a specific forecast (base case) and contingency list. The number of unsecure contingencies (#unsecure_ctgs) is calculated from the benchmark procedure. The number of missed alarms (#Missed_alarm_ctgs) is computed by comparing the classification outcome (secure/not secure) of the module under analysis (or the chain of modules) and the outcome of the benchmark, according to the definition provided above. iTesla WP7: Validation Handbook V14 31/ 98 1) Check of FPF against results of the filtering process of the main online workflow; 2) Check of FPF against the benchmark. The individual steps are, for each contingency: • Run FPF. In case of non-convergence of the power flow, a dynamic instability is assumed. • Apply the “FPF security rules” and obtain the security judgement by FPF (i.e. secure/unsecure with respect to overloads / voltages). • Check FPF security assessment results against: 1) results of the main online workflow; 2) results of the benchmark. Performances of the FPF results are evaluated according to the definitions (accuracy, efficiency) provided above. As far as the comparison with main online workflow is concerned, detailed indices can be defined, focused on the cases that are misclassified by the main workflow and/or by FPF, in order to catch the differences in performances. In particular, the cases of missed and false alarms by main work flow and FPF can be compared and analyzed in detail (see the following figure):  Missed alarms by FPF, that were correctly classified as unsecure by the Main WF  Missed alarms by the Main WF, that were correctly classified as unsecure by FPF  False alarms by FPF, that were correctly classified as secure by the Main WF  False alarms by the Main WF, that were correctly classified as secure by FPF Moreover, it is important to investigate the causes of missed alarms as result from both approaches:  Missed alarms by FPF and by the Main WF This analysis can help to discover the strengths of each approach. Finally, the comparison of FPF results against the benchmark can also be useful to fine-tune the security thresholds of FPF. Main work flow output FPF output Correct Wrong Correct Wrong False alarm Missed alarm Figure 4-4 Comparison of contingency analysis results between main online work flow and FPF. Results are classified as “correct” or “wrong” according to comparison against the benchmark. iTesla WP7: Validation Handbook V14 32/ 98 5. COMMAND LINE USER GUIDE FOR THE OFFLINE PART: This part is a guide to the beginner user to learn how to use the platform and extract the accurate data for the validation. 5.1. How can the platform be accessed? The platform can be accessed through a linux command window. An example of command line is: ssh [email protected] It is also possible to access the platform through a SSH terminal for windows like Putty. Ask the developers or the other validators for the passwords. 5.2. What does an offline iTesla command line look like? A command line syntax is always the same: ~/itesla/bin/itools name-of-the-command [--name-of-option1 option1 --name-of- option2 option 2 ...] Not all commands have options. Options can be compulsory or optional. 5.3. How can all the existing commands be listed? Not all existing commands will be listed in this document. The only ones to be listed are the most useful for validation purposes. However, if a special need appears during the validation phase, it is possible to list all the existing commands on the platform to see if one of them can be useful. New commands can be added if necessary. List all existing commands ~/itesla/bin/itools This command lists all the existing commands. List all options associated with a command ~/itesla/bin/itools name-of-the-command --help This command lists all the options associated with any command. This is a very useful command since the commands and associated options are evolving frequently and the validation handbook can quickly become obsolete. iTesla WP7: Validation Handbook V14 33/ 98 5.4. What are the available command lines? This part describes a subset list of the available command lines. These are to evolve based on new needs and new developments. All command lines below are examples of real command lines on the French network. Options have to be adapted by the user. Since it is not always easy to adapt French examples on the 7-bus test network, specific examples of command lines on the 7-bus network will be presented in annex. When an output is displayed by the command, “real” outputs being difficult to read, a simple fictive example will illustrate it. Please note: in all the outputs listed below, “true” means stable and “false” means unstable. This ambiguous notation is to be changed in the next versions of the tool. 5.4.1. WP4 commands List workflows ~/itesla/bin/itools list-offline-workflows This command lists all workflows created on the platform. They may be running or not. This is a very useful command to monitor the offline process at any stage. Example of output: only one workflow called “workflow-0” is created. It is not running. +------------+---------+------+------+ | ID | Running | Step | Time | +------------+---------+------+------+ | workflow-0 | false | IDLE | | +------------+---------+------+------+ The header meaning is described below. ID: ID of the workflow. Running: false or true depending on the state of the workflow. Step: 4 steps are possible. - Idle: no calculation is in progress. - Initialization: preparation of input data in progress (Model parameterization for WP4.1, limits calculation for WP4.2, topology choice etc.). - Sampling: Process from WP4.1 to WP4.4 in progress. - Security rules computation: WP4.5 in progress Time: Remaining time before the end of the current task. Create a new workflow iTesla WP7: Validation Handbook V14 34/ 98 This command creates a new workflow. The workflow will not start automatically. Example of command taking into account the default parameters: ~/itesla/bin/itools create-offline-workflow --workflow workflow-0 Specific command if the user wants to change the default parameters: ~/itesla/bin/itools create-offline-workflow --base-case-countries FR --base- case-date 2013-01-15T18:45:00+01:00 --history-interval 2013-01- 01T00:00:00+01:00/2013-01-31T23:59:00+01:00 --workflow workflow-0 Options : workflow: name of the workflow to be created base-case-countries (optional): comma separated list of countries used to define offline workflows geographical perimeter. (ISO code of countries, 2 letters) for several countries, use comma separated list (only FR and BE for now). base-case-date (optional): date and time of the SN stored in the CIM repository used to define the structure (only) of the network. history-interval (optional): historical data interval of the SN stored in the Historical DB used for example by the sampling or limits and topologies of the WP4.2 optimizer. Time format corresponds to the ISO 8601 norm. For example, 2013-01-15T18:45:00+01:00 corresponds to January the 15th 2013, 6:45 PM, on time zone UTC+1. The defaults values for the 3 last options are defined in the “config.xml” file which will be described later in the document. The output confirms the creation of the workflow. Use “list-offline-workflows” command to visualize the created workflow. Create a new simplified workflow A simplified version of the offline workflow is available for tests. This version of the workflow only contains the modules from 4.3 to 4.5 which means that the input network situations for the dynamic simulations are not reconstructed (the samples are replaced with the historical data e.g. the SN associated with the historical interval defined when the workflow was created). To activate this simplification, add the option “—simplified”. Example: ~/itesla/bin/itools create-offline-workflow --workflow workflow-0 –-simplified- workflow Remove a workflow This command removes an existing workflow. iTesla WP7: Validation Handbook V14 35/ 98 ~/itesla/bin/itools remove-offline-workflow --workflow workflow-0 Options: workflow: name of the workflow to be removed No output is displayed. Use “list-offline-workflows” to make sure the workflow was removed. Start a workflow This command will start the offline process (from WP4.1 to WP4.4) on a specified previously created workflow. ~/itesla/bin/itools start-offline-workflow --duration 5 --workflow workflow-0 Options: duration: duration of the simulation in minutes. For now, it includes the initialization which can take a long time so the duration has to be defined carefully. workflow: name of the workflow to be started. The base case and historical interval don’t have to be defined again (it was already defined when the workflow was created). This command starts both the initialization process and WP4.1 to WP4.4 processes. If a simulation was previously generated, the initialization data is already in cache and does not need to be calculated again. When the initialization is launched for the first time, it can take a long time. When the initialization phase is over, the WP4.1 to WP4.4 phase is processed sets of samples by sets of samples. A set of samples (which number is configured) are generated (WP4.1) and processed all the way to the dynamic simulations phase and indexes generation (WP4.4). When the operation is finished on the first set, the process automatically starts again on the next set of samples and only stops the loops when calculation duration is over. If the defined calculation duration is short, only few samples will be processed (or none is the initialization phase in not complete). Validation DB and Simulation DB are gradually fed (one sample WP4.3 output at a time). No output is displayed. Use “list-offline-workflows” during the process to make sure the workflow is running. Particularity of the simplified workflow When the simplified workflow is used, there is a finite number of network situations to be analyzed (all the SN all the SN associated with the history interval). Set the “duration” to “-1” to process all the situations. The workflow automatically stops when it is over. Example: ~/itesla/bin/itools start-offline-workflow --duration -1 --workflow workflow-0 iTesla WP7: Validation Handbook V14 36/ 98 Stop a workflow This command will stop the offline process on the specified workflow before the duration is over. The command is not executed immediately. The process has to finish on the last sample set before the workflow stops. ~/itesla/bin/itools stop-offline-workflow --workflow workflow-0 Options: workflow: name of the workflow to be stopped No output is displayed. Use “list-offline-workflows” to make sure the workflow has stopped. Print security indicators synthesis For each studied contingency and for each index, this command prints the number of stable samples and unstable samples contained in the Simulation DB. This is the stability defined by the dynamic simulations. These indicators are not based on the decision trees. ~/itesla/bin/itools print-security-indexes-synthesis --workflow workflow-0 Options: workflow: name of the workflow with computed security rules Example of output for one contingency, 10 samples and 2 indexes: +-------------+---------+---------+ | Contingency | Index_1 | Index_2 | +-------------+---------+---------+ | N-1_line1 | 3/7 | 9/1 | +-------------+---------+---------+ After a contingency “N-1 line 1”, 7 samples out of 10 are unstable relatively to index 1 and 1 sample out of 10 is unstable relatively to index 2. Compute security rules (for all contingency/security index pairs) This command calculates the security rules with “DataMaestro” and puts them in the associated DB (Security rules DB). ~/itesla/bin/itools compute-security-rules --workflow workflow-0 Options: workflow: name of the workflow to be computed One security rule is computed per security index-contingency couple from Simulation DB input. For every situation, two security rules are computed: one for the WCSA and one for the MCLA. No output is displayed. Use “list-offline-workflows” during processing to make sure the rules are being generated. iTesla WP7: Validation Handbook V14 37/ 98 Many parameters are available to generate the trees. They can be found and changed in config.xml between tags “rulesbuilder”. More detailed explanation of the config.xml configuration file can be found in section 7.1. Here is some information about the parameters: missingThreshold: Since decision trees cannot be trained on missing values, the learning process filters out attributes with too many missing values before starting the actual training. The "missingThreshold" parameter defines the limit above which an attribute will be entirely discarded from the training set. E.g. for missingThreshold=0.1 (default value), any attribute that has more than 10% of missing values in the training set will be removed entirely. testSetSizeRatio: Proportion of the data set that belongs to the testing set. Default value = 0.2. useCrossValidation: A true value enables the k-fold Cross validation method. When setting cross-validation to true, the training set will be divided in as many test sets as defined. Then for each test set, the tree will be trained with the complementary set as training set. The global test error will be a mean of all the test sets, and one of the trained trees will be returned. E.g. for a 20% test set size (default), 5 mutually exclusive test sets will be defined, and 5 trees will be trained, each on the training set that complements the test set. alpha: The alpha value allows to control the size of the tree. The primary target of the alpha value is to avoid to split nodes if there is no statistical significance to split the node objects according to the node test. Alpha = 1 means that the splitting test at each node is always considered statistically significant which leads to a fully developed decision tree. In this case, all leafs are pure but there is a high risk of over-fitting. On the other side, if alpha = 0 the splitting test will always be rejected. In this case the tree will be degenerated to one node. The optimal value of alpha lays in the interval [0;1]. According to D4.4, some literature [1] claims that the optimum alpha value lies between [0.00005; 0.001]. Using a zero alpha value makes no sense and is not supported by the tool. In iTesla toolbox, the possible values for alpha are taken from a fixed list, and can be one of [1, 0.25, 0.1, 0.05, 0.025, 0.01, 0.005, 0.001, 0.0005, 0.00025, 0.0001, 0.00005]. [1] WEHENKEL, PAVELLA M.; “Decision Trees and Transient Stability of Electrical Power Systems”, Automatica Vol. 27, N°1, 1991. trueThreshold: Defines how the rules are generated from the decision tree. For the “not pure” leafs (i.e, not totally stable or unstable), defines the threshold for the proportion of “stable” training states for producing a “stable” prediction. Example: if trueThreshold = 0.95, only the impure leafs with a minimum of 95% of “stable” training states in the leaf provide a “stable” prediction, otherwise the prediction is “unstable”. The default value is 0.5. Increasing this value (ex: to 0.95) can reduce the number of misclassified unstable states (i.e., the missed alarms). On the other hand, it can increase the number of misclassified stable states (i.t., the false alarms). maxSplits: This parameter sets the maximum number of splits (test nodes) of the decision tree. The tree grows based on the stop splitting criteria (alpha value) until it doesn’t achieve the maximum number of splits. As soon as this iTesla WP7: Validation Handbook V14 38/ 98 maximum value is achieved the decision tree stops the procedure (ex: maxSplits = 1, means that the DT is composed by the root node and two leafs). Considering maxSplit = -1 will disable this stopping criteria. Pruning: A true value enables pruning after learning, which consists in removing subtrees that do not bring extra information when evaluated against a test set. Typically this happens when a certain part of the tree is overfitting, producing good results on the training set, but being irrelevant on the test set. To have access to information to validate the trees, set debug to “true”. Information about the generation of the decision trees will be available in metrics.csv and in other files that are stored in an output folder. The procedure to find the output folder can be: 1/ View what’s in “~/tmp” folder. Ex: ls -lrt ~/tmp 2/ Open the most recent folder « itesla_rules ». Ex: cd ~/tmp/itesla_rules_6961151753046427034 Compute security rule (for a specific contingency/security index pair for the WCA or MCLA) This command calculates a security rule with “DataMaestro” for a specific contingency/security index pair for the WCA or MCLA filtering process. After this computation, the security rule is stored in the associated DB (Security rules DB). Before running the command, when logging in the machine, the following instruction must be executed (to update the java class path): export CLASSPATH=~/itesla/share/java/*:~/itesla/share/java:$CLASSPATH then, the security rule command can be performed as in the following example: ~/itesla/bin/itools compute-security-rule --workflow workflow-0 --contingency N-2_Launa_Taute --index-type TSO_OVERLOAD --attribute-set MONTE_CARLO Options: workflow: name of the workflow to be computed contingency: contingency ID index-type: index ID attribute-set: WORST_CASE (extracts criteria on active variables only) or MONTE_CARLO (extracts criteria on all variables) The training parameters are the same already described for the compute-security-rules command. List computed security rules For each studied contingency, this command prints the couples “index-contingency” for which security rules have been computed. If a couple index-contingency is not displayed, it means that the security rule was not generated. It can be a bug during the generation of the security rules. ~/itesla/bin/itools list-security-rules --workflow workflow-0 iTesla WP7: Validation Handbook V14 39/ 98 Options: workflow: name of the workflow with computed security rules Example of output for 2 contingencies and 2 indexes: +----------------+---------------------+ | Contingency ID | Security index type | +----------------+---------------------+ | N-1_line1 | Index_1 | +----------------+---------------------+ | N-1_line1 | Index_2 | +----------------+---------------------+ | N-1_line2 | Index_1 | +----------------+---------------------+ | N-1_line2 | Index_2 | +----------------+---------------------+ Print a security rule This command will display the security rules associated to one index and one contingency previously calculated with the command “compute-security-rules“ and stored in security rules DB. ~/itesla/bin/itools print-security-rule --workflow workflow-0 --attribute-set WORST_CASE --contingency N-2_Waran --index-type TSO_OVERLOAD --purity-threshold 0.95 –-format ASCII_FLAT Options: workflow: name of the workflow with computed security rules attribute-set: WORST_CASE (extracts criteria on active variables only) or MONTE_CARLO (extracts criteria on all variables) contingency: contingency ID index-type: index ID [purity-threshold]: optional. Default value is 1.0. This threshold is related to the decision tree generation 7 . [format]: optional. Default value is ASCII_FLAT (output is an expression). Use value ASCII_TREE to have a tree shaped output. Use value GRAPHVIZ_TREE to generate the information to include in a .dot files. This file can be read graphically with open source “GVEdit” software for example. Example of output of the expression to reach a stable situation: ((bus1_P<10)AND(bus2_P<5))OR(bus3_P>8) 7 The purity threshold defines how the rules are generated from the decision tree. A purity threshold of 1 means that leaves nodes which are “not pure” i.e not totally stable or unstable are not taken into account for the generation of the rules. If the purity threshold is lower, it means that a leaf node can be considered as pure if a minimum amount of samples are in the same state. iTesla WP7: Validation Handbook V14 40/ 98 In reality, expressions can be far longer and complex. Visualize decision trees This command copies the rules of a selected workflow to the software “DataMaestro” (developed by PEPITE). This command is automatically executed by the “compute-security-rules” command. ~/itesla/bin/itools copy-rules --target-rules-db-class eu.itesla_project.histodb.client.impl.RulesDbClientFactoryImpl --workflow workflow-0 Options: workflow: name of the workflow with computed security rules target-rules-db-class: leave it as in the example After the command is launched, the decision tree can be read in PEPITE software “DataMaestro”. The GUI for DataMaestro can be accessed at the address: https://ns311581.ovh.net/histodb/rest/iteslasim/. Ask RTE or INESC for the passwords. To visualize the rules, select the workflow in the list on the left, select tab “Data” and click on “View” for the index wanted. If all the situations are not displayed, change “start=XX” and/or “count=XX” in the field under the tab “Data”. Figure 5 - 1: DataMaestro snapshot In next figure, the colours presented in the decision tree have the following meaning:  Green – Represent the number of stable training states in each node;  Orange – Represent the number of unstable training states in each node;  Red – Indicates the error rate against the test set used at the time of training. A large red bar indicates that the leaf is probably not very meaningful, as it performed poorly against the test set. iTesla WP7: Validation Handbook V14 47/ 98 5.5. How can the default simulator be changed? To use Hades instead of Eurostag in the offline workflows you generate, replace the following line in the config.xml file: Replace <simulatorFactoryClass>eu.itesla_project.eurostag.EurostagFactory</simulatorFa ctoryClass> With <simulatorFactoryClass>eu.itesla_project.pclfsim.PostContLoadFlowSimFactory</s imulatorFactoryClass> Restart the platform: offline-service.sh restart 5.6. How it is possible to use different configuration files in parallel? Sometimes, different “itools” commands have to be run on the same server with different configurations. If there is a need to run a command with a configuration which is different from the main config.xml configuration, use option “--config-name” to define which .xml file has to be used in the command. For example: A workflow using the default “config.xml” is running and the validator needs to start an “offline-validation” command with a configuration defined in “config2.xml”. To use the second configuration on the second command without stopping the workflow which was started previously, use the “--config-name” option: itools offline-validation --config-name config2 … The option can be applied to any command. 5.7. How is it possible to deal with an error message? The logs of the platform can be read to understand which list of actions was just performed by the platform. The .log file path is: ~/itesla/logs/offline.log To visualize its content in command lines, use for example the command below to print the last 100 lines of the file on the screen. tail -100 ~/itesla/logs/offline.log iTesla WP7: Validation Handbook V14 48/ 98 5.8. How can the results of an offline workflow be replicated? For validation purposes, the results of a workflow can be reproduced by fixing the Matlab seed used for the sampling process. To fix the Matlab seed: Edit the config file associated with wp4.1 (config.xml). In config.xml, to set the seed value to 0, add or uncomment the following line between the <samplerwp41> tags: <rngSeed>0</rngSeed>. 5.9. How can commands be automated? For some commands like check-security or run-impact-analysis, one may want to make calculations on several network situations and not just one. These commands will not evolve in themselves to allow it but scripts can be written to launch the commands as many times as necessary. 5.1. What is the content of offlinedb.csv? The file offlinedb.csv is a data file which contains information about the offline process. Let us consider C contingencies and I indexes tested on a network for which S samples were computed. There are S+1 lines in the table: one line for each sample and one header line. The 5 first columns in the table give information about 5 steps in the offline process. The information given for each sample is ‘OK’ or ‘NOK’. The C*I next columns give the stability state for each couple contingency-index provided by the dynamic simulations. The next columns give information about the network (active and reactive power on each line, active and reactive power for each load and each production plant, voltage values on each node etc.). There is no information about the stability provided by the security rules in this file. Here are excerpts of a generated file: There was no acceptable starting point for the 4 first samples (WP4.2 is listed as NOK). The next 5 samples went to the whole process. iTesla WP7: Validation Handbook V14 49/ 98 For each couple index - contingency, each sample is listed as stable or unstable. For each sample, all the values of the variables are available. For the samples for which step WP4.2 was NOK, the saved values are the ones in output of WP4.1 for P and Q, 0 for the other variables. 5.2. Is there a graphical user interface? A graphical user interface was also developed to use the platform. It can be accessed through the address: https://ns6375578.ovh.net/itesla. It is a web application which requires a recent browser. For now, not every command available through the command line interface can be launched through the graphical interface. To be completed. 5.3. How is it possible to switch between the French network and the 7-bus network in the offline part? Two different networks coexist in the platform. The French network and a 7-bus test network which will be described later in the document. This is a temporary procedure for the validation phase which is why it is not “clean”. To choose the 7-bus network as a default network, uncomment (remove the # symbols at the head of the lines) the 3 lines starting with “itesla_” on the configuration file “itesla.conf”. On the contrary, comment them (add # symbols at the head of the lines) to switch to the French network. The validator doesn’t need to understand all the lines in the configuration file “itesla.conf”. To access and change the configuration file, use command line: vi ~/itesla/etc/itesla.conf The content of the configuration file will appear. iTesla WP7: Validation Handbook V14 50/ 98 The configuration for the 7-bus network is: itesla_cache_dir=/home/itesla/7buses_test/overload/cache itesla_config_dir=/home/itesla/7buses_test/overload itesla_config_name=config mpi_tasks=16 mpi_hosts=localhost mpirun_options="-mca coll_tuned_use_dynamic_rules 1 -mca coll_tuned_bcast_algorithm 6 -mca btl_tcp_if_include eth2" The configuration for the French network is: itesla_config_name=config mpi_tasks=16 mpi_hosts=localhost mpirun_options="-mca coll_tuned_use_dynamic_rules 1 -mca coll_tuned_bcast_algorithm 6 -mca btl_tcp_if_include eth2"  itesla_cache_dir is the path to the cache folder. The default value is the path for the French network so it only has to be precised for the 7-bus network.  itesla_config_dir is the path to the configuration file. The default value is the path for the French network so it only has to be precised for the 7-bus network.  itesla_config_name is the name of the configuration file. The name used is config.xml but it is possible to test another configuration stored in a file called config2.xml for example and change that name accuratly.  mpi_tasks is the number of cores (16 per OVH machine).  mpi_hosts is the server used for the simulation. If you run the workflows on one server only you can write “localhost” or the name of the server explicitly ex: “ns6375582”.  mpirun_options is to be left as it is. If any change is made in the configuration file, the platform has to be restarted with command: offline-service.sh restart Then, clean the cache using the script: ~/clean_cache.sh The configuration for the 7-bus network was not maintained for a long time (since mid-2015). If you really want to use it, please contact the developers. 5.4. How can the version be checked? The versions of the platform are updated regularly. These updates can sometimes affect the results of tests so it can be useful to know about the version of the code. To check which version is being used on the platform use command: iTesla WP7: Validation Handbook V14 51/ 98 itools version 5.5. Examples of lists of commands The commands listed here apply to the French network. The equivalent list of commands for the 7-bus network is available in annex 7.11. Here are examples of basic commands to launch tests and analyze results. This example was launched on the “TSO_OVERLOAD” variant. (1) itools list-offline-workflows (List all the existing workflows) (2) itools create-offline-workflow --workflow workflow-0 (Create offline workflow named workflow-0) (3) itools list-offline-workflows (Check that the workflow was created) (4) itools start-offline-workflow --workflow workflow-0 --duration 720 (Start the sampling phase on workflow-0 for 12 hours) (5) itools list-offline-workflows (Check that the workflow is running and wait for the 12 hours to be over) (6) itools compute-security-rules --workflow workflow-0 (Compute the security rules) (7) itools print-security-indexes-synthesis --workflow workflow-0 (Print the security synthesis) (8) itools print-security-rule --workflow workflow-0 --attribute-set WORST_CASE -- contingency N-2_Launa_Taute --index-type TSO_OVERLOAD --purity-threshold 0.95 -- format ASCII_FLAT (Prints one security rule for one couple index/contingency) (9) itools export-security-indexes --workflow workflow-0 --output-file /tmp/offlinedb.csv --add-sample-column (Export validation .csv file in /tmp/offlinedb.csv) (10) itools export-metrics --workflow workflow-0 --output-file /tmp/metrics.csv (Export debug .csv file in /tmp/metrics.csv) (11) itools run-impact-analysis --case-dir ~/france/validation/offline/ workflow-0 --case-basename sample-7 --case-format XML (Run again eurostag simulations for sample 7) (12) ~/itesla/bin/itools export-eurostag --case-dir --case-dir ~/france/validation/offline/workflow-0 --case-basename sample-7 --case-format XML --case-format XML --output-dir /tmp/eurostag-7 (Export eurostag files for sample 7 in /tmp/eurostag-7) In the list of commands above, the first 6 steps are necessary to obtain raw results from the offline platform and have to be run in this order. The next steps allow the validator to extract useful data from the platform for further results. Step 7 gives an overview of the repartition of acceptable/unacceptable states for all the couples index/contingency. Step 8 allows the visualization of the generated rules (to be generated accordingly with the results of step 7). For validation purposes, it can be easier to use DataMaestro interface to visualize the decision trees instead. Step 9 is very useful to have an overview of the offline process. Step 10 can help with Eurostag or WP4.2 debugging. iTesla WP7: Validation Handbook V14 52/ 98 Step 11 Re-runs Eurostag and re-calculates the indicators on a given network situation. Step 12 Generate all the Eurostag files needed to open them in Eurostag and run the simulations manually. These last steps are just examples of what can be done with the platform and have to be adapted depending on the needs of the validator. 5.6. Specific needs The paragraphs below detail specific needs which were used by the validators so far. This section is not a priority for beginner users. All the examples below are taken from the French network. 5.6.1. Specific commands to have a few details about the indexes: This lists all the security indexes IDs needed as inputs for the 2nd command. itools simulations-db-list-security-indexes --workflow workflow-0 This command saves a .csv file with all the available information for the contingency “N-2_Cergy-Terrier” and the index “smallsignal”. itools simulations-db-print-security-indexes-details --workflow workflow-0 -- security-index SIM_N-2_Cergy-Terrier__IDX__SmallSignal > ~/tmp/workflow-0- output.csv For the smallsignal index, the previous command gives information about GMI, SMI and AMI added to the label stable or instable. This command saves a .csv file with all the available information for the contingency “N-2_DOMLOU_LAUNAY” and the index “TSO_overload”. itools simulations-db-print-security-indexes-details --security-index SIM_N- 2_DOMLOU_LAUNAY__IDX__TSO_overload –workflow workflow-0 > SIM_N- 2_DOMLOU_LAUNAY__IDX__TSO_overload.csv For the TSO_overload index, the previous command gives information about which lines are overloaded for which sample. 5.6.2. Specific commands to run again the KTH indexes in Matlab and analyze them 1/ Check that in config.xml, debug is set to “true” (<debug>true</debug>) in the eurostag part. 2/ Start a « run-impact-analysis » command. Ex: ~/itesla/bin/itools run-impact-analysis --case-dir ~/france/validation/offline/france_demo --case-basename sample-7 --case-format XML 3/ View what’s in “~/tmp” folder. iTesla WP7: Validation Handbook V14 53/ 98 Ex: ls -lrt ~/tmp 4/ Open the most recent folder « itesla_eurostag_impact_analysis ». Ex: cd ~/tmp/itesla_eurostag_impact_analysis_7509312567750733345 In folder in bold characters, you will find the .mat files used as inputs for the KTH indexes. In the example above, for sample “sample-7” and workflow “france_demo”. For example, “sim_fault_8_smallsignal.mat” corresponds to the smallsignal index for fault 8. The ID number of the contingency is given in order of what is listed in contingencies.csv (in $HOME/france/contingencies.csv) starting from 0. This folder contains other useful files: The “slowingvars.csv” files are intermediary steps to determine which lines/transformers were pre-selected as inputs for the small signal index. Once the list of the generators and nodes on which respectively the speed and voltage vary the most are selected, the list of lines and transformers connected to the selected nodes is established. The list of selected lines and transformers are labeled “NOT SKIPPED” in the esg_fs_X.out files (X is the ID number of the contingency). 5.6.3. Script to change the data between the 4.1 and 4.2 parts To avoid some crashes in Eurostag due to inconsistencies between static and dynamic data, a script was written (javascript language) to correct data in the offline process. The script can be found in: /home/itesla/.itesla/import-post-processor.js Here are two examples of what to do with the script. 5.6.3.1. Suppress generators To suppress the « TOTO » generator, add this piece of code: var gen = network.getGenerator("TOTO "); if (gen != null) { gen.remove(); if (debug) print("Generator TOTO removed from network"); } 5.6.3.2. Change limits iTesla WP7: Validation Handbook V14 54/ 98 The voltage limits and the active power limits can be changed. Use the functions defined in the code. For example, to set the minimum active power to 10 MW for G1 and set the stator voltages between 0.8 and 1.2 pu for G2, write: changeMinP("G1", 10) changeVoltageLimitsPu("G2", 0.8, 1.2) 6. COMMAND LINE USER GUIDE FOR THE ONLINE PART: This part is a guide to the beginner user to the online part. The installation of the online workflow on ns6375578.ovh.net server is in /home/itesla/itesla_wp5 folder. The itools commands can be run from the bin dir (/home/itesla/itesla_wp5/bin). Make sure to use "./itools" for running the commands (not just "itools", which would use the offline workflow commands). It is better to use only the online itools commands with this installation (the other commands, i.e. offline related, could have problems due to installation configuration). Please note that at least with the current installation (it is going to be fixed with the installation on the new servers), before starting the online workflow or the forecast errors analysis that uses mpi it is necessary to start the online service (this is not required for the other itools commands): cd /home/itesla/itesla_wp5/bin ./online-service.sh start To check if the service is running, use: cd /home/itesla/itesla_wp5/bin ./online-service.sh status When the online workflow is over, stop the service: cd /home/itesla/itesla_wp5/bin ./online-service.sh stop 6.1. What does an online iTesla command line look like? A command line syntax is always the same: ~/itesla_wp5/bin/itools name-of-the-command [--name-of-option1 option1 --name- of-option2 option 2 ...] Not all commands have options. Options can be compulsory or optional. 6.2. How can all the existing commands be listed? iTesla WP7: Validation Handbook V14 55/ 98 Not all existing commands will be listed in this document. The only ones to be listed are the most useful for validation purposes. However, if a special need appears during the validation phase, it is possible to list all the existing commands on the platform to see if one of them can be useful. List all existing commands ~/itesla_wp5/bin/itools This command lists all the existing commands. List all options associated with a command ~/itesla_wp5/bin/itools name-of-the-command --help This command lists all the options associated with any command. This is a very useful command since the commands and associated options are evolving frequently and the validation handbook can quickly become obsolete. 6.3. What are the available command lines? This part describes a subset list of the available command lines. These are to evolve based on new needs and new developments. All command lines below are examples of real command lines on the French network. Options have to be adapted by the user. 6.3.1. Run forecast errors analysis for the Monte-Carlo like approach These commands compute the forecast errors for the Monte-Carlo like approach (MCLA) and some uncertain data (means and standard deviations) for the Fuzzy Power Flow (FPF). The 2 commands run an “offline” forecast error analysis, saving the forecast errors models for later use in the online workflow. The first command uses the local computation platform, while the second one uses the computation platform based on mpi, to distribute the processing. ~/itesla_wp5/bin/itools run-forecast-errors-analysis --time-horizon DACF --analysis France_flagPQ1_ir0_80_method_4_nC_20 --base-case-date 2013-01-15T18:30:00.000+01:00 --history- interval 2013-01-01T00:00:00.000+01:00/2013-01-31T23:59:00.000+01:00 --method 4 --outliers 1 -- modalityGaussian 0 --flagPQ 1 --percentileHistorical 0.05 --ir 0.80 --nClusters 20 -- conditionalSampling 1 --nSamples 100 ~/itesla_wp5/bin/itools run-forecast-errors-analysis-mpi --time-horizon DACF --analysis France_flagPQ1_ir0_80_method_4_nC_20 --base-case-date 2013-01-15T18:30:00.000+01:00 --history- interval 2013-01-01T00:00:00.000+01:00/2013-01-31T23:59:00.000+01:00 --method 4 --outliers 1 -- modalityGaussian 0 --flagPQ 1 --percentileHistorical 0.05 --ir 0.80 --nClusters 20 -- conditionalSampling 1 --nSamples 100 Options: --time-horizon: time horizon of the forecasts to compare with the corresponding snapshots (SN), to compute the forecast error models (only DACF are supported, so far, by the platform). --analysis: id of the analysis outputted by this process. --base-case-date: date of the base case SN used by the analysis. This SN, coming from the CIM repository, is used to get the list of injections (RES and loads) of the network. If the SN is not available, an error is returned. iTesla WP7: Validation Handbook V14 56/ 98 --history-interval: interval of the historical data used for the analysis (SN and forecasts from historical DB). --method: method for missing data imputation performed in the pre-processing of real data series (methods properly described in D5.3 – Appendix B). 1 = New method proposed by RSE; 2 = Gaussian conditional sampling; 3 = Gaussian mixture imputation; 4 = Interpolation based method. --outliers: method of outlier management performed in the pre-processing of real data series. 0 = outliers are included as valid samples, 1 = outliers are excluded. --modalityGaussian: method for forecast error modeling. 1 = uses a “standard” error model (a normal distribution is assumed for each error variable, being the standard deviation of the error a fixed percentage of the forecast value; variables are sampled as independent; only historical SN are used with this method); 0 = uses historical data (SN and forecasts) with PCA and copula estimation. --flagPQ: option for reactive power sampling. 1 = P and Q sampled separately; 0 = P sampled and Q computed from P (constant power factor). --percentileHistorical: quantile of the distribution of historical data related to Q variables, to set realistic limits of Q samples, in case flagPQ = 0 (typical value: 0.05). --ir: fraction of explained variance for PCA (typical value: 0.8). Used if modalityGaussian = 0. --nClusters: number of clusters for PCA (typical rule from D4.1: nClusters=sqrt(no. of used historical samples/2)). Used if modalityGaussian = 0. --conditionalSampling: option of sampling that accounts for dependence of SN for a given forecast configuration 1 = with conditional sampling; 0 = without conditional sampling. Used if modalityGaussian = 0. -- nSamples: the number of samples to generate, offline. Samples are generated 'offline' for both the conditional and the unconditional cases of the MCLA. Options only in config.xml file, inside the <forecastErrorsAnalyzer> tag: - optionSign: option of MCLA sampling. 1 = inversion of the sign of the samples is not allowed for “pure” injection nodes, i.e. for pure load or pure RES generation; 0 = inversion of the sign of the samples is allowed. - percpuGaussLoad: parameter of the “standard” error model. Percentage of current load forecast, to be used for standard deviation of the “standard” error model (typical value: 0.05). - percpuGaussRes: parameter of the “standard” error model. Percentage of current RES forecast, to be used for standard deviation of the “standard” error model (typical value: 0.15). - correlationGauss: parameter of the “standard” error model. Pearson correlation among RES and load variables: 0 = all variables RES and load are uncorrelated; 1 = all variables RES and load are completely correlated; an intermediate value means that RES and LOAD are intermediately correlated, but inside each category (RES and Load) all loads (all RES) are completely correlated (typical value: 0.5). 6.3.2. Run forecast errors analysis for the WCA This command computes the forecast errors for the Worst State Approach (WCA) only. Unlike the forecast errors computation for the Monte-Carlo like approach, if this command is not executed with the accurate parameters before an online workflow is started, the calculation of forecast errors for the WCA will be done automatically in the online workflow. This behavior will impact the duration of the online workflow. ~/itesla_wp5/bin/itools analyse-uncertainties --case-basename 20130115_1830_FO2_FR0 --case-dir /home/itesla/itesla_wp5/france/caserepo/CIM/FO/2013/01/15 --case-format CIM1 --history-interval 2013-01-01T00:00:00+01:00/2013-01-31T23:59:00+01:00 --output-dir /tmp/test_wca Options: --case-basename: the case base name. iTesla WP7: Validation Handbook V14 63/ 98 --basecase: date of the considered base case forecast (e.g. 2013-01-15T18:30:00+01:00). --basecases-interval: the base cases interval. --csv-file: the ouptput CSV file. The command can be run on a specific workflow, on a list of workflows, on all the workflows run on a specific base case (base case date), or on all the workflows run on base cases included in an interval of dates. The command prints, in the csv file, the following information: workflow_id, basecase, secure_contingencies, unsecure_contingencies, unsecure_contingencies_ratio, secure_contingencies_ratio, unsecure_secure_contingencies_ratio, wca_missed_alarms, wca_missed_alarms_lst, wca_false_alarms, wca_false_alarms_lst, wca_accuracy, wca_efficiency, mcla_missed_alarms, mcla_missed_alarms_lst, mcla_false_alarms, mcla_false_alarms_lst, mcla_accuracy, mcla_efficiency, wf_missed_alarms, wf_missed_alarms_lst, wf_false_alarms, wf_false_alarms_lst, wf_accuracy,wf_efficiency The explanations of these fields are presented in section 4. Example of output (in validation mode): workflow_id 20130115_1830_20151204131644694 basecase 20130115_1830_FO2_FR0 secure_contingencies 1 unsecure_contingencies 2 unsecure_contingencies_ratio 0.6666667 secure_contingencies_ratio 0.33333334 unsecure_secure_contingencies_ratio 2 wca_missed_alarms 0 wca_missed_alarms_lst [] wca_false_alarms 1 wca_false_alarms_lst [N-1_Tavel-Tama] wca_accuracy 100 wca_efficiency 0 mcla_missed_alarms 0 mcla_missed_alarms_lst [] mcla_false_alarms 0 mcla_false_alarms_lst [] mcla_accuracy 100 mcla_efficiency 100 wf_missed_alarms 0 wf_missed_alarms_lst [] wf_false_alarms 0 wf_false_alarms_lst [] wf_accuracy 100 wf_efficiency 100 6.3.10. Print the results of the WCA step of an online workflow The command prints the stored results of the WCA step of an online workflow: cluster number per contingency. The clusters are: 1 – secure; 2 – requires only corrective actions; 3 – requires corrective and preventive actions; 4 – requires load shedding. iTesla WP7: Validation Handbook V14 64/ 98 This command also provides a cause for the assignment of a contingency into a cluster. This cause is printed along with the WCA results. ~/itesla_wp5/bin/itools print-online-workflow-wca-results --workflow 20150625151301333 Options: --workflow: id of the online workflow. --csv: print in CSV format, instead of tabular format. Example of output (in standard and validation mode): +-------------------+-----------+-----------+-----------+-----------+-----------+-----------------------------------------------------+ | Contingency | Cluster 1 | Cluster 2 | Cluster 3 | Cluster 4 | Undefined | Cause | +-------------------+-----------+-----------+-----------+-----------+-----------+-----------------------------------------------------+ | N-1_BRAUDL71PREGU | - | - | - | X | - | | | N-2_Launa_Taute | - | - | - | X | - | [Rule TSO_OVERLOAD (WORST_CASE) is always unsecure] | | N-1_Tavel-Tama | - | - | - | X | - | | +-------------------+-----------+-----------+-----------+-----------+-----------+-----------------------------------------------------+ 6.3.11. Print the results of the security rules application for an online workflow The command prints the stored results of the security rules application (from MCLA or WCA) of an online workflow: security status per contingency, per state and per phenomena. The status of the [contingency,state] pair (SAFE, SAFE WITH CORRECTIVE ACTIONS, UNSAFE) is computed according to the results of the security status of the different phenomena, i.e. Unsafe for dynamic phenomena (e.g. small signal stability) leads to UNSAFE status, while Unsafe for static phenomena (e.g. overload) leads to SAFE WITH CORRECTIVE ACTIONS. However, only if the validation parameter of the online workflow configuration is set to true, the online workflow stores also the results of the application of the WCA security rules to all samples (including the base case, state 0). ~/itesla_wp5/bin/itools print-online-workflow-rules-results --workflow 20150625151301333 Options: --workflow: id of the online workflow. --csv: export in CSV format, instead of tabular format (in tabular format if not specified). --wca: get results of WCA rules (for Monte Carlo if not specified). If adding the --wca parameter, the command prints the results of the WCA rules, instead of the MCLA rules. Example of output (in standard and validation mode): iTesla WP7: Validation Handbook V14 65/ 98 +-----------------+-------+------------------------------+-------------+--------------+-----------------+------------------+---------------+ | Contingency | State | Status | SmallSignal | TSO_overload | TSO_overvoltage | TSO_undervoltage | TSO_frequency | +-----------------+-------+------------------------------+-------------+--------------+-----------------+------------------+---------------+ | N-2_Launa_Taute | 0 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Launa_Taute | 1 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Launa_Taute | 2 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Launa_Taute | 3 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Launa_Taute | 4 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Avoi_Distr | 0 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-2_Avoi_Distr | 1 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-2_Avoi_Distr | 2 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Avoi_Distr | 3 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Avoi_Distr | 4 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-2_Waran | 0 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Unsafe | Safe | | N-2_Waran | 1 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Unsafe | Unsafe | Unsafe | Safe | | N-2_Waran | 2 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Unsafe | Safe | | N-2_Waran | 3 | SAFE | Safe | Safe | Safe | Safe | Safe | | N-2_Waran | 4 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Safe | Safe | | N-2_Rouge_Barna | 0 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Rouge_Barna | 1 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | | N-2_Rouge_Barna | 2 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-2_Rouge_Barna | 3 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-2_Rouge_Barna | 4 | UNSAFE | Unsafe | Safe | Safe | Unsafe | Safe | | N-1_Tavel-Tama | 0 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Unsafe | Safe | | N-1_Tavel-Tama | 1 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Unsafe | Safe | | N-1_Tavel-Tama | 2 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Safe | Unsafe | Safe | | N-1_Tavel-Tama | 3 | SAFE_WITH_CORRECTIVE_ACTIONS | Safe | Safe | Unsafe | Unsafe | Safe | | N-1_Tavel-Tama | 4 | UNSAFE | Unsafe | Safe | Unsafe | Unsafe | Safe | +-----------------+-------+------------------------------+-------------+--------------+-----------------+------------------+---------------+ 6.3.12. Print the results of the corrective control optimizer of an online workflow The command prints the stored results of the corrective control optimizer of an online workflow: list of corrective actions per contingency and state. The corrective actions are read from an XML file, referred in the config.xml. ~/itesla_wp5/bin/itools print-online-workflow-optimizer-results --workflow 20150625151301333 Options: --workflow: id of the online workflow. --csv: print in CSV format, instead of tabular format. Example of output (in standard and validation mode): Contingency State Actions N- 2_Launa_Taute 0 LAUNAL72TAUTE_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f];LAUNAL71TAUTE_ACLS_opening[boolean_action_param=true,strin g_action_param='value',float_action_param=0.0f] N- 2_Launa_Taute 1 LAUNAL72TAUTE_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f];LAUNAL71TAUTE_ACLS_opening[boolean_action_param=true,strin g_action_param='value',float_action_param=0.0f] N- 2_Launa_Taute 2 LAUNAL72TAUTE_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f];LAUNAL71TAUTE_ACLS_opening[boolean_action_param=true,strin g_action_param='value',float_action_param=0.0f] N- 2_Launa_Taute 3 LAUNAL72TAUTE_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f];LAUNAL71TAUTE_ACLS_opening[boolean_action_param=true,strin g_action_param='value',float_action_param=0.0f] N- 2_Launa_Taute 4 LAUNAL72TAUTE_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f];LAUNAL71TAUTE_ACLS_opening[boolean_action_param=true,strin g_action_param='value',float_action_param=0.0f] N- 1_BRAUDL71PRE GU 2 BRAUDL71PREGU_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f] N- 1_BRAUDL71PRE GU 3 BRAUDL71PREGU_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f] N- 1_BRAUDL71PRE GU 4 BRAUDL71PREGU_ACLS_opening[boolean_action_param=true,string_action_param='value',f loat_action_param=0.0f] iTesla WP7: Validation Handbook V14 66/ 98 The table lists just the states analysed by the optimizer, according to MCLA output. The states, according to the optimizer, should become stable if the actions are applied. If the optimizer did not find actions for a state and a contingency, the [state, contingency] pair is analysed using the TD simulation and it will not appear in this table. Here are the different exit status of the optimizer which can occur: Error code Message to the dispatcher Diagnostic MANUAL_CORRECTIVE_ACTION_FOUND Specific corrective actions have to be implemented by the dispatcher SUCCESS  TAKE ACTION AUTOMATIC_CORRECTIVE_ACTION_FOUND Corrective actions are automatically implemented SUCCESS  NOTHING TO DO NO_CORRECTIVE_ACTION_FOUND The proposed specific corrective actions are not able to relieve the constraints violation FAILURE  ENRICH THE KNOWLEDGE DATABASE NO_SUPPORTED_CORRECTIVE_ACTION_AVAI LABLE_IN_THE_DATABASE No specific corrective action found in the catalogue for that contingency and the violated constraints FAILURE  ENRICH THE KNOWLEDGE DATABASE NO_CONSTRAINT_VIOLATED No post-contingency constraint violation found FAILURE  CONTACT SUPPORT OPTIMIZER_EXECUTION_ERROR Optimization module error (know issue) FAILURE  CONTACT SUPPORT OPTIMIZER_INTERNAL_ERROR Optimization module error (crash) FAILURE  CONTACT SUPPORT 6.3.13. Print the results of the T-D simulation step of an online workflow The command prints the stored results of the time-domain simulation step of an online workflow: security status per contingency, per state and per phenomena. ~/itesla_wp5/bin/itools print-online-workflow-simulation-results --workflow 20150625151301333 Options: --workflow: id of the online workflow. --csv: print in CSV format, instead of tabular format. Example of output (in standard and validation mode): iTesla WP7: Validation Handbook V14 67/ 98 +-----------------+-------+----------+------------------+-------------+-----------+---------------+ | Contingency | State | Overload | OverUnderVoltage | SmallSignal | Transient | TSO_frequency | +-----------------+-------+----------+------------------+-------------+-----------+---------------+ | N-2_Launa_Taute | 0 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 1 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 2 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 5 | Unsafe | Safe | Unsafe | Safe | Safe | | N-2_Launa_Taute | 6 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 7 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 8 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Launa_Taute | 9 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 0 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 1 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 2 | Unsafe | Unsafe | Safe | Safe | Safe | | N-2_Avoi_Distr | 5 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 6 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 7 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 8 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Avoi_Distr | 9 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 0 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 1 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 2 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 5 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 6 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 7 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 8 | Unsafe | Safe | Safe | Safe | Safe | | N-2_Rouge_Barna | 9 | Unsafe | Safe | Safe | Safe | Safe | | N-1_Tavel-Tama | 5 | Unsafe | Safe | Safe | Safe | Safe | | N-1_Tavel-Tama | 6 | Unsafe | Safe | Safe | Safe | Safe | +-----------------+-------+----------+------------------+-------------+-----------+---------------+ If the workflow is not run in validation mode, the time-domain simulation is run only for the [state, contingency] pairs that present dynamic issues, according to MCLA output (so, they were not given as input to IPSO), or for the pairs IPSO was not able to find corrective actions. 6.3.14. Delete an online workflow The command deletes an online workflow stored by the platform, along with all the workflow stored data (results and states). ~/itesla_wp5/bin/itools delete-online-workflow --workflow 20150625151301333 Options: --workflow: id of the online workflow. 6.3.15. List stored states of an online workflow The command prints a list of stored sampled states of an online workflow. The sampled states of an online workflow are stored, after Monte Carlo sampling and load flow, if the proper online workflow parameter is set to true (see online workflow parameters). ~/itesla_wp5/bin/itools list-online-workflow-states --workflow 20150625151301333 Options: --workflow: id of the online workflow. iTesla WP7: Validation Handbook V14 68/ 98 Example of output (in standard and validation mode): Stored States = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 6.3.16. Delete online workflow states The command deletes the stored states of an online workflow. ~/itesla_wp5/bin/itools delete-online-workflow-states --workflow 20150625151301333 Options: --workflow: id of the online workflow. 6.3.17. Export a predefined online workflow state The command export, in CSV format, the network data (load flow results) of the stored states of an online workflow. The command writes data in 6 files: buses.csv, lines.csv, tfos2w.csv, tfos3w.csv, generators.csv and loads.csv, containing the data of the different equipment’s of the network. ~/itesla_wp5/bin/itools export-online-workflow-state --workflow 20150625151301333 --state 0 -- folder state-0 Options: --workflow: id of the online workflow. --state: id of the online workflow state. --folder: folder where to store the CSV files. It must exist. If not provided, or if it does not exists, the files are stored in the current folder. 6.3.18. Export online workflow states The command export, in CSV format, the network data (load flow results) of all the states of an online workflow. ~/itesla_wp5/bin/itools export-online-workflow-states --workflow 20150625151301333 --file ~/itesla_wp5/states.csv Options: --workflow: id of the online workflow. --file: csv file with all states. Example of output (in standard and validation mode): iTesla WP7: Validation Handbook V14 69/ 98 workflow st at e cimName datetime dayt ime mont h forecastTi me horizon SSCESL61SSCHR_A CLS__TO__SSCESP 6_S_VL6_P other op. conditions… 20130115_18 30_20151204 131644694 0 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 134.02362 … 20130115_18 30_20151204 131644694 64 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 139.51735 … 20130115_18 30_20151204 131644694 1 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 122.018005 … 20130115_18 30_20151204 131644694 65 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 140.72894 … 20130115_18 30_20151204 131644694 2 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 151.8527 … 20130115_18 30_20151204 131644694 66 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 154.62936 … 20130115_18 30_20151204 131644694 3 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 119.76939 … 20130115_18 30_20151204 131644694 67 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 161.00987 … 20130115_18 30_20151204 131644694 4 20130115_183 0_FO2_FR0 Tue Jan 15 18:30:00 CET 2013 6660 0000 1 1470 DACF 139.60204 … 6.3.19. Run the security rules on a predefined online workflow state The command runs the security rules on a stored state of an online workflow. ~/itesla_wp5/bin/itools run-security-rules-on-state --workflow 20150625151301333 --state 0 -- offline-workflow 1358271900000-1356994800000-1359673140000 Options: --workflow: id of the online workflow. --state: id of the online workflow state. --offline-workflow: id of the offline workflow that produces the security rules. If not provided, the offline workflow used for running the online workflow is used. --wca: get results of WCA rules (uses MCLA rules if not specified). Example of output (in standard and validation mode): +-------------------+-------------+-----------+--------------+-----------------+------------------+-----------------+---------------+ | Contingency | SMALLSIGNAL | TRANSIENT | TSO_OVERLOAD | TSO_OVERVOLTAGE | TSO_UNDERVOLTAGE | TSO_SYNCHROLOSS | TSO_FREQUENCY | +-------------------+-------------+-----------+--------------+-----------------+------------------+-----------------+---------------+ | N-2_Tavel-Tama | NOK | NA | NOK | NOK | NOK | OK | OK | | N-2_Waran | OK | NA | OK | NOK | NOK | OK | OK | | N-1_Tavel-Tama | OK | NA | OK | NOK | NOK | OK | OK | | N-2_Cergy-Terrier | OK | NA | OK | NOK | OK | OK | OK | | N-2_Launa_Taute | NOK | NA | OK | NOK | NOK | OK | OK | | N-2_Avoi_Distr | NOK | NA | OK | OK | NOK | OK | OK | | N-2_Rouge_Barna | NOK | NA | OK | NOK | NOK | OK | OK | | N-2_Flama_Menu | NOK | NA | OK | NOK | NOK | OK | OK | +-------------------+-------------+-----------+--------------+-----------------+------------------+-----------------+---------------+ 6.3.20. Run the impact analysis on a predefined online workflow state The command runs an impact analysis on a stored state of an online workflow. ~/itesla_wp5/bin/itools run-impact-analysis-on-state --workflow 20150625151301333 --state 0 iTesla WP7: Validation Handbook V14 70/ 98 Options: --workflow: id of the online workflow. --state: id of the online workflow state. --contingencies: contingencies to test, separated by “,” (all the db if not specified). Example of output (in standard and validation mode): +-------------------+----------+------------------+-------------+-----------+---------------+ | Contingency | OVERLOAD | OVERUNDERVOLTAGE | SMALLSIGNAL | TRANSIENT | TSO_FREQUENCY | +-------------------+----------+------------------+-------------+-----------+---------------+ | N-2_Cergy-Terrier | NOK | NOK | NOK | OK | OK | | N-2_Tavel-Tama | NOK | NOK | NOK | OK | OK | | N-1_Tavel-Tama | NOK | NOK | NOK | OK | OK | | N-2_Avoi_Distr | NOK | NOK | OK | OK | OK | | N-2_Flama_Menu | NOK | NOK | OK | OK | OK | | N-2_Launa_Taute | NOK | NOK | OK | OK | OK | | N-2_Rouge_Barna | NOK | NOK | OK | OK | OK | | N-2_Waran | NOK | NOK | OK | OK | OK | +-------------------+----------+------------------+-------------+-----------+---------------+ 6.3.21. Print metrics (debugging) The command prints the metrics stored by the online workflow returned by some online steps. ~/itesla_wp5/bin/itools print-online-workflow-metrics --workflow 20150625151301333 --step STABILIZATION --state 0 Options: --workflow: id of the online workflow. --step: the online step (FORECAST_ERRORS_ANALYSIS, MERGING, WORST_CASE_APPROACH, MONTE_CARLO_SAMPLING, LOAD_FLOW, SECURITY_RULES_ASSESSMENT, CONTROL_ACTION_OPTIMIZATION, TIME_DOMAIN_SIMULATION, STABILIZATION, IMPACT_ANALYSIS). --state: the state id (if not specified the metrics of all the states are printed, in CSV format). The command can print the metrics related to a specific step (for now, just available for STABILIZATION and LOAD_FLOW) and a specific sample (in the example below, the stabilization module failed for state 4, and details of the error can be found in the metrics): ./itools print-online-workflow-metrics --workflow 20150917105739449 --step STABILIZATION --state 4 Example of output (in standard and validation mode): +-------+-------------------+------------------------------------------------------------------------------------------------------+ | State | Parameter | Value | +-------+-------------------+------------------------------------------------------------------------------------------------------+ | 4 | steadyStateErrors | [{"machine":"MANOS6GR","macrobloc":"RT_HYDRH","variable":"D(SREGUL )/DT","blocdesort":"1","valeurPu | | | | ":19.4342},{"machine":"REVI57G2","macrobloc":"RT_HYDRH","variable":"D(SREGUL )/DT","blocdesort":"1" | | | | ,"valeurPu":21.1003},{"machine":"REVI57GR","macrobloc":"RT_HYDRH","variable":"D(SREGUL )/DT","blocd | | | | esort":"1","valeurPu":25.3751},{"machine":"REVI57G0","macrobloc":"RT_HYDRH","variable":"D(SREGUL )/ | | | | DT","blocdesort":"1","valeurPu":27.2171},{"machine":"HERMI6G2","macrobloc":"RT_HYDRH","variable":"D( | | | | SREGUL )/DT","blocdesort":"1","valeurPu":298.6122},{"machine":"COGE36A0","macrobloc":"AMFAREGU","va | | | | riable":"","blocdesort":"21","valeurPu":2396.6187}] | | 4 | lf_diverge | false | | 4 | lf_iterations | 7 | | 4 | stab_rich_status | COMPLETED | +-------+-------------------+------------------------------------------------------------------------------------------------------+ iTesla WP7: Validation Handbook V14 71/ 98 The same command can print (in csv format) the metric related to a step for all the states: ./itools print-online-workflow-metrics --workflow 20150917105739449 --step LOAD_FLOW Example of output (in standard and validation mode): state,cause,contraintes,csprMarcheForcee,dureeCalcul,nbIter,statut 0,0,29,0,0.07,13,OK 1,0,56,0,0.04,12,OK 2,0,36,0,0.04,10,OK 3,0,46,0,0.06,13,OK 4,0,70,0,0.06,14,OK 6.3.22. Print the stored violations of an online workflow The online workflow has the option of storing, for a state (i.e. a Monte Carlo sampled state) and a specific online step, the network (voltage and current) violations. So far, the violations are stored after the pre-contingency loadflow step of the MCLA (i.e. the LOAD_FLOW step), for each Monte Carlo state (state 0 is the base case). The stored violations of a workflow can be printed (as table or in csv format) using the command: ./itools print-online-workflow-violations --workflow 20150917105739449 --step LOAD_FLOW Options: --workflow: id of the online workflow. --step: the online step (FORECAST_ERRORS_ANALYSIS, MERGING, WORST_CASE_APPROACH, MONTE_CARLO_SAMPLING, LOAD_FLOW, SECURITY_RULES_ASSESSMENT, CONTROL_ACTION_OPTIMIZATION, TIME_DOMAIN_SIMULATION). --state: the state id. --csv: print in CSV format, instead of tabular format. The command can print the violations of all states/steps, of a specific state (using the state id) or of a specific step (using the step id). For now, this command is just available for the LOAD_FLOW step. Example of output (in standard and validation mode): iTesla WP7: Validation Handbook V14 72/ 98 +-------+-----------+---------------+--------------+-----------+-------+ | State | Step | Equipment | Type | Value | Limit | +-------+-----------+---------------+--------------+-----------+-------+ | 0 | LOAD_FLOW | M_PONP7_S_VL7 | LOW_VOLTAGE | 387.2086 | 391.0 | | 0 | LOAD_FLOW | PALUEP7_S_VL7 | HIGH_VOLTAGE | 420.01477 | 420.0 | | 0 | LOAD_FLOW | PONTEP7_S_VL7 | LOW_VOLTAGE | 387.20828 | 391.0 | | 1 | LOAD_FLOW | ANTIBP6_S_VL6 | LOW_VOLTAGE | 226.83783 | 227.0 | | 1 | LOAD_FLOW | ARGE6P6_S_VL6 | LOW_VOLTAGE | 225.90776 | 226.0 | | 1 | LOAD_FLOW | ARGIAP6_S_VL6 | HIGH_VOLTAGE | 252.78702 | 245.0 | | 1 | LOAD_FLOW | ARGIAP7_S_VL7 | HIGH_VOLTAGE | 421.42554 | 420.0 | | 1 | LOAD_FLOW | BATIGP6_S_VL6 | LOW_VOLTAGE | 225.41414 | 226.0 | | 1 | LOAD_FLOW | BIANCP7_S_VL7 | LOW_VOLTAGE | 384.09125 | 391.0 | | 1 | LOAD_FLOW | BOCCAP6_S_VL6 | LOW_VOLTAGE | 226.88432 | 227.0 | | 1 | LOAD_FLOW | BRAUDP6_S_VL6 | HIGH_VOLTAGE | 245.19269 | 245.0 | | 1 | LOAD_FLOW | B_CARP7_S_VL7 | LOW_VOLTAGE | 383.63913 | 391.0 | | 1 | LOAD_FLOW | CALA5P7_S_VL7 | LOW_VOLTAGE | 394.40472 | 396.0 | | 1 | LOAD_FLOW | CANTEP6_S_VL6 | HIGH_VOLTAGE | 246.23953 | 245.0 | +-------+-----------+---------------+--------------+-----------+-------+ 6.3.23. Print post-contingency violations The online workflow also stores, for each sample (and so, also for the base case), the post-contingency violations obtained from the computation of a post-contingency load flow. The stored post-contingency violations can be printed using the command: ./itools print-online-workflow-postcontingency-violations --workflow 20150917105739449 Options: --workflow: id of the online workflow. --state: the state id. --contingency: the contingency id. --csv: print in CSV format, instead of tabular format. The command can print the violations for a specific state (using the state id), for a specific contingency (using the contingency id), or for the whole workflow. The output can be printed in a table (see example below), or in csv format. Example of output (in standard and validation mode): iTesla WP7: Validation Handbook V14 79/ 98 These databases are only valid for the French/Belgian network. If some of these databases are shared with the 7-bus network, it will be precised. Some databases are common to the offline and online part and some databases are specific. 7.3.1. CIM repository: This is a file system organized database: SN + FO organized per format/date/country. There is only one file in the database for now. This is a temporary situation. The databases are not common to the offline and online part for now but could be configured this way. This database is not shared with the 7-bus network. 7.3.2. Historical DB: The database is continuously fed by SN and FO files (from the CIM database). Time series oriented data (transposed compared to CIM data, i.e. time series for a given state variable). This database is not on the same ovh server than the other databases. A simple way to retrieve historical data is to use what was developed by Imperial College for the validation of WP4.1 which makes historical data available as .mat files. Otherwise, it is possible to retrieve data making queries (see annex 7.13). The database is common to the offline and online part. This database is shared with the 7-bus network. 7.3.3. Dynamic DB: The database contains EUROSTAG dynamic data (.fri, .frm, .par, .pcp, .rcp for every generator for now) and references to lib MODELICA models. The same database is used on the 7-bus network. The database is common to the offline and online part. This database is shared with the 7-bus network. 7.3.4. Step-up transformers DB: The database contains a description of step up transformers (static data) to enrich the initial static description contained in the CIM files. The database is common to the offline and online part. There are no step-up transformers on the 7-bus network so no need for such a database. iTesla WP7: Validation Handbook V14 80/ 98 7.3.5. Contingencies DB: The databases contain a description of the contingencies. A database contains a list (.CSV format) of lines, transformers and generators on which faults are be simulated. The dynamic description of the fault (stabilization phase, fault duration etc.) is to be done in the configuration files. The database are not common to the offline and online part for now but could be configured this way. They have to be consistent (e.g contain the same list of contingencies) for the online workflows to be compatible with the offline workflows. This database is not shared with the 7-bus network. 7.3.6. Simulation DB: The database contains WP4.2 states and WP4.3 security indicators. The information is written by the workflow during sampling/simulation step and read by the workflow during security rules computation. The database is specific to the offline part. This database is not shared with the 7-bus network. 7.3.7. Validation DB: The database contains full WP4.2 cases in IIDM XML format. The data can be loaded in Convergence 11 for further studies. Combined with the information contained in Dynamic DB, it allows the user to generate input files for Eurostag. Unlike Simulation DB, this database contains the network structure for each sample which can be used for validation purposes. The database is specific to the offline part. This database is not shared with the 7-bus network. 7.3.8. Forecast error repository The forecast error directory is defined in the online config.xml file as the “forecastErrorsDir” parameter. For each error calculation ID, there are two files (forecast_errors_DACF.mat and a statistics_DACF.csv). These files give raw data about the error calculation. 7.3.9. Security rules DB: The information contained in the database is written by the workflow during security rules computation and read by the online workflow. 11 Software used by RTE/CORESO to run static simulations. iTesla WP7: Validation Handbook V14 81/ 98 The database is common to the offline and online part. This database is not shared with the 7-bus network. 7.3.10. Online DB The online DB is the component in charge of storing online data, i.e. all the data the online workflow and its modules need to store (and that are not already stored in other platform repositories), e.g. results of the online workflow modules (wca, mcla, t-d simulation, etc.), sampled states, metrics, etc. It is the component that provides the data when outputs like the online workflows or the modules results are printed using the itools commands. 7.4. Upload historical data on the historical database: First connect to the server hosting the historical database: ns311581.ovh.net. You can do it with a SSH client (Putty) using the same password than with servers ns6375578.ovh.net, ns6375579.ovh.net or ns6375582.ovh.net or use command line “ssh [email protected]” from the test server you are using. For example, to upload the CIM files from January 2015 in the “frbe/2015” database:  Check that the folder /home/itesla/CIM/SN/2015/01/ contains the CIM files to upload  Check that the right database is configured: <histodb> <histoDbSourceName>frbe/2015</histoDbSourceName>  Use command line to upload January 2015 in DB frbe/2015: curl -X POST -k -u itesla:itesl4 'https://localhost:8183/histodb/rest/itesladb/frbe/2015/itesla' -- data-urlencode 'dir=/home/itesla/CIM/SN/2015/01/'  Define the baseline: curl -X POST -k -u itesla:itesl4 'https://localhost:8183/histodb/rest/ frbe /2015/itesla/referenceCIM' --data '/home/itesla/CIM/SN/2015/01/01/20150101_0000_SN4_BE0.zip' In the example above, the baseline is the CIM file '/home/itesla/CIM/SN/2015/01/01/20150101_0000_SN4_BE0.zip'. Any situation can be defined as a baseline because it is not used in the calculation but bugs occur if no situation is defined. Please note that when new files are added to the historical database, they are added to the existing files (except if their name is the same than the existing ones in which case they are replaced). iTesla WP7: Validation Handbook V14 82/ 98 7.5. Upload dynamic data to the dynamic database: This part describes how to handle the dynamic database related to Eurostag. Keep in mind that the dynamic database is common to servers 78, 79 and 82 for now. These commands have to be used only if some validators have a dedicated server. The structure of the data is very specific and must be kept to upload new data: Figure 7 - 1: Structure of the DDB  dico.txt contains the mapping between the CIM ID and the Eurostag ID. Example for the French network : CIM_ID;EUROSTAG_BDD_GEN ABBEV_TG1_WGU_SM;ABBEVT 1 ABBEV_TG2_WGU_SM;ABBEVT 2  gene is the folder in which the .dd files are stored. The .dd files are excerpts from the .dta file.  reguls is a folder which contains the Eurostag regulations. The .fri .frm .par .pcp .rcp files must be stored for each regulation. To update data to the dynamic database (e.g update data already existing in the database), the dynamic database must be erased first and uploaded again! To erase the data base, use: itools ddb-unload --host 0.0.0.0 --port 8080 --user user --password password Parameters host, port, user and password must be consistent with the config.xml (tag <ddb>). To upload the French data in the ddb, use: ~/BDD gene regul dico.txt Gen1.dd Gen2.dd … Reg1.fri, Reg1.frm, Reg1.par, Reg1.pcp, Reg1.rcp … Reg2.fri, Reg2.frm, Reg2.par, Reg2.pcp, Reg2.rcp iTesla WP7: Validation Handbook V14 83/ 98 itools ddb-load-eurostag --host 0.0.0.0 --port 8080 --user user --password password --eurostag-version 5.1.1 --data-dir ~/DDB The ~/DDB folder must be structured as defined above. It is possible to use ddb-load-eurostag a several times in a row to gradually upload data for different generators (but not update existing ones). The Dymola dynamic database will be described later. 7.6. Data formats: A specific data format internal to the platform “IIDM XML” (Internal iTesla Data Model XML) was developed for the needs of the project. These .xml files contain the whole description of the network. They can be opened with Convergence or Eurostag if combined with the dynamic data. 7.7. Fault pattern: Two .seq files are generated to run the “stabilization” simulation and the “impact analysis” simulation. The pattern for the two simulations can be tuned in the config.xml file. The fault patterns used in the platform are illustrated below: Figure 7 - 2: "stabilization" pattern Figure 7 - 3: "impact analysis" pattern For a line, the fault is simulated in the middle and is three-phased. No disturbance total duration : preFaultSimulationStopInstant The fault occurs Protection circuit breakers open : the fault is cleared No disturbance Short circuit on one or more line(s) The line(s) witha short circuit are out of voltage fault duration : branchFaultShortCircuitDuration Pre-fault duration : faultEventInstant total duration : postFaultSimulationStopInstant iTesla WP7: Validation Handbook V14 84/ 98 All the duration parameters in the config.xml file are in seconds. To be adapted for generators 7.8. Units The platform outputs use units adapted to the scale of transmission systems. The units are listed below: Physical quantity Current Voltage Active Power Reactive Power Unit A kV MW MVAr 7.9. Useful linux commands The command-line interpreter or shell used is “bash”. Many online tutorials exist to learn the basic linux commands. Nevertheless, a few tips can help with the validation: 7.9.1. Useful linux particularities Right click on a selection copies it where the cursor is. CTRL+C combination kills a process. 7.9.2. How is it possible to copy/paste from windows to linux terminal and vice versa? If you work in a windows environment and access iTesla platform through Putty for example, copying text from windows environment to the linux terminal and vice versa can be useful: Windows to Linux  Copy as usual in windows environment  Select linux emulator  Paste using right-click Linux to Windows  Copy using scroll wheel click in linux emulator  Select windows environment  Paste as usual in windows environment 7.9.3. How can intermediary results be saved for later? If instead of just visualizing an output you want to save it in a text file, use: iTesla WP7: Validation Handbook V14 85/ 98 ~/itesla/bin/itools name-of-the-command [--name-of-option1 option1 --name-of- option2 option 2 ...]>/tmp/results.txt 7.9.4. How is it possible to copy files from the linux server to another linux computer? Use command: scp [email protected]:/origin_folder/name_of_file_to_copy.csv /destination_folder Change the server address if necessary. For file transfers from linux environment to Windows environment, softwares such as WinSCP can also be very useful. 7.10. Configured indexes: Only few indexes have been integrated on the platform so far. These indexes are:  Smallsignal, Transient, Overload, OverUnderVoltage described in D4.3 (Definition of expected results from time domain simulations).  TSO_Synchroloss, TSO_Overvoltage, TSO_Undervoltage, TSO_Overload, TSO_Frequency, TSO_generator_voltage_automaton, TSO_generator_speed_automaton developed by RTE. Here is a short definition of the RTE indexes: TSO_Overload compares the current in steady state (last value of current, it may be a problem is the steady state is not reached) on all the lines and transformers of the network with its operational upper limits as defined in the CIM file. If at least one limit is violated, the situation is considered unacceptable. TSO_Overvoltage compares the voltage in steady state on all the buses of the network either with the upper limit defined in the CIM file or with the maximum value in the historical data. If at least one limit is violated, the situation is considered unacceptable. TSO_Undervoltage compares the voltage in steady state on all the buses of the network either with the lower limit defined in the CIM file or with the minimum value in the historical data. If at least one limit is violated, the situation is considered unacceptable. TSO_Frequency compares the frequencies of the 400kV buses with their barycentre. If at least 10 buses exceed the limit defined, the situation is considered unacceptable. TSO_Synchroloss compares the rotoric angles of the generators with their barycentre. If the sum of the generators for which the rotoric angles deviate more than 360 degrees exceed 100 MW, the situation is considered unacceptable. TSO_generator_voltage_automaton considers a situation is unacceptable if the voltage automaton created in Eurostag disconnects a generator. The voltage automaton disconnects a generator if the voltage at the connection point is under the lower threshold or above the upper threshold for a defined duration. Unlike the TSO_synchroloss index, no minimal power amount is defined. TSO_generator_speed_automaton considers a situation is unacceptable if the speed automaton created in Eurostag disconnects a generator. The speed automaton disconnects a generator if its speed is under the lower iTesla WP7: Validation Handbook V14 86/ 98 threshold or above the upper threshold for a defined duration. Unlike the TSO_synchroloss index, no minimal power amount is defined. To tune the KTH indexes, use wp43adapter.properties file. 7.11. Specific user guide for the 7-bus network in the offline platform: The 7-bus network was implemented on the same server than the French network. They co-exist on the platform for validation purposes only. Some choices in the architecture might seem inconsistent but were made for efficiency reasons. For example: there is no direct link between the file tree for the 7-bus and the DB structure. The file tree for the 7-bus was made in order to differentiate elements of the variants (contingencies, CIM base case etc.). In some cases, the DB are common to the 2 networks (Historical DB, Dynamic DB) in other cases (Contingencies DB, CIM repository DB) they are different either because they have to be changed by the validator or because the DB structure doesn’t allow it. The file tree with the variants, the specific command options, the useful configuration files and DB to be accessed and changed are specific to it and will be described below. 7.11.1. IDs The buses are not simply named after their ID number. They have complex IDs which have to be taken into account for tests: Figure 7 - 4: 7-bus IDs In the representation above, the first ID associated with every bus corresponds to the bus ID itself. The “load” or “gen” IDs correspond to the load or the generator IDs connected to the buses. 7.11.2. File tree The folder “7buses_test” gathers all the specific files needed for the tests on the 7-bus. The file tree is represented below. The sub files and sub folders are only represented once for “overload” folder but are the same for every variant. 536 2 FTILL511 Load: FTILLC51 FS.BIS11 Load: FS.BIC11 Phase shift = 0 14 7 FSSV.O11 Gen : FSSV.T11 FVALDI11 Gen : FVALDT11 FP.AND11 Load: FP.ANC12 FTDPRA11 Load: FTDPRC11 FVERGE11 Gen : FVERGT11 iTesla WP7: Validation Handbook V14 87/ 98 Figure 7 - 5: 7-bus file tree 7.11.3. Choice of the variant Read paragraph 3.7 to make sure the configuration allows you to work on the 7-bus network. To choose the variant, type command: (1) [itesla@ns6375578 ~]$ cd ~/itesla/etc (Go to the correct directory) (2) [itesla@ns6375578 etc]$ vi itesla.conf (Edit the configuration file. The bold part of the output below is to be changed with the name of the variant to study) itesla_cache_dir=/home/itesla/7buses_test/undervoltage/cache itesla_config_dir=/home/itesla/7buses_test/undervoltage itesla_config_name=config … (3) [itesla@ns6375578 ~]$ offline-service.sh restart (If anything was changed in the configuration, restart the service) 7.11.4. Specific databases to be changed 7.11.4.1. Change the CIM basecase in the CIM DB On the 7-bus network, the CIM database consists of one basecase CIM file in the folder associated with the variant. In the file tree example, the CIM database is the 7buses_overload.zip file. For validation purpose, the original CIM file in the folder can be replaced by a new one provided that all the CIM files have the same name than the original zip file. iTesla WP7: Validation Handbook V14 88/ 98 For example, if you want to replace the zip file 7buses_overload.zip, make sure that you create 3 files called 7buses_overload_EQ, 7buses_overload_SV and 7buses_overload_TP and compress them together in a zip file called 7buses_overload.zip. 7.11.4.1. Change the contingency list in the contingencies DB The contingencies DB is in the “contingencies.csv” file in the file tree example. To change or display the contingency list associated with the overload index, use for example: [itesla@ns6375578 overload]$ vi contingencies.csv The pattern of this database for N facilities: Name_of_contingency;N;Name_of_faulty_facility_1;…;Name_of_faulty_facility_N Define more parameters for a contingency: In some cases (loss of synchronism for example), it can be useful to define some of the contingencies precisely and differently from the default values. The patterns of the faults can be specified in the file: ~/.itesla/simulationDetailedParameters.xml. In the example below, a fault on “Tavel-Tamareau 400kV” with a duration of 0.151 is defined at 1% of the line from the substation “Tamareau 400kV”. <?xml version="1.0" encoding="UTF-8"?> <simulationDetailedParameters> <contingency id="N-1_Tavel-Tama"> <branch id="TAMARL71TAVEL_ACLS" shortCircuitDuration="0.151" shortCircuitDistance="1" shortCircuitSide="TAMARP7_S_VL7"/> </contingency> </simulationDetailedParameters> 7.11.4.2. Access the .xml files in the validation DB The validation DB is in the “validation” folder in the file tree example. The .xml files associated with the workflow “workflow-0” are in the folder “validation/offline/workflow-0”. All the .xml files are zipped. 7.11.4.3. Access the simulation DB The simulation DB is in the folder “offlinedb” which is in the folder associated with the chosen variant. It is not represented in the file tree because the validator doesn’t have to access it directly. 7.11.4.4. Access the .json files in the security rules DB iTesla WP7: Validation Handbook V14 95/ 98 • Possible values: -1 or any positive integer • Can be used in all queries. • Limits the number of lines in the results.  country • Possible values: FR or … • Can be used in all queries. Can be omitted. • Limits the location of the network properties processed (exported or used in a calculation)  equip • Possible values: gen or loads or stations or 2wt or 3wt or lines or dangling or … • Can be used in all queries. • Limits the variables used to specified equipments: generators (gen), loads (loads), substations (stations), transformers with 2 or 3 windings (2wt and 3wt), lines (lines), cut lines at borders of the network (dangling).  filters • Possible values: column_name:[min,max] • Can be used in all queries. column_name doesn’t have to be present in the attribute cols. Can be used several times in the same query to filter several columns but different filters can’t be separated only with a comma like other values. • Restricts network states on which the count has to be done with an interval of values for a particular variable. The variable column_name has to be between min and max for the network state to be used. min or max can be a decimal number (0.01) or Infinity or -Infinity  headers • Possible values: true or false • Can be used in all queries. Can be omitted. • If set to true, inserts the name of all exported columns and adds columns “datetime”, “horizon” and “forecastTime” to the results  horizon • Possible values: SN or DACF or D2CF or FO • Can be used in all queries. For a comparison query, the forecasted horizon is defined. • Restricts the network state used to a specified horizon of forecast. SN stands for SnapShot (realized state), DACF for Day Ahead Congestion Forecast and D2CF for 2 Days Ahead Congestion Forecast.  time • Format: [YYYY-MM-DDThh:mmzzzzz,YYYY-MM-DDThh:mmzzzzz] • Example : [2012-12-31T23:00Z,2013-03-30T22:59Z] • Can be used in all queries. • Restricts the network states used to a time interval defined by two dates in an ISO 8601 12 compatible format. For a forecasted network state, the horizon date is considered. 12 See http://en.wikipedia.org/wiki/ISO_8601 for more details iTesla WP7: Validation Handbook V14 96/ 98 7.13.5. Examples Queries Details https://ns311581.ovh.net/histodb/rest/itesladb/france /2013full/itesla/ data.csv? headers=true &equip=gen &attr=P,V &country=FR &count=-1 &colRange=* &time=[2012-12-31T23:00Z,2013-03-30T22:59Z] &horizon=SN Retrieves raw data, active power and voltage of all French generators for states in the time interval [23h UTC 12/31/2012 – 22h59 UTC 03/30/2013] Only snapshots are considered. https://ns311581.ovh.net/histodb/rest/itesladb/france /2013full/itesla/ stats.zip? headers=true &equip=stations &attr=V &country=FR &count=-1 &colRange=* &time=[2012-12-31T23:00Z,2013-03-30T22:59Z] &horizon=SN &async=true Retrieves statistics (mean and percentiles) of voltage in French substations in the time interval [23h UTC 12/31/2012 – 22h59 UTC 03/30/2013] Only snapshots are considered. The calculation is done in asynchronous mode. https://ns311581.ovh.net/histodb/rest/itesladb/france /2013full/itesla/ data/count.csv? headers=true &cols=AMARG_TG3_WGU_SM_P &filters=AMARG_TG3_WGU_SM_P:[0.01,Infinity] &count=-1 &time=[2012-12-31T23:00Z,2013-03-31T22:59Z] &horizon=SN Counts in how many network states the generator AMARG_TG3_WGU_SM has an active power in the interval [0.01, infinity), in the time interval [23h UTC 12/31/2012 – 22h59 UTC 03/30/2013]. Only snapshots are considered. https://ns311581.ovh.net/histodb/rest/itesladb/france /2013full/itesla/data/topos.csv Retrieves all historical substations topologies iTesla WP7: Validation Handbook V14 97/ 98 Queries Details https://ns311581.ovh.net/histodb/rest/itesladb/france /2013full/itesla/ data/forecastsDiff.csv? headers=true &equip=loads &attr=P &country=FR &count=-1 &colRange=* &time=[2012-12-31T23:00Z,2013-03-31T22:59Z] &horizon=DACF Realizes the difference of all active power French loads between snapshots and DACF network states in the time interval [23h UTC 12/31/2012 – 22h59 UTC 03/30/2013]. END