Giter VIP home page Giter VIP logo

pypower-dynamics's People

Contributors

jurasofish avatar susantoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pypower-dynamics's Issues

Adopt a more flexible case structure

In this branch I have been experimenting with a more flexible structure for case data:

https://github.com/rwl/PYPOWER-Dynamics/tree/pypf

I didn't want to have to update all of the OPF functions in PYPOWER so I moved the necessary PF functions into a new pypf package. There is still a dependency on PYPOWER for the remaining functions.

The new case data classes should make it straightforward to add columns for new attributes. By way of demonstration, I committed the 3 phase fault analysis function by @susantoj and added faultMVA, Rgen and Xdpp attributes.

I took the liberty of doing away with the BUS_I column. The former GEN_BUS, F_BUS and T_BUS columns are now assumed to be the zero-based bus index. This removes the need for ext2int and int2ext conversions, but may have some as yet unforeseen downsides. A convert_ppc function allows PYPOWER case data dicts to be reused and performs the necessary conversions.

Integer indices

Hi I have been trying to use pypower dynamics in python3.

So far I have found the following error:
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

This happens becase the indices are floats instead of integers. The affected function (there might be more) is

def mod_Ybus(Ybus, elements, bus, gen, baseMVA):
    # Add equivalent generator and grid admittances to Ybus matrix
    for element in elements.values():
        Ye = 0
        
        # 4th/6th order machines and converters
        if element.__module__ in ['pydyn.sym_order4', 'pydyn.sym_order6a', 'pydyn.sym_order6b', 'pydyn.vsc_average']:
            i = gen[element.gen_no,0]
            Ye = element.Yg
        
        # External grid
        if element.__module__ == 'pydyn.ext_grid':
            i = gen[element.gen_no,0]
            Ye = 1 / (1j * element.params['Xdp'])
        
        if Ye != 0:
            Ybus[i,i] = Ybus[i,i] + Ye

    # Add equivalent load admittance to Ybus matrix    
    Pl, Ql = bus[:, PD], bus[:, QD]
    for i in range(len(Pl)):
        S_load = (Pl[i] - 1j * Ql[i]) / baseMVA
        y_load = S_load / (bus[i, VM] ** 2)
        Ybus[i,i] = Ybus[i,i] + y_load
    
    return Ybus

Handling of saliency

Generator current injections do not appear to be correct when generator parameters exhibit saliency.

Add error handling

Currently when the program fails, it just crashes and doesn't give any meaningful guidance on what was done incorrectly.

Allow interfacing with network variables

Currently, interfacing of controllers only works for signals in machine models or other controllers. Augment to allow interfacing with network variables (e.g. voltages, currents, etc)

Faults and fault clearing events incorrectly modify shunts

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.

Consider switch to BSD license

As of version 5.1, MATPOWER is available under the terms of a 3-clause BSD license and no longer uses the GPLv3. PYPOWER has been updated and released under the same BSD license.

rwl/PYPOWER@d176356

PYPOWER-Dynamics might also be updated to use the BSD license. This would bring it in line with the latest MATPOWER version and with its derived projects.

The switch would allow those unable to work with the GPL license to use PYPOWER-Dynamics and not turn to the older and less capable PyDyn project:

https://github.com/rwl/pydyn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.