powsybl / powsybl-open-loadflow

An open source loadflow based on PowSyBl
Mozilla Public License 2.0
45 stars 7 forks source link

Contingency propagation in sensitivity analysis #289

Open sylvlecl opened 3 years ago

sylvlecl commented 3 years ago

Bug.

Sensitivity analysis is performed without keeping switches which are necessary for proper propagation of some contingencies.

TODO

Contingencies should correctly propagate in AC sensitivity analysis, opening all relevant switches, like in AC security analysis.

An issue seems to be that fast DC sensitivity analysis cannot handle, for now, that kind of contingencies. Therefore, for DC analysis, we could either:

In version 0.7.0, propagated contingencies ended with an exception:

The contingency on the branch <SWITCH ID> not found in the network

Since commit https://github.com/powsybl/powsybl-open-loadflow/commit/32b3b5fc15589af485d9b970e95dda5b1d2b8a82, there is no more exception, but the behaviour is not right: switches are just skipped, they stay closed whereas they should open.

It would make sense, at least for AC sensitivity analysis, to keep breakers in order to be able to properly propagate contingencies, like in AC security analysis.

annetill commented 3 years ago

Thanks a lot @sylvlecl for this well described issue. The code to solve this issue could be quite consequent as all the sensitivity analysis are performed on the bus view. We made this choice for performance issue as a first approach. But, you are right this kind of propagation is not well handled. I propose to solve this issue in two steps:

Hadrien-Godard commented 3 years ago

I agree with @annetill on how to handle this issue. This seems to me to be the right approach.

annetill commented 3 years ago

@sylvlecl helps us with a test case: https://github.com/powsybl/powsybl-open-loadflow/commit/cf20b9d5a1b6a6a7d82db697a343c8a5e2880d9d