Hi Tobias,

For your first question, please see the relevant derivation in Section 3.7 of 
the User’s Manual<https://matpower.org/docs/MATPOWER-manual-7.1.pdf>. This 
describes the formulation used by MATPOWER. I suppose it is possible that some 
DC power flow implementations also include the approximation that the tap ratio 
is 1. Off the top of my head, I’m can’t really comment on the impact of 
including (or not) that approximation.

Regarding the second question, getting an exact match between MATPOWER and the 
commercial software would require both correct parameters for MATPOWER and an 
identical model. It seems likely that the commercial software could be using a 
more sophisticated model that does include the iron loss current and 
magnetizing current, as mentioned by Carlos in the message you referenced. If 
that is the case, I suppose his suggestions could possibly be used to adjust 
some parameters (e.g. add shunts) to more closely approximate the commercial 
software solution.

On the other hand, given the state of the work on a new network and modeling 
layer for MATPOWER, called MP-Element<https://github.com/MATPOWER/mp-element/> 
(made public only days ago), now is probably a good time to call for help to 
work on improved transformer model implementations for MATPOWER.

    Ray




On Oct 30, 2020, at 6:02 AM, Hoffmann, Tobias 
<tobias4.hoffm...@tu-dortmund.de<mailto:tobias4.hoffm...@tu-dortmund.de>> wrote:

Dear all,

in my work I’m trying to validate a module that creates a mpc with required 
grid information (buses, topology information, loads, …). Therefore I have two 
questions related to the correct modelling of the MATPOWER case file.


