Menu

Matlab currents read

Beginners
Dor BA
2020-07-22
2020-07-28
  • Dor BA

    Dor BA - 2020-07-22

    Hi,
    Is there a Matlab order similar to:
    DSSCircuit.AllNodeVmagPUByPhase
    regarding currents?

    Best Regards,
    Dor

     
    • Davis Montenegro

      Hello,

      It all depends on what you are asking for. If what you are looking for is the vectorcontaining complex injection currents for the present solution, then yes, the property is as follows:

      DSSCircuit.YCurrents;
      

      Otherwise, if what you are looking for is a vector containing the currents flowing though the circuit's PDElements (lines, transformers), then there is no interface for that. What you can do is to use the Lines interface and the CktElement interface to get that information, something as follows:

       DSSLines        =   DSSCircuit.Lines;
      DSSCktElement   =   DSSCircuit.ActiveCktElement; 
      DSSLines.First;
      MyCurrents      =   []
      for i=1:DSSLines.Count,
          MyCurrents    =   [MyCurrents, DSSCktElement.currents];
          DSSLines.Next;
      end;
      

      Best regards

      Davis

       

      Last edit: Davis Montenegro 2020-07-22
  • Dor BA

    Dor BA - 2020-07-22

    Thank you for your help Davis.

    I ran your second suggestion on the IEEE37 circuit, and got a 424 length row.

    Is there a way to see their names?

    Also, is there a Matlab-OpenDSS manual somewhere?

    Thanks again

     
    • Davis Montenegro

      Hello,

      Well, you have the code, of course you can. "DSSLines.Name" should do the job, just put it into an array. Each current is delivered as complex pair per phase of element, so you'll have to fix it at your side.

      Best regards

      Davis

       
      • Davis Montenegro

         
      • Dor BA

        Dor BA - 2020-07-26

        Hi Davis,

        The circuit contains 36 lines, and by using DSSLines.Name I got 36 names. 35 lines are 3-phase, complex pairs, so 3532=210. Plus a one phase jumper, that's 212. But I get 424 values, which is double. What am I missing?

        Thanks again
        Dor

         
        • Davis Montenegro

          Hello,

          Yes, this is an easy one. Let's check the numbers:

          • 1 line has 2 terminals.
          • 35 lines are 3 phase, with 2 terminals, 6 readings (3 for terminal 1 and 3 for terminal 2).
          • Each reading is a complex pair, ergo, 35 * 6 * 2 = 420.
          • 1 line single phase, with 2 terminals, 2 readins, each reading 2 complex pairs: 1 * 2 * 2 = 4.
          • Total readings = 4 + 420 = 424 values.

          Best regards

          Davis

           
  • Dor BA

    Dor BA - 2020-07-22

    I can't get it into an array, I'm probably doing something wrong

     
  • Dor BA

    Dor BA - 2020-07-28

    Thank you Davis, I thought so and forgot to write it here.

    What about the oreder?
    Is it line1:
    1.terminal1 ph1_real
    2.terminal1 ph1_comp

    1. terminal1 ph2_real
    2. terminal1 ph2_comp
    3. terminal1 ph3_real
    4. terminal1 ph3_comp
    5. terminal2 ph1_real
      8.terminal2 ph1_comp
    6. terminal2 ph2_real
    7. terminal2 ph2_comp
    8. terminal2 ph3_real
    9. terminal2 ph3_comp

    And then line2, and etc.?

     
    • Davis Montenegro

      Yes Sir,

      Best regards

      Davis

       
  • Dor BA

    Dor BA - 2020-07-28

    Thanks again

     

Log in to post a comment.

MongoDB Logo MongoDB