Please take a look at the function makeYbus().
> On Aug 26, 2016, at 10:05 AM, davor sutic <davor.su...@gmail.com> wrote:
>
> I'm trying to understand the effects of having a transformer connected to a
> branch on the implicated admittance matrix. In the MatPower manual, section
> 3.2, equation 3.2 describes such a relation for a 2x2 branch admittance
> matrix.
>
> I'm interested in the general form of the (diagonal and off-diagonal)
> elements of an admittance matrix, when multiple branches have transformers
> attached. Particularly the diagonal elements are confusing, how are the
> elements summed up, if multiple have transformers?
>
> Further, in the test case files, the absence of a transformer is indicated
> with its ratio and angle set to 0. In the mentioned equation (3.2) that would
> cause problems when dividing with 0. So another question is how are those
> elements treated in the light of formula 3.2?
>
> Thanks a lot.