1)      After some adjustments of the model, I receive very accurate results 
for the DC power flow in matpower compared with a commercial powerflow tool. 
The decisive setting was the neglection of the parameters in the TAP column for 
the transformers. The only place where the TAP column is considered for the DC 
power flow is inside the function makeBdc below (line 64/65).
____________________________________________________________________________________
[Bbus, Bf, Pbusinj, Pfinj] = makeBdc(baseMVA, bus, branch
…
stat = branch(:, BR_STATUS);                    "
OutmailID: 125086863, List: 'matpower-l', MemberID: 82861091
SCRIPT: "ones at in-service branches
 b = stat ./ branch(:, BR_X);"
TCL MERGE ERROR ( 10/30/2020 10:39:49 ): "invalid command name "ones" series 
susceptance
tap = ones(nl, 1);                              "
OutmailID: 125086863, List: 'matpower-l', MemberID: 82861091
SCRIPT: "default tap ratio = 1
 i = find(branch(:, TAP));"
TCL MERGE ERROR ( 10/30/2020 10:39:49 ): "invalid command name "default" 
indices of non-zero tap ratios
tap(i) = branch(i, TAP);                        "
OutmailID: 125086863, List: 'matpower-l', MemberID: 82861091
SCRIPT: "assign non-zero tap ratios
 b = b ./ tap;
 
_____________________________________________________________________________________
 
 After I received the results, I’m still trying to understand the influence of 
the column TAP (the transformer off nominal turns ratio). According to my 
actual understanding of the DC power flow only the reactance has an influence 
on the resulting flows.
 
 May someone be so kind to explain me the consideration of the TAP column in 
the makeBdc-function. I already found the old post here but would like to 
understand it even better 
(https://www.mail-archive.com/matpower-l@cornell.edu/msg00320.html).
 
 
 2)      My second question is related to a proper validation of the AC-power 
flow. Here I have an issue with the modelling of transformers as I get 
different results between MATPOWER compared to a commercial powerflow tool. As 
I describe above the result for the DC-power flow are already quite accurate. 
Below I show the same input data for the transformer. It is a 2-winding 
transformer connecting two different voltage levels without any shifting. I’m 
trying to validate the AC-power flow in a small test grid with five nodes and 
the slack at “NODE2_21”.
 
 
 ----- 2 WINDING TRANSFORMER BLOCK -----
 
_________1_________2_________3_________4_________5_________6_________7_________8_________9
 Node 1  |Node 2  |O|S|U1   |U2   |Sn   |R(Ohm)|X(Ohm)|B(uS)   |G(uS) |I(A)  
|Element Name|
 
 ##T
 NODE5_81 NODE2_21 1 0 347.0 242.0 240.0 1.1200 44.100 -28.0000 1.0000    400 
TR-1
 
 To calculate the right values for the branch matrix I use the following values 
from the depending transformer:
 
 -         baseKV_from = 347 kV
 
 -         baseMVA = 100 MVA
 
 -         zbase_from = basekV_from^2 / baseMVA
 
 -         BR_R = 1.12 (Ohm) / zbase_from
 
 -         BR_X = 44.1 (Ohm) / zbase_from
 
 -         BR_B = -28 (uS) * 10^-6 * zbase_from
 My results for the branch matrix are
 
 -         BR_R = 0,00093
 
 -         BR_X = 0,03662
 
 -         BR_B = -0,03371
 Without modelling a load/generation at node “NODE5_81” I receive quite 
different results in voltage magnitude/angle.
 
 -         MAPTOWER
 
 o   VM = 1,04480948; VA= 0,000897843
 
 -         Commercial powerflow tool
 
 o   VM = 0,998756671; VA = -0,000364748875
 
 I suppose that it has do something with the modelling of the transformer 
losses in matpower. But I don’t have a clue how to get more accurate results. I 
also tried the approach to model the losses as suggested here 
(https://www.mail-archive.com/matpower-l@cornell.edu/msg02291.html). If someone 
can give me a hint where to look at, I would be very thankful!
 
 Thank you very much. With kind regards,
 Tobias Hoffmann
 
 
 
 Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
 Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.
 
 Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.
 
  --_000_25F97A78071F4F29B13D3C5066D16FF4cornelledu_ Content-Type: text/html; 
charset="utf-8" Content-ID: 
<5a9bcccdd0d0a84ea5ea52918c945...@namprd04.prod.outlook.com> 
Content-Transfer-Encoding: base64  <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 </head>
 <body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: 
after-white-space;" class="">
 Hi Tobias,
 <div class=""><br class="">
 </div>
 <div class="">For your first question, please see the relevant derivation in 
Section 3.7 of the&nbsp;<a 
href="https://matpower.org/docs/MATPOWER-manual-7.1.pdf"; class="">User’s 
Manual</a>. This describes the formulation used by MATPOWER. I suppose it is 
possible
  that some DC power flow implementations also include the approximation that 
the tap ratio is 1. Off the top of my head, I’m can’t really comment on the 
impact of including (or not) that approximation.</div>
 <div class=""><br class="">
 </div>
 <div class="">Regarding the second question, getting an exact match between 
MATPOWER and the commercial software would require both correct parameters for 
MATPOWER and an identical model. It seems likely that the commercial software 
could be using a more sophisticated
  model that does include the iron loss current and magnetizing current, as 
mentioned by Carlos in the message you referenced. If that is the case, I 
suppose his suggestions could possibly be used to adjust some parameters (e.g. 
add shunts) to more closely approximate
  the commercial software solution.&nbsp;</div>
 <div class=""><br class="">
 </div>
 <div class="">On the other hand, given the state of the work on a new network 
and modeling layer for MATPOWER, called&nbsp;<a 
href="https://github.com/MATPOWER/mp-element/"; 
class="">MP-Element</a>&nbsp;(made public only days ago), now is probably a 
good time to call
  for help to work on improved transformer model implementations for 
MATPOWER.</div>
 <div class=""><br class="">
 </div>
 <div class="">&nbsp; &nbsp; Ray</div>
 <div class=""><br class="">
 </div>
 <div class=""><br class="">
 </div>
 <div class=""><br class="">
 <div><br class="">
 <blockquote type="cite" class="">
 <div class="">On Oct 30, 2020, at 6:02 AM, Hoffmann, Tobias &lt;<a 
href="mailto:tobias4.hoffm...@tu-dortmund.de"; 
class="">tobias4.hoffm...@tu-dortmund.de</a>&gt; wrote:</div>
 <br class="Apple-interchange-newline">
 <div class="">
 <meta name="Generator" content="Microsoft Word 15 (filtered medium)" class="">
 <style class=""><!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 @font-face
        {font-family:Akkurat;
        panose-1:2 0 5 3 4 0 0 2 0 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
 p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, 
div.MsoListParagraphCxSpFirst
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, 
div.MsoListParagraphCxSpMiddle
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, 
div.MsoListParagraphCxSpLast
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Akkurat;
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
 .MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
 @page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
 div.WordSection1
        {page:WordSection1;}
 /* List Definitions */
 @list l0
        {mso-list-id:965622607;
        mso-list-type:hybrid;
        mso-list-template-ids:516055176 67567633 67567641 67567643 67567631 
67567641 67567643 67567631 67567641 67567643;}
 @list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
 @list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:54.0pt;
        text-indent:-18.0pt;}
 @list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:90.0pt;
        text-indent:-9.0pt;}
 @list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-18.0pt;}
 @list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:162.0pt;
        text-indent:-18.0pt;}
 @list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:198.0pt;
        text-indent:-9.0pt;}
 @list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:234.0pt;
        text-indent:-18.0pt;}
 @list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:270.0pt;
        text-indent:-18.0pt;}
 @list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:306.0pt;
        text-indent:-9.0pt;}
 @list l1
        {mso-list-id:1484850176;
        mso-list-type:hybrid;
        mso-list-template-ids:-903588592 500486262 67567619 67567621 67567617 
67567619 67567621 67567617 67567619 67567621;}
 @list l1:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Akkurat;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:Calibri;}
 @list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 @list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
 @list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 @list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
 @list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 @list l2
        {mso-list-id:1907034667;
        mso-list-type:hybrid;
        mso-list-template-ids:2098370220 1984057910 67567619 67567621 67567617 
67567619 67567621 67567617 67567619 67567621;}
 @list l2:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Akkurat;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:Calibri;}
 @list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 @list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
 @list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 @list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
 @list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
 @list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
 ol
        {margin-bottom:0cm;}
 ul
        {margin-bottom:0cm;}
 --></style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
 </xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
 <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
 <div lang="DE" link="#0563C1" vlink="#954F72" class="">
 <div class="WordSection1">
 <p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">Dear all,<o:p class=""></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">in my work I’m trying to validate a module that creates a mpc with 
