Hi. The transformer calculation is finished and I want to discuss what the flow of the function should be like (inputs and outputs, etc.) and how the function is constructed.
Firstly, I should elaborate what the method does. It calculates the values for the taps and the phases of transformers according to the desired values for their regulation (taps control nodal voltage of some desired node, while phaseshifters control line power through their line). The transformers are connected at the first node of the line in the data. Calculations are carried out externally to the load flow calculation; the method looks at the results, calculates the first order sensitivity and minimizes the missmatch by Newton search. Unless I have made some mistakes the routine should work with correct first order sensitivities even when a tap changer and phase shifter are being calculated in the same branch. So, I have made it so that the case must be defined (e.g. case118) and the desired regulated tap and phase changers are then calculated(the ones that are not specifically marked as "to be calculated" will remain fixed). I was thinking to have the input in the form of (casedata_name_of_file , tap_changer_data, phase_shifter_data). Where the phase_shifter_data has the form [branches_of_transformers , controlled_nodes , desired_voltages] and the phase_shifter_data has the form [branches_of_phaseshifters , desired_power flows]. The output I think may be only the struct results, since the taps and phases are readily accessible in results.branch. The routine uses several additional functions, some of them are probably already present in the MatPower as it is (e.g. I calculated my own Ybus and my own Jacobian for power-missmatch-LoadFlow). I wonder if it I should adapt to work with provided MatPower capabilities or can I keep it the way it is. I also read the dev guide https://github.com/MATPOWER/matpower/blob/master/docs/MATPOWER-dev-guide.md and it recommends to work with idx_branch and idx_bus etc. I wonder if all the functions must follow that form? Also, should the inputs and outputs be in some other form? Regards, Gorazd ________________________________ Od: bounce-121560494-78535...@list.cornell.edu [bounce-121560494-78535...@list.cornell.edu] v imenu Ray Zimmerman [r...@cornell.edu] Poslano: 25. maj 2017 22:08 Za: MATPOWER Developer List Zadeva: Re: Calculation of Taps and Phases of Transformers Hi Gorzad, Sorry for my slow response, swamped with other things, as usual … and thanks for your offer to contribute your work. The best way to contribute this is to follow the instructions<https://github.com/MATPOWER/matpower/blob/master/CONTRIBUTING.md#submitting-additions-or-modifications-to-the-code> from the MATPOWER Contributors Guide<https://github.com/MATPOWER/matpower/blob/master/CONTRIBUTING.md> on GitHub. This gives us a simple way for us to review your code, suggest or offer changes to it, and finally merge it into MATPOWER when it is ready. Please let me know if you need any help with getting things set up to make your pull request. By the way, for those of you considering having your contributions included in MATPOWER, it is always a good idea to discuss the idea here on the MATPOWER-DEV-L list early on in the process so that it can benefit from early feedback. It’s not problem if you don’t, it just has the potential of saving some effort on your part in the long run. Thanks again, Ray On May 22, 2017, at 3:22 AM, Bone, Gorazd <gorazd.b...@fe.uni-lj.si<mailto:gorazd.b...@fe.uni-lj.si>> wrote: Hi all, We're finishing up a routine that can calculate the Taps and Phases of Transformers in an OPF - like manner and would like to inquire what are the policies regarding contributions to MatPower. regards, Gorazd