susantoj/PYPOWER-Dynamics

Faults and fault clearing events incorrectly modify shunts

Opened this issue · 3 comments

Faults are modelled as high shunt admittances / conductances and use the shunt columns (Gs, Bs) in the PYPOWER case file. This is okay if there are no actual shunts on the bus, but where a shunt exists, then the fault and fault clearing events overwrite the existing shunt values.

Need to fix this.

rwl commented

One solution to this might be to add separate Load and Shunt classes to the case structure proposed in #9.

As with the Generator class this would allow more than one device at the same bus. They would also have a status attribute to allow temporary omission from calculations. In the future the Load class could be extended with attributes to support voltage dependency.

Implementing this would require a reasonable amount of effort as Pd, Qd, Gs, and Bs are used in quite a few different places.

Having separate Load and Shunt classes would be the ideal structure for the case file to give it more flexibility (e.g. the Load class can also have flags for motor / non-motor loads).

But like you say, there will be some work required to make sure the new classes can be integrated into the existing code, particularly for Ybus matrix construction. I think we need to settle on a new, more comprehensive case definition before starting work on this.

rwl commented

Integrating the changes with the existing code should be made much simpler with these (as yet untested) functions:

rwl@51c48a8

They return complex vectors of length bus.n and should account for there potentially being more than one device per bus. The commit includes the necessary changes to makeYbus and they are quite minimal.