required grid information (buses, topology information, loads, …). Therefore I 
have two questions related to the
  correct modelling of the MATPOWER case file.<o:p class=""></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
 <p class="MsoListParagraph" 
style="margin-left:18.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 
level1 lfo1">
 <!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">1)<span style="font:7.0pt 
&quot;Times New Roman&quot;" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">After some adjustments of the model, I 
receive very accurate results for the DC power flow in matpower compared with a 
commercial powerflow tool. The decisive setting
  was the neglection of the parameters in the TAP column for the transformers. 
The only place where the TAP column is considered for the DC power flow is 
inside the function makeBdc below (line 64/65).<o:p class=""></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">____________________________________________________________________________________<o:p
 class=""></o:p></span></p>
 <p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">[Bbus, 
Bf, Pbusinj, Pfinj] = makeBdc(baseMVA, bus, branch<o:p 
class=""></o:p></span></p>
 <p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">…<o:p 
class=""></o:p></span></p>
 <p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">stat = 
branch(:, 
BR_STATUS);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Courier 
New&quot;;color:forestgreen" class="">"
TCL MERGE ERROR ( 10/30/2020 10:39:49 ): "extra characters after close-quote 
ones at in-service branches</span><span lang="EN-GB" 
style="font-size:12.0pt;font-family:&quot;Courier New&quot;" class=""><o:p 
class=""></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">b = 
stat ./ branch(:, 
BR_X);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Courier 
New&quot;;color:forestgreen" class="">%% series susceptance</span><span 
lang="EN-GB" style="font-size:12.0pt;font-family:&quot;Courier New&quot;" 
class=""><o:p class=""></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">tap = 
ones(nl, 
1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Courier 
New&quot;;color:forestgreen" class="">%% default tap ratio = 1</span><span 
lang="EN-GB" style="font-size:12.0pt;font-family:&quot;Courier New&quot;" 
class=""><o:p class=""></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">i = 
find(branch(:, 
TAP));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Courier 
New&quot;;color:forestgreen" class="">%% indices of non-zero tap 
ratios</span><span lang="EN-GB" 
style="font-size:12.0pt;font-family:&quot;Courier New&quot;" class=""><o:p 
class=""></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">tap(i) 
= branch(i, TAP); 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
 lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Courier 
New&quot;;color:forestgreen" class="">%%
 assign non-zero tap ratios</span><span lang="EN-GB" 
style="font-size:12.0pt;font-family:&quot;Courier New&quot;" class=""><o:p 
class=""></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" 
style="font-size: 10pt; font-family: &quot;Courier New&quot;;" class="">b = b 
./ tap;</span><span lang="EN-GB" 
style="font-size:12.0pt;font-family:&quot;Courier New&quot;" class=""><o:p 
class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">_____________________________________________________________________________________<o:p
 class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">After I received the results, I’m still trying to understand the 
influence of the column TAP (the transformer off nominal turns ratio). 
According to my actual understanding of the
 DC power flow only the reactance has an influence on the resulting flows. <o:p 
class="">
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">May someone be so kind to explain me the consideration of the TAP 
column in the makeBdc-function. I already found the old post here but would 
like to understand it even better (<a 
href="https://www.mail-archive.com/matpower-l@cornell.edu/msg00320.html"; 
class="">https://www.mail-archive.com/matpower-l@cornell.edu/msg00320.html</a>).<o:p
 class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoListParagraphCxSpFirst" 
style="margin-left:18.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 
level1 lfo1">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">2)<span style="font:7.0pt 
&quot;Times New Roman&quot;" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">My second question is related to a proper 
validation of the AC-power flow. Here I have an issue with the modelling of 
transformers as I get different results between
 MATPOWER compared to a commercial powerflow tool. As I describe above the 
result for the DC-power flow are already quite accurate. Below I show the same 
input data for the transformer. It is a 2-winding transformer connecting two 
different voltage levels without
 any shifting. I’m trying to validate the AC-power flow in a small test grid 
with five nodes and the slack at “NODE2_21”.<o:p class=""></o:p></span></p>
<p class="MsoListParagraphCxSpLast" 
style="margin-left:18.0pt;mso-add-space:auto">
<span lang="EN-GB" style="font-family:Akkurat" class=""><o:p 
class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">----- 2 WINDING TRANSFORMER BLOCK -----<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">_________1_________2_________3_________4_________5_________6_________7_________8_________9<o:p
 class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">Node 1&nbsp; |Node 2&nbsp; |O|S|U1&nbsp;&nbsp; |U2&nbsp;&nbsp; 
|Sn&nbsp;&nbsp; |R(Ohm)|X(Ohm)|B(uS)&nbsp;&nbsp; |G(uS) |I(A)&nbsp; |Element 
Name|<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">##T<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">NODE5_81 NODE2_21 1 0 347.0 242.0 240.0 1.1200 44.100 -28.0000 
1.0000&nbsp;&nbsp;&nbsp; 400 TR-1<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" class="">To 
calculate the right values for the branch matrix I use the following values 
from the depending transformer:
<o:p class=""></o:p></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">baseKV_from = 347 kV<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">baseMVA = 100 MVA<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">zbase_from = basekV_from^2 / baseMVA<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_R = 1.12 (Ohm) / zbase_from<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_X = 44.1 (Ohm) / zbase_from<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l2 
level1 lfo2">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_B = -28 (uS) * 10^-6 * zbase_from<o:p 
class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" class="">My 
results for the branch matrix are
<o:p class=""></o:p></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l1 
level1 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_R = 0,00093<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l1 
level1 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_X = 0,03662<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l1 
level1 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">BR_B = -0,03371<o:p 
class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">Without modelling a load/generation at node “NODE5_81” I receive quite 
different results in voltage magnitude/angle.
<o:p class=""></o:p></span></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l1 
level1 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">MAPTOWER<o:p class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" 
style="margin-left:72.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l1 
level2 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:&quot;Courier 
New&quot;" class=""><span style="mso-list:Ignore" class="">o<span 
style="font:7.0pt &quot;Times New Roman&quot;" class="">&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">VM = 1,04480948; VA= 0,000897843<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l1 
level1 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:Akkurat" 
class=""><span style="mso-list:Ignore" class="">-<span style="font:7.0pt 
&quot;Times New Roman&quot;" 
class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">Commercial powerflow tool<o:p 
class=""></o:p></span></p>
<p class="MsoListParagraphCxSpLast" 
style="margin-left:72.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l1 
level2 lfo3">
<!--[if !supportLists]--><span lang="EN-GB" style="font-family:&quot;Courier 
New&quot;" class=""><span style="mso-list:Ignore" class="">o<span 
style="font:7.0pt &quot;Times New Roman&quot;" class="">&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-GB" 
style="font-family:Akkurat" class="">VM = 0,998756671; VA = -0,000364748875<o:p 
class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" class="">I 
suppose that it has do something with the modelling of the transformer losses 
in matpower. But I don’t have a clue how to get more accurate results. I also 
tried the approach to
 model the losses as suggested here (<a 
href="https://www.mail-archive.com/matpower-l@cornell.edu/msg02291.html"; 
class="">https://www.mail-archive.com/matpower-l@cornell.edu/msg02291.html</a>).
 If someone can give me a hint where to look at, I would be very
 thankful!<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class=""><o:p class="">&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">Thank you very much. With kind regards,<o:p class=""></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Akkurat" 
class="">Tobias Hoffmann<o:p class=""></o:p></span></p>
<p class="MsoNormal"><o:p class="">&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:Akkurat" class=""><o:p 
class="">&nbsp;</o:p></span></p>
</div>
<font face="Arial" class=""><br class="">
<font size="2" class=""><em class="">Wichtiger Hinweis: Die Information in 
dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten 
bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, 
unterrichten Sie bitte den Absender
 und vernichten Sie diese Mail. Vielen Dank. <br class="">
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.
<br class="">
<br class="">
Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail
 correspondence, our statements are only legally binding when they are made in 
the conventional written form (with personal signature) or when such documents 
are sent by fax.
</em></font></font></div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>

--

Reply via email to