Voltage monitoring
Contents
- Introduction
- The Java API
- The voltage monitoring result
- The voltage monitoring algorithm
- The output logs
Introduction #
In the FARAO CRAC, the user can define voltage constraints on network elements.
These are constraints that monitor that the voltage values on given network elements do not exceed a given
threshold.
FARAO allows modelling these constraints in VoltageCnec objects.
However, modelling the impact of remedial actions on voltage values is highly complex and non-linear. This is why CASTOR
does not inherently support voltage constraints.
The VoltageMonitoring
package allows monitoring voltage values after a RAO has been run.
The Java API #
You can easily call the voltage monitoring module using the JAVA API:
- Build a VoltageMonitoring object using:
public VoltageMonitoring(Crac crac, Network network, RaoResult raoResult)
With:
- crac: the CRAC object used for the RAO, and containing VoltageCnecs to be monitored.
- network: the network to be monitored.
- raoResult: the RaoResult object containing selected remedial actions (that shall be applied on the network before monitoring voltage values)
- Run the monitoring algorithm using the constructed object’s following method:
public VoltageMonitoringResult run(String loadFlowProvider, LoadFlowParameters loadFlowParameters, int numberOfLoadFlowsInParallel)
With:
- loadFlowProvider: the name of the load-flow computer to use. This should refer to a PowSyBl load flow provider implementation
- loadFlowParameters: the PowSyBl LoadFlowParameters object to configure load-flow computation.
- numberOfLoadFlowsInParallel: the number of contingencies to monitor in parallel, allowing a maximum utilization of your computing resources (set it to your number of available CPUs).
Here is a complete example:
Crac crac = ...
Network network = ...
RaoResult raoResult = Rao.find(...).run(...)
LoadFlowParameters loadFlowParameters = ...
VoltageMonitoringResult voltageMonitoringResult = new VoltageMonitoring(crac, network, raoResult).run("OpenLoadFlow", loadFlowParameters, 2);
The voltage monitoring result #
The VoltageMonitoringResult object contains all the relevant results of the voltage monitoring algorithm.
JSON import & export #
The VoltageMonitoringResult
can be written to and read from a JSON file.
Example:
// Export
VoltageMonitoringResult voltageMonitoringResult = ...
OutputStream os = ...
new VoltageMonitoringResultExporter().export(voltageMonitoringResult, os);
// Import
InputStream is = ...
Crac crac = ...
VoltageMonitoringResult voltageMonitoringResult2 = new VoltageMonitoringResultImporter().importVoltageMonitoringResult(is, crac);
Contents #
The VoltageMonitoringResult object contains the results of the voltage monitoring algorithm.
Status #
The VoltageMonitoringResult has methods describing the security status of the network in regard to the voltage constraints defined in the CRAC:
- SECURE: the network is secure; no voltage thresholds are violated
- HIGH_VOLTAGE_CONSTRAINT: the network is not secure; at least one voltage CNEC has a voltage value higher than its threshold
- LOW_VOLTAGE_CONSTRAINT: the network is not secure; at least one voltage CNEC has a voltage value lower than its threshold
- HIGH_AND_LOW_VOLTAGE_CONSTRAINTS: the network is not secure; at least one voltage CNEC has a voltage value higher than its threshold, and at least one voltage CNEC has a voltage value lower than its threshold
- UNKNOWN: the network status is unknown; no load flow could converge on the network
// get the overall status (one of 5 values above)
public Status getStatus()
This information is not directly accessible in the JSON file.
Applied remedial actions #
The following methods return information about the applied remedial actions for voltage CNECs.
(see states, network actions, re-dispatch network actions)
// get activated network actions for each state
public Map<State, Set<NetworkAction>> getAppliedRas()
// get activated network actions for a given state
public Set<NetworkAction> getAppliedRas(State state)
// get activated network action IDs for a given state ID
public Set<String> getAppliedRas(String stateId)
Example:
"applied-ras": [
{
"instant": "curative",
"contingency": "co1",
"remedial-actions": [
"na2"
]
},
{
"instant": "preventive",
"remedial-actions": [
"na1"
]
}
]
Voltage values #
The following methods return information about the voltage values for voltage CNECs.
// get VoltageCnecs that have a voltage overshoot
public Set<VoltageCnec> getConstrainedElements()
// get the minimum voltage value among all elements of a voltage CNEC, using the VoltageCnec object or its ID in the CRAC, in KILOVOLTS
public Double getMinVoltage(VoltageCnec voltageCnec)
public Double getMinVoltage(String voltageCnecId)
// get the maximum voltage value among all elements of a voltage CNEC, using the VoltageCnec object or its ID in the CRAC, in KILOVOLTS
public Double getMaxVoltage(VoltageCnec voltageCnec)
public Double getMaxVoltage(String voltageCnecId)
// get min/max voltage values for all voltage CNECs (ExtremeVoltageValues contain one min and one max value in KILOVOLTS)
public Map<VoltageCnec, ExtremeVoltageValues> getExtremeVoltageValues()
Example:
"extreme-voltage-values-in-kilovolts" : [ {
"cnec-id" : "VL45",
"min" : 144.383355903481,
"max" : 148.4102909359121
}, {
"cnec-id" : "VL46",
"min" : 143.0995761393377,
"max" : 147.66000723838806
} ]
Printing the result #
You can get a human-readable report of the voltage monitoring algorithm, using the following method of the VoltageMonitoringResult object:
public List<String> printConstraints()
Complete JSON example #
{
"type" : "VOLTAGE_MONITORING_RESULT",
"extreme-voltage-values-in-kilovolts" : [ {
"cnec-id" : "VL45",
"min" : 144.383355903481,
"max" : 148.4102909359121
}, {
"cnec-id" : "VL46",
"min" : 143.0995761393377,
"max" : 147.66000723838806
} ]
}
The voltage monitoring algorithm #
Here is a detailed description of how the voltage monitoring algorithm operates:
- Apply optimal preventive remedial actions from RaoResult on the network
- For each of these states, monitor voltages:
- From the CRAC, get the set of states on which VoltageCnecs exist
- (A) For each of these states, generate a state-specific VoltageMonitoringResult:
- If one of these states is the preventive state, deal with it before handling any of the contingency states. Directly work on the input network. That way, applied voltage preventive remedial actions will be taken into account in the contingency states. Go to (B)
- Else, for all contingency states :
- Use a new variant of the network
- apply the contingency on the network
- From the RaoResult, apply on the network the optimal remedial actions decided by the RAO (ARA+CRA, given PRAs have already been applied). Go to (B).
- (B) Compute the LoadFlow
- If it diverges, return a VoltageMonitoringResult with the following content for this state, then move on to the next state:
- the voltages of the VoltageCnecs equal to NaN
- no applied remedial actions
- security status UNKNOWN
- If it diverges, return a VoltageMonitoringResult with the following content for this state, then move on to the next state:
- Compute the voltages for all VoltageCnecs (computeVoltages method)
- Compare the voltages to their thresholds. For the VoltageCnecs that have a voltage overshoot, get the associated remedial actions (with
an OnVoltageConstraint usage rule containing the VoltageCnec and the state’s instant)
- If the VoltageCnec has no associated RA, log a warning that the voltage constraint cannot be remedied, and move on to the next VoltageCnec.
- For every RA:
- If the remedial action is not a network action, do not apply it and log a warning. Then move on to the next RA.
- If the RA is a network action, apply it on the network
- If you applied any RA, recompute the LoadFlow
- If it diverges, return a VoltageMonitoringResult with the following content for this state, then move on to the next state:
- the voltages of the VoltageCnecs equal to what was computed before RA application
- no applied remedial actions
- security UNSECURE (variant of HIGH/LOW_VOLTAGE_CONSTRAINT)
- If it diverges, return a VoltageMonitoringResult with the following content for this state, then move on to the next state:
- Re-compute all voltage values
- Create a state-specific VoltageMonitoringResult with voltages, list of applied remedial actions , and secure flag set to SECURE if there is no more overshoot (after re-verifying thresholds)
- Move on to next state (Go to (A)).
- Assemble all the state-specific VoltageMonitoringResult in one overall VoltageMonitoringResult
The output logs #
In the logs, the start and end of different steps are logged:
- Start and end of the voltage monitoring algorithm
- Start and end of the monitoring of each state (preventive or post-contingency)
- Start and end of each load-flow computation
Also, the following information is logged:
- Applied remedial actions to relieve voltage constraints
- At the end of each state monitoring, the list of remaining voltage constraints
- At the end of the monitoring algorithm, the list of remaining voltage constraints
Example 1:
In this example, a constraint exists in preventive (it cannot be solved because FARAO cannot implement PRAs to solve
voltage constraints), and another one in curative (but implementing the CRA does not solve it).
INFO c.f.f.commons.logs.RaoBusinessLogs - ----- Voltage monitoring [start]
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "preventive" [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [end]
WARN c.f.f.commons.logs.RaoBusinessWarns - VoltageCnec vcPrev is constrained in preventive state, it cannot be secured.
INFO c.f.f.commons.logs.RaoBusinessLogs - Some voltage CNECs are not secure:
INFO c.f.f.commons.logs.RaoBusinessLogs - Network element VL1 at state preventive has a voltage of 400 - 400 kV.
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "preventive" [end]
INFO c.f.farao.commons.logs.TechnicalLogs - Using base network 'phaseShifter' on variant 'InitialState'
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "co - curative" [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - Applying the following remedial action(s) in order to reduce constraints on CNEC "vc": Open L1 - 2
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - Some voltage CNECs are not secure:
INFO c.f.f.commons.logs.RaoBusinessLogs - Network element VL1 at state co - curative has a voltage of 400 - 400 kV.
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "co - curative" [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - Some voltage CNECs are not secure:
INFO c.f.f.commons.logs.RaoBusinessLogs - Network element VL1 at state co - curative has a voltage of 400 - 400 kV.
INFO c.f.f.commons.logs.RaoBusinessLogs - Network element VL1 at state preventive has a voltage of 400 - 400 kV.
INFO c.f.f.commons.logs.RaoBusinessLogs - ----- Voltage monitoring [end]
Example 2:
In this example, a curative constraint (after contingency “co”) is solved by a CRA.
INFO c.f.f.commons.logs.RaoBusinessLogs - ----- Voltage monitoring [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Using base network 'phaseShifter' on variant 'InitialState'
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "co - curative" [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - Applying the following remedial action(s) in order to reduce constraints on CNEC "vc": Close L1 - 1
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [start]
INFO c.f.farao.commons.logs.TechnicalLogs - Load-flow computation [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - All voltage CNECs are secure.
INFO c.f.f.commons.logs.RaoBusinessLogs - -- Monitoring voltages at state "co - curative" [end]
INFO c.f.f.commons.logs.RaoBusinessLogs - All voltage CNECs are secure.
INFO c.f.f.commons.logs.RaoBusinessLogs - ----- Voltage monitoring [end]
See also